2005-03-08 18:53:11 +00:00
|
|
|
#ifndef _IP_H
|
|
|
|
#define _IP_H
|
|
|
|
|
2005-05-01 10:40:12 +00:00
|
|
|
#include "stddef.h"
|
|
|
|
#include "stdint.h"
|
|
|
|
#include "in.h"
|
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
struct iphdr {
|
|
|
|
uint8_t verhdrlen;
|
|
|
|
uint8_t service;
|
|
|
|
uint16_t len;
|
|
|
|
uint16_t ident;
|
|
|
|
uint16_t frags;
|
|
|
|
uint8_t ttl;
|
|
|
|
uint8_t protocol;
|
|
|
|
uint16_t chksum;
|
2005-05-01 10:40:12 +00:00
|
|
|
struct in_addr src;
|
|
|
|
struct in_addr dest;
|
2005-03-08 18:53:11 +00:00
|
|
|
} PACKED;
|
|
|
|
|
2005-05-02 12:07:47 +00:00
|
|
|
extern uint16_t tcpudpchksum(struct iphdr *ip);
|
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
#endif /* _IP_H */
|