From: Sven M. Hallberg Date: Mon, 8 Sep 2014 20:09:42 +0000 (+0200) Subject: change some int declarations that should have said CattaIfIndex X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=1141784d37d9da9006f3db62d611775bcc0a8c4f;p=catta change some int declarations that should have said CattaIfIndex --- diff --git a/src/iface.h b/src/iface.h index cec81e5..303d230 100644 --- a/src/iface.h +++ b/src/iface.h @@ -157,7 +157,7 @@ void catta_hw_interface_free(CattaHwInterface *hw, int send_goodbye); void catta_hw_interface_update_rrs(CattaHwInterface *hw, int remove_rrs); void catta_hw_interface_check_relevant(CattaHwInterface *hw); -CattaHwInterface* catta_interface_monitor_get_hw_interface(CattaInterfaceMonitor *m, int idx); +CattaHwInterface* catta_interface_monitor_get_hw_interface(CattaInterfaceMonitor *m, CattaIfIndex idx); /* CattaInterface */ diff --git a/src/internal.h b/src/internal.h index d38c1a3..019006e 100644 --- a/src/internal.h +++ b/src/internal.h @@ -63,7 +63,7 @@ struct CattaLegacyUnicastReflectSlot { uint16_t id, original_id; CattaAddress address; uint16_t port; - int iface; + CattaIfIndex iface; struct timeval elapse_time; CattaTimeEvent *time_event; }; diff --git a/src/socket.c b/src/socket.c index 7e893a0..c6b670b 100644 --- a/src/socket.c +++ b/src/socket.c @@ -105,7 +105,7 @@ static void ipv6_address_to_sockaddr(struct sockaddr_in6 *ret_sa, const CattaIPv memcpy(&ret_sa->sin6_addr, a, sizeof(CattaIPv6Address)); } -int catta_mdns_mcast_join_ipv4(int fd, const CattaIPv4Address *a, int idx, int join) { +int catta_mdns_mcast_join_ipv4(int fd, const CattaIPv4Address *a, CattaIfIndex idx, int join) { #ifdef HAVE_STRUCT_IP_MREQN struct ip_mreqn mreq; #else @@ -141,7 +141,7 @@ int catta_mdns_mcast_join_ipv4(int fd, const CattaIPv4Address *a, int idx, int j return 0; } -int catta_mdns_mcast_join_ipv6(int fd, const CattaIPv6Address *a, int idx, int join) { +int catta_mdns_mcast_join_ipv6(int fd, const CattaIPv6Address *a, CattaIfIndex idx, int join) { struct ipv6_mreq mreq6; struct sockaddr_in6 sa6; diff --git a/src/socket.h b/src/socket.h index 59da2a8..dab7220 100644 --- a/src/socket.h +++ b/src/socket.h @@ -41,7 +41,7 @@ int catta_send_dns_packet_ipv6(int fd, CattaIfIndex iface, CattaDnsPacket *p, co CattaDnsPacket *catta_recv_dns_packet_ipv4(int fd, CattaIPv4Address *ret_src_address, uint16_t *ret_src_port, CattaIPv4Address *ret_dst_address, CattaIfIndex *ret_iface, uint8_t *ret_ttl); CattaDnsPacket *catta_recv_dns_packet_ipv6(int fd, CattaIPv6Address *ret_src_address, uint16_t *ret_src_port, CattaIPv6Address *ret_dst_address, CattaIfIndex *ret_iface, uint8_t *ret_ttl); -int catta_mdns_mcast_join_ipv4(int fd, const CattaIPv4Address *local_address, int iface, int join); -int catta_mdns_mcast_join_ipv6(int fd, const CattaIPv6Address *local_address, int iface, int join); +int catta_mdns_mcast_join_ipv4(int fd, const CattaIPv4Address *local_address, CattaIfIndex iface, int join); +int catta_mdns_mcast_join_ipv6(int fd, const CattaIPv6Address *local_address, CattaIfIndex iface, int join); #endif