Commit c6f3a288 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename interface_up to interface_updown.

As suggested by Christof Schulze.
parent e8bf4030
...@@ -805,7 +805,7 @@ main(int argc, char **argv) ...@@ -805,7 +805,7 @@ main(int argc, char **argv)
usleep(roughly(10000)); usleep(roughly(10000));
gettime(&now); gettime(&now);
/* We need to flush so interface_up won't try to reinstall. */ /* We need to flush so interface_updown won't try to reinstall. */
flush_all_routes(); flush_all_routes();
FOR_ALL_INTERFACES(ifp) { FOR_ALL_INTERFACES(ifp) {
...@@ -828,7 +828,7 @@ main(int argc, char **argv) ...@@ -828,7 +828,7 @@ main(int argc, char **argv)
flushbuf(&ifp->buf, ifp); flushbuf(&ifp->buf, ifp);
usleep(roughly(10000)); usleep(roughly(10000));
gettime(&now); gettime(&now);
interface_up(ifp, 0); interface_updown(ifp, 0);
} }
release_tables(); release_tables();
kernel_setup_socket(0); kernel_setup_socket(0);
...@@ -885,7 +885,7 @@ main(int argc, char **argv) ...@@ -885,7 +885,7 @@ main(int argc, char **argv)
FOR_ALL_INTERFACES(ifp) { FOR_ALL_INTERFACES(ifp) {
if(!if_up(ifp)) if(!if_up(ifp))
continue; continue;
interface_up(ifp, 0); interface_updown(ifp, 0);
} }
kernel_setup_socket(0); kernel_setup_socket(0);
kernel_setup(0); kernel_setup(0);
......
...@@ -109,7 +109,7 @@ flush_interface(char *ifname) ...@@ -109,7 +109,7 @@ flush_interface(char *ifname)
if(ifp == NULL) if(ifp == NULL)
return 0; return 0;
interface_up(ifp, 0); interface_updown(ifp, 0);
if(prev) if(prev)
prev->next = ifp->next; prev->next = ifp->next;
else else
...@@ -271,7 +271,7 @@ check_link_local_addresses(struct interface *ifp) ...@@ -271,7 +271,7 @@ check_link_local_addresses(struct interface *ifp)
} }
int int
interface_up(struct interface *ifp, int up) interface_updown(struct interface *ifp, int up)
{ {
int mtu, rc, type; int mtu, rc, type;
struct ipv6_mreq mreq; struct ipv6_mreq mreq;
...@@ -519,7 +519,7 @@ interface_up(struct interface *ifp, int up) ...@@ -519,7 +519,7 @@ interface_up(struct interface *ifp, int up)
fail: fail:
assert(up); assert(up);
interface_up(ifp, 0); interface_updown(ifp, 0);
local_notify_interface(ifp, LOCAL_CHANGE); local_notify_interface(ifp, LOCAL_CHANGE);
return -1; return -1;
} }
...@@ -550,7 +550,7 @@ check_interfaces(void) ...@@ -550,7 +550,7 @@ check_interfaces(void)
ifindex = if_nametoindex(ifp->name); ifindex = if_nametoindex(ifp->name);
if(ifindex != ifp->ifindex) { if(ifindex != ifp->ifindex) {
debugf("Noticed ifindex change for %s.\n", ifp->name); debugf("Noticed ifindex change for %s.\n", ifp->name);
interface_up(ifp, 0); interface_updown(ifp, 0);
ifp->ifindex = ifindex; ifp->ifindex = ifindex;
ifindex_changed = 1; ifindex_changed = 1;
} }
...@@ -561,7 +561,7 @@ check_interfaces(void) ...@@ -561,7 +561,7 @@ check_interfaces(void)
rc = 0; rc = 0;
if((rc > 0) != if_up(ifp)) { if((rc > 0) != if_up(ifp)) {
debugf("Noticed status change for %s.\n", ifp->name); debugf("Noticed status change for %s.\n", ifp->name);
interface_up(ifp, rc > 0); interface_updown(ifp, rc > 0);
} }
if(if_up(ifp)) { if(if_up(ifp)) {
......
...@@ -151,6 +151,6 @@ int flush_interface(char *ifname); ...@@ -151,6 +151,6 @@ int flush_interface(char *ifname);
unsigned jitter(struct buffered *buf, int urgent); unsigned jitter(struct buffered *buf, int urgent);
unsigned update_jitter(struct interface *ifp, int urgent); unsigned update_jitter(struct interface *ifp, int urgent);
void set_timeout(struct timeval *timeout, int msecs); void set_timeout(struct timeval *timeout, int msecs);
int interface_up(struct interface *ifp, int up); int interface_updown(struct interface *ifp, int up);
int interface_ll_address(struct interface *ifp, const unsigned char *address); int interface_ll_address(struct interface *ifp, const unsigned char *address);
void check_interfaces(void); void check_interfaces(void);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment