if (assocparams.sasoc_assoc_id != 0) { 
if (asoc) { 
static int sctp_getsockopt_associnfo(struct sock *sk, int len,				     char __user *optval,				     int __user *optlen){	struct sctp_assocparams assocparams;	struct sctp_association *asoc;	struct list_head *pos;	int cnt = 0;	if (len != sizeof (struct sctp_assocparams))		return -EINVAL;	if (copy_from_user(&assocparams, optval,			sizeof (struct sctp_assocparams)))		return -EFAULT;	asoc = sctp_id2assoc(sk, assocparams.sasoc_assoc_id);	if (!asoc && assocparams.sasoc_assoc_id && sctp_style(sk, UDP))		return -EINVAL;	/* Values correspoinding to the specific association */	if (assocparams.sasoc_assoc_id != 0) {		assocparams.sasoc_asocmaxrxt = asoc->max_retrans;		assocparams.sasoc_peer_rwnd = asoc->peer.rwnd;		assocparams.sasoc_local_rwnd = asoc->a_rwnd;		assocparams.sasoc_cookie_life = (asoc->cookie_life.tv_sec						* 1000) +						(asoc->cookie_life.tv_usec						/ 1000);		list_for_each(pos, &asoc->peer.transport_addr_list) {			cnt ++;		}		assocparams.sasoc_number_peer_destinations = cnt;	} else {		/* Values corresponding to the endpoint */		struct sctp_sock *sp = sctp_sk(sk);		assocparams.sasoc_asocmaxrxt = sp->assocparams.sasoc_asocmaxrxt;		assocparams.sasoc_peer_rwnd = sp->assocparams.sasoc_peer_rwnd;		assocparams.sasoc_local_rwnd = sp->assocparams.sasoc_local_rwnd;		assocparams.sasoc_cookie_life =					sp->assocparams.sasoc_cookie_life;		assocparams.sasoc_number_peer_destinations =					sp->assocparams.					sasoc_number_peer_destinations;	}	if (put_user(len, optlen))		return -EFAULT;	if (copy_to_user(optval, &assocparams, len))		return -EFAULT;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/173372162ddbd414cc471c1a3a52ad7ea279aaf4/socket.c/clean/net/sctp/socket.c