diff options
author | Paul Jakma <paul.jakma@hpe.com> | 2016-01-18 10:12:10 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@hpe.com> | 2016-02-26 14:11:46 +0000 |
commit | 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744 (patch) | |
tree | 1ce5d2e4ecff6b57eb00d40b1a91b3f363ff35fe /ripd | |
parent | 954c7d6bcd04c2cf037965adda0f9d11afdcd165 (diff) | |
download | quagga-9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744.tar.bz2 quagga-9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744.tar.xz |
*: use an ifindex_t type, defined in lib/if.h, for ifindex values
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 4 | ||||
-rw-r--r-- | ripd/ripd.c | 8 | ||||
-rw-r--r-- | ripd/ripd.h | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 00612df4..7bdcf46a 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -74,7 +74,7 @@ static int ipv4_multicast_join (int sock, struct in_addr group, struct in_addr ifa, - unsigned int ifindex) + ifindex_t ifindex) { int ret; @@ -95,7 +95,7 @@ static int ipv4_multicast_leave (int sock, struct in_addr group, struct in_addr ifa, - unsigned int ifindex) + ifindex_t ifindex) { int ret; diff --git a/ripd/ripd.c b/ripd/ripd.c index 870873d5..82b1adae 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1577,7 +1577,7 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, /* Add redistributed route to RIP table. */ void rip_redistribute_add (int type, int sub_type, struct prefix_ipv4 *p, - unsigned int ifindex, struct in_addr *nexthop, + ifindex_t ifindex, struct in_addr *nexthop, unsigned int metric, unsigned char distance) { int ret; @@ -1651,7 +1651,7 @@ rip_redistribute_add (int type, int sub_type, struct prefix_ipv4 *p, /* Delete redistributed route from RIP table. */ void rip_redistribute_delete (int type, int sub_type, struct prefix_ipv4 *p, - unsigned int ifindex) + ifindex_t ifindex) { int ret; struct route_node *rp; @@ -1793,7 +1793,7 @@ setsockopt_pktinfo (int sock) /* Read RIP packet by recvmsg function. */ int rip_recvmsg (int sock, u_char *buf, int size, struct sockaddr_in *from, - int *ifindex) + ifindex_t *ifindex) { int ret; struct msghdr msg; @@ -1834,7 +1834,7 @@ rip_read_new (struct thread *t) int sock; char buf[RIP_PACKET_MAXSIZ]; struct sockaddr_in from; - unsigned int ifindex; + ifindex_t ifindex; /* Fetch socket then register myself. */ sock = THREAD_FD (t); diff --git a/ripd/ripd.h b/ripd/ripd.h index a768ccc6..dbed342d 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -198,7 +198,7 @@ struct rip_info struct in_addr from; /* Which interface does this route come from. */ - unsigned int ifindex; + ifindex_t ifindex; /* Metric of this route. */ u_int32_t metric; @@ -224,7 +224,7 @@ struct rip_info u_char metric_set; u_int32_t metric_out; u_short tag_out; - unsigned int ifindex_out; + ifindex_t ifindex_out; struct route_node *rp; @@ -400,9 +400,9 @@ extern int rip_request_send (struct sockaddr_in *, struct interface *, u_char, extern int rip_neighbor_lookup (struct sockaddr_in *); extern int rip_redistribute_check (int); -extern void rip_redistribute_add (int, int, struct prefix_ipv4 *, unsigned int, +extern void rip_redistribute_add (int, int, struct prefix_ipv4 *, ifindex_t, struct in_addr *, unsigned int, unsigned char); -extern void rip_redistribute_delete (int, int, struct prefix_ipv4 *, unsigned int); +extern void rip_redistribute_delete (int, int, struct prefix_ipv4 *, ifindex_t); extern void rip_redistribute_withdraw (int); extern void rip_zebra_ipv4_add (struct route_node *); extern void rip_zebra_ipv4_delete (struct route_node *); |