aboutsummaryrefslogtreecommitdiffstats
path: root/icmp.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-12-24 13:23:05 +0200
committerTimo Teras <timo.teras@iki.fi>2008-12-24 13:23:05 +0200
commit47c08fbfadf4812626690f00cac4a08d89660fb5 (patch)
tree3597e4ec9d199438b8b7892e77e470cbc1a9a56f /icmp.h
parent8377d611fc80fc0d9e498d958c40fce59f3f29e1 (diff)
downloadpingu-47c08fbfadf4812626690f00cac4a08d89660fb5.tar.bz2
pingu-47c08fbfadf4812626690f00cac4a08d89660fb5.tar.xz
mtu: separate icmp functions to new file, mtu discovery
Diffstat (limited to 'icmp.h')
-rw-r--r--icmp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/icmp.h b/icmp.h
new file mode 100644
index 0000000..d5c597f
--- /dev/null
+++ b/icmp.h
@@ -0,0 +1,22 @@
+#ifndef PINGU_ICMP_H
+#define PINGU_ICMP_H
+
+#include <asm/types.h>
+#include <sys/socket.h>
+#include <netinet/ip.h>
+
+int icmp_parse_reply(__u8 *buf, int len, int seq,
+ struct sockaddr *addr,
+ struct sockaddr *origdest);
+int icmp_send(int fd, struct sockaddr *to, int tolen, void *buf, int buflen);
+int icmp_send_frag_needed(int fd, struct sockaddr *to, int tolen,
+ struct iphdr *iph, int newmtu);
+int icmp_send_ping(int fd, struct sockaddr *to, int tolen,
+ int seq, int total_size);
+int icmp_read_reply(int fd, struct sockaddr *from, int fromlen,
+ __u8 *buf, int buflen);
+int icmp_open(void);
+void icmp_close(int fd);
+
+
+#endif