kernels/linux-2.4.0/net/decnet/dn_nsp_in.c
/*
 * disc_conf messages are also called no_resources or no_link
 * messages depending upon the "reason" field.
 */
disc_conf messages are also called no_resources or no_link
messages depending upon the "reason" field.
disc_conf messages are also called no_resources or no_link messages depending upon the " reason " field .
static void dn_nsp_disc_conf(struct sock *sk, struct sk_buff *skb)
{
	struct dn_scp *scp = &sk->protinfo.dn;
	unsigned short reason;
	if (skb->len != 2)
		goto out;
	reason = dn_ntohs(*(__u16 *)skb->data);
	sk->state = TCP_CLOSE;
	switch(scp->state) {
		case DN_CI:
			scp->state = DN_NR;
			break;
		case DN_DR:
			if (reason == NSP_REASON_DC)
				scp->state = DN_DRC;
			if (reason == NSP_REASON_NL)
				scp->state = DN_CN;
			break;
		case DN_DI:
			scp->state = DN_DIC;
			break;
		case DN_RUN:
			sk->shutdown |= SHUTDOWN_MASK;
		case DN_CC:
			scp->state = DN_CN;
	}
	if (!sk->dead) {
		if (sk->socket->state != SS_UNCONNECTED)
			sk->socket->state = SS_DISCONNECTING;
		sk->state_change(sk);
	}
	scp->persist_fxn = dn_destroy_timer;
	scp->persist = dn_nsp_persist(sk);
out:
	kfree_skb(skb);
}
static void dn_nsp_disc_conf ( struct sock * sk , struct sk_buff * skb ) { struct dn_scp * scp = & sk -> protinfo . dn ; unsigned short reason ; if ( skb -> len != 2 ) goto out ; reason = dn_ntohs ( * ( __u16 * ) skb -> data ) ; sk -> state = TCP_CLOSE ; switch ( scp -> state ) { case DN_CI : scp -> state = DN_NR ; break ; case DN_DR : if ( reason == NSP_REASON_DC ) scp -> state = DN_DRC ; if ( reason == NSP_REASON_NL ) scp -> state = DN_CN ; break ; case DN_DI : scp -> state = DN_DIC ; break ; case DN_RUN : sk -> shutdown |= SHUTDOWN_MASK ; case DN_CC : scp -> state = DN_CN ; } if ( ! sk -> dead ) { if ( sk -> socket -> state != SS_UNCONNECTED ) sk -> socket -> state = SS_DISCONNECTING ; sk -> state_change ( sk ) ; } scp -> persist_fxn = dn_destroy_timer ; scp -> persist = dn_nsp_persist ( sk ) ; out : kfree_skb ( skb ) ; }
disc_conf messages are also called no_resources or no_link
 messages depending upon the "reason" field.
disc_conf messages are also called no_resources or no_link messages depending upon the " reason " field .