From ef3d51cb652f1f438b01dca29e018e458a1f3274 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 12 Jun 2008 15:08:48 +0000 Subject: ANSIfy function definitions. ok markus@ mcbride@ henning@ deraadt@ --- sys/netinet/tcp_input.c | 107 ++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 81 deletions(-) (limited to 'sys/netinet/tcp_input.c') diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1caaf2ad3a4..7ede91d45e3 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.216 2008/06/12 14:50:20 jsing Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.217 2008/06/12 15:08:47 jsing Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -188,11 +188,7 @@ do { \ */ int -tcp_reass(tp, th, m, tlen) - struct tcpcb *tp; - struct tcphdr *th; - struct mbuf *m; - int *tlen; +tcp_reass(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m, int *tlen) { struct tcpqent *p, *q, *nq, *tiqe; struct socket *so = tp->t_inpcb->inp_socket; @@ -325,9 +321,7 @@ present: #ifdef INET6 int -tcp6_input(mp, offp, proto) - struct mbuf **mp; - int *offp, proto; +tcp6_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; @@ -2237,14 +2231,8 @@ drop: } int -tcp_dooptions(tp, cp, cnt, th, m, iphlen, oi) - struct tcpcb *tp; - u_char *cp; - int cnt; - struct tcphdr *th; - struct mbuf *m; - int iphlen; - struct tcp_opt_info *oi; +tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th, + struct mbuf *m, int iphlen, struct tcp_opt_info *oi) { u_int16_t mss = 0; int opt, optlen; @@ -2417,8 +2405,7 @@ tcp_dooptions(tp, cp, cnt, th, m, iphlen, oi) #if defined(TCP_SACK) u_long -tcp_seq_subtract(a, b) - u_long a, b; +tcp_seq_subtract(u_long a, u_long b) { return ((long)(a - b)); } @@ -2754,9 +2741,7 @@ done: * tcp_dooptions(), will fix up the hole. */ void -tcp_del_sackholes(tp, th) - struct tcpcb *tp; - struct tcphdr *th; +tcp_del_sackholes(struct tcpcb *tp, struct tcphdr *th) { if (tp->sack_enable && tp->t_state != TCPS_LISTEN) { /* max because this could be an older ack just arrived */ @@ -2785,8 +2770,7 @@ tcp_del_sackholes(tp, th) * Delete all receiver-side SACK information. */ void -tcp_clean_sackreport(tp) - struct tcpcb *tp; +tcp_clean_sackreport(struct tcpcb *tp) { int i; @@ -2802,9 +2786,7 @@ tcp_clean_sackreport(tp) * If the ack advances at least to tp->snd_last, return 0. */ int -tcp_sack_partialack(tp, th) - struct tcpcb *tp; - struct tcphdr *th; +tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) { if (SEQ_LT(th->th_ack, tp->snd_last)) { /* Turn off retx. timer (will start again next segment) */ @@ -2835,11 +2817,7 @@ tcp_sack_partialack(tp, th) * sequencing purposes. */ void -tcp_pulloutofband(so, urgent, m, off) - struct socket *so; - u_int urgent; - struct mbuf *m; - int off; +tcp_pulloutofband(struct socket *so, u_int urgent, struct mbuf *m, int off) { int cnt = off + urgent - 1; @@ -2867,9 +2845,7 @@ tcp_pulloutofband(so, urgent, m, off) * and update averages and current timeout. */ void -tcp_xmit_timer(tp, rtt) - struct tcpcb *tp; - int rtt; +tcp_xmit_timer(struct tcpcb *tp, int rtt) { short delta; short rttmin; @@ -2971,9 +2947,7 @@ tcp_xmit_timer(tp, rtt) * Path MTU discovery. */ int -tcp_mss(tp, offer) - struct tcpcb *tp; - int offer; +tcp_mss(struct tcpcb *tp, int offer) { struct rtentry *rt; struct ifnet *ifp; @@ -3170,8 +3144,7 @@ tcp_hdrsz(struct tcpcb *tp) * before this routine is called! */ void -tcp_mss_update(tp) - struct tcpcb *tp; +tcp_mss_update(struct tcpcb *tp) { int mss; u_long bufsize; @@ -3216,9 +3189,7 @@ tcp_mss_update(tp) * be started again. If the ack advances at least to tp->snd_last, return 0. */ int -tcp_newreno(tp, th) - struct tcpcb *tp; - struct tcphdr *th; +tcp_newreno(struct tcpcb *tp, struct tcphdr *th) { if (SEQ_LT(th->th_ack, tp->snd_last)) { /* @@ -3379,9 +3350,7 @@ syn_cache_init() } void -syn_cache_insert(sc, tp) - struct syn_cache *sc; - struct tcpcb *tp; +syn_cache_insert(struct syn_cache *sc, struct tcpcb *tp) { struct syn_cache_head *scp; struct syn_cache *sc2; @@ -3543,8 +3512,7 @@ syn_cache_reaper(void *arg) * (if there's no tcb entry, syn cache entry will never be used) */ void -syn_cache_cleanup(tp) - struct tcpcb *tp; +syn_cache_cleanup(struct tcpcb *tp) { struct syn_cache *sc, *nsc; int s; @@ -3571,10 +3539,8 @@ syn_cache_cleanup(tp) * Find an entry in the syn cache. */ struct syn_cache * -syn_cache_lookup(src, dst, headp) - struct sockaddr *src; - struct sockaddr *dst; - struct syn_cache_head **headp; +syn_cache_lookup(struct sockaddr *src, struct sockaddr *dst, + struct syn_cache_head **headp) { struct syn_cache *sc; struct syn_cache_head *scp; @@ -3624,13 +3590,8 @@ syn_cache_lookup(src, dst, headp) * associated with the connection. */ struct socket * -syn_cache_get(src, dst, th, hlen, tlen, so, m) - struct sockaddr *src; - struct sockaddr *dst; - struct tcphdr *th; - unsigned int hlen, tlen; - struct socket *so; - struct mbuf *m; +syn_cache_get(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, + u_int hlen, u_int tlen, struct socket *so, struct mbuf *m) { struct syn_cache *sc; struct syn_cache_head *scp; @@ -3874,10 +3835,7 @@ abort: */ void -syn_cache_reset(src, dst, th) - struct sockaddr *src; - struct sockaddr *dst; - struct tcphdr *th; +syn_cache_reset(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th) { struct syn_cache *sc; struct syn_cache_head *scp; @@ -3899,10 +3857,7 @@ syn_cache_reset(src, dst, th) } void -syn_cache_unreach(src, dst, th) - struct sockaddr *src; - struct sockaddr *dst; - struct tcphdr *th; +syn_cache_unreach(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th) { struct syn_cache *sc; struct syn_cache_head *scp; @@ -3954,17 +3909,9 @@ syn_cache_unreach(src, dst, th) */ int -syn_cache_add(src, dst, th, iphlen, so, m, optp, optlen, oi, issp) - struct sockaddr *src; - struct sockaddr *dst; - struct tcphdr *th; - unsigned int iphlen; - struct socket *so; - struct mbuf *m; - u_char *optp; - int optlen; - struct tcp_opt_info *oi; - tcp_seq *issp; +syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, + u_int iphlen, struct socket *so, struct mbuf *m, u_char *optp, int optlen, + struct tcp_opt_info *oi, tcp_seq *issp) { struct tcpcb tb, *tp; long win; @@ -4119,9 +4066,7 @@ syn_cache_add(src, dst, th, iphlen, so, m, optp, optlen, oi, issp) } int -syn_cache_respond(sc, m) - struct syn_cache *sc; - struct mbuf *m; +syn_cache_respond(struct syn_cache *sc, struct mbuf *m) { struct route *ro; u_int8_t *optp; -- cgit v1.2.3