DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦49b95b57f⟧ TextFile

    Length: 3591 (0xe07)
    Types: TextFile
    Notes: Uncompressed file

Derivation

└─⟦0f0f313e4⟧ Bits:30004764 SW95709I.2F TCP/IP Update 1
└─⟦0f0f313e4⟧ UNIX Filesystem
    └─⟦cecbe98ff⟧ »SSU.4a/new/usr/include/netinet/if_ether.h.Z« 
        └─⟦this⟧ 

TextFile

/*
 * 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.
 *
 */

#ifndef _h_IF_ETHER
#define _h_IF_ETHER
#ident "@(#)if_ether.h	2.2 - 90/02/08"

/*
 *	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) */
    int     arp_hwtype;         /* hardware type (from sys/sioctl.h defs) */
    struct  in_addr arp_inaddr; /* OUR internet address */
    union {                              /* entry chosen by hardware type */
	unsigned char   addr_802[6];     /* OUR 802-type HW address */
					 /* ADD OTHERS AS THEY ARE NEEDED... */
    } arp_addr;
};

/* 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  arp_msg {
	struct  arphdr a_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 a_hdr.ar_hrd
#define arp_pro a_hdr.ar_pro
#define arp_hln a_hdr.ar_hln
#define arp_pln a_hdr.ar_pln
#define arp_op  a_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 hardware address resolution table.
 */
struct	arptab {
	struct	in_addr at_iaddr;	/* internet address */
	u_char	at_timer;		/* minutes since last reference */
	u_char	at_flags;		/* flags */
	u_char  at_hwtype;              /* hardware type from sys/sioctl.h */
	u_char  at_hwextlen;            /* length of hardware extension address */
	mblk_t	*at_hold;		/* last packet until resolved/timeout */
	queue_t *at_hq;			/* queue last packet was received on */
	u_char  at_hwaddr[6];           /* hardware address */
	u_char  at_hwext[18];           /* address extension (TokRing RIF) */
};

#ifdef	KERNEL
/* extern u_char etherbroadcastaddr[6]; */
extern struct	arptab *arptnew();
extern char *ether_sprintf();
#endif
#endif /* _h_IF_ETHER */