diff --git a/ndhc/arp.h b/ndhc/arp.h index 49c5a03..ef8f8db 100644 --- a/ndhc/arp.h +++ b/ndhc/arp.h @@ -59,14 +59,14 @@ extern int arp_probe_min; extern int arp_probe_max; extern int arp_relentless_def; -extern void arp_reset_send_stats(void); -extern int arp_close_fd(struct client_state_t *cs); -extern int arp_check(struct client_state_t *cs, struct dhcpmsg *packet); -extern int arp_gw_check(struct client_state_t *cs); -extern void arp_set_defense_mode(struct client_state_t *cs); -extern void arp_success(struct client_state_t *cs); -extern void handle_arp_response(struct client_state_t *cs); -extern void handle_arp_timeout(struct client_state_t *cs, long long nowts); -extern long long arp_get_wake_ts(void); +void arp_reset_send_stats(void); +int arp_close_fd(struct client_state_t *cs); +int arp_check(struct client_state_t *cs, struct dhcpmsg *packet); +int arp_gw_check(struct client_state_t *cs); +void arp_set_defense_mode(struct client_state_t *cs); +void arp_success(struct client_state_t *cs); +void handle_arp_response(struct client_state_t *cs); +void handle_arp_timeout(struct client_state_t *cs, long long nowts); +long long arp_get_wake_ts(void); #endif /* ARP_H_ */ diff --git a/ndhc/dhcp.h b/ndhc/dhcp.h index a1d8cc1..f2ce3c1 100644 --- a/ndhc/dhcp.h +++ b/ndhc/dhcp.h @@ -80,15 +80,15 @@ struct udp_dhcp_packet { struct dhcpmsg data; }; -extern void set_listen_raw(struct client_state_t *cs); -extern void set_listen_cooked(struct client_state_t *cs); -extern void set_listen_none(struct client_state_t *cs); -extern void handle_packet(struct client_state_t *cs); -extern int send_discover(struct client_state_t *cs); -extern int send_selecting(struct client_state_t *cs); -extern int send_renew(struct client_state_t *cs); -extern int send_rebind(struct client_state_t *cs); -extern int send_decline(struct client_state_t *cs, uint32_t server); -extern int send_release(struct client_state_t *cs); +void set_listen_raw(struct client_state_t *cs); +void set_listen_cooked(struct client_state_t *cs); +void set_listen_none(struct client_state_t *cs); +void handle_packet(struct client_state_t *cs); +int send_discover(struct client_state_t *cs); +int send_selecting(struct client_state_t *cs); +int send_renew(struct client_state_t *cs); +int send_rebind(struct client_state_t *cs); +int send_decline(struct client_state_t *cs, uint32_t server); +int send_release(struct client_state_t *cs); #endif diff --git a/ndhc/ifchd-parse.h b/ndhc/ifchd-parse.h index 092ccb8..276d091 100644 --- a/ndhc/ifchd-parse.h +++ b/ndhc/ifchd-parse.h @@ -29,6 +29,6 @@ #ifndef _NJK_NDHC_IFCHD_PARSE_H_ #define _NJK_NDHC_IFCHD_PARSE_H_ -extern int execute_buffer(char *newbuf); +int execute_buffer(char *newbuf); #endif /* _NJK_NDHC_IFCHD_PARSE_H_ */ diff --git a/ndhc/ifchd.h b/ndhc/ifchd.h index 886cd46..ac8a004 100644 --- a/ndhc/ifchd.h +++ b/ndhc/ifchd.h @@ -36,17 +36,17 @@ extern char pidfile_ifch[MAX_PATH_LENGTH]; extern uid_t ifch_uid; extern gid_t ifch_gid; -extern void perform_timezone(const char *str, size_t len); -extern void perform_dns(const char *str, size_t len); -extern void perform_lprsvr(const char *str, size_t len); -extern void perform_hostname(const char *str, size_t len); -extern void perform_domain(const char *str, size_t len); -extern void perform_ipttl(const char *str, size_t len); -extern void perform_ntpsrv(const char *str, size_t len); -extern void perform_wins(const char *str, size_t len); +void perform_timezone(const char *str, size_t len); +void perform_dns(const char *str, size_t len); +void perform_lprsvr(const char *str, size_t len); +void perform_hostname(const char *str, size_t len); +void perform_domain(const char *str, size_t len); +void perform_ipttl(const char *str, size_t len); +void perform_ntpsrv(const char *str, size_t len); +void perform_wins(const char *str, size_t len); -extern void do_ifch_work(void); -extern void ifch_main(void); +void do_ifch_work(void); +void ifch_main(void); #endif /* NJK_IFCHD_H_ */ diff --git a/ndhc/ifset.h b/ndhc/ifset.h index 19cdbf2..783c418 100644 --- a/ndhc/ifset.h +++ b/ndhc/ifset.h @@ -28,11 +28,11 @@ #ifndef NJK_IFSET_H_ #define NJK_IFSET_H_ -extern int perform_ifup(void); -extern void perform_ip_subnet_bcast(const char *str_ipaddr, - const char *str_subnet, - const char *str_bcast); -extern void perform_router(const char *str, size_t len); -extern void perform_mtu(const char *str, size_t len); +int perform_ifup(void); +void perform_ip_subnet_bcast(const char *str_ipaddr, + const char *str_subnet, + const char *str_bcast); +void perform_router(const char *str, size_t len); +void perform_mtu(const char *str, size_t len); #endif diff --git a/ndhc/leasefile.h b/ndhc/leasefile.h index bb2b9b7..1ab81fa 100644 --- a/ndhc/leasefile.h +++ b/ndhc/leasefile.h @@ -29,9 +29,9 @@ #ifndef NJK_NDHC_LEASEFILE_H_ #define NJK_NDHC_LEASEFILE_H_ -extern void set_leasefile(char *lf); -extern void open_leasefile(void); -extern void write_leasefile(struct in_addr ipnum); +void set_leasefile(char *lf); +void open_leasefile(void); +void write_leasefile(struct in_addr ipnum); #endif /* NJK_NDHC_LEASEFILE_H_ */ diff --git a/ndhc/ndhc.h b/ndhc/ndhc.h index f34a461..46bad76 100644 --- a/ndhc/ndhc.h +++ b/ndhc/ndhc.h @@ -73,6 +73,6 @@ extern int pToNdhcW; extern char chroot_dir[MAX_PATH_LENGTH]; extern char resolv_conf_d[MAX_PATH_LENGTH]; -extern void background(void); +void background(void); #endif /* NJK_NDHC_NDHC_H_ */ diff --git a/ndhc/netlink.h b/ndhc/netlink.h index e2e3d7a..3c2effc 100644 --- a/ndhc/netlink.h +++ b/ndhc/netlink.h @@ -40,7 +40,7 @@ enum { IFS_REMOVED }; -extern void handle_nl_message(struct client_state_t *cs); -extern int nl_getifdata(void); +void handle_nl_message(struct client_state_t *cs); +int nl_getifdata(void); #endif /* NK_NETLINK_H_ */ diff --git a/ndhc/nl.h b/ndhc/nl.h index cf03ea7..21f47a2 100644 --- a/ndhc/nl.h +++ b/ndhc/nl.h @@ -41,23 +41,23 @@ static inline int nlmsg_get_error(const struct nlmsghdr *nlh) return err->error & 0x7fffffff; } -extern int rtattr_assign(struct rtattr *attr, int type, void *data); -extern int nl_add_rtattr(struct nlmsghdr *n, size_t max_length, int type, - const void *data, size_t data_length); +int rtattr_assign(struct rtattr *attr, int type, void *data); +int nl_add_rtattr(struct nlmsghdr *n, size_t max_length, int type, + const void *data, size_t data_length); typedef int (*nl_rtattr_parse_fn)(struct rtattr *attr, int type, void *data); -extern void nl_rtattr_parse(const struct nlmsghdr *nlh, size_t offset, - nl_rtattr_parse_fn workfn, void *data); +void nl_rtattr_parse(const struct nlmsghdr *nlh, size_t offset, + nl_rtattr_parse_fn workfn, void *data); -extern ssize_t nl_recv_buf(int fd, char *buf, size_t blen); +ssize_t nl_recv_buf(int fd, char *buf, size_t blen); typedef void (*nlmsg_foreach_fn)(const struct nlmsghdr *, void *); -extern int nl_foreach_nlmsg(char *buf, size_t blen, uint32_t seq, - uint32_t portid, - nlmsg_foreach_fn pfn, void *fnarg); -extern int nl_sendgetlinks(int fd, int seq); -extern int nl_sendgetlink(int fd, int seq, int ifindex); -extern int nl_sendgetaddr(int fd, int seq, int ifindex); +int nl_foreach_nlmsg(char *buf, size_t blen, uint32_t seq, + uint32_t portid, + nlmsg_foreach_fn pfn, void *fnarg); +int nl_sendgetlinks(int fd, int seq); +int nl_sendgetlink(int fd, int seq, int ifindex); +int nl_sendgetaddr(int fd, int seq, int ifindex); -extern int nl_open(int nltype, int nlgroup, int *nlportid); +int nl_open(int nltype, int nlgroup, int *nlportid); #endif /* NK_NL_H_ */ diff --git a/ndhc/seccomp.h b/ndhc/seccomp.h index e63b5c1..860d492 100644 --- a/ndhc/seccomp.h +++ b/ndhc/seccomp.h @@ -32,7 +32,7 @@ extern bool seccomp_enforce; -extern int enforce_seccomp_ndhc(void); -extern int enforce_seccomp_ifch(void); +int enforce_seccomp_ndhc(void); +int enforce_seccomp_ifch(void); #endif /* NJK_NDHC_SECCOMP_H_ */ diff --git a/ndhc/state.h b/ndhc/state.h index 62e007e..1d5cbf9 100644 --- a/ndhc/state.h +++ b/ndhc/state.h @@ -43,18 +43,18 @@ typedef enum { DS_NUM_STATES, } dhcp_states_t; -extern void reinit_selecting(struct client_state_t *cs, int timeout); +void reinit_selecting(struct client_state_t *cs, int timeout); -extern void packet_action(struct client_state_t *cs, struct dhcpmsg *packet, +void packet_action(struct client_state_t *cs, struct dhcpmsg *packet, uint8_t msgtype); -extern void timeout_action(struct client_state_t *cs, long long nowts); -extern void force_renew_action(struct client_state_t *cs); -extern void force_release_action(struct client_state_t *cs); +void timeout_action(struct client_state_t *cs, long long nowts); +void force_renew_action(struct client_state_t *cs); +void force_release_action(struct client_state_t *cs); -extern void ifup_action(struct client_state_t *cs); -extern void ifnocarrier_action(struct client_state_t *cs); -extern void ifdown_action(struct client_state_t *cs); -extern long long dhcp_get_wake_ts(void); +void ifup_action(struct client_state_t *cs); +void ifnocarrier_action(struct client_state_t *cs); +void ifdown_action(struct client_state_t *cs); +long long dhcp_get_wake_ts(void); #endif diff --git a/ndhc/sys.h b/ndhc/sys.h index 63e8143..f4e528c 100644 --- a/ndhc/sys.h +++ b/ndhc/sys.h @@ -38,7 +38,7 @@ static inline unsigned long long curms() return ts.tv_sec * 1000ULL + ts.tv_nsec / 1000000ULL; } -extern void epoll_add(int epfd, int fd); -extern void epoll_del(int epfd, int fd); +void epoll_add(int epfd, int fd); +void epoll_del(int epfd, int fd); #endif /* SYS_H_ */