--- lib/socket.h | 2 +- proto/bgp/bgp.c | 4 ++-- proto/ospf/iface.c | 2 +- proto/radv/packets.c | 2 +- proto/rip/rip.c | 2 +- sysdep/bsd/krt-sock.c | 2 +- sysdep/linux/netlink.c | 2 +- sysdep/unix/io.c | 8 ++++---- sysdep/unix/main.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/socket.h b/lib/socket.h index b0c3eda..5b01c6b 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -48,7 +48,7 @@ typedef struct birdsock { char *password; /* Password for MD5 authentication */ } sock; -sock *sk_new(pool *); /* Allocate new socket */ +sock *sk_new_sock(pool *); /* Allocate new socket */ int sk_open(sock *); /* Open socket */ int sk_send(sock *, unsigned len); /* Send data, <0=err, >0=ok, 0=sleep */ int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */ diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 3b9f7cc..2b78e14 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -558,7 +558,7 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c int hops = p->cf->multihop ? : 1; DBG("BGP: Connecting\n"); - s = sk_new(p->p.pool); + s = sk_new_sock(p->p.pool); s->type = SK_TCP_ACTIVE; s->saddr = p->source_addr; s->daddr = p->cf->remote_ip; @@ -674,7 +674,7 @@ bgp_listen_sock_err(sock *sk UNUSED, int err) static sock * bgp_setup_listen_sk(ip_addr addr, unsigned port, u32 flags) { - sock *s = sk_new(&root_pool); + sock *s = sk_new_sock(&root_pool); DBG("BGP: Creating listening socket\n"); s->type = SK_TCP_PASSIVE; s->ttl = 255; diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index a6a0c6c..3593d85 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -72,7 +72,7 @@ find_nbma_node_in(list *nnl, ip_addr ip) static int ospf_sk_open(struct ospf_iface *ifa) { - sock *sk = sk_new(ifa->pool); + sock *sk = sk_new_sock(ifa->pool); sk->type = SK_IP; sk->dport = OSPF_PROTO; sk->saddr = IPA_NONE; diff --git a/proto/radv/packets.c b/proto/radv/packets.c index ac59ce9..e19e116 100644 --- a/proto/radv/packets.c +++ b/proto/radv/packets.c @@ -224,7 +224,7 @@ radv_err_hook(sock *sk, int err) int radv_sk_open(struct radv_iface *ifa) { - sock *sk = sk_new(ifa->ra->p.pool); + sock *sk = sk_new_sock(ifa->ra->p.pool); sk->type = SK_IP; sk->dport = ICMPV6_PROTO; sk->saddr = IPA_NONE; diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 281296a..df08ea9 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -691,7 +691,7 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_ if (rif->multicast) DBG( "Doing multicasts!\n" ); - rif->sock = sk_new( p->pool ); + rif->sock = sk_new_sock( p->pool ); rif->sock->type = SK_UDP; rif->sock->sport = P_CF->port; rif->sock->rx_hook = rip_rx; diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index e970d6b..561c018 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -723,7 +723,7 @@ krt_sys_start(struct krt_proto *x, int first UNUSED) if( (rt_sock = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC)) < 0) die("Cannot open kernel socket for routes"); - sk_rt = sk_new(krt_pool); + sk_rt = sk_new_sock(krt_pool); sk_rt->type = SK_MAGIC; sk_rt->rx_hook = krt_sock_hook; sk_rt->fd = rt_sock; diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index eaaf048..2198a9b 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -1066,7 +1066,7 @@ nl_open_async(void) return; } - sk = nl_async_sk = sk_new(krt_pool); + sk = nl_async_sk = sk_new_sock(krt_pool); sk->type = SK_MAGIC; sk->rx_hook = nl_async_hook; sk->fd = fd; diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 475d660..5474b1a 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -582,7 +582,7 @@ static struct resclass sk_class = { }; /** - * sk_new - create a socket + * sk_new_sock - create a socket * @p: pool * * This function creates a new socket resource. If you want to use it, @@ -590,7 +590,7 @@ static struct resclass sk_class = { * call sk_open() to do the actual opening of the socket. */ sock * -sk_new(pool *p) +sk_new_sock(pool *p) { sock *s = ralloc(p, &sk_class); s->pool = p; @@ -1058,7 +1058,7 @@ sk_passive_connected(sock *s, struct sockaddr *sa, int al, int type) int fd = accept(s->fd, sa, &al); if (fd >= 0) { - sock *t = sk_new(s->pool); + sock *t = sk_new_sock(s->pool); char *err; t->type = type; t->fd = fd; @@ -1097,7 +1097,7 @@ sk_passive_connected(sock *s, struct sockaddr *sa, int al, int type) * sk_open - open a socket * @s: socket * - * This function takes a socket resource created by sk_new() and + * This function takes a socket resource created by sk_new_sock() and * initialized by the user and binds a corresponding network connection * to it. * diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index e0563aa..ed1fb6b 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -413,7 +413,7 @@ cli_init_unix(uid_t use_uid, gid_t use_gid) sock *s; cli_init(); - s = cli_sk = sk_new(cli_pool); + s = cli_sk = sk_new_sock(cli_pool); s->type = SK_UNIX_PASSIVE; s->rx_hook = cli_connect; s->rbsize = 1024; -- 1.7.7.6 --=-=-=--