taglinefilesource code
sk114drivers/net/de600.cstatic unsigned long de600_rspace(struct sock *sk);
sk476drivers/net/de600.cif (skb->sk && (skb->sk->protocol == IPPROTO_TCP) &&
sk477drivers/net/de600.c(skb->sk->prot->rspace != &de600_rspace))
sk478drivers/net/de600.cskb->sk->prot->rspace = de600_rspace; /* Ugh! */
sk807drivers/net/de600.cde600_rspace(struct sock *sk)
sk811drivers/net/de600.cif (sk != NULL) {
sk818drivers/net/de600.cif (sk->rmem_alloc >= sk->rcvbuf-2*DE600_MIN_WINDOW) return(0);
sk819drivers/net/de600.camt = min((sk->rcvbuf-sk->rmem_alloc)/2/*-DE600_MIN_WINDOW*/, DE600_MAX_WINDOW);
sk85drivers/net/loopback.celse if(skb->sk)
sk93drivers/net/loopback.cskb->sk->wmem_alloc-=skb->truesize;
sk94drivers/net/loopback.cskb->sk->write_space(skb->sk);
sk64fs/smbfs/sock.csmb_data_callback(struct sock *sk,int len)
sk66fs/smbfs/sock.cstruct socket *sock = sk->socket;
sk68fs/smbfs/sock.cif(!sk->dead)
sk101fs/smbfs/sock.cwake_up_interruptible(sk->sleep);
sk112fs/smbfs/sock.cstruct sock   *sk;
sk132fs/smbfs/sock.csk   = (struct sock *)(sock->data);
sk134fs/smbfs/sock.cif (sk == NULL) {
sk141fs/smbfs/sock.c(unsigned int)(sk->data_ready),
sk144fs/smbfs/sock.cif (sk->data_ready == smb_data_callback) {
sk149fs/smbfs/sock.cserver->data_ready = sk->data_ready;
sk150fs/smbfs/sock.csk->data_ready = smb_data_callback;
sk160fs/smbfs/sock.cstruct sock   *sk;
sk179fs/smbfs/sock.csk   = (struct sock *)(sock->data);
sk181fs/smbfs/sock.cif (sk == NULL) {
sk192fs/smbfs/sock.cif (sk->data_ready != smb_data_callback) {
sk199fs/smbfs/sock.c(unsigned int)(sk->data_ready),
sk202fs/smbfs/sock.csk->data_ready = server->data_ready;
sk37include/linux/etherdevice.hextern void     eth_header_cache(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr);
sk90include/linux/igmp.hextern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
sk91include/linux/igmp.hextern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
sk92include/linux/igmp.hextern void ip_mc_drop_socket(struct sock *sk);
sk122include/linux/mroute.hextern int ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg);
sk123include/linux/mroute.hextern void mroute_close(struct sock *sk);
sk170include/linux/netdevice.hvoid        (*header_cache)(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr);
sk47include/linux/skbuff.hstruct sock      *sk;      /* Socket we are owned by       */
sk365include/linux/skbuff.hextern struct sk_buff *    skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
sk366include/linux/skbuff.hextern int      datagram_select(struct sock *sk, int sel_type, select_table *wait);
sk159include/net/ax25.hstruct sock    *sk;    /* Backlink to socket */
sk32include/net/icmp.hextern int  icmp_ioctl(struct sock *sk, int cmd,
sk85include/net/ip.hextern int    ip_ioctl(struct sock *sk, int cmd, unsigned long arg);
sk102include/net/ip.hextern void    ip_queue_xmit(struct sock *sk,
sk106include/net/ip.hextern int    ip_build_xmit(struct sock *sk,
sk128include/net/ip.hvoid ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag);
sk149include/net/ip.hextern int     ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen);
sk150include/net/ip.hextern int     ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen);
sk63include/net/netrom.hstruct sock    *sk;    /* Backlink to socket */
sk26include/net/raw.hextern int  raw_recvfrom(struct sock *sk, unsigned char *to,
sk29include/net/raw.hextern int  raw_read(struct sock *sk, unsigned char *buff,
sk270include/net/sock.hvoid      (*state_change)(struct sock *sk);
sk271include/net/sock.hvoid      (*data_ready)(struct sock *sk,int bytes);
sk272include/net/sock.hvoid      (*write_space)(struct sock *sk);
sk273include/net/sock.hvoid      (*error_report)(struct sock *sk);
sk283include/net/sock.hvoid      (*close)(struct sock *sk, int timeout);
sk290include/net/sock.hint      (*connect)(struct sock *sk,
sk292include/net/sock.hstruct sock *    (*accept) (struct sock *sk, int flags);
sk293include/net/sock.hvoid      (*queue_xmit)(struct sock *sk,
sk296include/net/sock.hvoid      (*retransmit)(struct sock *sk, int all);
sk297include/net/sock.hvoid      (*write_wakeup)(struct sock *sk);
sk298include/net/sock.hvoid      (*read_wakeup)(struct sock *sk);
sk303include/net/sock.hint      (*select)(struct sock *sk, int which,
sk305include/net/sock.hint      (*ioctl)(struct sock *sk, int cmd,
sk307include/net/sock.hint      (*init)(struct sock *sk);
sk308include/net/sock.hvoid      (*shutdown)(struct sock *sk, int how);
sk309include/net/sock.hint      (*setsockopt)(struct sock *sk, int level, int optname,
sk311include/net/sock.hint      (*getsockopt)(struct sock *sk, int level, int optname,
sk313include/net/sock.hint      (*sendmsg)(struct sock *sk, struct msghdr *msg, int len,
sk315include/net/sock.hint      (*recvmsg)(struct sock *sk, struct msghdr *msg, int len,
sk317include/net/sock.hint      (*bind)(struct sock *sk, struct sockaddr *uaddr, int addr_len);
sk349include/net/sock.hextern void      destroy_sock(struct sock *sk);
sk353include/net/sock.hextern void      release_sock(struct sock *sk);
sk363include/net/sock.hextern struct sk_buff    *sock_wmalloc(struct sock *sk,
sk366include/net/sock.hextern struct sk_buff    *sock_rmalloc(struct sock *sk,
sk369include/net/sock.hextern void      sock_wfree(struct sock *sk,
sk371include/net/sock.hextern void      sock_rfree(struct sock *sk,
sk373include/net/sock.hextern unsigned long    sock_rspace(struct sock *sk);
sk374include/net/sock.hextern unsigned long    sock_wspace(struct sock *sk);
sk376include/net/sock.hextern int      sock_setsockopt(struct sock *sk, int level,
sk380include/net/sock.hextern int      sock_getsockopt(struct sock *sk, int level,
sk398include/net/sock.hextern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
sk401include/net/sock.hif(sk->rmem_alloc + skb->truesize >= sk->rcvbuf)
sk405include/net/sock.hsk->rmem_alloc+=skb->truesize;
sk406include/net/sock.hskb->sk=sk;
sk408include/net/sock.hskb_queue_tail(&sk->receive_queue,skb);
sk409include/net/sock.hif(!sk->dead)
sk410include/net/sock.hsk->data_ready(sk,skb->len);
sk418include/net/sock.hextern __inline__ int sock_error(struct sock *sk)
sk420include/net/sock.hint err=xchg(&sk->err,0);
sk128include/net/tcp.hextern void  tcp_shutdown (struct sock *sk, int how);
sk134include/net/tcp.hextern int  tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
sk136include/net/tcp.hextern int tcp_select_window(struct sock *sk);
sk138include/net/tcp.hunsigned long daddr, int len, struct sock *sk);
sk139include/net/tcp.hextern void tcp_send_probe0(struct sock *sk);
sk37include/net/udp.h__u32 daddr, int len, struct sock *sk);
sk38include/net/udp.hextern int  udp_recvfrom(struct sock *sk, unsigned char *to,
sk41include/net/udp.hextern int  udp_read(struct sock *sk, unsigned char *buff,
sk43include/net/udp.hextern int  udp_connect(struct sock *sk,
sk49include/net/udp.hextern int  udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
sk6net/802/llc.cint llc_rx_adm(struct sock *sk,struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk11net/802/llc.csend_response(sk,DM|pf);
sk14net/802/llc.cif(sk->state!=TCP_LISTEN)
sk15net/802/llc.csend_response(sk. DM|pf);
sk18net/802/llc.csk=ll_rx_accept(sk);
sk19net/802/llc.cif(sk!=NULL)
sk21net/802/llc.csend_response(sk, UA|pf);
sk22net/802/llc.csk->llc.vs=0;
sk23net/802/llc.csk->llc.vr=0;
sk24net/802/llc.csk->llc.p_flag=0;
sk25net/802/llc.csk->llc.remote_busy=0;
sk26net/802/llc.cllc_state(sk,LLC_NORMAL);
sk31net/802/llc.csend_response(sk, DM|PF);
sk36net/802/llc.cint llc_rx_setup(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk42net/802/llc.csk->llc.vs=0;
sk43net/802/llc.csk->llc.vr=0;
sk44net/802/llc.csend_response(sk, UA|pf);
sk48net/802/llc.csend_response(sk, DM|pf);
sk49net/802/llc.cllc_error(sk,ECONNRESET);
sk50net/802/llc.cllc_state(sk, LLC_ADM);
sk55net/802/llc.cif(cmd==UA && pf==sk->llc.p_flag)
sk57net/802/llc.cdel_timer(&sk->llc.t1);
sk58net/802/llc.csk->llc.vs=0;
sk59net/802/llc.cllc_update_p_flag(sk,pf);
sk60net/802/llc.cllc_state(sk,LLC_NORMAL);
sk64net/802/llc.cllc_error(sk, ECONNRESET);
sk65net/802/llc.cllc_state(sk, LLC_ADM);
sk70net/802/llc.cint llc_rx_reset(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk76net/802/llc.csk->llc.vr=0;
sk77net/802/llc.csk->llc.vs=0;
sk78net/802/llc.csend_response(sk, UA|pf);
sk82net/802/llc.cif(sk->llc.cause_flag==1)
sk83net/802/llc.cllc_shutdown(sk,SHUTDOWN_MASK);
sk85net/802/llc.cllc_eror(sk, ECONNREFUSED);
sk86net/802/llc.csend_response(sk, DM|pf);
sk87net/802/llc.cllc_state(sk, LLC_ADM);
sk94net/802/llc.cif(sk->llc.p_flag==pf)
sk96net/802/llc.cdel_timer(&sk->llc.t1);
sk97net/802/llc.csk->llc.vs=0;
sk98net/802/llc.csk->llc.vr=0;
sk99net/802/llc.cllc_update_p_flag(sk,pf);
sk100net/802/llc.cllc_confirm_reset(sk, sk->llc.cause_flag);
sk101net/802/llc.csk->llc.remote_busy=0;
sk102net/802/llc.cllc_state(sk, LLC_NORMAL);
sk107net/802/llc.cllc_shutdown(sk, SHUTDOWN_MASK);
sk108net/802/llc.cllc_state(sk, LLC_ADM);
sk114net/802/llc.cint llc_rx_d_conn(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk120net/802/llc.cllc_error(sk, ECONNRESET);
sk121net/802/llc.cllc_state(sk, ADM);
sk126net/802/llc.cllc_state(sk, LLC_D_CONN);
sk129net/802/llc.csend_response(sk, DM|PF);
sk133net/802/llc.cif(cmd==UA && pf==sk->llc.p_flag)
sk135net/802/llc.cdel_timer(&sk->llc.t1);
sk136net/802/llc.cllc_state(sk, ADM);
sk137net/802/llc.cllc_confirm_reset(sk, sk->llc.cause_flag);
sk141net/802/llc.cdel_timer(&sk->llc.t1);
sk143net/802/llc.cllc_shutdown(sk, SHUTDOWN_MASK);  
sk150net/802/llc.cint llc_rx_error(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk156net/802/llc.csk->llc.vs=0;
sk157net/802/llc.csk->llc.vr=0;
sk158net/802/llc.csend_response(sk, UA|pf);
sk159net/802/llc.cllc_error(sk,ECONNRESET);
sk160net/802/llc.csk->llc.p_flag=0;
sk161net/802/llc.csk->llc.remote_busy=0;
sk162net/802/llc.cllc_state(sk, LLC_NORMAL);
sk166net/802/llc.csend_response(sk, UA|pf);
sk167net/802/llc.cllc_shutdown(sk, SHUTDOWN_MASK);
sk168net/802/llc.cllc_state(sk, LLC_ADM);
sk171net/802/llc.cllc_resend_frmr_rsp(sk,pf);
sk177net/802/llc.cllc_error(sk, ECONNRESET);
sk178net/802/llc.cdel_timer(&sk->llc.t1);
sk179net/802/llc.cllc_state(sk, LLC_ADM);
sk183net/802/llc.csend_command(sk, SABM);
sk184net/802/llc.csk->llc.p_flag=pf;
sk186net/802/llc.csk->llc.retry_count=0;
sk187net/802/llc.csk->llc.cause_flag=0;
sk188net/802/llc.cllc_error(sk, EPROTO);
sk189net/802/llc.cllc_state(sk, LLC_RESET);
sk199net/802/llc.cint llc_rx_nr_shared(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk208net/802/llc.csend_response(sk,DM|pf);
sk209net/802/llc.cllc_error(sk, ECONNRESET);
sk210net/802/llc.cllc_state(sk, LLC_ADM);
sk214net/802/llc.csend_response(sk,UA|pf);
sk215net/802/llc.cllc_state(sk, LLC_ADM);
sk216net/802/llc.cllc_shutdown(sk, SHUTDOWN_MASK);
sk224net/802/llc.cllc_send_frmr_response(sk, ILLEGAL_TYPE,pf);
sk225net/802/llc.cllc_state(sk, LLC_ERROR);
sk226net/802/llc.cllc_error(sk, EPROTO);
sk241net/802/llc.csend_command(sk, DM|pf);
sk242net/802/llc.csk->llc.p_flag=pf;
sk243net/802/llc.cllc_start_t1(sk);
sk244net/802/llc.cllc_error(sk, EPROTO);
sk245net/802/llc.csk->llc.cause_flag=0;
sk246net/802/llc.cllc_state(sk, LLC_D_CONN):
sk250net/802/llc.cllc_state(sk, LLC_ADM);
sk251net/802/llc.cllc_error(sk, ECONNREFUSED);
sk260net/802/llc.cllc_send_frmr_response(sk, UNEXPECTED_CONTROL, pf);
sk261net/802/llc.cllc_state(sk, LLC_ERROR);
sk262net/802/llc.cllc_error(sk, EPROTO);
sk264net/802/llc.celse if(pf==1 && sk->llc.p_flag==0)
sk266net/802/llc.cllc_send_frmr_response(sk, UNEXPECTED_RESPONSE, pf);
sk267net/802/llc.cllc_state(sk, LLC_ERROR);
sk268net/802/llc.cllc_error(sk, EPROTO);
sk272net/802/llc.cllc_send_frmr_response(sk, ILLEGAL_TYPE,pf);
sk273net/802/llc.cllc_state(sk, LLC_ERROR);
sk274net/802/llc.cllc_error(sk, EPROTO);
sk288net/802/llc.cint llc_rx_normal(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns)
sk290net/802/llc.cif(llc_rx_nr_shared(sk, skb, type, cmd, pf, nr, ns))
sk294net/802/llc.cif(llc_invalid_ns(sk,ns))
sk296net/802/llc.cif((type==RESP && sk->llc.p_flag==pf)||(type==CMD && pf==0 && sk->llc.p_flag==0))
sk298net/802/llc.cllc_command(sk, REJ|PF);
sk299net/802/llc.cllc_ack_frames(sk,nr);  /* Ack frames and update N(R) */
sk300net/802/llc.csk->llc.p_flag=PF;
sk301net/802/llc.cllc_state(sk, LLC_REJECT);
sk302net/802/llc.csk->llc.retry_count=0;
sk303net/802/llc.cllc_start_t1(sk);
sk304net/802/llc.csk->llc.remote_busy=0;
sk306net/802/llc.celse if((type==CMD && !pf && sk->llc.p_flag==1) || (type==RESP && !pf && sk->llc.p_flag==1))
sk309net/802/llc.cllc_response(sk, REJ);
sk311net/802/llc.cllc_command(sk, REJ);
sk312net/802/llc.cllc_ack_frames(sk,nr);
sk313net/802/llc.csk->llc.retry_count=0;
sk314net/802/llc.cllc_state(sk, LLC_REJECT);
sk315net/802/llc.cllc_start_t1(sk);
sk319net/802/llc.cllc_response(sk, REJ|PF);
sk320net/802/llc.cllc_ack_frames(sk,nr);
sk321net/802/llc.csk->llc.retry_count=0;
sk322net/802/llc.cllc_start_t1(sk);
sk331net/802/llc.cif(sk->llc.p_flag==pf && !(type==CMD && pf))
sk333net/802/llc.csk->llc.vr=(sk->llc.vr+1)&7;
sk334net/802/llc.cllc_queue_rr_cmd(sk, PF);
sk335net/802/llc.csk->llc.retry_count=0;
sk336net/802/llc.cllc_start_t1(sk);
sk337net/802/llc.csk->llc.p_flag=1;
sk338net/802/llc.cllc_ack_frames(sk,nr);
sk339net/802/llc.csk->llc.remote_busy=0;
sk341net/802/llc.celse if(sk->ppc.p_flag!=pf)
sk343net/802/llc.csk->llc.vr=(sk->llc.vr+1)&7;
sk345net/802/llc.cllc_queue_rr_resp(sk, 0);
sk347net/802/llc.cllc_queue_rr_cmd(sk, 0);
sk348net/802/llc.cif(sk->llc.nr!=nr)
sk350net/802/llc.cllc_ack_frames(sk,nr);
sk351net/802/llc.cllc_reset_t1(sk);
sk356net/802/llc.csk->llc.vr=(sk->llc.vr+1)&7;
sk357net/802/llc.cllc_queue_rr_resp(sk,PF);
sk358net/802/llc.cif(sk->llc.nr!=nr)
sk360net/802/llc.cllc_ack_frames(sk,nr);
sk361net/802/llc.cllc_reset_t1(sk);
sk364net/802/llc.cllc_queue_data(sk,skb);
sk370net/802/llc.cif(type==CMD || (type==RESP && (!pf || pf==1 && sk->llc.p_flag==1)))
sk372net/802/llc.cllc_update_p_flag(sk,pf);
sk373net/802/llc.cif(sk->llc.nr!=nr)
sk375net/802/llc.cllc_ack_frames(sk,nr);
sk376net/802/llc.cllc_reset_t1(sk);
sk379net/802/llc.csk->llc.remote_busy=0;
sk381net/802/llc.c{  sk->llc.remote_busy=1;
sk382net/802/llc.cif(!llc_t1_running(sk))
sk383net/802/llc.cllc_start_t1(sk);
sk389net/802/llc.cllc_queue_rr_resp(sk,PF);
sk392net/802/llc.csend_response(sk, RR|PF);
sk393net/802/llc.cif(!llc_t1_running(sk))
sk394net/802/llc.cllc_start_t1(sk);
sk396net/802/llc.cif(sk->llc.nr!=nr)
sk398net/802/llc.cllc_ack_frames(sk,nr);
sk399net/802/llc.cllc_reset_t1(sk);
sk402net/802/llc.csk->llc.remote_busy=0;
sk404net/802/llc.csk->llc.remote_busy=1;
sk41net/802/p8022.cskb->sk = NULL;
sk66net/802/psnap.cskb->sk = NULL;
sk456net/appletalk/aarp.cif(skb->sk==NULL)
sk459net/appletalk/aarp.cdev_queue_xmit(skb, skb->dev, skb->sk->priority);
sk472net/appletalk/aarp.cif(skb->sk==NULL)
sk475net/appletalk/aarp.cdev_queue_xmit(skb, skb->dev, skb->sk->priority);
sk580net/appletalk/aarp.cif(skb->sk==NULL)
sk583net/appletalk/aarp.cdev_queue_xmit(skb, skb->dev, skb->sk->priority);
sk91net/appletalk/ddp.cstatic void atalk_remove_socket(atalk_socket *sk)
sk100net/appletalk/ddp.cif(s==sk)
sk108net/appletalk/ddp.cif(s->next==sk)
sk110net/appletalk/ddp.cs->next=sk->next;
sk119net/appletalk/ddp.cstatic void atalk_insert_socket(atalk_socket *sk)
sk124net/appletalk/ddp.csk->next=atalk_socket_list;
sk125net/appletalk/ddp.catalk_socket_list=sk;
sk192net/appletalk/ddp.cstatic void atalk_destroy_socket(atalk_socket *sk);
sk203net/appletalk/ddp.cstatic void atalk_destroy_socket(atalk_socket *sk)
sk206net/appletalk/ddp.catalk_remove_socket(sk);
sk208net/appletalk/ddp.cwhile((skb=skb_dequeue(&sk->receive_queue))!=NULL)
sk213net/appletalk/ddp.cif(sk->wmem_alloc == 0 && sk->rmem_alloc == 0 && sk->dead)
sk214net/appletalk/ddp.ckfree_s(sk,sizeof(*sk));
sk220net/appletalk/ddp.cinit_timer(&sk->timer);
sk221net/appletalk/ddp.csk->timer.expires=jiffies+10*HZ;
sk222net/appletalk/ddp.csk->timer.function=atalk_destroy_timer;
sk223net/appletalk/ddp.csk->timer.data = (unsigned long)sk;
sk224net/appletalk/ddp.cadd_timer(&sk->timer);
sk968net/appletalk/ddp.catalk_socket *sk;
sk971net/appletalk/ddp.csk=(atalk_socket *)sock->data;
sk992net/appletalk/ddp.creturn sock_setsockopt(sk,level,optname,optval,optlen);
sk1007net/appletalk/ddp.catalk_socket *sk;
sk1011net/appletalk/ddp.csk=(atalk_socket *)sock->data;
sk1025net/appletalk/ddp.creturn sock_getsockopt(sk,level,optname,optval,optlen);
sk1052net/appletalk/ddp.cstatic void def_callback1(struct sock *sk)
sk1054net/appletalk/ddp.cif(!sk->dead)
sk1055net/appletalk/ddp.cwake_up_interruptible(sk->sleep);
sk1058net/appletalk/ddp.cstatic void def_callback2(struct sock *sk, int len)
sk1060net/appletalk/ddp.cif(!sk->dead)
sk1062net/appletalk/ddp.cwake_up_interruptible(sk->sleep);
sk1063net/appletalk/ddp.csock_wake_async(sk->socket,0);
sk1074net/appletalk/ddp.catalk_socket *sk;
sk1075net/appletalk/ddp.csk=(atalk_socket *)kmalloc(sizeof(*sk),GFP_KERNEL);
sk1076net/appletalk/ddp.cif(sk==NULL)
sk1087net/appletalk/ddp.ckfree_s((void *)sk,sizeof(*sk));
sk1090net/appletalk/ddp.csk->dead=0;
sk1091net/appletalk/ddp.csk->next=NULL;
sk1092net/appletalk/ddp.csk->broadcast=0;
sk1093net/appletalk/ddp.csk->no_check=0;    /* Checksums on by default */
sk1094net/appletalk/ddp.csk->allocation=GFP_KERNEL;
sk1095net/appletalk/ddp.csk->rcvbuf=SK_RMEM_MAX;
sk1096net/appletalk/ddp.csk->sndbuf=SK_WMEM_MAX;
sk1097net/appletalk/ddp.csk->pair=NULL;
sk1098net/appletalk/ddp.csk->wmem_alloc=0;
sk1099net/appletalk/ddp.csk->rmem_alloc=0;
sk1100net/appletalk/ddp.csk->inuse=0;
sk1101net/appletalk/ddp.csk->proc=0;
sk1102net/appletalk/ddp.csk->priority=1;
sk1103net/appletalk/ddp.csk->shutdown=0;
sk1104net/appletalk/ddp.csk->prot=NULL;  /* So we use default free mechanisms */
sk1105net/appletalk/ddp.csk->broadcast=0;
sk1106net/appletalk/ddp.csk->err=0;
sk1107net/appletalk/ddp.cskb_queue_head_init(&sk->receive_queue);
sk1108net/appletalk/ddp.cskb_queue_head_init(&sk->write_queue);
sk1109net/appletalk/ddp.csk->send_head=NULL;
sk1110net/appletalk/ddp.cskb_queue_head_init(&sk->back_log);
sk1111net/appletalk/ddp.csk->state=TCP_CLOSE;
sk1112net/appletalk/ddp.csk->socket=sock;
sk1113net/appletalk/ddp.csk->type=sock->type;
sk1114net/appletalk/ddp.csk->debug=0;
sk1116net/appletalk/ddp.csk->protinfo.af_at.src_net=0;
sk1117net/appletalk/ddp.csk->protinfo.af_at.src_node=0;
sk1118net/appletalk/ddp.csk->protinfo.af_at.src_port=0;
sk1120net/appletalk/ddp.csk->protinfo.af_at.dest_net=0;
sk1121net/appletalk/ddp.csk->protinfo.af_at.dest_node=0;
sk1122net/appletalk/ddp.csk->protinfo.af_at.dest_port=0;
sk1124net/appletalk/ddp.csk->mtu=DDP_MAXSZ;
sk1128net/appletalk/ddp.csock->data=(void *)sk;
sk1129net/appletalk/ddp.csk->sleep=sock->wait;
sk1132net/appletalk/ddp.csk->state_change=def_callback1;
sk1133net/appletalk/ddp.csk->data_ready=def_callback2;
sk1134net/appletalk/ddp.csk->write_space=def_callback1;
sk1135net/appletalk/ddp.csk->error_report=def_callback1;
sk1137net/appletalk/ddp.csk->zapped=1;
sk1156net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1157net/appletalk/ddp.cif(sk==NULL)
sk1159net/appletalk/ddp.cif(!sk->dead)
sk1160net/appletalk/ddp.csk->state_change(sk);
sk1161net/appletalk/ddp.csk->dead=1;
sk1163net/appletalk/ddp.catalk_destroy_socket(sk);
sk1182net/appletalk/ddp.cstatic int atalk_autobind(atalk_socket *sk)
sk1190net/appletalk/ddp.csk->protinfo.af_at.src_net = sat.sat_addr.s_net = ap->s_net;
sk1191net/appletalk/ddp.csk->protinfo.af_at.src_node = sat.sat_addr.s_node = ap->s_node;
sk1195net/appletalk/ddp.csk->protinfo.af_at.src_port=n;
sk1196net/appletalk/ddp.catalk_insert_socket(sk);
sk1197net/appletalk/ddp.csk->zapped=0;
sk1207net/appletalk/ddp.catalk_socket *sk;
sk1210net/appletalk/ddp.csk=(atalk_socket *)sock->data;
sk1212net/appletalk/ddp.cif(sk->zapped==0)
sk1226net/appletalk/ddp.csk->protinfo.af_at.src_net=addr->sat_addr.s_net=ap->s_net;
sk1227net/appletalk/ddp.csk->protinfo.af_at.src_node=addr->sat_addr.s_node=ap->s_node;
sk1233net/appletalk/ddp.csk->protinfo.af_at.src_net=addr->sat_addr.s_net;
sk1234net/appletalk/ddp.csk->protinfo.af_at.src_node=addr->sat_addr.s_node;
sk1242net/appletalk/ddp.csk->protinfo.af_at.src_port=addr->sat_port=n;
sk1245net/appletalk/ddp.csk->protinfo.af_at.src_port=addr->sat_port;
sk1250net/appletalk/ddp.catalk_insert_socket(sk);
sk1251net/appletalk/ddp.csk->zapped=0;
sk1262net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1265net/appletalk/ddp.csk->state = TCP_CLOSE;  
sk1275net/appletalk/ddp.cif(addr->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast)
sk1278net/appletalk/ddp.cif(sk->zapped)
sk1280net/appletalk/ddp.cif(atalk_autobind(sk)<0)
sk1287net/appletalk/ddp.csk->protinfo.af_at.dest_port=addr->sat_port;
sk1288net/appletalk/ddp.csk->protinfo.af_at.dest_net=addr->sat_addr.s_net;
sk1289net/appletalk/ddp.csk->protinfo.af_at.dest_node=addr->sat_addr.s_node;
sk1291net/appletalk/ddp.csk->state=TCP_ESTABLISHED;
sk1324net/appletalk/ddp.catalk_socket *sk;
sk1326net/appletalk/ddp.csk=(atalk_socket *)sock->data;
sk1327net/appletalk/ddp.cif(sk->zapped)
sk1329net/appletalk/ddp.cif(atalk_autobind(sk)<0)
sk1337net/appletalk/ddp.cif(sk->state!=TCP_ESTABLISHED)
sk1339net/appletalk/ddp.csat.sat_addr.s_net=sk->protinfo.af_at.dest_net;
sk1340net/appletalk/ddp.csat.sat_addr.s_node=sk->protinfo.af_at.dest_node;
sk1341net/appletalk/ddp.csat.sat_port=sk->protinfo.af_at.dest_port;
sk1345net/appletalk/ddp.csat.sat_addr.s_net=sk->protinfo.af_at.src_net;
sk1346net/appletalk/ddp.csat.sat_addr.s_node=sk->protinfo.af_at.src_node;
sk1347net/appletalk/ddp.csat.sat_port=sk->protinfo.af_at.src_port;
sk1502net/appletalk/ddp.cskb->sk = sock;
sk1506net/appletalk/ddp.cskb->sk=NULL;
sk1514net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1533net/appletalk/ddp.cif(sk->zapped)
sk1536net/appletalk/ddp.cif(atalk_autobind(sk)<0)
sk1545net/appletalk/ddp.cif(usat->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast)
sk1551net/appletalk/ddp.cif(sk->state!=TCP_ESTABLISHED)
sk1555net/appletalk/ddp.cusat->sat_port=sk->protinfo.af_at.dest_port;
sk1556net/appletalk/ddp.cusat->sat_addr.s_node=sk->protinfo.af_at.dest_node;
sk1557net/appletalk/ddp.cusat->sat_addr.s_net=sk->protinfo.af_at.dest_net;
sk1562net/appletalk/ddp.cif(sk->debug)
sk1563net/appletalk/ddp.cprintk("SK %p: Got address.\n",sk);
sk1578net/appletalk/ddp.cat_hint.s_net=sk->protinfo.af_at.src_net;
sk1585net/appletalk/ddp.cif(sk->debug)
sk1586net/appletalk/ddp.cprintk("SK %p: Size needed %d, device %s\n", sk, size, dev->name);
sk1590net/appletalk/ddp.cskb = sock_alloc_send_skb(sk, size, 0, 0 , &err);
sk1594net/appletalk/ddp.cskb->sk=sk;
sk1602net/appletalk/ddp.cif(sk->debug)
sk1603net/appletalk/ddp.cprintk("SK %p: Begin build.\n", sk);
sk1617net/appletalk/ddp.cddp->deh_snet=sk->protinfo.af_at.src_net;
sk1619net/appletalk/ddp.cddp->deh_snode=sk->protinfo.af_at.src_node;
sk1621net/appletalk/ddp.cddp->deh_sport=sk->protinfo.af_at.src_port;
sk1623net/appletalk/ddp.cif(sk->debug)
sk1624net/appletalk/ddp.cprintk("SK %p: Copy user data (%d bytes).\n", sk, len);
sk1628net/appletalk/ddp.cif(sk->no_check==1)
sk1656net/appletalk/ddp.cif(sk->debug)
sk1657net/appletalk/ddp.cprintk("SK %p: send out(copy).\n", sk);
sk1667net/appletalk/ddp.cif(sk->debug)
sk1668net/appletalk/ddp.cprintk("SK %p: Loop back.\n", sk);
sk1670net/appletalk/ddp.csk->wmem_alloc-=skb->truesize;
sk1672net/appletalk/ddp.cskb->sk = NULL;
sk1681net/appletalk/ddp.cif(sk->debug)
sk1682net/appletalk/ddp.cprintk("SK %p: send out.\n", sk);
sk1693net/appletalk/ddp.cif(sk->debug)
sk1694net/appletalk/ddp.cprintk("SK %p: Done write (%d).\n", sk, len);
sk1701net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1708net/appletalk/ddp.cif(sk->err)
sk1709net/appletalk/ddp.creturn sock_error(sk);
sk1714net/appletalk/ddp.cskb=skb_recv_datagram(sk,flags,noblock,&er);
sk1719net/appletalk/ddp.cif(sk->type==SOCK_RAW)
sk1745net/appletalk/ddp.cstatic int atalk_shutdown(struct socket *sk,int how)
sk1752net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1754net/appletalk/ddp.creturn datagram_select(sk,sel_type,wait);
sk1765net/appletalk/ddp.catalk_socket *sk=(atalk_socket *)sock->data;
sk1773net/appletalk/ddp.camount=sk->sndbuf-sk->wmem_alloc;
sk1781net/appletalk/ddp.cif((skb=skb_peek(&sk->receive_queue))!=NULL)
sk1786net/appletalk/ddp.cif (sk)
sk1788net/appletalk/ddp.cif(sk->stamp.tv_sec==0)
sk1793net/appletalk/ddp.cmemcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval));
sk213net/ax25/af_ax25.cif (s->sk != NULL) {
sk214net/ax25/af_ax25.cs->sk->state = TCP_CLOSE;
sk215net/ax25/af_ax25.cs->sk->err   = ENETUNREACH;
sk216net/ax25/af_ax25.cif (!s->sk->dead)
sk217net/ax25/af_ax25.cs->sk->state_change(s->sk);
sk218net/ax25/af_ax25.cs->sk->dead  = 1;
sk276net/ax25/af_ax25.cif (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && s->sk->type == type && s->sk->state == TCP_LISTEN) {
sk280net/ax25/af_ax25.creturn s->sk;
sk301net/ax25/af_ax25.cif (s->sk != NULL && ax25cmp(&s->source_addr, my_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->sk->type == type) {
sk303net/ax25/af_ax25.creturn s->sk;
sk325net/ax25/af_ax25.cif (s->sk != NULL && s->sk->type != SOCK_SEQPACKET)
sk350net/ax25/af_ax25.cif (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && s->sk->type == SOCK_RAW) {
sk352net/ax25/af_ax25.creturn s->sk;
sk361net/ax25/af_ax25.cstatic void ax25_send_to_raw(struct sock *sk, struct sk_buff *skb, int proto)
sk365net/ax25/af_ax25.cwhile (sk != NULL) {
sk366net/ax25/af_ax25.cif (sk->type == SOCK_RAW && sk->protocol == proto && sk->rmem_alloc <= sk->rcvbuf) {
sk370net/ax25/af_ax25.ccopy->sk = sk;
sk371net/ax25/af_ax25.csk->rmem_alloc += copy->truesize;
sk372net/ax25/af_ax25.cskb_queue_tail(&sk->receive_queue, copy);
sk373net/ax25/af_ax25.cif (!sk->dead)
sk374net/ax25/af_ax25.csk->data_ready(sk, skb->len);
sk377net/ax25/af_ax25.csk = sk->next;
sk413net/ax25/af_ax25.cif (ax25->sk != NULL) {
sk414net/ax25/af_ax25.cwhile ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) {
sk415net/ax25/af_ax25.cif (skb->sk != ax25->sk) {      /* A pending connection */
sk416net/ax25/af_ax25.cskb->sk->dead = 1;  /* Queue the unaccepted socket for death */
sk417net/ax25/af_ax25.cax25_set_timer(skb->sk->ax25);
sk418net/ax25/af_ax25.cskb->sk->ax25->state = AX25_STATE_0;
sk430net/ax25/af_ax25.cif (ax25->sk != NULL) {
sk431net/ax25/af_ax25.cif (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */
sk438net/ax25/af_ax25.ckfree_s(ax25->sk, sizeof(*ax25->sk));
sk561net/ax25/af_ax25.cax25->sk       = NULL;
sk608net/ax25/af_ax25.cif (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET)
sk695net/ax25/af_ax25.cstruct sock *sk;
sk698net/ax25/af_ax25.csk = (struct sock *)sock->data;
sk701net/ax25/af_ax25.creturn sock_setsockopt(sk, level, optname, optval, optlen);
sk716net/ax25/af_ax25.cif (sk->ax25->modulus == MODULUS) {
sk723net/ax25/af_ax25.csk->ax25->window = opt;
sk729net/ax25/af_ax25.csk->ax25->rtt = (opt * PR_SLOWHZ) / 2;
sk735net/ax25/af_ax25.csk->ax25->t2 = opt * PR_SLOWHZ;
sk741net/ax25/af_ax25.csk->ax25->n2 = opt;
sk747net/ax25/af_ax25.csk->ax25->t3 = opt * PR_SLOWHZ;
sk751net/ax25/af_ax25.csk->ax25->backoff = opt ? 1 : 0;
sk755net/ax25/af_ax25.csk->ax25->modulus = opt ? EMODULUS : MODULUS;
sk759net/ax25/af_ax25.csk->ax25->hdrincl = opt ? 1 : 0;
sk770net/ax25/af_ax25.cstruct sock *sk;
sk774net/ax25/af_ax25.csk = (struct sock *)sock->data;
sk777net/ax25/af_ax25.creturn sock_getsockopt(sk, level, optname, optval, optlen);
sk784net/ax25/af_ax25.cval = sk->ax25->window;
sk788net/ax25/af_ax25.cval = (sk->ax25->t1 * 2) / PR_SLOWHZ;
sk792net/ax25/af_ax25.cval = sk->ax25->t2 / PR_SLOWHZ;
sk796net/ax25/af_ax25.cval = sk->ax25->n2;
sk800net/ax25/af_ax25.cval = sk->ax25->t3 / PR_SLOWHZ;
sk804net/ax25/af_ax25.cval = sk->ax25->backoff;
sk808net/ax25/af_ax25.cval = (sk->ax25->modulus == EMODULUS);
sk812net/ax25/af_ax25.cval = sk->ax25->hdrincl;
sk834net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk836net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && sk->state != TCP_LISTEN) {
sk837net/ax25/af_ax25.csk->max_ack_backlog = backlog;
sk838net/ax25/af_ax25.csk->state           = TCP_LISTEN;
sk845net/ax25/af_ax25.cstatic void def_callback1(struct sock *sk)
sk847net/ax25/af_ax25.cif (!sk->dead)
sk848net/ax25/af_ax25.cwake_up_interruptible(sk->sleep);
sk851net/ax25/af_ax25.cstatic void def_callback2(struct sock *sk, int len)
sk853net/ax25/af_ax25.cif (!sk->dead)
sk854net/ax25/af_ax25.cwake_up_interruptible(sk->sleep);
sk859net/ax25/af_ax25.cstruct sock *sk;
sk892net/ax25/af_ax25.cif ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL)
sk896net/ax25/af_ax25.ckfree_s(sk, sizeof(*sk));
sk900net/ax25/af_ax25.cskb_queue_head_init(&sk->receive_queue);
sk901net/ax25/af_ax25.cskb_queue_head_init(&sk->write_queue);
sk902net/ax25/af_ax25.cskb_queue_head_init(&sk->back_log);
sk904net/ax25/af_ax25.csk->socket        = sock;
sk905net/ax25/af_ax25.csk->type          = sock->type;
sk906net/ax25/af_ax25.csk->protocol      = protocol;
sk907net/ax25/af_ax25.csk->dead          = 0;
sk908net/ax25/af_ax25.csk->next          = NULL;
sk909net/ax25/af_ax25.csk->broadcast     = 0;
sk910net/ax25/af_ax25.csk->allocation    = GFP_KERNEL;
sk911net/ax25/af_ax25.csk->rcvbuf        = SK_RMEM_MAX;
sk912net/ax25/af_ax25.csk->sndbuf        = SK_WMEM_MAX;
sk913net/ax25/af_ax25.csk->wmem_alloc    = 0;
sk914net/ax25/af_ax25.csk->rmem_alloc    = 0;
sk915net/ax25/af_ax25.csk->inuse         = 0;
sk916net/ax25/af_ax25.csk->debug         = 0;
sk917net/ax25/af_ax25.csk->destroy       = 0;
sk918net/ax25/af_ax25.csk->prot          = NULL;  /* So we use default free mechanisms */
sk919net/ax25/af_ax25.csk->err           = 0;
sk920net/ax25/af_ax25.csk->localroute    = 0;
sk921net/ax25/af_ax25.csk->send_head     = NULL;
sk922net/ax25/af_ax25.csk->state         = TCP_CLOSE;
sk923net/ax25/af_ax25.csk->shutdown      = 0;
sk924net/ax25/af_ax25.csk->priority      = SOPRI_NORMAL;
sk925net/ax25/af_ax25.csk->ack_backlog   = 0;
sk926net/ax25/af_ax25.csk->mtu           = AX25_MTU;  /* 256 */
sk927net/ax25/af_ax25.csk->zapped        = 1;
sk929net/ax25/af_ax25.csk->state_change = def_callback1;
sk930net/ax25/af_ax25.csk->data_ready   = def_callback2;
sk931net/ax25/af_ax25.csk->write_space  = def_callback1;
sk932net/ax25/af_ax25.csk->error_report = def_callback1;
sk935net/ax25/af_ax25.csock->data = (void *)sk;
sk936net/ax25/af_ax25.csk->sleep  = sock->wait;
sk939net/ax25/af_ax25.cax25->sk = sk;
sk940net/ax25/af_ax25.csk->ax25 = ax25;
sk947net/ax25/af_ax25.cstruct sock *sk;
sk950net/ax25/af_ax25.cif ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL)
sk954net/ax25/af_ax25.ckfree_s(sk, sizeof(*sk));
sk960net/ax25/af_ax25.csk->type   = osk->type;
sk961net/ax25/af_ax25.csk->socket = osk->socket;
sk970net/ax25/af_ax25.ckfree_s((void *)sk, sizeof(*sk));
sk975net/ax25/af_ax25.cskb_queue_head_init(&sk->receive_queue);
sk976net/ax25/af_ax25.cskb_queue_head_init(&sk->write_queue);
sk977net/ax25/af_ax25.cskb_queue_head_init(&sk->back_log);
sk979net/ax25/af_ax25.csk->dead        = 0;
sk980net/ax25/af_ax25.csk->next        = NULL;
sk981net/ax25/af_ax25.csk->priority    = osk->priority;
sk982net/ax25/af_ax25.csk->broadcast   = 0;
sk983net/ax25/af_ax25.csk->protocol    = osk->protocol;
sk984net/ax25/af_ax25.csk->rcvbuf      = osk->rcvbuf;
sk985net/ax25/af_ax25.csk->sndbuf      = osk->sndbuf;
sk986net/ax25/af_ax25.csk->wmem_alloc  = 0;
sk987net/ax25/af_ax25.csk->rmem_alloc  = 0;
sk988net/ax25/af_ax25.csk->inuse       = 0;
sk989net/ax25/af_ax25.csk->ack_backlog = 0;
sk990net/ax25/af_ax25.csk->destroy     = 0;
sk991net/ax25/af_ax25.csk->prot        = NULL;  /* So we use default free mechanisms */
sk992net/ax25/af_ax25.csk->err         = 0;
sk993net/ax25/af_ax25.csk->localroute  = 0;
sk994net/ax25/af_ax25.csk->send_head   = NULL;
sk995net/ax25/af_ax25.csk->debug       = osk->debug;
sk996net/ax25/af_ax25.csk->state       = TCP_ESTABLISHED;
sk997net/ax25/af_ax25.csk->window      = osk->window;
sk998net/ax25/af_ax25.csk->shutdown    = 0;
sk999net/ax25/af_ax25.csk->mtu         = osk->mtu;
sk1000net/ax25/af_ax25.csk->sleep       = osk->sleep;
sk1001net/ax25/af_ax25.csk->zapped      = osk->zapped;
sk1003net/ax25/af_ax25.csk->state_change = def_callback1;
sk1004net/ax25/af_ax25.csk->data_ready   = def_callback2;
sk1005net/ax25/af_ax25.csk->write_space  = def_callback1;
sk1006net/ax25/af_ax25.csk->error_report = def_callback1;
sk1023net/ax25/af_ax25.ckfree_s(sk, sizeof(*sk));
sk1029net/ax25/af_ax25.csk->ax25 = ax25;
sk1030net/ax25/af_ax25.cax25->sk = sk;
sk1032net/ax25/af_ax25.creturn sk;
sk1037net/ax25/af_ax25.cstruct sock *sk = (struct sock *)oldsock->data;
sk1039net/ax25/af_ax25.creturn ax25_create(newsock, sk->protocol);
sk1044net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1046net/ax25/af_ax25.cif (sk == NULL) return 0;
sk1048net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET) {
sk1049net/ax25/af_ax25.cswitch (sk->ax25->state) {
sk1051net/ax25/af_ax25.csk->state       = TCP_CLOSE;
sk1052net/ax25/af_ax25.csk->state_change(sk);
sk1053net/ax25/af_ax25.csk->dead        = 1;
sk1054net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
sk1058net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND);
sk1059net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
sk1060net/ax25/af_ax25.csk->state       = TCP_CLOSE;
sk1061net/ax25/af_ax25.csk->state_change(sk);
sk1062net/ax25/af_ax25.csk->dead        = 1;
sk1063net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
sk1067net/ax25/af_ax25.cax25_send_control(sk->ax25, DM, POLLON, C_RESPONSE);
sk1068net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
sk1069net/ax25/af_ax25.csk->state       = TCP_CLOSE;
sk1070net/ax25/af_ax25.csk->state_change(sk);
sk1071net/ax25/af_ax25.csk->dead        = 1;
sk1072net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
sk1077net/ax25/af_ax25.cax25_clear_queues(sk->ax25);
sk1078net/ax25/af_ax25.csk->ax25->n2count = 0;
sk1079net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND);
sk1080net/ax25/af_ax25.csk->ax25->t3timer = 0;
sk1081net/ax25/af_ax25.csk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25);
sk1082net/ax25/af_ax25.csk->ax25->state   = AX25_STATE_2;
sk1083net/ax25/af_ax25.csk->state         = TCP_CLOSE;
sk1084net/ax25/af_ax25.csk->state_change(sk);
sk1085net/ax25/af_ax25.csk->dead          = 1;
sk1086net/ax25/af_ax25.csk->destroy       = 1;
sk1093net/ax25/af_ax25.csk->state       = TCP_CLOSE;
sk1094net/ax25/af_ax25.csk->state_change(sk);
sk1095net/ax25/af_ax25.csk->dead = 1;
sk1096net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
sk1100net/ax25/af_ax25.csk->socket = NULL;  /* Not used, but we should do this. **/
sk1113net/ax25/af_ax25.cstruct sock *sk;
sk1118net/ax25/af_ax25.csk = (struct sock *)sock->data;
sk1120net/ax25/af_ax25.cif (sk->zapped == 0)
sk1127net/ax25/af_ax25.cif (ax25_find_socket(&addr->fsa_ax25.sax25_call, sk->type) != NULL) {
sk1128net/ax25/af_ax25.cif (sk->debug)
sk1139net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address));
sk1141net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, call, sizeof(ax25_address));
sk1152net/ax25/af_ax25.cif (sk->debug)
sk1157net/ax25/af_ax25.cax25_fillin_cb(sk->ax25, dev);
sk1158net/ax25/af_ax25.cax25_insert_socket(sk->ax25);
sk1160net/ax25/af_ax25.csk->zapped = 0;
sk1162net/ax25/af_ax25.cif (sk->debug)
sk1171net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1175net/ax25/af_ax25.cif (sk->state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
sk1180net/ax25/af_ax25.cif (sk->state == TCP_CLOSE && sock->state == SS_CONNECTING) {
sk1185net/ax25/af_ax25.cif (sk->state == TCP_ESTABLISHED && sk->type == SOCK_SEQPACKET)
sk1188net/ax25/af_ax25.csk->state   = TCP_CLOSE;  
sk1201net/ax25/af_ax25.cif (sk->ax25->digipeat == NULL) {
sk1202net/ax25/af_ax25.cif ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL)
sk1206net/ax25/af_ax25.csk->ax25->digipeat->ndigi = addr->sax25_ndigis;
sk1209net/ax25/af_ax25.csk->ax25->digipeat->repeated[ct] = 0;
sk1210net/ax25/af_ax25.cmemcpy(&sk->ax25->digipeat->calls[ct], &fsa->fsa_digipeater[ct], sizeof(ax25_address));
sk1214net/ax25/af_ax25.csk->ax25->digipeat->lastrepeat = 0;
sk1217net/ax25/af_ax25.cif (sk->zapped) {  /* Must bind first - autobinding in this may or may not work */
sk1218net/ax25/af_ax25.cif ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0)
sk1220net/ax25/af_ax25.cax25_insert_socket(sk->ax25);    /* Finish the bind */
sk1223net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && ax25_find_cb(&sk->ax25->source_addr, &addr->sax25_call, sk->ax25->device) != NULL)
sk1226net/ax25/af_ax25.cmemcpy(&sk->ax25->dest_addr, &addr->sax25_call, sizeof(ax25_address));
sk1229net/ax25/af_ax25.cif (sk->type != SOCK_SEQPACKET) {
sk1231net/ax25/af_ax25.csk->state   = TCP_ESTABLISHED;
sk1237net/ax25/af_ax25.csk->state          = TCP_SYN_SENT;
sk1238net/ax25/af_ax25.cax25_establish_data_link(sk->ax25);
sk1239net/ax25/af_ax25.csk->ax25->state     = AX25_STATE_1;
sk1240net/ax25/af_ax25.cax25_set_timer(sk->ax25);    /* Start going SABM SABM until a UA or a give up and DM */
sk1243net/ax25/af_ax25.cif (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK))
sk1249net/ax25/af_ax25.cwhile (sk->state == TCP_SYN_SENT) {
sk1250net/ax25/af_ax25.cinterruptible_sleep_on(sk->sleep);
sk1257net/ax25/af_ax25.cif (sk->state != TCP_ESTABLISHED) 
sk1262net/ax25/af_ax25.creturn sock_error(sk);  /* Always set at this point */
sk1279net/ax25/af_ax25.cstruct sock *sk;
sk1288net/ax25/af_ax25.csk = (struct sock *)sock->data;
sk1290net/ax25/af_ax25.cif (sk->type != SOCK_SEQPACKET)
sk1293net/ax25/af_ax25.cif (sk->state != TCP_LISTEN)
sk1300net/ax25/af_ax25.cif ((skb = skb_dequeue(&sk->receive_queue)) == NULL) {
sk1305net/ax25/af_ax25.cinterruptible_sleep_on(sk->sleep);
sk1313net/ax25/af_ax25.cnewsk = skb->sk;
sk1318net/ax25/af_ax25.cskb->sk = NULL;
sk1320net/ax25/af_ax25.csk->ack_backlog--;
sk1331net/ax25/af_ax25.cstruct sock *sk;
sk1334net/ax25/af_ax25.csk = (struct sock *)sock->data;
sk1337net/ax25/af_ax25.cif (sk->state != TCP_ESTABLISHED)
sk1339net/ax25/af_ax25.caddr = &sk->ax25->dest_addr;
sk1341net/ax25/af_ax25.caddr = &sk->ax25->source_addr;
sk1350net/ax25/af_ax25.cif (sk->ax25->digipeat != NULL) {
sk1351net/ax25/af_ax25.cndigi = sk->ax25->digipeat->ndigi;
sk1355net/ax25/af_ax25.cmemcpy(&sax->fsa_digipeater[i], &sk->ax25->digipeat->calls[i], sizeof(ax25_address));
sk1364net/ax25/af_ax25.cstruct sock *sk;
sk1491net/ax25/af_ax25.cif ((sk = ax25_find_socket(&dest, &src, SOCK_DGRAM)) != NULL) {
sk1492net/ax25/af_ax25.cif (sk->rmem_alloc >= sk->rcvbuf) {
sk1499net/ax25/af_ax25.cskb_queue_tail(&sk->receive_queue, skb);
sk1500net/ax25/af_ax25.cskb->sk = sk;
sk1501net/ax25/af_ax25.csk->rmem_alloc += skb->truesize;
sk1502net/ax25/af_ax25.cif (!sk->dead)
sk1503net/ax25/af_ax25.csk->data_ready(sk, skb->len);
sk1553net/ax25/af_ax25.cif ((sk = ax25_find_listener(&dest, dev, SOCK_SEQPACKET)) != NULL) {
sk1554net/ax25/af_ax25.cif (sk->ack_backlog == sk->max_ack_backlog || (make = ax25_make_new(sk, dev)) == NULL) {
sk1564net/ax25/af_ax25.cskb_queue_head(&sk->receive_queue, skb);
sk1566net/ax25/af_ax25.cskb->sk     = make;
sk1568net/ax25/af_ax25.cmake->pair  = sk;
sk1570net/ax25/af_ax25.csk->ack_backlog++;
sk1635net/ax25/af_ax25.cif (sk != NULL) {
sk1636net/ax25/af_ax25.cif (!sk->dead)
sk1637net/ax25/af_ax25.csk->data_ready(sk, skb->len );
sk1650net/ax25/af_ax25.cskb->sk = NULL;    /* Initially we don't know who its for */
sk1670net/ax25/af_ax25.cskb->sk = NULL;    /* Initially we don't know who its for */
sk1687net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1699net/ax25/af_ax25.cif (sk->err) {
sk1700net/ax25/af_ax25.creturn sock_error(sk);
sk1706net/ax25/af_ax25.cif (sk->zapped)
sk1709net/ax25/af_ax25.cif (sk->ax25->device == NULL)
sk1737net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && memcmp(&sk->ax25->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
sk1744net/ax25/af_ax25.cif (sk->state != TCP_ESTABLISHED)
sk1747net/ax25/af_ax25.cmemcpy(&sax.sax25_call, &sk->ax25->dest_addr, sizeof(ax25_address));
sk1748net/ax25/af_ax25.cdp = sk->ax25->digipeat;
sk1751net/ax25/af_ax25.cif (sk->debug)
sk1755net/ax25/af_ax25.cif (sk->debug)
sk1761net/ax25/af_ax25.cif ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
sk1764net/ax25/af_ax25.cskb->sk   = sk;
sk1770net/ax25/af_ax25.cif (sk->debug)
sk1778net/ax25/af_ax25.c*asmptr = sk->protocol;
sk1780net/ax25/af_ax25.cif (sk->debug)
sk1783net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET) {
sk1785net/ax25/af_ax25.cif (sk->state != TCP_ESTABLISHED) {
sk1790net/ax25/af_ax25.cax25_output(sk->ax25, skb);  /* Shove it onto the queue and kick */
sk1796net/ax25/af_ax25.cif (sk->debug) {
sk1803net/ax25/af_ax25.casmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND, MODULUS));
sk1805net/ax25/af_ax25.cif (sk->debug)
sk1810net/ax25/af_ax25.cif (sk->debug)
sk1816net/ax25/af_ax25.cax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL);
sk1825net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1831net/ax25/af_ax25.cif (sk->err) {
sk1832net/ax25/af_ax25.creturn sock_error(sk);
sk1842net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && sk->state != TCP_ESTABLISHED)
sk1846net/ax25/af_ax25.cif ((skb = skb_recv_datagram(sk, flags, noblock, &er)) == NULL)
sk1849net/ax25/af_ax25.cif (sk->ax25->hdrincl) {
sk1852net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET)
sk1899net/ax25/af_ax25.cstatic int ax25_shutdown(struct socket *sk, int how)
sk1907net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1909net/ax25/af_ax25.creturn datagram_select(sk, sel_type, wait);
sk1914net/ax25/af_ax25.cstruct sock *sk = (struct sock *)sock->data;
sk1922net/ax25/af_ax25.camount = sk->sndbuf - sk->wmem_alloc;
sk1932net/ax25/af_ax25.cif ((skb = skb_peek(&sk->receive_queue)) != NULL)
sk1941net/ax25/af_ax25.cif (sk != NULL) {
sk1942net/ax25/af_ax25.cif (sk->stamp.tv_sec==0)
sk1946net/ax25/af_ax25.cmemcpy_tofs((void *)arg, &sk->stamp, sizeof(struct timeval));
sk2038net/ax25/af_ax25.cif (ax25->sk != NULL) {
sk2040net/ax25/af_ax25.cax25->sk->wmem_alloc,
sk2041net/ax25/af_ax25.cax25->sk->rmem_alloc);
sk84net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk85net/ax25/ax25_in.cskbn->sk = ax25->sk;
sk86net/ax25/ax25_in.cax25->sk->rmem_alloc += skbn->truesize;
sk159net/ax25/ax25_in.cif (ax25->sk != NULL && ax25_dev_get_value(ax25->device, AX25_VALUES_TEXT) && ax25->sk->protocol == pid) {
sk160net/ax25/ax25_in.cif (sock_queue_rcv_skb(ax25->sk, skb) == 0) {
sk206net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk207net/ax25/ax25_in.cax25->sk->state = TCP_ESTABLISHED;
sk209net/ax25/ax25_in.cif (!ax25->sk->dead)
sk210net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk220net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk221net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk222net/ax25/ax25_in.cax25->sk->err   = ECONNREFUSED;
sk223net/ax25/ax25_in.cif (!ax25->sk->dead)
sk224net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk225net/ax25/ax25_in.cax25->sk->dead  = 1;
sk261net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk262net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk263net/ax25/ax25_in.cax25->sk->err   = 0;
sk264net/ax25/ax25_in.cif (!ax25->sk->dead)
sk265net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk266net/ax25/ax25_in.cax25->sk->dead  = 1;
sk274net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk275net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk276net/ax25/ax25_in.cax25->sk->err   = 0;
sk277net/ax25/ax25_in.cif (!ax25->sk->dead)
sk278net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk279net/ax25/ax25_in.cax25->sk->dead  = 1;
sk338net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk339net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk340net/ax25/ax25_in.cax25->sk->err   = 0;
sk341net/ax25/ax25_in.cif (!ax25->sk->dead)
sk342net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk343net/ax25/ax25_in.cax25->sk->dead  = 1;
sk351net/ax25/ax25_in.cif (ax25->sk) {
sk352net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk353net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
sk354net/ax25/ax25_in.cif (!ax25->sk->dead)
sk355net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk356net/ax25/ax25_in.cax25->sk->dead         = 1;
sk499net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk500net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk501net/ax25/ax25_in.cax25->sk->err   = 0;
sk502net/ax25/ax25_in.cif (!ax25->sk->dead)
sk503net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk504net/ax25/ax25_in.cax25->sk->dead  = 1;
sk512net/ax25/ax25_in.cif (ax25->sk != NULL) {
sk513net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
sk514net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
sk515net/ax25/ax25_in.cif (!ax25->sk->dead)
sk516net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
sk517net/ax25/ax25_in.cax25->sk->dead  = 1;
sk671net/ax25/ax25_in.cif (ax25->sk != NULL && ax25->state == AX25_STATE_0 && ax25->sk->dead)
sk73net/ax25/ax25_out.cif (skb->sk != NULL) {
sk74net/ax25/ax25_out.cif ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, 0, &err)) == NULL)
sk81net/ax25/ax25_out.cskbn->sk   = skb->sk;
sk217net/ax25/ax25_out.cif (ax25->sk != NULL) {
sk218net/ax25/ax25_out.cax25->sk->state = TCP_CLOSE;
sk219net/ax25/ax25_out.cax25->sk->err   = ENETUNREACH;
sk220net/ax25/ax25_out.cif (!ax25->sk->dead)
sk221net/ax25/ax25_out.cax25->sk->state_change(ax25->sk);
sk222net/ax25/ax25_out.cax25->sk->dead  = 1;
sk387net/ax25/ax25_route.cif (ax25->sk != NULL)
sk388net/ax25/ax25_route.cax25->sk->zapped = 0;
sk209net/ax25/ax25_subr.cif (ax25->sk != NULL) {
sk210net/ax25/ax25_subr.cskb->sk = ax25->sk;
sk211net/ax25/ax25_subr.cax25->sk->wmem_alloc += skb->truesize;
sk261net/ax25/ax25_subr.cskb->sk = NULL;
sk99net/ax25/ax25_timer.cif (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) {
sk111net/ax25/ax25_timer.cif (ax25->sk != NULL) {
sk112net/ax25/ax25_timer.cif (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & OWN_RX_BUSY_CONDITION)) {
sk161net/ax25/ax25_timer.cif (ax25->sk != NULL) {
sk162net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
sk163net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
sk164net/ax25/ax25_timer.cif (!ax25->sk->dead)
sk165net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
sk166net/ax25/ax25_timer.cax25->sk->dead  = 1;
sk191net/ax25/ax25_timer.cif (ax25->sk != NULL) {
sk192net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
sk193net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
sk194net/ax25/ax25_timer.cif (!ax25->sk->dead)
sk195net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
sk196net/ax25/ax25_timer.cax25->sk->dead  = 1;
sk218net/ax25/ax25_timer.cif (ax25->sk != NULL) {
sk219net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
sk220net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
sk221net/ax25/ax25_timer.cif (!ax25->sk->dead)
sk222net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
sk223net/ax25/ax25_timer.cax25->sk->dead  = 1;
sk55net/core/datagram.cstruct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err)
sk63net/core/datagram.csk->inuse = 1;
sk64net/core/datagram.cwhile(skb_peek(&sk->receive_queue) == NULL)  /* No data */
sk67net/core/datagram.cif (sk->shutdown & RCV_SHUTDOWN)
sk69net/core/datagram.crelease_sock(sk);
sk74net/core/datagram.cif(sk->err)
sk76net/core/datagram.crelease_sock(sk);
sk77net/core/datagram.c*err=sock_error(sk);
sk83net/core/datagram.cif(sk->type==SOCK_SEQPACKET && sk->state!=TCP_ESTABLISHED)
sk85net/core/datagram.crelease_sock(sk);
sk93net/core/datagram.crelease_sock(sk);
sk97net/core/datagram.crelease_sock(sk);
sk102net/core/datagram.cif (skb_peek(&sk->receive_queue) == NULL)
sk104net/core/datagram.cinterruptible_sleep_on(sk->sleep);
sk112net/core/datagram.cif(sk->err != 0)  /* Error while waiting for packet
sk116net/core/datagram.c*err = sock_error(sk);
sk121net/core/datagram.csk->inuse = 1;
sk128net/core/datagram.cskb=skb_dequeue(&sk->receive_queue);
sk137net/core/datagram.cskb=skb_peek(&sk->receive_queue);
sk189net/core/datagram.cint datagram_select(struct sock *sk, int sel_type, select_table *wait)
sk191net/core/datagram.cselect_wait(sk->sleep, wait);
sk195net/core/datagram.cif (sk->err)
sk197net/core/datagram.cif (sk->shutdown & RCV_SHUTDOWN)
sk199net/core/datagram.cif (sk->type==SOCK_SEQPACKET && sk->state==TCP_CLOSE)
sk204net/core/datagram.cif (skb_peek(&sk->receive_queue) != NULL)
sk212net/core/datagram.cif (sk->err)
sk214net/core/datagram.cif (sk->shutdown & SEND_SHUTDOWN)
sk216net/core/datagram.cif (sk->type==SOCK_SEQPACKET && sk->state==TCP_SYN_SENT)
sk221net/core/datagram.cif (sk->prot && sock_wspace(sk) >= MIN_WRITE_SPACE)
sk225net/core/datagram.cif (sk->prot==NULL && sk->sndbuf-sk->wmem_alloc >= MIN_WRITE_SPACE)
sk232net/core/datagram.cif (sk->err)
sk379net/core/dev.c((struct sock *)ptype->data != skb->sk))
sk425net/core/dev.cskb->sk = NULL;
sk466net/core/skbuff.cif (skb->sk)
sk468net/core/skbuff.cif(skb->sk->prot!=NULL)
sk471net/core/skbuff.csock_rfree(skb->sk, skb);
sk473net/core/skbuff.csock_wfree(skb->sk, skb);
sk483net/core/skbuff.cskb->sk->rmem_alloc-=skb->truesize;
sk485net/core/skbuff.cskb->sk->wmem_alloc-=skb->truesize;
sk487net/core/skbuff.cif(!skb->sk->dead)
sk488net/core/skbuff.cskb->sk->write_space(skb->sk);
sk550net/core/skbuff.cskb->sk = NULL;
sk622net/core/skbuff.cn->sk=NULL;
sk119net/core/sock.cint sock_setsockopt(struct sock *sk, int level, int optname,
sk142net/core/sock.csk->debug=valbool;
sk145net/core/sock.csk->reuse = valbool;
sk151net/core/sock.csk->localroute=valbool;
sk154net/core/sock.csk->broadcast=valbool;
sk161net/core/sock.csk->sndbuf=val;
sk169net/core/sock.csk->rcvbuf=val;
sk173net/core/sock.csk->keepopen = valbool;
sk177net/core/sock.csk->urginline = valbool;
sk181net/core/sock.csk->no_check = valbool;
sk187net/core/sock.csk->priority = val;
sk202net/core/sock.csk->linger=0;
sk205net/core/sock.csk->lingertime=ling.l_linger;
sk206net/core/sock.csk->linger=1;
sk217net/core/sock.cint sock_getsockopt(struct sock *sk, int level, int optname,
sk227net/core/sock.cval = sk->debug;
sk231net/core/sock.cval = sk->localroute;
sk235net/core/sock.cval= sk->broadcast;
sk239net/core/sock.cval=sk->sndbuf;
sk243net/core/sock.cval =sk->rcvbuf;
sk247net/core/sock.cval = sk->reuse;
sk251net/core/sock.cval = sk->keepopen;
sk255net/core/sock.cval = sk->type;          
sk259net/core/sock.cval = sk->err;
sk260net/core/sock.csk->err = 0;
sk264net/core/sock.cval = sk->urginline;
sk268net/core/sock.cval = sk->no_check;
sk272net/core/sock.cval = sk->priority;
sk283net/core/sock.cling.l_onoff=sk->linger;
sk284net/core/sock.cling.l_linger=sk->lingertime;
sk307net/core/sock.cstruct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, int priority)
sk309net/core/sock.cif (sk) 
sk311net/core/sock.cif (sk->wmem_alloc + size < sk->sndbuf || force) 
sk319net/core/sock.csk->wmem_alloc+= c->truesize;
sk330net/core/sock.cstruct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, int priority)
sk332net/core/sock.cif (sk) 
sk334net/core/sock.cif (sk->rmem_alloc + size < sk->rcvbuf || force) 
sk342net/core/sock.csk->rmem_alloc += c->truesize;
sk353net/core/sock.cunsigned long sock_rspace(struct sock *sk)
sk357net/core/sock.cif (sk != NULL) 
sk359net/core/sock.cif (sk->rmem_alloc >= sk->rcvbuf-2*MIN_WINDOW) 
sk361net/core/sock.camt = min((sk->rcvbuf-sk->rmem_alloc)/2-MIN_WINDOW, MAX_WINDOW);
sk370net/core/sock.cunsigned long sock_wspace(struct sock *sk)
sk372net/core/sock.cif (sk != NULL) 
sk374net/core/sock.cif (sk->shutdown & SEND_SHUTDOWN)
sk376net/core/sock.cif (sk->wmem_alloc >= sk->sndbuf)
sk378net/core/sock.creturn(sk->sndbuf-sk->wmem_alloc );
sk384net/core/sock.cvoid sock_wfree(struct sock *sk, struct sk_buff *skb)
sk391net/core/sock.cif (sk) 
sk396net/core/sock.csk->wmem_alloc -= s;
sk399net/core/sock.csk->write_space(sk);
sk405net/core/sock.cvoid sock_rfree(struct sock *sk, struct sk_buff *skb)
sk412net/core/sock.cif (sk) 
sk417net/core/sock.csk->rmem_alloc -= s;
sk426net/core/sock.cstruct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigned long fallback, int noblock, int *errcode)
sk431net/core/sock.csk->inuse=1;
sk435net/core/sock.cif(sk->err!=0)
sk438net/core/sock.cerr= -sk->err;
sk439net/core/sock.csk->err=0;
sk445net/core/sock.cif(sk->shutdown&SEND_SHUTDOWN)
sk452net/core/sock.cskb = sock_wmalloc(sk, size, 0, sk->allocation);
sk457net/core/sock.cskb = sock_wmalloc(sk, size, 0 , GFP_BUFFER);
sk459net/core/sock.cskb=sock_wmalloc(sk, fallback, 0, GFP_KERNEL);
sk470net/core/sock.csk->socket->flags |= SO_NOSPACE;
sk476net/core/sock.cif(sk->shutdown&SEND_SHUTDOWN)
sk481net/core/sock.ctmp = sk->wmem_alloc;
sk483net/core/sock.cif(sk->shutdown&SEND_SHUTDOWN)
sk491net/core/sock.cif( tmp <= sk->wmem_alloc)
sk501net/core/sock.cif (sk->wmem_alloc + size >= sk->sndbuf) 
sk504net/core/sock.cif (sk->wmem_alloc <= 0)
sk505net/core/sock.cprintk("sock.c: Look where I am %ld<%ld\n", tmp, sk->wmem_alloc);
sk506net/core/sock.csk->socket->flags &= ~SO_NOSPACE;
sk507net/core/sock.cinterruptible_sleep_on(sk->sleep);
sk524net/core/sock.cvoid release_sock(struct sock *sk)
sk531net/core/sock.cif (!sk->prot)
sk542net/core/sock.cif (sk->blog) 
sk547net/core/sock.csk->blog=1;
sk548net/core/sock.csk->inuse = 1;
sk552net/core/sock.cwhile((skb = skb_dequeue(&sk->back_log)) != NULL) 
sk554net/core/sock.csk->blog = 1;
sk555net/core/sock.cif (sk->prot->rcv) 
sk556net/core/sock.csk->prot->rcv(skb, skb->dev, (struct options*)skb->proto_priv,
sk559net/core/sock.c(struct inet_protocol *)sk->pair); 
sk562net/core/sock.csk->blog = 0;
sk563net/core/sock.csk->inuse = 0;
sk565net/core/sock.cif (sk->dead && sk->state == TCP_CLOSE) 
sk568net/core/sock.creset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME));
sk224net/ethernet/eth.cvoid eth_header_cache(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr)
sk226net/ethernet/eth.cint v=arp_find_cache(sk->ip_hcache_data, daddr, dev);
sk228net/ethernet/eth.csk->ip_hcache_state=0;  /* Try when arp resolves */
sk231net/ethernet/eth.cmemcpy(sk->ip_hcache_data+6, dev->dev_addr, ETH_ALEN);
sk232net/ethernet/eth.csk->ip_hcache_data[12]=ETH_P_IP>>8;
sk233net/ethernet/eth.csk->ip_hcache_data[13]=ETH_P_IP&0xFF;
sk234net/ethernet/eth.csk->ip_hcache_state=1;
sk235net/ethernet/eth.csk->ip_hcache_stamp=arp_cache_stamp;
sk236net/ethernet/eth.csk->ip_hcache_ver=&arp_cache_stamp;
sk109net/ipv4/af_inet.cstruct sock *sk;
sk111net/ipv4/af_inet.cfor(sk = prot->sock_array[num & (SOCK_ARRAY_SIZE -1 )];
sk112net/ipv4/af_inet.csk != NULL;  sk=sk->next) 
sk114net/ipv4/af_inet.cif (sk->num == num) 
sk137net/ipv4/af_inet.cstruct sock *sk;
sk153net/ipv4/af_inet.csk = prot->sock_array[(i+base+1) &(SOCK_ARRAY_SIZE -1)];
sk154net/ipv4/af_inet.cwhile(sk != NULL) 
sk156net/ipv4/af_inet.csk = sk->next;
sk184net/ipv4/af_inet.cvoid put_sock(unsigned short num, struct sock *sk)
sk190net/ipv4/af_inet.cif(sk->type==SOCK_PACKET)
sk193net/ipv4/af_inet.csk->num = num;
sk194net/ipv4/af_inet.csk->next = NULL;
sk204net/ipv4/af_inet.csk->prot->inuse += 1;
sk205net/ipv4/af_inet.cif (sk->prot->highestinuse < sk->prot->inuse)
sk206net/ipv4/af_inet.csk->prot->highestinuse = sk->prot->inuse;
sk208net/ipv4/af_inet.cif (sk->prot->sock_array[num] == NULL) 
sk210net/ipv4/af_inet.csk->prot->sock_array[num] = sk;
sk218net/ipv4/af_inet.cif ((mask & sk->rcv_saddr) &&
sk219net/ipv4/af_inet.c(mask & sk->rcv_saddr) != (mask & 0xffffffff)) 
sk229net/ipv4/af_inet.cskp = sk->prot->sock_array + num;
sk236net/ipv4/af_inet.csk->next = tmp;
sk237net/ipv4/af_inet.c*skp = sk;
sk282net/ipv4/af_inet.cvoid destroy_sock(struct sock *sk)
sk286net/ipv4/af_inet.csk->inuse = 1;      /* just to be safe. */
sk292net/ipv4/af_inet.cif (!sk->dead) 
sk293net/ipv4/af_inet.csk->write_space(sk);
sk295net/ipv4/af_inet.cremove_sock(sk);
sk302net/ipv4/af_inet.cdelete_timer(sk);
sk303net/ipv4/af_inet.cdel_timer(&sk->retransmit_timer);
sk309net/ipv4/af_inet.cwhile ((skb = tcp_dequeue_partial(sk)) != NULL) 
sk319net/ipv4/af_inet.cwhile((skb = skb_dequeue(&sk->write_queue)) != NULL) {
sk329net/ipv4/af_inet.cif (sk->dead) 
sk331net/ipv4/af_inet.cwhile((skb=skb_dequeue(&sk->receive_queue))!=NULL) 
sk337net/ipv4/af_inet.cif (skb->sk != NULL && skb->sk != sk) 
sk340net/ipv4/af_inet.cskb->sk->dead = 1;
sk341net/ipv4/af_inet.cskb->sk->prot->close(skb->sk, 0);
sk353net/ipv4/af_inet.cfor(skb = sk->send_head; skb != NULL; )
sk371net/ipv4/af_inet.csk->send_head = NULL;
sk378net/ipv4/af_inet.cwhile((skb=skb_dequeue(&sk->back_log))!=NULL) 
sk388net/ipv4/af_inet.cif (sk->pair) 
sk390net/ipv4/af_inet.csk->pair->dead = 1;
sk391net/ipv4/af_inet.csk->pair->prot->close(sk->pair, 0);
sk392net/ipv4/af_inet.csk->pair = NULL;
sk401net/ipv4/af_inet.cif (sk->dead && sk->rmem_alloc == 0 && sk->wmem_alloc == 0) 
sk403net/ipv4/af_inet.cif(sk->opt)
sk404net/ipv4/af_inet.ckfree(sk->opt);
sk410net/ipv4/af_inet.ckfree_s((void *)sk,sizeof(*sk));
sk416net/ipv4/af_inet.csk->destroy = 1;
sk417net/ipv4/af_inet.csk->ack_backlog = 0;
sk418net/ipv4/af_inet.csk->inuse = 0;
sk419net/ipv4/af_inet.creset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME);
sk431net/ipv4/af_inet.cstruct sock *sk;
sk433net/ipv4/af_inet.csk = (struct sock *) sock->data;
sk445net/ipv4/af_inet.csk->proc = arg;
sk448net/ipv4/af_inet.creturn(sk->proc);
sk461net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;  
sk463net/ipv4/af_inet.creturn sock_setsockopt(sk,level,optname,optval,optlen);
sk464net/ipv4/af_inet.cif (sk->prot->setsockopt==NULL)
sk467net/ipv4/af_inet.creturn sk->prot->setsockopt(sk,level,optname,optval,optlen);
sk477net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;    
sk479net/ipv4/af_inet.creturn sock_getsockopt(sk,level,optname,optval,optlen);
sk480net/ipv4/af_inet.cif(sk->prot->getsockopt==NULL)    
sk483net/ipv4/af_inet.creturn sk->prot->getsockopt(sk,level,optname,optval,optlen);
sk490net/ipv4/af_inet.cstatic int inet_autobind(struct sock *sk)
sk493net/ipv4/af_inet.cif (sk->num == 0) 
sk495net/ipv4/af_inet.csk->num = get_new_socknum(sk->prot, 0);
sk496net/ipv4/af_inet.cif (sk->num == 0) 
sk500net/ipv4/af_inet.cput_sock(sk->num, sk);
sk501net/ipv4/af_inet.csk->dummy_th.source = ntohs(sk->num);
sk512net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;
sk514net/ipv4/af_inet.cif(inet_autobind(sk)!=0)
sk528net/ipv4/af_inet.csk->max_ack_backlog = backlog;
sk529net/ipv4/af_inet.cif (sk->state != TCP_LISTEN)
sk531net/ipv4/af_inet.csk->ack_backlog = 0;
sk532net/ipv4/af_inet.csk->state = TCP_LISTEN;
sk542net/ipv4/af_inet.cstatic void def_callback1(struct sock *sk)
sk544net/ipv4/af_inet.cif(!sk->dead)
sk545net/ipv4/af_inet.cwake_up_interruptible(sk->sleep);
sk548net/ipv4/af_inet.cstatic void def_callback2(struct sock *sk,int len)
sk550net/ipv4/af_inet.cif(!sk->dead)
sk552net/ipv4/af_inet.cwake_up_interruptible(sk->sleep);
sk553net/ipv4/af_inet.csock_wake_async(sk->socket, 1);
sk557net/ipv4/af_inet.cstatic void def_callback3(struct sock *sk)
sk559net/ipv4/af_inet.cif(!sk->dead)
sk561net/ipv4/af_inet.cwake_up_interruptible(sk->sleep);
sk562net/ipv4/af_inet.csock_wake_async(sk->socket, 2);
sk575net/ipv4/af_inet.cstruct sock *sk;
sk579net/ipv4/af_inet.csk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL);
sk580net/ipv4/af_inet.cif (sk == NULL) 
sk582net/ipv4/af_inet.cmemset(sk,0,sizeof(*sk));  /* Efficient way to set most fields to zero */
sk591net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk595net/ipv4/af_inet.csk->no_check = TCP_NO_CHECK;
sk602net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk606net/ipv4/af_inet.csk->no_check = UDP_NO_CHECK;
sk613net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk618net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk622net/ipv4/af_inet.csk->reuse = 1;
sk623net/ipv4/af_inet.csk->num = protocol;
sk629net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk634net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk638net/ipv4/af_inet.csk->reuse = 1;
sk639net/ipv4/af_inet.csk->num = protocol;
sk643net/ipv4/af_inet.ckfree_s((void *)sk, sizeof(*sk));
sk646net/ipv4/af_inet.csk->socket = sock;
sk648net/ipv4/af_inet.csk->nonagle = 1;
sk652net/ipv4/af_inet.csk->type = sock->type;
sk653net/ipv4/af_inet.csk->protocol = protocol;
sk654net/ipv4/af_inet.csk->allocation = GFP_KERNEL;
sk655net/ipv4/af_inet.csk->sndbuf = SK_WMEM_MAX;
sk656net/ipv4/af_inet.csk->rcvbuf = SK_RMEM_MAX;
sk657net/ipv4/af_inet.csk->rto = TCP_TIMEOUT_INIT;    /*TCP_WRITE_TIME*/
sk658net/ipv4/af_inet.csk->cong_window = 1; /* start with only sending one packet at a time. */
sk659net/ipv4/af_inet.csk->priority = 1;
sk660net/ipv4/af_inet.csk->state = TCP_CLOSE;
sk663net/ipv4/af_inet.csk->max_unacked = 2048; /* needs to be at most 2 full packets. */
sk665net/ipv4/af_inet.cskb_queue_head_init(&sk->write_queue);
sk666net/ipv4/af_inet.cskb_queue_head_init(&sk->receive_queue);
sk667net/ipv4/af_inet.csk->mtu = 576;
sk668net/ipv4/af_inet.csk->prot = prot;
sk669net/ipv4/af_inet.csk->sleep = sock->wait;
sk670net/ipv4/af_inet.cinit_timer(&sk->timer);
sk671net/ipv4/af_inet.cinit_timer(&sk->retransmit_timer);
sk672net/ipv4/af_inet.csk->timer.data = (unsigned long)sk;
sk673net/ipv4/af_inet.csk->timer.function = &net_timer;
sk674net/ipv4/af_inet.cskb_queue_head_init(&sk->back_log);
sk675net/ipv4/af_inet.csock->data =(void *) sk;
sk676net/ipv4/af_inet.csk->dummy_th.doff = sizeof(sk->dummy_th)/4;
sk677net/ipv4/af_inet.csk->ip_ttl=64;
sk678net/ipv4/af_inet.cif(sk->type==SOCK_RAW && protocol==IPPROTO_RAW)
sk679net/ipv4/af_inet.csk->ip_hdrincl=1;
sk681net/ipv4/af_inet.csk->ip_hdrincl=0;
sk683net/ipv4/af_inet.csk->ip_mc_loop=1;
sk684net/ipv4/af_inet.csk->ip_mc_ttl=1;
sk685net/ipv4/af_inet.c*sk->ip_mc_name=0;
sk686net/ipv4/af_inet.csk->ip_mc_list=NULL;
sk689net/ipv4/af_inet.csk->state_change = def_callback1;
sk690net/ipv4/af_inet.csk->data_ready = def_callback2;
sk691net/ipv4/af_inet.csk->write_space = def_callback3;
sk692net/ipv4/af_inet.csk->error_report = def_callback1;
sk694net/ipv4/af_inet.cif (sk->num) 
sk702net/ipv4/af_inet.cput_sock(sk->num, sk);
sk703net/ipv4/af_inet.csk->dummy_th.source = ntohs(sk->num);
sk706net/ipv4/af_inet.cif (sk->prot->init) 
sk708net/ipv4/af_inet.cerr = sk->prot->init(sk);
sk711net/ipv4/af_inet.cdestroy_sock(sk);
sk732net/ipv4/af_inet.cstatic inline int closing(struct sock * sk)
sk734net/ipv4/af_inet.cswitch (sk->state) {
sk752net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;
sk753net/ipv4/af_inet.cif (sk == NULL) 
sk756net/ipv4/af_inet.csk->state_change(sk);
sk762net/ipv4/af_inet.cip_mc_drop_socket(sk);
sk773net/ipv4/af_inet.cif (sk->linger == 0 || (current->flags & PF_EXITING))
sk775net/ipv4/af_inet.csk->prot->close(sk,0);
sk776net/ipv4/af_inet.csk->dead = 1;
sk780net/ipv4/af_inet.csk->prot->close(sk, 0);
sk782net/ipv4/af_inet.cif (sk->lingertime)
sk783net/ipv4/af_inet.ccurrent->timeout = jiffies + HZ*sk->lingertime;
sk784net/ipv4/af_inet.cwhile(closing(sk) && current->timeout>0) 
sk786net/ipv4/af_inet.cinterruptible_sleep_on(sk->sleep);
sk800net/ipv4/af_inet.csk->dead = 1;
sk802net/ipv4/af_inet.csk->inuse = 1;
sk811net/ipv4/af_inet.crelease_sock(sk);
sk813net/ipv4/af_inet.csk->socket = NULL;
sk822net/ipv4/af_inet.cstruct sock *sk=(struct sock *)sock->data, *sk2;
sk830net/ipv4/af_inet.cif(sk->prot->bind)
sk831net/ipv4/af_inet.creturn sk->prot->bind(sk,uaddr, addr_len);
sk834net/ipv4/af_inet.cif (sk->state != TCP_CLOSE)
sk841net/ipv4/af_inet.cif (sk->num != 0) 
sk855net/ipv4/af_inet.csnum = get_new_socknum(sk->prot, 0);
sk874net/ipv4/af_inet.csk->rcv_saddr = addr->sin_addr.s_addr;
sk876net/ipv4/af_inet.csk->saddr = 0;  /* Use device */
sk878net/ipv4/af_inet.csk->saddr = addr->sin_addr.s_addr;
sk884net/ipv4/af_inet.cfor(sk2 = sk->prot->sock_array[snum & (SOCK_ARRAY_SIZE -1)];
sk890net/ipv4/af_inet.cif (!sk->reuse)
sk898net/ipv4/af_inet.cif (sk2->rcv_saddr != sk->rcv_saddr) 
sk908net/ipv4/af_inet.cremove_sock(sk);
sk913net/ipv4/af_inet.cput_sock(snum, sk);
sk914net/ipv4/af_inet.csk->dummy_th.source = ntohs(sk->num);
sk915net/ipv4/af_inet.csk->daddr = 0;
sk916net/ipv4/af_inet.csk->dummy_th.dest = 0;
sk918net/ipv4/af_inet.csk->ip_route_cache=NULL;
sk930net/ipv4/af_inet.cstruct sock *sk=(struct sock *)sock->data;
sk934net/ipv4/af_inet.cif (sock->state == SS_CONNECTING && tcp_connected(sk->state))
sk941net/ipv4/af_inet.cif (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && (flags & O_NONBLOCK))
sk943net/ipv4/af_inet.cif(sk->err!=0)
sk944net/ipv4/af_inet.creturn sock_error(sk);
sk950net/ipv4/af_inet.cif(inet_autobind(sk)!=0)
sk952net/ipv4/af_inet.cif (sk->prot->connect == NULL) 
sk954net/ipv4/af_inet.cerr = sk->prot->connect(sk, (struct sockaddr_in *)uaddr, addr_len);
sk960net/ipv4/af_inet.cif (sk->state > TCP_FIN_WAIT2 && sock->state==SS_CONNECTING)
sk963net/ipv4/af_inet.creturn sock_error(sk);
sk966net/ipv4/af_inet.cif (sk->state != TCP_ESTABLISHED &&(flags & O_NONBLOCK)) 
sk970net/ipv4/af_inet.cwhile(sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) 
sk972net/ipv4/af_inet.cinterruptible_sleep_on(sk->sleep);
sk980net/ipv4/af_inet.cif(sk->err && sk->protocol == IPPROTO_TCP)
sk984net/ipv4/af_inet.creturn sock_error(sk); /* set by tcp_err() */
sk990net/ipv4/af_inet.cif (sk->state != TCP_ESTABLISHED && sk->err) 
sk993net/ipv4/af_inet.creturn sock_error(sk);
sk1023net/ipv4/af_inet.cstruct sock *sk=(struct sock *)newsock->data;
sk1025net/ipv4/af_inet.csk->dead = 1;
sk1026net/ipv4/af_inet.cdestroy_sock(sk);
sk1090net/ipv4/af_inet.cstruct sock *sk;
sk1093net/ipv4/af_inet.csk = (struct sock *) sock->data;
sk1096net/ipv4/af_inet.cif (!tcp_connected(sk->state)) 
sk1098net/ipv4/af_inet.csin->sin_port = sk->dummy_th.dest;
sk1099net/ipv4/af_inet.csin->sin_addr.s_addr = sk->daddr;
sk1103net/ipv4/af_inet.c__u32 addr = sk->rcv_saddr;
sk1105net/ipv4/af_inet.caddr = sk->saddr;
sk1109net/ipv4/af_inet.csin->sin_port = sk->dummy_th.source;
sk1121net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;
sk1123net/ipv4/af_inet.cif (sk->prot->recvmsg == NULL) 
sk1125net/ipv4/af_inet.cif(sk->err)
sk1126net/ipv4/af_inet.creturn sock_error(sk);
sk1128net/ipv4/af_inet.cif(inet_autobind(sk)!=0)
sk1130net/ipv4/af_inet.creturn(sk->prot->recvmsg(sk, ubuf, size, noblock, flags,addr_len));
sk1137net/ipv4/af_inet.cstruct sock *sk = (struct sock *) sock->data;
sk1138net/ipv4/af_inet.cif (sk->shutdown & SEND_SHUTDOWN) 
sk1143net/ipv4/af_inet.cif (sk->prot->sendmsg == NULL) 
sk1145net/ipv4/af_inet.cif(sk->err)
sk1146net/ipv4/af_inet.creturn sock_error(sk);
sk1148net/ipv4/af_inet.cif(inet_autobind(sk)!=0)
sk1150net/ipv4/af_inet.creturn(sk->prot->sendmsg(sk, msg, size, noblock, flags));
sk1157net/ipv4/af_inet.cstruct sock *sk=(struct sock*)sock->data;
sk1168net/ipv4/af_inet.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sk1170net/ipv4/af_inet.cif (!tcp_connected(sk->state)) 
sk1172net/ipv4/af_inet.csk->shutdown |= how;
sk1173net/ipv4/af_inet.cif (sk->prot->shutdown)
sk1174net/ipv4/af_inet.csk->prot->shutdown(sk, how);
sk1181net/ipv4/af_inet.cstruct sock *sk=(struct sock *) sock->data;
sk1182net/ipv4/af_inet.cif (sk->prot->select == NULL) 
sk1186net/ipv4/af_inet.creturn(sk->prot->select(sk, sel_type, wait));
sk1201net/ipv4/af_inet.cstruct sock *sk=(struct sock *)sock->data;
sk1216net/ipv4/af_inet.csk->proc = pid;
sk1223net/ipv4/af_inet.cput_fs_long(sk->proc,(int *)arg);
sk1226net/ipv4/af_inet.cif(sk->stamp.tv_sec==0)
sk1231net/ipv4/af_inet.cmemcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval));
sk1278net/ipv4/af_inet.cif (sk->prot->ioctl==NULL) 
sk1280net/ipv4/af_inet.creturn(sk->prot->ioctl(sk, cmd, arg));
sk1359net/ipv4/af_inet.cstruct sock *get_sock_raw(struct sock *sk, 
sk1366net/ipv4/af_inet.cs=sk;
sk1388net/ipv4/af_inet.cstruct sock *get_sock_mcast(struct sock *sk, 
sk1407net/ipv4/af_inet.cs=sk;
sk533net/ipv4/arp.cif(skb->sk==NULL)
sk536net/ipv4/arp.cdev_queue_xmit(skb,skb->dev,skb->sk->priority);
sk233net/ipv4/icmp.cstruct sock *sk=icmp_socket.data;
sk237net/ipv4/icmp.cip_build_xmit(sk, icmp_glue_bits, icmp_param, 
sk711net/ipv4/icmp.cstruct sock *sk;
sk717net/ipv4/icmp.csk=icmp_socket.data;
sk718net/ipv4/icmp.csk->allocation=GFP_ATOMIC;
sk719net/ipv4/icmp.csk->num = 256;      /* Don't receive any data */
sk346net/ipv4/igmp.cint ip_mc_join_group(struct sock *sk , struct device *dev, unsigned long addr)
sk354net/ipv4/igmp.cif(sk->ip_mc_list==NULL)
sk356net/ipv4/igmp.cif((sk->ip_mc_list=(struct ip_mc_socklist *)kmalloc(sizeof(*sk->ip_mc_list), GFP_KERNEL))==NULL)
sk358net/ipv4/igmp.cmemset(sk->ip_mc_list,'\0',sizeof(*sk->ip_mc_list));
sk362net/ipv4/igmp.cif(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev)
sk364net/ipv4/igmp.cif(sk->ip_mc_list->multidev[i]==NULL)
sk370net/ipv4/igmp.csk->ip_mc_list->multiaddr[unused]=addr;
sk371net/ipv4/igmp.csk->ip_mc_list->multidev[unused]=dev;
sk380net/ipv4/igmp.cint ip_mc_leave_group(struct sock *sk, struct device *dev, unsigned long addr)
sk387net/ipv4/igmp.cif(sk->ip_mc_list==NULL)
sk392net/ipv4/igmp.cif(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev)
sk394net/ipv4/igmp.csk->ip_mc_list->multidev[i]=NULL;
sk406net/ipv4/igmp.cvoid ip_mc_drop_socket(struct sock *sk)
sk410net/ipv4/igmp.cif(sk->ip_mc_list==NULL)
sk415net/ipv4/igmp.cif(sk->ip_mc_list->multidev[i])
sk417net/ipv4/igmp.cip_mc_dec_group(sk->ip_mc_list->multidev[i], sk->ip_mc_list->multiaddr[i]);
sk418net/ipv4/igmp.csk->ip_mc_list->multidev[i]=NULL;
sk421net/ipv4/igmp.ckfree_s(sk->ip_mc_list,sizeof(*sk->ip_mc_list));
sk422net/ipv4/igmp.csk->ip_mc_list=NULL;
sk476net/ipv4/ip_fragment.cskb->sk = NULL;
sk577net/ipv4/ip_fragment.cskb->sk = NULL;
sk618net/ipv4/ip_fragment.cvoid ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag)
sk734net/ipv4/ip_fragment.cif (sk)
sk737net/ipv4/ip_fragment.csk->wmem_alloc += skb2->truesize;
sk738net/ipv4/ip_fragment.cskb2->sk=sk;
sk788net/ipv4/ip_fragment.cip_queue_xmit(sk, dev, skb2, 2);
sk874net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk);
sk979net/ipv4/ip_fw.ctcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb_ptr->sk);
sk156net/ipv4/ip_input.cextern void sort_send(struct sock *sk);
sk176net/ipv4/ip_input.cint ip_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk76net/ipv4/ip_output.cnewskb->sk=NULL;
sk183net/ipv4/ip_output.cif(MULTICAST(daddr) && *dev==NULL && skb->sk && *skb->sk->ip_mc_name)
sk184net/ipv4/ip_output.c*dev=dev_get(skb->sk->ip_mc_name);
sk318net/ipv4/ip_output.cvoid ip_queue_xmit(struct sock *sk, struct device *dev,
sk368net/ipv4/ip_output.cif (sk == NULL)
sk381net/ipv4/ip_output.cip_fragment(sk,skb,dev,0);
sk419net/ipv4/ip_output.csk->packets_out++;
sk430net/ipv4/ip_output.cif (sk->send_head == NULL)
sk432net/ipv4/ip_output.csk->send_tail = skb;
sk433net/ipv4/ip_output.csk->send_head = skb;
sk437net/ipv4/ip_output.csk->send_tail->link3 = skb;
sk438net/ipv4/ip_output.csk->send_tail = skb;
sk447net/ipv4/ip_output.cskb->sk = sk;
sk466net/ipv4/ip_output.cif(sk==NULL || sk->ip_mc_loop)
sk505net/ipv4/ip_output.cif (sk != NULL)
sk507net/ipv4/ip_output.cdev_queue_xmit(skb, dev, sk->priority);
sk516net/ipv4/ip_output.cif(sk)
sk517net/ipv4/ip_output.csk->err = ENETDOWN;
sk545net/ipv4/ip_output.cint ip_build_xmit(struct sock *sk,
sk571net/ipv4/ip_output.cif (opt && opt->srr && !sk->ip_hdrincl)
sk577net/ipv4/ip_output.cif(sk && MULTICAST(daddr) && *sk->ip_mc_name)
sk579net/ipv4/ip_output.cdev=dev_get(sk->ip_mc_name);
sk583net/ipv4/ip_output.cif (sk->saddr && (!LOOPBACK(sk->saddr) || LOOPBACK(daddr)))
sk584net/ipv4/ip_output.csaddr = sk->saddr;
sk595net/ipv4/ip_output.cif(sk->localroute || flags&MSG_DONTROUTE)
sk598net/ipv4/ip_output.crt = sk->ip_route_cache;
sk605net/ipv4/ip_output.csaddr=sk->ip_route_saddr;   
sk606net/ipv4/ip_output.cif(!rt || sk->ip_route_stamp != rt_stamp ||
sk607net/ipv4/ip_output.cdaddr!=sk->ip_route_daddr || sk->ip_route_local!=local ||
sk608net/ipv4/ip_output.c(sk->saddr && sk->saddr != saddr))
sk614net/ipv4/ip_output.csk->ip_route_local=local;
sk615net/ipv4/ip_output.csk->ip_route_daddr=daddr;
sk616net/ipv4/ip_output.csk->ip_route_saddr=saddr;
sk617net/ipv4/ip_output.csk->ip_route_stamp=rt_stamp;
sk618net/ipv4/ip_output.csk->ip_route_cache=rt;
sk619net/ipv4/ip_output.csk->ip_hcache_ver=NULL;
sk620net/ipv4/ip_output.csk->ip_hcache_state= 0;
sk630net/ipv4/ip_output.cif(rt->rt_dev->header_cache && sk->ip_hcache_state!= -1)
sk632net/ipv4/ip_output.cif(sk->ip_hcache_ver==NULL || sk->ip_hcache_stamp!=*sk->ip_hcache_ver)
sk633net/ipv4/ip_output.crt->rt_dev->header_cache(rt->rt_dev,sk,saddr,daddr);
sk636net/ipv4/ip_output.csk->ip_hcache_state= -1;
sk646net/ipv4/ip_output.cif (sk->saddr && (!LOOPBACK(sk->saddr) || LOOPBACK(daddr)))
sk647net/ipv4/ip_output.csaddr = sk->saddr;
sk666net/ipv4/ip_output.cif (!sk->ip_hdrincl && opt) 
sk678net/ipv4/ip_output.cstruct sk_buff *skb=sock_alloc_send_skb(sk, length+15+dev->hard_header_len,0, noblock, &error);
sk687net/ipv4/ip_output.cskb->sk=sk;
sk692net/ipv4/ip_output.cif(sk->ip_hcache_state>0)
sk694net/ipv4/ip_output.cmemcpy(skb_push(skb,dev->hard_header_len),sk->ip_hcache_data,dev->hard_header_len);
sk706net/ipv4/ip_output.cif(!sk->ip_hdrincl)
sk710net/ipv4/ip_output.ciph->tos=sk->ip_tos;
sk714net/ipv4/ip_output.ciph->ttl=sk->ip_ttl;
sk742net/ipv4/ip_output.cdev_queue_xmit(skb,dev,sk->priority);
sk751net/ipv4/ip_output.cif (sk && !sk->ip_hdrincl && opt) 
sk760net/ipv4/ip_output.cif(!sk->ip_hdrincl)
sk800net/ipv4/ip_output.cif (sk->ip_hdrincl && offset > 0)
sk829net/ipv4/ip_output.cskb = sock_alloc_send_skb(sk, fraglen+15, 0, noblock, &error);
sk847net/ipv4/ip_output.cskb->sk = sk;
sk861net/ipv4/ip_output.cif(sk->ip_hcache_state>0)
sk863net/ipv4/ip_output.cmemcpy(skb_push(skb,dev->hard_header_len),sk->ip_hcache_data, dev->hard_header_len);
sk883net/ipv4/ip_output.cif(!sk->ip_hdrincl) 
sk893net/ipv4/ip_output.ciph->tos = sk->ip_tos;
sk900net/ipv4/ip_output.ciph->ttl = sk->ip_mc_ttl;
sk903net/ipv4/ip_output.ciph->ttl = sk->ip_ttl;
sk958net/ipv4/ip_output.cif(sk==NULL || sk->ip_mc_loop)
sk1002net/ipv4/ip_output.cdev_queue_xmit(skb, dev, sk->priority);
sk1018net/ipv4/ip_output.cif(sk!=NULL)
sk1019net/ipv4/ip_output.csk->err=ENETDOWN;
sk111net/ipv4/ip_sockglue.cint ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen)
sk137net/ipv4/ip_sockglue.creturn ip_mroute_setsockopt(sk,optname,optval,optlen);
sk173net/ipv4/ip_sockglue.cold_opt = sk->opt;
sk174net/ipv4/ip_sockglue.csk->opt = opt;
sk183net/ipv4/ip_sockglue.csk->ip_tos=val;
sk185net/ipv4/ip_sockglue.csk->priority=SOPRI_INTERACTIVE;
sk187net/ipv4/ip_sockglue.csk->priority=SOPRI_BACKGROUND;
sk192net/ipv4/ip_sockglue.csk->ip_ttl=val;
sk195net/ipv4/ip_sockglue.cif(sk->type!=SOCK_RAW)
sk197net/ipv4/ip_sockglue.csk->ip_hdrincl=val?1:0;
sk202net/ipv4/ip_sockglue.csk->ip_mc_ttl=(int)ucval;
sk209net/ipv4/ip_sockglue.csk->ip_mc_loop=(int)ucval;
sk234net/ipv4/ip_sockglue.csk->ip_mc_name[0]=0;
sk250net/ipv4/ip_sockglue.cstrcpy(sk->ip_mc_name,dev->name);
sk312net/ipv4/ip_sockglue.creturn ip_mc_join_group(sk,dev,mreq.imr_multiaddr.s_addr);
sk361net/ipv4/ip_sockglue.creturn ip_mc_leave_group(sk,dev,mreq.imr_multiaddr.s_addr);
sk416net/ipv4/ip_sockglue.cint ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen)
sk429net/ipv4/ip_sockglue.creturn ip_mroute_getsockopt(sk,optname,optval,optlen);
sk444net/ipv4/ip_sockglue.cif (sk->opt)
sk445net/ipv4/ip_sockglue.cmemcpy(optbuf, sk->opt, sizeof(struct options)+sk->opt->optlen);
sk489net/ipv4/ip_sockglue.cval=sk->ip_tos;
sk492net/ipv4/ip_sockglue.cval=sk->ip_ttl;
sk495net/ipv4/ip_sockglue.cval=sk->ip_hdrincl;
sk499net/ipv4/ip_sockglue.cval=sk->ip_mc_ttl;
sk502net/ipv4/ip_sockglue.cval=sk->ip_mc_loop;
sk508net/ipv4/ip_sockglue.clen=strlen(sk->ip_mc_name);
sk513net/ipv4/ip_sockglue.cmemcpy_tofs((void *)optval,sk->ip_mc_name, len);
sk285net/ipv4/ipmr.cskb->sk=NULL;
sk425net/ipv4/ipmr.cint ip_mroute_setsockopt(struct sock *sk,int optname,char *optval,int optlen)
sk433net/ipv4/ipmr.cif(sk!=mroute_socket)
sk440net/ipv4/ipmr.cif(sk->type!=SOCK_RAW || sk->num!=IPPROTO_IGMP)
sk450net/ipv4/ipmr.cmroute_socket=sk;
sk454net/ipv4/ipmr.cmroute_close(sk);
sk566net/ipv4/ipmr.cint ip_mroute_getsockopt(struct sock *sk,int optname,char *optval,int *optlen)
sk571net/ipv4/ipmr.cif(sk!=mroute_socket)
sk594net/ipv4/ipmr.cint ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk637net/ipv4/ipmr.cvoid mroute_close(struct sock *sk)
sk76net/ipv4/packet.cstruct sock *sk;
sk83net/ipv4/packet.csk = (struct sock *) pt->data;  
sk103net/ipv4/packet.cif(sock_queue_rcv_skb(sk,skb)<0)
sk105net/ipv4/packet.cskb->sk = NULL;
sk107net/ipv4/packet.crelease_sock(sk);    
sk123net/ipv4/packet.cstatic int packet_sendmsg(struct sock *sk, struct msghdr *msg, int len,
sk168net/ipv4/packet.cskb = sock_wmalloc(sk, len, 0, GFP_KERNEL);
sk185net/ipv4/packet.cskb->sk = sk;
sk195net/ipv4/packet.cdev_queue_xmit(skb, dev, sk->priority);
sk208net/ipv4/packet.cstatic void packet_close(struct sock *sk, int timeout)
sk214net/ipv4/packet.csk->inuse = 1;
sk215net/ipv4/packet.csk->state = TCP_CLOSE;
sk221net/ipv4/packet.cunregister_netdevice_notifier(&sk->protinfo.af_packet.notifier);
sk223net/ipv4/packet.cif(sk->protinfo.af_packet.prot_hook)
sk229net/ipv4/packet.cdev_remove_pack((struct packet_type *)sk->protinfo.af_packet.prot_hook);
sk235net/ipv4/packet.ckfree_s((void *)sk->protinfo.af_packet.prot_hook, sizeof(struct packet_type));
sk236net/ipv4/packet.csk->protinfo.af_packet.prot_hook = NULL;
sk239net/ipv4/packet.crelease_sock(sk);
sk246net/ipv4/packet.cint packet_attach(struct sock *sk)
sk253net/ipv4/packet.cp->type = sk->num;
sk254net/ipv4/packet.cp->data = (void *)sk;
sk262net/ipv4/packet.csk->protinfo.af_packet.prot_hook = p;
sk270net/ipv4/packet.cstatic int packet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
sk289net/ipv4/packet.cif((sk->protinfo.af_packet.bound_dev=dev_get(dev))==NULL)
sk294net/ipv4/packet.cif(!(sk->protinfo.af_packet.bound_dev->flags&IFF_UP))
sk304net/ipv4/packet.cmemcpy(sk->protinfo.af_packet.device_name,dev,15);
sk305net/ipv4/packet.cif(sk->protinfo.af_packet.prot_hook)
sk306net/ipv4/packet.cdev_remove_pack(sk->protinfo.af_packet.prot_hook);
sk309net/ipv4/packet.cint err=packet_attach(sk);
sk316net/ipv4/packet.csk->protinfo.af_packet.prot_hook->dev=sk->protinfo.af_packet.bound_dev;
sk317net/ipv4/packet.cdev_add_pack(sk->protinfo.af_packet.prot_hook);
sk351net/ipv4/packet.cstatic int packet_init(struct sock *sk)
sk357net/ipv4/packet.cint err=packet_attach(sk);
sk365net/ipv4/packet.csk->protinfo.af_packet.notifier.notifier_call=packet_unbind;
sk366net/ipv4/packet.csk->protinfo.af_packet.notifier.priority=0;
sk368net/ipv4/packet.cregister_netdevice_notifier(&sk->protinfo.af_packet.notifier);
sk379net/ipv4/packet.cint packet_recvmsg(struct sock *sk, struct msghdr *msg, int len,
sk387net/ipv4/packet.cif (sk->shutdown & RCV_SHUTDOWN) 
sk394net/ipv4/packet.cif(sk->protinfo.af_packet.prot_hook==NULL)
sk411net/ipv4/packet.cskb=skb_recv_datagram(sk,flags,noblock,&err);
sk430net/ipv4/packet.csk->stamp=skb->stamp;
sk453net/ipv4/packet.crelease_sock(sk);
sk81net/ipv4/raw.cstruct sock *sk;
sk85net/ipv4/raw.csk = (struct sock *) protocol->data;
sk86net/ipv4/raw.cif (sk == NULL) 
sk92net/ipv4/raw.cif (sk->cong_window > 1) sk->cong_window = sk->cong_window/2;
sk98net/ipv4/raw.csk->err = EPROTO;
sk99net/ipv4/raw.csk->error_report(sk);
sk104net/ipv4/raw.csk->err = icmp_err_convert[code & 0xff].errno;
sk105net/ipv4/raw.csk->error_report(sk);
sk118net/ipv4/raw.cint raw_rcv(struct sock *sk, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr)
sk121net/ipv4/raw.cskb->sk = sk;
sk131net/ipv4/raw.cif(sock_queue_rcv_skb(sk,skb)<0)
sk134net/ipv4/raw.cskb->sk=NULL;
sk140net/ipv4/raw.crelease_sock(sk);
sk180net/ipv4/raw.cstatic int raw_sendto(struct sock *sk, const unsigned char *from, 
sk209net/ipv4/raw.cif (sk->state != TCP_ESTABLISHED) 
sk212net/ipv4/raw.csin.sin_port = sk->protocol;
sk213net/ipv4/raw.csin.sin_addr.s_addr = sk->daddr;
sk216net/ipv4/raw.csin.sin_port = sk->protocol;
sk221net/ipv4/raw.cif (sk->broadcast == 0 && ip_chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
sk224net/ipv4/raw.cif(sk->ip_hdrincl)
sk228net/ipv4/raw.cerr=ip_build_xmit(sk, raw_getrawfrag, from, len, sin.sin_addr.s_addr, 0, sk->opt, flags, sin.sin_port, noblock);
sk234net/ipv4/raw.cerr=ip_build_xmit(sk, raw_getfrag, from, len, sin.sin_addr.s_addr, 0, sk->opt, flags, sin.sin_port, noblock);
sk243net/ipv4/raw.cstatic int raw_sendmsg(struct sock *sk, struct msghdr *msg,
sk247net/ipv4/raw.creturn raw_sendto(sk,msg->msg_iov[0].iov_base,len, noblock, flags, msg->msg_name, msg->msg_namelen);
sk267net/ipv4/raw.cerr=raw_sendto(sk,buf,len, noblock, flags, msg->msg_name, msg->msg_namelen);
sk274net/ipv4/raw.cstatic void raw_close(struct sock *sk, int timeout)
sk276net/ipv4/raw.csk->state = TCP_CLOSE;
sk278net/ipv4/raw.cif(sk==mroute_socket)
sk280net/ipv4/raw.cmroute_close(sk);
sk287net/ipv4/raw.cstatic int raw_init(struct sock *sk)
sk298net/ipv4/raw.cint raw_recvmsg(struct sock *sk, struct msghdr *msg, int len,
sk309net/ipv4/raw.cif (sk->shutdown & RCV_SHUTDOWN) 
sk315net/ipv4/raw.cskb=skb_recv_datagram(sk,flags,noblock,&err);
sk322net/ipv4/raw.csk->stamp=skb->stamp;
sk331net/ipv4/raw.crelease_sock(sk);
sk470net/ipv4/tcp.cstatic void tcp_close(struct sock *sk, int timeout);
sk496net/ipv4/tcp.cstatic __inline__ void tcp_set_state(struct sock *sk, int state)
sk498net/ipv4/tcp.cif(sk->state==TCP_ESTABLISHED)
sk501net/ipv4/tcp.cif(sk->debug)
sk502net/ipv4/tcp.cprintk("TCP sk=%p, State %s -> %s\n",sk, statename[sk->state],statename[state]);
sk507net/ipv4/tcp.cif(state==TCP_ESTABLISHED && sk->state==TCP_SYN_RECV)
sk511net/ipv4/tcp.csk->state=state;
sk514net/ipv4/tcp.cif(sk->state==TCP_CLOSE)
sk533net/ipv4/tcp.cint tcp_select_window(struct sock *sk)
sk535net/ipv4/tcp.cint new_window = sock_rspace(sk);
sk537net/ipv4/tcp.cif(sk->window_clamp)
sk538net/ipv4/tcp.cnew_window=min(sk->window_clamp,new_window);
sk552net/ipv4/tcp.cif (new_window < min(sk->mss, MAX_WINDOW/2) || new_window < sk->window)
sk553net/ipv4/tcp.creturn(sk->window);
sk569net/ipv4/tcp.cif(p->sk->state == TCP_ESTABLISHED || p->sk->state >= TCP_FIN_WAIT1)
sk601net/ipv4/tcp.cstatic void tcp_close_pending (struct sock *sk) 
sk605net/ipv4/tcp.cwhile ((skb = skb_dequeue(&sk->receive_queue)) != NULL) 
sk607net/ipv4/tcp.cskb->sk->dead=1;
sk608net/ipv4/tcp.ctcp_close(skb->sk, 0);
sk618net/ipv4/tcp.cstatic void tcp_time_wait(struct sock *sk)
sk620net/ipv4/tcp.ctcp_set_state(sk,TCP_TIME_WAIT);
sk621net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk622net/ipv4/tcp.cif (!sk->dead)
sk623net/ipv4/tcp.csk->state_change(sk);
sk624net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk632net/ipv4/tcp.cvoid tcp_do_retransmit(struct sock *sk, int all)
sk640net/ipv4/tcp.cprot = sk->prot;
sk641net/ipv4/tcp.cskb = sk->send_head;
sk691net/ipv4/tcp.cif(skb->sk)
sk693net/ipv4/tcp.cskb->sk->err=ENETUNREACH;
sk694net/ipv4/tcp.cskb->sk->error_report(skb->sk);
sk722net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
sk723net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
sk724net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
sk740net/ipv4/tcp.cif (sk && !skb_device_locked(skb))
sk746net/ipv4/tcp.cdev_queue_xmit(skb, dev, sk->priority);
sk756net/ipv4/tcp.csk->prot->retransmits ++;
sk771net/ipv4/tcp.cif (ct >= sk->cong_window)
sk781net/ipv4/tcp.cstatic void reset_xmit_timer(struct sock *sk, int why, unsigned long when)
sk783net/ipv4/tcp.cdel_timer(&sk->retransmit_timer);
sk784net/ipv4/tcp.csk->ip_xmit_timeout = why;
sk790net/ipv4/tcp.csk->retransmit_timer.expires=jiffies+when;
sk791net/ipv4/tcp.cadd_timer(&sk->retransmit_timer);
sk802net/ipv4/tcp.cvoid tcp_retransmit_time(struct sock *sk, int all)
sk804net/ipv4/tcp.ctcp_do_retransmit(sk, all);
sk823net/ipv4/tcp.csk->retransmits++;
sk824net/ipv4/tcp.csk->prot->retransmits++;
sk825net/ipv4/tcp.csk->backoff++;
sk826net/ipv4/tcp.csk->rto = min(sk->rto << 1, 120*HZ);
sk827net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk838net/ipv4/tcp.cstatic void tcp_retransmit(struct sock *sk, int all)
sk842net/ipv4/tcp.ctcp_retransmit_time(sk, all);
sk846net/ipv4/tcp.csk->ssthresh = sk->cong_window >> 1; /* remember window where we lost */
sk848net/ipv4/tcp.csk->cong_count = 0;
sk850net/ipv4/tcp.csk->cong_window = 1;
sk853net/ipv4/tcp.ctcp_retransmit_time(sk, all);
sk860net/ipv4/tcp.cstatic int tcp_write_timeout(struct sock *sk)
sk865net/ipv4/tcp.cif ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7))
sk866net/ipv4/tcp.c|| (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) 
sk872net/ipv4/tcp.carp_destroy (sk->daddr, 0);
sk880net/ipv4/tcp.cif(sk->retransmits > TCP_SYN_RETRIES && sk->state==TCP_SYN_SENT)
sk882net/ipv4/tcp.csk->err=ETIMEDOUT;
sk883net/ipv4/tcp.csk->error_report(sk);
sk884net/ipv4/tcp.cdel_timer(&sk->retransmit_timer);
sk886net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk888net/ipv4/tcp.crelease_sock(sk);
sk894net/ipv4/tcp.cif (sk->retransmits > TCP_RETR2) 
sk896net/ipv4/tcp.csk->err = ETIMEDOUT;
sk897net/ipv4/tcp.csk->error_report(sk);
sk898net/ipv4/tcp.cdel_timer(&sk->retransmit_timer);
sk902net/ipv4/tcp.cif (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2 || sk->state == TCP_CLOSING ) 
sk904net/ipv4/tcp.ctcp_set_state(sk,TCP_TIME_WAIT);
sk905net/ipv4/tcp.creset_msl_timer (sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk912net/ipv4/tcp.ctcp_set_state(sk, TCP_CLOSE);
sk913net/ipv4/tcp.crelease_sock(sk);
sk932net/ipv4/tcp.cstruct sock *sk = (struct sock*)data;
sk933net/ipv4/tcp.cint why = sk->ip_xmit_timeout;
sk940net/ipv4/tcp.cif (sk->inuse || in_bh) 
sk943net/ipv4/tcp.csk->retransmit_timer.expires = jiffies+HZ;
sk944net/ipv4/tcp.cadd_timer(&sk->retransmit_timer);
sk949net/ipv4/tcp.csk->inuse = 1;
sk954net/ipv4/tcp.cif (sk->ack_backlog && !sk->zapped) 
sk956net/ipv4/tcp.csk->prot->read_wakeup (sk);
sk957net/ipv4/tcp.cif (! sk->dead)
sk958net/ipv4/tcp.csk->data_ready(sk,0);
sk967net/ipv4/tcp.ctcp_send_probe0(sk);
sk968net/ipv4/tcp.ctcp_write_timeout(sk);
sk981net/ipv4/tcp.cskb = sk->send_head;
sk992net/ipv4/tcp.cif (jiffies < skb->when + sk->rto) 
sk994net/ipv4/tcp.creset_xmit_timer (sk, TIME_WRITE, skb->when + sk->rto - jiffies);
sk1002net/ipv4/tcp.csk->retransmits++;
sk1003net/ipv4/tcp.csk->prot->retransmits++;
sk1004net/ipv4/tcp.csk->prot->retransmit (sk, 0);
sk1005net/ipv4/tcp.ctcp_write_timeout(sk);
sk1015net/ipv4/tcp.creset_xmit_timer (sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk1018net/ipv4/tcp.cif (sk->prot->write_wakeup)
sk1019net/ipv4/tcp.csk->prot->write_wakeup (sk);
sk1020net/ipv4/tcp.csk->retransmits++;
sk1021net/ipv4/tcp.csk->prot->retransmits++;
sk1022net/ipv4/tcp.ctcp_write_timeout(sk);
sk1028net/ipv4/tcp.crelease_sock(sk);
sk1044net/ipv4/tcp.cstruct sock *sk;
sk1051net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
sk1053net/ipv4/tcp.cif (sk == NULL) 
sk1063net/ipv4/tcp.cif (sk->cong_window > 4)
sk1064net/ipv4/tcp.csk->cong_window--;
sk1070net/ipv4/tcp.csk->err=EPROTO;
sk1071net/ipv4/tcp.csk->error_report(sk);
sk1079net/ipv4/tcp.cif (code < 13 && (icmp_err_convert[code].fatal || sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV))
sk1081net/ipv4/tcp.csk->err = icmp_err_convert[code].errno;
sk1082net/ipv4/tcp.cif (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) 
sk1085net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk1086net/ipv4/tcp.csk->error_report(sk);    /* Wake people up to see the error (see connect in sock.c) */
sk1099net/ipv4/tcp.cstatic int tcp_readable(struct sock *sk)
sk1107net/ipv4/tcp.cif(sk && sk->debug)
sk1108net/ipv4/tcp.cprintk("tcp_readable: %p - ",sk);
sk1112net/ipv4/tcp.cif (sk == NULL || (skb = skb_peek(&sk->receive_queue)) == NULL)
sk1115net/ipv4/tcp.cif(sk && sk->debug) 
sk1120net/ipv4/tcp.ccounted = sk->copied_seq;  /* Where we are at the moment */
sk1162net/ipv4/tcp.cwhile(skb != (struct sk_buff *)&sk->receive_queue);
sk1165net/ipv4/tcp.cif(sk->debug)
sk1173net/ipv4/tcp.cstatic int tcp_listen_select(struct sock *sk, int sel_type, select_table *wait)
sk1178net/ipv4/tcp.csk->inuse = 1;
sk1179net/ipv4/tcp.cretval = (tcp_find_established(sk) != NULL);
sk1180net/ipv4/tcp.crelease_sock(sk);
sk1196net/ipv4/tcp.cstatic int tcp_select(struct sock *sk, int sel_type, select_table *wait)
sk1198net/ipv4/tcp.cif (sk->state == TCP_LISTEN)
sk1199net/ipv4/tcp.creturn tcp_listen_select(sk, sel_type, wait);
sk1203net/ipv4/tcp.cif (sk->err)
sk1205net/ipv4/tcp.cif (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
sk1208net/ipv4/tcp.cif (sk->shutdown & RCV_SHUTDOWN)
sk1211net/ipv4/tcp.cif (sk->acked_seq == sk->copied_seq)
sk1214net/ipv4/tcp.cif (sk->urg_seq != sk->copied_seq ||
sk1215net/ipv4/tcp.csk->acked_seq != sk->copied_seq+1 ||
sk1216net/ipv4/tcp.csk->urginline || !sk->urg_data)
sk1221net/ipv4/tcp.cif (sk->err)
sk1223net/ipv4/tcp.cif (sk->shutdown & SEND_SHUTDOWN) 
sk1225net/ipv4/tcp.cif (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
sk1232net/ipv4/tcp.cif (sock_wspace(sk) < sk->mtu+128+sk->prot->max_header)
sk1237net/ipv4/tcp.cif (sk->urg_data)
sk1241net/ipv4/tcp.cselect_wait(sk->sleep, wait);
sk1245net/ipv4/tcp.cint tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk1258net/ipv4/tcp.cif (sk->state == TCP_LISTEN) 
sk1261net/ipv4/tcp.csk->inuse = 1;
sk1262net/ipv4/tcp.camount = tcp_readable(sk);
sk1263net/ipv4/tcp.crelease_sock(sk);
sk1272net/ipv4/tcp.cint answ = sk->urg_data && sk->urg_seq == sk->copied_seq;
sk1284net/ipv4/tcp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk1285net/ipv4/tcp.camount = sock_wspace(sk);
sk1314net/ipv4/tcp.cunsigned long daddr, int len, struct sock *sk)
sk1327net/ipv4/tcp.cstatic void tcp_send_skb(struct sock *sk, struct sk_buff *skb)
sk1381net/ipv4/tcp.cif (after(skb->h.seq, sk->window_seq) ||
sk1382net/ipv4/tcp.c(sk->retransmits && sk->ip_xmit_timeout == TIME_WRITE) ||
sk1383net/ipv4/tcp.csk->packets_out >= sk->cong_window) 
sk1393net/ipv4/tcp.cskb_queue_tail(&sk->write_queue, skb);
sk1402net/ipv4/tcp.cif (before(sk->window_seq, sk->write_queue.next->h.seq) &&
sk1403net/ipv4/tcp.csk->send_head == NULL && sk->ack_backlog == 0)
sk1404net/ipv4/tcp.creset_xmit_timer(sk, TIME_PROBE0, sk->rto);
sk1412net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
sk1413net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
sk1415net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
sk1417net/ipv4/tcp.csk->sent_seq = sk->write_seq;
sk1425net/ipv4/tcp.csk->prot->queue_xmit(sk, skb->dev, skb, 0);
sk1433net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk1446net/ipv4/tcp.cstruct sk_buff * tcp_dequeue_partial(struct sock * sk)
sk1453net/ipv4/tcp.cskb = sk->partial;
sk1455net/ipv4/tcp.csk->partial = NULL;
sk1456net/ipv4/tcp.cdel_timer(&sk->partial_timer);
sk1466net/ipv4/tcp.cstatic void tcp_send_partial(struct sock *sk)
sk1470net/ipv4/tcp.cif (sk == NULL)
sk1472net/ipv4/tcp.cwhile ((skb = tcp_dequeue_partial(sk)) != NULL)
sk1473net/ipv4/tcp.ctcp_send_skb(sk, skb);
sk1480net/ipv4/tcp.cvoid tcp_enqueue_partial(struct sk_buff * skb, struct sock * sk)
sk1487net/ipv4/tcp.ctmp = sk->partial;
sk1489net/ipv4/tcp.cdel_timer(&sk->partial_timer);
sk1490net/ipv4/tcp.csk->partial = skb;
sk1491net/ipv4/tcp.cinit_timer(&sk->partial_timer);
sk1495net/ipv4/tcp.csk->partial_timer.expires = jiffies+HZ;
sk1496net/ipv4/tcp.csk->partial_timer.function = (void (*)(unsigned long)) tcp_send_partial;
sk1497net/ipv4/tcp.csk->partial_timer.data = (unsigned long) sk;
sk1498net/ipv4/tcp.cadd_timer(&sk->partial_timer);
sk1501net/ipv4/tcp.ctcp_send_skb(sk, tmp);
sk1510net/ipv4/tcp.cstruct sock *sk,
sk1518net/ipv4/tcp.cif(sk->zapped)
sk1526net/ipv4/tcp.cbuff = sock_wmalloc(sk, MAX_ACK_SIZE, 1, GFP_ATOMIC);
sk1536net/ipv4/tcp.csk->ack_backlog++;
sk1537net/ipv4/tcp.cif (sk->ip_xmit_timeout != TIME_WRITE && tcp_connected(sk->state)) 
sk1539net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, HZ);
sk1548net/ipv4/tcp.cbuff->sk = sk;
sk1549net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk1555net/ipv4/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev,
sk1556net/ipv4/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl);
sk1560net/ipv4/tcp.csock_wfree(sk, buff);
sk1575net/ipv4/tcp.csk->window = tcp_select_window(sk);
sk1576net/ipv4/tcp.ct1->window = ntohs(sk->window);
sk1591net/ipv4/tcp.cif (ack == sk->acked_seq) 
sk1593net/ipv4/tcp.csk->ack_backlog = 0;
sk1594net/ipv4/tcp.csk->bytes_rcv = 0;
sk1595net/ipv4/tcp.csk->ack_timed = 0;
sk1596net/ipv4/tcp.cif (sk->send_head == NULL && skb_peek(&sk->write_queue) == NULL
sk1597net/ipv4/tcp.c&& sk->ip_xmit_timeout == TIME_WRITE) 
sk1599net/ipv4/tcp.cif(sk->keepopen) {
sk1600net/ipv4/tcp.creset_xmit_timer(sk,TIME_KEEPOPEN,TCP_TIMEOUT_LEN);
sk1602net/ipv4/tcp.cdelete_timer(sk);
sk1613net/ipv4/tcp.ctcp_send_check(t1, sk->saddr, daddr, sizeof(*t1), sk);
sk1614net/ipv4/tcp.cif (sk->debug)
sk1617net/ipv4/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk1625net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
sk1628net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
sk1629net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
sk1634net/ipv4/tcp.csk->ack_backlog = 0;
sk1635net/ipv4/tcp.csk->bytes_rcv = 0;
sk1636net/ipv4/tcp.csk->ack_timed = 0;
sk1637net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
sk1638net/ipv4/tcp.csk->window = tcp_select_window(sk);
sk1639net/ipv4/tcp.cth->window = htons(sk->window);
sk1649net/ipv4/tcp.cstatic int tcp_sendmsg(struct sock *sk, struct msghdr *msg,
sk1672net/ipv4/tcp.cif(sk->state == TCP_CLOSE)
sk1678net/ipv4/tcp.cif (addr->sin_port != sk->dummy_th.dest) 
sk1680net/ipv4/tcp.cif (addr->sin_addr.s_addr != sk->daddr) 
sk1692net/ipv4/tcp.csk->inuse=1;
sk1693net/ipv4/tcp.cprot = sk->prot;
sk1696net/ipv4/tcp.cif (sk->err) 
sk1698net/ipv4/tcp.crelease_sock(sk);
sk1701net/ipv4/tcp.creturn sock_error(sk);
sk1708net/ipv4/tcp.cif (sk->shutdown & SEND_SHUTDOWN) 
sk1710net/ipv4/tcp.crelease_sock(sk);
sk1711net/ipv4/tcp.csk->err = EPIPE;
sk1714net/ipv4/tcp.csk->err = 0;
sk1722net/ipv4/tcp.cwhile(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) 
sk1724net/ipv4/tcp.cif (sk->err) 
sk1726net/ipv4/tcp.crelease_sock(sk);
sk1729net/ipv4/tcp.creturn sock_error(sk);
sk1732net/ipv4/tcp.cif (sk->state != TCP_SYN_SENT && sk->state != TCP_SYN_RECV) 
sk1734net/ipv4/tcp.crelease_sock(sk);
sk1738net/ipv4/tcp.cif (sk->err) 
sk1739net/ipv4/tcp.creturn sock_error(sk);
sk1741net/ipv4/tcp.cif (sk->keepopen) 
sk1750net/ipv4/tcp.crelease_sock(sk);
sk1756net/ipv4/tcp.crelease_sock(sk);
sk1759net/ipv4/tcp.cif (sk->state != TCP_ESTABLISHED &&
sk1760net/ipv4/tcp.csk->state != TCP_CLOSE_WAIT && sk->err == 0) 
sk1762net/ipv4/tcp.cinterruptible_sleep_on(sk->sleep);  
sk1771net/ipv4/tcp.csk->inuse = 1;
sk1791net/ipv4/tcp.cif ((skb = tcp_dequeue_partial(sk)) != NULL) 
sk1802net/ipv4/tcp.ccopy = min(sk->mss - (skb->len - hdrlen), seglen);
sk1806net/ipv4/tcp.cprintk("TCP: **bug**: \"copy\" <= 0: %d - (%ld - %d) <= %d\n", sk->mss, skb->len, hdrlen, seglen);
sk1813net/ipv4/tcp.csk->write_seq += copy;
sk1816net/ipv4/tcp.cif ((skb->len - hdrlen) >= sk->mss ||
sk1817net/ipv4/tcp.c(flags & MSG_OOB) || !sk->packets_out)
sk1818net/ipv4/tcp.ctcp_send_skb(sk, skb);
sk1820net/ipv4/tcp.ctcp_enqueue_partial(skb, sk);
sk1836net/ipv4/tcp.ccopy = sk->window_seq - sk->write_seq;
sk1837net/ipv4/tcp.cif (copy <= 0 || copy < (sk->max_window >> 1) || copy > sk->mss)
sk1838net/ipv4/tcp.ccopy = sk->mss;
sk1847net/ipv4/tcp.cif (copy < sk->mss && !(flags & MSG_OOB)) 
sk1852net/ipv4/tcp.crelease_sock(sk);
sk1857net/ipv4/tcp.cskb = sock_wmalloc(sk, sk->mtu + 128 + prot->max_header + 15, 0, GFP_KERNEL);
sk1858net/ipv4/tcp.csk->inuse = 1;
sk1866net/ipv4/tcp.crelease_sock(sk);
sk1867net/ipv4/tcp.cskb = sock_wmalloc(sk, copy + prot->max_header + 15 , 0, GFP_KERNEL);
sk1868net/ipv4/tcp.csk->inuse = 1;
sk1877net/ipv4/tcp.csk->socket->flags |= SO_NOSPACE;
sk1880net/ipv4/tcp.crelease_sock(sk);
sk1890net/ipv4/tcp.ctmp = sk->wmem_alloc;
sk1891net/ipv4/tcp.crelease_sock(sk);
sk1896net/ipv4/tcp.cif (tmp <= sk->wmem_alloc &&
sk1897net/ipv4/tcp.c(sk->state == TCP_ESTABLISHED||sk->state == TCP_CLOSE_WAIT)
sk1898net/ipv4/tcp.c&& sk->err == 0) 
sk1900net/ipv4/tcp.csk->socket->flags &= ~SO_NOSPACE;
sk1901net/ipv4/tcp.cinterruptible_sleep_on(sk->sleep);
sk1910net/ipv4/tcp.csk->inuse = 1;
sk1915net/ipv4/tcp.cskb->sk = sk;
sk1917net/ipv4/tcp.cskb->localroute = sk->localroute|(flags&MSG_DONTROUTE);
sk1924net/ipv4/tcp.ctmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev,
sk1925net/ipv4/tcp.cIPPROTO_TCP, sk->opt, skb->truesize,sk->ip_tos,sk->ip_ttl);
sk1928net/ipv4/tcp.csock_wfree(sk, skb);
sk1929net/ipv4/tcp.crelease_sock(sk);
sk1936net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
sk1939net/ipv4/tcp.csock_wfree(sk, skb);
sk1940net/ipv4/tcp.crelease_sock(sk);
sk1959net/ipv4/tcp.csk->write_seq += copy;
sk1961net/ipv4/tcp.cif (send_tmp != NULL && sk->packets_out) 
sk1963net/ipv4/tcp.ctcp_enqueue_partial(send_tmp, sk);
sk1966net/ipv4/tcp.ctcp_send_skb(sk, skb);
sk1969net/ipv4/tcp.csk->err = 0;
sk1982net/ipv4/tcp.cif(sk->partial && ((!sk->packets_out) 
sk1984net/ipv4/tcp.c|| (sk->nonagle && before(sk->write_seq , sk->window_seq))
sk1986net/ipv4/tcp.ctcp_send_partial(sk);
sk1988net/ipv4/tcp.crelease_sock(sk);
sk1997net/ipv4/tcp.cstatic void tcp_read_wakeup(struct sock *sk)
sk2004net/ipv4/tcp.cif (!sk->ack_backlog) 
sk2011net/ipv4/tcp.cif ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT))
sk2025net/ipv4/tcp.cbuff = sock_wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC);
sk2029net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, HZ);
sk2033net/ipv4/tcp.cbuff->sk = sk;
sk2034net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk2040net/ipv4/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk2041net/ipv4/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl);
sk2045net/ipv4/tcp.csock_wfree(sk, buff);
sk2051net/ipv4/tcp.cmemcpy(t1,(void *) &sk->dummy_th, sizeof(*t1));
sk2052net/ipv4/tcp.ct1->seq = htonl(sk->sent_seq);
sk2060net/ipv4/tcp.csk->ack_backlog = 0;
sk2061net/ipv4/tcp.csk->bytes_rcv = 0;
sk2062net/ipv4/tcp.csk->window = tcp_select_window(sk);
sk2063net/ipv4/tcp.ct1->window = ntohs(sk->window);
sk2064net/ipv4/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk2066net/ipv4/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk2067net/ipv4/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk2079net/ipv4/tcp.cstatic void cleanup_rbuf(struct sock *sk)
sk2086net/ipv4/tcp.cif(sk->debug)
sk2087net/ipv4/tcp.cprintk("cleaning rbuf for sk=%p\n", sk);
sk2092net/ipv4/tcp.cleft = sock_rspace(sk);
sk2099net/ipv4/tcp.cwhile((skb=skb_peek(&sk->receive_queue)) != NULL) 
sk2104net/ipv4/tcp.cskb->sk = sk;
sk2117net/ipv4/tcp.cif(sk->debug)
sk2118net/ipv4/tcp.cprintk("sk->rspace = %lu, was %lu\n", sock_rspace(sk),
sk2120net/ipv4/tcp.cif ((rspace=sock_rspace(sk)) != left) 
sk2132net/ipv4/tcp.csk->ack_backlog++;
sk2142net/ipv4/tcp.cif (rspace > (sk->window - sk->bytes_rcv + sk->mtu)) 
sk2145net/ipv4/tcp.ctcp_read_wakeup(sk);
sk2150net/ipv4/tcp.cint was_active = del_timer(&sk->retransmit_timer);
sk2151net/ipv4/tcp.cif (!was_active || jiffies+TCP_ACK_TIME < sk->timer.expires) 
sk2153net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk2156net/ipv4/tcp.cadd_timer(&sk->retransmit_timer);
sk2167net/ipv4/tcp.cstatic int tcp_recv_urg(struct sock * sk, int nonblock,
sk2173net/ipv4/tcp.cif (sk->urginline || !sk->urg_data || sk->urg_data == URG_READ)
sk2176net/ipv4/tcp.cif (sk->err) 
sk2177net/ipv4/tcp.creturn sock_error(sk);
sk2179net/ipv4/tcp.cif (sk->state == TCP_CLOSE || sk->done) 
sk2181net/ipv4/tcp.cif (!sk->done) 
sk2183net/ipv4/tcp.csk->done = 1;
sk2189net/ipv4/tcp.cif (sk->shutdown & RCV_SHUTDOWN) 
sk2191net/ipv4/tcp.csk->done = 1;
sk2194net/ipv4/tcp.csk->inuse = 1;
sk2195net/ipv4/tcp.cif (sk->urg_data & URG_VALID) 
sk2197net/ipv4/tcp.cchar c = sk->urg_data;
sk2199net/ipv4/tcp.csk->urg_data = URG_READ;
sk2205net/ipv4/tcp.csin->sin_addr.s_addr=sk->daddr;
sk2206net/ipv4/tcp.csin->sin_port=sk->dummy_th.dest;
sk2210net/ipv4/tcp.crelease_sock(sk);
sk2213net/ipv4/tcp.crelease_sock(sk);
sk2230net/ipv4/tcp.cstatic int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
sk2243net/ipv4/tcp.cif (sk->state == TCP_LISTEN)
sk2251net/ipv4/tcp.creturn tcp_recv_urg(sk, nonblock, msg, len, flags, addr_len);
sk2259net/ipv4/tcp.cpeek_seq = sk->copied_seq;
sk2260net/ipv4/tcp.cseq = &sk->copied_seq;
sk2264net/ipv4/tcp.cadd_wait_queue(sk->sleep, &wait);
sk2265net/ipv4/tcp.csk->inuse = 1;
sk2275net/ipv4/tcp.cif (copied && sk->urg_data && sk->urg_seq == *seq)
sk2284net/ipv4/tcp.cskb = skb_peek(&sk->receive_queue);
sk2302net/ipv4/tcp.cwhile (skb != (struct sk_buff *)&sk->receive_queue);
sk2307net/ipv4/tcp.cif (sk->err) 
sk2309net/ipv4/tcp.ccopied = sock_error(sk);
sk2313net/ipv4/tcp.cif (sk->state == TCP_CLOSE) 
sk2315net/ipv4/tcp.cif (!sk->done) 
sk2317net/ipv4/tcp.csk->done = 1;
sk2324net/ipv4/tcp.cif (sk->shutdown & RCV_SHUTDOWN) 
sk2326net/ipv4/tcp.csk->done = 1;
sk2336net/ipv4/tcp.ccleanup_rbuf(sk);
sk2337net/ipv4/tcp.crelease_sock(sk);
sk2338net/ipv4/tcp.csk->socket->flags |= SO_WAITDATA;
sk2340net/ipv4/tcp.csk->socket->flags &= ~SO_WAITDATA;
sk2341net/ipv4/tcp.csk->inuse = 1;
sk2371net/ipv4/tcp.cif (sk->urg_data) 
sk2373net/ipv4/tcp.cu32 urg_offset = sk->urg_seq - *seq;
sk2378net/ipv4/tcp.cif (!sk->urginline) 
sk2416net/ipv4/tcp.cif (after(sk->copied_seq,sk->urg_seq))
sk2417net/ipv4/tcp.csk->urg_data = 0;
sk2442net/ipv4/tcp.csk->shutdown |= RCV_SHUTDOWN;
sk2451net/ipv4/tcp.csin->sin_addr.s_addr=sk->daddr;
sk2452net/ipv4/tcp.csin->sin_port=sk->dummy_th.dest;
sk2457net/ipv4/tcp.cremove_wait_queue(sk->sleep, &wait);
sk2461net/ipv4/tcp.ccleanup_rbuf(sk);
sk2462net/ipv4/tcp.crelease_sock(sk);
sk2475net/ipv4/tcp.cstatic int tcp_close_state(struct sock *sk, int dead)
sk2479net/ipv4/tcp.cswitch(sk->state)
sk2491net/ipv4/tcp.cns=sk->state;
sk2502net/ipv4/tcp.ctcp_set_state(sk,ns);
sk2515net/ipv4/tcp.cint timer_active=del_timer(&sk->timer);
sk2517net/ipv4/tcp.cadd_timer(&sk->timer);
sk2519net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_FIN_TIMEOUT);
sk2529net/ipv4/tcp.cstatic void tcp_send_fin(struct sock *sk)
sk2531net/ipv4/tcp.cstruct proto *prot =(struct proto *)sk->prot;
sk2532net/ipv4/tcp.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
sk2538net/ipv4/tcp.crelease_sock(sk); /* in case the malloc sleeps. */
sk2540net/ipv4/tcp.cbuff = sock_wmalloc(sk, MAX_RESET_SIZE,1 , GFP_KERNEL);
sk2541net/ipv4/tcp.csk->inuse = 1;
sk2554net/ipv4/tcp.cbuff->sk = sk;
sk2555net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk2561net/ipv4/tcp.ctmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev,
sk2562net/ipv4/tcp.cIPPROTO_TCP, sk->opt,
sk2563net/ipv4/tcp.csizeof(struct tcphdr),sk->ip_tos,sk->ip_ttl);
sk2573net/ipv4/tcp.csock_wfree(sk,buff);
sk2574net/ipv4/tcp.csk->write_seq++;
sk2575net/ipv4/tcp.ct=del_timer(&sk->timer);
sk2577net/ipv4/tcp.cadd_timer(&sk->timer);
sk2579net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk2591net/ipv4/tcp.ct1->seq = ntohl(sk->write_seq);
sk2592net/ipv4/tcp.csk->write_seq++;
sk2593net/ipv4/tcp.cbuff->h.seq = sk->write_seq;
sk2595net/ipv4/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk2596net/ipv4/tcp.ct1->window = ntohs(sk->window=tcp_select_window(sk));
sk2600net/ipv4/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk2607net/ipv4/tcp.cif (skb_peek(&sk->write_queue) != NULL) 
sk2615net/ipv4/tcp.cskb_queue_tail(&sk->write_queue, buff);
sk2619net/ipv4/tcp.csk->sent_seq = sk->write_seq;
sk2620net/ipv4/tcp.csk->prot->queue_xmit(sk, dev, buff, 0);
sk2621net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk2630net/ipv4/tcp.cvoid tcp_shutdown(struct sock *sk, int how)
sk2645net/ipv4/tcp.cif (sk->state == TCP_FIN_WAIT1 ||
sk2646net/ipv4/tcp.csk->state == TCP_FIN_WAIT2 ||
sk2647net/ipv4/tcp.csk->state == TCP_CLOSING ||
sk2648net/ipv4/tcp.csk->state == TCP_LAST_ACK ||
sk2649net/ipv4/tcp.csk->state == TCP_TIME_WAIT || 
sk2650net/ipv4/tcp.csk->state == TCP_CLOSE ||
sk2651net/ipv4/tcp.csk->state == TCP_LISTEN
sk2656net/ipv4/tcp.csk->inuse = 1;
sk2662net/ipv4/tcp.csk->shutdown |= SEND_SHUTDOWN;
sk2668net/ipv4/tcp.cif (sk->partial)
sk2669net/ipv4/tcp.ctcp_send_partial(sk);
sk2675net/ipv4/tcp.cif(tcp_close_state(sk,0))
sk2676net/ipv4/tcp.ctcp_send_fin(sk);
sk2678net/ipv4/tcp.crelease_sock(sk);
sk2709net/ipv4/tcp.cbuff->sk = NULL;
sk2776net/ipv4/tcp.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
sk2805net/ipv4/tcp.csk->mtu=min(sk->mtu,ntohs(*(unsigned short *)ptr));
sk2818net/ipv4/tcp.csk->mtu=min(sk->mtu, 536);  /* default MSS if none sent */
sk2821net/ipv4/tcp.csk->mss = min(sk->max_window >> 1, sk->mtu);
sk2823net/ipv4/tcp.csk->mss = min(sk->max_window, sk->mtu);
sk2861net/ipv4/tcp.cstatic void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
sk2877net/ipv4/tcp.cif (!sk->dead) 
sk2879net/ipv4/tcp.csk->data_ready(sk,0);
sk2883net/ipv4/tcp.cif(sk->debug)
sk2884net/ipv4/tcp.cprintk("Reset on %p: Connect on dead socket.\n",sk);
sk2885net/ipv4/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
sk2896net/ipv4/tcp.cif (sk->ack_backlog >= sk->max_ack_backlog) 
sk2920net/ipv4/tcp.cmemcpy(newsk, sk, sizeof(*newsk));
sk2923net/ipv4/tcp.csk->opt = (struct options*)kmalloc(sizeof(struct options)+opt->optlen, GFP_ATOMIC);
sk2924net/ipv4/tcp.cif (!sk->opt) {
sk2930net/ipv4/tcp.cif (ip_options_echo(sk->opt, opt, daddr, saddr, skb)) {
sk2931net/ipv4/tcp.ckfree_s(sk->opt, sizeof(struct options)+opt->optlen);
sk2959net/ipv4/tcp.cnewsk->localroute = sk->localroute;
sk3014net/ipv4/tcp.cnewsk->ip_ttl=sk->ip_ttl;
sk3032net/ipv4/tcp.cif (sk->user_mss)
sk3033net/ipv4/tcp.cnewsk->mtu = sk->user_mss;
sk3065net/ipv4/tcp.csk->err = ENOMEM;
sk3075net/ipv4/tcp.cbuff->sk = newsk;
sk3082net/ipv4/tcp.ctmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &ndev,
sk3083net/ipv4/tcp.cIPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl);
sk3091net/ipv4/tcp.csk->err = tmp;
sk3097net/ipv4/tcp.cskb->sk = sk;
sk3134net/ipv4/tcp.cskb->sk = newsk;
sk3140net/ipv4/tcp.csk->rmem_alloc -= skb->truesize;
sk3143net/ipv4/tcp.cskb_queue_tail(&sk->receive_queue,skb);
sk3144net/ipv4/tcp.csk->ack_backlog++;
sk3150net/ipv4/tcp.cstatic void tcp_close(struct sock *sk, int timeout)
sk3157net/ipv4/tcp.csk->inuse = 1;
sk3159net/ipv4/tcp.cif(th_cache_sk==sk)
sk3161net/ipv4/tcp.cif(sk->state == TCP_LISTEN)
sk3164net/ipv4/tcp.ctcp_set_state(sk, TCP_CLOSE);
sk3165net/ipv4/tcp.ctcp_close_pending(sk);
sk3166net/ipv4/tcp.crelease_sock(sk);
sk3170net/ipv4/tcp.csk->keepopen = 1;
sk3171net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3173net/ipv4/tcp.cif (!sk->dead) 
sk3174net/ipv4/tcp.csk->state_change(sk);
sk3186net/ipv4/tcp.cwhile((skb=skb_dequeue(&sk->receive_queue))!=NULL)
sk3192net/ipv4/tcp.cif (sk->partial) 
sk3193net/ipv4/tcp.ctcp_send_partial(sk);
sk3204net/ipv4/tcp.ctcp_set_state(sk, TCP_CLOSE);  /* Dead */
sk3208net/ipv4/tcp.cif(tcp_close_state(sk,1)==1)
sk3210net/ipv4/tcp.ctcp_send_fin(sk);
sk3213net/ipv4/tcp.crelease_sock(sk);
sk3223net/ipv4/tcp.cstatic void tcp_write_xmit(struct sock *sk)
sk3232net/ipv4/tcp.cif(sk->zapped)
sk3243net/ipv4/tcp.cwhile((skb = skb_peek(&sk->write_queue)) != NULL &&
sk3244net/ipv4/tcp.cbefore(skb->h.seq, sk->window_seq + 1) &&
sk3245net/ipv4/tcp.c(sk->retransmits == 0 ||
sk3246net/ipv4/tcp.csk->ip_xmit_timeout != TIME_WRITE ||
sk3247net/ipv4/tcp.cbefore(skb->h.seq, sk->rcv_ack_seq + 1))
sk3248net/ipv4/tcp.c&& sk->packets_out < sk->cong_window) 
sk3257net/ipv4/tcp.cif (before(skb->h.seq, sk->rcv_ack_seq +1)) 
sk3264net/ipv4/tcp.csk->retransmits = 0;
sk3266net/ipv4/tcp.cif (!sk->dead) 
sk3267net/ipv4/tcp.csk->write_space(sk);
sk3285net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
sk3286net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
sk3288net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
sk3290net/ipv4/tcp.csk->sent_seq = skb->h.seq;
sk3296net/ipv4/tcp.csk->prot->queue_xmit(sk, skb->dev, skb, skb->free);
sk3302net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk3312net/ipv4/tcp.cextern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
sk3324net/ipv4/tcp.cif(sk->zapped)
sk3333net/ipv4/tcp.cif (ntohs(th->window) > sk->max_window) 
sk3335net/ipv4/tcp.csk->max_window = ntohs(th->window);
sk3339net/ipv4/tcp.csk->mss = min(sk->max_window>>1, sk->mtu);
sk3341net/ipv4/tcp.csk->mss = min(sk->max_window, sk->mtu);
sk3350net/ipv4/tcp.cif (sk->retransmits && sk->ip_xmit_timeout == TIME_KEEPOPEN)
sk3351net/ipv4/tcp.csk->retransmits = 0;
sk3358net/ipv4/tcp.cif (after(ack, sk->sent_seq) || before(ack, sk->rcv_ack_seq)) 
sk3360net/ipv4/tcp.cif(sk->debug)
sk3361net/ipv4/tcp.cprintk("Ack ignored %u %u\n",ack,sk->sent_seq);
sk3367net/ipv4/tcp.cif (after(ack, sk->sent_seq)) 
sk3376net/ipv4/tcp.cif (sk->keepopen) 
sk3378net/ipv4/tcp.cif(sk->ip_xmit_timeout==TIME_KEEPOPEN)
sk3379net/ipv4/tcp.creset_xmit_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk3395net/ipv4/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) 
sk3408net/ipv4/tcp.cskb2 = sk->send_head;
sk3409net/ipv4/tcp.csk->send_head = NULL;
sk3410net/ipv4/tcp.csk->send_tail = NULL;
sk3419net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
sk3426net/ipv4/tcp.cif (after(skb->h.seq, sk->window_seq)) 
sk3428net/ipv4/tcp.cif (sk->packets_out > 0) 
sk3429net/ipv4/tcp.csk->packets_out--;
sk3437net/ipv4/tcp.cskb_queue_head(&sk->write_queue,skb);
sk3444net/ipv4/tcp.cif (sk->send_head == NULL) 
sk3446net/ipv4/tcp.csk->send_head = skb;
sk3447net/ipv4/tcp.csk->send_tail = skb;
sk3451net/ipv4/tcp.csk->send_tail->link3 = skb;
sk3452net/ipv4/tcp.csk->send_tail = skb;
sk3464net/ipv4/tcp.cif (sk->send_tail == NULL || sk->send_head == NULL) 
sk3466net/ipv4/tcp.csk->send_head = NULL;
sk3467net/ipv4/tcp.csk->send_tail = NULL;
sk3468net/ipv4/tcp.csk->packets_out= 0;
sk3475net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
sk3481net/ipv4/tcp.cif (sk->ip_xmit_timeout == TIME_WRITE && 
sk3482net/ipv4/tcp.csk->cong_window < 2048 && after(ack, sk->rcv_ack_seq)) 
sk3493net/ipv4/tcp.cif (sk->cong_window < sk->ssthresh)  
sk3497net/ipv4/tcp.csk->cong_window++;
sk3504net/ipv4/tcp.cif (sk->cong_count >= sk->cong_window) 
sk3506net/ipv4/tcp.csk->cong_window++;
sk3507net/ipv4/tcp.csk->cong_count = 0;
sk3510net/ipv4/tcp.csk->cong_count++;
sk3518net/ipv4/tcp.csk->rcv_ack_seq = ack;
sk3526net/ipv4/tcp.cif (sk->ip_xmit_timeout == TIME_PROBE0) 
sk3528net/ipv4/tcp.csk->retransmits = 0;  /* Our probe was answered */
sk3534net/ipv4/tcp.cif (skb_peek(&sk->write_queue) != NULL &&   /* should always be non-null */
sk3535net/ipv4/tcp.c! before (sk->window_seq, sk->write_queue.next->h.seq)) 
sk3537net/ipv4/tcp.csk->backoff = 0;
sk3543net/ipv4/tcp.csk->rto = ((sk->rtt >> 2) + sk->mdev) >> 1;
sk3544net/ipv4/tcp.cif (sk->rto > 120*HZ)
sk3545net/ipv4/tcp.csk->rto = 120*HZ;
sk3546net/ipv4/tcp.cif (sk->rto < 20)  /* Was 1*HZ, then 1 - turns out we must allow about
sk3549net/ipv4/tcp.csk->rto = 20;
sk3557net/ipv4/tcp.cwhile(sk->send_head != NULL) 
sk3560net/ipv4/tcp.cif (sk->send_head->link3 &&
sk3561net/ipv4/tcp.cafter(sk->send_head->h.seq, sk->send_head->link3->h.seq)) 
sk3569net/ipv4/tcp.cif (before(sk->send_head->h.seq, ack+1)) 
sk3572net/ipv4/tcp.cif (sk->retransmits) 
sk3587net/ipv4/tcp.cif (sk->send_head->link3)  /* Any more queued retransmits? */
sk3588net/ipv4/tcp.csk->retransmits = 1;
sk3590net/ipv4/tcp.csk->retransmits = 0;
sk3608net/ipv4/tcp.cif (sk->packets_out > 0) 
sk3609net/ipv4/tcp.csk->packets_out --;
sk3613net/ipv4/tcp.cif (!sk->dead) 
sk3614net/ipv4/tcp.csk->write_space(sk);
sk3615net/ipv4/tcp.coskb = sk->send_head;
sk3632net/ipv4/tcp.cm -= (sk->rtt >> 3);    /* m is now error in rtt est */
sk3633net/ipv4/tcp.csk->rtt += m;           /* rtt = 7/8 rtt + 1/8 new */
sk3636net/ipv4/tcp.cm -= (sk->mdev >> 2);   /* similar update on mdev */
sk3637net/ipv4/tcp.csk->mdev += m;        /* mdev = 3/4 mdev + 1/4 new */
sk3643net/ipv4/tcp.csk->rto = ((sk->rtt >> 2) + sk->mdev) >> 1;
sk3644net/ipv4/tcp.cif (sk->rto > 120*HZ)
sk3645net/ipv4/tcp.csk->rto = 120*HZ;
sk3646net/ipv4/tcp.cif (sk->rto < 20)  /* Was 1*HZ - keep .2 as minimum cos of the BSD delayed acks */
sk3647net/ipv4/tcp.csk->rto = 20;
sk3648net/ipv4/tcp.csk->backoff = 0;
sk3653net/ipv4/tcp.coskb = sk->send_head;
sk3655net/ipv4/tcp.csk->send_head = oskb->link3;
sk3656net/ipv4/tcp.cif (sk->send_head == NULL) 
sk3658net/ipv4/tcp.csk->send_tail = NULL;
sk3669net/ipv4/tcp.cif (!sk->dead) 
sk3670net/ipv4/tcp.csk->write_space(sk);
sk3691net/ipv4/tcp.cif (skb_peek(&sk->write_queue) != NULL) 
sk3693net/ipv4/tcp.cif (after (sk->window_seq+1, sk->write_queue.next->h.seq) &&
sk3694net/ipv4/tcp.c(sk->retransmits == 0 || 
sk3695net/ipv4/tcp.csk->ip_xmit_timeout != TIME_WRITE ||
sk3696net/ipv4/tcp.cbefore(sk->write_queue.next->h.seq, sk->rcv_ack_seq + 1))
sk3697net/ipv4/tcp.c&& sk->packets_out < sk->cong_window) 
sk3703net/ipv4/tcp.ctcp_write_xmit(sk);
sk3705net/ipv4/tcp.celse if (before(sk->window_seq, sk->write_queue.next->h.seq) &&
sk3706net/ipv4/tcp.csk->send_head == NULL &&
sk3707net/ipv4/tcp.csk->ack_backlog == 0 &&
sk3708net/ipv4/tcp.csk->state != TCP_TIME_WAIT) 
sk3713net/ipv4/tcp.creset_xmit_timer(sk, TIME_PROBE0, sk->rto);
sk3731net/ipv4/tcp.cswitch(sk->state) {
sk3737net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk3749net/ipv4/tcp.cif (sk->send_head || skb_peek(&sk->write_queue) != NULL || sk->ack_backlog) {
sk3750net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk3751net/ipv4/tcp.c} else if (sk->keepopen) {
sk3752net/ipv4/tcp.creset_xmit_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk3754net/ipv4/tcp.cdel_timer(&sk->retransmit_timer);
sk3755net/ipv4/tcp.csk->ip_xmit_timeout = 0;
sk3766net/ipv4/tcp.cif (sk->packets_out == 0 && sk->partial != NULL &&
sk3767net/ipv4/tcp.cskb_peek(&sk->write_queue) == NULL && sk->send_head == NULL) 
sk3770net/ipv4/tcp.ctcp_send_partial(sk);
sk3781net/ipv4/tcp.cif (sk->state == TCP_LAST_ACK) 
sk3783net/ipv4/tcp.cif (!sk->dead)
sk3784net/ipv4/tcp.csk->state_change(sk);
sk3785net/ipv4/tcp.cif(sk->debug)
sk3787net/ipv4/tcp.csk->rcv_ack_seq,sk->write_seq,sk->acked_seq,sk->fin_seq);
sk3788net/ipv4/tcp.cif (sk->rcv_ack_seq == sk->write_seq /*&& sk->acked_seq == sk->fin_seq*/) 
sk3791net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk3792net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3803net/ipv4/tcp.cif (sk->state == TCP_FIN_WAIT1) 
sk3806net/ipv4/tcp.cif (!sk->dead) 
sk3807net/ipv4/tcp.csk->state_change(sk);
sk3808net/ipv4/tcp.cif (sk->rcv_ack_seq == sk->write_seq) 
sk3811net/ipv4/tcp.csk->shutdown |= SEND_SHUTDOWN;
sk3812net/ipv4/tcp.ctcp_set_state(sk, TCP_FIN_WAIT2);
sk3822net/ipv4/tcp.cif (sk->state == TCP_CLOSING) 
sk3825net/ipv4/tcp.cif (!sk->dead) 
sk3826net/ipv4/tcp.csk->state_change(sk);
sk3827net/ipv4/tcp.cif (sk->rcv_ack_seq == sk->write_seq) 
sk3830net/ipv4/tcp.ctcp_time_wait(sk);
sk3838net/ipv4/tcp.cif(sk->state==TCP_SYN_RECV)
sk3840net/ipv4/tcp.ctcp_set_state(sk, TCP_ESTABLISHED);
sk3841net/ipv4/tcp.ctcp_options(sk,th);
sk3842net/ipv4/tcp.csk->dummy_th.dest=th->source;
sk3843net/ipv4/tcp.csk->copied_seq = sk->acked_seq;
sk3844net/ipv4/tcp.cif(!sk->dead)
sk3845net/ipv4/tcp.csk->state_change(sk);
sk3846net/ipv4/tcp.cif(sk->max_window==0)
sk3848net/ipv4/tcp.csk->max_window=32;  /* Sanity check */
sk3849net/ipv4/tcp.csk->mss=min(sk->max_window,sk->mtu);
sk3882net/ipv4/tcp.cif (((!flag) || (flag&4)) && sk->send_head != NULL &&
sk3883net/ipv4/tcp.c(((flag&2) && sk->retransmits) ||
sk3884net/ipv4/tcp.c(sk->send_head->when + sk->rto < jiffies))) 
sk3886net/ipv4/tcp.cif(sk->send_head->when + sk->rto < jiffies)
sk3887net/ipv4/tcp.ctcp_retransmit(sk,0);  
sk3890net/ipv4/tcp.ctcp_do_retransmit(sk, 1);
sk3891net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk3915net/ipv4/tcp.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
sk3917net/ipv4/tcp.csk->fin_seq = th->seq + skb->len + th->syn + th->fin;
sk3919net/ipv4/tcp.cif (!sk->dead) 
sk3921net/ipv4/tcp.csk->state_change(sk);
sk3922net/ipv4/tcp.csock_wake_async(sk->socket, 1);
sk3925net/ipv4/tcp.cswitch(sk->state) 
sk3934net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE_WAIT);
sk3936net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3951net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk3966net/ipv4/tcp.cif(sk->ip_xmit_timeout != TIME_WRITE)
sk3967net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk3968net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSING);
sk3974net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk3975net/ipv4/tcp.csk->shutdown|=SHUTDOWN_MASK;
sk3976net/ipv4/tcp.ctcp_set_state(sk,TCP_TIME_WAIT);
sk3984net/ipv4/tcp.ctcp_set_state(sk,TCP_LAST_ACK);
sk3987net/ipv4/tcp.creset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk4002net/ipv4/tcp.cextern __inline__ int tcp_data(struct sk_buff *skb, struct sock *sk, 
sk4019net/ipv4/tcp.csk->bytes_rcv += skb->len;
sk4028net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
sk4039net/ipv4/tcp.cif(sk->shutdown & RCV_SHUTDOWN)
sk4064net/ipv4/tcp.cshut_seq=sk->acked_seq+1;  /* Last byte */
sk4068net/ipv4/tcp.cif(sk->debug)
sk4070net/ipv4/tcp.csk, new_seq, shut_seq, sk->blog);
sk4071net/ipv4/tcp.cif(sk->dead)
sk4073net/ipv4/tcp.csk->acked_seq = new_seq + th->fin;
sk4074net/ipv4/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
sk4075net/ipv4/tcp.csk->prot, NULL, skb->dev, sk->ip_tos, sk->ip_ttl);
sk4077net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk4078net/ipv4/tcp.csk->err = EPIPE;
sk4079net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk4101net/ipv4/tcp.cif (skb_peek(&sk->receive_queue) == NULL)   /* Empty queue is easy case */
sk4103net/ipv4/tcp.cskb_queue_head(&sk->receive_queue,skb);
sk4108net/ipv4/tcp.cfor(skb1=sk->receive_queue.prev; ; skb1 = skb1->prev) 
sk4110net/ipv4/tcp.cif(sk->debug)
sk4115net/ipv4/tcp.cprintk("copied_seq = %d acked_seq = %d\n", sk->copied_seq,
sk4116net/ipv4/tcp.csk->acked_seq);
sk4150net/ipv4/tcp.cif (skb1 == skb_peek(&sk->receive_queue))
sk4152net/ipv4/tcp.cskb_queue_head(&sk->receive_queue, skb);
sk4168net/ipv4/tcp.cif (before(sk->acked_seq, sk->copied_seq)) 
sk4171net/ipv4/tcp.csk->acked_seq = sk->copied_seq;
sk4180net/ipv4/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) 
sk4182net/ipv4/tcp.cif (before(th->seq, sk->acked_seq+1)) 
sk4186net/ipv4/tcp.cif (after(th->ack_seq, sk->acked_seq)) 
sk4188net/ipv4/tcp.cnewwindow = sk->window-(th->ack_seq - sk->acked_seq);
sk4191net/ipv4/tcp.csk->window = newwindow;
sk4192net/ipv4/tcp.csk->acked_seq = th->ack_seq;
sk4203net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
sk4207net/ipv4/tcp.cskb2 != (struct sk_buff *)&sk->receive_queue;
sk4210net/ipv4/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) 
sk4212net/ipv4/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
sk4214net/ipv4/tcp.cnewwindow = sk->window -
sk4215net/ipv4/tcp.c(skb2->h.th->ack_seq - sk->acked_seq);
sk4218net/ipv4/tcp.csk->window = newwindow;
sk4219net/ipv4/tcp.csk->acked_seq = skb2->h.th->ack_seq;
sk4228net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
sk4235net/ipv4/tcp.csk->ack_backlog = sk->max_ack_backlog;
sk4247net/ipv4/tcp.cif (!sk->delay_acks ||
sk4248net/ipv4/tcp.csk->ack_backlog >= sk->max_ack_backlog || 
sk4249net/ipv4/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
sk4254net/ipv4/tcp.csk->ack_backlog++;
sk4255net/ipv4/tcp.cif(sk->debug)
sk4257net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk4277net/ipv4/tcp.cwhile (sock_rspace(sk) < sk->mtu) 
sk4279net/ipv4/tcp.cskb1 = skb_peek(&sk->receive_queue);
sk4298net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
sk4299net/ipv4/tcp.csk->ack_backlog++;
sk4300net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk4304net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
sk4311net/ipv4/tcp.cif (!sk->dead) 
sk4313net/ipv4/tcp.cif(sk->debug)
sk4315net/ipv4/tcp.csk->data_ready(sk,0);
sk4329net/ipv4/tcp.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
sk4338net/ipv4/tcp.cif (after(sk->copied_seq, ptr))
sk4342net/ipv4/tcp.cif (sk->urg_data && !after(ptr, sk->urg_seq))
sk4346net/ipv4/tcp.cif (sk->proc != 0) {
sk4347net/ipv4/tcp.cif (sk->proc > 0) {
sk4348net/ipv4/tcp.ckill_proc(sk->proc, SIGURG, 1);
sk4350net/ipv4/tcp.ckill_pg(-sk->proc, SIGURG, 1);
sk4353net/ipv4/tcp.csk->urg_data = URG_NOTYET;
sk4354net/ipv4/tcp.csk->urg_seq = ptr;
sk4361net/ipv4/tcp.cextern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th,
sk4371net/ipv4/tcp.ctcp_check_urg(sk,th);
sk4377net/ipv4/tcp.cif (sk->urg_data != URG_NOTYET)
sk4384net/ipv4/tcp.cptr = sk->urg_seq - th->seq + th->doff*4;
sk4392net/ipv4/tcp.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
sk4393net/ipv4/tcp.cif (!sk->dead)
sk4394net/ipv4/tcp.csk->data_ready(sk,0);
sk4402net/ipv4/tcp.cstatic struct sock *tcp_accept(struct sock *sk, int flags)
sk4412net/ipv4/tcp.cif (sk->state != TCP_LISTEN) 
sk4414net/ipv4/tcp.csk->err = EINVAL;
sk4420net/ipv4/tcp.csk->inuse = 1;
sk4422net/ipv4/tcp.cwhile((skb = tcp_dequeue_established(sk)) == NULL) 
sk4427net/ipv4/tcp.crelease_sock(sk);
sk4428net/ipv4/tcp.csk->err = EAGAIN;
sk4432net/ipv4/tcp.crelease_sock(sk);
sk4433net/ipv4/tcp.cinterruptible_sleep_on(sk->sleep);
sk4437net/ipv4/tcp.csk->err = ERESTARTSYS;
sk4440net/ipv4/tcp.csk->inuse = 1;
sk4448net/ipv4/tcp.cnewsk = skb->sk;
sk4451net/ipv4/tcp.csk->ack_backlog--;
sk4452net/ipv4/tcp.crelease_sock(sk);
sk4461net/ipv4/tcp.cstatic int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sk4471net/ipv4/tcp.cif (sk->state != TCP_CLOSE) 
sk4478net/ipv4/tcp.cif(sk->daddr)
sk4501net/ipv4/tcp.csk->inuse = 1;
sk4502net/ipv4/tcp.csk->daddr = usin->sin_addr.s_addr;
sk4503net/ipv4/tcp.csk->write_seq = tcp_init_seq();
sk4504net/ipv4/tcp.csk->window_seq = sk->write_seq;
sk4505net/ipv4/tcp.csk->rcv_ack_seq = sk->write_seq -1;
sk4506net/ipv4/tcp.csk->err = 0;
sk4507net/ipv4/tcp.csk->dummy_th.dest = usin->sin_port;
sk4508net/ipv4/tcp.crelease_sock(sk);
sk4510net/ipv4/tcp.cbuff = sock_wmalloc(sk,MAX_SYN_SIZE,0, GFP_KERNEL);
sk4515net/ipv4/tcp.csk->inuse = 1;
sk4516net/ipv4/tcp.cbuff->sk = sk;
sk4518net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk4525net/ipv4/tcp.cif (sk->localroute)
sk4526net/ipv4/tcp.crt=ip_rt_local(sk->daddr, NULL, sk->saddr ? NULL : &sk->saddr);
sk4528net/ipv4/tcp.crt=ip_rt_route(sk->daddr, NULL, sk->saddr ? NULL : &sk->saddr);
sk4534net/ipv4/tcp.csk->rcv_saddr=sk->saddr;
sk4540net/ipv4/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk4541net/ipv4/tcp.cIPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl);
sk4544net/ipv4/tcp.csock_wfree(sk, buff);
sk4545net/ipv4/tcp.crelease_sock(sk);
sk4551net/ipv4/tcp.cmemcpy(t1,(void *)&(sk->dummy_th), sizeof(*t1));
sk4552net/ipv4/tcp.ct1->seq = ntohl(sk->write_seq++);
sk4553net/ipv4/tcp.csk->sent_seq = sk->write_seq;
sk4554net/ipv4/tcp.cbuff->h.seq = sk->write_seq;
sk4568net/ipv4/tcp.csk->window_clamp=rt->rt_window;
sk4570net/ipv4/tcp.csk->window_clamp=0;
sk4572net/ipv4/tcp.cif (sk->user_mss)
sk4573net/ipv4/tcp.csk->mtu = sk->user_mss;
sk4575net/ipv4/tcp.csk->mtu = rt->rt_mss;
sk4579net/ipv4/tcp.cif ((sk->saddr ^ sk->daddr) & default_mask(sk->saddr))
sk4581net/ipv4/tcp.cif ((sk->saddr ^ sk->daddr) & dev->pa_mask)
sk4583net/ipv4/tcp.csk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr);
sk4585net/ipv4/tcp.csk->mtu = MAX_WINDOW;
sk4591net/ipv4/tcp.cif(sk->mtu <32)
sk4592net/ipv4/tcp.csk->mtu = 32;  /* Sanity limit */
sk4594net/ipv4/tcp.csk->mtu = min(sk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr));
sk4603net/ipv4/tcp.cptr[2] = (sk->mtu) >> 8;
sk4604net/ipv4/tcp.cptr[3] = (sk->mtu) & 0xff;
sk4605net/ipv4/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr,
sk4606net/ipv4/tcp.csizeof(struct tcphdr) + 4, sk);
sk4613net/ipv4/tcp.ctcp_set_state(sk,TCP_SYN_SENT);
sk4615net/ipv4/tcp.csk->rto = rt->rt_irtt;
sk4617net/ipv4/tcp.csk->rto = TCP_TIMEOUT_INIT;
sk4618net/ipv4/tcp.csk->retransmit_timer.function=&retransmit_timer;
sk4619net/ipv4/tcp.csk->retransmit_timer.data = (unsigned long)sk;
sk4620net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);  /* Timer for repeating the SYN until an answer  */
sk4621net/ipv4/tcp.csk->retransmits = 0;        /* Now works the right way instead of a hacked 
sk4624net/ipv4/tcp.csk->prot->queue_xmit(sk, dev, buff, 0);  
sk4625net/ipv4/tcp.creset_xmit_timer(sk, TIME_WRITE, sk->rto);
sk4629net/ipv4/tcp.crelease_sock(sk);
sk4638net/ipv4/tcp.cextern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
sk4647net/ipv4/tcp.cif (next_seq && !sk->window)
sk4659net/ipv4/tcp.cif (!after(next_seq+1, sk->acked_seq))
sk4662net/ipv4/tcp.cif (!before(th->seq, sk->acked_seq + sk->window + 1))
sk4679net/ipv4/tcp.cif (sk->state==TCP_SYN_SENT || sk->state==TCP_SYN_RECV) 
sk4681net/ipv4/tcp.ctcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
sk4686net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
sk4694net/ipv4/tcp.cstatic int tcp_std_reset(struct sock *sk, struct sk_buff *skb)
sk4696net/ipv4/tcp.csk->zapped = 1;
sk4697net/ipv4/tcp.csk->err = ECONNRESET;
sk4698net/ipv4/tcp.cif (sk->state == TCP_SYN_SENT)
sk4699net/ipv4/tcp.csk->err = ECONNREFUSED;
sk4700net/ipv4/tcp.cif (sk->state == TCP_CLOSE_WAIT)
sk4701net/ipv4/tcp.csk->err = EPIPE;
sk4706net/ipv4/tcp.cif(sk->state!=TCP_TIME_WAIT)
sk4708net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk4709net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk4712net/ipv4/tcp.ctcp_set_state(sk,TCP_CLOSE);
sk4713net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk4715net/ipv4/tcp.cif (!sk->dead) 
sk4716net/ipv4/tcp.csk->state_change(sk);
sk4718net/ipv4/tcp.crelease_sock(sk);
sk4732net/ipv4/tcp.cstruct sock *sk;
sk4750net/ipv4/tcp.csk=(struct sock *)th_cache_sk;
sk4754net/ipv4/tcp.cif(sk!=get_sock(&tcp_prot,th->dest, saddr, th->source, daddr))
sk4759net/ipv4/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
sk4764net/ipv4/tcp.cth_cache_sk=sk;
sk4776net/ipv4/tcp.cif (sk!=NULL && (sk->zapped || sk->state==TCP_CLOSE))
sk4777net/ipv4/tcp.csk=NULL;
sk4793net/ipv4/tcp.cskb->sk = NULL;
sk4804net/ipv4/tcp.cif (sk == NULL) 
sk4810net/ipv4/tcp.cskb->sk = NULL;
sk4826net/ipv4/tcp.cif (sk->inuse) 
sk4828net/ipv4/tcp.cskb_queue_tail(&sk->back_log, skb);
sk4832net/ipv4/tcp.csk->inuse = 1;
sk4837net/ipv4/tcp.cif (sk==NULL) 
sk4840net/ipv4/tcp.cskb->sk = NULL;
sk4847net/ipv4/tcp.cif (!sk->prot) 
sk4858net/ipv4/tcp.cskb->sk=sk;
sk4859net/ipv4/tcp.csk->rmem_alloc += skb->truesize;
sk4868net/ipv4/tcp.cif(sk->state!=TCP_ESTABLISHED)    /* Skip this lot for normal flow */
sk4875net/ipv4/tcp.cif(sk->state==TCP_LISTEN)
sk4878net/ipv4/tcp.ctcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
sk4890net/ipv4/tcp.crelease_sock(sk);
sk4898net/ipv4/tcp.ctcp_conn_request(sk, skb, daddr, saddr, opt, dev, tcp_init_seq());
sk4909net/ipv4/tcp.crelease_sock(sk);
sk4914net/ipv4/tcp.cif (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq)
sk4917net/ipv4/tcp.crelease_sock(sk);
sk4926net/ipv4/tcp.cif(sk->state==TCP_SYN_SENT)
sk4932net/ipv4/tcp.cif(!tcp_ack(sk,th,saddr,len))
sk4938net/ipv4/tcp.csk->prot, opt,dev,sk->ip_tos,sk->ip_ttl);
sk4940net/ipv4/tcp.crelease_sock(sk);
sk4944net/ipv4/tcp.creturn tcp_std_reset(sk,skb);
sk4950net/ipv4/tcp.crelease_sock(sk);
sk4958net/ipv4/tcp.csk->acked_seq=th->seq+1;
sk4959net/ipv4/tcp.csk->fin_seq=th->seq;
sk4960net/ipv4/tcp.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
sk4961net/ipv4/tcp.ctcp_set_state(sk, TCP_ESTABLISHED);
sk4962net/ipv4/tcp.ctcp_options(sk,th);
sk4963net/ipv4/tcp.csk->dummy_th.dest=th->source;
sk4964net/ipv4/tcp.csk->copied_seq = sk->acked_seq;
sk4965net/ipv4/tcp.cif(!sk->dead)
sk4967net/ipv4/tcp.csk->state_change(sk);
sk4968net/ipv4/tcp.csock_wake_async(sk->socket, 0);
sk4970net/ipv4/tcp.cif(sk->max_window==0)
sk4972net/ipv4/tcp.csk->max_window = 32;
sk4973net/ipv4/tcp.csk->mss = min(sk->max_window, sk->mtu);
sk4983net/ipv4/tcp.cif(sk->saddr==saddr && sk->daddr==daddr &&
sk4984net/ipv4/tcp.csk->dummy_th.source==th->source &&
sk4985net/ipv4/tcp.csk->dummy_th.dest==th->dest)
sk4988net/ipv4/tcp.creturn tcp_std_reset(sk,skb);
sk4990net/ipv4/tcp.ctcp_set_state(sk,TCP_SYN_RECV);
sk4999net/ipv4/tcp.crelease_sock(sk);
sk5016net/ipv4/tcp.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
sk5017net/ipv4/tcp.cafter(th->seq, sk->acked_seq) && !th->rst)
sk5019net/ipv4/tcp.cu32 seq = sk->write_seq;
sk5020net/ipv4/tcp.cif(sk->debug)
sk5023net/ipv4/tcp.csk->rmem_alloc -= skb->truesize;
sk5024net/ipv4/tcp.cskb->sk = NULL;
sk5025net/ipv4/tcp.csk->err=ECONNRESET;
sk5026net/ipv4/tcp.ctcp_set_state(sk, TCP_CLOSE);
sk5027net/ipv4/tcp.csk->shutdown = SHUTDOWN_MASK;
sk5028net/ipv4/tcp.crelease_sock(sk);
sk5029net/ipv4/tcp.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
sk5030net/ipv4/tcp.cif (sk && sk->state==TCP_LISTEN)
sk5032net/ipv4/tcp.csk->inuse=1;
sk5033net/ipv4/tcp.cskb->sk = sk;
sk5034net/ipv4/tcp.csk->rmem_alloc += skb->truesize;
sk5035net/ipv4/tcp.ctcp_conn_request(sk, skb, daddr, saddr,opt, dev,seq+128000);
sk5036net/ipv4/tcp.crelease_sock(sk);
sk5051net/ipv4/tcp.cif(!tcp_sequence(sk,th,len,opt,saddr,dev))
sk5054net/ipv4/tcp.crelease_sock(sk);
sk5059net/ipv4/tcp.creturn tcp_std_reset(sk,skb);
sk5068net/ipv4/tcp.creturn tcp_std_reset(sk,skb);  
sk5076net/ipv4/tcp.cif(th->ack && !tcp_ack(sk,th,saddr,len))
sk5082net/ipv4/tcp.cif(sk->state==TCP_SYN_RECV)
sk5084net/ipv4/tcp.ctcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
sk5087net/ipv4/tcp.crelease_sock(sk);
sk5099net/ipv4/tcp.cif (sk->rmem_alloc  >= sk->rcvbuf) 
sk5102net/ipv4/tcp.crelease_sock(sk);
sk5111net/ipv4/tcp.cif(tcp_urg(sk, th, saddr, len))
sk5114net/ipv4/tcp.crelease_sock(sk);
sk5122net/ipv4/tcp.cif(tcp_data(skb,sk, saddr, len))
sk5125net/ipv4/tcp.crelease_sock(sk);
sk5133net/ipv4/tcp.crelease_sock(sk);
sk5142net/ipv4/tcp.cstatic void tcp_write_wakeup(struct sock *sk)
sk5149net/ipv4/tcp.cif (sk->zapped)
sk5158net/ipv4/tcp.cif (sk->state != TCP_ESTABLISHED && 
sk5159net/ipv4/tcp.csk->state != TCP_CLOSE_WAIT &&
sk5160net/ipv4/tcp.csk->state != TCP_FIN_WAIT1 && 
sk5161net/ipv4/tcp.csk->state != TCP_LAST_ACK &&
sk5162net/ipv4/tcp.csk->state != TCP_CLOSING
sk5167net/ipv4/tcp.cif ( before(sk->sent_seq, sk->window_seq) && 
sk5168net/ipv4/tcp.c(skb=skb_peek(&sk->write_queue)))
sk5189net/ipv4/tcp.cwin_size = sk->window_seq - sk->sent_seq;
sk5202net/ipv4/tcp.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
sk5204net/ipv4/tcp.csk->prot->max_header + 15, 
sk5216net/ipv4/tcp.cbuff->sk = sk;
sk5217net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk5223net/ipv4/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk5224net/ipv4/tcp.cIPPROTO_TCP, sk->opt, buff->truesize,
sk5225net/ipv4/tcp.csk->ip_tos,sk->ip_ttl);
sk5228net/ipv4/tcp.csock_wfree(sk, buff);
sk5247net/ipv4/tcp.cnth->ack_seq = ntohl(sk->acked_seq);
sk5248net/ipv4/tcp.cnth->window = ntohs(tcp_select_window(sk));
sk5267net/ipv4/tcp.cbuff->h.seq = sk->sent_seq + win_size;
sk5268net/ipv4/tcp.csk->sent_seq = buff->h.seq;    /* Hack */
sk5281net/ipv4/tcp.csk->sent_seq += win_size;
sk5282net/ipv4/tcp.cth->seq = htonl(sk->sent_seq);
sk5306net/ipv4/tcp.ctcp_send_check(nth, sk->saddr, sk->daddr, 
sk5307net/ipv4/tcp.cnth->doff * 4 + win_size , sk);
sk5311net/ipv4/tcp.cbuff = sock_wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC);
sk5316net/ipv4/tcp.cbuff->sk = sk;
sk5317net/ipv4/tcp.cbuff->localroute = sk->localroute;
sk5323net/ipv4/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk5324net/ipv4/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl);
sk5327net/ipv4/tcp.csock_wfree(sk, buff);
sk5332net/ipv4/tcp.cmemcpy(t1,(void *) &sk->dummy_th, sizeof(*t1));
sk5339net/ipv4/tcp.ct1->seq = htonl(sk->sent_seq-1);
sk5348net/ipv4/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk5349net/ipv4/tcp.ct1->window = ntohs(tcp_select_window(sk));
sk5351net/ipv4/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk5359net/ipv4/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk5367net/ipv4/tcp.cvoid tcp_send_probe0(struct sock *sk)
sk5369net/ipv4/tcp.cif (sk->zapped)
sk5372net/ipv4/tcp.ctcp_write_wakeup(sk);
sk5374net/ipv4/tcp.csk->backoff++;
sk5375net/ipv4/tcp.csk->rto = min(sk->rto << 1, 120*HZ);
sk5376net/ipv4/tcp.creset_xmit_timer (sk, TIME_PROBE0, sk->rto);
sk5377net/ipv4/tcp.csk->retransmits++;
sk5378net/ipv4/tcp.csk->prot->retransmits ++;
sk5385net/ipv4/tcp.cint tcp_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen)
sk5390net/ipv4/tcp.creturn ip_setsockopt(sk,level,optname,optval,optlen);
sk5411net/ipv4/tcp.csk->user_mss=val;
sk5414net/ipv4/tcp.csk->nonagle=(val==0)?0:1;
sk5421net/ipv4/tcp.cint tcp_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen)
sk5426net/ipv4/tcp.creturn ip_getsockopt(sk,level,optname,optval,optlen);
sk5431net/ipv4/tcp.cval=sk->user_mss;
sk5434net/ipv4/tcp.cval=sk->nonagle;
sk88net/ipv4/timer.cstruct sock *sk = (struct sock*)data;
sk89net/ipv4/timer.cint why = sk->timeout;
sk96net/ipv4/timer.cif (sk->inuse || in_bh) 
sk98net/ipv4/timer.csk->timer.expires = jiffies+10;
sk99net/ipv4/timer.cadd_timer(&sk->timer);
sk104net/ipv4/timer.csk->inuse = 1;
sk109net/ipv4/timer.cif (sk->ack_backlog && !sk->zapped) 
sk111net/ipv4/timer.csk->prot->read_wakeup (sk);
sk112net/ipv4/timer.cif (! sk->dead)
sk113net/ipv4/timer.csk->data_ready(sk,0);
sk121net/ipv4/timer.cif (! sk->dead || sk->state != TCP_CLOSE) 
sk124net/ipv4/timer.crelease_sock (sk);
sk127net/ipv4/timer.cdestroy_sock (sk);
sk135net/ipv4/timer.cif(sk->wmem_alloc!=0 || sk->rmem_alloc!=0)
sk137net/ipv4/timer.csk->wmem_alloc++;  /* So it DOESN'T go away */
sk138net/ipv4/timer.cdestroy_sock (sk);
sk139net/ipv4/timer.csk->wmem_alloc--;  /* Might now have hit 0 - fall through and do it again if so */
sk140net/ipv4/timer.csk->inuse = 0;  /* This will be ok, the destroy won't totally work */
sk142net/ipv4/timer.cif(sk->wmem_alloc==0 && sk->rmem_alloc==0)
sk143net/ipv4/timer.cdestroy_sock(sk);  /* Socket gone, DON'T update sk->inuse! */
sk147net/ipv4/timer.csk->state = TCP_CLOSE;
sk148net/ipv4/timer.cdelete_timer (sk);
sk150net/ipv4/timer.carp_destroy (sk->daddr, 0);
sk151net/ipv4/timer.cif (!sk->dead)
sk152net/ipv4/timer.csk->state_change(sk);
sk153net/ipv4/timer.csk->shutdown = SHUTDOWN_MASK;
sk154net/ipv4/timer.creset_timer (sk, TIME_DESTROY, TCP_DONE_TIME);
sk155net/ipv4/timer.crelease_sock (sk);
sk159net/ipv4/timer.crelease_sock (sk);
sk138net/ipv4/udp.cstatic int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len);
sk158net/ipv4/udp.cstruct sock *sk;
sk166net/ipv4/udp.csk = get_sock(&udp_prot, uh->source, daddr, uh->dest, saddr);
sk168net/ipv4/udp.cif (sk == NULL) 
sk173net/ipv4/udp.cif (sk->cong_window > 1) 
sk174net/ipv4/udp.csk->cong_window = sk->cong_window/2;
sk180net/ipv4/udp.csk->err = EPROTO;
sk181net/ipv4/udp.csk->error_report(sk);
sk199net/ipv4/udp.csk->err = icmp_err_convert[code].errno;
sk200net/ipv4/udp.csk->error_report(sk);
sk294net/ipv4/udp.cstatic int udp_send(struct sock *sk, struct sockaddr_in *sin,
sk305net/ipv4/udp.cufh.uh.source = sk->dummy_th.source;
sk319net/ipv4/udp.cif(sk->no_check)
sk320net/ipv4/udp.ca = ip_build_xmit(sk, udp_getfrag_nosum, &ufh, ulen, 
sk321net/ipv4/udp.csin->sin_addr.s_addr, saddr, sk->opt, rt, IPPROTO_UDP, noblock);
sk323net/ipv4/udp.ca = ip_build_xmit(sk, udp_getfrag, &ufh, ulen, 
sk324net/ipv4/udp.csin->sin_addr.s_addr, saddr, sk->opt, rt, IPPROTO_UDP, noblock);
sk332net/ipv4/udp.cstatic int udp_sendto(struct sock *sk, const unsigned char *from, int len, int noblock,
sk360net/ipv4/udp.cif (sk->state != TCP_ESTABLISHED) 
sk363net/ipv4/udp.csin.sin_port = sk->dummy_th.dest;
sk364net/ipv4/udp.csin.sin_addr.s_addr = sk->daddr;
sk386net/ipv4/udp.cif(!sk->broadcast && ip_chk_addr(usin->sin_addr.s_addr)==IS_BROADCAST)
sk389net/ipv4/udp.csk->inuse = 1;
sk392net/ipv4/udp.ctmp = udp_send(sk, usin, from, len, flags, saddr, noblock);
sk395net/ipv4/udp.crelease_sock(sk);
sk403net/ipv4/udp.cstatic int udp_sendmsg(struct sock *sk, struct msghdr *msg,
sk407net/ipv4/udp.creturn udp_sendto(sk,msg->msg_iov[0].iov_base,len, noblock, flags, msg->msg_name, msg->msg_namelen);
sk427net/ipv4/udp.cerr=udp_sendto(sk,buf,len, noblock, flags, msg->msg_name, msg->msg_namelen);
sk438net/ipv4/udp.cint udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk447net/ipv4/udp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk448net/ipv4/udp.camount = sock_wspace(sk);
sk462net/ipv4/udp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk464net/ipv4/udp.cskb = skb_peek(&sk->receive_queue);
sk493net/ipv4/udp.cint udp_recvmsg(struct sock *sk, struct msghdr *msg, int len,
sk514net/ipv4/udp.cskb=skb_recv_datagram(sk,flags,noblock,&er);
sk526net/ipv4/udp.csk->stamp=skb->stamp;
sk537net/ipv4/udp.crelease_sock(sk);
sk541net/ipv4/udp.cint udp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sk553net/ipv4/udp.cif(!sk->broadcast && ip_chk_addr(usin->sin_addr.s_addr)==IS_BROADCAST)
sk556net/ipv4/udp.crt=(sk->localroute?ip_rt_local:ip_rt_route)((__u32)usin->sin_addr.s_addr, NULL, &sa);
sk559net/ipv4/udp.cif(!sk->saddr)
sk560net/ipv4/udp.csk->saddr = sa;    /* Update source address */
sk561net/ipv4/udp.cif(!sk->rcv_saddr)
sk562net/ipv4/udp.csk->rcv_saddr = sa;
sk563net/ipv4/udp.csk->daddr = usin->sin_addr.s_addr;
sk564net/ipv4/udp.csk->dummy_th.dest = usin->sin_port;
sk565net/ipv4/udp.csk->state = TCP_ESTABLISHED;
sk567net/ipv4/udp.csk->ip_route_cache = rt;
sk568net/ipv4/udp.csk->ip_route_stamp = rt_stamp;
sk573net/ipv4/udp.cstatic void udp_close(struct sock *sk, int timeout)
sk575net/ipv4/udp.csk->inuse = 1;
sk576net/ipv4/udp.csk->state = TCP_CLOSE;
sk577net/ipv4/udp.cif(uh_cache_sk==sk)
sk579net/ipv4/udp.cif (sk->dead) 
sk580net/ipv4/udp.cdestroy_sock(sk);
sk582net/ipv4/udp.crelease_sock(sk);
sk594net/ipv4/udp.cstruct sock *sk;
sk662net/ipv4/udp.csk=get_sock_mcast(udp_prot.sock_array[ntohs(uh->dest)&(SOCK_ARRAY_SIZE-1)], uh->dest,
sk664net/ipv4/udp.cif(sk)
sk670net/ipv4/udp.csknext=get_sock_mcast(sk->next, uh->dest, saddr, uh->source, daddr);
sk676net/ipv4/udp.cudp_deliver(sk, uh, skb1, dev,saddr,daddr,len);
sk677net/ipv4/udp.csk=sknext;
sk687net/ipv4/udp.csk=(struct sock *)uh_cache_sk;
sk690net/ipv4/udp.csk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr);
sk695net/ipv4/udp.cuh_cache_sk=sk;
sk698net/ipv4/udp.cif (sk == NULL) 
sk709net/ipv4/udp.cskb->sk = NULL;
sk713net/ipv4/udp.creturn udp_deliver(sk,uh,skb,dev, saddr, daddr, len);
sk716net/ipv4/udp.cstatic int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len)
sk718net/ipv4/udp.cskb->sk = sk;
sk737net/ipv4/udp.cif (sock_queue_rcv_skb(sk,skb)<0) 
sk742net/ipv4/udp.cskb->sk = NULL;
sk744net/ipv4/udp.crelease_sock(sk);
sk748net/ipv4/udp.crelease_sock(sk);
sk136net/ipx/af_ipx.cipx_remove_socket(ipx_socket *sk)
sk146net/ipx/af_ipx.cintrfc = sk->ipx_intrfc;
sk153net/ipx/af_ipx.cif(s==sk) {
sk160net/ipx/af_ipx.cif(s->next==sk) {
sk161net/ipx/af_ipx.cs->next=sk->next;
sk178net/ipx/af_ipx.cipx_destroy_socket(ipx_socket *sk)
sk182net/ipx/af_ipx.cipx_remove_socket(sk);
sk183net/ipx/af_ipx.cwhile((skb=skb_dequeue(&sk->receive_queue))!=NULL) {
sk187net/ipx/af_ipx.ckfree_s(sk,sizeof(*sk));
sk233net/ipx/af_ipx.cipxitf_insert_socket(ipx_interface *intrfc, ipx_socket *sk)
sk237net/ipx/af_ipx.csk->ipx_intrfc = intrfc;
sk238net/ipx/af_ipx.csk->next = NULL;
sk240net/ipx/af_ipx.cintrfc->if_sklist = sk;
sk244net/ipx/af_ipx.cs->next = sk;
sk533net/ipx/af_ipx.cif (skb->sk != NULL) {
sk537net/ipx/af_ipx.cskb->sk->wmem_alloc += skb->truesize;
sk1024net/ipx/af_ipx.cstatic int ipxrtr_route_packet(ipx_socket *sk, struct sockaddr_ipx *usipx, struct iovec *iov, int len)
sk1053net/ipx/af_ipx.cskb=sock_alloc_send_skb(sk, size, 0, 0, &err);
sk1069net/ipx/af_ipx.cipx->ipx_source.net = sk->ipx_intrfc->if_netnum;
sk1070net/ipx/af_ipx.cmemcpy(ipx->ipx_source.node, sk->ipx_intrfc->if_node, IPX_NODE_LEN);
sk1071net/ipx/af_ipx.cipx->ipx_source.sock = sk->ipx_port;
sk1328net/ipx/af_ipx.cipx_socket *sk;
sk1331net/ipx/af_ipx.csk=(ipx_socket *)sock->data;
sk1347net/ipx/af_ipx.csk->ipx_type=opt;
sk1355net/ipx/af_ipx.creturn sock_setsockopt(sk,level,optname,optval,optlen);
sk1365net/ipx/af_ipx.cipx_socket *sk;
sk1369net/ipx/af_ipx.csk=(ipx_socket *)sock->data;
sk1378net/ipx/af_ipx.cval=sk->ipx_type;
sk1386net/ipx/af_ipx.creturn sock_getsockopt(sk,level,optname,optval,optlen);
sk1405net/ipx/af_ipx.cstatic void def_callback1(struct sock *sk)
sk1407net/ipx/af_ipx.cif(!sk->dead)
sk1408net/ipx/af_ipx.cwake_up_interruptible(sk->sleep);
sk1411net/ipx/af_ipx.cstatic void def_callback2(struct sock *sk, int len)
sk1413net/ipx/af_ipx.cif(!sk->dead)
sk1415net/ipx/af_ipx.cwake_up_interruptible(sk->sleep);
sk1416net/ipx/af_ipx.csock_wake_async(sk->socket, 1);
sk1423net/ipx/af_ipx.cipx_socket *sk;
sk1424net/ipx/af_ipx.csk=(ipx_socket *)kmalloc(sizeof(*sk),GFP_KERNEL);
sk1425net/ipx/af_ipx.cif(sk==NULL)
sk1432net/ipx/af_ipx.ckfree_s((void *)sk,sizeof(*sk));
sk1435net/ipx/af_ipx.csk->dead=0;
sk1436net/ipx/af_ipx.csk->next=NULL;
sk1437net/ipx/af_ipx.csk->broadcast=0;
sk1438net/ipx/af_ipx.csk->rcvbuf=SK_RMEM_MAX;
sk1439net/ipx/af_ipx.csk->sndbuf=SK_WMEM_MAX;
sk1440net/ipx/af_ipx.csk->wmem_alloc=0;
sk1441net/ipx/af_ipx.csk->rmem_alloc=0;
sk1442net/ipx/af_ipx.csk->inuse=0;
sk1443net/ipx/af_ipx.csk->shutdown=0;
sk1444net/ipx/af_ipx.csk->prot=NULL;  /* So we use default free mechanisms */
sk1445net/ipx/af_ipx.csk->err=0;
sk1446net/ipx/af_ipx.cskb_queue_head_init(&sk->receive_queue);
sk1447net/ipx/af_ipx.cskb_queue_head_init(&sk->write_queue);
sk1448net/ipx/af_ipx.csk->send_head=NULL;
sk1449net/ipx/af_ipx.cskb_queue_head_init(&sk->back_log);
sk1450net/ipx/af_ipx.csk->state=TCP_CLOSE;
sk1451net/ipx/af_ipx.csk->socket=sock;
sk1452net/ipx/af_ipx.csk->type=sock->type;
sk1453net/ipx/af_ipx.csk->ipx_type=0;    /* General user level IPX */
sk1454net/ipx/af_ipx.csk->debug=0;
sk1455net/ipx/af_ipx.csk->ipx_intrfc = NULL;
sk1456net/ipx/af_ipx.cmemset(&sk->ipx_dest_addr,'\0',sizeof(sk->ipx_dest_addr));
sk1457net/ipx/af_ipx.csk->ipx_port = 0;
sk1458net/ipx/af_ipx.csk->mtu=IPX_MTU;
sk1462net/ipx/af_ipx.csock->data=(void *)sk;
sk1463net/ipx/af_ipx.csk->sleep=sock->wait;
sk1466net/ipx/af_ipx.csk->state_change=def_callback1;
sk1467net/ipx/af_ipx.csk->data_ready=def_callback2;
sk1468net/ipx/af_ipx.csk->write_space=def_callback1;
sk1469net/ipx/af_ipx.csk->error_report=def_callback1;
sk1471net/ipx/af_ipx.csk->zapped=1;
sk1477net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1478net/ipx/af_ipx.cif(sk==NULL)
sk1480net/ipx/af_ipx.cif(!sk->dead)
sk1481net/ipx/af_ipx.csk->state_change(sk);
sk1482net/ipx/af_ipx.csk->dead=1;
sk1484net/ipx/af_ipx.cipx_destroy_socket(sk);
sk1513net/ipx/af_ipx.cipx_socket *sk;
sk1517net/ipx/af_ipx.csk=(ipx_socket *)sock->data;
sk1519net/ipx/af_ipx.cif(sk->zapped==0)
sk1542net/ipx/af_ipx.cif(sk->debug)
sk1548net/ipx/af_ipx.csk->ipx_port=addr->sipx_port;
sk1549net/ipx/af_ipx.cipxitf_insert_socket(intrfc, sk);
sk1550net/ipx/af_ipx.csk->zapped=0;
sk1551net/ipx/af_ipx.cif(sk->debug)
sk1559net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1562net/ipx/af_ipx.csk->state = TCP_CLOSE;  
sk1569net/ipx/af_ipx.cif(sk->ipx_port==0)
sk1583net/ipx/af_ipx.csk->ipx_dest_addr.net=addr->sipx_network;
sk1584net/ipx/af_ipx.csk->ipx_dest_addr.sock=addr->sipx_port;
sk1585net/ipx/af_ipx.cmemcpy(sk->ipx_dest_addr.node,addr->sipx_node,IPX_NODE_LEN);
sk1586net/ipx/af_ipx.csk->ipx_type=addr->sipx_type;
sk1588net/ipx/af_ipx.csk->state=TCP_ESTABLISHED;
sk1609net/ipx/af_ipx.cipx_socket *sk;
sk1611net/ipx/af_ipx.csk=(ipx_socket *)sock->data;
sk1616net/ipx/af_ipx.cif(sk->state!=TCP_ESTABLISHED)
sk1618net/ipx/af_ipx.caddr=&sk->ipx_dest_addr;
sk1623net/ipx/af_ipx.cif (sk->ipx_intrfc != NULL) {
sk1624net/ipx/af_ipx.csipx.sipx_network = sk->ipx_intrfc->if_netnum;
sk1625net/ipx/af_ipx.cmemcpy(sipx.sipx_node, sk->ipx_intrfc->if_node,
sk1631net/ipx/af_ipx.csipx.sipx_port = sk->ipx_port;
sk1635net/ipx/af_ipx.csipx.sipx_type = sk->ipx_type;
sk1740net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1745net/ipx/af_ipx.cif (sk->zapped) return -EIO; /* Socket not bound */
sk1749net/ipx/af_ipx.cif(sk->ipx_port == 0) {
sk1764net/ipx/af_ipx.cif(sk->state!=TCP_ESTABLISHED)
sk1768net/ipx/af_ipx.cusipx->sipx_type=sk->ipx_type;
sk1769net/ipx/af_ipx.cusipx->sipx_port=sk->ipx_dest_addr.sock;
sk1770net/ipx/af_ipx.cusipx->sipx_network=sk->ipx_dest_addr.net;
sk1771net/ipx/af_ipx.cmemcpy(usipx->sipx_node,sk->ipx_dest_addr.node,IPX_NODE_LEN);
sk1774net/ipx/af_ipx.cretval = ipxrtr_route_packet(sk, usipx, msg->msg_iov, len);
sk1784net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1792net/ipx/af_ipx.cif(sk->err)
sk1793net/ipx/af_ipx.creturn sock_error(sk);
sk1795net/ipx/af_ipx.cif (sk->zapped)
sk1799net/ipx/af_ipx.cskb=skb_recv_datagram(sk,flags,noblock,&er);
sk1823net/ipx/af_ipx.cstatic int ipx_shutdown(struct socket *sk,int how)
sk1830net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1832net/ipx/af_ipx.creturn datagram_select(sk,sel_type,wait);
sk1839net/ipx/af_ipx.cipx_socket *sk=(ipx_socket *)sock->data;
sk1847net/ipx/af_ipx.camount=sk->sndbuf-sk->wmem_alloc;
sk1856net/ipx/af_ipx.cif((skb=skb_peek(&sk->receive_queue))!=NULL)
sk1884net/ipx/af_ipx.cif (sk)
sk1886net/ipx/af_ipx.cif(sk->stamp.tv_sec==0)
sk1891net/ipx/af_ipx.cmemcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval));
sk78net/netrom/af_netrom.cstatic void nr_remove_socket(struct sock *sk)
sk86net/netrom/af_netrom.cif ((s = nr_list) == sk) {
sk93net/netrom/af_netrom.cif (s->next == sk) {
sk94net/netrom/af_netrom.cs->next = sk->next;
sk143net/netrom/af_netrom.cstatic void nr_insert_socket(struct sock *sk)
sk150net/netrom/af_netrom.csk->next = nr_list;
sk151net/netrom/af_netrom.cnr_list  = sk;
sk244net/netrom/af_netrom.cvoid nr_destroy_socket(struct sock *sk)  /* Not static as its used by the timer */
sk252net/netrom/af_netrom.cdel_timer(&sk->timer);
sk254net/netrom/af_netrom.cnr_remove_socket(sk);
sk255net/netrom/af_netrom.cnr_clear_queues(sk);    /* Flush the queues */
sk257net/netrom/af_netrom.cwhile ((skb = skb_dequeue(&sk->receive_queue)) != NULL) {
sk258net/netrom/af_netrom.cif (skb->sk != sk) {      /* A pending connection */
sk259net/netrom/af_netrom.cskb->sk->dead = 1;  /* Queue the unaccepted socket for death */
sk260net/netrom/af_netrom.cnr_set_timer(skb->sk);
sk261net/netrom/af_netrom.cskb->sk->nr->state = NR_STATE_0;
sk267net/netrom/af_netrom.cif (sk->wmem_alloc || sk->rmem_alloc) { /* Defer: outstanding buffers */
sk268net/netrom/af_netrom.cinit_timer(&sk->timer);
sk269net/netrom/af_netrom.csk->timer.expires  = jiffies + 10 * HZ;
sk270net/netrom/af_netrom.csk->timer.function = nr_destroy_timer;
sk271net/netrom/af_netrom.csk->timer.data     = (unsigned long)sk;
sk272net/netrom/af_netrom.cadd_timer(&sk->timer);
sk274net/netrom/af_netrom.ckfree_s(sk->nr, sizeof(*sk->nr));
sk275net/netrom/af_netrom.ckfree_s(sk, sizeof(*sk));
sk299net/netrom/af_netrom.cstruct sock *sk;
sk302net/netrom/af_netrom.csk = (struct sock *)sock->data;
sk305net/netrom/af_netrom.creturn sock_setsockopt(sk, level, optname, optval, optlen);
sk322net/netrom/af_netrom.csk->nr->rtt = (opt * PR_SLOWHZ) / 2;
sk328net/netrom/af_netrom.csk->nr->t2 = opt * PR_SLOWHZ;
sk334net/netrom/af_netrom.csk->nr->n2 = opt;
sk338net/netrom/af_netrom.csk->nr->hdrincl = opt ? 1 : 0;
sk349net/netrom/af_netrom.cstruct sock *sk;
sk353net/netrom/af_netrom.csk = (struct sock *)sock->data;
sk356net/netrom/af_netrom.creturn sock_getsockopt(sk, level, optname, optval, optlen);
sk363net/netrom/af_netrom.cval = (sk->nr->t1 * 2) / PR_SLOWHZ;
sk367net/netrom/af_netrom.cval = sk->nr->t2 / PR_SLOWHZ;
sk371net/netrom/af_netrom.cval = sk->nr->n2;
sk375net/netrom/af_netrom.cval = sk->nr->hdrincl;
sk397net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk399net/netrom/af_netrom.cif (sk->type == SOCK_SEQPACKET && sk->state != TCP_LISTEN) {
sk400net/netrom/af_netrom.cmemset(&sk->nr->user_addr, '\0', sizeof(ax25_address));
sk401net/netrom/af_netrom.csk->max_ack_backlog = backlog;
sk402net/netrom/af_netrom.csk->state           = TCP_LISTEN;
sk409net/netrom/af_netrom.cstatic void def_callback1(struct sock *sk)
sk411net/netrom/af_netrom.cif (!sk->dead)
sk412net/netrom/af_netrom.cwake_up_interruptible(sk->sleep);
sk415net/netrom/af_netrom.cstatic void def_callback2(struct sock *sk, int len)
sk417net/netrom/af_netrom.cif (!sk->dead)
sk418net/netrom/af_netrom.cwake_up_interruptible(sk->sleep);
sk423net/netrom/af_netrom.cstruct sock *sk;
sk429net/netrom/af_netrom.cif ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL)
sk433net/netrom/af_netrom.ckfree_s(sk, sizeof(*sk));
sk437net/netrom/af_netrom.cskb_queue_head_init(&sk->receive_queue);
sk438net/netrom/af_netrom.cskb_queue_head_init(&sk->write_queue);
sk439net/netrom/af_netrom.cskb_queue_head_init(&sk->back_log);
sk441net/netrom/af_netrom.cinit_timer(&sk->timer);
sk443net/netrom/af_netrom.csk->socket        = sock;
sk444net/netrom/af_netrom.csk->type          = sock->type;
sk445net/netrom/af_netrom.csk->protocol      = protocol;
sk446net/netrom/af_netrom.csk->dead          = 0;
sk447net/netrom/af_netrom.csk->next          = NULL;
sk448net/netrom/af_netrom.csk->broadcast     = 0;
sk449net/netrom/af_netrom.csk->allocation    = GFP_KERNEL;
sk450net/netrom/af_netrom.csk->rcvbuf        = SK_RMEM_MAX;
sk451net/netrom/af_netrom.csk->sndbuf        = SK_WMEM_MAX;
sk452net/netrom/af_netrom.csk->wmem_alloc    = 0;
sk453net/netrom/af_netrom.csk->rmem_alloc    = 0;
sk454net/netrom/af_netrom.csk->inuse         = 0;
sk455net/netrom/af_netrom.csk->debug         = 0;
sk456net/netrom/af_netrom.csk->destroy       = 0;
sk457net/netrom/af_netrom.csk->prot          = NULL;  /* So we use default free mechanisms */
sk458net/netrom/af_netrom.csk->err           = 0;
sk459net/netrom/af_netrom.csk->localroute    = 0;
sk460net/netrom/af_netrom.csk->send_head     = NULL;
sk461net/netrom/af_netrom.csk->state         = TCP_CLOSE;
sk462net/netrom/af_netrom.csk->shutdown      = 0;
sk463net/netrom/af_netrom.csk->priority      = SOPRI_NORMAL;
sk464net/netrom/af_netrom.csk->ack_backlog   = 0;
sk465net/netrom/af_netrom.csk->mtu           = NETROM_MTU;  /* 236 */
sk466net/netrom/af_netrom.csk->zapped        = 1;
sk467net/netrom/af_netrom.csk->window    = nr_default.window;
sk469net/netrom/af_netrom.csk->state_change = def_callback1;
sk470net/netrom/af_netrom.csk->data_ready   = def_callback2;
sk471net/netrom/af_netrom.csk->write_space  = def_callback1;
sk472net/netrom/af_netrom.csk->error_report = def_callback1;
sk475net/netrom/af_netrom.csock->data = (void *)sk;
sk476net/netrom/af_netrom.csk->sleep  = sock->wait;
sk516net/netrom/af_netrom.cnr->sk = sk;
sk517net/netrom/af_netrom.csk->nr = nr;
sk524net/netrom/af_netrom.cstruct sock *sk;
sk530net/netrom/af_netrom.cif ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL)
sk534net/netrom/af_netrom.ckfree_s(sk, sizeof(*sk));
sk538net/netrom/af_netrom.cskb_queue_head_init(&sk->receive_queue);
sk539net/netrom/af_netrom.cskb_queue_head_init(&sk->write_queue);
sk540net/netrom/af_netrom.cskb_queue_head_init(&sk->back_log);
sk542net/netrom/af_netrom.cinit_timer(&sk->timer);
sk544net/netrom/af_netrom.csk->type        = osk->type;
sk545net/netrom/af_netrom.csk->socket      = osk->socket;
sk546net/netrom/af_netrom.csk->dead        = 0;
sk547net/netrom/af_netrom.csk->next        = NULL;
sk548net/netrom/af_netrom.csk->priority    = osk->priority;
sk549net/netrom/af_netrom.csk->broadcast   = 0;
sk550net/netrom/af_netrom.csk->protocol    = osk->protocol;
sk551net/netrom/af_netrom.csk->rcvbuf      = osk->rcvbuf;
sk552net/netrom/af_netrom.csk->sndbuf      = osk->sndbuf;
sk553net/netrom/af_netrom.csk->wmem_alloc  = 0;
sk554net/netrom/af_netrom.csk->rmem_alloc  = 0;
sk555net/netrom/af_netrom.csk->inuse       = 0;
sk556net/netrom/af_netrom.csk->ack_backlog = 0;
sk557net/netrom/af_netrom.csk->destroy     = 0;
sk558net/netrom/af_netrom.csk->prot        = NULL;  /* So we use default free mechanisms */
sk559net/netrom/af_netrom.csk->err         = 0;
sk560net/netrom/af_netrom.csk->localroute  = 0;
sk561net/netrom/af_netrom.csk->send_head   = NULL;
sk562net/netrom/af_netrom.csk->debug       = osk->debug;
sk563net/netrom/af_netrom.csk->state       = TCP_ESTABLISHED;
sk564net/netrom/af_netrom.csk->window      = osk->window;
sk565net/netrom/af_netrom.csk->shutdown    = 0;
sk566net/netrom/af_netrom.csk->mtu         = osk->mtu;
sk567net/netrom/af_netrom.csk->sleep       = osk->sleep;
sk568net/netrom/af_netrom.csk->zapped      = osk->zapped;
sk570net/netrom/af_netrom.csk->state_change = def_callback1;
sk571net/netrom/af_netrom.csk->data_ready   = def_callback2;
sk572net/netrom/af_netrom.csk->write_space  = def_callback1;
sk573net/netrom/af_netrom.csk->error_report = def_callback1;
sk599net/netrom/af_netrom.csk->nr = nr;
sk600net/netrom/af_netrom.cnr->sk = sk;
sk602net/netrom/af_netrom.creturn sk;
sk607net/netrom/af_netrom.cstruct sock *sk = (struct sock *)oldsock->data;
sk609net/netrom/af_netrom.creturn nr_create(newsock, sk->protocol);
sk614net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk616net/netrom/af_netrom.cif (sk == NULL) return 0;
sk618net/netrom/af_netrom.cif (sk->type == SOCK_SEQPACKET) {
sk619net/netrom/af_netrom.cswitch (sk->nr->state) {
sk621net/netrom/af_netrom.csk->state     = TCP_CLOSE;
sk622net/netrom/af_netrom.csk->state_change(sk);
sk623net/netrom/af_netrom.csk->dead      = 1;
sk624net/netrom/af_netrom.cnr_destroy_socket(sk);
sk628net/netrom/af_netrom.csk->nr->state = NR_STATE_0;
sk629net/netrom/af_netrom.csk->state     = TCP_CLOSE;
sk630net/netrom/af_netrom.csk->state_change(sk);
sk631net/netrom/af_netrom.csk->dead      = 1;
sk632net/netrom/af_netrom.cnr_destroy_socket(sk);
sk636net/netrom/af_netrom.cnr_write_internal(sk, NR_DISCACK);
sk637net/netrom/af_netrom.csk->nr->state = NR_STATE_0;
sk638net/netrom/af_netrom.csk->state     = TCP_CLOSE;
sk639net/netrom/af_netrom.csk->state_change(sk);
sk640net/netrom/af_netrom.csk->dead      = 1;
sk641net/netrom/af_netrom.cnr_destroy_socket(sk);
sk645net/netrom/af_netrom.cnr_clear_queues(sk);
sk646net/netrom/af_netrom.csk->nr->n2count = 0;
sk647net/netrom/af_netrom.cnr_write_internal(sk, NR_DISCREQ);
sk648net/netrom/af_netrom.csk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk);
sk649net/netrom/af_netrom.csk->nr->t2timer = 0;
sk650net/netrom/af_netrom.csk->nr->t4timer = 0;
sk651net/netrom/af_netrom.csk->nr->state   = NR_STATE_2;
sk652net/netrom/af_netrom.csk->state       = TCP_CLOSE;
sk653net/netrom/af_netrom.csk->state_change(sk);
sk654net/netrom/af_netrom.csk->dead        = 1;
sk655net/netrom/af_netrom.csk->destroy     = 1;
sk662net/netrom/af_netrom.csk->state = TCP_CLOSE;
sk663net/netrom/af_netrom.csk->state_change(sk);
sk664net/netrom/af_netrom.csk->dead = 1;
sk665net/netrom/af_netrom.cnr_destroy_socket(sk);
sk669net/netrom/af_netrom.csk->socket = NULL;  /* Not used, but we should do this. **/
sk676net/netrom/af_netrom.cstruct sock *sk;
sk681net/netrom/af_netrom.csk = (struct sock *)sock->data;
sk683net/netrom/af_netrom.cif (sk->zapped == 0)
sk690net/netrom/af_netrom.cif (nr_find_listener(&addr->fsa_ax25.sax25_call, sk->type) != NULL) {
sk691net/netrom/af_netrom.cif (sk->debug)
sk698net/netrom/af_netrom.cif (sk->debug)
sk709net/netrom/af_netrom.cmemcpy(&sk->nr->user_addr,   &addr->fsa_digipeater[0],   sizeof(ax25_address));
sk710net/netrom/af_netrom.cmemcpy(&sk->nr->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address));
sk720net/netrom/af_netrom.cmemcpy(&sk->nr->user_addr,   user,   sizeof(ax25_address));
sk721net/netrom/af_netrom.cmemcpy(&sk->nr->source_addr, source, sizeof(ax25_address));
sk724net/netrom/af_netrom.csk->nr->device = dev;
sk725net/netrom/af_netrom.cnr_insert_socket(sk);
sk727net/netrom/af_netrom.csk->zapped = 0;
sk729net/netrom/af_netrom.cif (sk->debug)
sk738net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk743net/netrom/af_netrom.cif (sk->state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
sk748net/netrom/af_netrom.cif (sk->state == TCP_CLOSE && sock->state == SS_CONNECTING) {
sk753net/netrom/af_netrom.cif (sk->state == TCP_ESTABLISHED && sk->type == SOCK_SEQPACKET)
sk756net/netrom/af_netrom.csk->state   = TCP_CLOSE;  
sk765net/netrom/af_netrom.cif (sk->zapped) {  /* Must bind first - autobinding in this may or may not work */
sk766net/netrom/af_netrom.csk->zapped = 0;
sk776net/netrom/af_netrom.cmemcpy(&sk->nr->user_addr,   user,   sizeof(ax25_address));
sk777net/netrom/af_netrom.cmemcpy(&sk->nr->source_addr, source, sizeof(ax25_address));
sk779net/netrom/af_netrom.csk->nr->device = dev;
sk781net/netrom/af_netrom.cnr_insert_socket(sk);    /* Finish the bind */
sk784net/netrom/af_netrom.cmemcpy(&sk->nr->dest_addr, &addr->sax25_call, sizeof(ax25_address));
sk789net/netrom/af_netrom.csk->nr->my_index = circuit / 256;
sk790net/netrom/af_netrom.csk->nr->my_id    = circuit % 256;
sk796net/netrom/af_netrom.csk->state     = TCP_SYN_SENT;
sk797net/netrom/af_netrom.cnr_establish_data_link(sk);
sk798net/netrom/af_netrom.csk->nr->state = NR_STATE_1;
sk799net/netrom/af_netrom.cnr_set_timer(sk);
sk802net/netrom/af_netrom.cif (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK))
sk810net/netrom/af_netrom.cwhile (sk->state == TCP_SYN_SENT) {
sk811net/netrom/af_netrom.cinterruptible_sleep_on(sk->sleep);
sk818net/netrom/af_netrom.cif (sk->state != TCP_ESTABLISHED) {
sk821net/netrom/af_netrom.creturn sock_error(sk);  /* Always set at this point */
sk838net/netrom/af_netrom.cstruct sock *sk;
sk847net/netrom/af_netrom.csk = (struct sock *)sock->data;
sk849net/netrom/af_netrom.cif (sk->type != SOCK_SEQPACKET)
sk852net/netrom/af_netrom.cif (sk->state != TCP_LISTEN)
sk859net/netrom/af_netrom.cif ((skb = skb_dequeue(&sk->receive_queue)) == NULL) {
sk864net/netrom/af_netrom.cinterruptible_sleep_on(sk->sleep);
sk872net/netrom/af_netrom.cnewsk = skb->sk;
sk877net/netrom/af_netrom.cskb->sk = NULL;
sk879net/netrom/af_netrom.csk->ack_backlog--;
sk889net/netrom/af_netrom.cstruct sock *sk;
sk891net/netrom/af_netrom.csk = (struct sock *)sock->data;
sk894net/netrom/af_netrom.cif (sk->state != TCP_ESTABLISHED)
sk898net/netrom/af_netrom.cmemcpy(&sax->fsa_ax25.sax25_call, &sk->nr->user_addr, sizeof(ax25_address));
sk899net/netrom/af_netrom.cmemcpy(&sax->fsa_digipeater[0],   &sk->nr->dest_addr, sizeof(ax25_address));
sk904net/netrom/af_netrom.cmemcpy(&sax->fsa_ax25.sax25_call, &sk->nr->source_addr, sizeof(ax25_address));
sk913net/netrom/af_netrom.cstruct sock *sk;
sk920net/netrom/af_netrom.cskb->sk = NULL;    /* Initially we don't know who its for */
sk949net/netrom/af_netrom.cif (((frametype & 0x0F) != NR_CONNREQ && (sk = nr_find_socket(circuit_index, circuit_id, SOCK_SEQPACKET)) != NULL) ||
sk950net/netrom/af_netrom.c((frametype & 0x0F) == NR_CONNREQ && (sk = nr_find_peer(circuit_index, circuit_id, SOCK_SEQPACKET)) != NULL)) {
sk954net/netrom/af_netrom.csk->nr->bpqext = 1;
sk956net/netrom/af_netrom.csk->nr->bpqext = 0;
sk958net/netrom/af_netrom.creturn nr_process_rx_frame(sk, skb);
sk964net/netrom/af_netrom.csk = nr_find_listener(dest, SOCK_SEQPACKET);
sk968net/netrom/af_netrom.cif (sk == NULL || sk->ack_backlog == sk->max_ack_backlog || (make = nr_make_new(sk)) == NULL) {
sk975net/netrom/af_netrom.cskb->sk             = make;
sk1013net/netrom/af_netrom.csk->ack_backlog++;
sk1014net/netrom/af_netrom.cmake->pair = sk;
sk1018net/netrom/af_netrom.cskb_queue_head(&sk->receive_queue, skb);
sk1022net/netrom/af_netrom.cif (!sk->dead)
sk1023net/netrom/af_netrom.csk->data_ready(sk, skb->len);
sk1030net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk1038net/netrom/af_netrom.cif (sk->err)
sk1039net/netrom/af_netrom.creturn sock_error(sk);
sk1044net/netrom/af_netrom.cif (sk->zapped)
sk1047net/netrom/af_netrom.cif (sk->nr->device == NULL)
sk1054net/netrom/af_netrom.cif (sk->type == SOCK_SEQPACKET && memcmp(&sk->nr->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
sk1059net/netrom/af_netrom.cif (sk->state != TCP_ESTABLISHED)
sk1062net/netrom/af_netrom.cmemcpy(&sax.sax25_call, &sk->nr->dest_addr, sizeof(ax25_address));
sk1065net/netrom/af_netrom.cif (sk->debug)
sk1069net/netrom/af_netrom.cif (sk->debug)
sk1074net/netrom/af_netrom.cif ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
sk1077net/netrom/af_netrom.cskb->sk   = sk;
sk1089net/netrom/af_netrom.cif (sk->debug)
sk1094net/netrom/af_netrom.c*asmptr++ = sk->nr->your_index;
sk1095net/netrom/af_netrom.c*asmptr++ = sk->nr->your_id;
sk1100net/netrom/af_netrom.cif (sk->debug)
sk1111net/netrom/af_netrom.cif (sk->debug)
sk1117net/netrom/af_netrom.cif (sk->debug)
sk1120net/netrom/af_netrom.cif (sk->state != TCP_ESTABLISHED) {
sk1125net/netrom/af_netrom.cnr_output(sk, skb);  /* Shove it onto the queue */
sk1134net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk1140net/netrom/af_netrom.cif (sk->err)
sk1141net/netrom/af_netrom.creturn sock_error(sk);
sk1150net/netrom/af_netrom.cif (sk->type == SOCK_SEQPACKET && sk->state != TCP_ESTABLISHED)
sk1154net/netrom/af_netrom.cif ((skb = skb_recv_datagram(sk, flags, noblock, &er)) == NULL)
sk1157net/netrom/af_netrom.cif (!sk->nr->hdrincl) {
sk1181net/netrom/af_netrom.cstatic int nr_shutdown(struct socket *sk, int how)
sk1188net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk1190net/netrom/af_netrom.creturn datagram_select(sk, sel_type, wait);
sk1195net/netrom/af_netrom.cstruct sock *sk = (struct sock *)sock->data;
sk1203net/netrom/af_netrom.camount = sk->sndbuf - sk->wmem_alloc;
sk1213net/netrom/af_netrom.cif ((skb = skb_peek(&sk->receive_queue)) != NULL)
sk1222net/netrom/af_netrom.cif (sk != NULL) {
sk1223net/netrom/af_netrom.cif (sk->stamp.tv_sec==0)
sk1227net/netrom/af_netrom.cmemcpy_tofs((void *)arg, &sk->stamp, sizeof(struct timeval));
sk53net/netrom/nr_in.cstatic int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
sk58net/netrom/nr_in.csk->nr->fraglen += skb->len;
sk59net/netrom/nr_in.cskb_queue_tail(&sk->nr->frag_queue, skb);
sk63net/netrom/nr_in.cif (!more && sk->nr->fraglen > 0) {  /* End of fragment */
sk64net/netrom/nr_in.csk->nr->fraglen += skb->len;
sk65net/netrom/nr_in.cskb_queue_tail(&sk->nr->frag_queue, skb);
sk67net/netrom/nr_in.cif ((skbn = alloc_skb(sk->nr->fraglen, GFP_ATOMIC)) == NULL)
sk72net/netrom/nr_in.cskbn->sk   = sk;
sk73net/netrom/nr_in.csk->rmem_alloc += skbn->truesize;
sk76net/netrom/nr_in.cskbo = skb_dequeue(&sk->nr->frag_queue);
sk80net/netrom/nr_in.cwhile ((skbo = skb_dequeue(&sk->nr->frag_queue)) != NULL) {
sk86net/netrom/nr_in.csk->nr->fraglen = 0;    
sk89net/netrom/nr_in.creturn sock_queue_rcv_skb(sk, skbn);
sk97net/netrom/nr_in.cstatic int nr_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype)
sk102net/netrom/nr_in.cnr_calculate_rtt(sk);
sk103net/netrom/nr_in.csk->window         = skb->data[20];
sk104net/netrom/nr_in.csk->nr->your_index = skb->data[17];
sk105net/netrom/nr_in.csk->nr->your_id    = skb->data[18];
sk106net/netrom/nr_in.csk->nr->t1timer    = 0;
sk107net/netrom/nr_in.csk->nr->t2timer    = 0;
sk108net/netrom/nr_in.csk->nr->t4timer    = 0;
sk109net/netrom/nr_in.csk->nr->vs         = 0;
sk110net/netrom/nr_in.csk->nr->va         = 0;
sk111net/netrom/nr_in.csk->nr->vr         = 0;
sk112net/netrom/nr_in.csk->nr->vl     = 0;
sk113net/netrom/nr_in.csk->nr->state      = NR_STATE_3;
sk114net/netrom/nr_in.csk->state          = TCP_ESTABLISHED;
sk115net/netrom/nr_in.csk->nr->n2count    = 0;
sk117net/netrom/nr_in.cif (!sk->dead)
sk118net/netrom/nr_in.csk->state_change(sk);
sk122net/netrom/nr_in.cnr_clear_queues(sk);
sk123net/netrom/nr_in.csk->nr->state = NR_STATE_0;
sk124net/netrom/nr_in.csk->state     = TCP_CLOSE;
sk125net/netrom/nr_in.csk->err       = ECONNREFUSED;
sk126net/netrom/nr_in.cif (!sk->dead)
sk127net/netrom/nr_in.csk->state_change(sk);
sk128net/netrom/nr_in.csk->dead      = 1;
sk143net/netrom/nr_in.cstatic int nr_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
sk148net/netrom/nr_in.cnr_write_internal(sk, NR_DISCACK);
sk151net/netrom/nr_in.csk->nr->state = NR_STATE_0;
sk152net/netrom/nr_in.csk->state     = TCP_CLOSE;
sk153net/netrom/nr_in.csk->err       = 0;
sk154net/netrom/nr_in.cif (!sk->dead)
sk155net/netrom/nr_in.csk->state_change(sk);
sk156net/netrom/nr_in.csk->dead      = 1;
sk171net/netrom/nr_in.cstatic int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype)
sk185net/netrom/nr_in.cnr_write_internal(sk, NR_CONNACK);
sk189net/netrom/nr_in.cnr_clear_queues(sk);
sk190net/netrom/nr_in.cnr_write_internal(sk, NR_DISCACK);
sk191net/netrom/nr_in.csk->nr->state = NR_STATE_0;
sk192net/netrom/nr_in.csk->state     = TCP_CLOSE;
sk193net/netrom/nr_in.csk->err       = 0;
sk194net/netrom/nr_in.cif (!sk->dead)
sk195net/netrom/nr_in.csk->state_change(sk);
sk196net/netrom/nr_in.csk->dead      = 1;
sk200net/netrom/nr_in.cnr_clear_queues(sk);
sk201net/netrom/nr_in.csk->nr->state = NR_STATE_0;
sk202net/netrom/nr_in.csk->state     = TCP_CLOSE;
sk203net/netrom/nr_in.csk->err       = ECONNRESET;
sk204net/netrom/nr_in.cif (!sk->dead)
sk205net/netrom/nr_in.csk->state_change(sk);
sk206net/netrom/nr_in.csk->dead      = 1;
sk214net/netrom/nr_in.csk->nr->condition |= PEER_RX_BUSY_CONDITION;
sk215net/netrom/nr_in.csk->nr->t4timer = nr_default.busy_delay;
sk217net/netrom/nr_in.csk->nr->condition &= ~PEER_RX_BUSY_CONDITION;
sk218net/netrom/nr_in.csk->nr->t4timer = 0;
sk220net/netrom/nr_in.cif (!nr_validate_nr(sk, nr)) {
sk224net/netrom/nr_in.cnr_frames_acked(sk, nr);
sk225net/netrom/nr_in.cnr_send_nak_frame(sk);
sk227net/netrom/nr_in.cif (sk->nr->condition & PEER_RX_BUSY_CONDITION) {
sk228net/netrom/nr_in.cnr_frames_acked(sk, nr);
sk230net/netrom/nr_in.cnr_check_iframes_acked(sk, nr);
sk244net/netrom/nr_in.csk->nr->condition |= PEER_RX_BUSY_CONDITION;
sk245net/netrom/nr_in.csk->nr->t4timer = nr_default.busy_delay;
sk247net/netrom/nr_in.csk->nr->condition &= ~PEER_RX_BUSY_CONDITION;
sk248net/netrom/nr_in.csk->nr->t4timer = 0;
sk250net/netrom/nr_in.cif (nr_validate_nr(sk, nr)) {
sk252net/netrom/nr_in.cnr_frames_acked(sk, nr);
sk253net/netrom/nr_in.cnr_send_nak_frame(sk);
sk255net/netrom/nr_in.cif (sk->nr->condition & PEER_RX_BUSY_CONDITION) {
sk256net/netrom/nr_in.cnr_frames_acked(sk, nr);
sk258net/netrom/nr_in.cnr_check_iframes_acked(sk, nr);
sk263net/netrom/nr_in.cskb_queue_head(&sk->nr->reseq_queue, skb);
sk264net/netrom/nr_in.cif (sk->nr->condition & OWN_RX_BUSY_CONDITION)
sk268net/netrom/nr_in.csave_vr = sk->nr->vr;
sk269net/netrom/nr_in.cwhile ((skbn = skb_dequeue(&sk->nr->reseq_queue)) != NULL) {
sk271net/netrom/nr_in.cif (ns == sk->nr->vr) {
sk272net/netrom/nr_in.cif (nr_queue_rx_frame(sk, skbn, frametype & NR_MORE_FLAG) == 0) {
sk273net/netrom/nr_in.csk->nr->vr = (sk->nr->vr + 1) % NR_MODULUS;
sk275net/netrom/nr_in.csk->nr->condition |= OWN_RX_BUSY_CONDITION;
sk278net/netrom/nr_in.c} else if (nr_in_rx_window(sk, ns)) {
sk286net/netrom/nr_in.cskb_queue_tail(&sk->nr->reseq_queue, skbn);
sk288net/netrom/nr_in.c} while (save_vr != sk->nr->vr);
sk292net/netrom/nr_in.cif (((sk->nr->vl + sk->window) % NR_MODULUS) == sk->nr->vr) {
sk293net/netrom/nr_in.cnr_enquiry_response(sk);
sk295net/netrom/nr_in.cif (!(sk->nr->condition & ACK_PENDING_CONDITION)) {
sk296net/netrom/nr_in.csk->nr->t2timer = sk->nr->t2;
sk297net/netrom/nr_in.csk->nr->condition |= ACK_PENDING_CONDITION;
sk310net/netrom/nr_in.cint nr_process_rx_frame(struct sock *sk, struct sk_buff *skb)
sk314net/netrom/nr_in.cif (sk->nr->state == NR_STATE_0 && sk->dead)
sk317net/netrom/nr_in.cif (sk->nr->state != NR_STATE_1 && sk->nr->state != NR_STATE_2 &&
sk318net/netrom/nr_in.csk->nr->state != NR_STATE_3) {
sk319net/netrom/nr_in.cprintk("nr_process_rx_frame: frame received - state: %d\n", sk->nr->state);
sk323net/netrom/nr_in.cdel_timer(&sk->timer);
sk327net/netrom/nr_in.cswitch (sk->nr->state)
sk330net/netrom/nr_in.cqueued = nr_state1_machine(sk, skb, frametype);
sk333net/netrom/nr_in.cqueued = nr_state2_machine(sk, skb, frametype);
sk336net/netrom/nr_in.cqueued = nr_state3_machine(sk, skb, frametype);
sk340net/netrom/nr_in.cnr_set_timer(sk);
sk49net/netrom/nr_out.cvoid nr_output(struct sock *sk, struct sk_buff *skb)
sk55net/netrom/nr_out.cmtu = sk->nr->device->mtu;
sk65net/netrom/nr_out.cif ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, 0, &err)) == NULL)
sk68net/netrom/nr_out.cskbn->sk   = sk;
sk87net/netrom/nr_out.cskb_queue_tail(&sk->write_queue, skbn); /* Throw it on the queue */
sk93net/netrom/nr_out.cskb_queue_tail(&sk->write_queue, skb);    /* Throw it on the queue */
sk96net/netrom/nr_out.cif (sk->nr->state == NR_STATE_3)
sk97net/netrom/nr_out.cnr_kick(sk);
sk104net/netrom/nr_out.cstatic void nr_send_iframe(struct sock *sk, struct sk_buff *skb)
sk109net/netrom/nr_out.cskb->data[2] = sk->nr->vs;
sk110net/netrom/nr_out.cskb->data[3] = sk->nr->vr;
sk112net/netrom/nr_out.cif (sk->nr->condition & OWN_RX_BUSY_CONDITION)
sk115net/netrom/nr_out.cnr_transmit_buffer(sk, skb);  
sk118net/netrom/nr_out.cvoid nr_send_nak_frame(struct sock *sk)
sk122net/netrom/nr_out.cif ((skb = skb_peek(&sk->nr->ack_queue)) == NULL)
sk128net/netrom/nr_out.cskbn->data[2] = sk->nr->va;
sk129net/netrom/nr_out.cskbn->data[3] = sk->nr->vr;
sk131net/netrom/nr_out.cif (sk->nr->condition & OWN_RX_BUSY_CONDITION)
sk134net/netrom/nr_out.cnr_transmit_buffer(sk, skbn);
sk136net/netrom/nr_out.csk->nr->condition &= ~ACK_PENDING_CONDITION;
sk137net/netrom/nr_out.csk->nr->vl      = sk->nr->vr;
sk138net/netrom/nr_out.csk->nr->t1timer = 0;
sk141net/netrom/nr_out.cvoid nr_kick(struct sock *sk)
sk147net/netrom/nr_out.cdel_timer(&sk->timer);
sk149net/netrom/nr_out.cstart = (skb_peek(&sk->nr->ack_queue) == NULL) ? sk->nr->va : sk->nr->vs;
sk150net/netrom/nr_out.cend   = (sk->nr->va + sk->window) % NR_MODULUS;
sk152net/netrom/nr_out.cif (!(sk->nr->condition & PEER_RX_BUSY_CONDITION) &&
sk154net/netrom/nr_out.cskb_peek(&sk->write_queue) != NULL) {
sk156net/netrom/nr_out.csk->nr->vs = start;
sk166net/netrom/nr_out.cskb  = skb_dequeue(&sk->write_queue);
sk170net/netrom/nr_out.cskb_queue_head(&sk->write_queue, skb);
sk174net/netrom/nr_out.cnext = (sk->nr->vs + 1) % NR_MODULUS;
sk180net/netrom/nr_out.cnr_send_iframe(sk, skbn);
sk182net/netrom/nr_out.csk->nr->vs = next;
sk187net/netrom/nr_out.cskb_queue_tail(&sk->nr->ack_queue, skb);
sk189net/netrom/nr_out.c} while (!last && (skb = skb_dequeue(&sk->write_queue)) != NULL);
sk191net/netrom/nr_out.csk->nr->vl = sk->nr->vr;
sk192net/netrom/nr_out.csk->nr->condition &= ~ACK_PENDING_CONDITION;
sk194net/netrom/nr_out.cif (sk->nr->t1timer == 0) {
sk195net/netrom/nr_out.csk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk);
sk199net/netrom/nr_out.cnr_set_timer(sk);
sk202net/netrom/nr_out.cvoid nr_transmit_buffer(struct sock *sk, struct sk_buff *skb)
sk211net/netrom/nr_out.cmemcpy(dptr, &sk->nr->source_addr, sizeof(ax25_address));
sk217net/netrom/nr_out.cmemcpy(dptr, &sk->nr->dest_addr,   sizeof(ax25_address));
sk230net/netrom/nr_out.csk->state = TCP_CLOSE;
sk231net/netrom/nr_out.csk->err   = ENETUNREACH;
sk232net/netrom/nr_out.cif (!sk->dead)
sk233net/netrom/nr_out.csk->state_change(sk);
sk234net/netrom/nr_out.csk->dead  = 1;
sk243net/netrom/nr_out.cvoid nr_establish_data_link(struct sock *sk)
sk245net/netrom/nr_out.csk->nr->condition = 0x00;
sk246net/netrom/nr_out.csk->nr->n2count   = 0;
sk248net/netrom/nr_out.cnr_write_internal(sk, NR_CONNREQ);
sk250net/netrom/nr_out.csk->nr->t2timer = 0;
sk251net/netrom/nr_out.csk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk);
sk257net/netrom/nr_out.cvoid nr_enquiry_response(struct sock *sk)
sk261net/netrom/nr_out.cif (sk->nr->condition & OWN_RX_BUSY_CONDITION) {
sk264net/netrom/nr_out.cif (skb_peek(&sk->nr->reseq_queue) != NULL) {
sk269net/netrom/nr_out.cnr_write_internal(sk, frametype);
sk271net/netrom/nr_out.csk->nr->vl = sk->nr->vr;
sk272net/netrom/nr_out.csk->nr->condition &= ~ACK_PENDING_CONDITION;
sk275net/netrom/nr_out.cvoid nr_check_iframes_acked(struct sock *sk, unsigned short nr)
sk277net/netrom/nr_out.cif (sk->nr->vs == nr) {
sk278net/netrom/nr_out.cnr_frames_acked(sk, nr);
sk279net/netrom/nr_out.cnr_calculate_rtt(sk);
sk280net/netrom/nr_out.csk->nr->t1timer = 0;
sk281net/netrom/nr_out.csk->nr->n2count = 0;
sk283net/netrom/nr_out.cif (sk->nr->va != nr) {
sk284net/netrom/nr_out.cnr_frames_acked(sk, nr);
sk285net/netrom/nr_out.csk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk);
sk47net/netrom/nr_subr.cvoid nr_clear_queues(struct sock *sk)
sk51net/netrom/nr_subr.cwhile ((skb = skb_dequeue(&sk->write_queue)) != NULL) {
sk52net/netrom/nr_subr.cskb->sk   = sk;
sk57net/netrom/nr_subr.cwhile ((skb = skb_dequeue(&sk->nr->ack_queue)) != NULL) {
sk58net/netrom/nr_subr.cskb->sk   = sk;
sk63net/netrom/nr_subr.cwhile ((skb = skb_dequeue(&sk->nr->reseq_queue)) != NULL) {
sk67net/netrom/nr_subr.cwhile ((skb = skb_dequeue(&sk->nr->frag_queue)) != NULL) {
sk77net/netrom/nr_subr.cvoid nr_frames_acked(struct sock *sk, unsigned short nr)
sk84net/netrom/nr_subr.cif (sk->nr->va != nr) {
sk85net/netrom/nr_subr.cwhile (skb_peek(&sk->nr->ack_queue) != NULL && sk->nr->va != nr) {
sk86net/netrom/nr_subr.cskb = skb_dequeue(&sk->nr->ack_queue);
sk87net/netrom/nr_subr.cskb->sk   = sk;
sk90net/netrom/nr_subr.csk->nr->va = (sk->nr->va + 1) % NR_MODULUS;
sk100net/netrom/nr_subr.cvoid nr_requeue_frames(struct sock *sk)
sk104net/netrom/nr_subr.cwhile ((skb = skb_dequeue(&sk->nr->ack_queue)) != NULL) {
sk106net/netrom/nr_subr.cskb_queue_head(&sk->write_queue, skb);
sk117net/netrom/nr_subr.cint nr_validate_nr(struct sock *sk, unsigned short nr)
sk119net/netrom/nr_subr.cunsigned short vc = sk->nr->va;
sk121net/netrom/nr_subr.cwhile (vc != sk->nr->vs) {
sk126net/netrom/nr_subr.cif (nr == sk->nr->vs) return 1;
sk134net/netrom/nr_subr.cint nr_in_rx_window(struct sock *sk, unsigned short ns)
sk136net/netrom/nr_subr.cunsigned short vc = sk->nr->vr;
sk137net/netrom/nr_subr.cunsigned short vt = (sk->nr->vl + sk->window) % NR_MODULUS;
sk151net/netrom/nr_subr.cvoid nr_write_internal(struct sock *sk, int frametype)
sk164net/netrom/nr_subr.clen += (sk->nr->bpqext) ? 2 : 1;
sk188net/netrom/nr_subr.ctimeout  = (sk->nr->rtt / PR_SLOWHZ) * 2;
sk189net/netrom/nr_subr.c*dptr++  = sk->nr->my_index;
sk190net/netrom/nr_subr.c*dptr++  = sk->nr->my_id;
sk194net/netrom/nr_subr.c*dptr++  = sk->window;
sk195net/netrom/nr_subr.cmemcpy(dptr, &sk->nr->user_addr, sizeof(ax25_address));
sk200net/netrom/nr_subr.cmemcpy(dptr, &sk->nr->source_addr, sizeof(ax25_address));
sk210net/netrom/nr_subr.c*dptr++ = sk->nr->your_index;
sk211net/netrom/nr_subr.c*dptr++ = sk->nr->your_id;
sk212net/netrom/nr_subr.c*dptr++ = sk->nr->my_index;
sk213net/netrom/nr_subr.c*dptr++ = sk->nr->my_id;
sk215net/netrom/nr_subr.c*dptr++ = sk->window;
sk216net/netrom/nr_subr.cif (sk->nr->bpqext) *dptr++ = nr_default.ttl;
sk221net/netrom/nr_subr.c*dptr++ = sk->nr->your_index;
sk222net/netrom/nr_subr.c*dptr++ = sk->nr->your_id;
sk229net/netrom/nr_subr.c*dptr++ = sk->nr->your_index;
sk230net/netrom/nr_subr.c*dptr++ = sk->nr->your_id;
sk232net/netrom/nr_subr.c*dptr++ = sk->nr->vr;
sk239net/netrom/nr_subr.cnr_transmit_buffer(sk, skb);
sk283net/netrom/nr_subr.cskbn->sk   = NULL;
sk292net/netrom/nr_subr.cunsigned short nr_calculate_t1(struct sock *sk)
sk296net/netrom/nr_subr.cfor (t = 2, n = 0; n < sk->nr->n2count; n++)
sk301net/netrom/nr_subr.creturn t * sk->nr->rtt;
sk307net/netrom/nr_subr.cvoid nr_calculate_rtt(struct sock *sk)
sk309net/netrom/nr_subr.cif (sk->nr->t1timer > 0 && sk->nr->n2count == 0)
sk310net/netrom/nr_subr.csk->nr->rtt = (9 * sk->nr->rtt + sk->nr->t1 - sk->nr->t1timer) / 10;
sk314net/netrom/nr_subr.cif (sk->nr->rtt < (NR_T1CLAMPLO))
sk315net/netrom/nr_subr.csk->nr->rtt = (NR_T1CLAMPLO);
sk317net/netrom/nr_subr.cif (sk->nr->rtt == 0)
sk318net/netrom/nr_subr.csk->nr->rtt = PR_SLOWHZ;
sk322net/netrom/nr_subr.cif (sk->nr->rtt > (NR_T1CLAMPHI))
sk323net/netrom/nr_subr.csk->nr->rtt = (NR_T1CLAMPHI);
sk48net/netrom/nr_timer.cvoid nr_set_timer(struct sock *sk)
sk54net/netrom/nr_timer.cdel_timer(&sk->timer);
sk57net/netrom/nr_timer.csk->timer.next     = sk->timer.prev = NULL;  
sk58net/netrom/nr_timer.csk->timer.data     = (unsigned long)sk;
sk59net/netrom/nr_timer.csk->timer.function = &nr_timer;
sk61net/netrom/nr_timer.csk->timer.expires = jiffies+10;
sk62net/netrom/nr_timer.cadd_timer(&sk->timer);
sk65net/netrom/nr_timer.cstatic void nr_reset_timer(struct sock *sk)
sk71net/netrom/nr_timer.cdel_timer(&sk->timer);
sk74net/netrom/nr_timer.csk->timer.data     = (unsigned long)sk;
sk75net/netrom/nr_timer.csk->timer.function = &nr_timer;
sk76net/netrom/nr_timer.csk->timer.expires  = jiffies+10;
sk77net/netrom/nr_timer.cadd_timer(&sk->timer);
sk88net/netrom/nr_timer.cstruct sock *sk = (struct sock *)param;
sk90net/netrom/nr_timer.cswitch (sk->nr->state) {
sk94net/netrom/nr_timer.cif (sk->destroy || (sk->state == TCP_LISTEN && sk->dead)) {
sk95net/netrom/nr_timer.cdel_timer(&sk->timer);
sk96net/netrom/nr_timer.cnr_destroy_socket(sk);
sk105net/netrom/nr_timer.cif (sk->rmem_alloc < (sk->rcvbuf / 2) && (sk->nr->condition & OWN_RX_BUSY_CONDITION)) {
sk106net/netrom/nr_timer.csk->nr->condition &= ~OWN_RX_BUSY_CONDITION;
sk107net/netrom/nr_timer.cnr_write_internal(sk, NR_INFOACK);
sk108net/netrom/nr_timer.csk->nr->condition &= ~ACK_PENDING_CONDITION;
sk109net/netrom/nr_timer.csk->nr->vl = sk->nr->vr;
sk115net/netrom/nr_timer.cnr_kick(sk);
sk122net/netrom/nr_timer.cif (sk->nr->t2timer > 0 && --sk->nr->t2timer == 0) {
sk123net/netrom/nr_timer.cif (sk->nr->state == NR_STATE_3) {
sk124net/netrom/nr_timer.cif (sk->nr->condition & ACK_PENDING_CONDITION) {
sk125net/netrom/nr_timer.csk->nr->condition &= ~ACK_PENDING_CONDITION;
sk126net/netrom/nr_timer.cnr_enquiry_response(sk);
sk131net/netrom/nr_timer.cif (sk->nr->t4timer > 0 && --sk->nr->t4timer == 0) {
sk132net/netrom/nr_timer.csk->nr->condition &= ~PEER_RX_BUSY_CONDITION;
sk135net/netrom/nr_timer.cif (sk->nr->t1timer == 0 || --sk->nr->t1timer > 0) {
sk136net/netrom/nr_timer.cnr_reset_timer(sk);
sk140net/netrom/nr_timer.cswitch (sk->nr->state) {
sk142net/netrom/nr_timer.cif (sk->nr->n2count == sk->nr->n2) {
sk143net/netrom/nr_timer.cnr_clear_queues(sk);
sk144net/netrom/nr_timer.csk->nr->state = NR_STATE_0;
sk145net/netrom/nr_timer.csk->state     = TCP_CLOSE;
sk146net/netrom/nr_timer.csk->err       = ETIMEDOUT;
sk147net/netrom/nr_timer.cif (!sk->dead)
sk148net/netrom/nr_timer.csk->state_change(sk);
sk149net/netrom/nr_timer.csk->dead      = 1;
sk151net/netrom/nr_timer.csk->nr->n2count++;
sk152net/netrom/nr_timer.cnr_write_internal(sk, NR_CONNREQ);
sk157net/netrom/nr_timer.cif (sk->nr->n2count == sk->nr->n2) {
sk158net/netrom/nr_timer.cnr_clear_queues(sk);
sk159net/netrom/nr_timer.csk->nr->state = NR_STATE_0;
sk160net/netrom/nr_timer.csk->state     = TCP_CLOSE;
sk161net/netrom/nr_timer.csk->err       = ETIMEDOUT;
sk162net/netrom/nr_timer.cif (!sk->dead)
sk163net/netrom/nr_timer.csk->state_change(sk);
sk164net/netrom/nr_timer.csk->dead      = 1;
sk166net/netrom/nr_timer.csk->nr->n2count++;
sk167net/netrom/nr_timer.cnr_write_internal(sk, NR_DISCREQ);
sk172net/netrom/nr_timer.cif (sk->nr->n2count == sk->nr->n2) {
sk173net/netrom/nr_timer.cnr_clear_queues(sk);
sk174net/netrom/nr_timer.csk->nr->state = NR_STATE_0;
sk175net/netrom/nr_timer.csk->state     = TCP_CLOSE;
sk176net/netrom/nr_timer.csk->err       = ETIMEDOUT;
sk177net/netrom/nr_timer.cif (!sk->dead)
sk178net/netrom/nr_timer.csk->state_change(sk);
sk179net/netrom/nr_timer.csk->dead      = 1;
sk181net/netrom/nr_timer.csk->nr->n2count++;
sk182net/netrom/nr_timer.cnr_requeue_frames(sk);
sk187net/netrom/nr_timer.csk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk);
sk189net/netrom/nr_timer.cnr_set_timer(sk);
sk86net/unix/af_unix.cstatic void unix_remove_socket(unix_socket *sk)
sk95net/unix/af_unix.cif(*s==sk)
sk97net/unix/af_unix.c*s=sk->next;
sk106net/unix/af_unix.cstatic void unix_insert_socket(unix_socket *sk)
sk109net/unix/af_unix.csk->next=unix_socket_list;
sk110net/unix/af_unix.cunix_socket_list=sk;
sk138net/unix/af_unix.cunix_socket *sk=(unix_socket *)data;
sk139net/unix/af_unix.cif(sk->protinfo.af_unix.locks==0 && sk->wmem_alloc==0)
sk141net/unix/af_unix.cif(sk->protinfo.af_unix.name)
sk142net/unix/af_unix.ckfree(sk->protinfo.af_unix.name);
sk143net/unix/af_unix.ckfree_s(sk,sizeof(*sk));
sk151net/unix/af_unix.csk->timer.expires=jiffies+10*HZ;  /* No real hurry try it every 10 seconds or so */
sk152net/unix/af_unix.cadd_timer(&sk->timer);
sk156net/unix/af_unix.cstatic void unix_delayed_delete(unix_socket *sk)
sk158net/unix/af_unix.csk->timer.data=(unsigned long)sk;
sk159net/unix/af_unix.csk->timer.expires=jiffies+HZ;    /* Normally 1 second after will clean up. After that we try every 10 */
sk160net/unix/af_unix.csk->timer.function=unix_destroy_timer;
sk161net/unix/af_unix.cadd_timer(&sk->timer);
sk164net/unix/af_unix.cstatic void unix_destroy_socket(unix_socket *sk)
sk167net/unix/af_unix.cunix_remove_socket(sk);
sk169net/unix/af_unix.cwhile((skb=skb_dequeue(&sk->receive_queue))!=NULL)
sk171net/unix/af_unix.cif(sk->state==TCP_LISTEN)
sk173net/unix/af_unix.cunix_socket *osk=skb->sk;
sk186net/unix/af_unix.cif(sk->protinfo.af_unix.inode!=NULL)
sk188net/unix/af_unix.ciput(sk->protinfo.af_unix.inode);
sk189net/unix/af_unix.csk->protinfo.af_unix.inode=NULL;
sk192net/unix/af_unix.cif(--sk->protinfo.af_unix.locks==0 && sk->wmem_alloc==0)
sk194net/unix/af_unix.cif(sk->protinfo.af_unix.name)
sk195net/unix/af_unix.ckfree(sk->protinfo.af_unix.name);
sk196net/unix/af_unix.ckfree_s(sk,sizeof(*sk));
sk200net/unix/af_unix.csk->dead=1;
sk201net/unix/af_unix.cunix_delayed_delete(sk);  /* Try every so often until buffers are all freed */
sk220net/unix/af_unix.cunix_socket *sk=sock->data;
sk223net/unix/af_unix.creturn sock_setsockopt(sk,level,optname,optval,optlen);  
sk228net/unix/af_unix.cunix_socket *sk=sock->data;
sk231net/unix/af_unix.creturn sock_getsockopt(sk,level,optname,optval,optlen);
sk236net/unix/af_unix.cunix_socket *sk=sock->data;
sk237net/unix/af_unix.cif(sk->type!=SOCK_STREAM)
sk239net/unix/af_unix.cif(sk->protinfo.af_unix.name==NULL)
sk241net/unix/af_unix.csk->max_ack_backlog=backlog;
sk242net/unix/af_unix.csk->state=TCP_LISTEN;
sk246net/unix/af_unix.cstatic void def_callback1(struct sock *sk)
sk248net/unix/af_unix.cif(!sk->dead)
sk249net/unix/af_unix.cwake_up_interruptible(sk->sleep);
sk252net/unix/af_unix.cstatic void def_callback2(struct sock *sk, int len)
sk254net/unix/af_unix.cif(!sk->dead)
sk256net/unix/af_unix.cwake_up_interruptible(sk->sleep);
sk257net/unix/af_unix.csock_wake_async(sk->socket, 1);
sk261net/unix/af_unix.cstatic void def_callback3(struct sock *sk)
sk263net/unix/af_unix.cif(!sk->dead)
sk265net/unix/af_unix.cwake_up_interruptible(sk->sleep);
sk266net/unix/af_unix.csock_wake_async(sk->socket, 2);
sk272net/unix/af_unix.cunix_socket *sk;
sk276net/unix/af_unix.csk=(unix_socket *)kmalloc(sizeof(*sk),GFP_KERNEL);
sk277net/unix/af_unix.cif(sk==NULL)
sk292net/unix/af_unix.ckfree_s(sk,sizeof(*sk));
sk295net/unix/af_unix.csk->type=sock->type;
sk296net/unix/af_unix.cinit_timer(&sk->timer);
sk297net/unix/af_unix.cskb_queue_head_init(&sk->write_queue);
sk298net/unix/af_unix.cskb_queue_head_init(&sk->receive_queue);
sk299net/unix/af_unix.cskb_queue_head_init(&sk->back_log);
sk300net/unix/af_unix.csk->protinfo.af_unix.family=AF_UNIX;
sk301net/unix/af_unix.csk->protinfo.af_unix.inode=NULL;
sk302net/unix/af_unix.csk->protinfo.af_unix.locks=1;    /* Us */
sk303net/unix/af_unix.csk->protinfo.af_unix.readsem=MUTEX;  /* single task reading lock */
sk304net/unix/af_unix.csk->protinfo.af_unix.name=NULL;
sk305net/unix/af_unix.csk->protinfo.af_unix.other=NULL;
sk306net/unix/af_unix.csk->protocol=0;
sk307net/unix/af_unix.csk->rmem_alloc=0;
sk308net/unix/af_unix.csk->wmem_alloc=0;
sk309net/unix/af_unix.csk->dead=0;
sk310net/unix/af_unix.csk->next=NULL;
sk311net/unix/af_unix.csk->broadcast=0;
sk312net/unix/af_unix.csk->rcvbuf=SK_RMEM_MAX;
sk313net/unix/af_unix.csk->sndbuf=SK_WMEM_MAX;
sk314net/unix/af_unix.csk->allocation=GFP_KERNEL;
sk315net/unix/af_unix.csk->inuse=0;
sk316net/unix/af_unix.csk->debug=0;
sk317net/unix/af_unix.csk->prot=NULL;
sk318net/unix/af_unix.csk->err=0;
sk319net/unix/af_unix.csk->localroute=0;
sk320net/unix/af_unix.csk->send_head=NULL;
sk321net/unix/af_unix.csk->state=TCP_CLOSE;
sk322net/unix/af_unix.csk->priority=SOPRI_NORMAL;
sk323net/unix/af_unix.csk->ack_backlog=0;
sk324net/unix/af_unix.csk->shutdown=0;
sk325net/unix/af_unix.csk->state_change=def_callback1;
sk326net/unix/af_unix.csk->data_ready=def_callback2;
sk327net/unix/af_unix.csk->write_space=def_callback3;
sk328net/unix/af_unix.csk->error_report=def_callback1;
sk329net/unix/af_unix.csk->mtu=4096;
sk330net/unix/af_unix.csk->socket=sock;
sk331net/unix/af_unix.csock->data=(void *)sk;
sk332net/unix/af_unix.csk->sleep=sock->wait;
sk333net/unix/af_unix.csk->zapped=0;
sk334net/unix/af_unix.cunix_insert_socket(sk);
sk345net/unix/af_unix.cunix_socket *sk=sock->data;
sk350net/unix/af_unix.cif(sk==NULL)
sk353net/unix/af_unix.csk->state_change(sk);
sk354net/unix/af_unix.csk->dead=1;
sk355net/unix/af_unix.cskpair=(unix_socket *)sk->protinfo.af_unix.other;  /* Person we send to (default) */
sk356net/unix/af_unix.cif(sk->type==SOCK_STREAM && skpair!=NULL && skpair->state!=TCP_LISTEN)
sk363net/unix/af_unix.csk->protinfo.af_unix.other=NULL;    /* No pair */
sk364net/unix/af_unix.cunix_destroy_socket(sk);      /* Try and flush out this socket. Throw our buffers at least */
sk405net/unix/af_unix.cunix_socket *sk=sock->data;
sk409net/unix/af_unix.cif(sk->protinfo.af_unix.name)
sk418net/unix/af_unix.cif(sk->protinfo.af_unix.inode!=NULL)
sk421net/unix/af_unix.csk->protinfo.af_unix.name=kmalloc(addr_len+1, GFP_KERNEL);
sk422net/unix/af_unix.cif(sk->protinfo.af_unix.name==NULL)
sk424net/unix/af_unix.cmemcpy(sk->protinfo.af_unix.name, sunaddr->sun_path, addr_len+1);
sk429net/unix/af_unix.cerr=do_mknod(sk->protinfo.af_unix.name,S_IFSOCK|S_IRWXUGO,0);
sk431net/unix/af_unix.cerr=open_namei(sk->protinfo.af_unix.name, 2, S_IFSOCK, &sk->protinfo.af_unix.inode, NULL);
sk437net/unix/af_unix.ckfree_s(sk->protinfo.af_unix.name,addr_len+1);
sk438net/unix/af_unix.csk->protinfo.af_unix.name=NULL;
sk451net/unix/af_unix.cunix_socket *sk=sock->data;
sk457net/unix/af_unix.cif(sk->type==SOCK_STREAM && sk->protinfo.af_unix.other)
sk459net/unix/af_unix.cif(sock->state==SS_CONNECTING && sk->state==TCP_ESTABLISHED)
sk464net/unix/af_unix.cif(sock->state==SS_CONNECTING && sk->state == TCP_CLOSE)
sk479net/unix/af_unix.cif(sk->type==SOCK_DGRAM && sk->protinfo.af_unix.other)
sk481net/unix/af_unix.csk->protinfo.af_unix.other->protinfo.af_unix.locks--;
sk482net/unix/af_unix.csk->protinfo.af_unix.other=NULL;
sk491net/unix/af_unix.cif(other->type!=sk->type)
sk494net/unix/af_unix.csk->protinfo.af_unix.other=other;
sk496net/unix/af_unix.csk->state=TCP_ESTABLISHED;
sk507net/unix/af_unix.cskb=sock_alloc_send_skb(sk, 0, 0, 0, &err); /* Marker object */
sk510net/unix/af_unix.cskb->sk=sk;        /* So they know it is us */
sk512net/unix/af_unix.csk->state=TCP_CLOSE;
sk520net/unix/af_unix.cif(other->type!=sk->type)
sk527net/unix/af_unix.csk->protinfo.af_unix.other=other;
sk529net/unix/af_unix.csk->state=TCP_SYN_SENT;
sk539net/unix/af_unix.cwhile(sk->state==TCP_SYN_SENT)
sk546net/unix/af_unix.cinterruptible_sleep_on(sk->sleep);
sk558net/unix/af_unix.cif(sk->state==TCP_CLOSE)
sk560net/unix/af_unix.csk->protinfo.af_unix.other->protinfo.af_unix.locks--;
sk561net/unix/af_unix.csk->protinfo.af_unix.other=NULL;
sk596net/unix/af_unix.cunix_socket *sk=sock->data;
sk600net/unix/af_unix.cif(sk->type!=SOCK_STREAM)
sk604net/unix/af_unix.cif(sk->state!=TCP_LISTEN)
sk610net/unix/af_unix.cif(sk->protinfo.af_unix.name!=NULL)
sk612net/unix/af_unix.cnewsk->protinfo.af_unix.name=kmalloc(strlen(sk->protinfo.af_unix.name)+1, GFP_KERNEL);
sk615net/unix/af_unix.cstrcpy(newsk->protinfo.af_unix.name, sk->protinfo.af_unix.name);
sk621net/unix/af_unix.cskb=skb_dequeue(&sk->receive_queue);
sk629net/unix/af_unix.cinterruptible_sleep_on(sk->sleep);
sk639net/unix/af_unix.ctsk=skb->sk;
sk641net/unix/af_unix.csk->ack_backlog--;
sk647net/unix/af_unix.csk->protinfo.af_unix.locks--;  /* Locked to child socket not master */
sk657net/unix/af_unix.cunix_socket *sk=sock->data;
sk662net/unix/af_unix.cif(sk->protinfo.af_unix.other==NULL)
sk664net/unix/af_unix.csk=sk->protinfo.af_unix.other;
sk667net/unix/af_unix.cif(sk->protinfo.af_unix.name==NULL)
sk673net/unix/af_unix.c*uaddr_len=sizeof(sunaddr->sun_family)+strlen(sk->protinfo.af_unix.name)+1;
sk674net/unix/af_unix.cstrcpy(sunaddr->sun_path,sk->protinfo.af_unix.name);    /* 108 byte limited */
sk680net/unix/af_unix.cunix_socket *sk=sock->data;
sk688net/unix/af_unix.cif(sk->err)
sk689net/unix/af_unix.creturn sock_error(sk);
sk701net/unix/af_unix.cif(sk->state==TCP_ESTABLISHED)
sk709net/unix/af_unix.cif(sk->protinfo.af_unix.other==NULL)
sk723net/unix/af_unix.cif(size>(sk->sndbuf-sizeof(struct sk_buff))/2)  /* Keep two messages in the pipe so it schedules better */
sk727net/unix/af_unix.csize=(sk->sndbuf-sizeof(struct sk_buff))/2;
sk744net/unix/af_unix.cskb=sock_alloc_send_skb(sk,size,limit,nonblock, &err);
sk750net/unix/af_unix.csk->err=-err;
sk757net/unix/af_unix.cskb->sk=sk;
sk765net/unix/af_unix.cother=sk->protinfo.af_unix.other;
sk769net/unix/af_unix.csk->protinfo.af_unix.other=NULL;
sk803net/unix/af_unix.cstatic void unix_data_wait(unix_socket * sk)
sk806net/unix/af_unix.cif (!skb_peek(&sk->receive_queue)) {
sk807net/unix/af_unix.csk->socket->flags |= SO_WAITDATA;
sk808net/unix/af_unix.cinterruptible_sleep_on(sk->sleep);
sk809net/unix/af_unix.csk->socket->flags &= ~SO_WAITDATA;
sk816net/unix/af_unix.cunix_socket *sk=sock->data;
sk832net/unix/af_unix.cif(sk->err)
sk833net/unix/af_unix.creturn sock_error(sk);
sk835net/unix/af_unix.cdown(&sk->protinfo.af_unix.readsem);    /* Lock the socket */
sk849net/unix/af_unix.cskb=skb_dequeue(&sk->receive_queue);
sk852net/unix/af_unix.cup(&sk->protinfo.af_unix.readsem);
sk853net/unix/af_unix.cif(sk->shutdown & RCV_SHUTDOWN)
sk861net/unix/af_unix.cunix_data_wait(sk);
sk862net/unix/af_unix.cdown(&sk->protinfo.af_unix.readsem);
sk868net/unix/af_unix.cif(skb->sk->protinfo.af_unix.name)
sk870net/unix/af_unix.cmemcpy(sunaddr->sun_path, skb->sk->protinfo.af_unix.name, 108);
sk887net/unix/af_unix.cskb_queue_head(&sk->receive_queue, skb);
sk896net/unix/af_unix.cup(&sk->protinfo.af_unix.readsem);
sk902net/unix/af_unix.cunix_socket *sk=(unix_socket *)sock->data;
sk903net/unix/af_unix.cunix_socket *other=sk->protinfo.af_unix.other;
sk906net/unix/af_unix.csk->shutdown|=SEND_SHUTDOWN;
sk907net/unix/af_unix.csk->state_change(sk);
sk914net/unix/af_unix.cother=sk->protinfo.af_unix.other;
sk917net/unix/af_unix.csk->shutdown|=RCV_SHUTDOWN;
sk918net/unix/af_unix.csk->state_change(sk);
sk936net/unix/af_unix.cunix_socket *sk=sock->data;
sk947net/unix/af_unix.camount=sk->sndbuf-sk->wmem_alloc;
sk955net/unix/af_unix.cif(sk->state==TCP_LISTEN)
sk958net/unix/af_unix.cif((skb=skb_peek(&sk->receive_queue))!=NULL)