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
17 /* enable structure packing */
19 #define PACKED __attribute__((packed))
25 #define ARP_OPC_OFFSET 6 /* option code offset */
26 #define ARP_SRC_ETH_OFFSET 8 /* src h/w address offset */
27 #define ARP_SRC_IP_OFFSET 14 /* src IP address offset */
28 #define ARP_TGT_ETH_OFFSET 18 /* target h/w address offset */
29 #define ARP_TGT_IP_OFFSET 24 /* target IP address offset */
31 #define ARP_OPC_REQUEST 1 /* ARP request */
32 #define ARP_OPC_REPLY 2 /* ARP reply */
34 #define ARP_DATA_LEN 28 /* ARP data length */
37 uint16 htype
; /* Header type (1 = ethernet) */
38 uint16 ptype
; /* Protocol type (0x800 = IP) */
39 uint8 hlen
; /* Hardware address length (Eth = 6) */
40 uint8 plen
; /* Protocol address length (IP = 4) */
41 uint16 oper
; /* ARP_OPC_... */
42 uint8 src_eth
[ETHER_ADDR_LEN
]; /* Source hardware address */
43 uint8 src_ip
[IPV4_ADDR_LEN
]; /* Source protocol address (not aligned) */
44 uint8 dst_eth
[ETHER_ADDR_LEN
]; /* Destination hardware address */
45 uint8 dst_ip
[IPV4_ADDR_LEN
]; /* Destination protocol address */
48 /* Ethernet header + Arp message */
50 struct ether_header eh
;
55 #if !defined(__GNUC__)
59 #endif /* !defined(_bcmarp_h_) */
This page took 0.055822 seconds and 5 git commands to generate.