diff options
-rw-r--r-- | usr.sbin/ldpd/address.c | 14 | ||||
-rw-r--r-- | usr.sbin/ldpd/init.c | 8 | ||||
-rw-r--r-- | usr.sbin/ldpd/keepalive.c | 8 | ||||
-rw-r--r-- | usr.sbin/ldpd/labelmapping.c | 32 | ||||
-rw-r--r-- | usr.sbin/ldpd/ldpe.h | 24 | ||||
-rw-r--r-- | usr.sbin/ldpd/notification.c | 12 |
6 files changed, 39 insertions, 59 deletions
diff --git a/usr.sbin/ldpd/address.c b/usr.sbin/ldpd/address.c index 82c67f84b0e..d6c3bb76a76 100644 --- a/usr.sbin/ldpd/address.c +++ b/usr.sbin/ldpd/address.c @@ -1,4 +1,4 @@ -/* $OpenBSD: address.c,v 1.2 2009/06/05 22:34:45 michele Exp $ */ +/* $OpenBSD: address.c,v 1.3 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -41,7 +41,7 @@ extern struct ldpd_conf *leconf; void gen_address_list_tlv(struct buf *, struct iface *, u_int16_t); -int +void send_address(struct nbr *nbr, struct iface *iface) { struct buf *buf; @@ -49,7 +49,7 @@ send_address(struct nbr *nbr, struct iface *iface) u_int16_t size, iface_count = 0; if (nbr->iface->passive) - return (0); + return; log_debug("send_address: neighbor ID %s", inet_ntoa(nbr->id)); @@ -79,8 +79,6 @@ send_address(struct nbr *nbr, struct iface *iface) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int @@ -167,14 +165,14 @@ gen_address_list_tlv(struct buf *buf, struct iface *iface, u_int16_t size) buf_add(buf, &iface->addr, sizeof(iface->addr)); } -int +void send_address_withdraw(struct nbr *nbr, struct iface *iface) { struct buf *buf; u_int16_t size; if (nbr->iface->passive) - return (0); + return; log_debug("send_address_withdraw: neighbor ID %s", inet_ntoa(nbr->id)); @@ -196,8 +194,6 @@ send_address_withdraw(struct nbr *nbr, struct iface *iface) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int diff --git a/usr.sbin/ldpd/init.c b/usr.sbin/ldpd/init.c index fc49ced7bec..5a9cc7b0fb5 100644 --- a/usr.sbin/ldpd/init.c +++ b/usr.sbin/ldpd/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.2 2009/06/05 22:34:45 michele Exp $ */ +/* $OpenBSD: init.c,v 1.3 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -39,14 +39,14 @@ int gen_init_prms_tlv(struct buf *, struct nbr *, u_int16_t); -int +void send_init(struct nbr *nbr) { struct buf *buf; u_int16_t size; if (nbr->iface->passive) - return (0); + return; log_debug("send_init: neighbor ID %s", inet_ntoa(nbr->id)); @@ -67,8 +67,6 @@ send_init(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int diff --git a/usr.sbin/ldpd/keepalive.c b/usr.sbin/ldpd/keepalive.c index c29c45a4bf6..c816a030782 100644 --- a/usr.sbin/ldpd/keepalive.c +++ b/usr.sbin/ldpd/keepalive.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keepalive.c,v 1.3 2010/02/18 09:26:29 claudio Exp $ */ +/* $OpenBSD: keepalive.c,v 1.4 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -37,14 +37,14 @@ #include "log.h" #include "ldpe.h" -int +void send_keepalive(struct nbr *nbr) { struct buf *buf; u_int16_t size; if (nbr->iface->passive) - return (0); + return; if ((buf = buf_open(LDP_MAX_LEN)) == NULL) fatal("send_keepalive"); @@ -59,8 +59,6 @@ send_keepalive(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int diff --git a/usr.sbin/ldpd/labelmapping.c b/usr.sbin/ldpd/labelmapping.c index a2dff9ed9d7..557db94cf4a 100644 --- a/usr.sbin/ldpd/labelmapping.c +++ b/usr.sbin/ldpd/labelmapping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: labelmapping.c,v 1.4 2009/12/30 11:05:58 michele Exp $ */ +/* $OpenBSD: labelmapping.c,v 1.5 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -46,7 +46,7 @@ int decode_fec_len_elm(char *, u_int8_t); int validate_fec_elm(char *); /* Label Mapping Message */ -int +void send_labelmapping(struct nbr *nbr) { struct buf *buf; @@ -55,7 +55,7 @@ send_labelmapping(struct nbr *nbr) u_int16_t tlv_size, size; if (nbr->iface->passive) - return (0); + return; log_debug("send_labelmapping: neighbor ID %s", inet_ntoa(nbr->id)); @@ -84,8 +84,6 @@ send_labelmapping(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int @@ -161,7 +159,7 @@ recv_labelmapping(struct nbr *nbr, char *buf, u_int16_t len) } /* Label Request Message */ -int +void send_labelrequest(struct nbr *nbr) { struct buf *buf; @@ -170,7 +168,7 @@ send_labelrequest(struct nbr *nbr) u_int16_t tlv_size, size; if (nbr->iface->passive) - return (0); + return; log_debug("send_labelrequest: neighbor ID %s", inet_ntoa(nbr->id)); @@ -198,8 +196,6 @@ send_labelrequest(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int @@ -265,7 +261,7 @@ recv_labelrequest(struct nbr *nbr, char *buf, u_int16_t len) } /* Label Withdraw Message */ -int +void send_labelwithdraw(struct nbr *nbr) { struct buf *buf; @@ -274,7 +270,7 @@ send_labelwithdraw(struct nbr *nbr) u_int16_t tlv_size, size; if (nbr->iface->passive) - return (0); + return; log_debug("send_labelwithdraw: neighbor ID %s", inet_ntoa(nbr->id)); @@ -310,8 +306,6 @@ send_labelwithdraw(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int @@ -340,7 +334,7 @@ recv_labelwithdraw(struct nbr *nbr, char *buf, u_int16_t len) } /* Label Release Message */ -int +void send_labelrelease(struct nbr *nbr) { struct buf *buf; @@ -349,7 +343,7 @@ send_labelrelease(struct nbr *nbr) u_int16_t tlv_size, size; if (nbr->iface->passive) - return (0); + return; log_debug("send_labelrelease: neighbor ID %s", inet_ntoa(nbr->id)); @@ -384,8 +378,6 @@ send_labelrelease(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int @@ -414,14 +406,14 @@ recv_labelrelease(struct nbr *nbr, char *buf, u_int16_t len) } /* Label Abort Req Message */ -int +void send_labelabortreq(struct nbr *nbr) { struct buf *buf; u_int16_t size; if (nbr->iface->passive) - return (0); + return; log_debug("send_labelabortreq: neighbor ID %s", inet_ntoa(nbr->id)); @@ -439,8 +431,6 @@ send_labelabortreq(struct nbr *nbr) bufferevent_write(nbr->bev, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int diff --git a/usr.sbin/ldpd/ldpe.h b/usr.sbin/ldpd/ldpe.h index 63fe9d846af..81d259930a5 100644 --- a/usr.sbin/ldpd/ldpe.h +++ b/usr.sbin/ldpd/ldpe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpe.h,v 1.3 2010/02/20 21:05:00 michele Exp $ */ +/* $OpenBSD: ldpe.h,v 1.4 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org> @@ -80,35 +80,35 @@ int send_hello(struct iface *); void recv_hello(struct iface *, struct in_addr, char *, u_int16_t); /* init.c */ -int send_init(struct nbr *); +void send_init(struct nbr *); int recv_init(struct nbr *, char *, u_int16_t); /* keepalive.c */ -int send_keepalive(struct nbr *); +void send_keepalive(struct nbr *); int recv_keepalive(struct nbr *, char *, u_int16_t); /* notification.c */ -int send_notification(u_int32_t, struct iface *, int, u_int32_t, +void send_notification(u_int32_t, struct iface *, int, u_int32_t, u_int32_t); -int send_notification_nbr(struct nbr *, u_int32_t, u_int32_t, u_int32_t); +void send_notification_nbr(struct nbr *, u_int32_t, u_int32_t, u_int32_t); int recv_notification(struct nbr *, char *, u_int16_t); /* address.c */ -int send_address(struct nbr *, struct iface *); +void send_address(struct nbr *, struct iface *); int recv_address(struct nbr *, char *, u_int16_t); -int send_address_withdraw(struct nbr *, struct iface *); +void send_address_withdraw(struct nbr *, struct iface *); int recv_address_withdraw(struct nbr *, char *, u_int16_t); /* labelmapping.c */ -int send_labelmapping(struct nbr *); +void send_labelmapping(struct nbr *); int recv_labelmapping(struct nbr *, char *, u_int16_t); -int send_labelrequest(struct nbr *); +void send_labelrequest(struct nbr *); int recv_labelrequest(struct nbr *, char *, u_int16_t); -int send_labelwithdraw(struct nbr *); +void send_labelwithdraw(struct nbr *); int recv_labelwithdraw(struct nbr *, char *, u_int16_t); -int send_labelrelease(struct nbr *); +void send_labelrelease(struct nbr *); int recv_labelrelease(struct nbr *, char *, u_int16_t); -int send_labelabortreq(struct nbr *); +void send_labelabortreq(struct nbr *); int recv_labelabortreq(struct nbr *, char *, u_int16_t); /* ldpe.c */ diff --git a/usr.sbin/ldpd/notification.c b/usr.sbin/ldpd/notification.c index 9d5fa27c4d0..2df927dd89a 100644 --- a/usr.sbin/ldpd/notification.c +++ b/usr.sbin/ldpd/notification.c @@ -1,4 +1,4 @@ -/* $OpenBSD: notification.c,v 1.2 2009/06/05 22:34:45 michele Exp $ */ +/* $OpenBSD: notification.c,v 1.3 2010/02/20 21:28:39 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -39,19 +39,19 @@ int gen_status_tlv(struct buf *, u_int32_t, u_int32_t, u_int32_t); -int +void send_notification_nbr(struct nbr *nbr, u_int32_t status, u_int32_t msgid, u_int32_t type) { if (nbr->iface->passive) - return (0); + return; log_debug("send_notification: neighbor ID %s", inet_ntoa(nbr->id)); - return (send_notification(status, nbr->iface, nbr->fd, msgid, type)); + send_notification(status, nbr->iface, nbr->fd, msgid, type); } -int +void send_notification(u_int32_t status, struct iface *iface, int fd, u_int32_t msgid, u_int32_t type) { @@ -75,8 +75,6 @@ send_notification(u_int32_t status, struct iface *iface, int fd, write(fd, buf->buf, buf->wpos); buf_free(buf); - - return (0); } int |