#ifndef __IF_LOADED #define __IF_LOADED 1 /**************************************************************************** ** ** - Structures providing a packet transport mechanism ** ***************************************************************************** ** Header is nonstandard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** ** ** Copyright (c) 1982, 1993 Regents of the University of California. ** All rights reserved. The Berkeley software License Agreement ** specifies the terms and conditions for redistribution. ** ** if.h 8.1 (Berkeley) 6/10/93 ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #include #include #include #include #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** All structures should be member aligned on natural boundaries */ #pragma __member_alignment __save #pragma __member_alignment /* ** External model of relaxed refdef */ #pragma __extern_model __save #pragma __extern_model __relaxed_refdef /* ** Public typedefs */ #if !defined __U_INT && !defined _DECC_V4_SOURCE # define __U_INT typedef unsigned int u_int; #endif /* * Structures defining a network interface, providing a packet * transport mechanism (ala level 0 of the PUP protocols). * * Each interface accepts output datagrams of a specified maximum * length, and provides higher level routines with input datagrams * received from its medium. * * Output occurs when the routine if_output is called, with four parameters: * (*ifp->if_output)(ifp, m, dst, ro) * Here m is the mbuf chain to be sent and dst is the destination address. * The output routine encapsulates the supplied datagram if necessary, * and then transmits it on its medium. * * On input, each interface unwraps the data received by it, and either * places it on the input queue of a internetwork datagram routine * and posts the associated software interrupt, or passes the datagram to a raw * packet input routine. * * Routines exist for locating interfaces by their addresses * or for locating a interface on a certain network, as well as more general * routing and gateway routines maintaining information used to locate * interfaces. These routines live in the files if.c and route.c */ /* forward decls for C++ */ #ifdef __cplusplus struct mbuf; struct ifaddr; struct ifmulti; struct rtentry; struct ifafilt; #endif /* * Structure defining a queue for a network interface. */ struct ifnet { struct ifnet *if_next; /* the next structure in the list */ char *if_name; /* name, e.g. ``en'' or ``lo'' */ char *if_version; /* The version string. */ struct sockaddr if_addr; /* address of interface */ int if_flags; /* up/down, broadcast, etc. */ short if_unit; /* sub-unit for lower level driver */ u_short if_mtu; /* maximum IP transmission unit */ u_short if_mediamtu; /* maximum MTU of the media */ short if_timer; /* time 'til if_watchdog called */ int if_metric; /* routing metric (external only) */ struct ifaddr *if_addrlist; /* linked list of addresses per if */ struct ifmulti *if_multiaddrs; /* list of multicast addrs */ int if_multicnt; /* number of multicast addrs in list */ int if_allmulticnt; /* number of allmulti requests */ /* procedure handles */ int (*if_init) (int); /* init routine */ int (*if_output) (struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); /* output routine (enqueue) */ int (*if_start) (struct ifnet *); /* initiate output routine */ int (*if_done) (struct ifnet *); /* output complete routine */ int (*if_ioctl) (struct ifnet *, unsigned int, caddr_t); /* ioctl routine */ int (*if_reset) (int, int); /* bus reset routine */ int (*if_watchdog) (int); /* timer routine */ /* generic interface statistics */ int if_ipackets; /* packets received on interface */ int if_ierrors; /* input errors on interface */ int if_opackets; /* packets sent on interface */ int if_oerrors; /* output errors on interface */ int if_collisions; /* collisions on csma interfaces */ int if_sysid_type; /* MOP SYSID device code */ /* SNMP statistics */ struct timeval if_lastchange; /* last updated */ int if_ibytes; /* total number of octets received */ int if_obytes; /* total number of octets sent */ int if_imcasts; /* packets received via multicast */ int if_omcasts; /* packets sent via multicast */ int if_iqdrops; /* dropped on input, this interface */ int if_noproto; /* destined for unsupported protocol */ int if_baudrate; /* linespeed */ /* end statistics */ u_char if_type; /* ethernet, tokenring, etc */ u_char if_addrlen; /* media address length */ u_char if_hdrlen; /* media header length */ u_char if_index; /* numeric abbreviation for this if */ struct ifafilt *if_afilt; /* interface access filter */ int futureuse_2; /* to be used for future expansion */ int futureuse_1; /* to be used for future expansion */ int if_affinity; /* which CPU to run on (master, all) */ struct ifqueue { struct mbuf *ifq_head; struct mbuf *ifq_tail; int ifq_len; int ifq_maxlen; int ifq_drops; } if_snd; /* output queue */ u_int ovms_if_name_length; #define IFNAMSIZ 16 u_char ovms_if_name_buf[IFNAMSIZ]; u_short ovms_if_sts; u_short ovms_if_pad; u_short ovms_if_size; u_char ovms_if_type; u_char ovms_if_iftype; #define IF_LOCAL 0 u_int ovms_if_eth_name; u_short ovms_if_react_att; u_short ovms_if_succ_react; u_int ovms_if_cluster; u_int ovms_if_clust_tcps; u_int ovms_if_cluster_timer_id; u_char ovms_if_lock[24]; u_char *ovms_vcib_ip; u_char *ovms_vcib_arp; u_char *ovms_vcib_ipv6; }; #define IFF_UP 0x1 /* interface is up */ #define IFF_BROADCAST 0x2 /* broadcast address valid */ #define IFF_DEBUG 0x4 /* turn on debugging */ #define IFF_LOOPBACK 0x8 /* is a loopback net */ #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ #define IFF_RUNNING 0x40 /* resources allocated */ #define IFF_NOARP 0x80 /* no address resolution protocol */ #define IFF_PROMISC 0x100 /* receive all packets */ #define IFF_ALLMULTI 0x200 /* receive all multicast packets */ #define IFF_MULTICAST 0x400 /* supports multicast */ #define IFF_SIMPLEX 0x800 /* can't hear own transmissions */ #define IFF_OACTIVE 0x1000 /* transmission in progress */ #define IFF_PFCOPYALL 0x2000 /* pfilt gets packets to this host */ #define IFF_UIOMOVE 0x10000 /* DART */ #define IFF_PKTOK 0x20000 /* DART */ #define IFF_SOCKBUF 0x40000 /* DART */ #define IFF_VAR_MTU 0x80000 /* interface supports variable MTUs */ /* Device-specific flags */ #define IFF_D1 0x8000 #define IFF_D2 0x4000 #define IFF_SNAP IFF_D1 /* Ethernet driver outputs SNAP hdr */ /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_SIMPLEX|IFF_RUNNING|\ IFF_OACTIVE|IFF_MULTICAST|IFF_UIOMOVE|IFF_PKTOK|IFF_SOCKBUF|\ IFF_VAR_MTU) #define IFF_DYNPROTO 0x100000 /* Support dynamic proto dispatching */ #define IFF_MOP 0x200000 /* Device in MOP mode */ #define IFF_SLIP 0x400000 /* Interface is a SLIP IFNET */ #define IFF_DELETE 0x800000 /* Started DELETE on this interface */ #define IFF_NONAME 0x1000000 /* Interf does not hold cluster name */ #define IFF_CLUSTER 0x2000000 /* Interface is a cluster IFNET */ /* interface types for benefit of parsing media address headers */ /* * The ifaddr structure contains information about one address * of an interface. They are maintained by the different address families, * are allocated and attached when an address is set, and are linked * together so all addresses for an interface can be located. */ struct ifaddr { struct sockaddr *ifa_addr; /* address of interface */ struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */ #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ struct sockaddr *ifa_netmask; /* used to determine subnet */ struct ifnet *ifa_ifp; /* back-pointer to interface */ struct ifaddr *ifa_next; /* next address for interface */ /* check or clean routes (+ or -)'d */ void (*ifa_rtrequest) (int, struct rtentry *, struct sockaddr *); struct rtentry *ifa_rt; /* ??? for ROUTETOIF */ u_short ifa_flags; /* mostly rt_flags for cloning */ u_short ifa_refcnt; /* ref count */ }; #define IFA_ROUTE RTF_UP /* route installed */ /* * Interface request structure used for socket * ioctl's. All interface ioctl's must have parameter * definitions which begin with ifr_name. The * remainder may be interface specific. */ struct ifreq { char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ union { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; int ifru_flags; int ifru_metric; caddr_t ifru_data; int ifru_value; /* any generic value */ u_int ifru_index; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ #define ifr_flags ifr_ifru.ifru_flags /* flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_data ifr_ifru.ifru_data /* for use by interface */ #define ifr_value ifr_ifru.ifru_value /* for use by interface */ #define ifr_index ifr_ifru.ifru_index /* interface index */ }; /* * structure used to query de and qe for physical addresses */ struct ifdevea { char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ u_char default_pa[6]; /* default hardware address */ u_char current_pa[6]; /* current physical address */ }; struct ifaliasreq { char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ struct sockaddr ifra_addr; struct sockaddr ifra_broadaddr; struct sockaddr ifra_mask; }; /* * Request struct to create interface access filters. Used * in SIOCSIFAFILT requests. */ struct ifafiltreq { char ifafr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ u_int ifafr_cnt; /* number of entries */ struct ifafilt *ifafr_filt; /* user-defined filter */ }; /* * Interface access filter. Filter is variable length as * specified by user's ifafiltreq. Filter allocated via * NET_MALLOC; one valid filter per interface; new filter * outdates existing filter. * * Filter entrys contain {addr, mask, action}. {addr, mask} * combine to filter packets; {action} gives action for * matching packets. "cnt" is reference count for number * of hits per filter entry. Filtering is protocol-specific; * see netinet/{in,ip_input}.c for IP-style filtering. */ struct ifafilt { struct sockaddr ifaf_addr; /* addr */ struct sockaddr ifaf_mask; /* mask */ u_int ifaf_action; /* action */ u_int ifaf_cnt; /* counter */ }; #define IFAF_PERMIT 0x1 #define IFAF_DENY 0x2 #define IFAF_DENYLOG 0x4 /* * IFAF_MAXBUFSIZE = 32Kbytes * IFAF_MAXENTRIES = (IFAF_MAXBUFSIZE/sizeof(struct ifafilt)) - 2 */ #define IFAF_MAXBUFSIZE 0x8000 #define IFAF_MAXENTRIES 0x331 /* * Structure used in SIOCGIFCONF request. * Used to retrieve interface configuration * for machine (useful for programs which * must know all networks accessible). */ struct ifconf { int ifc_len; /* size of associated buffer */ union { caddr_t ifcu_buf; struct ifreq *ifcu_req; } ifc_ifcu; #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ }; /* * Interface multicast address structure. There is one of these for each * multicast address or range of multicast addresses that we are supposed * to listen to on a particular interface. They are kept in a linked list, * rooted in the interfaces's ifnet structure. */ struct ifmulti { u_char ifm_addrlo[6]; /* low or only address of range */ u_char ifm_addrhi[6]; /* high or only address of range */ struct ifnet *ifm_ifnet; /* back pointer to ifnet */ u_int ifm_refcount; /* no. claims to this addr/range */ struct ifmulti *ifm_next; /* ptr to next ifmulti */ }; /* * Structure for EEPROM downline upgrades. (Supported by FDDI adapters) */ struct ifeeprom { char ife_name[IFNAMSIZ]; /* if name, e.g. "fza0" */ u_char ife_data[64]; /* block of EEPROM data */ u_int ife_offset; /* byte offset from base */ u_int ife_blklen; /* len of EEPROM block */ u_int ife_lastblk; /* True if last block */ }; #define IFE_NOTLAST 0x0 /* Intermediary block of EEPROM image */ #define IFE_LASTBLOCK 0x1 /* Last block of EEPROM image */ #define IFE_SUCCESS 0x0 /* Block of EEPROM successfully written */ #define IFE_RETRY 0x1 /* Retry last block written */ #define IFE_FAIL 0x2 /* Fail entire EEPROM image write sequence */ /* * Structure for set adapter's characteristics */ struct ifchar { char ifc_name[IFNAMSIZ]; u_int ifc_treq; u_int ifc_tvx; u_int ifc_lem; u_int ifc_rtoken; u_int ifc_ring_purger; u_int ifc_cnt_interval; /* Not applicable to DEFZA */ #define FDX_ENB 1 #define FDX_DIS 2 int ifc_full_duplex_mode; /* Not applicable to DEFZA */ int ifc_media_speed; int ifc_media_type; #define AUTO_ENB 1 #define AUTO_DIS 2 int ifc_auto_sense; }; /* * interface statistics structures */ struct estat { /* Ethernet interface statistics */ u_short est_seconds; /* seconds since last zeroed */ u_int est_bytercvd; /* bytes received */ u_int est_bytesent; /* bytes sent */ u_int est_blokrcvd; /* data blocks received */ u_int est_bloksent; /* data blocks sent */ u_int est_mbytercvd; /* multicast bytes received */ u_int est_mblokrcvd; /* multicast blocks received */ u_int est_deferred; /* blocks sent, initially deferred */ u_int est_single; /* blocks sent, single collision */ u_int est_multiple; /* blocks sent, multiple collisions */ u_short est_sendfail_bm; /* 0 - Excessive collisions */ /* 1 - Carrier check failed */ /* 2 - Short circuit */ /* 3 - Open circuit */ /* 4 - Frame too long */ /* 5 - Remote failure to defer */ u_short est_sendfail; /* send failures: (bit map)*/ u_short est_collis; /* Collision detect check failure */ u_short est_recvfail_bm; /* 0 - Block check error */ /* 1 - Framing error */ /* 2 - Frame too long */ u_short est_recvfail; /* receive failure: (bit map) */ u_short est_unrecog; /* unrecognized frame destination */ u_short est_overrun; /* data overrun */ u_short est_sysbuf; /* system buffer unavailable */ u_short est_userbuf; /* user buffer unavailable */ u_int est_mbytesent; /* multicast bytes sent */ u_int est_mbloksent; /* multicast blocks sent */ }; struct dstat { /* DDCMP pt-to-pt interface statistics */ u_short dst_seconds; /* seconds since last zeroed */ u_int dst_bytercvd; /* bytes received */ u_int dst_bytesent; /* bytes sent */ u_int dst_blockrcvd; /* data blocks received */ u_int dst_blocksent; /* data blocks sent */ u_short dst_inbound_bm; /* 0 - NAKs sent, header crc */ /* 1 - NAKs sent, data crc */ /* 2 - NAKs sent, REP response */ u_char dst_inbound; /* data errors inbound: (bit map) */ u_short dst_outbound_bm; /* 0 - NAKs rcvd, header crc */ /* 1 - NAKs rcvd, data crc */ /* 2 - NAKs rcvd, REP response */ u_char dst_outbound; /* data errors outbound: (bit map) */ u_char dst_remotetmo; /* remote reply timeouts */ u_char dst_localtmo; /* local reply timeouts */ u_short dst_remotebuf_bm; /* 0 - NAKs rcvd, buffer unavailable */ /* 1 - NAKs rcvd, buffer too small */ u_char dst_remotebuf; /* remote buffer errors: (bit map) */ u_short dst_localbuf_bm; /* 0 - NAKs sent, buffer unavailable */ /* 1 - NAKs sent, buffer too small */ u_char dst_localbuf; /* local buffer errors: (bit map) */ u_char dst_select; /* selection intervals elapsed */ u_short dst_selecttmo_bm; /* 0 - No reply to select */ /* 1 - Incomplete reply to select */ u_char dst_selecttmo; /* selection timeouts: (bit map) */ u_short dst_remotesta_bm; /* 0 - NAKs rcvd, receive overrun */ /* 1 - NAKs sent, header format */ /* 2 - Select address errors */ /* 3 - Streaming tributaries */ u_char dst_remotesta; /* remote station errors: (bit map) */ u_short dst_localsta_bm; /* 0 - NAKs sent, receive overrun */ /* 1 - Receive overrun, NAK not sent */ /* 2 - Transmit underruns */ /* 3 - NAKs rcvd, header format */ u_char dst_localsta; /* local station errors: (bit map) */ }; struct fstat { u_short fst_second; /* seconds since last zeroed */ u_int fst_frame; /* total number of frames seen */ u_int fst_error; /* MAC counter frame error */ u_int fst_lost; /* MAC counter frame count */ u_int fst_bytercvd; /* bytes received */ u_int fst_bytesent; /* bytes sent */ u_int fst_pdurcvd; /* data blocks received */ u_int fst_pdusent; /* data blocks sent */ u_int fst_mbytercvd; /* multicast bytes received */ u_int fst_mpdurcvd; /* multicast blocks received */ u_int fst_mbytesent; /* multicast bytes sent */ u_int fst_mpdusent; /* multicast blocks sent */ u_short fst_underrun; /* transmit underrun error */ u_short fst_sendfail; /* sent failures: (bit map)*/ u_short fst_fcserror; /* FCS check failure */ u_short fst_fseerror; /* frame status error */ u_short fst_pdualig; /* frame alignment error */ u_short fst_pdulen; /* frame length error */ u_short fst_pduunrecog; /* frame unrecognized */ u_short fst_mpduunrecog; /* multicast frame unrecognized */ u_short fst_overrun; /* data overrun */ u_short fst_sysbuf; /* system buffer unavailable */ u_short fst_userbuf; /* user buffer unavailable */ u_short fst_ringinit; /* other station ring reinit. intiated*/ u_short fst_ringinitrcv; /* ring reinitialization initiated */ u_short fst_ringbeacon; /* ring beacon process initiated */ u_short fst_ringbeaconrecv; /* ring beacon process recv */ u_short fst_duptoken; /* duplicat token detected */ u_short fst_dupaddfail; /* duplicate address test failures */ u_short fst_ringpurge; /* ring purge errors */ u_short fst_bridgestrip; /* bridge strip errors */ u_short fst_traceinit; /* traces initiated */ u_short fst_tracerecv; /* traces received */ u_short fst_lem_rej; /* LEM reject count */ u_short fst_lem_events; /* LEM events count */ u_short fst_lct_rej; /* LCT reject count */ u_short fst_tne_exp_rej; /* TNE expired reject count */ u_short fst_connection; /* Completed Connection count */ u_short fst_ebf_error; /* Elasticity Buffer Errors */ }; /* * FDDI MIB structures */ /* SMT group */ struct fddismt { short smt_number; /* SMT number */ short smt_index; /* SMT FDDI SMT index */ u_char smt_stationid[8]; /* FDDI station id */ u_short smt_opversionid; /* operation version id */ u_short smt_hiversionid; /* highest version id */ u_short smt_loversionid; /* lowest version id */ short smt_macct; /* number of MACs */ short smt_nonmasterct; /* number of non master port */ short smt_masterct; /* number of master port */ short smt_pathsavail; /* available path type */ short smt_configcap; /* configuration capabilities */ short smt_configpolicy; /* configuration policy */ u_short smt_connectpolicy; /* connection policy */ u_short smt_timenotify; /* neighbor notification prot. time*/ short smt_statusreport; /* status reporting protocol */ short smt_ecmstate; /* state of ECM state machine */ short smt_cfstate; /* CF_state */ short smt_holdstate; /* current state of Hold function */ short smt_remotedisconn; /* remotely disconnection flag */ u_char smt_msgtimestamp[8]; /* timestamp for SMT frames */ u_char smt_trantimestamp[8]; /* timestamp for last event */ u_char smt_setinfo[12]; /* station last parameter change */ u_char smt_lastsetid[8]; /* Last station ID change */ short smt_action; /* SMT station action */ }; /*--------------------------------------------------------------*/ /* */ /* FDDI Station/Link/Physical Port Attributes & Status: */ /* */ /* defined by the DNA-FDDI Data Link Functional Spec */ /* version 1.0.1 chapter 5. */ /* */ /*--------------------------------------------------------------*/ struct fddi_dna_attributes { /* STATION Attributes */ u_char stationid[8]; /* FDDI station id */ short stationtype; /* FDDI station type */ u_short opversionid; /* operation version id */ u_short hiversionid; /* highest version id */ u_short loversionid; /* lowest version id */ /* LINK Attributes */ u_char link_addr[6]; /* LINK address */ u_int t_req; /* TRT request */ u_int tvx; /* Valid Transmission time */ u_int rtoken_timeout; /* restricted token timeout */ short ring_purge_enable; /* ring purger enable */ /* PHY Attributes */ u_char phy_type; /* PHY type */ u_char pmd_type; /* PMD type */ u_int lem_threshold; /* lem threshold */ }; struct fddi_dna_status { /* STATION Status */ short station_state; /* station state */ u_char laststationid[8]; /* Last FDDI station id */ u_char station_uid[8]; /* station uid */ /* LINK Status */ short link_state; /* LINK state */ u_char link_uid[8]; /* link uid */ u_int neg_trt; /* Negotiated TRT */ short dup_add_flag; /* duplicate address flag */ u_char upstream[6]; /* Upstream Neighbor */ u_char oldupstream[6]; /* Old Upstream Neighbor */ short upstreamdaf; /* Upstream Neighbor duplicate address flag */ u_char downstream[6]; /* Downstream Neighbor */ u_char olddownstream[6]; /* Old Downstream Neighbor */ short ring_purge_state; /* ring purge state */ u_char frame_strip_mode; /* frame strip mode */ u_char ring_error; /* ring error reasons */ short loopback; /* loopback mode - true/false */ short ring_latency; /* currently measured ring latency */ u_char ring_purge_addr[6]; /* ring purger address */ /* PHY Status */ u_char phy_state; /* Physical state */ u_char phy_uid[8]; /* phy uid */ u_char neighbor_phy_type; /* Neighborshort */ u_int phy_link_error; /* phy link error estimate */ u_char broken_reason; /* phy port broken reason */ u_char rej_reason; /* reject reason */ }; struct fddiDNA_status { struct fddi_dna_attributes attr; struct fddi_dna_status stat; }; struct fstatus { short led_state; /* LED State */ short rmt_state; /* RMT state */ short link_state; /* LINK state */ short dup_add_test; /* duplicate address test */ short ring_purge_state; /* ring purge state */ u_int neg_trt; /* Negotiated TRT */ u_char upstream[6]; /* Upstream Neighbor */ u_char downstream[6]; /* downstream Neighbor */ u_char una_timed_out; /* una timed out flag */ u_char frame_strip_mode; /* frame strip mode */ u_char claim_token_mode; /* claim token yield mode */ u_char phy_state; /* Physical state */ u_char neighbor_phy_type; /* Neighborshort */ u_char rej_reason; /* reject reason */ u_int phy_link_error; /* phy link error estimate */ u_char ring_error; /* ring error reasons */ u_int t_req; /* TRT request */ u_int tvx; /* TVX value */ u_int t_max; /* TRT maximum */ u_int lem_threshold; /* lem threshold */ u_int rtoken_timeout; /* restricted token timeout */ u_char fw_rev[4]; /* firmware revision */ u_char phy_rev[4]; /* ROM revision */ u_char pmd_type; /* PMD type */ u_char dir_beacon[6]; /* Last Direct Beacon address */ short smt_version; /* SMT version */ short state; /* Adapter State */ u_char dir_beacon_una[6]; /* UNA from last direct beacon addr. */ short cnt_interval; /* Interval to get counter updates */ short full_duplex_mode; /* enabling/disabling duplex mode */ short full_duplex_state; /* state, if enabled */ }; /* MAC group */ struct fddimac { short mac_number; /* MAC number */ short mac_smt_index; /* MAC SMT index */ short mac_index; /* MAC index */ short mac_fsc; /* MAC frame status capabilities */ u_int mac_gltmax; /* Greastest lower bound of T_max */ u_int mac_gltvx; /* Greastest lower bound of TVX */ short mac_paths; /* path types available */ short mac_current; /* association of the MAC with path*/ u_char mac_upstream[6]; /* upstream neighbor */ u_char mac_oldupstream[6]; /* previous upstream neighbor */ short mac_dupaddrtest; /* duplicate address test */ short mac_pathsreq; /* paths requested */ short mac_downstreamtype; /* downstream PC-type */ u_char mac_smtaddress[6]; /* MAC address for SMT */ u_int mac_treq; /* TRT time */ u_int mac_tneg; /* Neg. TRT time */ u_int mac_tmax; /* max. TRT time */ u_int mac_tvx; /* TVX value */ u_int mac_tmin; /* min. TRT time */ short mac_framestatus; /* current frame status */ int mac_counter; /* frame counters */ int mac_error; /* frame error counters */ int mac_lost; /* frame lost counter */ short mac_rmtstate; /* Ring Management state */ short mac_dupaddr; /* duplicate address flag */ short mac_condition; /* MAC condition */ short mac_action; /* MAC action */ short mac_updupaddr; /* upstream duplicate address flag */ short mac_frame_error_thresh; /* frame error threshold */ short mac_frame_error_ratio; /* frame error ratio */ short mac_chip_set; /* the chip set used */ }; /* PATH group */ struct fddipath { short path_configindex; /* path configuration index */ short path_type; short path_portorder; u_int path_sba; /*synchronous bandwidth allocation*/ short path_sbaoverhead; /* SBA overhead */ short path_status; /* path status */ }; /* PORT group */ struct fddiport { short port_number; /* port number */ short port_smt_index; /* port SMT index */ short port_index; /* port index */ short port_pctype; /* value of the port's PC_type */ short port_pcneighbor; /* PC_neighbor of remote port*/ short port_connpolicy; /* connection policies */ short port_remoteind; /* remote MAC indicated */ short port_CEstate; /* Current Configuration state */ short port_pathreq; /* path request */ u_short port_placement; /* upstream MAC */ short port_availpaths; /* available paths */ u_int port_looptime; /* time for MAC loval loop */ u_int port_TBmax; /* TB_max */ short port_BSflag; /* the Break state, BF_flag */ u_int port_LCTfail; /* counter for Link confidence test */ short port_LerrEst; /* Link error estimate */ u_int port_Lemreject; /* Link reject count */ u_int port_Lem; /* Link error monitor count */ short port_baseLerEst; /* value of port Ler Estimate */ u_int port_baseLerrej; /* Ler reject count */ u_int port_baseLer; /* Ler count */ u_char port_baseLerTime[8]; /* Ler timestamp */ short port_Lercutoff; /* error rate cut off limit */ short port_alarm; /* error rate cause alarm generate*/ short port_connectstate; /* connect state */ short port_PCMstate; /* PCM state */ short port_PCwithhold; /* PC_withhold */ short port_Lercondition; /* true if Ler-Est <= Ler_alarm */ short port_action; /* PORT action */ short port_chip_set; /* PORT chip set */ }; /* Attachment group */ struct fddiatta { short atta_number; /* attachment number */ short atta_smt_index; /* attachment SMT index */ short atta_index; /* attachment index */ short atta_class; /* attachment class */ short atta_bypass; /* attachment optical bypass */ short atta_IMaxExpiration; /* attachment I_Max Expiration */ short atta_InsertedStatus; /* Inserted status */ short atta_InsertPolicy; /* Insert policy */ }; /* Information here is conformant to SMT 7.2 */ /* SMT GROUP */ struct smtmib_smt { u_char smt_station_id[8]; u_int smt_op_version_id; u_int smt_hi_version_id; u_int smt_lo_version_id; u_char smt_user_data[32]; u_int smt_mib_version_id; u_int smt_mac_ct; u_int smt_non_master_ct; u_int smt_master_ct; u_int smt_available_paths; u_int smt_config_capabilities; u_int smt_config_policy; u_int smt_connection_policy; u_int smt_t_notify; u_int smt_stat_rpt_policy; u_int smt_trace_max_expiration; u_int smt_bypass_present; u_int smt_ecm_state; u_int smt_cf_state; u_int smt_remote_disconnect_flag; u_int smt_station_status; u_int smt_peer_wrap_flag; #ifdef __alpha u_long smt_msg_time_stamp; /* 64 bit counter */ u_long smt_transition_time_stamp; /* 64 bit counter */ #else u_int smt_msg_time_stamp_ms; /* 64 bit counter */ u_int smt_msg_time_stamp_ls; u_int smt_transition_time_stamp_ms; /* 64 bit counter */ u_int smt_transition_time_stamp_ls; #endif /* __alpha */ }; /* MAC GROUP */ struct smtmib_mac { u_int mac_frame_status_functions; u_int mac_t_max_capability; u_int mac_tvx_capability; u_int mac_available_paths; u_int mac_current_path; u_char mac_upstream_nbr[8]; u_char mac_downstream_nbr[8]; u_char mac_old_upstream_nbr[8]; u_char mac_old_downstream_nbr[8]; u_int mac_dup_address_test; u_int mac_requested_paths; u_int mac_downstream_port_type; u_char mac_smt_address[8]; u_int mac_t_req; u_int mac_t_neg; u_int mac_t_max; u_int mac_tvx_value; u_int mac_frame_error_threshold; u_int mac_frame_error_ratio; u_int mac_rmt_state; u_int mac_da_flag; u_int mac_unda_flag; u_int mac_frame_error_flag; u_int mac_ma_unitdata_available; u_int mac_hw_present; u_int mac_ma_unitdata_enable; }; /* PATH GROUP */ struct smtmib_path { u_char path_configuration[32]; u_int path_tvx_lower_bound; u_int path_t_max_lower_bound; u_int path_max_t_req; }; /* PORT GROUP */ struct smtmib_port { u_int port_my_type[2]; u_int port_neighbor_type[2]; u_int port_connection_policies[2]; u_int port_mac_indicated[2]; u_int port_current_path[2]; u_int port_requested_paths[2]; u_int port_mac_placement[2]; u_int port_available_paths[2]; u_int port_pmd_class[2]; u_int port_connection_capabilities[2]; u_int port_bs_flag[2]; u_int port_ler_estimate[2]; u_int port_ler_cutoff[2]; u_int port_ler_alarm[2]; u_int port_connect_state[2]; u_int port_pcm_state[2]; u_int port_pc_withhold[2]; u_int port_ler_flag[2]; u_int port_hardware_present[2]; }; struct decext_mib { /* SMT GROUP */ u_int esmt_station_type; /* MAC GROUP */ u_int emac_link_state; u_int emac_ring_purger_state; u_int emac_ring_purger_enable; u_int emac_frame_strip_mode; u_int emac_ring_error_reason; u_int emac_up_nbr_dup_addr_flag; u_int emac_restricted_token_timeout; /* PORT GROUP */ u_int eport_pmd_type[2]; u_int eport_phy_state[2]; u_int eport_reject_reason[2]; /* FDX (Full-Duplex) GROUP */ u_int efdx_enable; /* Valid only in SMT 7.2 */ u_int efdx_op; /* Valid only in SMT 7.2 */ u_int efdx_state; /* Valid only in SMT 7.2 */ }; #define CTR_ETHER 0 /* Ethernet interface */ #define CTR_DDCMP 1 /* DDCMP pt-to-pt interface */ #define CTR_FDDI 2 /* FDDI interface */ #define FDDIMIB_SMT 3 /* FDDI MIB SMT group */ #define FDDIMIB_MAC 4 /* FDDI MIB MAC group */ #define FDDIMIB_PATH 5 /* FDDI MIB PATH group */ #define FDDIMIB_PORT 6 /* FDDI MIB PORT group */ #define FDDIMIB_ATTA 7 /* FDDI MIB Attatchment Group */ #define FDDI_STATUS 8 /* FDDI status */ #define FDDISMT_MIB_SMT 9 /* FDDI SMT SMT MIB values */ #define FDDISMT_MIB_MAC 10 /* FDDI SMT MAC values */ #define FDDISMT_MIB_PATH 11 /* FDDI SMT PATH values */ #define FDDISMT_MIB_PORT 12 /* FDDI SMT PORT values */ #define FDDIDECEXT_MIB 13 /* FDDI DEC Extended MIB values */ #define CTR_TRN 14 /* Token ring counters */ #define TRN_CHAR 15 /* Token ring characteristics */ #define TRN_MIB_ENTRY 16 /* Token ring mib entry */ #define TRN_MIB_STAT_ENTRY 17 /* Token ring mib status entry */ #define TRN_MIB_TIMER_ENTRY 18 /* Token ring mib timer entry */ #define FDDIMIB_PORT_B 19 /* FDDI MIB PORT group */ #define FDDISMT_MIB_PORT_B 20 /* FDDI MIB PORT group */ #define ctr_ether ctr_ctrs.ctrc_ether #define ctr_ddcmp ctr_ctrs.ctrc_ddcmp #define ctr_fddi ctr_ctrs.ctrc_fddi #define sts_fddi ctr_ctrs.status_fddi #define dna_fddi ctr_ctrs.dna_status_fddi #define fmib_smt ctr_ctrs.smt_fddi #define fmib_mac ctr_ctrs.mac_fddi #define fmib_path ctr_ctrs.path_fddi #define fmib_port ctr_ctrs.port_fddi #define fmib_atta ctr_ctrs.atta_fddi #define smib_smt ctr_ctrs.smt_smt #define smib_mac ctr_ctrs.smt_mac #define smib_port ctr_ctrs.smt_port #define smib_path ctr_ctrs.smt_path #define decmib_ext ctr_ctrs.dec_ext #define CTR_HDRCRC 0 /* header crc bit index */ #define CTR_DATCRC 1 /* data crc bit index */ #define CTR_BUFUNAVAIL 0 /* buffer unavailable bit index */ /* * Interface counter ioctl request */ struct ctrreq { char ctr_name[IFNAMSIZ]; /* if name */ char ctr_type; /* type of interface */ union { struct estat ctrc_ether; /* ethernet counters */ struct dstat ctrc_ddcmp; /* DDCMP pt-to-pt counters */ struct fstat ctrc_fddi; /* FDDI counters */ struct fstatus status_fddi; /* FDDI stsatus */ struct fddiDNA_status dna_status_fddi; /* FDDI status per DNA spec */ struct fddismt smt_fddi; /* fddi SMT attributes */ struct fddimac mac_fddi; /* fddi MAC attributes */ struct fddipath path_fddi; /* fddi PATH attributes */ struct fddiport port_fddi; /* fddi PORT attributes */ struct fddiatta atta_fddi; /* fddi attatch attributes */ struct smtmib_smt smt_smt; /* smt mib attributes */ struct smtmib_mac smt_mac; /* smt mib attributes */ struct smtmib_path smt_path; /* smt mib attributes */ struct smtmib_port smt_port; /* smt mib attributes */ struct decext_mib dec_ext; /* dec extended mib */ struct trnchar trnchar; /* Token ring characteristics */ struct trncount trncount; /* Token ring counters */ struct dot5Entry dot5Entry; /* Token ring MIB counters */ struct dot5StatsEntry dot5StatsEntry; /*Token ring MIB stats */ struct dot5TimerEntry dot5TimerEntry; /*Token ring MIB Timers */ } ctr_ctrs; }; union mac_addr { u_short saddr[3]; u_char caddr[6]; }; /* * following are the prototypes and structure defns. for the * new interface indentification API for IPv6 */ char * if_indextoname ( unsigned int, char *); unsigned int if_nametoindex ( const char * ); struct if_nameindex * if_nameindex ( void ); void if_freenameindex ( struct if_nameindex *); struct if_nameindex { unsigned int if_index; char *if_name; }; /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #pragma __extern_model __restore #pragma __standard #endif /* __IF_LOADED */ #ifndef __IF_ARP_LOADED #define __IF_ARP_LOADED 1 /**************************************************************************** ** ** - Structures for the Address Resolution Protocol ** ***************************************************************************** ** Header is nonstandard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** ** ** Copyright (c) 1982, 1993 Regents of the University of California. ** All rights reserved. The Berkeley software License Agreement ** specifies the terms and conditions for redistribution. ** ** if_arp.h 8.1 (Berkeley) 6/10/93 ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #include #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** All structures should be member aligned on natural boundaries */ #pragma __member_alignment __save #pragma __member_alignment /* ** External model of relaxed refdef */ #pragma __extern_model __save #pragma __extern_model __relaxed_refdef /* * Address Resolution Protocol. * * See RFC 826 for protocol description. ARP packets are variable * in size; the arphdr structure defines the fixed-length portion. * Protocol type values are the same as those for 10 Mb/s Ethernet. * It is followed by the variable-sized fields ar_sha, arp_spa, * arp_tha and arp_tpa in that order, according to the lengths * specified. Field names used correspond to RFC 826. */ struct arphdr { u_short ar_hrd; /* format of hardware address */ #define ARPHRD_ETHER 1 /* ethernet hardware address */ #define ARPHRD_802 6 /* 802 net hardware address */ u_short ar_pro; /* format of protocol address */ u_char ar_hln; /* length of hardware address */ u_char ar_pln; /* length of protocol address */ u_short ar_op; /* one of: */ #define ARPOP_REQUEST 1 /* request to resolve address */ #define ARPOP_REPLY 2 /* response to previous request */ /* * The remaining fields are variable in size, * according to the sizes above. */ /* u_char ar_sha[]; sender hardware address */ /* u_char ar_spa[]; sender protocol address */ /* u_char ar_tha[]; target hardware address */ /* u_char ar_tpa[]; target protocol address */ }; /* For indexing into arbitrary ha/pa ARP headers */ #define AR_SHA(ah) ((u_char *)((ah)+1)) #define AR_SPA(ah) (AR_SHA(ah)+(ah)->ar_hln) #define AR_THA(ah) (AR_SPA(ah)+(ah)->ar_pln) #define AR_TPA(ah) (AR_THA(ah)+(ah)->ar_hln) /* * ARP ioctl request */ struct arpreq { struct sockaddr arp_pa; /* protocol address */ struct sockaddr arp_ha; /* hardware address */ int arp_flags; /* flags */ }; /* arp_flags and at_flags field values */ #define ATF_INUSE 0x01 /* entry in use */ #define ATF_COM 0x02 /* completed entry (enaddr valid) */ #define ATF_PERM 0x04 /* permanent entry */ #define ATF_PUBL 0x08 /* publish entry (respond for other host) */ #define ATF_USETRAILERS 0x10 /* has requested trailers */ #define ATF_USE802 0x20 /* host using 802 framing */ #define ATF_STALE 0x0100 /* entry needs to be refreshed */ #define ATF_DEAD 0x0200 /* entry (host) failed to refresh */ #define ATF_CANTCHANGE (0xff00|ATF_INUSE|ATF_COM) /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #pragma __extern_model __restore #pragma __standard #endif /* __IF_ARP_LOADED */ #ifndef __IF_TRNSTAT_LOADED #define __IF_TRNSTAT_LOADED 1 /**************************************************************************** ** ** - Structures providing a packet transport mechanism ** ***************************************************************************** ** Header is nonstandard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** ** ** Copyright (c) 1982, 1993 Regents of the University of California. ** All rights reserved. The Berkeley software License Agreement ** specifies the terms and conditions for redistribution. ** ** if.h 8.1 (Berkeley) 6/10/93 ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #include #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** All structures should be member aligned on natural boundaries */ #pragma __member_alignment __save #pragma __member_alignment /* ** External model of relaxed refdef */ #pragma __extern_model __save #pragma __extern_model __relaxed_refdef /* * Token Ring characteristics. */ struct trnchar { __u_char mac_addr[6]; /* The mac address */ __u_char grp_addr[6]; /* Group address */ __u_char func_addr[6]; /* Functional address */ __u_short drop_numb; /* Physical drop number */ __u_char upstream_nbr[6]; /* Upstream neighbor */ __u_short upstream_drop_numb; /* Upstream drop number */ __u_short transmit_access_pri; /* Trasmit access priority */ __u_short last_major_vector; /* Last major vector */ __u_short ring_status; /* Ring status */ __u_short interface_state; /* State of the interface*/ __u_short monitor_contd; /* monitor contender */ __u_short soft_error_timer; /* Soft error timer value */ __u_short ring_number; /* Local ring number */ __u_short monitor_error_code; /* Monitor error code */ __u_short beacon_receive_type; /* Type of beacon received */ __u_short beacon_transmit_type; /* Type of beacon transmitted */ __u_char beacon_una[6]; /* UNA of the beaconing station */ __u_short beacon_stn_drop_numb; /* Drop number of the beacon station */ __u_short ring_speed; /* The ring speed */ __u_short etr; /* Early token release */ __u_short open_status; /* Open status */ __u_char token_ring_chip[16]; /* type of chip */ }; /* * Definitions for the Major Vector commands * See page 2-30 of the TMS380 book */ #define MV_RESPONSE 0x00 #define MV_BEACON 0x02 #define MV_CLAIM_TOKEN 0x03 #define MV_RING_PURGE 0x04 #define MV_ACTIVE_MON_PRES 0x05 #define MV_STANDBY_MON_PRES 0x06 #define MV_DUP_ADDR_TEST 0x07 #define MV_LOBE_MEDIA_TEST 0x08 #define MV_TRANSMIT_FORW 0x09 #define MV_RMV_RING_STATION 0x0B #define MV_CHANGE_PARM 0x0C #define MV_INIT_RING_STN 0x0D #define MV_REQ_STN_ADDR 0x0E #define MV_REQ_STN_STATE 0x0F #define MV_REQ_STN_ATTACH 0x10 #define MV_REQ_INIT 0x20 #define MV_REPORT_STN_ADDR 0x22 #define MV_REPORT_STN_STATE 0x23 #define MV_REPORT_STN_ATTACH 0x24 #define MV_REPORT_NEW_MONITOR 0x25 #define MV_REPORT_SUA_CHANGE 0x26 #define MV_REPORT_RNG_POLL_FAIL 0x27 #define MV_REPORT_MONTIOR_ERR 0x28 #define MV_REPORT_ERR 0x29 #define MV_REPORT_TRANSMIT_FORW 0x2A /* * Definitions for the beacon types * See page 2-56 of the TMS380 book */ #define BT_SET_RECOV_MODE 0x01 #define BT_SET_SIGNAL_LOSS 0x02 #define BT_SET_BIT_STREAMING 0x03 #define BT_SET_CONT_STREAMING 0x04 /* * Definitions for the Monitor Error Code. * See page 2-47 of the TMS380 book */ #define M_NO_ERROR 0x0000 #define M_MON_ERROR 0x0001 #define M_DUPLICATE_MON 0x0002 #define M_DUPLICATE_ADDR 0x0003 /* * Token Ring counters */ struct trncount { __u_long trn_second; /* seconds since last zeroed */ __u_long trn_bytercvd; /* bytes received */ __u_long trn_bytesent; /* bytes sent */ __u_long trn_pdurcvd; /* data blocks received */ __u_long trn_pdusent; /* data blocks sent */ __u_long trn_mbytercvd; /* multicast bytes received */ __u_long trn_mpdurcvd; /* multicast blocks received */ __u_long trn_mbytesent; /* multicast bytes sent */ __u_long trn_mpdusent; /* multicast blocks sent */ __u_long trn_pduunrecog; /* frame unrecognized */ __u_long trn_mpduunrecog; /* multicast frame unrecognized */ __u_short trn_nosysbuf; /* system buffer unavailable */ __u_short trn_xmit_fail; /* xmit failures */ __u_short trn_xmit_underrun; /* xmit underruns */ __u_short trn_line_error; /* Line errors */ __u_short trn_internal_error; /* recoverable internal errors */ __u_short trn_burst_error; /* Burst error */ __u_short trn_ari_fci_error; /* ARI/FCI error */ __u_short trn_ad_trans; /* Abort delimiters transmitted */ __u_short trn_lost_frame_error; /* Lost frame error */ __u_short trn_rcv_congestion_error;/* receive overrun (or congestion) */ __u_short trn_frame_copied_error; /* Frame copied error */ __u_short trn_frequency_error; /* Frequency error */ __u_short trn_token_error; /* Token error */ __u_short trn_hard_error; /* Hard errors */ __u_short trn_soft_error; /* Soft errors */ __u_short trn_adapter_reset; /* Resets performed */ __u_short trn_signal_loss; /* Signal loss */ __u_short trn_xmit_beacon; /* Beacons transmitted */ __u_short trn_ring_recovery; /* Ring recoverys received */ __u_short trn_lobe_wire_fault; /* Lobe faults detected */ __u_short trn_remove_received; /* Remove received */ __u_short trn_single_station; /* # of times host was single */ __u_short trn_selftest_fail; /* # of times selftest failed */ }; /* * Token Ring RFC 1231 definitions. */ struct dot5Entry { int dot5TrnNumber; int dot5IfIndex; int dot5Commands; int dot5RingStatus; int dot5RingState; int dot5RingOpenStatus; int dot5RingSpeed; __u_char dot5UpStream[6]; int dot5ActMonParticipate; __u_char dot5Functional[6]; }; /* Values for dot5Commands */ #define MIB1231_COMM_NO_OP 1 #define MIB1231_COMM_OPEN 2 #define MIB1231_COMM_RESET 3 #define MIB1231_COMM_CLOSE 4 /* Values for dot5RingStatus */ #define MIB1231_RSTATUS_NO_PROB 0x0000 #define MIB1231_RSTATUS_RING_RECOVERY 0x0020 /* 32 */ #define MIB1231_RSTATUS_SINGLE_STATION 0x0040 /* 64 */ #define MIB1231_RSTATUS_REMOVE_RCVD 0x0100 /* 256 */ #define MIB1231_RSTATUS_RESERVED 0x0200 /* 512 */ #define MIB1231_RSTATUS_AUTO_REM_ERROR 0x0400 /* 1024 */ #define MIB1231_RSTATUS_LOBE_WIRE_FAULT 0x0800 /* 2048 */ #define MIB1231_RSTATUS_TRANSMIT_BEACON 0x1000 /* 4096 */ #define MIB1231_RSTATUS_SOFT_ERROR 0x2000 /* 8192 */ #define MIB1231_RSTATUS_HARD_ERROR 0x4000 /* 16384 */ #define MIB1231_RSTATUS_SIGNAL_LOSS 0x8000 /* 32768 */ #define MIB1231_RSTATUS_NO_STATUS 0x20000 /* 131072 */ /* Values for dot5RingState */ #define MIB1231_RSTATE_OPENED 1 #define MIB1231_RSTATE_CLOSED 2 #define MIB1231_RSTATE_OPENING 3 #define MIB1231_RSTATE_CLOSING 4 #define MIB1231_RSTATE_OPEN_FAILURE 5 #define MIB1231_RSTATE_RING_FAILURE 6 /* Values for dot5RingStatus */ #define MIB1231_ROSTATUS_NOOPEN 1 #define MIB1231_ROSTATUS_BADPARM 2 #define MIB1231_ROSTATUS_LOBEFAILED 3 #define MIB1231_ROSTATUS_SIG_LOSS 4 #define MIB1231_ROSTATUS_INS_TIMEOUT 5 #define MIB1231_ROSTATUS_RING_FAILED 6 #define MIB1231_ROSTATUS_BEACONING 7 #define MIB1231_ROSTATUS_DUPLICATE_MAC 8 #define MIB1231_ROSTATUS_REQ_FAILED 9 #define MIB1231_ROSTATUS_REM_RECVD 10 #define MIB1231_ROSTATUS_OPEN 11 /* Values for dot5RingSpeed */ #define MIB1231_RSPEED_UNKNOWN 1 #define MIB1231_RSPEED_1_MEG 2 #define MIB1231_RSPEED_4_MEG 3 #define MIB1231_RSPEED_16_MEG 4 /* Values for dot5ActMonParticipate */ #define MIB1231_ACTMON_TRUE 1 #define MIB1231_ACTMON_FALSE 2 /* The statistics table */ struct dot5StatsEntry { int dot5StatsIfIndex; int dot5StatsLineErrors; int dot5StatsBurstErrors; int dot5StatsACErrors; int dot5StatsAbortTransErrors; int dot5StatsInternalErrors; int dot5StatsLostFrameErrors; int dot5StatsReceiveCongestions; int dot5StatsFrameCopiedErrors; int dot5StatsTokenErrors; int dot5StatsSoftErrors; int dot5StatsHardErrors; int dot5StatsSignalLoss; int dot5StatsTransmitBeacons; int dot5StatsRecoverys; int dot5StatsLobeWires; int dot5StatsRemoves; int dot5StatsSingles; int dot5StatsFreqErrors; }; /* The timer table - optional */ struct dot5TimerEntry { int dot5TimerIfIndex; int dot5TimerReturnRepeat; int dot5TimerHolding; int dot5TimerQueuePDU; int dot5TimerValidTransmit; int dot5TimerNoToken; int dot5TimerActiveMon; int dot5TimerStandbyMon; int dot5TimerErrorReport; int dot5TimerBeaconTransmit; int dot5TimerBeaconReceive; }; /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #pragma __extern_model __restore #pragma __standard #endif /* __IF_TRNSTAT_LOADED */ #ifndef __IF_TYPES_LOADED #define __IF_TYPES_LOADED 1 /**************************************************************************** ** ** - IANA types ** ***************************************************************************** ** Header is nonstandard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** ** ** Copyright (c) 1989 Regents of the University of California. ** All rights reserved. ** ** Redistribution and use in source and binary forms are permitted provided ** that: (1) source distributions retain this entire copyright notice and ** comment, and (2) distributions including binaries display the following ** acknowledgement: ``This product includes software developed by the ** University of California, Berkeley and its contributors'' in the ** documentation or other materials provided with the distribution and in ** all advertising materials mentioning features or use of this software. ** Neither the name of the University nor the names of its contributors may ** 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 ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** Base: if_types.h 7.2 (Berkeley) 9/20/89 ** Merged: if_types.h 7.3 (Berkeley) 6/28/90 ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* * latest IANA sanctioned types can be found at: * ftp.isi.edu/in-notes/iana/assignments/smi-numbers */ /* interface types for benefit of parsing media address headers */ #define IFT_OTHER 0x1 /* none of the following */ #define IFT_1822 0x2 /* old-style arpanet imp */ #define IFT_HDH1822 0x3 /* HDH arpanet imp */ #define IFT_X25DDN 0x4 /* x25 to imp */ #define IFT_X25 0x5 /* PDN X25 interface */ #define IFT_ETHER 0x6 /* Ethernet I or II */ #define IFT_ISO88023 0x7 /* CMSA CD */ #define IFT_ISO88024 0x8 /* Token Bus */ #define IFT_ISO88025 0x9 /* Token Ring */ #define IFT_ISO88026 0xa /* MAN */ #define IFT_STARLAN 0xb #define IFT_P10 0xc /* Proteon 10MBit ring */ #define IFT_P80 0xd /* Proteon 10MBit ring */ #define IFT_HY 0xe /* Hyperchannel */ #define IFT_FDDI 0xf #define IFT_LAPB 0x10 #define IFT_SDLC 0x11 #define IFT_T1 0x12 #define IFT_CEPT 0x13 #define IFT_ISDNBASIC 0x14 #define IFT_ISDNPRIMARY 0x15 #define IFT_PTPSERIAL 0x16 #define IFT_PPP 0x17 /* Point to Point Protocol*/ #define IFT_LOOP 0x18 /* loopback */ #define IFT_EON 0x19 /* ISO over IP */ #define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */ #define IFT_NSIP 0x1b /* XNS over IP */ #define IFT_SLIP 0x1c /* IP over generic TTY */ #define IFT_ULTRA 0x1d /* RFC 1213 */ #define IFT_DS3 0x1e /* DS3/E3 interface (RFC 1407) */ #define IFT_SIP 0x1f /* SMDS (RFC 1305) */ #define IFT_FRAMERELAY 0x20 /* Frame Relay (RFC 1315) */ #define IFT_RS232 0x21 /* RS232 Objects (RFC 1659) */ #define IFT_PARALLEL 0x22 /* Parallel Objects (RFC 1660) */ #define IFT_ARCNET 0x23 /* ARC network */ #define IFT_ARCNET_PLUS 0x24 /* ARC network plus */ #define IFT_ATM 0x25 /* ATM network */ #define IFT_MIO25 0x26 /* MIOX25 (RFC 1461) */ #define IFT_SONET 0x27 /* SONET/ SDH */ #define IFT_X25PLE 0x28 /* X.25 packet level (RFC 1382) #define IFT_ISO88022LLC 0x29 /* 802 logical link Control */ #define IFT_LOCALTALK 0x2a #define IFT_SMDSDXI 0x2b /* SMDS DXI */ #define IFT_FRAMERELAYS 0x2c /* Frame Relay DCE */ #define IFT_V35 0x2d /* V.35 */ #define IFT_HSSI 0x2e /* HSSI */ #define IFT_HPPI 0x2f /* HPPI */ #define IFT_MODEM 0x30 /* "generic modem" */ #define IFT_AAL5 0x31 /* AAl5 over ATM */ #define IFT_SONETPATH 0x32 #define IFT_SOBETVI 0x33 #define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface proto */ #define IFT_PROPVIRT 0x35 /* Proprietary Virtual/Internal */ /* Interface */ #define IFT_PROPMULTI 0x36 /* Propietary muli-link interface */ #define IFT_IEEE80212 0x37 /* 100Base VG */ #define IFT_FIBRECHAN 0x38 /* Fibre Channel */ #define IFT_HPPI_I 0x39 /* HIPPI Interface */ #define IFT_FRAMEREALYI 0x3a /* Interconnect over FR (RFC 1490) */ #define IFT_LANE8023 0x3b /* ATM LAN Emulation for 802.3 */ #define IFT_LANE8025 0x3c /* ATM LAN Emulation for 802.5 */ #define IFT_ATMECIR 0x3d /* ATM Emulatated Circuit */ #define IFT_FASTETHER 0x3e /* Fast Ethernet (100BaseT) */ #define IFT_ISDNX25 0x3f /* ISDN over X.25 (RFC 1356) */ #define IFT_V11 0x40 /* CCITT V/11/X.21 */ #define IFT_V36 0x41 /* CCITT V.36 */ #define IFT_G70364K 0x42 /* CCITT G703 @ 64Kbps */ #define IFT_G7022MB 0x43 /* CCITT G703 @ 2Mbps */ #define IFT_QLLC 0x44 /* SNA QLLC */ /* non standard (non IANA) types start at 200 (decimal) */ #define IFT_WANDD 0xc8 /* Wide Area Network Device Driver */ #define IFT_RM 0xc9 /* Memory Channel (Reflective Memory) */ #define IFT_SYNC 0xca /* Synchronous communications */ #ifdef __cplusplus } #endif #pragma __standard #endif /* __IF_LOADED */