File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / snmp / interfaces.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

/* interfaces.h - support for MIB realization of the Interfaces group */

/* 
 * $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/snmp/interfaces.h,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
 *
 * Contributed by NYSERNet Inc.  This work was partially supported by the
 * U.S. Defense Advanced Research Projects Agency and the Rome Air Development
 * Center of the U.S. Air Force Systems Command under contract number
 * F30602-88-C-0016.
 *
 *
 * $Log: interfaces.h,v $
 * Revision 1.1.1.1  2018/04/24 16:12:56  root
 * BSD 4.3reno
 *
 * Revision 7.2  90/03/24  10:54:06  mrose
 * update
 * 
 * Revision 7.1  90/01/11  18:34:08  mrose
 * real-sync
 * 
 * Revision 7.0  89/11/23  22:23:06  mrose
 * Release 6.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


#include "internet.h"
#include <net/if.h>
#include <netinet/if_ether.h>		/* to get struct arpcom */
#include "clnp.h"

/*  */

extern	int	ifNumber;

struct interface {
    int	    ifn_index;			/* 1..ifNumber */
    int	    ifn_indexmask;		/* 1 << (index - 1) */

    int	    ifn_ready;			/* has an address associated with it */

    struct arpcom ifn_interface;	/* ifnet+physaddr */
    unsigned long ifn_offset;		/* where in kmem */

    char    ifn_descr[IFNAMSIZ];	/* e.g., "lo0" */

    int	    ifn_type;			/* ifType */
    int	    ifn_speed;			/* ifSpeed */
    int	    ifn_admin;			/* ifAdminStatus */

    struct interface *ifn_next;
};

extern struct interface *ifs;


int	set_interface (), sort_interface ();

/*  */

union sockaddr_un {		/* 'cause sizeof (struct sockaddr_iso) == 32 */
    struct sockaddr	    sa;

    struct sockaddr_in	    un_in;
#ifdef	BSD44
    struct sockaddr_iso	    un_iso;
#endif
};


struct address {
#define	ADR_SIZE	(20 + 1 + 1)	/* object instance */
    unsigned int    adr_instance[ADR_SIZE];
    int	    adr_insize;

    union sockaddr_un adr_address;	/* address */
    union sockaddr_un adr_broadaddr;	/*   broadcast, only if AF_INET */
    union sockaddr_un adr_netmask;	/*   network mask */

    int	    adr_indexmask;		/* mask of interfaces with address */

    struct address *adr_next;
};

extern struct address *afs_inet;
#ifdef	BSD44
extern struct address *afs_iso;
#endif


struct address *find_address (), *get_addrent ();


#if	defined(BSD44) || defined(BSD43_Tahoe) || defined(RT) || defined(MIPS)
#define	NEW_AT
#else
#undef	NEW_AT
#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.