summaryrefslogtreecommitdiff
path: root/net/ipv4.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-26 10:22:37 +0200
committerMiguel <m.i@gmx.at>2018-09-26 10:22:37 +0200
commitae33cc6557790a502a01b380b0926944ca2f3cfa (patch)
treee72632052d1c6f6830c40d10d26c04b73aac74c6 /net/ipv4.h
parentdaf374435560861681c3e4d14a2d44141aa11abc (diff)
ntp and udp
Diffstat (limited to 'net/ipv4.h')
-rw-r--r--net/ipv4.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4.h b/net/ipv4.h
index e3cbc36..7357aac 100644
--- a/net/ipv4.h
+++ b/net/ipv4.h
@@ -11,8 +11,11 @@ struct ipv4_hdr {
uint8_t tos; // type of service
uint16_t len; // total length of ip datagramm
uint16_t id; // index of datagram for fragmentation
- uint16_t flags : 3; // various control flags
- uint16_t frag_offset : 13; // fragment offset 0 - first
+
+ //uint16_t flags : 3; // various control flags
+ //uint16_t frag_offset : 13; // fragment offset 0 - first
+ uint16_t flags_and_offset;
+
uint8_t ttl; // time to live - countdown decreased by each receiver
uint8_t proto; // payload protocol / 1-icmp, 16 - udp , 6 -tcp
uint16_t csum; // header checksum
@@ -20,6 +23,5 @@ struct ipv4_hdr {
uint32_t daddr; // destination ip address
} __attribute__((packed));
-uint16_t ipv4_checksum(void *addr, int count);
-bool ipv4_incoming(struct netdev *,struct eth_hdr *);
-uint16_t ipv4_checksum(void *addr, int count);
+bool ipv4_incoming(struct netdev *,struct eth_hdr *);
+uint32_t ipv4_generic(struct netdev *dev, uint32_t ip, uint8_t type, uint8_t* pos,uint8_t *end);