summaryrefslogtreecommitdiffstats
path: root/package/wificonf/include/proto/bcmip.h
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-14 02:07:33 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-11-14 02:07:33 +0000
commit1d3eb5dbb85c9be85dfbdb7be2d767c9746c13ea (patch)
tree22e67fc1552992d31065f271032dbfa1a0c4f94a /package/wificonf/include/proto/bcmip.h
parentf4a6eedc9eb1bc50feb3a2b08353903b745b83c9 (diff)
add support for the new broadcom driver to wificonf. wep is currently broken. will fix that later, when i find out what's wrong with it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2480 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/wificonf/include/proto/bcmip.h')
-rw-r--r--package/wificonf/include/proto/bcmip.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/wificonf/include/proto/bcmip.h b/package/wificonf/include/proto/bcmip.h
new file mode 100644
index 000000000..da2d8f8b6
--- /dev/null
+++ b/package/wificonf/include/proto/bcmip.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2005, Broadcom Corporation
+ * All Rights Reserved.
+ *
+ * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
+ * the contents of this file may not be disclosed to third parties, copied
+ * or duplicated in any form, in whole or in part, without the prior
+ * written permission of Broadcom Corporation.
+ *
+ * Fundamental constants relating to IP Protocol
+ *
+ * $Id$
+ */
+
+#ifndef _bcmip_h_
+#define _bcmip_h_
+
+/* IP header */
+#define IPV4_VERIHL_OFFSET 0 /* version and ihl byte offset */
+#define IPV4_TOS_OFFSET 1 /* TOS offset */
+#define IPV4_PROT_OFFSET 9 /* protocol type offset */
+#define IPV4_CHKSUM_OFFSET 10 /* IP header checksum offset */
+#define IPV4_SRC_IP_OFFSET 12 /* src IP addr offset */
+#define IPV4_DEST_IP_OFFSET 16 /* dest IP addr offset */
+
+#define IPV4_VER_MASK 0xf0
+#define IPV4_IHL_MASK 0x0f
+
+#define IPV4_PROT_UDP 17 /* UDP protocol type */
+
+#define IPV4_ADDR_LEN 4 /* IP v4 address length */
+
+#define IPV4_VER_NUM 0x40 /* IP v4 version number */
+
+/* NULL IP address check */
+#define IPV4_ISNULLADDR(a) ((((uint8 *)(a))[0] + ((uint8 *)(a))[1] + \
+ ((uint8 *)(a))[2] + ((uint8 *)(a))[3]) == 0)
+
+#define IPV4_ADDR_STR_LEN 16
+
+#endif /* #ifndef _bcmip_h_ */
+