/* * SWL and AWL are initially adjusted so that they are not less than * the initial Sequence Numbers received and sent, respectively: *	SWL := max(GSR + 1 - floor(W/4), ISR), *	AWL := max(GSS - W' + 1, ISS). * These adjustments MUST be applied only at the beginning of the * connection. */ dccp_set_seqno(&newdp->dccps_swl, max48(newdp->dccps_swl, newdp->dccps_isr)); dccp_set_seqno(&newdp->dccps_awl, max48(newdp->dccps_awl, newdp->dccps_iss));  
struct sock *dccp_create_openreq_child(struct sock *sk,				       const struct request_sock *req,				       const struct sk_buff *skb){	/*	 * Step 3: Process LISTEN state	 *	 * // Generate a new socket and switch to that socket	 * Set S := new socket for this port pair	 */	struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC);	if (newsk != NULL) {		const struct dccp_request_sock *dreq = dccp_rsk(req);		struct inet_connection_sock *newicsk = inet_csk(sk);		struct dccp_sock *newdp = dccp_sk(newsk);		newdp->dccps_hc_rx_ackpkts = NULL;		newdp->dccps_role = DCCP_ROLE_SERVER;		newicsk->icsk_rto = DCCP_TIMEOUT_INIT;		if (newdp->dccps_options.dccpo_send_ack_vector) {			newdp->dccps_hc_rx_ackpkts =				dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN,						   GFP_ATOMIC);			/*			 * XXX: We're using the same CCIDs set on the parent,			 * i.e. sk_clone copied the master sock and left the			 * CCID pointers for this child, that is why we do the			 * __ccid_get calls.			 */			if (unlikely(newdp->dccps_hc_rx_ackpkts == NULL))				goto out_free;		}		if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid,					     newsk) != 0 ||			     ccid_hc_tx_init(newdp->dccps_hc_tx_ccid,				     	     newsk) != 0)) {			dccp_ackpkts_free(newdp->dccps_hc_rx_ackpkts);			ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk);			ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk);out_free:			/* It is still raw copy of parent, so invalidate			 * destructor and make plain sk_free() */			newsk->sk_destruct = NULL;			sk_free(newsk);			return NULL;		}		__ccid_get(newdp->dccps_hc_rx_ccid);		__ccid_get(newdp->dccps_hc_tx_ccid);		/*		 * Step 3: Process LISTEN state		 *		 *	Choose S.ISS (initial seqno) or set from Init Cookie		 *	Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init		 *	Cookie		 */		/* See dccp_v4_conn_request */		newdp->dccps_options.dccpo_sequence_window = req->rcv_wnd;		newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr;		dccp_update_gsr(newsk, dreq->dreq_isr);		newdp->dccps_iss = dreq->dreq_iss;		dccp_update_gss(newsk, dreq->dreq_iss);		dccp_init_xmit_timers(newsk);		DCCP_INC_STATS_BH(DCCP_MIB_PASSIVEOPENS);	}	return newsk;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/03ace394ac9bcad38043a381ae5f4860b9c9fa1c/minisocks.c/clean/net/dccp/minisocks.c