2 * Copyright 2007, Broadcom Corporation
5 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 * the contents of this file may not be disclosed to third parties, copied
7 * or duplicated in any form, in whole or in part, without the prior
8 * written permission of Broadcom Corporation.
10 * Fundamental constants relating to ARP Protocol
18 /* enable structure packing */
20 #define PACKED __attribute__((packed))
26 #define ARP_OPC_OFFSET 6 /* option code offset */
27 #define ARP_SRC_ETH_OFFSET 8 /* src h/w address offset */
28 #define ARP_SRC_IP_OFFSET 14 /* src IP address offset */
29 #define ARP_TGT_ETH_OFFSET 18 /* target h/w address offset */
30 #define ARP_TGT_IP_OFFSET 24 /* target IP address offset */
32 #define ARP_OPC_REQUEST 1 /* ARP request */
33 #define ARP_OPC_REPLY 2 /* ARP reply */
35 #define ARP_DATA_LEN 28 /* ARP data length */
38 uint16 htype
; /* Header type (1 = ethernet) */
39 uint16 ptype
; /* Protocol type (0x800 = IP) */
40 uint8 hlen
; /* Hardware address length (Eth = 6) */
41 uint8 plen
; /* Protocol address length (IP = 4) */
42 uint16 oper
; /* ARP_OPC_... */
43 uint8 src_eth
[ETHER_ADDR_LEN
]; /* Source hardware address */
44 uint8 src_ip
[IPV4_ADDR_LEN
]; /* Source protocol address (not aligned) */
45 uint8 dst_eth
[ETHER_ADDR_LEN
]; /* Destination hardware address */
46 uint8 dst_ip
[IPV4_ADDR_LEN
]; /* Destination protocol address */
49 /* Ethernet header + Arp message */
51 struct ether_header eh
;
56 #if !defined(__GNUC__)
60 #endif /* !defined(_bcmarp_h_) */
This page took 0.048989 seconds and 5 git commands to generate.