00001
00037 #include <pcap.h>
00038 #include <stdio.h>
00039 #include <stdlib.h>
00040 #include <string.h>
00041 #include <errno.h>
00042 #include <sys/socket.h>
00043 #include <netinet/in.h>
00044 #include <arpa/inet.h>
00045 #include <netinet/if_ether.h>
00046 #include <net/ethernet.h>
00047 #include <netinet/ether.h>
00048 #include <netinet/ip.h>
00049 #include <netinet/ip6.h>
00050 #include <netinet/udp.h>
00051 #include <netinet/tcp.h>
00052 #include <time.h>
00053 #include <sys/types.h>
00054 #include <sys/stat.h>
00055 #include <fcntl.h>
00056 #include <signal.h>
00057 #include <unistd.h>
00058
00059 #include "aodv.h"
00060
00061
00062
00063
00064
00065
00066
00068
00070 #define AODV6_RREQ 1
00071 #define AODV6_RREP 2
00072 #define AODV6_RERR 3
00073 #define AODV6_RREP_ACK 4
00074
00075
00076 #ifndef ETHER_HDRLEN
00077
00078
00080 #define ETHER_HDRLEN 14
00081 #endif
00082
00083 #ifndef ETHERTYPE_IPV6
00084
00085
00087 #define ETHERTYPE_IPV6 0x86dd
00088 #endif
00089
00090 #ifndef INET6
00091 #define INET6 _INET_6_
00092 #endif
00093
00095 #define IP_PROTO_TCP 6
00096
00098 #define IP_PROTO_UDP 17
00099
00101 #define IP_PROTO_ICMPV6 58
00102