Functions don't need explicit extern linkage in headers in C99, as it is the

default.  Standardize on leaving out the extern keyword as it is less clutter.
This commit is contained in:
Nicholas J. Kain 2014-03-17 22:10:58 -04:00
parent 3f267576ac
commit 1e2c40eb81
12 changed files with 68 additions and 68 deletions

View File

@ -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_ */

View File

@ -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

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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

View File

@ -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_ */