diff options
author | Cy Schubert <cy@FreeBSD.org> | 2021-01-26 06:24:28 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2021-02-02 01:19:15 +0000 |
commit | 4cd1807c7d2a67b633dd0c0bfde15091543a2514 (patch) | |
tree | 5c55d2068d7f0990f2f7f6f89a5e48f444f2eea4 /contrib/ipfilter | |
parent | 0b7f1af804f06a285717b490bef80e24648adcbe (diff) | |
download | src-4cd1807c7d2a67b633dd0c0bfde15091543a2514.tar.gz src-4cd1807c7d2a67b633dd0c0bfde15091543a2514.zip |
Retire the K&R/STD C __P prototype declarations.
In the old days when K&R C and STD C were each in use a workaround
(read hack) was required to allow the same code to work on each
without modification. All C compilers support STD C. We can finally
put the __P prototype to rest.
MFC after: 1 week
Diffstat (limited to 'contrib/ipfilter')
58 files changed, 785 insertions, 785 deletions
diff --git a/contrib/ipfilter/bpf_filter.c b/contrib/ipfilter/bpf_filter.c index bd465761a34e..85a38a88bf57 100644 --- a/contrib/ipfilter/bpf_filter.c +++ b/contrib/ipfilter/bpf_filter.c @@ -71,8 +71,8 @@ static const char rcsid[] = #define int32 bpf_int32 #define u_int32 bpf_u_int32 -static int m_xword __P((mb_t *, int, int *)); -static int m_xhalf __P((mb_t *, int, int *)); +static int m_xword(mb_t *, int, int *); +static int m_xhalf(mb_t *, int, int *); #ifndef LBL_ALIGN /* diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c index 99c7a22668df..14b071b0b95f 100644 --- a/contrib/ipfilter/ip_dstlist.c +++ b/contrib/ipfilter/ip_dstlist.c @@ -73,41 +73,41 @@ typedef struct ipf_dstl_softc_s { } ipf_dstl_softc_t; -static void *ipf_dstlist_soft_create __P((ipf_main_softc_t *)); -static void ipf_dstlist_soft_destroy __P((ipf_main_softc_t *, void *)); -static int ipf_dstlist_soft_init __P((ipf_main_softc_t *, void *)); -static void ipf_dstlist_soft_fini __P((ipf_main_softc_t *, void *)); -static int ipf_dstlist_addr_find __P((ipf_main_softc_t *, void *, int, - void *, u_int)); -static size_t ipf_dstlist_flush __P((ipf_main_softc_t *, void *, - iplookupflush_t *)); -static int ipf_dstlist_iter_deref __P((ipf_main_softc_t *, void *, int, int, - void *)); -static int ipf_dstlist_iter_next __P((ipf_main_softc_t *, void *, ipftoken_t *, - ipflookupiter_t *)); -static int ipf_dstlist_node_add __P((ipf_main_softc_t *, void *, - iplookupop_t *, int)); -static int ipf_dstlist_node_del __P((ipf_main_softc_t *, void *, - iplookupop_t *, int)); -static int ipf_dstlist_stats_get __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_add __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_del __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_deref __P((ipf_main_softc_t *, void *, void *)); -static void *ipf_dstlist_table_find __P((void *, int, char *)); -static void ipf_dstlist_table_free __P((ipf_dstl_softc_t *, ippool_dst_t *)); -static void ipf_dstlist_table_remove __P((ipf_main_softc_t *, - ipf_dstl_softc_t *, ippool_dst_t *)); -static void ipf_dstlist_table_clearnodes __P((ipf_dstl_softc_t *, - ippool_dst_t *)); -static ipf_dstnode_t *ipf_dstlist_select __P((fr_info_t *, ippool_dst_t *)); -static void *ipf_dstlist_select_ref __P((void *, int, char *)); -static void ipf_dstlist_node_free __P((ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *)); -static int ipf_dstlist_node_deref __P((void *, ipf_dstnode_t *)); -static void ipf_dstlist_expire __P((ipf_main_softc_t *, void *)); -static void ipf_dstlist_sync __P((ipf_main_softc_t *, void *)); +static void *ipf_dstlist_soft_create(ipf_main_softc_t *); +static void ipf_dstlist_soft_destroy(ipf_main_softc_t *, void *); +static int ipf_dstlist_soft_init(ipf_main_softc_t *, void *); +static void ipf_dstlist_soft_fini(ipf_main_softc_t *, void *); +static int ipf_dstlist_addr_find(ipf_main_softc_t *, void *, int, + void *, u_int); +static size_t ipf_dstlist_flush(ipf_main_softc_t *, void *, + iplookupflush_t *); +static int ipf_dstlist_iter_deref(ipf_main_softc_t *, void *, int, int, + void *); +static int ipf_dstlist_iter_next(ipf_main_softc_t *, void *, ipftoken_t *, + ipflookupiter_t *); +static int ipf_dstlist_node_add(ipf_main_softc_t *, void *, + iplookupop_t *, int); +static int ipf_dstlist_node_del(ipf_main_softc_t *, void *, + iplookupop_t *, int); +static int ipf_dstlist_stats_get(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_add(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_del(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_deref(ipf_main_softc_t *, void *, void *); +static void *ipf_dstlist_table_find(void *, int, char *); +static void ipf_dstlist_table_free(ipf_dstl_softc_t *, ippool_dst_t *); +static void ipf_dstlist_table_remove(ipf_main_softc_t *, + ipf_dstl_softc_t *, ippool_dst_t *); +static void ipf_dstlist_table_clearnodes(ipf_dstl_softc_t *, + ippool_dst_t *); +static ipf_dstnode_t *ipf_dstlist_select(fr_info_t *, ippool_dst_t *); +static void *ipf_dstlist_select_ref(void *, int, char *); +static void ipf_dstlist_node_free(ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *); +static int ipf_dstlist_node_deref(void *, ipf_dstnode_t *); +static void ipf_dstlist_expire(ipf_main_softc_t *, void *); +static void ipf_dstlist_sync(ipf_main_softc_t *, void *); ipf_lookup_t ipf_dstlist_backend = { IPLT_DSTLIST, diff --git a/contrib/ipfilter/ip_dstlist.h b/contrib/ipfilter/ip_dstlist.h index e2885e5c47ad..c4acd78dfd94 100644 --- a/contrib/ipfilter/ip_dstlist.h +++ b/contrib/ipfilter/ip_dstlist.h @@ -62,7 +62,7 @@ typedef struct dstlist_stat_s { extern ipf_lookup_t ipf_dstlist_backend; -extern int ipf_dstlist_select_node __P((fr_info_t *, void *, u_32_t *, - frdest_t *)); +extern int ipf_dstlist_select_node(fr_info_t *, void *, u_32_t *, + frdest_t *); #endif /* __IP_DSTLIST_H__ */ diff --git a/contrib/ipfilter/ip_fil.c b/contrib/ipfilter/ip_fil.c index 794d7e205bb3..327f90fc356c 100644 --- a/contrib/ipfilter/ip_fil.c +++ b/contrib/ipfilter/ip_fil.c @@ -23,12 +23,12 @@ static int nifs = 0; struct rtentry; -static void ipf_setifpaddr __P((struct ifnet *, char *)); -void init_ifp __P((void)); -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); +static void ipf_setifpaddr(struct ifnet *, char *); +void init_ifp(void); +static int no_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); +static int write_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); struct ifaddr { struct sockaddr_storage ifa_addr; diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index 271c2e065738..fbcfc8a0088f 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -73,7 +73,7 @@ typedef struct tcpinfo4 { tcpdata_t ts_data[2]; } tcpinfo4_t; -static void ipf_v5tcpinfoto4 __P((tcpinfo_t *, tcpinfo4_t *)); +static void ipf_v5tcpinfoto4(tcpinfo_t *, tcpinfo4_t *); static void ipf_v5tcpinfoto4(v5, v4) @@ -1190,66 +1190,66 @@ typedef struct ipfrstat_4_1_1 { } ipfrstat_4_1_1_t; /* ------------------------------------------------------------------------ */ -static int ipf_addfrstr __P((char *, int, char *, int)); -static void ipf_v4iptov5 __P((frip4_t *, fr_ip_t *)); -static void ipf_v5iptov4 __P((fr_ip_t *, frip4_t *)); -static void ipfv4tuctov5 __P((frtuc4_t *, frtuc_t *)); -static void ipfv5tuctov4 __P((frtuc_t *, frtuc4_t *)); -static int ipf_v4fripftov5 __P((fripf4_t *, char *)); -static void ipf_v5fripftov4 __P((fripf_t *, fripf4_t *)); -static int fr_frflags4to5 __P((u_32_t)); -static int fr_frflags5to4 __P((u_32_t)); - -static void friostat_current_to_4_1_0 __P((void *, friostat_4_1_0_t *, int)); -static void friostat_current_to_4_1_33 __P((void *, friostat_4_1_33_t *, int)); -static void ipstate_current_to_4_1_0 __P((void *, ipstate_4_1_0_t *)); -static void ipstate_current_to_4_1_16 __P((void *, ipstate_4_1_16_t *)); -static void ipnat_current_to_4_1_0 __P((void *, ipnat_4_1_0_t *)); -static void ipnat_current_to_4_1_14 __P((void *, ipnat_4_1_14_t *)); -static void frauth_current_to_4_1_11 __P((void *, frauth_4_1_11_t *)); -static void frauth_current_to_4_1_23 __P((void *, frauth_4_1_23_t *)); -static void frauth_current_to_4_1_24 __P((void *, frauth_4_1_24_t *)); -static void frauth_current_to_4_1_29 __P((void *, frauth_4_1_29_t *)); -static void frentry_current_to_4_1_0 __P((void *, frentry_4_1_0_t *)); -static void frentry_current_to_4_1_16 __P((void *, frentry_4_1_16_t *)); -static void frentry_current_to_4_1_34 __P((void *, frentry_4_1_34_t *)); -static void fr_info_current_to_4_1_11 __P((void *, fr_info_4_1_11_t *)); -static void fr_info_current_to_4_1_23 __P((void *, fr_info_4_1_23_t *)); -static void fr_info_current_to_4_1_24 __P((void *, fr_info_4_1_24_t *)); -static void nat_save_current_to_4_1_3 __P((void *, nat_save_4_1_3_t *)); -static void nat_save_current_to_4_1_14 __P((void *, nat_save_4_1_14_t *)); -static void nat_save_current_to_4_1_16 __P((void *, nat_save_4_1_16_t *)); -static void ipstate_save_current_to_4_1_0 __P((void *, ipstate_save_4_1_0_t *)); -static void ipstate_save_current_to_4_1_16 __P((void *, ipstate_save_4_1_16_t *)); -static void ips_stat_current_to_4_1_0 __P((void *, ips_stat_4_1_0_t *)); -static void ips_stat_current_to_4_1_21 __P((void *, ips_stat_4_1_21_t *)); -static void natstat_current_to_4_1_0 __P((void *, natstat_4_1_0_t *)); -static void natstat_current_to_4_1_16 __P((void *, natstat_4_1_16_t *)); -static void natstat_current_to_4_1_27 __P((void *, natstat_4_1_27_t *)); -static void natstat_current_to_4_1_32 __P((void *, natstat_4_1_32_t *)); -static void nat_current_to_4_1_3 __P((void *, nat_4_1_3_t *)); -static void nat_current_to_4_1_14 __P((void *, nat_4_1_14_t *)); -static void nat_current_to_4_1_25 __P((void *, nat_4_1_25_t *)); - -static void friostat_4_1_0_to_current __P((friostat_4_1_0_t *, void *)); -static void friostat_4_1_33_to_current __P((friostat_4_1_33_t *, void *)); -static void ipnat_4_1_0_to_current __P((ipnat_4_1_0_t *, void *, int)); -static void ipnat_4_1_14_to_current __P((ipnat_4_1_14_t *, void *, int)); -static void frauth_4_1_11_to_current __P((frauth_4_1_11_t *, void *)); -static void frauth_4_1_23_to_current __P((frauth_4_1_23_t *, void *)); -static void frauth_4_1_24_to_current __P((frauth_4_1_24_t *, void *)); -static void frauth_4_1_29_to_current __P((frauth_4_1_29_t *, void *)); -static void frauth_4_1_32_to_current __P((frauth_4_1_32_t *, void *)); -static void frentry_4_1_0_to_current __P((ipf_main_softc_t *, frentry_4_1_0_t *, void *, int)); -static void frentry_4_1_16_to_current __P((ipf_main_softc_t *, frentry_4_1_16_t *, void *, int)); -static void frentry_4_1_34_to_current __P((ipf_main_softc_t *, frentry_4_1_34_t *, void *, int)); -static void fr_info_4_1_11_to_current __P((fr_info_4_1_11_t *, void *)); -static void fr_info_4_1_23_to_current __P((fr_info_4_1_23_t *, void *)); -static void fr_info_4_1_24_to_current __P((fr_info_4_1_24_t *, void *)); -static void fr_info_4_1_32_to_current __P((fr_info_4_1_32_t *, void *)); -static void nat_save_4_1_3_to_current __P((ipf_main_softc_t *, nat_save_4_1_3_t *, void *)); -static void nat_save_4_1_14_to_current __P((ipf_main_softc_t *, nat_save_4_1_14_t *, void *)); -static void nat_save_4_1_16_to_current __P((ipf_main_softc_t *, nat_save_4_1_16_t *, void *)); +static int ipf_addfrstr(char *, int, char *, int); +static void ipf_v4iptov5(frip4_t *, fr_ip_t *); +static void ipf_v5iptov4(fr_ip_t *, frip4_t *); +static void ipfv4tuctov5(frtuc4_t *, frtuc_t *); +static void ipfv5tuctov4(frtuc_t *, frtuc4_t *); +static int ipf_v4fripftov5(fripf4_t *, char *); +static void ipf_v5fripftov4(fripf_t *, fripf4_t *); +static int fr_frflags4to5(u_32_t); +static int fr_frflags5to4(u_32_t); + +static void friostat_current_to_4_1_0(void *, friostat_4_1_0_t *, int); +static void friostat_current_to_4_1_33(void *, friostat_4_1_33_t *, int); +static void ipstate_current_to_4_1_0(void *, ipstate_4_1_0_t *); +static void ipstate_current_to_4_1_16(void *, ipstate_4_1_16_t *); +static void ipnat_current_to_4_1_0(void *, ipnat_4_1_0_t *); +static void ipnat_current_to_4_1_14(void *, ipnat_4_1_14_t *); +static void frauth_current_to_4_1_11(void *, frauth_4_1_11_t *); +static void frauth_current_to_4_1_23(void *, frauth_4_1_23_t *); +static void frauth_current_to_4_1_24(void *, frauth_4_1_24_t *); +static void frauth_current_to_4_1_29(void *, frauth_4_1_29_t *); +static void frentry_current_to_4_1_0(void *, frentry_4_1_0_t *); +static void frentry_current_to_4_1_16(void *, frentry_4_1_16_t *); +static void frentry_current_to_4_1_34(void *, frentry_4_1_34_t *); +static void fr_info_current_to_4_1_11(void *, fr_info_4_1_11_t *); +static void fr_info_current_to_4_1_23(void *, fr_info_4_1_23_t *); +static void fr_info_current_to_4_1_24(void *, fr_info_4_1_24_t *); +static void nat_save_current_to_4_1_3(void *, nat_save_4_1_3_t *); +static void nat_save_current_to_4_1_14(void *, nat_save_4_1_14_t *); +static void nat_save_current_to_4_1_16(void *, nat_save_4_1_16_t *); +static void ipstate_save_current_to_4_1_0(void *, ipstate_save_4_1_0_t *); +static void ipstate_save_current_to_4_1_16(void *, ipstate_save_4_1_16_t *); +static void ips_stat_current_to_4_1_0(void *, ips_stat_4_1_0_t *); +static void ips_stat_current_to_4_1_21(void *, ips_stat_4_1_21_t *); +static void natstat_current_to_4_1_0(void *, natstat_4_1_0_t *); +static void natstat_current_to_4_1_16(void *, natstat_4_1_16_t *); +static void natstat_current_to_4_1_27(void *, natstat_4_1_27_t *); +static void natstat_current_to_4_1_32(void *, natstat_4_1_32_t *); +static void nat_current_to_4_1_3(void *, nat_4_1_3_t *); +static void nat_current_to_4_1_14(void *, nat_4_1_14_t *); +static void nat_current_to_4_1_25(void *, nat_4_1_25_t *); + +static void friostat_4_1_0_to_current(friostat_4_1_0_t *, void *); +static void friostat_4_1_33_to_current(friostat_4_1_33_t *, void *); +static void ipnat_4_1_0_to_current(ipnat_4_1_0_t *, void *, int); +static void ipnat_4_1_14_to_current(ipnat_4_1_14_t *, void *, int); +static void frauth_4_1_11_to_current(frauth_4_1_11_t *, void *); +static void frauth_4_1_23_to_current(frauth_4_1_23_t *, void *); +static void frauth_4_1_24_to_current(frauth_4_1_24_t *, void *); +static void frauth_4_1_29_to_current(frauth_4_1_29_t *, void *); +static void frauth_4_1_32_to_current(frauth_4_1_32_t *, void *); +static void frentry_4_1_0_to_current(ipf_main_softc_t *, frentry_4_1_0_t *, void *, int); +static void frentry_4_1_16_to_current(ipf_main_softc_t *, frentry_4_1_16_t *, void *, int); +static void frentry_4_1_34_to_current(ipf_main_softc_t *, frentry_4_1_34_t *, void *, int); +static void fr_info_4_1_11_to_current(fr_info_4_1_11_t *, void *); +static void fr_info_4_1_23_to_current(fr_info_4_1_23_t *, void *); +static void fr_info_4_1_24_to_current(fr_info_4_1_24_t *, void *); +static void fr_info_4_1_32_to_current(fr_info_4_1_32_t *, void *); +static void nat_save_4_1_3_to_current(ipf_main_softc_t *, nat_save_4_1_3_t *, void *); +static void nat_save_4_1_14_to_current(ipf_main_softc_t *, nat_save_4_1_14_t *, void *); +static void nat_save_4_1_16_to_current(ipf_main_softc_t *, nat_save_4_1_16_t *, void *); /* ------------------------------------------------------------------------ */ /* In this section is a series of short routines that deal with translating */ diff --git a/contrib/ipfilter/ip_msnrpc_pxy.c b/contrib/ipfilter/ip_msnrpc_pxy.c index 40bc084cbb5d..9cddd398edde 100644 --- a/contrib/ipfilter/ip_msnrpc_pxy.c +++ b/contrib/ipfilter/ip_msnrpc_pxy.c @@ -33,12 +33,12 @@ typedef struct msnrpchdr { u_char mrh_ans; } msnrpchdr_t; -int ippr_msnrpc_init __P((void)); -void ippr_msnrpc_fini __P((void)); -int ippr_msnrpc_new __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_out __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_in __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_check __P((ip_t *, msnrpchdr_t *)); +int ippr_msnrpc_init(void); +void ippr_msnrpc_fini(void); +int ippr_msnrpc_new(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_out(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_in(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_check(ip_t *, msnrpchdr_t *); static frentry_t msnfr; diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h index 834ba83f51f0..c7f7308a9ba9 100644 --- a/contrib/ipfilter/ipf.h +++ b/contrib/ipfilter/ipf.h @@ -175,12 +175,12 @@ typedef struct proxyrule { #if defined(__NetBSD__) || defined(__FreeBSD_version) || \ SOLARIS # include <stdarg.h> -typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...)); +typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); #else -typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, void *)); +typedef int (* ioctlfunc_t)(dev_t, ioctlcmd_t, void *); #endif -typedef int (* addfunc_t) __P((int, ioctlfunc_t, void *)); -typedef int (* copyfunc_t) __P((void *, void *, size_t)); +typedef int (* addfunc_t)(int, ioctlfunc_t, void *); +typedef int (* copyfunc_t)(void *, void *, size_t); extern char thishost[MAXHOSTNAMELEN]; @@ -200,178 +200,178 @@ extern wordtab_t natfields[]; extern wordtab_t poolfields[]; -extern int addicmp __P((char ***, struct frentry *, int)); -extern int addipopt __P((char *, struct ipopt_names *, int, char *)); -extern int addkeep __P((char ***, struct frentry *, int)); -extern alist_t *alist_new __P((int, char *)); -extern void alist_free __P((alist_t *)); -extern void assigndefined __P((char *)); -extern void binprint __P((void *, size_t)); -extern u_32_t buildopts __P((char *, char *, int)); -extern int checkrev __P((char *)); -extern int connecttcp __P((char *, int)); -extern int count6bits __P((u_32_t *)); -extern int count4bits __P((u_32_t)); -extern char *fac_toname __P((int)); -extern int fac_findname __P((char *)); -extern const char *familyname __P((const int)); -extern void fill6bits __P((int, u_int *)); -extern wordtab_t *findword __P((wordtab_t *, char *)); -extern int ftov __P((int)); -extern char *ipf_geterror __P((int, ioctlfunc_t *)); -extern int genmask __P((int, char *, i6addr_t *)); -extern int gethost __P((int, char *, i6addr_t *)); -extern int geticmptype __P((int, char *)); -extern int getport __P((struct frentry *, char *, u_short *, char *)); -extern int getportproto __P((char *, int)); -extern int getproto __P((char *)); -extern char *getnattype __P((struct nat *)); -extern char *getsumd __P((u_32_t)); -extern u_32_t getoptbyname __P((char *)); -extern u_32_t getoptbyvalue __P((int)); -extern u_32_t getv6optbyname __P((char *)); -extern u_32_t getv6optbyvalue __P((int)); -extern char *icmptypename __P((int, int)); -extern void initparse __P((void)); -extern void ipf_dotuning __P((int, char *, ioctlfunc_t)); -extern int ipf_addrule __P((int, ioctlfunc_t, void *)); -extern void ipf_mutex_clean __P((void)); -extern int ipf_parsefile __P((int, addfunc_t, ioctlfunc_t *, char *)); -extern int ipf_parsesome __P((int, addfunc_t, ioctlfunc_t *, FILE *)); -extern void ipf_perror __P((int, char *)); -extern int ipf_perror_fd __P(( int, ioctlfunc_t, char *)); -extern void ipf_rwlock_clean __P((void)); -extern char *ipf_strerror __P((int)); -extern void ipferror __P((int, char *)); -extern int ipmon_parsefile __P((char *)); -extern int ipmon_parsesome __P((FILE *)); -extern int ipnat_addrule __P((int, ioctlfunc_t, void *)); -extern int ipnat_parsefile __P((int, addfunc_t, ioctlfunc_t, char *)); -extern int ipnat_parsesome __P((int, addfunc_t, ioctlfunc_t, FILE *)); -extern int ippool_parsefile __P((int, char *, ioctlfunc_t)); -extern int ippool_parsesome __P((int, FILE *, ioctlfunc_t)); -extern int kmemcpywrap __P((void *, void *, size_t)); -extern char *kvatoname __P((ipfunc_t, ioctlfunc_t)); -extern int load_dstlist __P((struct ippool_dst *, ioctlfunc_t, - ipf_dstnode_t *)); -extern int load_dstlistnode __P((int, char *, struct ipf_dstnode *, - ioctlfunc_t)); -extern alist_t *load_file __P((char *)); -extern int load_hash __P((struct iphtable_s *, struct iphtent_s *, - ioctlfunc_t)); -extern int load_hashnode __P((int, char *, struct iphtent_s *, int, - ioctlfunc_t)); -extern alist_t *load_http __P((char *)); -extern int load_pool __P((struct ip_pool_s *list, ioctlfunc_t)); -extern int load_poolnode __P((int, char *, ip_pool_node_t *, int, ioctlfunc_t)); -extern alist_t *load_url __P((char *)); -extern alist_t *make_range __P((int, struct in_addr, struct in_addr)); -extern void mb_hexdump __P((mb_t *, FILE *)); -extern ipfunc_t nametokva __P((char *, ioctlfunc_t)); -extern void nat_setgroupmap __P((struct ipnat *)); -extern int ntomask __P((int, int, u_32_t *)); -extern u_32_t optname __P((char ***, u_short *, int)); -extern wordtab_t *parsefields __P((wordtab_t *, char *)); -extern int *parseipfexpr __P((char *, char **)); -extern int parsewhoisline __P((char *, addrfamily_t *, addrfamily_t *)); -extern void pool_close __P((void)); -extern int pool_fd __P((void)); -extern int pool_ioctl __P((ioctlfunc_t, ioctlcmd_t, void *)); -extern int pool_open __P((void)); -extern char *portname __P((int, int)); -extern int pri_findname __P((char *)); -extern char *pri_toname __P((int)); -extern void print_toif __P((int, char *, char *, struct frdest *)); -extern void printaps __P((ap_session_t *, int, int)); -extern void printaddr __P((int, int, char *, int, u_32_t *, u_32_t *)); -extern void printbuf __P((char *, int, int)); -extern void printfieldhdr __P((wordtab_t *, wordtab_t *)); -extern void printfr __P((struct frentry *, ioctlfunc_t)); -extern struct iphtable_s *printhash __P((struct iphtable_s *, copyfunc_t, - char *, int, wordtab_t *)); -extern struct iphtable_s *printhash_live __P((iphtable_t *, int, char *, - int, wordtab_t *)); -extern ippool_dst_t *printdstl_live __P((ippool_dst_t *, int, char *, - int, wordtab_t *)); -extern void printhashdata __P((iphtable_t *, int)); -extern struct iphtent_s *printhashnode __P((struct iphtable_s *, +extern int addicmp(char ***, struct frentry *, int); +extern int addipopt(char *, struct ipopt_names *, int, char *); +extern int addkeep(char ***, struct frentry *, int); +extern alist_t *alist_new(int, char *); +extern void alist_free(alist_t *); +extern void assigndefined(char *); +extern void binprint(void *, size_t); +extern u_32_t buildopts(char *, char *, int); +extern int checkrev(char *); +extern int connecttcp(char *, int); +extern int count6bits(u_32_t *); +extern int count4bits(u_32_t); +extern char *fac_toname(int); +extern int fac_findname(char *); +extern const char *familyname(const int); +extern void fill6bits(int, u_int *); +extern wordtab_t *findword(wordtab_t *, char *); +extern int ftov(int); +extern char *ipf_geterror(int, ioctlfunc_t *); +extern int genmask(int, char *, i6addr_t *); +extern int gethost(int, char *, i6addr_t *); +extern int geticmptype(int, char *); +extern int getport(struct frentry *, char *, u_short *, char *); +extern int getportproto(char *, int); +extern int getproto(char *); +extern char *getnattype(struct nat *); +extern char *getsumd(u_32_t); +extern u_32_t getoptbyname(char *); +extern u_32_t getoptbyvalue(int); +extern u_32_t getv6optbyname(char *); +extern u_32_t getv6optbyvalue(int); +extern char *icmptypename(int, int); +extern void initparse(void); +extern void ipf_dotuning(int, char *, ioctlfunc_t); +extern int ipf_addrule(int, ioctlfunc_t, void *); +extern void ipf_mutex_clean(void); +extern int ipf_parsefile(int, addfunc_t, ioctlfunc_t *, char *); +extern int ipf_parsesome(int, addfunc_t, ioctlfunc_t *, FILE *); +extern void ipf_perror(int, char *); +extern int ipf_perror_fd( int, ioctlfunc_t, char *); +extern void ipf_rwlock_clean(void); +extern char *ipf_strerror(int); +extern void ipferror(int, char *); +extern int ipmon_parsefile(char *); +extern int ipmon_parsesome(FILE *); +extern int ipnat_addrule(int, ioctlfunc_t, void *); +extern int ipnat_parsefile(int, addfunc_t, ioctlfunc_t, char *); +extern int ipnat_parsesome(int, addfunc_t, ioctlfunc_t, FILE *); +extern int ippool_parsefile(int, char *, ioctlfunc_t); +extern int ippool_parsesome(int, FILE *, ioctlfunc_t); +extern int kmemcpywrap(void *, void *, size_t); +extern char *kvatoname(ipfunc_t, ioctlfunc_t); +extern int load_dstlist(struct ippool_dst *, ioctlfunc_t, + ipf_dstnode_t *); +extern int load_dstlistnode(int, char *, struct ipf_dstnode *, + ioctlfunc_t); +extern alist_t *load_file(char *); +extern int load_hash(struct iphtable_s *, struct iphtent_s *, + ioctlfunc_t); +extern int load_hashnode(int, char *, struct iphtent_s *, int, + ioctlfunc_t); +extern alist_t *load_http(char *); +extern int load_pool(struct ip_pool_s *list, ioctlfunc_t); +extern int load_poolnode(int, char *, ip_pool_node_t *, int, ioctlfunc_t); +extern alist_t *load_url(char *); +extern alist_t *make_range(int, struct in_addr, struct in_addr); +extern void mb_hexdump(mb_t *, FILE *); +extern ipfunc_t nametokva(char *, ioctlfunc_t); +extern void nat_setgroupmap(struct ipnat *); +extern int ntomask(int, int, u_32_t *); +extern u_32_t optname(char ***, u_short *, int); +extern wordtab_t *parsefields(wordtab_t *, char *); +extern int *parseipfexpr(char *, char **); +extern int parsewhoisline(char *, addrfamily_t *, addrfamily_t *); +extern void pool_close(void); +extern int pool_fd(void); +extern int pool_ioctl(ioctlfunc_t, ioctlcmd_t, void *); +extern int pool_open(void); +extern char *portname(int, int); +extern int pri_findname(char *); +extern char *pri_toname(int); +extern void print_toif(int, char *, char *, struct frdest *); +extern void printaps(ap_session_t *, int, int); +extern void printaddr(int, int, char *, int, u_32_t *, u_32_t *); +extern void printbuf(char *, int, int); +extern void printfieldhdr(wordtab_t *, wordtab_t *); +extern void printfr(struct frentry *, ioctlfunc_t); +extern struct iphtable_s *printhash(struct iphtable_s *, copyfunc_t, + char *, int, wordtab_t *); +extern struct iphtable_s *printhash_live(iphtable_t *, int, char *, + int, wordtab_t *); +extern ippool_dst_t *printdstl_live(ippool_dst_t *, int, char *, + int, wordtab_t *); +extern void printhashdata(iphtable_t *, int); +extern struct iphtent_s *printhashnode(struct iphtable_s *, struct iphtent_s *, - copyfunc_t, int, wordtab_t *)); -extern void printhost __P((int, u_32_t *)); -extern void printhostmask __P((int, u_32_t *, u_32_t *)); -extern void printip __P((int, u_32_t *)); -extern void printlog __P((struct frentry *)); -extern void printlookup __P((char *, i6addr_t *addr, i6addr_t *mask)); -extern void printmask __P((int, u_32_t *)); -extern void printnataddr __P((int, char *, nat_addr_t *, int)); -extern void printnatfield __P((nat_t *, int)); -extern void printnatside __P((char *, nat_stat_side_t *)); -extern void printpacket __P((int, mb_t *)); -extern void printpacket6 __P((int, mb_t *)); -extern struct ippool_dst *printdstlist __P((struct ippool_dst *, copyfunc_t, + copyfunc_t, int, wordtab_t *); +extern void printhost(int, u_32_t *); +extern void printhostmask(int, u_32_t *, u_32_t *); +extern void printip(int, u_32_t *); +extern void printlog(struct frentry *); +extern void printlookup(char *, i6addr_t *addr, i6addr_t *mask); +extern void printmask(int, u_32_t *); +extern void printnataddr(int, char *, nat_addr_t *, int); +extern void printnatfield(nat_t *, int); +extern void printnatside(char *, nat_stat_side_t *); +extern void printpacket(int, mb_t *); +extern void printpacket6(int, mb_t *); +extern struct ippool_dst *printdstlist(struct ippool_dst *, copyfunc_t, char *, int, ipf_dstnode_t *, - wordtab_t *)); -extern void printdstlistdata __P((ippool_dst_t *, int)); -extern ipf_dstnode_t *printdstlistnode __P((ipf_dstnode_t *, copyfunc_t, - int, wordtab_t *)); -extern void printdstlistpolicy __P((ippool_policy_t)); -extern struct ip_pool_s *printpool __P((struct ip_pool_s *, copyfunc_t, - char *, int, wordtab_t *)); -extern struct ip_pool_s *printpool_live __P((struct ip_pool_s *, int, - char *, int, wordtab_t *)); -extern void printpooldata __P((ip_pool_t *, int)); -extern void printpoolfield __P((void *, int, int)); -extern struct ip_pool_node *printpoolnode __P((struct ip_pool_node *, - int, wordtab_t *)); -extern void printproto __P((struct protoent *, int, struct ipnat *)); -extern void printportcmp __P((int, struct frpcmp *)); -extern void printstatefield __P((ipstate_t *, int)); -extern void printtqtable __P((ipftq_t *)); -extern void printtunable __P((ipftune_t *)); -extern void printunit __P((int)); -extern void optprint __P((u_short *, u_long, u_long)); + wordtab_t *); +extern void printdstlistdata(ippool_dst_t *, int); +extern ipf_dstnode_t *printdstlistnode(ipf_dstnode_t *, copyfunc_t, + int, wordtab_t *); +extern void printdstlistpolicy(ippool_policy_t); +extern struct ip_pool_s *printpool(struct ip_pool_s *, copyfunc_t, + char *, int, wordtab_t *); +extern struct ip_pool_s *printpool_live(struct ip_pool_s *, int, + char *, int, wordtab_t *); +extern void printpooldata(ip_pool_t *, int); +extern void printpoolfield(void *, int, int); +extern struct ip_pool_node *printpoolnode(struct ip_pool_node *, + int, wordtab_t *); +extern void printproto(struct protoent *, int, struct ipnat *); +extern void printportcmp(int, struct frpcmp *); +extern void printstatefield(ipstate_t *, int); +extern void printtqtable(ipftq_t *); +extern void printtunable(ipftune_t *); +extern void printunit(int); +extern void optprint(u_short *, u_long, u_long); #ifdef USE_INET6 -extern void optprintv6 __P((u_short *, u_long, u_long)); +extern void optprintv6(u_short *, u_long, u_long); #endif -extern int remove_hash __P((struct iphtable_s *, ioctlfunc_t)); -extern int remove_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t)); -extern int remove_pool __P((ip_pool_t *, ioctlfunc_t)); -extern int remove_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t)); -extern u_char tcpflags __P((char *)); -extern void printc __P((struct frentry *)); -extern void printC __P((int)); -extern void emit __P((int, int, void *, struct frentry *)); -extern u_char secbit __P((int)); -extern u_char seclevel __P((char *)); -extern void printfraginfo __P((char *, struct ipfr *)); -extern void printifname __P((char *, char *, void *)); -extern char *hostname __P((int, void *)); -extern struct ipstate *printstate __P((struct ipstate *, int, u_long)); -extern void printsbuf __P((char *)); -extern void printnat __P((struct ipnat *, int)); -extern void printactiveaddress __P((int, char *, i6addr_t *, char *)); -extern void printactivenat __P((struct nat *, int, u_long)); -extern void printhostmap __P((struct hostmap *, u_int)); -extern void printtcpflags __P((u_32_t, u_32_t)); -extern void printipfexpr __P((int *)); -extern void printstatefield __P((ipstate_t *, int)); -extern void printstatefieldhdr __P((int)); -extern int sendtrap_v1_0 __P((int, char *, char *, int, time_t)); -extern int sendtrap_v2_0 __P((int, char *, char *, int)); -extern int vtof __P((int)); - -extern void set_variable __P((char *, char *)); -extern char *get_variable __P((char *, char **, int)); -extern void resetlexer __P((void)); - -extern void debug __P((int, char *, ...)); -extern void verbose __P((int, char *, ...)); -extern void ipfkdebug __P((char *, ...)); -extern void ipfkverbose __P((char *, ...)); +extern int remove_hash(struct iphtable_s *, ioctlfunc_t); +extern int remove_hashnode(int, char *, struct iphtent_s *, ioctlfunc_t); +extern int remove_pool(ip_pool_t *, ioctlfunc_t); +extern int remove_poolnode(int, char *, ip_pool_node_t *, ioctlfunc_t); +extern u_char tcpflags(char *); +extern void printc(struct frentry *); +extern void printC(int); +extern void emit(int, int, void *, struct frentry *); +extern u_char secbit(int); +extern u_char seclevel(char *); +extern void printfraginfo(char *, struct ipfr *); +extern void printifname(char *, char *, void *); +extern char *hostname(int, void *); +extern struct ipstate *printstate(struct ipstate *, int, u_long); +extern void printsbuf(char *); +extern void printnat(struct ipnat *, int); +extern void printactiveaddress(int, char *, i6addr_t *, char *); +extern void printactivenat(struct nat *, int, u_long); +extern void printhostmap(struct hostmap *, u_int); +extern void printtcpflags(u_32_t, u_32_t); +extern void printipfexpr(int *); +extern void printstatefield(ipstate_t *, int); +extern void printstatefieldhdr(int); +extern int sendtrap_v1_0(int, char *, char *, int, time_t); +extern int sendtrap_v2_0(int, char *, char *, int); +extern int vtof(int); + +extern void set_variable(char *, char *); +extern char *get_variable(char *, char **, int); +extern void resetlexer(void); + +extern void debug(int, char *, ...); +extern void verbose(int, char *, ...); +extern void ipfkdebug(char *, ...); +extern void ipfkverbose(char *, ...); #if SOLARIS -extern int gethostname __P((char *, int )); -extern void sync __P((void)); +extern int gethostname(char *, int ); +extern void sync(void); #endif #endif /* __IPF_H__ */ diff --git a/contrib/ipfilter/iplang/iplang.h b/contrib/ipfilter/iplang/iplang.h index 63cc078322a3..f38ef9671701 100644 --- a/contrib/ipfilter/iplang/iplang.h +++ b/contrib/ipfilter/iplang/iplang.h @@ -50,5 +50,5 @@ typedef struct aniphdr { #define ah_udp ah_un.ahu_udp #define ah_icmp ah_un.ahu_icmp -extern int get_arpipv4 __P((char *, char *)); +extern int get_arpipv4(char *, char *); diff --git a/contrib/ipfilter/iplang/iplang_l.l b/contrib/ipfilter/iplang/iplang_l.l index e66867e2a455..f8b1b82d4707 100644 --- a/contrib/ipfilter/iplang/iplang_l.l +++ b/contrib/ipfilter/iplang/iplang_l.l @@ -29,14 +29,14 @@ extern int opts; int lineNum = 0, ipproto = 0, oldipproto = 0, next = -1, laststate = 0; int *prstack = NULL, numpr = 0, state = 0, token = 0; -void yyerror __P((char *)); -void push_proto __P((void)); -void pop_proto __P((void)); -int next_state __P((int, int)); -int next_item __P((int)); -int save_token __P((void)); -void swallow __P((void)); -int yylex __P((void)); +void yyerror(char *); +void push_proto(void); +void pop_proto(void); +int next_state(int, int); +int next_item(int); +int save_token(void); +void swallow(void); +int yylex(void); struct lwordtab { char *word; diff --git a/contrib/ipfilter/iplang/iplang_y.y b/contrib/ipfilter/iplang/iplang_y.y index b4570d390530..f3335636cee1 100644 --- a/contrib/ipfilter/iplang/iplang_y.y +++ b/contrib/ipfilter/iplang/iplang_y.y @@ -59,8 +59,8 @@ arp_t *arplist = NULL, **arptail = &arplist, *carp = NULL; struct in_addr defrouter; send_t sending; char *sclass = NULL; -u_short c_chksum __P((u_short *, u_int, u_long)); -u_long p_chksum __P((u_short *, u_int)); +u_short c_chksum(u_short *, u_int, u_long); +u_long p_chksum(u_short *, u_int); u_long ipbuffer[67584/sizeof(u_long)]; /* 66K */ aniphdr_t *aniphead = NULL, *canip = NULL, **aniptail = &aniphead; @@ -74,85 +74,85 @@ struct statetoopt { int sto_op; }; -struct in_addr getipv4addr __P((char *arg)); -u_short getportnum __P((char *, char *)); -struct ether_addr *geteaddr __P((char *, struct ether_addr *)); -void *new_header __P((int)); -void free_aniplist __P((void)); -void inc_anipheaders __P((int)); -void new_data __P((void)); -void set_datalen __P((char **)); -void set_datafile __P((char **)); -void set_data __P((char **)); -void new_packet __P((void)); -void set_ipv4proto __P((char **)); -void set_ipv4src __P((char **)); -void set_ipv4dst __P((char **)); -void set_ipv4off __P((char **)); -void set_ipv4v __P((char **)); -void set_ipv4hl __P((char **)); -void set_ipv4ttl __P((char **)); -void set_ipv4tos __P((char **)); -void set_ipv4id __P((char **)); -void set_ipv4sum __P((char **)); -void set_ipv4len __P((char **)); -void new_tcpheader __P((void)); -void set_tcpsport __P((char **)); -void set_tcpdport __P((char **)); -void set_tcpseq __P((char **)); -void set_tcpack __P((char **)); -void set_tcpoff __P((char **)); -void set_tcpurp __P((char **)); -void set_tcpwin __P((char **)); -void set_tcpsum __P((char **)); -void set_tcpflags __P((char **)); -void set_tcpopt __P((int, char **)); -void end_tcpopt __P((void)); -void new_udpheader __P((void)); -void set_udplen __P((char **)); -void set_udpsum __P((char **)); -void prep_packet __P((void)); -void packet_done __P((void)); -void new_interface __P((void)); -void check_interface __P((void)); -void set_ifname __P((char **)); -void set_ifmtu __P((int)); -void set_ifv4addr __P((char **)); -void set_ifeaddr __P((char **)); -void new_arp __P((void)); -void set_arpeaddr __P((char **)); -void set_arpv4addr __P((char **)); -void reset_send __P((void)); -void set_sendif __P((char **)); -void set_sendvia __P((char **)); -void set_defaultrouter __P((char **)); -void new_icmpheader __P((void)); -void set_icmpcode __P((int)); -void set_icmptype __P((int)); -void set_icmpcodetok __P((char **)); -void set_icmptypetok __P((char **)); -void set_icmpid __P((int)); -void set_icmpseq __P((int)); -void set_icmpotime __P((int)); -void set_icmprtime __P((int)); -void set_icmpttime __P((int)); -void set_icmpmtu __P((int)); -void set_redir __P((int, char **)); -void new_ipv4opt __P((void)); -void set_icmppprob __P((int)); -void add_ipopt __P((int, void *)); -void end_ipopt __P((void)); -void set_secclass __P((char **)); -void free_anipheader __P((void)); -void end_ipv4 __P((void)); -void end_icmp __P((void)); -void end_udp __P((void)); -void end_tcp __P((void)); -void end_data __P((void)); -void yyerror __P((char *)); -void iplang __P((FILE *)); -int arp_getipv4 __P((char *, char *)); -int yyparse __P((void)); +struct in_addr getipv4addr(char *arg); +u_short getportnum(char *, char *); +struct ether_addr *geteaddr(char *, struct ether_addr *); +void *new_header(int); +void free_aniplist(void); +void inc_anipheaders(int); +void new_data(void); +void set_datalen(char **); +void set_datafile(char **); +void set_data(char **); +void new_packet(void); +void set_ipv4proto(char **); +void set_ipv4src(char **); +void set_ipv4dst(char **); +void set_ipv4off(char **); +void set_ipv4v(char **); +void set_ipv4hl(char **); +void set_ipv4ttl(char **); +void set_ipv4tos(char **); +void set_ipv4id(char **); +void set_ipv4sum(char **); +void set_ipv4len(char **); +void new_tcpheader(void); +void set_tcpsport(char **); +void set_tcpdport(char **); +void set_tcpseq(char **); +void set_tcpack(char **); +void set_tcpoff(char **); +void set_tcpurp(char **); +void set_tcpwin(char **); +void set_tcpsum(char **); +void set_tcpflags(char **); +void set_tcpopt(int, char **); +void end_tcpopt(void); +void new_udpheader(void); +void set_udplen(char **); +void set_udpsum(char **); +void prep_packet(void); +void packet_done(void); +void new_interface(void); +void check_interface(void); +void set_ifname(char **); +void set_ifmtu(int); +void set_ifv4addr(char **); +void set_ifeaddr(char **); +void new_arp(void); +void set_arpeaddr(char **); +void set_arpv4addr(char **); +void reset_send(void); +void set_sendif(char **); +void set_sendvia(char **); +void set_defaultrouter(char **); +void new_icmpheader(void); +void set_icmpcode(int); +void set_icmptype(int); +void set_icmpcodetok(char **); +void set_icmptypetok(char **); +void set_icmpid(int); +void set_icmpseq(int); +void set_icmpotime(int); +void set_icmprtime(int); +void set_icmpttime(int); +void set_icmpmtu(int); +void set_redir(int, char **); +void new_ipv4opt(void); +void set_icmppprob(int); +void add_ipopt(int, void *); +void end_ipopt(void); +void set_secclass(char **); +void free_anipheader(void); +void end_ipv4(void); +void end_icmp(void); +void end_udp(void); +void end_tcp(void); +void end_data(void); +void yyerror(char *); +void iplang(FILE *); +int arp_getipv4(char *, char *); +int yyparse(void); %} %union { char *str; diff --git a/contrib/ipfilter/ipmon.h b/contrib/ipfilter/ipmon.h index b469cc80d6b5..4807299c49d2 100644 --- a/contrib/ipfilter/ipmon.h +++ b/contrib/ipfilter/ipmon.h @@ -132,11 +132,11 @@ typedef struct ipmon_action { #define LOGFAC LOG_LOCAL0 #endif -extern void dump_config __P((void)); -extern int load_config __P((char *)); -extern void unload_config __P((void)); -extern void dumphex __P((FILE *, int, char *, int)); -extern int check_action __P((char *, char *, int, int)); -extern char *getword __P((int)); -extern void *add_doing __P((ipmon_saver_t *)); +extern void dump_config(void); +extern int load_config(char *); +extern void unload_config(void); +extern void dumphex(FILE *, int, char *, int); +extern int check_action(char *, char *, int, int); +extern char *getword(int); +extern void *add_doing(ipmon_saver_t *); diff --git a/contrib/ipfilter/ipsend/ipresend.c b/contrib/ipfilter/ipsend/ipresend.c index 1e7b9049169a..d9a5f92cbe2c 100644 --- a/contrib/ipfilter/ipsend/ipresend.c +++ b/contrib/ipfilter/ipsend/ipresend.c @@ -45,8 +45,8 @@ char default_device[] = DEFAULT_DEVICE; #endif -static void usage __P((char *)); -int main __P((int, char **)); +static void usage(char *); +int main(int, char **); static void usage(prog) diff --git a/contrib/ipfilter/ipsend/ipsend.c b/contrib/ipfilter/ipsend/ipsend.c index b7617734f66e..d77081bd8b71 100644 --- a/contrib/ipfilter/ipsend/ipsend.c +++ b/contrib/ipfilter/ipsend/ipsend.c @@ -29,17 +29,17 @@ static const char rcsid[] = "@(#)$Id$"; extern char *optarg; extern int optind; -extern void iplang __P((FILE *)); +extern void iplang(FILE *); char options[68]; int opts; char default_device[] = "le0"; -static void usage __P((char *)); -static void do_icmp __P((ip_t *, char *)); +static void usage(char *); +static void do_icmp(ip_t *, char *); void udpcksum(ip_t *, struct udphdr *, int); -int main __P((int, char **)); +int main(int, char **); static void usage(prog) diff --git a/contrib/ipfilter/ipsend/ipsend.h b/contrib/ipfilter/ipsend/ipsend.h index 22f85ff07f14..bfec90f1c5b3 100644 --- a/contrib/ipfilter/ipsend/ipsend.h +++ b/contrib/ipfilter/ipsend/ipsend.h @@ -27,33 +27,33 @@ #include "netinet/tcpip.h" #include "ipt.h" -extern int resolve __P((char *, char *)); -extern int arp __P((char *, char *)); -extern u_short chksum __P((u_short *, int)); -extern int send_ether __P((int, char *, int, struct in_addr)); -extern int send_ip __P((int, int, ip_t *, struct in_addr, int)); -extern int send_tcp __P((int, int, ip_t *, struct in_addr)); -extern int send_udp __P((int, int, ip_t *, struct in_addr)); -extern int send_icmp __P((int, int, ip_t *, struct in_addr)); -extern int send_packet __P((int, int, ip_t *, struct in_addr)); -extern int send_packets __P((char *, int, ip_t *, struct in_addr)); -extern u_short ipseclevel __P((char *)); -extern u_32_t buildopts __P((char *, char *, int)); -extern int addipopt __P((char *, struct ipopt_names *, int, char *)); -extern int initdevice __P((char *, int)); -extern int sendip __P((int, char *, int)); -extern struct tcpcb *find_tcp __P((int, struct tcpiphdr *)); -extern int ip_resend __P((char *, int, struct ipread *, struct in_addr, char *)); +extern int resolve(char *, char *); +extern int arp(char *, char *); +extern u_short chksum(u_short *, int); +extern int send_ether(int, char *, int, struct in_addr); +extern int send_ip(int, int, ip_t *, struct in_addr, int); +extern int send_tcp(int, int, ip_t *, struct in_addr); +extern int send_udp(int, int, ip_t *, struct in_addr); +extern int send_icmp(int, int, ip_t *, struct in_addr); +extern int send_packet(int, int, ip_t *, struct in_addr); +extern int send_packets(char *, int, ip_t *, struct in_addr); +extern u_short ipseclevel(char *); +extern u_32_t buildopts(char *, char *, int); +extern int addipopt(char *, struct ipopt_names *, int, char *); +extern int initdevice(char *, int); +extern int sendip(int, char *, int); +extern struct tcpcb *find_tcp(int, struct tcpiphdr *); +extern int ip_resend(char *, int, struct ipread *, struct in_addr, char *); -extern void ip_test1 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test2 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test3 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test4 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test5 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test6 __P((char *, int, ip_t *, struct in_addr, int)); -extern void ip_test7 __P((char *, int, ip_t *, struct in_addr, int)); -extern int do_socket __P((char *, int, struct tcpiphdr *, struct in_addr)); -extern int kmemcpy __P((char *, void *, int)); +extern void ip_test1(char *, int, ip_t *, struct in_addr, int); +extern void ip_test2(char *, int, ip_t *, struct in_addr, int); +extern void ip_test3(char *, int, ip_t *, struct in_addr, int); +extern void ip_test4(char *, int, ip_t *, struct in_addr, int); +extern void ip_test5(char *, int, ip_t *, struct in_addr, int); +extern void ip_test6(char *, int, ip_t *, struct in_addr, int); +extern void ip_test7(char *, int, ip_t *, struct in_addr, int); +extern int do_socket(char *, int, struct tcpiphdr *, struct in_addr); +extern int kmemcpy(char *, void *, int); #define KMCPY(a,b,c) kmemcpy((char *)(a), (void *)(b), (int)(c)) diff --git a/contrib/ipfilter/ipsend/iptest.c b/contrib/ipfilter/ipsend/iptest.c index ffabaf37b5bc..df2efb96a32a 100644 --- a/contrib/ipfilter/ipsend/iptest.c +++ b/contrib/ipfilter/ipsend/iptest.c @@ -37,8 +37,8 @@ char default_device[] = "le0"; char default_device[] = "lan0"; # endif -static void usage __P((char *)); -int main __P((int, char **)); +static void usage(char *); +int main(int, char **); static void usage(prog) diff --git a/contrib/ipfilter/ipsend/resend.c b/contrib/ipfilter/ipsend/resend.c index 3401673ff3a1..5d01bb78e5e5 100644 --- a/contrib/ipfilter/ipsend/resend.c +++ b/contrib/ipfilter/ipsend/resend.c @@ -30,7 +30,7 @@ static const char rcsid[] = "@(#)$Id$"; extern int opts; -void dumppacket __P((ip_t *)); +void dumppacket(ip_t *); void dumppacket(ip) diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index 66e1a0aa897e..a39f9de16345 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -96,9 +96,9 @@ struct proc *proc; #if BSD < 199103 -static struct proc *getproc __P((void)); +static struct proc *getproc(void); #else -static struct kinfo_proc *getproc __P((void)); +static struct kinfo_proc *getproc(void); #endif diff --git a/contrib/ipfilter/ipt.h b/contrib/ipfilter/ipt.h index 16d88dfc8809..9a4d75a85ccb 100644 --- a/contrib/ipfilter/ipt.h +++ b/contrib/ipfilter/ipt.h @@ -24,9 +24,9 @@ struct ipread { - int (*r_open) __P((char *)); - int (*r_close) __P((void)); - int (*r_readip) __P((mb_t *, char **, int *)); + int (*r_open)(char *); + int (*r_close)(void); + int (*r_readip)(mb_t *, char **, int *); int r_flags; }; diff --git a/contrib/ipfilter/kmem.h b/contrib/ipfilter/kmem.h index ea21c052599f..c4b65ed63ce9 100644 --- a/contrib/ipfilter/kmem.h +++ b/contrib/ipfilter/kmem.h @@ -13,9 +13,9 @@ #ifndef __P # define __P(x) x #endif -extern int openkmem __P((char *, char *)); -extern int kmemcpy __P((char *, long, int)); -extern int kstrncpy __P((char *, long, int)); +extern int openkmem(char *, char *); +extern int kmemcpy(char *, long, int); +extern int kstrncpy(char *, long, int); #if defined(__NetBSD__) || defined(__OpenBSD) # include <paths.h> diff --git a/contrib/ipfilter/lib/facpri.h b/contrib/ipfilter/lib/facpri.h index d3634e99d795..5698c0ebe047 100644 --- a/contrib/ipfilter/lib/facpri.h +++ b/contrib/ipfilter/lib/facpri.h @@ -16,11 +16,11 @@ # define __P(x) x #endif -extern char *fac_toname __P((int)); -extern int fac_findname __P((char *)); +extern char *fac_toname(int); +extern int fac_findname(char *); -extern char *pri_toname __P((int)); -extern int pri_findname __P((char *)); +extern char *pri_toname(int); +extern int pri_findname(char *); #ifdef P_DEF # undef __P diff --git a/contrib/ipfilter/lib/inet_addr.c b/contrib/ipfilter/lib/inet_addr.c index fcaefe0fc23e..2b192ae19eff 100644 --- a/contrib/ipfilter/lib/inet_addr.c +++ b/contrib/ipfilter/lib/inet_addr.c @@ -68,7 +68,7 @@ static const char rcsid[] = "@(#)$Id: inet_addr.c,v 1.8.2.3 2004/12/09 19:41:20 #ifndef __P # define __P(x) x #endif -int inet_aton __P((const char *, struct in_addr *)); +int inet_aton(const char *, struct in_addr *); /* * Because the ctype(3) posix definition, if used "safely" in code everywhere, diff --git a/contrib/ipfilter/lib/initparse.c b/contrib/ipfilter/lib/initparse.c index a16ac0f36bcd..c85d6d3ed69d 100644 --- a/contrib/ipfilter/lib/initparse.c +++ b/contrib/ipfilter/lib/initparse.c @@ -13,7 +13,7 @@ char thishost[MAXHOSTNAMELEN]; -void initparse __P((void)) +void initparse(void) { gethostname(thishost, sizeof(thishost)); thishost[sizeof(thishost) - 1] = '\0'; diff --git a/contrib/ipfilter/lib/interror.c b/contrib/ipfilter/lib/interror.c index c13f5f8618a8..ffa12def4ac1 100644 --- a/contrib/ipfilter/lib/interror.c +++ b/contrib/ipfilter/lib/interror.c @@ -15,7 +15,7 @@ typedef struct { char *iee_text; } ipf_error_entry_t; -static ipf_error_entry_t *find_error __P((int)); +static ipf_error_entry_t *find_error(int); #define IPF_NUM_ERRORS 475 diff --git a/contrib/ipfilter/lib/ipft_hx.c b/contrib/ipfilter/lib/ipft_hx.c index 15002eac788d..0165d0b092f7 100644 --- a/contrib/ipfilter/lib/ipft_hx.c +++ b/contrib/ipfilter/lib/ipft_hx.c @@ -18,10 +18,10 @@ static const char rcsid[] = "@(#)$Id$"; extern int opts; -static int hex_open __P((char *)); -static int hex_close __P((void)); -static int hex_readip __P((mb_t *, char **, int *)); -static char *readhex __P((char *, char *)); +static int hex_open(char *); +static int hex_close(void); +static int hex_readip(mb_t *, char **, int *); +static char *readhex(char *, char *); struct ipread iphex = { hex_open, hex_close, hex_readip, 0 }; static FILE *tfp = NULL; diff --git a/contrib/ipfilter/lib/ipft_pc.c b/contrib/ipfilter/lib/ipft_pc.c index 3a264bd66ffe..bd0c752c392f 100644 --- a/contrib/ipfilter/lib/ipft_pc.c +++ b/contrib/ipfilter/lib/ipft_pc.c @@ -51,11 +51,11 @@ typedef struct { u_32_t wirelen; } packetheader_t; -static int ipcap_open __P((char *)); -static int ipcap_close __P((void)); -static int ipcap_readip __P((mb_t *, char **, int *)); -static int ipcap_read_rec __P((packetheader_t *)); -static void iswap_hdr __P((fileheader_t *)); +static int ipcap_open(char *); +static int ipcap_close(void); +static int ipcap_readip(mb_t *, char **, int *); +static int ipcap_read_rec(packetheader_t *); +static void iswap_hdr(fileheader_t *); static int pfd = -1, swapped = 0; static struct llc *llcp = NULL; diff --git a/contrib/ipfilter/lib/ipft_tx.c b/contrib/ipfilter/lib/ipft_tx.c index a996c5b9612a..49d7cb2b8c5c 100644 --- a/contrib/ipfilter/lib/ipft_tx.c +++ b/contrib/ipfilter/lib/ipft_tx.c @@ -21,9 +21,9 @@ extern int opts; static char *tx_proto = ""; -static int text_open __P((char *)), text_close __P((void)); -static int text_readip __P((mb_t *, char **, int *)); -static int parseline __P((char *, ip_t *, char **, int *)); +static int text_open(char *), text_close(void); +static int text_readip(mb_t *, char **, int *); +static int parseline(char *, ip_t *, char **, int *); static char myflagset[] = "FSRPAUEC"; static u_char myflags[] = { TH_FIN, TH_SYN, TH_RST, TH_PUSH, @@ -33,11 +33,11 @@ struct ipread iptext = { text_open, text_close, text_readip, R_DO_CKSUM }; static FILE *tfp = NULL; static int tfd = -1; -static u_32_t tx_hostnum __P((char *, int *)); -static u_short tx_portnum __P((char *)); +static u_32_t tx_hostnum(char *, int *); +static u_short tx_portnum(char *); #ifdef USE_INET6 -int parseipv6 __P((char **, ip6_t *, char **, int *)); +int parseipv6(char **, ip6_t *, char **, int *); #endif /* diff --git a/contrib/ipfilter/lib/kmem.h b/contrib/ipfilter/lib/kmem.h index 31cd9725cc62..bcf6a0be7e27 100644 --- a/contrib/ipfilter/lib/kmem.h +++ b/contrib/ipfilter/lib/kmem.h @@ -13,9 +13,9 @@ #ifndef __P # define __P(x) x #endif -extern int openkmem __P((char *, char *)); -extern int kmemcpy __P((char *, long, int)); -extern int kstrncpy __P((char *, long, int)); +extern int openkmem(char *, char *); +extern int kmemcpy(char *, long, int); +extern int kstrncpy(char *, long, int); #if defined(__NetBSD__) # include <paths.h> diff --git a/contrib/ipfilter/lib/printipfexpr.c b/contrib/ipfilter/lib/printipfexpr.c index 06b987e07575..6fb74c1e2e26 100644 --- a/contrib/ipfilter/lib/printipfexpr.c +++ b/contrib/ipfilter/lib/printipfexpr.c @@ -1,10 +1,10 @@ #include "ipf.h" -static void printport __P((int *)); -static void printhosts __P((int *)); -static void printsingle __P((int *)); +static void printport(int *); +static void printhosts(int *); +static void printsingle(int *); #ifdef USE_INET6 -static void printhostsv6 __P((int *)); +static void printhostsv6(int *); #endif void diff --git a/contrib/ipfilter/lib/save_execute.c b/contrib/ipfilter/lib/save_execute.c index 65caca46bc76..68a3a3754900 100644 --- a/contrib/ipfilter/lib/save_execute.c +++ b/contrib/ipfilter/lib/save_execute.c @@ -1,10 +1,10 @@ #include "ipf.h" #include "ipmon.h" -static void *execute_parse __P((char **)); -static void execute_destroy __P((void *)); -static int execute_send __P((void *, ipmon_msg_t *)); -static void execute_print __P((void *)); +static void *execute_parse(char **); +static void execute_destroy(void *); +static int execute_send(void *, ipmon_msg_t *); +static void execute_print(void *); typedef struct execute_opts_s { char *path; diff --git a/contrib/ipfilter/lib/save_file.c b/contrib/ipfilter/lib/save_file.c index b852bd601982..84ef157009f5 100644 --- a/contrib/ipfilter/lib/save_file.c +++ b/contrib/ipfilter/lib/save_file.c @@ -1,12 +1,12 @@ #include "ipf.h" #include "ipmon.h" -static void *file_parse __P((char **)); -static void file_destroy __P((void *)); -static int file_send __P((void *, ipmon_msg_t *)); -static void file_print __P((void *)); -static int file_match __P((void *, void *)); -static void *file_dup __P((void *)); +static void *file_parse(char **); +static void file_destroy(void *); +static int file_send(void *, ipmon_msg_t *); +static void file_print(void *); +static int file_match(void *, void *); +static void *file_dup(void *); typedef struct file_opts_s { FILE *fp; diff --git a/contrib/ipfilter/lib/save_nothing.c b/contrib/ipfilter/lib/save_nothing.c index d25ab519bce1..39158cf51ddb 100644 --- a/contrib/ipfilter/lib/save_nothing.c +++ b/contrib/ipfilter/lib/save_nothing.c @@ -1,9 +1,9 @@ #include "ipf.h" #include "ipmon.h" -static void *nothing_parse __P((char **)); -static void nothing_destroy __P((void *)); -static int nothing_send __P((void *, ipmon_msg_t *)); +static void *nothing_parse(char **); +static void nothing_destroy(void *); +static int nothing_send(void *, ipmon_msg_t *); typedef struct nothing_opts_s { FILE *fp; diff --git a/contrib/ipfilter/lib/save_syslog.c b/contrib/ipfilter/lib/save_syslog.c index c1efdf41d984..37d428bdb4aa 100644 --- a/contrib/ipfilter/lib/save_syslog.c +++ b/contrib/ipfilter/lib/save_syslog.c @@ -2,10 +2,10 @@ #include "ipmon.h" #include <syslog.h> -static void *syslog_parse __P((char **)); -static void syslog_destroy __P((void *)); -static int syslog_send __P((void *, ipmon_msg_t *)); -static void syslog_print __P((void *)); +static void *syslog_parse(char **); +static void syslog_destroy(void *); +static int syslog_send(void *, ipmon_msg_t *); +static void syslog_print(void *); typedef struct syslog_opts_s { int facpri; diff --git a/contrib/ipfilter/lib/save_v1trap.c b/contrib/ipfilter/lib/save_v1trap.c index 78671c79c768..cca61ac600e5 100644 --- a/contrib/ipfilter/lib/save_v1trap.c +++ b/contrib/ipfilter/lib/save_v1trap.c @@ -12,16 +12,16 @@ static u_char ipf_enterprise[] = { 6, 7, 0x2b, 6, 1, 4, 1, 0xcd, 0x4c }; static u_char ipf_trap0_1[] = { 6, 10, 0x2b, 6, 1, 4, 1, 0xcd, 0x4c, 1, 1, 1 }; static u_char ipf_trap0_2[] = { 6, 10, 0x2b, 6, 1, 4, 1, 0xcd, 0x4c, 1, 1, 2 }; -static int writeint __P((u_char *, int)); -static int writelength __P((u_char *, u_int)); -static int maketrap_v1 __P((char *, u_char *, int, u_char *, int, u_32_t, - time_t)); -static void snmpv1_destroy __P((void *)); -static void *snmpv1_dup __P((void *)); -static int snmpv1_match __P((void *, void *)); -static void *snmpv1_parse __P((char **)); -static void snmpv1_print __P((void *)); -static int snmpv1_send __P((void *, ipmon_msg_t *)); +static int writeint(u_char *, int); +static int writelength(u_char *, u_int); +static int maketrap_v1(char *, u_char *, int, u_char *, int, u_32_t, + time_t); +static void snmpv1_destroy(void *); +static void *snmpv1_dup(void *); +static int snmpv1_match(void *, void *); +static void *snmpv1_parse(char **); +static void snmpv1_print(void *); +static int snmpv1_send(void *, ipmon_msg_t *); typedef struct snmpv1_opts_s { char *community; diff --git a/contrib/ipfilter/lib/save_v2trap.c b/contrib/ipfilter/lib/save_v2trap.c index 0507be9f2696..480f4290851d 100644 --- a/contrib/ipfilter/lib/save_v2trap.c +++ b/contrib/ipfilter/lib/save_v2trap.c @@ -11,18 +11,18 @@ static u_char sysuptime[] = { 6, 8, 0x2b, 6, 1, 2, 1, 1, 3, 0 }; static u_char ipf_trap0_1[] = { 6, 10, 0x2b, 6, 1, 4, 1, 0xcd, 0x4c, 1, 1, 1 }; static u_char ipf_trap0_2[] = { 6, 10, 0x2b, 6, 1, 4, 1, 0xcd, 0x4c, 1, 1, 2 }; -static int writeint __P((u_char *, int)); -static int writelength __P((u_char *, u_int)); -static int maketrap_v2 __P((char *, u_char *, int, u_char *, int)); -static void snmpv2_destroy __P((void *)); -static void *snmpv2_dup __P((void *)); -static int snmpv2_match __P((void *, void *)); -static void *snmpv2_parse __P((char **)); -static void snmpv2_print __P((void *)); -static int snmpv2_send __P((void *, ipmon_msg_t *)); - - -int sendtrap_v2_0 __P((int, char *, char *, int)); +static int writeint(u_char *, int); +static int writelength(u_char *, u_int); +static int maketrap_v2(char *, u_char *, int, u_char *, int); +static void snmpv2_destroy(void *); +static void *snmpv2_dup(void *); +static int snmpv2_match(void *, void *); +static void *snmpv2_parse(char **); +static void snmpv2_print(void *); +static int snmpv2_send(void *, ipmon_msg_t *); + + +int sendtrap_v2_0(int, char *, char *, int); static char def_community[] = "public"; /* ublic */ diff --git a/contrib/ipfilter/lib/var.c b/contrib/ipfilter/lib/var.c index e61c8d1cfea9..22d5b2ac1b1a 100644 --- a/contrib/ipfilter/lib/var.c +++ b/contrib/ipfilter/lib/var.c @@ -20,8 +20,8 @@ typedef struct variable { static variable_t *vtop = NULL; -static variable_t *find_var __P((char *)); -static char *expand_string __P((char *, int)); +static variable_t *find_var(char *); +static char *expand_string(char *, int); static variable_t *find_var(name) diff --git a/contrib/ipfilter/man/ipf.4 b/contrib/ipfilter/man/ipf.4 index aaa050d21340..9b82e01bfc76 100644 --- a/contrib/ipfilter/man/ipf.4 +++ b/contrib/ipfilter/man/ipf.4 @@ -90,7 +90,7 @@ typedef struct frentry { u_32_t fr_flags; /* per-rule flags && options (see below) */ u_short fr_skip; /* # of rules to skip */ u_short fr_loglevel; /* syslog log facility + priority */ - int (*fr_func) __P((int, ip_t *, fr_info_t *)); + int (*fr_func)(int, ip_t *, fr_info_t *)); char fr_icode; /* return ICMP code */ char fr_ifname[IFNAMSIZ]; #if BSD > 199306 diff --git a/contrib/ipfilter/md5.c b/contrib/ipfilter/md5.c index d2ed954576d3..899bb91700ba 100644 --- a/contrib/ipfilter/md5.c +++ b/contrib/ipfilter/md5.c @@ -55,7 +55,7 @@ */ /* forward declaration */ -static void Transform __P((UINT4 *, UINT4 *)); +static void Transform(UINT4 *, UINT4 *); static unsigned char PADDING[64] = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/contrib/ipfilter/md5.h b/contrib/ipfilter/md5.h index cc09b48e8547..6f59500daf19 100644 --- a/contrib/ipfilter/md5.h +++ b/contrib/ipfilter/md5.h @@ -56,9 +56,9 @@ typedef struct { unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; -extern void MD5Init __P((MD5_CTX *)); -extern void MD5Update __P((MD5_CTX *, unsigned char *, unsigned int)); -extern void MD5Final __P((unsigned char *, MD5_CTX *)); +extern void MD5Init(MD5_CTX *); +extern void MD5Update(MD5_CTX *, unsigned char *, unsigned int); +extern void MD5Final(unsigned char *, MD5_CTX *); #define __MD5_INCLUDE__ #endif /* __MD5_INCLUDE__ */ diff --git a/contrib/ipfilter/radix_ipf.c b/contrib/ipfilter/radix_ipf.c index 1c9fa7c446c8..4b3804478527 100644 --- a/contrib/ipfilter/radix_ipf.c +++ b/contrib/ipfilter/radix_ipf.c @@ -27,16 +27,16 @@ #define ADF_OFF offsetof(addrfamily_t, adf_addr) #define ADF_OFF_BITS (ADF_OFF << 3) -static ipf_rdx_node_t *ipf_rx_insert __P((ipf_rdx_head_t *, - ipf_rdx_node_t nodes[2], int *)); -static void ipf_rx_attach_mask __P((ipf_rdx_node_t *, ipf_rdx_mask_t *)); -static int count_mask_bits __P((addrfamily_t *, u_32_t **)); -static void buildnodes __P((addrfamily_t *, addrfamily_t *, - ipf_rdx_node_t n[2])); -static ipf_rdx_node_t *ipf_rx_find_addr __P((ipf_rdx_node_t *, u_32_t *)); -static ipf_rdx_node_t *ipf_rx_lookup __P((ipf_rdx_head_t *, addrfamily_t *, - addrfamily_t *)); -static ipf_rdx_node_t *ipf_rx_match __P((ipf_rdx_head_t *, addrfamily_t *)); +static ipf_rdx_node_t *ipf_rx_insert(ipf_rdx_head_t *, + ipf_rdx_node_t nodes[2], int *); +static void ipf_rx_attach_mask(ipf_rdx_node_t *, ipf_rdx_mask_t *); +static int count_mask_bits(addrfamily_t *, u_32_t **); +static void buildnodes(addrfamily_t *, addrfamily_t *, + ipf_rdx_node_t n[2]); +static ipf_rdx_node_t *ipf_rx_find_addr(ipf_rdx_node_t *, u_32_t *); +static ipf_rdx_node_t *ipf_rx_lookup(ipf_rdx_head_t *, addrfamily_t *, + addrfamily_t *); +static ipf_rdx_node_t *ipf_rx_match(ipf_rdx_head_t *, addrfamily_t *); /* * Foreword. diff --git a/contrib/ipfilter/radix_ipf.h b/contrib/ipfilter/radix_ipf.h index bbbf5592b990..50be3fceb6f6 100644 --- a/contrib/ipfilter/radix_ipf.h +++ b/contrib/ipfilter/radix_ipf.h @@ -81,17 +81,17 @@ typedef struct radix_softc { # define RADIX_NODE_HEAD_UNLOCK(x) #endif -extern void *ipf_rx_create __P((void)); -extern int ipf_rx_init __P((void *)); -extern void ipf_rx_destroy __P((void *)); -extern int ipf_rx_inithead __P((radix_softc_t *, ipf_rdx_head_t **)); -extern void ipf_rx_freehead __P((ipf_rdx_head_t *)); -extern ipf_rdx_node_t *ipf_rx_addroute __P((ipf_rdx_head_t *, - addrfamily_t *, addrfamily_t *, - ipf_rdx_node_t *)); -extern ipf_rdx_node_t *ipf_rx_delete __P((ipf_rdx_head_t *, addrfamily_t *, - addrfamily_t *)); -extern void ipf_rx_walktree __P((ipf_rdx_head_t *, radix_walk_func_t, - void *)); +extern void *ipf_rx_create(void); +extern int ipf_rx_init(void *); +extern void ipf_rx_destroy(void *); +extern int ipf_rx_inithead(radix_softc_t *, ipf_rdx_head_t **); +extern void ipf_rx_freehead(ipf_rdx_head_t *); +extern ipf_rdx_node_t *ipf_rx_addroute(ipf_rdx_head_t *, + addrfamily_t *, addrfamily_t *, + ipf_rdx_node_t *); +extern ipf_rdx_node_t *ipf_rx_delete(ipf_rdx_head_t *, addrfamily_t *, + addrfamily_t *); +extern void ipf_rx_walktree(ipf_rdx_head_t *, radix_walk_func_t, + void *); #endif /* __RADIX_IPF_H__ */ diff --git a/contrib/ipfilter/tools/ipf.c b/contrib/ipfilter/tools/ipf.c index 0551108488e0..406737e25d8e 100644 --- a/contrib/ipfilter/tools/ipf.c +++ b/contrib/ipfilter/tools/ipf.c @@ -17,7 +17,7 @@ static const char rcsid[] = "@(#)$Id$"; #endif #if !defined(__SVR4) && defined(__GNUC__) -extern char *index __P((const char *, int)); +extern char *index(const char *, int); #endif extern char *optarg; @@ -25,28 +25,28 @@ extern int optind; extern frentry_t *frtop; -void ipf_frsync __P((void)); -void zerostats __P((void)); -int main __P((int, char *[])); +void ipf_frsync(void); +void zerostats(void); +int main(int, char *[]); int opts = 0; int outputc = 0; int use_inet6 = 0; int exitstatus = 0; -static void procfile __P((char *)); -static void flushfilter __P((char *, int *)); -static void set_state __P((u_int)); -static void showstats __P((friostat_t *)); -static void packetlogon __P((char *)); -static void swapactive __P((void)); -static int opendevice __P((char *, int)); -static void closedevice __P((void)); +static void procfile(char *); +static void flushfilter(char *, int *); +static void set_state(u_int); +static void showstats(friostat_t *); +static void packetlogon(char *); +static void swapactive(void); +static int opendevice(char *, int); +static void closedevice(void); static char *ipfname = IPL_NAME; -static void usage __P((void)); -static int showversion __P((void)); -static int get_flags __P((void)); -static int ipf_interceptadd __P((int, ioctlfunc_t, void *)); +static void usage(void); +static int showversion(void); +static int get_flags(void); +static int ipf_interceptadd(int, ioctlfunc_t, void *); static int fd = -1; static ioctlfunc_t iocfunctions[IPL_LOGSIZE] = { ioctl, ioctl, ioctl, diff --git a/contrib/ipfilter/tools/ipf_y.y b/contrib/ipfilter/tools/ipf_y.y index 2240a2a1c21f..3851f34bb693 100644 --- a/contrib/ipfilter/tools/ipf_y.y +++ b/contrib/ipfilter/tools/ipf_y.y @@ -22,36 +22,36 @@ #define DOALL(x) for (fr = frc; fr != NULL; fr = fr->fr_next) { x } #define DOREM(x) for (; fr != NULL; fr = fr->fr_next) { x } -extern void yyerror __P((char *)); -extern int yyparse __P((void)); -extern int yylex __P((void)); +extern void yyerror(char *); +extern int yyparse(void); +extern int yylex(void); extern int yydebug; extern FILE *yyin; extern int yylineNum; -static int addname __P((frentry_t **, char *)); -static frentry_t *addrule __P((void)); -static frentry_t *allocfr __P((void)); -static void build_dstaddr_af __P((frentry_t *, void *)); -static void build_srcaddr_af __P((frentry_t *, void *)); -static void dobpf __P((int, char *)); -static void doipfexpr __P((char *)); -static void do_tuneint __P((char *, int)); -static void do_tunestr __P((char *, char *)); -static void fillgroup __P((frentry_t *)); -static int lookuphost __P((char *, i6addr_t *)); -static u_int makehash __P((struct alist_s *)); -static int makepool __P((struct alist_s *)); -static struct alist_s *newalist __P((struct alist_s *)); -static void newrule __P((void)); -static void resetaddr __P((void)); -static void setgroup __P((frentry_t **, char *)); -static void setgrhead __P((frentry_t **, char *)); -static void seticmphead __P((frentry_t **, char *)); -static void setifname __P((frentry_t **, int, char *)); -static void setipftype __P((void)); -static void setsyslog __P((void)); -static void unsetsyslog __P((void)); +static int addname(frentry_t **, char *); +static frentry_t *addrule(void); +static frentry_t *allocfr(void); +static void build_dstaddr_af(frentry_t *, void *); +static void build_srcaddr_af(frentry_t *, void *); +static void dobpf(int, char *); +static void doipfexpr(char *); +static void do_tuneint(char *, int); +static void do_tunestr(char *, char *); +static void fillgroup(frentry_t *); +static int lookuphost(char *, i6addr_t *); +static u_int makehash(struct alist_s *); +static int makepool(struct alist_s *); +static struct alist_s *newalist(struct alist_s *); +static void newrule(void); +static void resetaddr(void); +static void setgroup(frentry_t **, char *); +static void setgrhead(frentry_t **, char *); +static void seticmphead(frentry_t **, char *); +static void setifname(frentry_t **, int, char *); +static void setipftype(void); +static void setsyslog(void); +static void unsetsyslog(void); frentry_t *fr = NULL, *frc = NULL, *frtop = NULL, *frold = NULL; diff --git a/contrib/ipfilter/tools/ipfcomp.c b/contrib/ipfilter/tools/ipfcomp.c index d41faa44e3b3..505fde55cfa7 100644 --- a/contrib/ipfilter/tools/ipfcomp.c +++ b/contrib/ipfilter/tools/ipfcomp.c @@ -25,17 +25,17 @@ typedef struct { static char *portcmp[] = { "*", "==", "!=", "<", ">", "<=", ">=", "**", "***" }; static int count = 0; -int intcmp __P((const void *, const void *)); -static void indent __P((FILE *, int)); -static void printeq __P((FILE *, char *, int, int, int)); -static void printipeq __P((FILE *, char *, int, int, int)); -static void addrule __P((FILE *, frentry_t *)); -static void printhooks __P((FILE *, int, int, frgroup_t *)); -static void emitheader __P((frgroup_t *, u_int, u_int)); -static void emitGroup __P((int, int, void *, frentry_t *, char *, - u_int, u_int)); -static void emittail __P((void)); -static void printCgroup __P((int, frentry_t *, mc_t *, char *)); +int intcmp(const void *, const void *); +static void indent(FILE *, int); +static void printeq(FILE *, char *, int, int, int); +static void printipeq(FILE *, char *, int, int, int); +static void addrule(FILE *, frentry_t *); +static void printhooks(FILE *, int, int, frgroup_t *); +static void emitheader(frgroup_t *, u_int, u_int); +static void emitGroup(int, int, void *, frentry_t *, char *, + u_int, u_int); +static void emittail(void); +static void printCgroup(int, frentry_t *, mc_t *, char *); #define FRC_IFN 0 #define FRC_V 1 @@ -360,15 +360,15 @@ static void emitheader(grp, incount, outcount) if (fph == NULL) return; - fprintf(fph, "extern int ipfrule_add __P((void));\n"); - fprintf(fph, "extern int ipfrule_remove __P((void));\n"); + fprintf(fph, "extern int ipfrule_add(void));\n"); + fprintf(fph, "extern int ipfrule_remove(void));\n"); } printhooks(cfile, incount, outcount, grp); if (incount) { fprintf(fph, "\n\ -extern frentry_t *ipfrule_match_in_%s __P((fr_info_t *, u_32_t *));\n\ +extern frentry_t *ipfrule_match_in_%s(fr_info_t *, u_32_t *));\n\ extern frentry_t *ipf_rules_in_%s[%d];\n", grp->fg_name, grp->fg_name, incount); @@ -379,13 +379,13 @@ extern frentry_t *ipf_rules_in_%s[%d];\n", break; if (g == grp) { fprintf(fph, "\n\ -extern int ipfrule_add_in_%s __P((void));\n\ -extern int ipfrule_remove_in_%s __P((void));\n", grp->fg_name, grp->fg_name); +extern int ipfrule_add_in_%s(void));\n\ +extern int ipfrule_remove_in_%s(void));\n", grp->fg_name, grp->fg_name); } } if (outcount) { fprintf(fph, "\n\ -extern frentry_t *ipfrule_match_out_%s __P((fr_info_t *, u_32_t *));\n\ +extern frentry_t *ipfrule_match_out_%s(fr_info_t *, u_32_t *));\n\ extern frentry_t *ipf_rules_out_%s[%d];\n", grp->fg_name, grp->fg_name, outcount); @@ -396,8 +396,8 @@ extern frentry_t *ipf_rules_out_%s[%d];\n", break; if (g == grp) { fprintf(fph, "\n\ -extern int ipfrule_add_out_%s __P((void));\n\ -extern int ipfrule_remove_out_%s __P((void));\n", +extern int ipfrule_add_out_%s(void));\n\ +extern int ipfrule_remove_out_%s(void));\n", grp->fg_name, grp->fg_name); } } diff --git a/contrib/ipfilter/tools/ipfs.c b/contrib/ipfilter/tools/ipfs.c index 7a2fe0252498..e9a535977bd9 100644 --- a/contrib/ipfilter/tools/ipfs.c +++ b/contrib/ipfilter/tools/ipfs.c @@ -46,25 +46,25 @@ static const char rcsid[] = "@(#)$Id$"; #endif #if !defined(__SVR4) && defined(__GNUC__) -extern char *index __P((const char *, int)); +extern char *index(const char *, int); #endif extern char *optarg; extern int optind; -int main __P((int, char *[])); -void usage __P((void)); -int changestateif __P((char *, char *)); -int changenatif __P((char *, char *)); -int readstate __P((int, char *)); -int readnat __P((int, char *)); -int writestate __P((int, char *)); -int opendevice __P((char *)); -void closedevice __P((int)); -int setlock __P((int, int)); -int writeall __P((char *)); -int readall __P((char *)); -int writenat __P((int, char *)); +int main(int, char *[]); +void usage(void); +int changestateif(char *, char *); +int changenatif(char *, char *); +int readstate(int, char *); +int readnat(int, char *); +int writestate(int, char *); +int opendevice(char *); +void closedevice(int); +int setlock(int, int); +int writeall(char *); +int readall(char *); +int writenat(int, char *); int opts = 0; char *progname; diff --git a/contrib/ipfilter/tools/ipfstat.c b/contrib/ipfilter/tools/ipfstat.c index 23ffb3832844..2165a671a9e9 100644 --- a/contrib/ipfilter/tools/ipfstat.c +++ b/contrib/ipfilter/tools/ipfstat.c @@ -120,45 +120,45 @@ typedef struct statetop { } statetop_t; #endif -int main __P((int, char *[])); - -static int fetchfrag __P((int, int, ipfr_t *)); -static void showstats __P((friostat_t *, u_32_t)); -static void showfrstates __P((ipfrstat_t *, u_long)); -static void showlist __P((friostat_t *)); -static void showstatestats __P((ips_stat_t *)); -static void showipstates __P((ips_stat_t *, int *)); -static void showauthstates __P((ipf_authstat_t *)); -static void showtqtable_live __P((int)); -static void showgroups __P((friostat_t *)); -static void usage __P((char *)); -static int state_matcharray __P((ipstate_t *, int *)); -static int printlivelist __P((friostat_t *, int, int, frentry_t *, - char *, char *)); -static void printdeadlist __P((friostat_t *, int, int, frentry_t *, - char *, char *)); -static void printside __P((char *, ipf_statistics_t *)); -static void parse_ipportstr __P((const char *, i6addr_t *, int *)); -static void ipfstate_live __P((char *, friostat_t **, ips_stat_t **, - ipfrstat_t **, ipf_authstat_t **, u_32_t *)); -static void ipfstate_dead __P((char *, friostat_t **, ips_stat_t **, - ipfrstat_t **, ipf_authstat_t **, u_32_t *)); -static ipstate_t *fetchstate __P((ipstate_t *, ipstate_t *)); +int main(int, char *[]); + +static int fetchfrag(int, int, ipfr_t *); +static void showstats(friostat_t *, u_32_t); +static void showfrstates(ipfrstat_t *, u_long); +static void showlist(friostat_t *); +static void showstatestats(ips_stat_t *); +static void showipstates(ips_stat_t *, int *); +static void showauthstates(ipf_authstat_t *); +static void showtqtable_live(int); +static void showgroups(friostat_t *); +static void usage(char *); +static int state_matcharray(ipstate_t *, int *); +static int printlivelist(friostat_t *, int, int, frentry_t *, + char *, char *); +static void printdeadlist(friostat_t *, int, int, frentry_t *, + char *, char *); +static void printside(char *, ipf_statistics_t *); +static void parse_ipportstr(const char *, i6addr_t *, int *); +static void ipfstate_live(char *, friostat_t **, ips_stat_t **, + ipfrstat_t **, ipf_authstat_t **, u_32_t *); +static void ipfstate_dead(char *, friostat_t **, ips_stat_t **, + ipfrstat_t **, ipf_authstat_t **, u_32_t *); +static ipstate_t *fetchstate(ipstate_t *, ipstate_t *); #ifdef STATETOP -static void topipstates __P((i6addr_t, i6addr_t, int, int, int, - int, int, int, int *)); -static void sig_break __P((int)); -static void sig_resize __P((int)); -static char *getip __P((int, i6addr_t *)); -static char *ttl_to_string __P((long)); -static int sort_p __P((const void *, const void *)); -static int sort_pkts __P((const void *, const void *)); -static int sort_bytes __P((const void *, const void *)); -static int sort_ttl __P((const void *, const void *)); -static int sort_srcip __P((const void *, const void *)); -static int sort_srcpt __P((const void *, const void *)); -static int sort_dstip __P((const void *, const void *)); -static int sort_dstpt __P((const void *, const void *)); +static void topipstates(i6addr_t, i6addr_t, int, int, int, + int, int, int, int *); +static void sig_break(int); +static void sig_resize(int); +static char *getip(int, i6addr_t *); +static char *ttl_to_string(long); +static int sort_p(const void *, const void *); +static int sort_pkts(const void *, const void *); +static int sort_bytes(const void *, const void *); +static int sort_ttl(const void *, const void *); +static int sort_srcip(const void *, const void *); +static int sort_srcpt(const void *, const void *); +static int sort_dstip(const void *, const void *); +static int sort_dstpt(const void *, const void *); #endif diff --git a/contrib/ipfilter/tools/ipfsyncd.c b/contrib/ipfilter/tools/ipfsyncd.c index d4671e409d63..0ccc15542f6b 100644 --- a/contrib/ipfilter/tools/ipfsyncd.c +++ b/contrib/ipfilter/tools/ipfsyncd.c @@ -43,17 +43,17 @@ extern char *sys_errlist[]; #endif -int main __P((int, char *[])); -void usage __P((char *)); -void printsynchdr __P((synchdr_t *)); -void printtable __P((int)); -void printsmcproto __P((char *)); -void printcommand __P((int)); -int do_kbuff __P((int, char *, int *)); -int do_packet __P((int, char *)); -int buildsocket __P((char *, struct sockaddr_in *)); -void do_io __P((void)); -void handleterm __P((int)); +int main(int, char *[]); +void usage(char *); +void printsynchdr(synchdr_t *); +void printtable(int); +void printsmcproto(char *); +void printcommand(int); +int do_kbuff(int, char *, int *); +int do_packet(int, char *); +int buildsocket(char *, struct sockaddr_in *); +void do_io(void); +void handleterm(int); int terminate = 0; int igmpfd = -1; diff --git a/contrib/ipfilter/tools/ipftest.c b/contrib/ipfilter/tools/ipftest.c index f9d45f71cbb2..d7f97c1fa66b 100644 --- a/contrib/ipfilter/tools/ipftest.c +++ b/contrib/ipfilter/tools/ipftest.c @@ -17,9 +17,9 @@ static const char rcsid[] = "@(#)$Id$"; extern char *optarg; extern struct ipread pcap, iptext, iphex; -extern struct ifnet *get_unit __P((char *, int)); -extern void init_ifp __P((void)); -extern ipnat_t *natparse __P((char *, int)); +extern struct ifnet *get_unit(char *, int); +extern void init_ifp(void); +extern ipnat_t *natparse(char *, int); extern hostmap_t **ipf_hm_maptable; extern hostmap_t *ipf_hm_maplist; @@ -32,24 +32,24 @@ int opts = OPT_DONTOPEN; int use_inet6 = 0; int docksum = 0; int pfil_delayed_copy = 0; -int main __P((int, char *[])); -int loadrules __P((char *, int)); -int kmemcpy __P((char *, long, int)); -int kstrncpy __P((char *, long, int n)); +int main(int, char *[]); +int loadrules(char *, int); +int kmemcpy(char *, long, int); +int kstrncpy(char *, long, int n); int blockreason; -void dumpnat __P((void *)); -void dumpgroups __P((ipf_main_softc_t *)); -void dumprules __P((frentry_t *)); -void drain_log __P((char *)); -void fixv4sums __P((mb_t *, ip_t *)); - -int ipftestioctl __P((int, ioctlcmd_t, ...)); -int ipnattestioctl __P((int, ioctlcmd_t, ...)); -int ipstatetestioctl __P((int, ioctlcmd_t, ...)); -int ipauthtestioctl __P((int, ioctlcmd_t, ...)); -int ipscantestioctl __P((int, ioctlcmd_t, ...)); -int ipsynctestioctl __P((int, ioctlcmd_t, ...)); -int ipooltestioctl __P((int, ioctlcmd_t, ...)); +void dumpnat(void *); +void dumpgroups(ipf_main_softc_t *); +void dumprules(frentry_t *); +void drain_log(char *); +void fixv4sums(mb_t *, ip_t *); + +int ipftestioctl(int, ioctlcmd_t, ...); +int ipnattestioctl(int, ioctlcmd_t, ...); +int ipstatetestioctl(int, ioctlcmd_t, ...); +int ipauthtestioctl(int, ioctlcmd_t, ...); +int ipscantestioctl(int, ioctlcmd_t, ...); +int ipsynctestioctl(int, ioctlcmd_t, ...); +int ipooltestioctl(int, ioctlcmd_t, ...); static ioctlfunc_t iocfunctions[IPL_LOGSIZE] = { ipftestioctl, ipnattestioctl, diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index d7ad1a228378..005cd316f91a 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -116,30 +116,30 @@ static char *pidfile = "/var/run/ipmon.pid"; static char line[2048]; static int donehup = 0; -static void usage __P((char *)); -static void handlehup __P((int)); -static void flushlogs __P((char *, FILE *)); -static void print_log __P((config_t *, logsource_t *, char *, int)); -static void print_ipflog __P((config_t *, char *, int)); -static void print_natlog __P((config_t *, char *, int)); -static void print_statelog __P((config_t *, char *, int)); -static int read_log __P((int, int *, char *, int)); -static void write_pid __P((char *)); -static char *icmpname __P((u_int, u_int)); -static char *icmpname6 __P((u_int, u_int)); -static icmp_type_t *find_icmptype __P((int, icmp_type_t *, size_t)); -static icmp_subtype_t *find_icmpsubtype __P((int, icmp_subtype_t *, size_t)); -static struct tm *get_tm __P((time_t)); - -char *portlocalname __P((int, char *, u_int)); -int main __P((int, char *[])); - -static void logopts __P((int, char *)); -static void init_tabs __P((void)); -static char *getlocalproto __P((u_int)); -static void openlogs __P((config_t *conf)); -static int read_loginfo __P((config_t *conf)); -static void initconfig __P((config_t *conf)); +static void usage(char *); +static void handlehup(int); +static void flushlogs(char *, FILE *); +static void print_log(config_t *, logsource_t *, char *, int); +static void print_ipflog(config_t *, char *, int); +static void print_natlog(config_t *, char *, int); +static void print_statelog(config_t *, char *, int); +static int read_log(int, int *, char *, int); +static void write_pid(char *); +static char *icmpname(u_int, u_int); +static char *icmpname6(u_int, u_int); +static icmp_type_t *find_icmptype(int, icmp_type_t *, size_t); +static icmp_subtype_t *find_icmpsubtype(int, icmp_subtype_t *, size_t); +static struct tm *get_tm(time_t); + +char *portlocalname(int, char *, u_int); +int main(int, char *[]); + +static void logopts(int, char *); +static void init_tabs(void); +static char *getlocalproto(u_int); +static void openlogs(config_t *conf); +static int read_loginfo(config_t *conf); +static void initconfig(config_t *conf); static char **protocols = NULL; static char **udp_ports = NULL; diff --git a/contrib/ipfilter/tools/ipmon_y.y b/contrib/ipfilter/tools/ipmon_y.y index f14180d6a9e9..0aeb20a32519 100644 --- a/contrib/ipfilter/tools/ipmon_y.y +++ b/contrib/ipfilter/tools/ipmon_y.y @@ -17,9 +17,9 @@ #define YYDEBUG 1 -extern void yyerror __P((char *)); -extern int yyparse __P((void)); -extern int yylex __P((void)); +extern void yyerror(char *); +extern int yyparse(void); +extern int yylex(void); extern int yydebug; extern FILE *yyin; extern int yylineNum; @@ -36,14 +36,14 @@ typedef struct opt_s { int o_logpri; } opt_t; -static void build_action __P((opt_t *, ipmon_doing_t *)); -static opt_t *new_opt __P((int)); -static void free_action __P((ipmon_action_t *)); -static void print_action __P((ipmon_action_t *)); -static int find_doing __P((char *)); -static ipmon_doing_t *build_doing __P((char *, char *)); -static void print_match __P((ipmon_action_t *)); -static int install_saver __P((char *, char *)); +static void build_action(opt_t *, ipmon_doing_t *); +static opt_t *new_opt(int); +static void free_action(ipmon_action_t *); +static void print_action(ipmon_action_t *); +static int find_doing(char *); +static ipmon_doing_t *build_doing(char *, char *); +static void print_match(ipmon_action_t *); +static int install_saver(char *, char *); static ipmon_action_t *alist = NULL; diff --git a/contrib/ipfilter/tools/ipnat.c b/contrib/ipfilter/tools/ipnat.c index 7d76893cfd2c..1ca6e776ffdf 100644 --- a/contrib/ipfilter/tools/ipnat.c +++ b/contrib/ipfilter/tools/ipnat.c @@ -63,18 +63,18 @@ int use_inet6 = 0; extern char *optarg; -void dostats __P((int, natstat_t *, int, int, int *)); -void dotable __P((natstat_t *, int, int, int, char *)); -void flushtable __P((int, int, int *)); -void usage __P((char *)); -int main __P((int, char*[])); -void showhostmap __P((natstat_t *nsp)); -void natstat_dead __P((natstat_t *, char *)); -void dostats_live __P((int, natstat_t *, int, int *)); -void showhostmap_dead __P((natstat_t *)); -void showhostmap_live __P((int, natstat_t *)); -void dostats_dead __P((natstat_t *, int, int *)); -int nat_matcharray __P((nat_t *, int *)); +void dostats(int, natstat_t *, int, int, int *); +void dotable(natstat_t *, int, int, int, char *); +void flushtable(int, int, int *); +void usage(char *); +int main(int, char*[]); +void showhostmap(natstat_t *nsp); +void natstat_dead(natstat_t *, char *); +void dostats_live(int, natstat_t *, int, int *); +void showhostmap_dead(natstat_t *); +void showhostmap_live(int, natstat_t *); +void dostats_dead(natstat_t *, int, int *); +int nat_matcharray(nat_t *, int *); int opts; int nohdrfields = 0; diff --git a/contrib/ipfilter/tools/ipnat_y.y b/contrib/ipfilter/tools/ipnat_y.y index e24641306634..30e888d8b490 100644 --- a/contrib/ipfilter/tools/ipnat_y.y +++ b/contrib/ipfilter/tools/ipnat_y.y @@ -35,9 +35,9 @@ #define YYDEBUG 1 -extern void yyerror __P((char *)); -extern int yyparse __P((void)); -extern int yylex __P((void)); +extern void yyerror(char *); +extern int yyparse(void); +extern int yylex(void); extern int yydebug; extern FILE *yyin; extern int yylineNum; @@ -51,22 +51,22 @@ static int suggest_port = 0; static proxyrule_t *prules = NULL; static int parser_error = 0; -static void newnatrule __P((void)); -static void setnatproto __P((int)); -static void setmapifnames __P((void)); -static void setrdrifnames __P((void)); -static void proxy_setconfig __P((int)); -static void proxy_unsetconfig __P((void)); -static namelist_t *proxy_dns_add_pass __P((char *, char *)); -static namelist_t *proxy_dns_add_block __P((char *, char *)); -static void proxy_addconfig __P((char *, int, char *, namelist_t *)); -static void proxy_loadconfig __P((int, ioctlfunc_t, char *, int, - char *, namelist_t *)); -static void proxy_loadrules __P((int, ioctlfunc_t, proxyrule_t *)); -static void setmapifnames __P((void)); -static void setrdrifnames __P((void)); -static void setifname __P((ipnat_t **, int, char *)); -static int addname __P((ipnat_t **, char *)); +static void newnatrule(void); +static void setnatproto(int); +static void setmapifnames(void); +static void setrdrifnames(void); +static void proxy_setconfig(int); +static void proxy_unsetconfig(void); +static namelist_t *proxy_dns_add_pass(char *, char *); +static namelist_t *proxy_dns_add_block(char *, char *); +static void proxy_addconfig(char *, int, char *, namelist_t *); +static void proxy_loadconfig(int, ioctlfunc_t, char *, int, + char *, namelist_t *); +static void proxy_loadrules(int, ioctlfunc_t, proxyrule_t *); +static void setmapifnames(void); +static void setrdrifnames(void); +static void setifname(ipnat_t **, int, char *); +static int addname(ipnat_t **, char *); %} %union { char *str; diff --git a/contrib/ipfilter/tools/ippool.c b/contrib/ipfilter/tools/ippool.c index 34800d92defa..62d096cef88d 100644 --- a/contrib/ipfilter/tools/ippool.c +++ b/contrib/ipfilter/tools/ippool.c @@ -34,28 +34,28 @@ #include "kmem.h" -extern int ippool_yyparse __P((void)); +extern int ippool_yyparse(void); extern int ippool_yydebug; extern FILE *ippool_yyin; extern char *optarg; extern int lineNum; -void usage __P((char *)); -int main __P((int, char **)); -int poolcommand __P((int, int, char *[])); -int poolnodecommand __P((int, int, char *[])); -int loadpoolfile __P((int, char *[], char *)); -int poollist __P((int, char *[])); -void poollist_dead __P((int, char *, int, char *, char *)); -void poollist_live __P((int, char *, int, int)); -int poolflush __P((int, char *[])); -int poolstats __P((int, char *[])); -int gettype __P((char *, u_int *)); -int getrole __P((char *)); -int setnodeaddr __P((int, int, void *ptr, char *arg)); -void showpools_live __P((int, int, ipf_pool_stat_t *, char *)); -void showhashs_live __P((int, int, iphtstat_t *, char *)); -void showdstls_live __P((int, int, ipf_dstl_stat_t *, char *)); +void usage(char *); +int main(int, char **); +int poolcommand(int, int, char *[]); +int poolnodecommand(int, int, char *[]); +int loadpoolfile(int, char *[], char *); +int poollist(int, char *[]); +void poollist_dead(int, char *, int, char *, char *); +void poollist_live(int, char *, int, int); +int poolflush(int, char *[]); +int poolstats(int, char *[]); +int gettype(char *, u_int *); +int getrole(char *); +int setnodeaddr(int, int, void *ptr, char *arg); +void showpools_live(int, int, ipf_pool_stat_t *, char *); +void showhashs_live(int, int, iphtstat_t *, char *); +void showdstls_live(int, int, ipf_dstl_stat_t *, char *); int opts = 0; int fd = -1; diff --git a/contrib/ipfilter/tools/ippool_y.y b/contrib/ipfilter/tools/ippool_y.y index 02ae5c22141a..741ae2db7466 100644 --- a/contrib/ipfilter/tools/ippool_y.y +++ b/contrib/ipfilter/tools/ippool_y.y @@ -37,7 +37,7 @@ #define YYDEBUG 1 #define YYSTACKSIZE 0x00ffffff -extern int yyparse __P((void)); +extern int yyparse(void); extern int yydebug; extern FILE *yyin; @@ -48,10 +48,10 @@ static ippool_dst_t ipld; static ioctlfunc_t poolioctl = NULL; static char poolname[FR_GROUPLEN]; -static iphtent_t *add_htablehosts __P((char *)); -static ip_pool_node_t *add_poolhosts __P((char *)); -static ip_pool_node_t *read_whoisfile __P((char *)); -static void setadflen __P((addrfamily_t *)); +static iphtent_t *add_htablehosts(char *); +static ip_pool_node_t *add_poolhosts(char *); +static ip_pool_node_t *read_whoisfile(char *); +static void setadflen(addrfamily_t *); %} diff --git a/contrib/ipfilter/tools/ipscan_y.y b/contrib/ipfilter/tools/ipscan_y.y index d323f054bd27..b36b66db2b97 100644 --- a/contrib/ipfilter/tools/ipscan_y.y +++ b/contrib/ipfilter/tools/ipscan_y.y @@ -18,25 +18,25 @@ #define YYDEBUG 1 extern char *optarg; -extern void yyerror __P((char *)); -extern int yyparse __P((void)); -extern int yylex __P((void)); +extern void yyerror(char *); +extern int yyparse(void); +extern int yylex(void); extern int yydebug; extern FILE *yyin; extern int yylineNum; -extern void printbuf __P((char *, int, int)); - - -void printent __P((ipscan_t *)); -void showlist __P((void)); -int getportnum __P((char *)); -struct in_addr gethostip __P((char *)); -struct in_addr combine __P((int, int, int, int)); -char **makepair __P((char *, char *)); -void addtag __P((char *, char **, char **, struct action *)); -int cram __P((char *, char *)); -void usage __P((char *)); -int main __P((int, char **)); +extern void printbuf(char *, int, int); + + +void printent(ipscan_t *); +void showlist(void); +int getportnum(char *); +struct in_addr gethostip(char *); +struct in_addr combine(int, int, int, int); +char **makepair(char *, char *); +void addtag(char *, char **, char **, struct action *); +int cram(char *, char *); +void usage(char *); +int main(int, char **); int opts = 0; int fd = -1; diff --git a/contrib/ipfilter/tools/ipsyncm.c b/contrib/ipfilter/tools/ipsyncm.c index 41513fae3bcc..d57196379210 100644 --- a/contrib/ipfilter/tools/ipsyncm.c +++ b/contrib/ipfilter/tools/ipsyncm.c @@ -33,8 +33,8 @@ static const char rcsid[] = "@(#)$Id$"; #include "netinet/ip_sync.h" -int main __P((int, char *[])); -void usage __P((const char *)); +int main(int, char *[]); +void usage(const char *); int terminate = 0; diff --git a/contrib/ipfilter/tools/ipsyncs.c b/contrib/ipfilter/tools/ipsyncs.c index 43692cd6a0d1..a53cfb8c9508 100644 --- a/contrib/ipfilter/tools/ipsyncs.c +++ b/contrib/ipfilter/tools/ipsyncs.c @@ -33,8 +33,8 @@ static const char rcsid[] = "@(#)$Id$"; #include "netinet/ip_nat.h" #include "netinet/ip_sync.h" -int main __P((int, char *[])); -void usage __P((const char *progname)); +int main(int, char *[]); +void usage(const char *progname); int terminate = 0; diff --git a/contrib/ipfilter/tools/lexer.c b/contrib/ipfilter/tools/lexer.c index 41b7896090ad..926ee201685f 100644 --- a/contrib/ipfilter/tools/lexer.c +++ b/contrib/ipfilter/tools/lexer.c @@ -52,13 +52,13 @@ int yysavedepth = 0; wordtab_t *yysavewords[30]; -static wordtab_t *yyfindkey __P((char *)); -static int yygetc __P((int)); -static void yyunputc __P((int)); -static int yyswallow __P((int)); -static char *yytexttostr __P((int, int)); -static void yystrtotext __P((char *)); -static char *yytexttochar __P((void)); +static wordtab_t *yyfindkey(char *); +static int yygetc(int); +static void yyunputc(int); +static int yyswallow(int); +static char *yytexttostr(int, int); +static void yystrtotext(char *); +static char *yytexttochar(void); static int yygetc(docont) int docont; diff --git a/contrib/ipfilter/tools/lexer.h b/contrib/ipfilter/tools/lexer.h index cff24b4eb402..cc200f1cad41 100644 --- a/contrib/ipfilter/tools/lexer.h +++ b/contrib/ipfilter/tools/lexer.h @@ -22,13 +22,13 @@ #define YYBUFSIZ 8192 -extern wordtab_t *yysettab __P((wordtab_t *)); -extern void yysetdict __P((wordtab_t *)); -extern void yysetfixeddict __P((wordtab_t *)); -extern int yylex __P((void)); -extern void yyerror __P((char *)); -extern char *yykeytostr __P((int)); -extern void yyresetdict __P((void)); +extern wordtab_t *yysettab(wordtab_t *); +extern void yysetdict(wordtab_t *); +extern void yysetfixeddict(wordtab_t *); +extern int yylex(void); +extern void yyerror(char *); +extern char *yykeytostr(int); +extern void yyresetdict(void); extern FILE *yyin; extern int yylineNum; |