 dcb->dccpd_seq = dp->dccps_gss; dccp_insert_options(sk, skb); 
int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb){	if (likely(skb != NULL)) {		const struct inet_sock *inet = inet_sk(sk);		struct dccp_sock *dp = dccp_sk(sk);		struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);		struct dccp_hdr *dh;		/* XXX For now we're using only 48 bits sequence numbers */		const int dccp_header_size = sizeof(*dh) +					     sizeof(struct dccp_hdr_ext) +					  dccp_packet_hdr_len(dcb->dccpd_type);		int err, set_ack = 1;		u64 ackno = dp->dccps_gsr;		/*		 * FIXME: study DCCP_PKT_SYNC[ACK] to see what is the right		 * thing to do here...		 */		dccp_inc_seqno(&dp->dccps_gss);		dcb->dccpd_seq = dp->dccps_gss;		dccp_insert_options(sk, skb);		switch (dcb->dccpd_type) {		case DCCP_PKT_DATA:			set_ack = 0;			break;		case DCCP_PKT_SYNC:		case DCCP_PKT_SYNCACK:			ackno = dcb->dccpd_seq;			break;		}				skb->h.raw = skb_push(skb, dccp_header_size);		dh = dccp_hdr(skb);		/*		 * Data packets are not cloned as they are never retransmitted		 */		if (skb_cloned(skb))			skb_set_owner_w(skb, sk);		/* Build DCCP header and checksum it. */		memset(dh, 0, dccp_header_size);		dh->dccph_type	= dcb->dccpd_type;		dh->dccph_sport	= inet->sport;		dh->dccph_dport	= inet->dport;		dh->dccph_doff	= (dccp_header_size + dcb->dccpd_opt_len) / 4;		dh->dccph_ccval	= dcb->dccpd_ccval;		/* XXX For now we're using only 48 bits sequence numbers */		dh->dccph_x	= 1;		dp->dccps_awh = dp->dccps_gss;		dccp_hdr_set_seq(dh, dp->dccps_gss);		if (set_ack)			dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), ackno);		switch (dcb->dccpd_type) {		case DCCP_PKT_REQUEST:			dccp_hdr_request(skb)->dccph_req_service =							dcb->dccpd_service;			break;		case DCCP_PKT_RESET:			dccp_hdr_reset(skb)->dccph_reset_code =							dcb->dccpd_reset_code;			break;		}		dh->dccph_checksum = dccp_v4_checksum(skb, inet->saddr,						      inet->daddr);		if (dcb->dccpd_type == DCCP_PKT_ACK ||		    dcb->dccpd_type == DCCP_PKT_DATAACK)			dccp_event_ack_sent(sk);		DCCP_INC_STATS(DCCP_MIB_OUTSEGS);		err = ip_queue_xmit(skb, 0);		if (err <= 0)			return err;		/* NET_XMIT_CN is special. It does not guarantee,		 * that this packet is lost. It tells that device		 * is about to start to drop packets or already		 * drops some packets of the same priority and		 * invokes us to send less aggressively.		 */		return err == NET_XMIT_CN ? 0 : err;	}	return -ENOBUFS;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/24117727b753426d85ba09671c24854834f81b2c/output.c/buggy/net/dccp/output.c