|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3166 (0xc5e) Types: TextFile Notes: UNIX file Names: »if_ether.h«
└─⟦8c4f54e61⟧ Bits:30004068/disk2.imd Interactive TCP/IP v.1.2 └─⟦8c4f54e61⟧ UNIX Filesystem └─⟦this⟧ »hb/new/usr/include/netinet/if_ether.h«
/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)if_ether.h 2.1 - 89/04/21 */ #ifndef _h_IF_ETHER #define _h_IF_ETHER #ident "@(#)if_ether.h 2.1 - 89/04/21" /* * Arp structure for a stream device */ struct arpdev { queue_t *arp_qptr; /* stream write queue */ queue_t *arp_ipq; /* ip queue for other side */ queue_t *arp_arpq; /* arp queue for other side */ u_long arp_state; /* stream state */ u_long arp_flags; /* stream flags */ u_long arp_sap; /* stream sap */ int arp_subtype; /* subnetwork types */ int arp_index; /* index from I_LINK (if linked) */ struct in_addr arp_inaddr; /* internet address */ u_char arp_enaddr[6]; /* ethernet address */ }; /* address that comes down from IP */ #define IP_ADDR_LEN 4 #define IP_FAM_LEN 2 #define IP_INDADDR_LEN (IP_ADDR_LEN + IP_FAM_LEN) #define ARP_LSAP_LEN 4 #define LSAP_ADDR_LEN (IP_ADDR_LEN + ARP_LSAP_LEN) #define ETHER_ADDR_LEN 6 #define ETHERTYPE_LEN 2 #define ARP_LEN (ETHER_ADDR_LEN + ETHERTYPE_LEN) #ifdef DEBUG #define ARPDEBUG #endif #define ARPHIWAT 0x4000 #define ARPLOWAT 0x2000 #define MAXARPSZ 1500 /* * Structure of a 10Mb/s Ethernet header. */ struct ether_header { u_char ether_dhost[6]; u_char ether_shost[6]; u_short ether_type; }; #define ETHERTYPE_PUP 0x0200 /* PUP protocol */ #define ETHERTYPE_IP 0x0800 /* IP protocol */ #define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ #define ETHERMTU 1500 #define ETHERMIN (60-14) /* * Ethernet Address Resolution Protocol. * * See RFC 826 for protocol description. Structure below is adapted * to resolving internet addresses. Field names used correspond to * RFC 826. */ struct ether_arp { struct arphdr ea_hdr; /* fixed-size header */ u_char arp_sha[6]; /* sender hardware address */ u_char arp_spa[4]; /* sender protocol address */ u_char arp_tha[6]; /* target hardware address */ u_char arp_tpa[4]; /* target protocol address */ }; #define arp_hrd ea_hdr.ar_hrd #define arp_pro ea_hdr.ar_pro #define arp_hln ea_hdr.ar_hln #define arp_pln ea_hdr.ar_pln #define arp_op ea_hdr.ar_op #ifdef undef /* * Structure shared between the ethernet driver modules and * the address resolution code. For example, each ec_softc or il_softc * begins with this structure. */ struct arpcom { struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[6]; /* ethernet hardware address */ struct in_addr ac_ipaddr; /* copy of ip address- XXX */ }; #endif /* * Internet to ethernet address resolution table. */ struct arptab { struct in_addr at_iaddr; /* internet address */ u_char at_enaddr[6]; /* ethernet address */ u_char at_timer; /* minutes since last reference */ u_char at_flags; /* flags */ mblk_t *at_hold; /* last packet until resolved/timeout */ queue_t *at_hq; /* queue last packet was received on */ }; #ifdef KERNEL /* extern u_char etherbroadcastaddr[6]; */ extern struct arptab *arptnew(); extern char *ether_sprintf(); #endif #endif /* _h_IF_ETHER */