# 2.11BSD#431 - /usr/src/sys/netinet/if_ether.h

##### Macros

    ETHERMIN          X
    ETHERMTU          X
    ETHERTYPE_ARP     X
    ETHERTYPE_IP      X
    ETHERTYPE_NTRAILERX
    ETHERTYPE_PUP     X
    ETHERTYPE_TRAIL   X
    arp_hln           X
    arp_hrd           X
    arp_op            X
    arp_pln           X
    arp_pro           X

##### struct's

    arpcom            X
    arptab            X
    ether_arp         X
    ether_header      X

       1: /*
       2:  * Copyright (c) 1982, 1986 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *	@(#)if_ether.h	7.2 (Berkeley) 12/7/87
      13:  */
      14:
      15: /*
      16:  * Structure of a 10Mb/s Ethernet header.
      17:  */
      18: struct  ether_header {
      19:     u_char  ether_dhost[6];
      20:     u_char  ether_shost[6];
      21:     u_short ether_type;
      22: };
      23:
      24: #define ETHERTYPE_PUP   0x0200      /* PUP protocol */
      25: #define ETHERTYPE_IP    0x0800      /* IP protocol */
      26: #define ETHERTYPE_ARP   0x0806      /* Addr. resolution protocol */
      27:
      28: /*
      29:  * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
      30:  * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
      31:  * by an ETHER type (as given above) and then the (variable-length) header.
      32:  */
      33: #define ETHERTYPE_TRAIL     0x1000      /* Trailer packet */
      34: #define ETHERTYPE_NTRAILER  16
      35:
      36: #define ETHERMTU    1500
      37: #define ETHERMIN    (60-14)
      38:
      39: /*
      40:  * Ethernet Address Resolution Protocol.
      41:  *
      42:  * See RFC 826 for protocol description.  Structure below is adapted
      43:  * to resolving internet addresses.  Field names used correspond to
      44:  * RFC 826.
      45:  */
      46: struct  ether_arp {
      47:     struct  arphdr ea_hdr;  /* fixed-size header */
      48:     u_char  arp_sha[6]; /* sender hardware address */
      49:     u_char  arp_spa[4]; /* sender protocol address */
      50:     u_char  arp_tha[6]; /* target hardware address */
      51:     u_char  arp_tpa[4]; /* target protocol address */
      52: };
      53: #define arp_hrd ea_hdr.ar_hrd
      54: #define arp_pro ea_hdr.ar_pro
      55: #define arp_hln ea_hdr.ar_hln
      56: #define arp_pln ea_hdr.ar_pln
      57: #define arp_op  ea_hdr.ar_op
      58:
      59:
      60: /*
      61:  * Structure shared between the ethernet driver modules and
      62:  * the address resolution code.  For example, each ec_softc or il_softc
      63:  * begins with this structure.
      64:  */
      65: struct  arpcom {
      66:     struct  ifnet ac_if;        /* network-visible interface */
      67:     u_char  ac_enaddr[6];       /* ethernet hardware address */
      68:     struct in_addr ac_ipaddr;   /* copy of ip address- XXX */
      69: };
      70:
      71: /*
      72:  * Internet to ethernet address resolution table.
      73:  */
      74: struct  arptab {
      75:     struct  in_addr at_iaddr;   /* internet address */
      76:     u_char  at_enaddr[6];       /* ethernet address */
      77:     u_char  at_timer;       /* minutes since last reference */
      78:     u_char  at_flags;       /* flags */
      79:     struct  mbuf *at_hold;      /* last packet until resolved/timeout */
      80: };
      81:
      82: #ifdef  SUPERVISOR
      83: u_char etherbroadcastaddr[6];
      84: struct  arptab *arptnew();
      85: char *ether_sprintf();
      86: #endif

#### Defined struct's

arpcom defined in line 65; used 36 times

- in /usr/src/sys/netinet/if_ether.c line 103(2), 152(2), 247(2), 292(2)
- in /usr/src/sys/pdpif/if_de.c line 1222-1224(4)
- in /usr/src/sys/pdpif/if_de.h line 78(2)
- in /usr/src/sys/pdpif/if_ec.c line 103(2), 736-738(4)
- in /usr/src/sys/pdpif/if_il.c line 88(2), 717-719(4)
- in /usr/src/sys/pdpif/if_qe.c line 160(2), 697-699(4)
- in /usr/src/sys/pdpif/if_qt.c line 108(2), 719(2)

arptab defined in line 74; used 26 times

- in line 84(2)
- in /usr/src/sys/netinet/if_ether.c line 47(2), 83(2), 158(2), 297(2), 433(2), 453(2), 459(2), 492(2), 523(2)
- in /usr/src/usr.sbin/arp/arp.c line 273(2), 308-309(4)

