]> git.meshlink.io Git - catta/blob - socket.h
add infrastrtcur for creating and sending DNS packets
[catta] / socket.h
1 #ifndef foosockethfoo
2 #define foosockethfoo
3
4 #include <netinet/in.h>
5
6 #include "dns.h"
7
8 gint flx_open_socket_ipv4(void);
9 gint flx_open_socket_ipv6(void);
10
11 gint flx_send_dns_packet_ipv4(gint fd, gint iface, flxDnsPacket *p);
12 gint flx_send_dns_packet_ipv6(gint fd, gint iface, flxDnsPacket *p);
13
14 flxDnsPacket *flx_recv_dns_packet_ipv4(gint fd, struct sockaddr_in*ret_sa, gint *ret_iface, gint *ret_ttl);
15 flxDnsPacket *flx_recv_dns_packet_ipv6(gint fd, struct sockaddr_in6*ret_sa, gint *ret_iface, gint *ret_ttl);
16
17 #endif