aboutsummaryrefslogtreecommitdiffstats
path: root/src/icmp.h
blob: 7e177e027377bf5c1085779163742b4ac180bb50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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, socklen_t fromlen,
		    __u8 *buf, int buflen);
int icmp_open(float timeout);
void icmp_close(int fd);


#endif