ether_arp defined in line 46; used 10 times

- in /usr/src/sys/netinet/if_ether.c line 108(2), 115(2), 295(2), 305(2), 419(2)

ether_header defined in line 18; used 128 times

- in /usr/src/sys/netinet/if_ether.c line 107(2), 116(2), 296(2), 412(2)
- in /usr/src/sys/pdpif/if_de.c line 283(2), 528(2), 566-571(4), 594(2), 623(2), 638(2), 762(2), 805(2), 857(2), 865-870(8)
- in /usr/src/sys/pdpif/if_ec.c line 336(2), 374-375(4), 480(2), 533(2), 559(2), 569-576(8), 625-626(4), 657(2), 666(2), 702(2)
- in /usr/src/sys/pdpif/if_il.c line 364-365(4), 573(2), 602(2), 620(2), 628-633(8)
- in /usr/src/sys/pdpif/if_qe.c line 554(2), 582(2), 615(2), 633(2), 641-646(8), 809(2), 823(2), 945(2)
- in /usr/src/sys/pdpif/if_qt.c line 562(2), 610(2), 642(2), 656(2), 668-675(8), 786(2), 794(2), 882(2)

#### Defined macros

ETHERMIN defined in line 37; used 6 times

- in /usr/src/sys/pdpif/if_de.c line 578
- in /usr/src/sys/pdpif/if_ec.c line 625-626(2)
- in /usr/src/sys/pdpif/if_il.c line 364-365(2), 479

ETHERMTU defined in line 36; used 17 times

- in /usr/src/sys/pdpif/if_de.c line 71, 204, 284, 578, 646
- in /usr/src/sys/pdpif/if_ec.c line 127, 383
- in /usr/src/sys/pdpif/if_il.c line 145, 224, 305, 410, 469, 480, 542
- in /usr/src/sys/pdpif/if_qe.c line 233
- in /usr/src/sys/pdpif/if_qt.c line 145, 184

ETHERTYPE_ARP defined in line 26; used 2 times

- in /usr/src/sys/netinet/if_ether.c line 120, 415

ETHERTYPE_IP defined in line 25; used 9 times

- in /usr/src/sys/netinet/if_ether.c line 122, 409
- in /usr/src/sys/pdpif/if_de.c line 787-791(2)
- in /usr/src/sys/pdpif/if_ec.c line 510-514(2)
- in /usr/src/sys/pdpif/if_il.c line 588
- in /usr/src/sys/pdpif/if_qe.c line 600
- in /usr/src/sys/pdpif/if_qt.c line 629

ETHERTYPE_NTRAILER defined in line 34; used 6 times

- in /usr/src/sys/pdpif/if_de.c line 644
- in /usr/src/sys/pdpif/if_ec.c line 380, 397
- in /usr/src/sys/pdpif/if_il.c line 489
- in /usr/src/sys/pdpif/if_qe.c line 828
- in /usr/src/sys/pdpif/if_qt.c line 799

ETHERTYPE_PUP defined in line 24; never used
ETHERTYPE_TRAIL defined in line 33; used 17 times

- in /usr/src/sys/netinet/if_ether.c line 54
- in /usr/src/sys/pdpif/if_de.c line 643-645(3), 784
- in /usr/src/sys/pdpif/if_ec.c line 379-382(3), 396-397(2), 506
- in /usr/src/sys/pdpif/if_il.c line 488-489(2)
- in /usr/src/sys/pdpif/if_qe.c line 827-828(2)
- in /usr/src/sys/pdpif/if_qt.c line 798-799(2)

arp_hln defined in line 55; used 1 times

- in /usr/src/sys/netinet/if_ether.c line 123

arp_hrd defined in line 53; used 1 times

- in /usr/src/sys/netinet/if_ether.c line 121

arp_op defined in line 57; used 3 times

- in /usr/src/sys/netinet/if_ether.c line 125, 307, 399

arp_pln defined in line 56; used 1 times

- in /usr/src/sys/netinet/if_ether.c line 124

arp_pro defined in line 54; used 4 times

- in /usr/src/sys/netinet/if_ether.c line 122, 306, 408, 420

#### Usage of this include

if_ether.h used 7 times

- in /usr/src/sys/netinet/if_ether.c line 42
- in /usr/src/sys/pdpif/if_de.h line 17
- in /usr/src/sys/pdpif/if_ec.c line 69
- in /usr/src/sys/pdpif/if_il.c line 56
- in /usr/src/sys/pdpif/if_qe.c line 134
- in /usr/src/sys/pdpif/if_qt.c line 81
- in /usr/src/usr.sbin/arp/arp.c line 19

Last modified: 1988-04-27 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1542 |