2 * Copyright (C) 2012, 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 UDP Protocol
12 * $Id: bcmudp.h 241182 2011-02-17 21:50:03Z $
22 /* This marks the start of a packed structure section. */
23 #include <packed_section_start.h>
27 #define UDP_DEST_PORT_OFFSET 2 /* UDP dest port offset */
28 #define UDP_LEN_OFFSET 4 /* UDP length offset */
29 #define UDP_CHKSUM_OFFSET 6 /* UDP body checksum offset */
31 #define UDP_HDR_LEN 8 /* UDP header length */
32 #define UDP_PORT_LEN 2 /* UDP port length */
34 /* These fields are stored in network order */
35 BWL_PRE_PACKED_STRUCT
struct bcmudp_hdr
37 uint16 src_port
; /* Source Port Address */
38 uint16 dst_port
; /* Destination Port Address */
39 uint16 len
; /* Number of bytes in datagram including header */
40 uint16 chksum
; /* entire datagram checksum with pseudoheader */
41 } BWL_POST_PACKED_STRUCT
;
43 /* This marks the end of a packed structure section. */
44 #include <packed_section_end.h>
46 #endif /* #ifndef _bcmudp_h_ */