00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __NETDEV_H
00013 #define __NETDEV_H
00014
00020
00021
00022 #include <netinet/in.h>
00023 #include <netdb.h>
00024
00025
00026
00027
00029 typedef union {
00030 struct in_addr v4addr;
00031 struct in6_addr v6addr;
00032 } addr_storage;
00033
00034
00035
00036
00037 int
00038 init_udp_socket();
00039
00040 int
00041 get_mac_by_dev(unsigned char *, const char *);
00042
00043 int
00044 get_ip_by_dev(addr_storage *, const char *);
00045
00046 int
00047 get_mtu_by_dev(const char *);
00048
00049 int
00050 bind_net_socket(const struct addrinfo *addr);
00051
00052 int
00053 open_tap_socket(const char *);
00054
00055 #endif