summaryrefslogtreecommitdiff
path: root/include/netinet/ip.h
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-05-14 04:16:35 +0000
committerErik Andersen <andersen@codepoet.org>2000-05-14 04:16:35 +0000
commit64bc6412188b141c010ac3b8e813b837dd991e80 (patch)
treeffa12b79ea4b13191754f54b872eb1a4f9e3a04b /include/netinet/ip.h
Initial revision
Diffstat (limited to 'include/netinet/ip.h')
-rw-r--r--include/netinet/ip.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/netinet/ip.h b/include/netinet/ip.h
new file mode 100644
index 000000000..a6c49b6af
--- /dev/null
+++ b/include/netinet/ip.h
@@ -0,0 +1,39 @@
+#ifndef _NETINET_IP_H
+#define _NETINET_IP_H
+
+#include <features.h>
+#include <netinet/in.h>
+#include <linux/ip.h>
+
+#ifdef _BSD_SOURCE
+
+/*
+ * BSD has the following structure
+ */
+
+struct ip
+{
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 ip_hl:4,
+ ip_v:4;
+#else
+ __u8 ip_v:4,
+ ip_hl:4;
+#endif
+#define IPVERSION 4
+ __u8 ip_tos;
+ __u16 ip_len;
+ __u16 ip_id;
+ __u16 ip_off;
+ __u8 ip_ttl;
+ __u8 ip_p;
+ __u16 ip_csum;
+ struct in_addr ip_src,ip_dst;
+};
+
+#define IP_DF 0x4000 /* dont fragment flag */
+#define IP_MF 0x2000 /* more fragments flag */
+
+#endif
+
+#endif /* _NETINET_IP_H */