📄 in_var.h
字号:
/***************************************************************************
*
* Copyright (c) 1993 READY SYSTEMS CORPORATION.
*
* All rights reserved. READY SYSTEMS' source code is an unpublished
* work and the use of a copyright notice does not imply otherwise.
* This source code contains confidential, trade secret material of
* READY SYSTEMS. Any attempt or participation in deciphering, decoding,
* reverse engineering or in any way altering the source code is
* strictly prohibited, unless the prior written consent of
* READY SYSTEMS is obtained.
*
*
* Module Name: in_var.h
*
* Identification: @(#) 2.2 in_var.h
*
* Date: 9/16/94 17:36:00
*
****************************************************************************
*/
/*
RCS header identifier - in_var.h,v 1.2 1995/01/05 16:32:22 sriram Exp
*/
/*
* Copyrighted as an unpublished work.
* (c) Copyright 1987-1993 Lachman Technology, Incorporated
* All rights reserved.
*
* RESTRICTED RIGHTS
*
* These programs are supplied under a license. They may be used,
* disclosed, and/or copied only as permitted under such license
* agreement. Any copy must contain the above copyright notice and
* this restricted rights notice. Use, copying, and/or disclosure
* of the programs is strictly prohibited unless otherwise provided
* in the license agreement.
*/
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* **********************************************************************
*
* CHANGE HISTORY:
*
* ----------------------------------------------------------------------
* DATE CHANGES
* ----------------------------------------------------------------------
*
* 12/14/94 Included the Version 5 TCP compatible code for SNMP_V2.
* Check for #ifdef VER5_COMPAT.
*
* ********************************************************************* */
#ifdef SNX
#ifndef VER5_COMPAT
#define VER5_COMPAT /* This needs to be compiled, SNX */
#endif
#endif
#ifndef in_var__h
#define in_var__h
#ifdef __cplusplus
extern "C" {
#endif
/*
* in_var.h 7.1 (Berkeley) 6/5/86
*/
/*
* Interface address, Internet version. One of these structures is allocated
* for each interface with an Internet address. The ifaddr structure contains
* the protocol-independent part of the structure and is assumed to be first.
*/
struct in_ifaddr {
struct ifaddr ia_ifa; /* protocol-independent info */
#define ia_addr ia_ifa.ifa_addr
#define ia_broadaddr ia_ifa.ifa_broadaddr
#define ia_dstaddr ia_ifa.ifa_dstaddr
#define ia_ifp ia_ifa.ifa_ifp
u_long ia_net; /* network number of interface */
u_long ia_netmask; /* mask of net part */
u_long ia_subnet; /* subnet number, including net */
u_long ia_subnetmask; /* mask of net + subnet */
struct in_addr ia_netbroadcast; /* broadcast addr for
* (logical) net */
int ia_flags;
};
/*
* ia_flags
*/
#define IFA_ROUTE 0x01 /* routing entry installed */
#ifdef __cplusplus
}
#endif
#ifdef VER5_COMPAT
/* SNMP will use these structures. */
/*
* Internet multicast address structure. There is one of these for each IP
* multicast group to which this host belongs on a given network interface.
* They are kept in a linked list, rooted in the interface's in_ifaddr
* structure.
*/
struct in_multi {
struct in_addr inm_addr; /* IP multicast address */
ifnet_t *inm_ifp; /* back pointer to ifnet */
struct in_ifaddr *inm_ia; /* back pointer to in_ifaddr */
u_int inm_refcount; /* no. membership claims by sockets */
u_int inm_timer; /* IGMP membership report timer */
struct in_multi *inm_next; /* ptr to next multicast address */
};
/*
* Interface address, Internet version. One of these structures is allocated
* for each interface with an Internet address. The ifaddr structure contains
* the protocol-independent part of the structure and is assumed to be first.
*/
struct in__ifaddr {
struct ifaddr ia_ifa; /* protocol-independent info */
#define ia__ifp ia_ifa.ifa_ifp
#define ia__refcnt ia_ifa.ifa_refcnt
#define ia__flags ia_ifa.ifa_flags
u_long ia__net; /* network number of interface */
u_long ia__netmask; /* mask of net part */
u_long ia__subnet; /* subnet number, including net */
u_long ia__subnetmask; /* mask of subnet part */
struct in_addr ia__netbroadcast; /* to recognize net broadcasts */
struct in__ifaddr *ia__next; /* next in the list */
struct sockaddr_in ia__addr; /* reserve space for interface name */
struct sockaddr_in ia__dstaddr; /* reserve space for broadcast addr */
#define iabroadaddr ia__dstaddr
struct sockaddr_in ia__sockmask; /* reserve space for general netmask */
struct in_multi *ia__multiaddrs; /* list of multicast addresses */
};
#endif
#endif /* in_var__h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -