store ip address as struct in_addr instead of a string
[project/mdnsd.git] / interface.h
index 05104c2..8fffc7e 100644 (file)
 #include <sys/types.h>
 #include <sys/uio.h>
 
+#include <arpa/inet.h>
+
 #include <libubox/uloop.h>
 #include <libubox/vlist.h>
 
 extern struct vlist_tree interfaces;
-extern struct interface *cur_iface;
 
 struct interface {
        struct vlist_node node;
 
        const char *name;
        struct uloop_fd fd;
+       struct uloop_timeout reconnect;
 
        int ifindex;
-       const char *ip;
+       struct in_addr v4_addr;
 
        struct uloop_timeout announce_timer;
        int announce_state;
@@ -39,6 +41,5 @@ struct interface {
 
 int interface_add(const char *name);
 int interface_send_packet(struct interface *iface, struct iovec *iov, int iov_len);
-int interface_socket_setup(struct interface *iface);
 
 #endif