diff options
author | Chih-hung Hsieh <chh@google.com> | 2015-10-27 02:17:35 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-27 02:17:35 +0000 |
commit | a291bfe9a2e50fd0f3907b161877b4b16d5ceed9 (patch) | |
tree | 4078d795e05679e65b22ebdd43a64b8ab89f1219 | |
parent | 7e85d0148252f234b100b8ffb8dffa0d241c960d (diff) | |
parent | 39ce2e3068b3270a435c2a5915408f5136e91371 (diff) | |
download | ipsec-tools-nougat-bugfix-release.tar.gz |
Merge "Back port 0.8.0 fixes of function prototypes."android-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1android-7.1.0_r7android-7.1.0_r6android-7.1.0_r5android-7.1.0_r4android-7.1.0_r3android-7.1.0_r2android-7.1.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r36android-7.0.0_r35android-7.0.0_r34android-7.0.0_r33android-7.0.0_r32android-7.0.0_r31android-7.0.0_r30android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1nougat-releasenougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-releasenougat-mr0.5-releasenougat-dr1-releasenougat-devnougat-cts-releasenougat-bugfix-release
am: 39ce2e3068
* commit '39ce2e3068b3270a435c2a5915408f5136e91371':
Back port 0.8.0 fixes of function prototypes.
-rw-r--r-- | Android.mk | 8 | ||||
-rw-r--r-- | src/libipsec/pfkey.c | 355 | ||||
-rw-r--r-- | src/racoon/isakmp.c | 6 | ||||
-rw-r--r-- | src/racoon/remoteconf.c | 4 |
4 files changed, 101 insertions, 272 deletions
@@ -81,10 +81,6 @@ LOCAL_CFLAGS += -Wno-unused-variable \ -Wno-unused-label \ -Wno-unused-value -# pfkey.c, isakmp.c, remoteconf.c have some K&R warnings, -# to be ignored until they are fixed from upstream. -LOCAL_CLANG_CFLAGS += -Wno-knr-promoted-parameter - LOCAL_MODULE := racoon LOCAL_INIT_RC := racoon.rc @@ -103,10 +99,6 @@ LOCAL_CFLAGS := -DANDROID_CHANGES -DHAVE_CONFIG_H -DHAVE_OPENSSL_ENGINE_H LOCAL_CFLAGS += -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pointer-sign -Werror -# pfkey.c has some K&R warnings, -# to be ignored until they are fixed from upstream. -LOCAL_CLANG_CFLAGS += -Wno-knr-promoted-parameter - LOCAL_C_INCLUDES += \ $(LOCAL_PATH) \ $(LOCAL_PATH)/src/include-glibc \ diff --git a/src/libipsec/pfkey.c b/src/libipsec/pfkey.c index fae0415..aa15097 100644 --- a/src/libipsec/pfkey.c +++ b/src/libipsec/pfkey.c @@ -1,4 +1,4 @@ -/* $NetBSD: pfkey.c,v 1.13.4.2 2007/10/15 16:05:22 vanhu Exp $ */ +/* $NetBSD: pfkey.c,v 1.13.4.2 2007/10/15 16:05:22 vanhu Exp $ */ /* $KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $ */ @@ -374,11 +374,9 @@ pfkey_get_softrate(type) * -1 : error occured, and set errno. */ int -pfkey_send_getspi(so, satype, mode, src, dst, min, max, reqid, seq) - int so; - u_int satype, mode; - struct sockaddr *src, *dst; - u_int32_t min, max, reqid, seq; +pfkey_send_getspi(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t min, u_int32_t max, u_int32_t reqid, + u_int32_t seq) { struct sadb_msg *newmsg; caddr_t ep; @@ -503,8 +501,7 @@ pfkey_send_getspi(so, satype, mode, src, dst, min, max, reqid, seq) * -1 : error occured, and set errno. */ int -pfkey_send_update2(sa_parms) - struct pfkey_send_sa_args *sa_parms; +pfkey_send_update2(struct pfkey_send_sa_args *sa_parms) { int len; @@ -524,8 +521,7 @@ pfkey_send_update2(sa_parms) * -1 : error occured, and set errno. */ int -pfkey_send_add2(sa_parms) - struct pfkey_send_sa_args *sa_parms; +pfkey_send_add2(struct pfkey_send_sa_args *sa_parms) { int len; @@ -543,11 +539,8 @@ pfkey_send_add2(sa_parms) * -1 : error occured, and set errno. */ int -pfkey_send_delete(so, satype, mode, src, dst, spi) - int so; - u_int satype, mode; - struct sockaddr *src, *dst; - u_int32_t spi; +pfkey_send_delete(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi) { int len; if ((len = pfkey_send_x2(so, SADB_DELETE, satype, mode, src, dst, spi)) < 0) @@ -567,10 +560,8 @@ pfkey_send_delete(so, satype, mode, src, dst, spi) */ /*ARGSUSED*/ int -pfkey_send_delete_all(so, satype, mode, src, dst) - int so; - u_int satype, mode; - struct sockaddr *src, *dst; +pfkey_send_delete_all(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst) { struct sadb_msg *newmsg; int len; @@ -649,11 +640,8 @@ pfkey_send_delete_all(so, satype, mode, src, dst) * -1 : error occured, and set errno. */ int -pfkey_send_get(so, satype, mode, src, dst, spi) - int so; - u_int satype, mode; - struct sockaddr *src, *dst; - u_int32_t spi; +pfkey_send_get(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi) { int len; if ((len = pfkey_send_x2(so, SADB_GET, satype, mode, src, dst, spi)) < 0) @@ -669,9 +657,7 @@ pfkey_send_get(so, satype, mode, src, dst, spi) * -1 : error occured, and set errno. */ int -pfkey_send_register(so, satype) - int so; - u_int satype; +pfkey_send_register(int so, u_int satype) { int len, algno; @@ -711,8 +697,7 @@ pfkey_send_register(so, satype) * -1: error occured, and set errno. */ int -pfkey_recv_register(so) - int so; +pfkey_recv_register(int so) { pid_t pid = getpid(); struct sadb_msg *newmsg; @@ -751,9 +736,7 @@ pfkey_recv_register(so) * -1: error occured, and set errno. */ int -pfkey_set_supported(msg, tlen) - struct sadb_msg *msg; - int tlen; +pfkey_set_supported(struct sadb_msg *msg, int tlen) { struct sadb_supported *sup; caddr_t p; @@ -815,9 +798,7 @@ pfkey_set_supported(msg, tlen) * -1 : error occured, and set errno. */ int -pfkey_send_flush(so, satype) - int so; - u_int satype; +pfkey_send_flush(int so, u_int satype) { int len; @@ -834,9 +815,7 @@ pfkey_send_flush(so, satype) * -1 : error occured, and set errno. */ int -pfkey_send_dump(so, satype) - int so; - u_int satype; +pfkey_send_dump(int so, u_int satype) { int len; @@ -859,9 +838,7 @@ pfkey_send_dump(so, satype) * algorithms is. */ int -pfkey_send_promisc_toggle(so, flag) - int so; - int flag; +pfkey_send_promisc_toggle(int so, int flag) { int len; @@ -879,13 +856,9 @@ pfkey_send_promisc_toggle(so, flag) * -1 : error occured, and set errno. */ int -pfkey_send_spdadd(so, src, prefs, dst, prefd, proto, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spdadd(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy, + int policylen, u_int32_t seq) { int len; @@ -905,15 +878,9 @@ pfkey_send_spdadd(so, src, prefs, dst, prefd, proto, policy, policylen, seq) * -1 : error occured, and set errno. */ int -pfkey_send_spdadd2(so, src, prefs, dst, prefd, proto, ltime, vtime, - policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - u_int64_t ltime, vtime; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spdadd2(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime, + u_int64_t vtime, caddr_t policy, int policylen, u_int32_t seq) { int len; @@ -933,13 +900,9 @@ pfkey_send_spdadd2(so, src, prefs, dst, prefd, proto, ltime, vtime, * -1 : error occured, and set errno. */ int -pfkey_send_spdupdate(so, src, prefs, dst, prefd, proto, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spdupdate(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy, + int policylen, u_int32_t seq) { int len; @@ -959,15 +922,9 @@ pfkey_send_spdupdate(so, src, prefs, dst, prefd, proto, policy, policylen, seq) * -1 : error occured, and set errno. */ int -pfkey_send_spdupdate2(so, src, prefs, dst, prefd, proto, ltime, vtime, - policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - u_int64_t ltime, vtime; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spdupdate2(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime, + u_int64_t vtime, caddr_t policy, int policylen, u_int32_t seq) { int len; @@ -987,13 +944,9 @@ pfkey_send_spdupdate2(so, src, prefs, dst, prefd, proto, ltime, vtime, * -1 : error occured, and set errno. */ int -pfkey_send_spddelete(so, src, prefs, dst, prefd, proto, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spddelete(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy, + int policylen, u_int32_t seq) { int len; @@ -1018,9 +971,7 @@ pfkey_send_spddelete(so, src, prefs, dst, prefd, proto, policy, policylen, seq) * -1 : error occured, and set errno. */ int -pfkey_send_spddelete2(so, spid) - int so; - u_int32_t spid; +pfkey_send_spddelete2(int so, u_int32_t spid) { int len; @@ -1037,9 +988,7 @@ pfkey_send_spddelete2(so, spid) * -1 : error occured, and set errno. */ int -pfkey_send_spdget(so, spid) - int so; - u_int32_t spid; +pfkey_send_spdget(int so, u_int32_t spid) { int len; @@ -1056,13 +1005,9 @@ pfkey_send_spdget(so, spid) * -1 : error occured, and set errno. */ int -pfkey_send_spdsetidx(so, src, prefs, dst, prefd, proto, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_spdsetidx(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, caddr_t policy, + int policylen, u_int32_t seq) { int len; @@ -1087,8 +1032,7 @@ pfkey_send_spdsetidx(so, src, prefs, dst, prefd, proto, policy, policylen, seq) * -1 : error occured, and set errno. */ int -pfkey_send_spdflush(so) - int so; +pfkey_send_spdflush(int so) { int len; @@ -1105,8 +1049,7 @@ pfkey_send_spdflush(so) * -1 : error occured, and set errno. */ int -pfkey_send_spddump(so) - int so; +pfkey_send_spddump(int so) { int len; @@ -1125,13 +1068,9 @@ pfkey_send_spddump(so) * -1 : error occured, and set errno. */ int -pfkey_send_migrate(so, src, prefs, dst, prefd, proto, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int prefs, prefd, proto; - caddr_t policy; - int policylen; - u_int32_t seq; +pfkey_send_migrate(int so, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, + u_int proto, caddr_t policy, int policylen, u_int32_t seq) { struct sadb_msg *newmsg; int len; @@ -1212,8 +1151,7 @@ pfkey_send_migrate(so, src, prefs, dst, prefd, proto, policy, policylen, seq) /* sending SADB_ADD or SADB_UPDATE message to the kernel */ static int -pfkey_send_x1(sa_parms) - struct pfkey_send_sa_args *sa_parms; +pfkey_send_x1(struct pfkey_send_sa_args *sa_parms) { struct sadb_msg *newmsg; int len; @@ -1486,11 +1424,8 @@ pfkey_send_x1(sa_parms) /* sending SADB_DELETE or SADB_GET message to the kernel */ /*ARGSUSED*/ static int -pfkey_send_x2(so, type, satype, mode, src, dst, spi) - int so; - u_int type, satype, mode; - struct sockaddr *src, *dst; - u_int32_t spi; +pfkey_send_x2(int so, u_int type, u_int satype, u_int mode, + struct sockaddr *src, struct sockaddr *dst, u_int32_t spi) { struct sadb_msg *newmsg; int len; @@ -1573,9 +1508,7 @@ pfkey_send_x2(so, type, satype, mode, src, dst, spi) * to the kernel */ static int -pfkey_send_x3(so, type, satype) - int so; - u_int type, satype; +pfkey_send_x3(int so, u_int type, u_int satype) { struct sadb_msg *newmsg; int len; @@ -1635,15 +1568,9 @@ pfkey_send_x3(so, type, satype) /* sending SADB_X_SPDADD message to the kernel */ static int -pfkey_send_x4(so, type, src, prefs, dst, prefd, proto, - ltime, vtime, policy, policylen, seq) - int so; - struct sockaddr *src, *dst; - u_int type, prefs, prefd, proto; - u_int64_t ltime, vtime; - char *policy; - int policylen; - u_int32_t seq; +pfkey_send_x4(int so, u_int type, struct sockaddr *src, u_int prefs, + struct sockaddr *dst, u_int prefd, u_int proto, u_int64_t ltime, + u_int64_t vtime, char *policy, int policylen, u_int32_t seq) { struct sadb_msg *newmsg; int len; @@ -1729,10 +1656,7 @@ pfkey_send_x4(so, type, src, prefs, dst, prefd, proto, /* sending SADB_X_SPDGET or SADB_X_SPDDELETE message to the kernel */ static int -pfkey_send_x5(so, type, spid) - int so; - u_int type; - u_int32_t spid; +pfkey_send_x5(int so, u_int type, u_int32_t spid) { struct sadb_msg *newmsg; struct sadb_x_policy xpl; @@ -1785,7 +1709,7 @@ pfkey_send_x5(so, type, spid) * others : success and return value of socket. */ int -pfkey_open() +pfkey_open(void) { int so; int bufsiz = 128 * 1024; /*is 128K enough?*/ @@ -1818,8 +1742,7 @@ pfkey_open() * -1: fail. */ void -pfkey_close(so) - int so; +pfkey_close(int so) { (void)close(so); @@ -1837,8 +1760,7 @@ pfkey_close(so) * XXX should be rewritten to pass length explicitly */ struct sadb_msg * -pfkey_recv(so) - int so; +pfkey_recv(int so) { struct sadb_msg buf, *newmsg; int len, reallen; @@ -1895,10 +1817,7 @@ pfkey_recv(so) * -1 : fail. */ int -pfkey_send(so, msg, len) - int so; - struct sadb_msg *msg; - int len; +pfkey_send(int so, struct sadb_msg *msg, int len) { if ((len = send(so, (void *)msg, (socklen_t)len, 0)) < 0) { __ipsec_set_strerror(strerror(errno)); @@ -1924,9 +1843,7 @@ pfkey_send(so, msg, len) * XXX should be rewritten to obtain length explicitly */ int -pfkey_align(msg, mhp) - struct sadb_msg *msg; - caddr_t *mhp; +pfkey_align(struct sadb_msg *msg, caddr_t *mhp) { struct sadb_ext *ext; int i; @@ -2035,8 +1952,7 @@ pfkey_align(msg, mhp) * 0: valid. */ int -pfkey_check(mhp) - caddr_t *mhp; +pfkey_check(caddr_t *mhp) { struct sadb_msg *msg; @@ -2159,13 +2075,8 @@ pfkey_check(mhp) * `buf' must has been allocated sufficiently. */ static caddr_t -pfkey_setsadbmsg(buf, lim, type, tlen, satype, seq, pid) - caddr_t buf; - caddr_t lim; - u_int type, satype; - u_int tlen; - u_int32_t seq; - pid_t pid; +pfkey_setsadbmsg(caddr_t buf, caddr_t lim, u_int type, u_int tlen, + u_int satype, u_int32_t seq, pid_t pid) { struct sadb_msg *p; u_int len; @@ -2194,11 +2105,8 @@ pfkey_setsadbmsg(buf, lim, type, tlen, satype, seq, pid) * `buf' must has been allocated sufficiently. */ static caddr_t -pfkey_setsadbsa(buf, lim, spi, wsize, auth, enc, flags) - caddr_t buf; - caddr_t lim; - u_int32_t spi, flags; - u_int wsize, auth, enc; +pfkey_setsadbsa(caddr_t buf, caddr_t lim, u_int32_t spi, u_int wsize, + u_int auth, u_int enc, u_int32_t flags) { struct sadb_sa *p; u_int len; @@ -2228,13 +2136,8 @@ pfkey_setsadbsa(buf, lim, spi, wsize, auth, enc, flags) * prefixlen is in bits. */ static caddr_t -pfkey_setsadbaddr(buf, lim, exttype, saddr, prefixlen, ul_proto) - caddr_t buf; - caddr_t lim; - u_int exttype; - struct sockaddr *saddr; - u_int prefixlen; - u_int ul_proto; +pfkey_setsadbaddr(caddr_t buf, caddr_t lim, u_int exttype, + struct sockaddr *saddr, u_int prefixlen, u_int ul_proto) { struct sadb_address *p; u_int len; @@ -2262,11 +2165,8 @@ pfkey_setsadbaddr(buf, lim, exttype, saddr, prefixlen, ul_proto) * OUT: the pointer of buf + len. */ static caddr_t -pfkey_setsadbkey(buf, lim, type, key, keylen) - caddr_t buf; - caddr_t lim; - caddr_t key; - u_int type, keylen; +pfkey_setsadbkey(caddr_t buf, caddr_t lim, u_int type, caddr_t key, + u_int keylen) { struct sadb_key *p; u_int len; @@ -2293,11 +2193,8 @@ pfkey_setsadbkey(buf, lim, type, key, keylen) * OUT: the pointer of buf + len. */ static caddr_t -pfkey_setsadblifetime(buf, lim, type, l_alloc, l_bytes, l_addtime, l_usetime) - caddr_t buf; - caddr_t lim; - u_int type; - u_int32_t l_alloc, l_bytes, l_addtime, l_usetime; +pfkey_setsadblifetime(caddr_t buf, caddr_t lim, u_int type, u_int32_t l_alloc, + u_int32_t l_bytes, u_int32_t l_addtime, u_int32_t l_usetime) { struct sadb_lifetime *p; u_int len; @@ -2339,11 +2236,7 @@ pfkey_setsadblifetime(buf, lim, type, l_alloc, l_bytes, l_addtime, l_usetime) * `buf' must has been allocated sufficiently. */ static caddr_t -pfkey_setsadbxsa2(buf, lim, mode0, reqid) - caddr_t buf; - caddr_t lim; - u_int32_t mode0; - u_int32_t reqid; +pfkey_setsadbxsa2(caddr_t buf, caddr_t lim, u_int32_t mode0, u_int32_t reqid) { struct sadb_x_sa2 *p; u_int8_t mode = mode0 & 0xff; @@ -2366,11 +2259,7 @@ pfkey_setsadbxsa2(buf, lim, mode0, reqid) #ifdef SADB_X_EXT_NAT_T_TYPE static caddr_t -pfkey_set_natt_type(buf, lim, type, l_natt_type) - caddr_t buf; - caddr_t lim; - u_int type; - u_int8_t l_natt_type; +pfkey_set_natt_type(caddr_t buf, caddr_t lim, u_int type, u_int8_t l_natt_type) { struct sadb_x_nat_t_type *p; u_int len; @@ -2390,11 +2279,7 @@ pfkey_set_natt_type(buf, lim, type, l_natt_type) } static caddr_t -pfkey_set_natt_port(buf, lim, type, l_natt_port) - caddr_t buf; - caddr_t lim; - u_int type; - u_int16_t l_natt_port; +pfkey_set_natt_port(caddr_t buf, caddr_t lim, u_int type, u_int16_t l_natt_port) { struct sadb_x_nat_t_port *p; u_int len; @@ -2416,11 +2301,8 @@ pfkey_set_natt_port(buf, lim, type, l_natt_port) #ifdef SADB_X_EXT_NAT_T_FRAG static caddr_t -pfkey_set_natt_frag(buf, lim, type, l_natt_frag) - caddr_t buf; - caddr_t lim; - u_int type; - u_int16_t l_natt_frag; +pfkey_set_natt_frag(caddr_t buf, caddr_t lim, u_int type, + u_int16_t l_natt_frag) { struct sadb_x_nat_t_frag *p; u_int len; @@ -2442,13 +2324,8 @@ pfkey_set_natt_frag(buf, lim, type, l_natt_frag) #ifdef SADB_X_EXT_SEC_CTX static caddr_t -pfkey_setsecctx(buf, lim, type, ctx_doi, ctx_alg, sec_ctx, sec_ctxlen) - caddr_t buf; - caddr_t lim; - u_int type; - u_int8_t ctx_doi, ctx_alg; - caddr_t sec_ctx; - u_int16_t sec_ctxlen; +pfkey_setsecctx(caddr_t buf, caddr_t lim, u_int type, u_int8_t ctx_doi, + u_int8_t ctx_alg, caddr_t sec_ctx, u_int16_t sec_ctxlen) { struct sadb_x_sec_ctx *p; u_int len; @@ -2477,18 +2354,11 @@ pfkey_setsecctx(buf, lim, type, ctx_doi, ctx_alg, sec_ctx, sec_ctxlen) * libipsec users. Please use pfkey_send_update2 and pfkey_send_add2 instead */ int -pfkey_send_update(so, satype, mode, src, dst, spi, reqid, wsize, - keymat, e_type, e_keylen, a_type, a_keylen, flags, - l_alloc, l_bytes, l_addtime, l_usetime, seq) - int so; - u_int satype, mode, wsize; - struct sockaddr *src, *dst; - u_int32_t spi, reqid; - caddr_t keymat; - u_int e_type, e_keylen, a_type, a_keylen, flags; - u_int32_t l_alloc; - u_int64_t l_bytes, l_addtime, l_usetime; - u_int32_t seq; +pfkey_send_update(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize, + caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, + u_int a_keylen, u_int flags, u_int32_t l_alloc, u_int64_t l_bytes, + u_int64_t l_addtime, u_int64_t l_usetime, u_int32_t seq) { struct pfkey_send_sa_args psaa; @@ -2518,24 +2388,13 @@ pfkey_send_update(so, satype, mode, src, dst, spi, reqid, wsize, } int -pfkey_send_update_nat(so, satype, mode, src, dst, spi, reqid, wsize, - keymat, e_type, e_keylen, a_type, a_keylen, flags, - l_alloc, l_bytes, l_addtime, l_usetime, seq, - l_natt_type, l_natt_sport, l_natt_dport, l_natt_oa, - l_natt_frag) - int so; - u_int satype, mode, wsize; - struct sockaddr *src, *dst; - u_int32_t spi, reqid; - caddr_t keymat; - u_int e_type, e_keylen, a_type, a_keylen, flags; - u_int32_t l_alloc; - u_int64_t l_bytes, l_addtime, l_usetime; - u_int32_t seq; - u_int8_t l_natt_type; - u_int16_t l_natt_sport, l_natt_dport; - struct sockaddr *l_natt_oa; - u_int16_t l_natt_frag; +pfkey_send_update_nat(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize, + caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, + u_int a_keylen, u_int flags, u_int32_t l_alloc, u_int64_t l_bytes, + u_int64_t l_addtime, u_int64_t l_usetime, u_int32_t seq, + u_int8_t l_natt_type, u_int16_t l_natt_sport, u_int16_t l_natt_dport, + struct sockaddr *l_natt_oa, u_int16_t l_natt_frag) { struct pfkey_send_sa_args psaa; @@ -2570,18 +2429,11 @@ pfkey_send_update_nat(so, satype, mode, src, dst, spi, reqid, wsize, } int -pfkey_send_add(so, satype, mode, src, dst, spi, reqid, wsize, - keymat, e_type, e_keylen, a_type, a_keylen, flags, - l_alloc, l_bytes, l_addtime, l_usetime, seq) - int so; - u_int satype, mode, wsize; - struct sockaddr *src, *dst; - u_int32_t spi, reqid; - caddr_t keymat; - u_int e_type, e_keylen, a_type, a_keylen, flags; - u_int32_t l_alloc; - u_int64_t l_bytes, l_addtime, l_usetime; - u_int32_t seq; +pfkey_send_add(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize, + caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, + u_int a_keylen, u_int flags, u_int32_t l_alloc, u_int64_t l_bytes, + u_int64_t l_addtime, u_int64_t l_usetime, u_int32_t seq) { struct pfkey_send_sa_args psaa; @@ -2611,24 +2463,13 @@ pfkey_send_add(so, satype, mode, src, dst, spi, reqid, wsize, } int -pfkey_send_add_nat(so, satype, mode, src, dst, spi, reqid, wsize, - keymat, e_type, e_keylen, a_type, a_keylen, flags, - l_alloc, l_bytes, l_addtime, l_usetime, seq, - l_natt_type, l_natt_sport, l_natt_dport, l_natt_oa, - l_natt_frag) - int so; - u_int satype, mode, wsize; - struct sockaddr *src, *dst; - u_int32_t spi, reqid; - caddr_t keymat; - u_int e_type, e_keylen, a_type, a_keylen, flags; - u_int32_t l_alloc; - u_int64_t l_bytes, l_addtime, l_usetime; - u_int32_t seq; - u_int8_t l_natt_type; - u_int16_t l_natt_sport, l_natt_dport; - struct sockaddr *l_natt_oa; - u_int16_t l_natt_frag; +pfkey_send_add_nat(int so, u_int satype, u_int mode, struct sockaddr *src, + struct sockaddr *dst, u_int32_t spi, u_int32_t reqid, u_int wsize, + caddr_t keymat, u_int e_type, u_int e_keylen, u_int a_type, + u_int a_keylen, u_int flags, u_int32_t l_alloc, u_int64_t l_bytes, + u_int64_t l_addtime, u_int64_t l_usetime, u_int32_t seq, + u_int8_t l_natt_type, u_int16_t l_natt_sport, u_int16_t l_natt_dport, + struct sockaddr *l_natt_oa, u_int16_t l_natt_frag) { struct pfkey_send_sa_args psaa; diff --git a/src/racoon/isakmp.c b/src/racoon/isakmp.c index 3316ebb..d0f6cbd 100644 --- a/src/racoon/isakmp.c +++ b/src/racoon/isakmp.c @@ -1114,10 +1114,8 @@ isakmp_ph1begin_i(rmconf, remote, local) /* new negotiation of phase 1 for responder */ static int -isakmp_ph1begin_r(msg, remote, local, etype) - vchar_t *msg; - struct sockaddr *remote, *local; - u_int8_t etype; +isakmp_ph1begin_r(vchar_t *msg, struct sockaddr *remote, + struct sockaddr *local, u_int8_t etype) { struct isakmp *isakmp = (struct isakmp *)msg->v; struct remoteconf *rmconf; diff --git a/src/racoon/remoteconf.c b/src/racoon/remoteconf.c index c9c803f..3b96f30 100644 --- a/src/racoon/remoteconf.c +++ b/src/racoon/remoteconf.c @@ -417,9 +417,7 @@ save_rmconf_flush() /* check exchange type to be acceptable */ struct etypes * -check_etypeok(rmconf, etype) - struct remoteconf *rmconf; - u_int8_t etype; +check_etypeok( struct remoteconf *rmconf, u_int8_t etype) { struct etypes *e; |