tag | line | file | source code |
sk | 117 | drivers/net/de600.c | static unsigned long de600_rspace(struct sock *sk); |
sk | 483 | drivers/net/de600.c | if (skb->sk && (skb->sk->protocol == IPPROTO_TCP) && |
sk | 484 | drivers/net/de600.c | (skb->sk->prot->rspace != &de600_rspace)) |
sk | 485 | drivers/net/de600.c | skb->sk->prot->rspace = de600_rspace; /* Ugh! */ |
sk | 814 | drivers/net/de600.c | de600_rspace(struct sock *sk) |
sk | 818 | drivers/net/de600.c | if (sk != NULL) { |
sk | 825 | drivers/net/de600.c | if (sk->rmem_alloc >= sk->rcvbuf-2*DE600_MIN_WINDOW) return(0); |
sk | 826 | drivers/net/de600.c | amt = min((sk->rcvbuf-sk->rmem_alloc)/2/*-DE600_MIN_WINDOW*/, DE600_MAX_WINDOW); |
sk | 83 | drivers/net/loopback.c | else if(skb->sk) |
sk | 91 | drivers/net/loopback.c | skb->sk->wmem_alloc-=skb->truesize; |
sk | 92 | drivers/net/loopback.c | skb->sk->write_space(skb->sk); |
sk | 34 | fs/smbfs/sock.c | smb_data_callback(struct sock *sk,int len) |
sk | 36 | fs/smbfs/sock.c | struct socket *sock = sk->socket; |
sk | 38 | fs/smbfs/sock.c | if(!sk->dead) |
sk | 71 | fs/smbfs/sock.c | wake_up_interruptible(sk->sleep); |
sk | 82 | fs/smbfs/sock.c | struct sock *sk; |
sk | 102 | fs/smbfs/sock.c | sk = (struct sock *)(sock->data); |
sk | 104 | fs/smbfs/sock.c | if (sk == NULL) { |
sk | 111 | fs/smbfs/sock.c | (unsigned int)(sk->data_ready), |
sk | 114 | fs/smbfs/sock.c | if (sk->data_ready == smb_data_callback) { |
sk | 119 | fs/smbfs/sock.c | server->data_ready = sk->data_ready; |
sk | 120 | fs/smbfs/sock.c | sk->data_ready = smb_data_callback; |
sk | 130 | fs/smbfs/sock.c | struct sock *sk; |
sk | 149 | fs/smbfs/sock.c | sk = (struct sock *)(sock->data); |
sk | 151 | fs/smbfs/sock.c | if (sk == NULL) { |
sk | 162 | fs/smbfs/sock.c | if (sk->data_ready != smb_data_callback) { |
sk | 169 | fs/smbfs/sock.c | (unsigned int)(sk->data_ready), |
sk | 172 | fs/smbfs/sock.c | sk->data_ready = server->data_ready; |
sk | 37 | include/linux/etherdevice.h | extern void eth_header_cache(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr); |
sk | 90 | include/linux/igmp.h | extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr); |
sk | 91 | include/linux/igmp.h | extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr); |
sk | 92 | include/linux/igmp.h | extern void ip_mc_drop_socket(struct sock *sk); |
sk | 119 | include/linux/mroute.h | extern int ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg); |
sk | 120 | include/linux/mroute.h | extern void mroute_close(struct sock *sk); |
sk | 168 | include/linux/netdevice.h | void (*header_cache)(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr); |
sk | 47 | include/linux/skbuff.h | struct sock *sk; /* Socket we are owned by */ |
sk | 364 | include/linux/skbuff.h | extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err); |
sk | 365 | include/linux/skbuff.h | extern int datagram_select(struct sock *sk, int sel_type, select_table *wait); |
sk | 159 | include/net/ax25.h | struct sock *sk; /* Backlink to socket */ |
sk | 32 | include/net/icmp.h | extern int icmp_ioctl(struct sock *sk, int cmd, |
sk | 77 | include/net/ip.h | extern int ip_ioctl(struct sock *sk, int cmd, |
sk | 97 | include/net/ip.h | extern void ip_queue_xmit(struct sock *sk, |
sk | 100 | include/net/ip.h | extern int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen); |
sk | 101 | include/net/ip.h | extern int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen); |
sk | 103 | include/net/ip.h | extern int ip_build_xmit(struct sock *sk, |
sk | 63 | include/net/netrom.h | struct sock *sk; /* Backlink to socket */ |
sk | 26 | include/net/raw.h | extern int raw_recvfrom(struct sock *sk, unsigned char *to, |
sk | 29 | include/net/raw.h | extern int raw_read(struct sock *sk, unsigned char *buff, |
sk | 232 | include/net/sock.h | void (*state_change)(struct sock *sk); |
sk | 233 | include/net/sock.h | void (*data_ready)(struct sock *sk,int bytes); |
sk | 234 | include/net/sock.h | void (*write_space)(struct sock *sk); |
sk | 235 | include/net/sock.h | void (*error_report)(struct sock *sk); |
sk | 240 | include/net/sock.h | struct sk_buff * (*wmalloc)(struct sock *sk, |
sk | 243 | include/net/sock.h | struct sk_buff * (*rmalloc)(struct sock *sk, |
sk | 246 | include/net/sock.h | void (*wfree)(struct sock *sk, struct sk_buff *skb); |
sk | 247 | include/net/sock.h | void (*rfree)(struct sock *sk, struct sk_buff *skb); |
sk | 248 | include/net/sock.h | unsigned long (*rspace)(struct sock *sk); |
sk | 249 | include/net/sock.h | unsigned long (*wspace)(struct sock *sk); |
sk | 250 | include/net/sock.h | void (*close)(struct sock *sk, int timeout); |
sk | 251 | include/net/sock.h | int (*read)(struct sock *sk, unsigned char *to, |
sk | 253 | include/net/sock.h | int (*write)(struct sock *sk, const unsigned char *to, |
sk | 255 | include/net/sock.h | int (*sendto)(struct sock *sk, |
sk | 259 | include/net/sock.h | int (*recvfrom)(struct sock *sk, |
sk | 269 | include/net/sock.h | int (*connect)(struct sock *sk, |
sk | 271 | include/net/sock.h | struct sock * (*accept) (struct sock *sk, int flags); |
sk | 272 | include/net/sock.h | void (*queue_xmit)(struct sock *sk, |
sk | 275 | include/net/sock.h | void (*retransmit)(struct sock *sk, int all); |
sk | 276 | include/net/sock.h | void (*write_wakeup)(struct sock *sk); |
sk | 277 | include/net/sock.h | void (*read_wakeup)(struct sock *sk); |
sk | 282 | include/net/sock.h | int (*select)(struct sock *sk, int which, |
sk | 284 | include/net/sock.h | int (*ioctl)(struct sock *sk, int cmd, |
sk | 286 | include/net/sock.h | int (*init)(struct sock *sk); |
sk | 287 | include/net/sock.h | void (*shutdown)(struct sock *sk, int how); |
sk | 288 | include/net/sock.h | int (*setsockopt)(struct sock *sk, int level, int optname, |
sk | 290 | include/net/sock.h | int (*getsockopt)(struct sock *sk, int level, int optname, |
sk | 318 | include/net/sock.h | extern void destroy_sock(struct sock *sk); |
sk | 322 | include/net/sock.h | extern void release_sock(struct sock *sk); |
sk | 332 | include/net/sock.h | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
sk | 335 | include/net/sock.h | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
sk | 338 | include/net/sock.h | extern void sock_wfree(struct sock *sk, |
sk | 340 | include/net/sock.h | extern void sock_rfree(struct sock *sk, |
sk | 342 | include/net/sock.h | extern unsigned long sock_rspace(struct sock *sk); |
sk | 343 | include/net/sock.h | extern unsigned long sock_wspace(struct sock *sk); |
sk | 345 | include/net/sock.h | extern int sock_setsockopt(struct sock *sk, int level, |
sk | 349 | include/net/sock.h | extern int sock_getsockopt(struct sock *sk, int level, |
sk | 367 | include/net/sock.h | extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) |
sk | 370 | include/net/sock.h | if(sk->rmem_alloc + skb->truesize >= sk->rcvbuf) |
sk | 374 | include/net/sock.h | sk->rmem_alloc+=skb->truesize; |
sk | 375 | include/net/sock.h | skb->sk=sk; |
sk | 377 | include/net/sock.h | skb_queue_tail(&sk->receive_queue,skb); |
sk | 378 | include/net/sock.h | if(!sk->dead) |
sk | 379 | include/net/sock.h | sk->data_ready(sk,skb->len); |
sk | 128 | include/net/tcp.h | extern void tcp_shutdown (struct sock *sk, int how); |
sk | 134 | include/net/tcp.h | extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
sk | 136 | include/net/tcp.h | extern int tcp_select_window(struct sock *sk); |
sk | 138 | include/net/tcp.h | unsigned long daddr, int len, struct sock *sk); |
sk | 139 | include/net/tcp.h | extern void tcp_send_probe0(struct sock *sk); |
sk | 37 | include/net/udp.h | __u32 daddr, int len, struct sock *sk); |
sk | 38 | include/net/udp.h | extern int udp_recvfrom(struct sock *sk, unsigned char *to, |
sk | 41 | include/net/udp.h | extern int udp_read(struct sock *sk, unsigned char *buff, |
sk | 43 | include/net/udp.h | extern int udp_connect(struct sock *sk, |
sk | 49 | include/net/udp.h | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
sk | 6 | net/802/llc.c | int llc_rx_adm(struct sock *sk,struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 11 | net/802/llc.c | send_response(sk,DM|pf); |
sk | 14 | net/802/llc.c | if(sk->state!=TCP_LISTEN) |
sk | 15 | net/802/llc.c | send_response(sk. DM|pf); |
sk | 18 | net/802/llc.c | sk=ll_rx_accept(sk); |
sk | 19 | net/802/llc.c | if(sk!=NULL) |
sk | 21 | net/802/llc.c | send_response(sk, UA|pf); |
sk | 22 | net/802/llc.c | sk->llc.vs=0; |
sk | 23 | net/802/llc.c | sk->llc.vr=0; |
sk | 24 | net/802/llc.c | sk->llc.p_flag=0; |
sk | 25 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 26 | net/802/llc.c | llc_state(sk,LLC_NORMAL); |
sk | 31 | net/802/llc.c | send_response(sk, DM|PF); |
sk | 36 | net/802/llc.c | int llc_rx_setup(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 42 | net/802/llc.c | sk->llc.vs=0; |
sk | 43 | net/802/llc.c | sk->llc.vr=0; |
sk | 44 | net/802/llc.c | send_response(sk, UA|pf); |
sk | 48 | net/802/llc.c | send_response(sk, DM|pf); |
sk | 49 | net/802/llc.c | llc_error(sk,ECONNRESET); |
sk | 50 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 55 | net/802/llc.c | if(cmd==UA && pf==sk->llc.p_flag) |
sk | 57 | net/802/llc.c | del_timer(&sk->llc.t1); |
sk | 58 | net/802/llc.c | sk->llc.vs=0; |
sk | 59 | net/802/llc.c | llc_update_p_flag(sk,pf); |
sk | 60 | net/802/llc.c | llc_state(sk,LLC_NORMAL); |
sk | 64 | net/802/llc.c | llc_error(sk, ECONNRESET); |
sk | 65 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 70 | net/802/llc.c | int llc_rx_reset(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 76 | net/802/llc.c | sk->llc.vr=0; |
sk | 77 | net/802/llc.c | sk->llc.vs=0; |
sk | 78 | net/802/llc.c | send_response(sk, UA|pf); |
sk | 82 | net/802/llc.c | if(sk->llc.cause_flag==1) |
sk | 83 | net/802/llc.c | llc_shutdown(sk,SHUTDOWN_MASK); |
sk | 85 | net/802/llc.c | llc_eror(sk, ECONNREFUSED); |
sk | 86 | net/802/llc.c | send_response(sk, DM|pf); |
sk | 87 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 94 | net/802/llc.c | if(sk->llc.p_flag==pf) |
sk | 96 | net/802/llc.c | del_timer(&sk->llc.t1); |
sk | 97 | net/802/llc.c | sk->llc.vs=0; |
sk | 98 | net/802/llc.c | sk->llc.vr=0; |
sk | 99 | net/802/llc.c | llc_update_p_flag(sk,pf); |
sk | 100 | net/802/llc.c | llc_confirm_reset(sk, sk->llc.cause_flag); |
sk | 101 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 102 | net/802/llc.c | llc_state(sk, LLC_NORMAL); |
sk | 107 | net/802/llc.c | llc_shutdown(sk, SHUTDOWN_MASK); |
sk | 108 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 114 | net/802/llc.c | int llc_rx_d_conn(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 120 | net/802/llc.c | llc_error(sk, ECONNRESET); |
sk | 121 | net/802/llc.c | llc_state(sk, ADM); |
sk | 126 | net/802/llc.c | llc_state(sk, LLC_D_CONN); |
sk | 129 | net/802/llc.c | send_response(sk, DM|PF); |
sk | 133 | net/802/llc.c | if(cmd==UA && pf==sk->llc.p_flag) |
sk | 135 | net/802/llc.c | del_timer(&sk->llc.t1); |
sk | 136 | net/802/llc.c | llc_state(sk, ADM); |
sk | 137 | net/802/llc.c | llc_confirm_reset(sk, sk->llc.cause_flag); |
sk | 141 | net/802/llc.c | del_timer(&sk->llc.t1); |
sk | 143 | net/802/llc.c | llc_shutdown(sk, SHUTDOWN_MASK); |
sk | 150 | net/802/llc.c | int llc_rx_error(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 156 | net/802/llc.c | sk->llc.vs=0; |
sk | 157 | net/802/llc.c | sk->llc.vr=0; |
sk | 158 | net/802/llc.c | send_response(sk, UA|pf); |
sk | 159 | net/802/llc.c | llc_error(sk,ECONNRESET); |
sk | 160 | net/802/llc.c | sk->llc.p_flag=0; |
sk | 161 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 162 | net/802/llc.c | llc_state(sk, LLC_NORMAL); |
sk | 166 | net/802/llc.c | send_response(sk, UA|pf); |
sk | 167 | net/802/llc.c | llc_shutdown(sk, SHUTDOWN_MASK); |
sk | 168 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 171 | net/802/llc.c | llc_resend_frmr_rsp(sk,pf); |
sk | 177 | net/802/llc.c | llc_error(sk, ECONNRESET); |
sk | 178 | net/802/llc.c | del_timer(&sk->llc.t1); |
sk | 179 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 183 | net/802/llc.c | send_command(sk, SABM); |
sk | 184 | net/802/llc.c | sk->llc.p_flag=pf; |
sk | 186 | net/802/llc.c | sk->llc.retry_count=0; |
sk | 187 | net/802/llc.c | sk->llc.cause_flag=0; |
sk | 188 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 189 | net/802/llc.c | llc_state(sk, LLC_RESET); |
sk | 199 | net/802/llc.c | int llc_rx_nr_shared(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 208 | net/802/llc.c | send_response(sk,DM|pf); |
sk | 209 | net/802/llc.c | llc_error(sk, ECONNRESET); |
sk | 210 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 214 | net/802/llc.c | send_response(sk,UA|pf); |
sk | 215 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 216 | net/802/llc.c | llc_shutdown(sk, SHUTDOWN_MASK); |
sk | 224 | net/802/llc.c | llc_send_frmr_response(sk, ILLEGAL_TYPE,pf); |
sk | 225 | net/802/llc.c | llc_state(sk, LLC_ERROR); |
sk | 226 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 241 | net/802/llc.c | send_command(sk, DM|pf); |
sk | 242 | net/802/llc.c | sk->llc.p_flag=pf; |
sk | 243 | net/802/llc.c | llc_start_t1(sk); |
sk | 244 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 245 | net/802/llc.c | sk->llc.cause_flag=0; |
sk | 246 | net/802/llc.c | llc_state(sk, LLC_D_CONN): |
sk | 250 | net/802/llc.c | llc_state(sk, LLC_ADM); |
sk | 251 | net/802/llc.c | llc_error(sk, ECONNREFUSED); |
sk | 260 | net/802/llc.c | llc_send_frmr_response(sk, UNEXPECTED_CONTROL, pf); |
sk | 261 | net/802/llc.c | llc_state(sk, LLC_ERROR); |
sk | 262 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 264 | net/802/llc.c | else if(pf==1 && sk->llc.p_flag==0) |
sk | 266 | net/802/llc.c | llc_send_frmr_response(sk, UNEXPECTED_RESPONSE, pf); |
sk | 267 | net/802/llc.c | llc_state(sk, LLC_ERROR); |
sk | 268 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 272 | net/802/llc.c | llc_send_frmr_response(sk, ILLEGAL_TYPE,pf); |
sk | 273 | net/802/llc.c | llc_state(sk, LLC_ERROR); |
sk | 274 | net/802/llc.c | llc_error(sk, EPROTO); |
sk | 288 | net/802/llc.c | int llc_rx_normal(struct sock *sk, struct sk_buff *skb, int type, int cmd, int pf, int nr, int ns) |
sk | 290 | net/802/llc.c | if(llc_rx_nr_shared(sk, skb, type, cmd, pf, nr, ns)) |
sk | 294 | net/802/llc.c | if(llc_invalid_ns(sk,ns)) |
sk | 296 | net/802/llc.c | if((type==RESP && sk->llc.p_flag==pf)||(type==CMD && pf==0 && sk->llc.p_flag==0)) |
sk | 298 | net/802/llc.c | llc_command(sk, REJ|PF); |
sk | 299 | net/802/llc.c | llc_ack_frames(sk,nr); /* Ack frames and update N(R) */ |
sk | 300 | net/802/llc.c | sk->llc.p_flag=PF; |
sk | 301 | net/802/llc.c | llc_state(sk, LLC_REJECT); |
sk | 302 | net/802/llc.c | sk->llc.retry_count=0; |
sk | 303 | net/802/llc.c | llc_start_t1(sk); |
sk | 304 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 306 | net/802/llc.c | else if((type==CMD && !pf && sk->llc.p_flag==1) || (type==RESP && !pf && sk->llc.p_flag==1)) |
sk | 309 | net/802/llc.c | llc_response(sk, REJ); |
sk | 311 | net/802/llc.c | llc_command(sk, REJ); |
sk | 312 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 313 | net/802/llc.c | sk->llc.retry_count=0; |
sk | 314 | net/802/llc.c | llc_state(sk, LLC_REJECT); |
sk | 315 | net/802/llc.c | llc_start_t1(sk); |
sk | 319 | net/802/llc.c | llc_response(sk, REJ|PF); |
sk | 320 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 321 | net/802/llc.c | sk->llc.retry_count=0; |
sk | 322 | net/802/llc.c | llc_start_t1(sk); |
sk | 331 | net/802/llc.c | if(sk->llc.p_flag==pf && !(type==CMD && pf)) |
sk | 333 | net/802/llc.c | sk->llc.vr=(sk->llc.vr+1)&7; |
sk | 334 | net/802/llc.c | llc_queue_rr_cmd(sk, PF); |
sk | 335 | net/802/llc.c | sk->llc.retry_count=0; |
sk | 336 | net/802/llc.c | llc_start_t1(sk); |
sk | 337 | net/802/llc.c | sk->llc.p_flag=1; |
sk | 338 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 339 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 341 | net/802/llc.c | else if(sk->ppc.p_flag!=pf) |
sk | 343 | net/802/llc.c | sk->llc.vr=(sk->llc.vr+1)&7; |
sk | 345 | net/802/llc.c | llc_queue_rr_resp(sk, 0); |
sk | 347 | net/802/llc.c | llc_queue_rr_cmd(sk, 0); |
sk | 348 | net/802/llc.c | if(sk->llc.nr!=nr) |
sk | 350 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 351 | net/802/llc.c | llc_reset_t1(sk); |
sk | 356 | net/802/llc.c | sk->llc.vr=(sk->llc.vr+1)&7; |
sk | 357 | net/802/llc.c | llc_queue_rr_resp(sk,PF); |
sk | 358 | net/802/llc.c | if(sk->llc.nr!=nr) |
sk | 360 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 361 | net/802/llc.c | llc_reset_t1(sk); |
sk | 364 | net/802/llc.c | llc_queue_data(sk,skb); |
sk | 370 | net/802/llc.c | if(type==CMD || (type==RESP && (!pf || pf==1 && sk->llc.p_flag==1))) |
sk | 372 | net/802/llc.c | llc_update_p_flag(sk,pf); |
sk | 373 | net/802/llc.c | if(sk->llc.nr!=nr) |
sk | 375 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 376 | net/802/llc.c | llc_reset_t1(sk); |
sk | 379 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 381 | net/802/llc.c | { sk->llc.remote_busy=1; |
sk | 382 | net/802/llc.c | if(!llc_t1_running(sk)) |
sk | 383 | net/802/llc.c | llc_start_t1(sk); |
sk | 389 | net/802/llc.c | llc_queue_rr_resp(sk,PF); |
sk | 392 | net/802/llc.c | send_response(sk, RR|PF); |
sk | 393 | net/802/llc.c | if(!llc_t1_running(sk)) |
sk | 394 | net/802/llc.c | llc_start_t1(sk); |
sk | 396 | net/802/llc.c | if(sk->llc.nr!=nr) |
sk | 398 | net/802/llc.c | llc_ack_frames(sk,nr); |
sk | 399 | net/802/llc.c | llc_reset_t1(sk); |
sk | 402 | net/802/llc.c | sk->llc.remote_busy=0; |
sk | 404 | net/802/llc.c | sk->llc.remote_busy=1; |
sk | 41 | net/802/p8022.c | skb->sk = NULL; |
sk | 66 | net/802/psnap.c | skb->sk = NULL; |
sk | 456 | net/appletalk/aarp.c | if(skb->sk==NULL) |
sk | 459 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
sk | 471 | net/appletalk/aarp.c | if(skb->sk==NULL) |
sk | 474 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
sk | 553 | net/appletalk/aarp.c | if(skb->sk==NULL) |
sk | 556 | net/appletalk/aarp.c | dev_queue_xmit(skb, skb->dev, skb->sk->priority); |
sk | 87 | net/appletalk/ddp.c | static void atalk_remove_socket(atalk_socket *sk) |
sk | 96 | net/appletalk/ddp.c | if(s==sk) |
sk | 104 | net/appletalk/ddp.c | if(s->next==sk) |
sk | 106 | net/appletalk/ddp.c | s->next=sk->next; |
sk | 115 | net/appletalk/ddp.c | static void atalk_insert_socket(atalk_socket *sk) |
sk | 120 | net/appletalk/ddp.c | sk->next=atalk_socket_list; |
sk | 121 | net/appletalk/ddp.c | atalk_socket_list=sk; |
sk | 180 | net/appletalk/ddp.c | static void atalk_destroy_socket(atalk_socket *sk); |
sk | 191 | net/appletalk/ddp.c | static void atalk_destroy_socket(atalk_socket *sk) |
sk | 194 | net/appletalk/ddp.c | atalk_remove_socket(sk); |
sk | 196 | net/appletalk/ddp.c | while((skb=skb_dequeue(&sk->receive_queue))!=NULL) |
sk | 201 | net/appletalk/ddp.c | if(sk->wmem_alloc == 0 && sk->rmem_alloc == 0 && sk->dead) |
sk | 202 | net/appletalk/ddp.c | kfree_s(sk,sizeof(*sk)); |
sk | 208 | net/appletalk/ddp.c | init_timer(&sk->timer); |
sk | 209 | net/appletalk/ddp.c | sk->timer.expires=jiffies+10*HZ; |
sk | 210 | net/appletalk/ddp.c | sk->timer.function=atalk_destroy_timer; |
sk | 211 | net/appletalk/ddp.c | sk->timer.data = (unsigned long)sk; |
sk | 212 | net/appletalk/ddp.c | add_timer(&sk->timer); |
sk | 948 | net/appletalk/ddp.c | atalk_socket *sk; |
sk | 951 | net/appletalk/ddp.c | sk=(atalk_socket *)sock->data; |
sk | 972 | net/appletalk/ddp.c | return sock_setsockopt(sk,level,optname,optval,optlen); |
sk | 987 | net/appletalk/ddp.c | atalk_socket *sk; |
sk | 991 | net/appletalk/ddp.c | sk=(atalk_socket *)sock->data; |
sk | 1005 | net/appletalk/ddp.c | return sock_getsockopt(sk,level,optname,optval,optlen); |
sk | 1032 | net/appletalk/ddp.c | static void def_callback1(struct sock *sk) |
sk | 1034 | net/appletalk/ddp.c | if(!sk->dead) |
sk | 1035 | net/appletalk/ddp.c | wake_up_interruptible(sk->sleep); |
sk | 1038 | net/appletalk/ddp.c | static void def_callback2(struct sock *sk, int len) |
sk | 1040 | net/appletalk/ddp.c | if(!sk->dead) |
sk | 1042 | net/appletalk/ddp.c | wake_up_interruptible(sk->sleep); |
sk | 1043 | net/appletalk/ddp.c | sock_wake_async(sk->socket,0); |
sk | 1054 | net/appletalk/ddp.c | atalk_socket *sk; |
sk | 1055 | net/appletalk/ddp.c | sk=(atalk_socket *)kmalloc(sizeof(*sk),GFP_KERNEL); |
sk | 1056 | net/appletalk/ddp.c | if(sk==NULL) |
sk | 1067 | net/appletalk/ddp.c | kfree_s((void *)sk,sizeof(*sk)); |
sk | 1070 | net/appletalk/ddp.c | sk->dead=0; |
sk | 1071 | net/appletalk/ddp.c | sk->next=NULL; |
sk | 1072 | net/appletalk/ddp.c | sk->broadcast=0; |
sk | 1073 | net/appletalk/ddp.c | sk->no_check=0; /* Checksums on by default */ |
sk | 1074 | net/appletalk/ddp.c | sk->allocation=GFP_KERNEL; |
sk | 1075 | net/appletalk/ddp.c | sk->rcvbuf=SK_RMEM_MAX; |
sk | 1076 | net/appletalk/ddp.c | sk->sndbuf=SK_WMEM_MAX; |
sk | 1077 | net/appletalk/ddp.c | sk->pair=NULL; |
sk | 1078 | net/appletalk/ddp.c | sk->wmem_alloc=0; |
sk | 1079 | net/appletalk/ddp.c | sk->rmem_alloc=0; |
sk | 1080 | net/appletalk/ddp.c | sk->inuse=0; |
sk | 1081 | net/appletalk/ddp.c | sk->proc=0; |
sk | 1082 | net/appletalk/ddp.c | sk->priority=1; |
sk | 1083 | net/appletalk/ddp.c | sk->shutdown=0; |
sk | 1084 | net/appletalk/ddp.c | sk->prot=NULL; /* So we use default free mechanisms */ |
sk | 1085 | net/appletalk/ddp.c | sk->broadcast=0; |
sk | 1086 | net/appletalk/ddp.c | sk->err=0; |
sk | 1087 | net/appletalk/ddp.c | skb_queue_head_init(&sk->receive_queue); |
sk | 1088 | net/appletalk/ddp.c | skb_queue_head_init(&sk->write_queue); |
sk | 1089 | net/appletalk/ddp.c | sk->send_head=NULL; |
sk | 1090 | net/appletalk/ddp.c | skb_queue_head_init(&sk->back_log); |
sk | 1091 | net/appletalk/ddp.c | sk->state=TCP_CLOSE; |
sk | 1092 | net/appletalk/ddp.c | sk->socket=sock; |
sk | 1093 | net/appletalk/ddp.c | sk->type=sock->type; |
sk | 1094 | net/appletalk/ddp.c | sk->debug=0; |
sk | 1096 | net/appletalk/ddp.c | sk->at.src_net=0; |
sk | 1097 | net/appletalk/ddp.c | sk->at.src_node=0; |
sk | 1098 | net/appletalk/ddp.c | sk->at.src_port=0; |
sk | 1100 | net/appletalk/ddp.c | sk->at.dest_net=0; |
sk | 1101 | net/appletalk/ddp.c | sk->at.dest_node=0; |
sk | 1102 | net/appletalk/ddp.c | sk->at.dest_port=0; |
sk | 1104 | net/appletalk/ddp.c | sk->mtu=DDP_MAXSZ; |
sk | 1108 | net/appletalk/ddp.c | sock->data=(void *)sk; |
sk | 1109 | net/appletalk/ddp.c | sk->sleep=sock->wait; |
sk | 1112 | net/appletalk/ddp.c | sk->state_change=def_callback1; |
sk | 1113 | net/appletalk/ddp.c | sk->data_ready=def_callback2; |
sk | 1114 | net/appletalk/ddp.c | sk->write_space=def_callback1; |
sk | 1115 | net/appletalk/ddp.c | sk->error_report=def_callback1; |
sk | 1117 | net/appletalk/ddp.c | sk->zapped=1; |
sk | 1136 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1137 | net/appletalk/ddp.c | if(sk==NULL) |
sk | 1139 | net/appletalk/ddp.c | if(!sk->dead) |
sk | 1140 | net/appletalk/ddp.c | sk->state_change(sk); |
sk | 1141 | net/appletalk/ddp.c | sk->dead=1; |
sk | 1143 | net/appletalk/ddp.c | atalk_destroy_socket(sk); |
sk | 1161 | net/appletalk/ddp.c | static int atalk_autobind(atalk_socket *sk) |
sk | 1169 | net/appletalk/ddp.c | sk->at.src_net = sat.sat_addr.s_net = ap->s_net; |
sk | 1170 | net/appletalk/ddp.c | sk->at.src_node = sat.sat_addr.s_node = ap->s_node; |
sk | 1174 | net/appletalk/ddp.c | sk->at.src_port=n; |
sk | 1175 | net/appletalk/ddp.c | atalk_insert_socket(sk); |
sk | 1176 | net/appletalk/ddp.c | sk->zapped=0; |
sk | 1186 | net/appletalk/ddp.c | atalk_socket *sk; |
sk | 1189 | net/appletalk/ddp.c | sk=(atalk_socket *)sock->data; |
sk | 1191 | net/appletalk/ddp.c | if(sk->zapped==0) |
sk | 1205 | net/appletalk/ddp.c | sk->at.src_net=addr->sat_addr.s_net=ap->s_net; |
sk | 1206 | net/appletalk/ddp.c | sk->at.src_node=addr->sat_addr.s_node=ap->s_node; |
sk | 1213 | net/appletalk/ddp.c | sk->at.src_net=addr->sat_addr.s_net; |
sk | 1214 | net/appletalk/ddp.c | sk->at.src_node=addr->sat_addr.s_node; |
sk | 1222 | net/appletalk/ddp.c | sk->at.src_port=addr->sat_port=n; |
sk | 1225 | net/appletalk/ddp.c | sk->at.src_port=addr->sat_port; |
sk | 1230 | net/appletalk/ddp.c | atalk_insert_socket(sk); |
sk | 1231 | net/appletalk/ddp.c | sk->zapped=0; |
sk | 1242 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1245 | net/appletalk/ddp.c | sk->state = TCP_CLOSE; |
sk | 1255 | net/appletalk/ddp.c | if(addr->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast) |
sk | 1258 | net/appletalk/ddp.c | if(sk->zapped) |
sk | 1260 | net/appletalk/ddp.c | if(atalk_autobind(sk)<0) |
sk | 1267 | net/appletalk/ddp.c | sk->at.dest_port=addr->sat_port; |
sk | 1268 | net/appletalk/ddp.c | sk->at.dest_net=addr->sat_addr.s_net; |
sk | 1269 | net/appletalk/ddp.c | sk->at.dest_node=addr->sat_addr.s_node; |
sk | 1271 | net/appletalk/ddp.c | sk->state=TCP_ESTABLISHED; |
sk | 1304 | net/appletalk/ddp.c | atalk_socket *sk; |
sk | 1306 | net/appletalk/ddp.c | sk=(atalk_socket *)sock->data; |
sk | 1307 | net/appletalk/ddp.c | if(sk->zapped) |
sk | 1309 | net/appletalk/ddp.c | if(atalk_autobind(sk)<0) |
sk | 1317 | net/appletalk/ddp.c | if(sk->state!=TCP_ESTABLISHED) |
sk | 1319 | net/appletalk/ddp.c | sat.sat_addr.s_net=sk->at.dest_net; |
sk | 1320 | net/appletalk/ddp.c | sat.sat_addr.s_node=sk->at.dest_node; |
sk | 1321 | net/appletalk/ddp.c | sat.sat_port=sk->at.dest_port; |
sk | 1325 | net/appletalk/ddp.c | sat.sat_addr.s_net=sk->at.src_net; |
sk | 1326 | net/appletalk/ddp.c | sat.sat_addr.s_node=sk->at.src_node; |
sk | 1327 | net/appletalk/ddp.c | sat.sat_port=sk->at.src_port; |
sk | 1461 | net/appletalk/ddp.c | skb->sk = sock; |
sk | 1465 | net/appletalk/ddp.c | skb->sk=NULL; |
sk | 1473 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1492 | net/appletalk/ddp.c | if(sk->zapped) |
sk | 1495 | net/appletalk/ddp.c | if(atalk_autobind(sk)<0) |
sk | 1504 | net/appletalk/ddp.c | if(usat->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast) |
sk | 1510 | net/appletalk/ddp.c | if(sk->state!=TCP_ESTABLISHED) |
sk | 1514 | net/appletalk/ddp.c | usat->sat_port=sk->at.dest_port; |
sk | 1515 | net/appletalk/ddp.c | usat->sat_addr.s_node=sk->at.dest_node; |
sk | 1516 | net/appletalk/ddp.c | usat->sat_addr.s_net=sk->at.dest_net; |
sk | 1521 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1522 | net/appletalk/ddp.c | printk("SK %p: Got address.\n",sk); |
sk | 1537 | net/appletalk/ddp.c | at_hint.s_net=sk->at.src_net; |
sk | 1544 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1545 | net/appletalk/ddp.c | printk("SK %p: Size needed %d, device %s\n", sk, size, dev->name); |
sk | 1549 | net/appletalk/ddp.c | skb = sock_alloc_send_skb(sk, size, 0, 0 , &err); |
sk | 1553 | net/appletalk/ddp.c | skb->sk=sk; |
sk | 1561 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1562 | net/appletalk/ddp.c | printk("SK %p: Begin build.\n", sk); |
sk | 1576 | net/appletalk/ddp.c | ddp->deh_snet=sk->at.src_net; |
sk | 1578 | net/appletalk/ddp.c | ddp->deh_snode=sk->at.src_node; |
sk | 1580 | net/appletalk/ddp.c | ddp->deh_sport=sk->at.src_port; |
sk | 1582 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1583 | net/appletalk/ddp.c | printk("SK %p: Copy user data (%d bytes).\n", sk, len); |
sk | 1587 | net/appletalk/ddp.c | if(sk->no_check==1) |
sk | 1605 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1606 | net/appletalk/ddp.c | printk("SK %p: send out(copy).\n", sk); |
sk | 1616 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1617 | net/appletalk/ddp.c | printk("SK %p: Loop back.\n", sk); |
sk | 1619 | net/appletalk/ddp.c | sk->wmem_alloc-=skb->truesize; |
sk | 1621 | net/appletalk/ddp.c | skb->sk = NULL; |
sk | 1630 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1631 | net/appletalk/ddp.c | printk("SK %p: send out.\n", sk); |
sk | 1642 | net/appletalk/ddp.c | if(sk->debug) |
sk | 1643 | net/appletalk/ddp.c | printk("SK %p: Done write (%d).\n", sk, len); |
sk | 1671 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1678 | net/appletalk/ddp.c | if(sk->err) |
sk | 1680 | net/appletalk/ddp.c | er= -sk->err; |
sk | 1681 | net/appletalk/ddp.c | sk->err=0; |
sk | 1688 | net/appletalk/ddp.c | skb=skb_recv_datagram(sk,flags,noblock,&er); |
sk | 1693 | net/appletalk/ddp.c | if(sk->type==SOCK_RAW) |
sk | 1745 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1746 | net/appletalk/ddp.c | if(sk->zapped) |
sk | 1757 | net/appletalk/ddp.c | static int atalk_shutdown(struct socket *sk,int how) |
sk | 1764 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1766 | net/appletalk/ddp.c | return datagram_select(sk,sel_type,wait); |
sk | 1777 | net/appletalk/ddp.c | atalk_socket *sk=(atalk_socket *)sock->data; |
sk | 1785 | net/appletalk/ddp.c | amount=sk->sndbuf-sk->wmem_alloc; |
sk | 1793 | net/appletalk/ddp.c | if((skb=skb_peek(&sk->receive_queue))!=NULL) |
sk | 1798 | net/appletalk/ddp.c | if (sk) |
sk | 1800 | net/appletalk/ddp.c | if(sk->stamp.tv_sec==0) |
sk | 1805 | net/appletalk/ddp.c | memcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval)); |
sk | 210 | net/ax25/af_ax25.c | if (s->sk != NULL) { |
sk | 211 | net/ax25/af_ax25.c | s->sk->state = TCP_CLOSE; |
sk | 212 | net/ax25/af_ax25.c | s->sk->err = ENETUNREACH; |
sk | 213 | net/ax25/af_ax25.c | if (!s->sk->dead) |
sk | 214 | net/ax25/af_ax25.c | s->sk->state_change(s->sk); |
sk | 215 | net/ax25/af_ax25.c | s->sk->dead = 1; |
sk | 273 | net/ax25/af_ax25.c | if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && s->sk->type == type && s->sk->state == TCP_LISTEN) { |
sk | 277 | net/ax25/af_ax25.c | return s->sk; |
sk | 298 | net/ax25/af_ax25.c | if (s->sk != NULL && ax25cmp(&s->source_addr, my_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->sk->type == type) { |
sk | 300 | net/ax25/af_ax25.c | return s->sk; |
sk | 322 | net/ax25/af_ax25.c | if (s->sk != NULL && s->sk->type != SOCK_SEQPACKET) |
sk | 347 | net/ax25/af_ax25.c | if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && s->sk->type == SOCK_RAW) { |
sk | 349 | net/ax25/af_ax25.c | return s->sk; |
sk | 358 | net/ax25/af_ax25.c | static void ax25_send_to_raw(struct sock *sk, struct sk_buff *skb, int proto) |
sk | 362 | net/ax25/af_ax25.c | while (sk != NULL) { |
sk | 363 | net/ax25/af_ax25.c | if (sk->type == SOCK_RAW && sk->protocol == proto && sk->rmem_alloc <= sk->rcvbuf) { |
sk | 367 | net/ax25/af_ax25.c | copy->sk = sk; |
sk | 368 | net/ax25/af_ax25.c | sk->rmem_alloc += copy->truesize; |
sk | 369 | net/ax25/af_ax25.c | skb_queue_tail(&sk->receive_queue, copy); |
sk | 370 | net/ax25/af_ax25.c | if (!sk->dead) |
sk | 371 | net/ax25/af_ax25.c | sk->data_ready(sk, skb->len); |
sk | 374 | net/ax25/af_ax25.c | sk = sk->next; |
sk | 410 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
sk | 411 | net/ax25/af_ax25.c | while ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) { |
sk | 412 | net/ax25/af_ax25.c | if (skb->sk != ax25->sk) { /* A pending connection */ |
sk | 413 | net/ax25/af_ax25.c | skb->sk->dead = 1; /* Queue the unaccepted socket for death */ |
sk | 414 | net/ax25/af_ax25.c | ax25_set_timer(skb->sk->ax25); |
sk | 415 | net/ax25/af_ax25.c | skb->sk->ax25->state = AX25_STATE_0; |
sk | 427 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
sk | 428 | net/ax25/af_ax25.c | if (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */ |
sk | 435 | net/ax25/af_ax25.c | kfree_s(ax25->sk, sizeof(*ax25->sk)); |
sk | 558 | net/ax25/af_ax25.c | ax25->sk = NULL; |
sk | 605 | net/ax25/af_ax25.c | if (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET) |
sk | 692 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 695 | net/ax25/af_ax25.c | sk = (struct sock *)sock->data; |
sk | 698 | net/ax25/af_ax25.c | return sock_setsockopt(sk, level, optname, optval, optlen); |
sk | 713 | net/ax25/af_ax25.c | if (sk->ax25->modulus == MODULUS) { |
sk | 720 | net/ax25/af_ax25.c | sk->ax25->window = opt; |
sk | 726 | net/ax25/af_ax25.c | sk->ax25->rtt = (opt * PR_SLOWHZ) / 2; |
sk | 732 | net/ax25/af_ax25.c | sk->ax25->t2 = opt * PR_SLOWHZ; |
sk | 738 | net/ax25/af_ax25.c | sk->ax25->n2 = opt; |
sk | 744 | net/ax25/af_ax25.c | sk->ax25->t3 = opt * PR_SLOWHZ; |
sk | 748 | net/ax25/af_ax25.c | sk->ax25->backoff = opt ? 1 : 0; |
sk | 752 | net/ax25/af_ax25.c | sk->ax25->modulus = opt ? EMODULUS : MODULUS; |
sk | 756 | net/ax25/af_ax25.c | sk->ax25->hdrincl = opt ? 1 : 0; |
sk | 767 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 771 | net/ax25/af_ax25.c | sk = (struct sock *)sock->data; |
sk | 774 | net/ax25/af_ax25.c | return sock_getsockopt(sk, level, optname, optval, optlen); |
sk | 781 | net/ax25/af_ax25.c | val = sk->ax25->window; |
sk | 785 | net/ax25/af_ax25.c | val = (sk->ax25->t1 * 2) / PR_SLOWHZ; |
sk | 789 | net/ax25/af_ax25.c | val = sk->ax25->t2 / PR_SLOWHZ; |
sk | 793 | net/ax25/af_ax25.c | val = sk->ax25->n2; |
sk | 797 | net/ax25/af_ax25.c | val = sk->ax25->t3 / PR_SLOWHZ; |
sk | 801 | net/ax25/af_ax25.c | val = sk->ax25->backoff; |
sk | 805 | net/ax25/af_ax25.c | val = (sk->ax25->modulus == EMODULUS); |
sk | 809 | net/ax25/af_ax25.c | val = sk->ax25->hdrincl; |
sk | 831 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 833 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && sk->state != TCP_LISTEN) { |
sk | 834 | net/ax25/af_ax25.c | sk->max_ack_backlog = backlog; |
sk | 835 | net/ax25/af_ax25.c | sk->state = TCP_LISTEN; |
sk | 842 | net/ax25/af_ax25.c | static void def_callback1(struct sock *sk) |
sk | 844 | net/ax25/af_ax25.c | if (!sk->dead) |
sk | 845 | net/ax25/af_ax25.c | wake_up_interruptible(sk->sleep); |
sk | 848 | net/ax25/af_ax25.c | static void def_callback2(struct sock *sk, int len) |
sk | 850 | net/ax25/af_ax25.c | if (!sk->dead) |
sk | 851 | net/ax25/af_ax25.c | wake_up_interruptible(sk->sleep); |
sk | 856 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 889 | net/ax25/af_ax25.c | if ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL) |
sk | 893 | net/ax25/af_ax25.c | kfree_s(sk, sizeof(*sk)); |
sk | 897 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->receive_queue); |
sk | 898 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->write_queue); |
sk | 899 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->back_log); |
sk | 901 | net/ax25/af_ax25.c | sk->socket = sock; |
sk | 902 | net/ax25/af_ax25.c | sk->type = sock->type; |
sk | 903 | net/ax25/af_ax25.c | sk->protocol = protocol; |
sk | 904 | net/ax25/af_ax25.c | sk->dead = 0; |
sk | 905 | net/ax25/af_ax25.c | sk->next = NULL; |
sk | 906 | net/ax25/af_ax25.c | sk->broadcast = 0; |
sk | 907 | net/ax25/af_ax25.c | sk->allocation = GFP_KERNEL; |
sk | 908 | net/ax25/af_ax25.c | sk->rcvbuf = SK_RMEM_MAX; |
sk | 909 | net/ax25/af_ax25.c | sk->sndbuf = SK_WMEM_MAX; |
sk | 910 | net/ax25/af_ax25.c | sk->wmem_alloc = 0; |
sk | 911 | net/ax25/af_ax25.c | sk->rmem_alloc = 0; |
sk | 912 | net/ax25/af_ax25.c | sk->inuse = 0; |
sk | 913 | net/ax25/af_ax25.c | sk->debug = 0; |
sk | 914 | net/ax25/af_ax25.c | sk->destroy = 0; |
sk | 915 | net/ax25/af_ax25.c | sk->prot = NULL; /* So we use default free mechanisms */ |
sk | 916 | net/ax25/af_ax25.c | sk->err = 0; |
sk | 917 | net/ax25/af_ax25.c | sk->localroute = 0; |
sk | 918 | net/ax25/af_ax25.c | sk->send_head = NULL; |
sk | 919 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 920 | net/ax25/af_ax25.c | sk->shutdown = 0; |
sk | 921 | net/ax25/af_ax25.c | sk->priority = SOPRI_NORMAL; |
sk | 922 | net/ax25/af_ax25.c | sk->ack_backlog = 0; |
sk | 923 | net/ax25/af_ax25.c | sk->mtu = AX25_MTU; /* 256 */ |
sk | 924 | net/ax25/af_ax25.c | sk->zapped = 1; |
sk | 926 | net/ax25/af_ax25.c | sk->state_change = def_callback1; |
sk | 927 | net/ax25/af_ax25.c | sk->data_ready = def_callback2; |
sk | 928 | net/ax25/af_ax25.c | sk->write_space = def_callback1; |
sk | 929 | net/ax25/af_ax25.c | sk->error_report = def_callback1; |
sk | 932 | net/ax25/af_ax25.c | sock->data = (void *)sk; |
sk | 933 | net/ax25/af_ax25.c | sk->sleep = sock->wait; |
sk | 936 | net/ax25/af_ax25.c | ax25->sk = sk; |
sk | 937 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
sk | 944 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 947 | net/ax25/af_ax25.c | if ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL) |
sk | 951 | net/ax25/af_ax25.c | kfree_s(sk, sizeof(*sk)); |
sk | 957 | net/ax25/af_ax25.c | sk->type = osk->type; |
sk | 958 | net/ax25/af_ax25.c | sk->socket = osk->socket; |
sk | 967 | net/ax25/af_ax25.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 972 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->receive_queue); |
sk | 973 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->write_queue); |
sk | 974 | net/ax25/af_ax25.c | skb_queue_head_init(&sk->back_log); |
sk | 976 | net/ax25/af_ax25.c | sk->dead = 0; |
sk | 977 | net/ax25/af_ax25.c | sk->next = NULL; |
sk | 978 | net/ax25/af_ax25.c | sk->priority = osk->priority; |
sk | 979 | net/ax25/af_ax25.c | sk->broadcast = 0; |
sk | 980 | net/ax25/af_ax25.c | sk->protocol = osk->protocol; |
sk | 981 | net/ax25/af_ax25.c | sk->rcvbuf = osk->rcvbuf; |
sk | 982 | net/ax25/af_ax25.c | sk->sndbuf = osk->sndbuf; |
sk | 983 | net/ax25/af_ax25.c | sk->wmem_alloc = 0; |
sk | 984 | net/ax25/af_ax25.c | sk->rmem_alloc = 0; |
sk | 985 | net/ax25/af_ax25.c | sk->inuse = 0; |
sk | 986 | net/ax25/af_ax25.c | sk->ack_backlog = 0; |
sk | 987 | net/ax25/af_ax25.c | sk->destroy = 0; |
sk | 988 | net/ax25/af_ax25.c | sk->prot = NULL; /* So we use default free mechanisms */ |
sk | 989 | net/ax25/af_ax25.c | sk->err = 0; |
sk | 990 | net/ax25/af_ax25.c | sk->localroute = 0; |
sk | 991 | net/ax25/af_ax25.c | sk->send_head = NULL; |
sk | 992 | net/ax25/af_ax25.c | sk->debug = osk->debug; |
sk | 993 | net/ax25/af_ax25.c | sk->state = TCP_ESTABLISHED; |
sk | 994 | net/ax25/af_ax25.c | sk->window = osk->window; |
sk | 995 | net/ax25/af_ax25.c | sk->shutdown = 0; |
sk | 996 | net/ax25/af_ax25.c | sk->mtu = osk->mtu; |
sk | 997 | net/ax25/af_ax25.c | sk->sleep = osk->sleep; |
sk | 998 | net/ax25/af_ax25.c | sk->zapped = osk->zapped; |
sk | 1000 | net/ax25/af_ax25.c | sk->state_change = def_callback1; |
sk | 1001 | net/ax25/af_ax25.c | sk->data_ready = def_callback2; |
sk | 1002 | net/ax25/af_ax25.c | sk->write_space = def_callback1; |
sk | 1003 | net/ax25/af_ax25.c | sk->error_report = def_callback1; |
sk | 1020 | net/ax25/af_ax25.c | kfree_s(sk, sizeof(*sk)); |
sk | 1026 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
sk | 1027 | net/ax25/af_ax25.c | ax25->sk = sk; |
sk | 1029 | net/ax25/af_ax25.c | return sk; |
sk | 1034 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)oldsock->data; |
sk | 1036 | net/ax25/af_ax25.c | return ax25_create(newsock, sk->protocol); |
sk | 1041 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1043 | net/ax25/af_ax25.c | if (sk == NULL) return 0; |
sk | 1045 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET) { |
sk | 1046 | net/ax25/af_ax25.c | switch (sk->ax25->state) { |
sk | 1048 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1049 | net/ax25/af_ax25.c | sk->state_change(sk); |
sk | 1050 | net/ax25/af_ax25.c | sk->dead = 1; |
sk | 1051 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
sk | 1055 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
sk | 1056 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
sk | 1057 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1058 | net/ax25/af_ax25.c | sk->state_change(sk); |
sk | 1059 | net/ax25/af_ax25.c | sk->dead = 1; |
sk | 1060 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
sk | 1064 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DM, POLLON, C_RESPONSE); |
sk | 1065 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
sk | 1066 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1067 | net/ax25/af_ax25.c | sk->state_change(sk); |
sk | 1068 | net/ax25/af_ax25.c | sk->dead = 1; |
sk | 1069 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
sk | 1074 | net/ax25/af_ax25.c | ax25_clear_queues(sk->ax25); |
sk | 1075 | net/ax25/af_ax25.c | sk->ax25->n2count = 0; |
sk | 1076 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
sk | 1077 | net/ax25/af_ax25.c | sk->ax25->t3timer = 0; |
sk | 1078 | net/ax25/af_ax25.c | sk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25); |
sk | 1079 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_2; |
sk | 1080 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1081 | net/ax25/af_ax25.c | sk->state_change(sk); |
sk | 1082 | net/ax25/af_ax25.c | sk->dead = 1; |
sk | 1083 | net/ax25/af_ax25.c | sk->destroy = 1; |
sk | 1090 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1091 | net/ax25/af_ax25.c | sk->state_change(sk); |
sk | 1092 | net/ax25/af_ax25.c | sk->dead = 1; |
sk | 1093 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
sk | 1097 | net/ax25/af_ax25.c | sk->socket = NULL; /* Not used, but we should do this. **/ |
sk | 1110 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 1115 | net/ax25/af_ax25.c | sk = (struct sock *)sock->data; |
sk | 1117 | net/ax25/af_ax25.c | if (sk->zapped == 0) |
sk | 1124 | net/ax25/af_ax25.c | if (ax25_find_socket(&addr->fsa_ax25.sax25_call, sk->type) != NULL) { |
sk | 1125 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1136 | net/ax25/af_ax25.c | memcpy(&sk->ax25->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address)); |
sk | 1138 | net/ax25/af_ax25.c | memcpy(&sk->ax25->source_addr, call, sizeof(ax25_address)); |
sk | 1149 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1154 | net/ax25/af_ax25.c | ax25_fillin_cb(sk->ax25, dev); |
sk | 1155 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); |
sk | 1157 | net/ax25/af_ax25.c | sk->zapped = 0; |
sk | 1159 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1168 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1172 | net/ax25/af_ax25.c | if (sk->state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { |
sk | 1177 | net/ax25/af_ax25.c | if (sk->state == TCP_CLOSE && sock->state == SS_CONNECTING) { |
sk | 1182 | net/ax25/af_ax25.c | if (sk->state == TCP_ESTABLISHED && sk->type == SOCK_SEQPACKET) |
sk | 1185 | net/ax25/af_ax25.c | sk->state = TCP_CLOSE; |
sk | 1198 | net/ax25/af_ax25.c | if (sk->ax25->digipeat == NULL) { |
sk | 1199 | net/ax25/af_ax25.c | if ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL) |
sk | 1203 | net/ax25/af_ax25.c | sk->ax25->digipeat->ndigi = addr->sax25_ndigis; |
sk | 1206 | net/ax25/af_ax25.c | sk->ax25->digipeat->repeated[ct] = 0; |
sk | 1207 | net/ax25/af_ax25.c | memcpy(&sk->ax25->digipeat->calls[ct], &fsa->fsa_digipeater[ct], sizeof(ax25_address)); |
sk | 1211 | net/ax25/af_ax25.c | sk->ax25->digipeat->lastrepeat = 0; |
sk | 1214 | net/ax25/af_ax25.c | if (sk->zapped) { /* Must bind first - autobinding in this may or may not work */ |
sk | 1215 | net/ax25/af_ax25.c | if ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0) |
sk | 1217 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); /* Finish the bind */ |
sk | 1220 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && ax25_find_cb(&sk->ax25->source_addr, &addr->sax25_call, sk->ax25->device) != NULL) |
sk | 1223 | net/ax25/af_ax25.c | memcpy(&sk->ax25->dest_addr, &addr->sax25_call, sizeof(ax25_address)); |
sk | 1226 | net/ax25/af_ax25.c | if (sk->type != SOCK_SEQPACKET) { |
sk | 1228 | net/ax25/af_ax25.c | sk->state = TCP_ESTABLISHED; |
sk | 1234 | net/ax25/af_ax25.c | sk->state = TCP_SYN_SENT; |
sk | 1235 | net/ax25/af_ax25.c | ax25_establish_data_link(sk->ax25); |
sk | 1236 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_1; |
sk | 1237 | net/ax25/af_ax25.c | ax25_set_timer(sk->ax25); /* Start going SABM SABM until a UA or a give up and DM */ |
sk | 1240 | net/ax25/af_ax25.c | if (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) |
sk | 1246 | net/ax25/af_ax25.c | while (sk->state == TCP_SYN_SENT) { |
sk | 1247 | net/ax25/af_ax25.c | interruptible_sleep_on(sk->sleep); |
sk | 1254 | net/ax25/af_ax25.c | if (sk->state != TCP_ESTABLISHED) { /* Not in ABM, not in WAIT_UA -> failed */ |
sk | 1257 | net/ax25/af_ax25.c | return -sk->err; /* Always set at this point */ |
sk | 1274 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 1283 | net/ax25/af_ax25.c | sk = (struct sock *)sock->data; |
sk | 1285 | net/ax25/af_ax25.c | if (sk->type != SOCK_SEQPACKET) |
sk | 1288 | net/ax25/af_ax25.c | if (sk->state != TCP_LISTEN) |
sk | 1295 | net/ax25/af_ax25.c | if ((skb = skb_dequeue(&sk->receive_queue)) == NULL) { |
sk | 1300 | net/ax25/af_ax25.c | interruptible_sleep_on(sk->sleep); |
sk | 1308 | net/ax25/af_ax25.c | newsk = skb->sk; |
sk | 1313 | net/ax25/af_ax25.c | skb->sk = NULL; |
sk | 1315 | net/ax25/af_ax25.c | sk->ack_backlog--; |
sk | 1326 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 1329 | net/ax25/af_ax25.c | sk = (struct sock *)sock->data; |
sk | 1332 | net/ax25/af_ax25.c | if (sk->state != TCP_ESTABLISHED) |
sk | 1334 | net/ax25/af_ax25.c | addr = &sk->ax25->dest_addr; |
sk | 1336 | net/ax25/af_ax25.c | addr = &sk->ax25->source_addr; |
sk | 1345 | net/ax25/af_ax25.c | if (sk->ax25->digipeat != NULL) { |
sk | 1346 | net/ax25/af_ax25.c | ndigi = sk->ax25->digipeat->ndigi; |
sk | 1350 | net/ax25/af_ax25.c | memcpy(&sax->fsa_digipeater[i], &sk->ax25->digipeat->calls[i], sizeof(ax25_address)); |
sk | 1359 | net/ax25/af_ax25.c | struct sock *sk; |
sk | 1465 | net/ax25/af_ax25.c | if ((sk = ax25_find_socket(&dest, &src, SOCK_DGRAM)) != NULL) { |
sk | 1466 | net/ax25/af_ax25.c | if (sk->rmem_alloc >= sk->rcvbuf) { |
sk | 1473 | net/ax25/af_ax25.c | skb_queue_tail(&sk->receive_queue, skb); |
sk | 1474 | net/ax25/af_ax25.c | skb->sk = sk; |
sk | 1475 | net/ax25/af_ax25.c | sk->rmem_alloc += skb->truesize; |
sk | 1476 | net/ax25/af_ax25.c | if (!sk->dead) |
sk | 1477 | net/ax25/af_ax25.c | sk->data_ready(sk, skb->len); |
sk | 1527 | net/ax25/af_ax25.c | if ((sk = ax25_find_listener(&dest, dev, SOCK_SEQPACKET)) != NULL) { |
sk | 1528 | net/ax25/af_ax25.c | if (sk->ack_backlog == sk->max_ack_backlog || (make = ax25_make_new(sk, dev)) == NULL) { |
sk | 1538 | net/ax25/af_ax25.c | skb_queue_head(&sk->receive_queue, skb); |
sk | 1540 | net/ax25/af_ax25.c | skb->sk = make; |
sk | 1542 | net/ax25/af_ax25.c | make->pair = sk; |
sk | 1544 | net/ax25/af_ax25.c | sk->ack_backlog++; |
sk | 1609 | net/ax25/af_ax25.c | if (sk != NULL) { |
sk | 1610 | net/ax25/af_ax25.c | if (!sk->dead) |
sk | 1611 | net/ax25/af_ax25.c | sk->data_ready(sk, skb->len ); |
sk | 1624 | net/ax25/af_ax25.c | skb->sk = NULL; /* Initially we don't know who its for */ |
sk | 1644 | net/ax25/af_ax25.c | skb->sk = NULL; /* Initially we don't know who its for */ |
sk | 1661 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1673 | net/ax25/af_ax25.c | if (sk->err) { |
sk | 1675 | net/ax25/af_ax25.c | err = sk->err; |
sk | 1676 | net/ax25/af_ax25.c | sk->err = 0; |
sk | 1684 | net/ax25/af_ax25.c | if (sk->zapped) |
sk | 1687 | net/ax25/af_ax25.c | if (sk->ax25->device == NULL) |
sk | 1715 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && memcmp(&sk->ax25->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0) |
sk | 1722 | net/ax25/af_ax25.c | if (sk->state != TCP_ESTABLISHED) |
sk | 1725 | net/ax25/af_ax25.c | memcpy(&sax.sax25_call, &sk->ax25->dest_addr, sizeof(ax25_address)); |
sk | 1726 | net/ax25/af_ax25.c | dp = sk->ax25->digipeat; |
sk | 1729 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1733 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1739 | net/ax25/af_ax25.c | if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL) |
sk | 1742 | net/ax25/af_ax25.c | skb->sk = sk; |
sk | 1748 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1756 | net/ax25/af_ax25.c | *asmptr = sk->protocol; |
sk | 1758 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1761 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET) { |
sk | 1763 | net/ax25/af_ax25.c | if (sk->state != TCP_ESTABLISHED) { |
sk | 1768 | net/ax25/af_ax25.c | ax25_output(sk->ax25, skb); /* Shove it onto the queue and kick */ |
sk | 1774 | net/ax25/af_ax25.c | if (sk->debug) { |
sk | 1781 | net/ax25/af_ax25.c | asmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND, MODULUS)); |
sk | 1783 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1788 | net/ax25/af_ax25.c | if (sk->debug) |
sk | 1794 | net/ax25/af_ax25.c | ax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL); |
sk | 1831 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1837 | net/ax25/af_ax25.c | if (sk->err) { |
sk | 1839 | net/ax25/af_ax25.c | er = -sk->err; |
sk | 1840 | net/ax25/af_ax25.c | sk->err = 0; |
sk | 1852 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && sk->state != TCP_ESTABLISHED) |
sk | 1856 | net/ax25/af_ax25.c | if ((skb = skb_recv_datagram(sk, flags, noblock, &er)) == NULL) |
sk | 1859 | net/ax25/af_ax25.c | if (sk->ax25->hdrincl) { |
sk | 1862 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET) |
sk | 1932 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1934 | net/ax25/af_ax25.c | if (sk->zapped) |
sk | 1945 | net/ax25/af_ax25.c | static int ax25_shutdown(struct socket *sk, int how) |
sk | 1953 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1955 | net/ax25/af_ax25.c | return datagram_select(sk, sel_type, wait); |
sk | 1960 | net/ax25/af_ax25.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1968 | net/ax25/af_ax25.c | amount = sk->sndbuf - sk->wmem_alloc; |
sk | 1978 | net/ax25/af_ax25.c | if ((skb = skb_peek(&sk->receive_queue)) != NULL) |
sk | 1987 | net/ax25/af_ax25.c | if (sk != NULL) { |
sk | 1988 | net/ax25/af_ax25.c | if (sk->stamp.tv_sec==0) |
sk | 1992 | net/ax25/af_ax25.c | memcpy_tofs((void *)arg, &sk->stamp, sizeof(struct timeval)); |
sk | 2084 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
sk | 2086 | net/ax25/af_ax25.c | ax25->sk->wmem_alloc, |
sk | 2087 | net/ax25/af_ax25.c | ax25->sk->rmem_alloc); |
sk | 84 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 85 | net/ax25/ax25_in.c | skbn->sk = ax25->sk; |
sk | 86 | net/ax25/ax25_in.c | ax25->sk->rmem_alloc += skbn->truesize; |
sk | 159 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25_dev_get_value(ax25->device, AX25_VALUES_TEXT) && ax25->sk->protocol == pid) { |
sk | 160 | net/ax25/ax25_in.c | if (sock_queue_rcv_skb(ax25->sk, skb) == 0) { |
sk | 206 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 207 | net/ax25/ax25_in.c | ax25->sk->state = TCP_ESTABLISHED; |
sk | 209 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 210 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 220 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 221 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 222 | net/ax25/ax25_in.c | ax25->sk->err = ECONNREFUSED; |
sk | 223 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 224 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 225 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 261 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 262 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 263 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
sk | 264 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 265 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 266 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 274 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 275 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 276 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
sk | 277 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 278 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 279 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 338 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 339 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 340 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
sk | 341 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 342 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 343 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 351 | net/ax25/ax25_in.c | if (ax25->sk) { |
sk | 352 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 353 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
sk | 354 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 355 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 356 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 499 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 500 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 501 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
sk | 502 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 503 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 504 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 512 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
sk | 513 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
sk | 514 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
sk | 515 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
sk | 516 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
sk | 517 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
sk | 671 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25->state == AX25_STATE_0 && ax25->sk->dead) |
sk | 73 | net/ax25/ax25_out.c | if (skb->sk != NULL) { |
sk | 74 | net/ax25/ax25_out.c | if ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, 0, &err)) == NULL) |
sk | 81 | net/ax25/ax25_out.c | skbn->sk = skb->sk; |
sk | 217 | net/ax25/ax25_out.c | if (ax25->sk != NULL) { |
sk | 218 | net/ax25/ax25_out.c | ax25->sk->state = TCP_CLOSE; |
sk | 219 | net/ax25/ax25_out.c | ax25->sk->err = ENETUNREACH; |
sk | 220 | net/ax25/ax25_out.c | if (!ax25->sk->dead) |
sk | 221 | net/ax25/ax25_out.c | ax25->sk->state_change(ax25->sk); |
sk | 222 | net/ax25/ax25_out.c | ax25->sk->dead = 1; |
sk | 387 | net/ax25/ax25_route.c | if (ax25->sk != NULL) |
sk | 388 | net/ax25/ax25_route.c | ax25->sk->zapped = 0; |
sk | 209 | net/ax25/ax25_subr.c | if (ax25->sk != NULL) { |
sk | 210 | net/ax25/ax25_subr.c | skb->sk = ax25->sk; |
sk | 211 | net/ax25/ax25_subr.c | ax25->sk->wmem_alloc += skb->truesize; |
sk | 261 | net/ax25/ax25_subr.c | skb->sk = NULL; |
sk | 99 | net/ax25/ax25_timer.c | if (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) { |
sk | 111 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
sk | 112 | net/ax25/ax25_timer.c | if (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & OWN_RX_BUSY_CONDITION)) { |
sk | 161 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
sk | 162 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
sk | 163 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
sk | 164 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
sk | 165 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
sk | 166 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
sk | 191 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
sk | 192 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
sk | 193 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
sk | 194 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
sk | 195 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
sk | 196 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
sk | 218 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
sk | 219 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
sk | 220 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
sk | 221 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
sk | 222 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
sk | 223 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
sk | 55 | net/core/datagram.c | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err) |
sk | 63 | net/core/datagram.c | sk->inuse = 1; |
sk | 64 | net/core/datagram.c | while(skb_peek(&sk->receive_queue) == NULL) /* No data */ |
sk | 67 | net/core/datagram.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 69 | net/core/datagram.c | release_sock(sk); |
sk | 74 | net/core/datagram.c | if(sk->err) |
sk | 76 | net/core/datagram.c | release_sock(sk); |
sk | 78 | net/core/datagram.c | *err=-sk->err; |
sk | 79 | net/core/datagram.c | sk->err=0; |
sk | 85 | net/core/datagram.c | if(sk->type==SOCK_SEQPACKET && sk->state!=TCP_ESTABLISHED) |
sk | 87 | net/core/datagram.c | release_sock(sk); |
sk | 95 | net/core/datagram.c | release_sock(sk); |
sk | 99 | net/core/datagram.c | release_sock(sk); |
sk | 104 | net/core/datagram.c | if (skb_peek(&sk->receive_queue) == NULL) |
sk | 106 | net/core/datagram.c | interruptible_sleep_on(sk->sleep); |
sk | 114 | net/core/datagram.c | if(sk->err != 0) /* Error while waiting for packet |
sk | 118 | net/core/datagram.c | *err = -sk->err; |
sk | 119 | net/core/datagram.c | sk->err=0; |
sk | 124 | net/core/datagram.c | sk->inuse = 1; |
sk | 131 | net/core/datagram.c | skb=skb_dequeue(&sk->receive_queue); |
sk | 140 | net/core/datagram.c | skb=skb_peek(&sk->receive_queue); |
sk | 192 | net/core/datagram.c | int datagram_select(struct sock *sk, int sel_type, select_table *wait) |
sk | 194 | net/core/datagram.c | select_wait(sk->sleep, wait); |
sk | 198 | net/core/datagram.c | if (sk->err) |
sk | 200 | net/core/datagram.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 202 | net/core/datagram.c | if (sk->type==SOCK_SEQPACKET && sk->state==TCP_CLOSE) |
sk | 207 | net/core/datagram.c | if (skb_peek(&sk->receive_queue) != NULL) |
sk | 215 | net/core/datagram.c | if (sk->err) |
sk | 217 | net/core/datagram.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 219 | net/core/datagram.c | if (sk->type==SOCK_SEQPACKET && sk->state==TCP_SYN_SENT) |
sk | 224 | net/core/datagram.c | if (sk->prot && sk->prot->wspace(sk) >= MIN_WRITE_SPACE) |
sk | 228 | net/core/datagram.c | if (sk->prot==NULL && sk->sndbuf-sk->wmem_alloc >= MIN_WRITE_SPACE) |
sk | 235 | net/core/datagram.c | if (sk->err) |
sk | 384 | net/core/dev.c | ((struct sock *)ptype->data != skb->sk)) |
sk | 430 | net/core/dev.c | skb->sk = NULL; |
sk | 458 | net/core/skbuff.c | if (skb->sk) |
sk | 460 | net/core/skbuff.c | if(skb->sk->prot!=NULL) |
sk | 463 | net/core/skbuff.c | skb->sk->prot->rfree(skb->sk, skb); |
sk | 465 | net/core/skbuff.c | skb->sk->prot->wfree(skb->sk, skb); |
sk | 475 | net/core/skbuff.c | skb->sk->rmem_alloc-=skb->truesize; |
sk | 477 | net/core/skbuff.c | skb->sk->wmem_alloc-=skb->truesize; |
sk | 479 | net/core/skbuff.c | if(!skb->sk->dead) |
sk | 480 | net/core/skbuff.c | skb->sk->write_space(skb->sk); |
sk | 542 | net/core/skbuff.c | skb->sk = NULL; |
sk | 613 | net/core/skbuff.c | n->sk=NULL; |
sk | 119 | net/core/sock.c | int sock_setsockopt(struct sock *sk, int level, int optname, |
sk | 142 | net/core/sock.c | sk->debug=valbool; |
sk | 145 | net/core/sock.c | sk->reuse = valbool; |
sk | 151 | net/core/sock.c | sk->localroute=valbool; |
sk | 154 | net/core/sock.c | sk->broadcast=valbool; |
sk | 161 | net/core/sock.c | sk->sndbuf=val; |
sk | 169 | net/core/sock.c | sk->rcvbuf=val; |
sk | 173 | net/core/sock.c | sk->keepopen = valbool; |
sk | 177 | net/core/sock.c | sk->urginline = valbool; |
sk | 181 | net/core/sock.c | sk->no_check = valbool; |
sk | 187 | net/core/sock.c | sk->priority = val; |
sk | 202 | net/core/sock.c | sk->linger=0; |
sk | 205 | net/core/sock.c | sk->lingertime=ling.l_linger; |
sk | 206 | net/core/sock.c | sk->linger=1; |
sk | 217 | net/core/sock.c | int sock_getsockopt(struct sock *sk, int level, int optname, |
sk | 227 | net/core/sock.c | val = sk->debug; |
sk | 231 | net/core/sock.c | val = sk->localroute; |
sk | 235 | net/core/sock.c | val= sk->broadcast; |
sk | 239 | net/core/sock.c | val=sk->sndbuf; |
sk | 243 | net/core/sock.c | val =sk->rcvbuf; |
sk | 247 | net/core/sock.c | val = sk->reuse; |
sk | 251 | net/core/sock.c | val = sk->keepopen; |
sk | 255 | net/core/sock.c | val = sk->type; |
sk | 259 | net/core/sock.c | val = sk->err; |
sk | 260 | net/core/sock.c | sk->err = 0; |
sk | 264 | net/core/sock.c | val = sk->urginline; |
sk | 268 | net/core/sock.c | val = sk->no_check; |
sk | 272 | net/core/sock.c | val = sk->priority; |
sk | 283 | net/core/sock.c | ling.l_onoff=sk->linger; |
sk | 284 | net/core/sock.c | ling.l_linger=sk->lingertime; |
sk | 307 | net/core/sock.c | struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, int priority) |
sk | 309 | net/core/sock.c | if (sk) |
sk | 311 | net/core/sock.c | if (sk->wmem_alloc + size < sk->sndbuf || force) |
sk | 319 | net/core/sock.c | sk->wmem_alloc+= c->truesize; |
sk | 330 | net/core/sock.c | struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, int priority) |
sk | 332 | net/core/sock.c | if (sk) |
sk | 334 | net/core/sock.c | if (sk->rmem_alloc + size < sk->rcvbuf || force) |
sk | 342 | net/core/sock.c | sk->rmem_alloc += c->truesize; |
sk | 353 | net/core/sock.c | unsigned long sock_rspace(struct sock *sk) |
sk | 357 | net/core/sock.c | if (sk != NULL) |
sk | 359 | net/core/sock.c | if (sk->rmem_alloc >= sk->rcvbuf-2*MIN_WINDOW) |
sk | 361 | net/core/sock.c | amt = min((sk->rcvbuf-sk->rmem_alloc)/2-MIN_WINDOW, MAX_WINDOW); |
sk | 370 | net/core/sock.c | unsigned long sock_wspace(struct sock *sk) |
sk | 372 | net/core/sock.c | if (sk != NULL) |
sk | 374 | net/core/sock.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 376 | net/core/sock.c | if (sk->wmem_alloc >= sk->sndbuf) |
sk | 378 | net/core/sock.c | return(sk->sndbuf-sk->wmem_alloc ); |
sk | 384 | net/core/sock.c | void sock_wfree(struct sock *sk, struct sk_buff *skb) |
sk | 391 | net/core/sock.c | if (sk) |
sk | 396 | net/core/sock.c | sk->wmem_alloc -= s; |
sk | 399 | net/core/sock.c | sk->write_space(sk); |
sk | 405 | net/core/sock.c | void sock_rfree(struct sock *sk, struct sk_buff *skb) |
sk | 412 | net/core/sock.c | if (sk) |
sk | 417 | net/core/sock.c | sk->rmem_alloc -= s; |
sk | 426 | net/core/sock.c | struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigned long fallback, int noblock, int *errcode) |
sk | 431 | net/core/sock.c | sk->inuse=1; |
sk | 435 | net/core/sock.c | if(sk->err!=0) |
sk | 438 | net/core/sock.c | err= -sk->err; |
sk | 439 | net/core/sock.c | sk->err=0; |
sk | 445 | net/core/sock.c | if(sk->shutdown&SEND_SHUTDOWN) |
sk | 452 | net/core/sock.c | skb = sock_wmalloc(sk, size, 0, sk->allocation); |
sk | 457 | net/core/sock.c | skb = sock_wmalloc(sk, size, 0 , GFP_BUFFER); |
sk | 459 | net/core/sock.c | skb=sock_wmalloc(sk, fallback, 0, GFP_KERNEL); |
sk | 470 | net/core/sock.c | sk->socket->flags |= SO_NOSPACE; |
sk | 476 | net/core/sock.c | if(sk->shutdown&SEND_SHUTDOWN) |
sk | 481 | net/core/sock.c | tmp = sk->wmem_alloc; |
sk | 483 | net/core/sock.c | if(sk->shutdown&SEND_SHUTDOWN) |
sk | 491 | net/core/sock.c | if( tmp <= sk->wmem_alloc) |
sk | 501 | net/core/sock.c | if (sk->wmem_alloc + size >= sk->sndbuf) |
sk | 504 | net/core/sock.c | if (sk->wmem_alloc <= 0) |
sk | 505 | net/core/sock.c | printk("sock.c: Look where I am %ld<%ld\n", tmp, sk->wmem_alloc); |
sk | 506 | net/core/sock.c | sk->socket->flags &= ~SO_NOSPACE; |
sk | 507 | net/core/sock.c | interruptible_sleep_on(sk->sleep); |
sk | 524 | net/core/sock.c | void release_sock(struct sock *sk) |
sk | 531 | net/core/sock.c | if (!sk->prot) |
sk | 542 | net/core/sock.c | if (sk->blog) |
sk | 547 | net/core/sock.c | sk->blog=1; |
sk | 548 | net/core/sock.c | sk->inuse = 1; |
sk | 552 | net/core/sock.c | while((skb = skb_dequeue(&sk->back_log)) != NULL) |
sk | 554 | net/core/sock.c | sk->blog = 1; |
sk | 555 | net/core/sock.c | if (sk->prot->rcv) |
sk | 556 | net/core/sock.c | sk->prot->rcv(skb, skb->dev, (struct options*)skb->proto_priv, |
sk | 559 | net/core/sock.c | (struct inet_protocol *)sk->pair); |
sk | 562 | net/core/sock.c | sk->blog = 0; |
sk | 563 | net/core/sock.c | sk->inuse = 0; |
sk | 565 | net/core/sock.c | if (sk->dead && sk->state == TCP_CLOSE) |
sk | 568 | net/core/sock.c | reset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME)); |
sk | 224 | net/ethernet/eth.c | void eth_header_cache(struct device *dev, struct sock *sk, unsigned long saddr, unsigned long daddr) |
sk | 226 | net/ethernet/eth.c | int v=arp_find_cache(sk->ip_hcache_data, daddr, dev); |
sk | 228 | net/ethernet/eth.c | sk->ip_hcache_state=0; /* Try when arp resolves */ |
sk | 231 | net/ethernet/eth.c | memcpy(sk->ip_hcache_data+6, dev->dev_addr, ETH_ALEN); |
sk | 232 | net/ethernet/eth.c | sk->ip_hcache_data[12]=ETH_P_IP>>8; |
sk | 233 | net/ethernet/eth.c | sk->ip_hcache_data[13]=ETH_P_IP&0xFF; |
sk | 234 | net/ethernet/eth.c | sk->ip_hcache_state=1; |
sk | 235 | net/ethernet/eth.c | sk->ip_hcache_stamp=arp_cache_stamp; |
sk | 236 | net/ethernet/eth.c | sk->ip_hcache_ver=&arp_cache_stamp; |
sk | 107 | net/ipv4/af_inet.c | struct sock *sk; |
sk | 109 | net/ipv4/af_inet.c | for(sk = prot->sock_array[num & (SOCK_ARRAY_SIZE -1 )]; |
sk | 110 | net/ipv4/af_inet.c | sk != NULL; sk=sk->next) |
sk | 112 | net/ipv4/af_inet.c | if (sk->num == num) |
sk | 135 | net/ipv4/af_inet.c | struct sock *sk; |
sk | 148 | net/ipv4/af_inet.c | sk = prot->sock_array[(i+base+1) &(SOCK_ARRAY_SIZE -1)]; |
sk | 149 | net/ipv4/af_inet.c | while(sk != NULL) |
sk | 151 | net/ipv4/af_inet.c | sk = sk->next; |
sk | 179 | net/ipv4/af_inet.c | void put_sock(unsigned short num, struct sock *sk) |
sk | 186 | net/ipv4/af_inet.c | if(sk->type==SOCK_PACKET) |
sk | 189 | net/ipv4/af_inet.c | sk->num = num; |
sk | 190 | net/ipv4/af_inet.c | sk->next = NULL; |
sk | 197 | net/ipv4/af_inet.c | sk->prot->inuse += 1; |
sk | 198 | net/ipv4/af_inet.c | if (sk->prot->highestinuse < sk->prot->inuse) |
sk | 199 | net/ipv4/af_inet.c | sk->prot->highestinuse = sk->prot->inuse; |
sk | 201 | net/ipv4/af_inet.c | if (sk->prot->sock_array[num] == NULL) |
sk | 203 | net/ipv4/af_inet.c | sk->prot->sock_array[num] = sk; |
sk | 210 | net/ipv4/af_inet.c | if ((mask & sk->saddr) && |
sk | 211 | net/ipv4/af_inet.c | (mask & sk->saddr) != (mask & 0xffffffff)) |
sk | 218 | net/ipv4/af_inet.c | sk1 = sk->prot->sock_array[num]; |
sk | 225 | net/ipv4/af_inet.c | sk->next = sk->prot->sock_array[num]; |
sk | 226 | net/ipv4/af_inet.c | sk->prot->sock_array[num] = sk; |
sk | 230 | net/ipv4/af_inet.c | sk->next = sk2; |
sk | 231 | net/ipv4/af_inet.c | sk1->next= sk; |
sk | 239 | net/ipv4/af_inet.c | sk->next = NULL; |
sk | 240 | net/ipv4/af_inet.c | sk1->next = sk; |
sk | 285 | net/ipv4/af_inet.c | void destroy_sock(struct sock *sk) |
sk | 289 | net/ipv4/af_inet.c | sk->inuse = 1; /* just to be safe. */ |
sk | 292 | net/ipv4/af_inet.c | if (!sk->dead) |
sk | 293 | net/ipv4/af_inet.c | sk->write_space(sk); |
sk | 295 | net/ipv4/af_inet.c | remove_sock(sk); |
sk | 298 | net/ipv4/af_inet.c | delete_timer(sk); |
sk | 300 | net/ipv4/af_inet.c | del_timer(&sk->retransmit_timer); |
sk | 302 | net/ipv4/af_inet.c | while ((skb = tcp_dequeue_partial(sk)) != NULL) { |
sk | 308 | net/ipv4/af_inet.c | while((skb = skb_dequeue(&sk->write_queue)) != NULL) { |
sk | 318 | net/ipv4/af_inet.c | if (sk->dead) |
sk | 320 | net/ipv4/af_inet.c | while((skb=skb_dequeue(&sk->receive_queue))!=NULL) |
sk | 326 | net/ipv4/af_inet.c | if (skb->sk != NULL && skb->sk != sk) |
sk | 329 | net/ipv4/af_inet.c | skb->sk->dead = 1; |
sk | 330 | net/ipv4/af_inet.c | skb->sk->prot->close(skb->sk, 0); |
sk | 339 | net/ipv4/af_inet.c | for(skb = sk->send_head; skb != NULL; ) |
sk | 357 | net/ipv4/af_inet.c | sk->send_head = NULL; |
sk | 361 | net/ipv4/af_inet.c | while((skb=skb_dequeue(&sk->back_log))!=NULL) |
sk | 369 | net/ipv4/af_inet.c | if (sk->pair) |
sk | 371 | net/ipv4/af_inet.c | sk->pair->dead = 1; |
sk | 372 | net/ipv4/af_inet.c | sk->pair->prot->close(sk->pair, 0); |
sk | 373 | net/ipv4/af_inet.c | sk->pair = NULL; |
sk | 382 | net/ipv4/af_inet.c | if (sk->dead && sk->rmem_alloc == 0 && sk->wmem_alloc == 0) |
sk | 384 | net/ipv4/af_inet.c | if(sk->opt) |
sk | 385 | net/ipv4/af_inet.c | kfree(sk->opt); |
sk | 391 | net/ipv4/af_inet.c | kfree_s((void *)sk,sizeof(*sk)); |
sk | 397 | net/ipv4/af_inet.c | sk->destroy = 1; |
sk | 398 | net/ipv4/af_inet.c | sk->ack_backlog = 0; |
sk | 399 | net/ipv4/af_inet.c | sk->inuse = 0; |
sk | 400 | net/ipv4/af_inet.c | reset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME); |
sk | 412 | net/ipv4/af_inet.c | struct sock *sk; |
sk | 414 | net/ipv4/af_inet.c | sk = (struct sock *) sock->data; |
sk | 426 | net/ipv4/af_inet.c | sk->proc = arg; |
sk | 429 | net/ipv4/af_inet.c | return(sk->proc); |
sk | 442 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 444 | net/ipv4/af_inet.c | return sock_setsockopt(sk,level,optname,optval,optlen); |
sk | 445 | net/ipv4/af_inet.c | if (sk->prot->setsockopt==NULL) |
sk | 448 | net/ipv4/af_inet.c | return sk->prot->setsockopt(sk,level,optname,optval,optlen); |
sk | 458 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 460 | net/ipv4/af_inet.c | return sock_getsockopt(sk,level,optname,optval,optlen); |
sk | 461 | net/ipv4/af_inet.c | if(sk->prot->getsockopt==NULL) |
sk | 464 | net/ipv4/af_inet.c | return sk->prot->getsockopt(sk,level,optname,optval,optlen); |
sk | 471 | net/ipv4/af_inet.c | static int inet_autobind(struct sock *sk) |
sk | 474 | net/ipv4/af_inet.c | if (sk->num == 0) |
sk | 476 | net/ipv4/af_inet.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 477 | net/ipv4/af_inet.c | if (sk->num == 0) |
sk | 481 | net/ipv4/af_inet.c | put_sock(sk->num, sk); |
sk | 482 | net/ipv4/af_inet.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 493 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 495 | net/ipv4/af_inet.c | if(inet_autobind(sk)!=0) |
sk | 509 | net/ipv4/af_inet.c | sk->max_ack_backlog = backlog; |
sk | 510 | net/ipv4/af_inet.c | if (sk->state != TCP_LISTEN) |
sk | 512 | net/ipv4/af_inet.c | sk->ack_backlog = 0; |
sk | 513 | net/ipv4/af_inet.c | sk->state = TCP_LISTEN; |
sk | 523 | net/ipv4/af_inet.c | static void def_callback1(struct sock *sk) |
sk | 525 | net/ipv4/af_inet.c | if(!sk->dead) |
sk | 526 | net/ipv4/af_inet.c | wake_up_interruptible(sk->sleep); |
sk | 529 | net/ipv4/af_inet.c | static void def_callback2(struct sock *sk,int len) |
sk | 531 | net/ipv4/af_inet.c | if(!sk->dead) |
sk | 533 | net/ipv4/af_inet.c | wake_up_interruptible(sk->sleep); |
sk | 534 | net/ipv4/af_inet.c | sock_wake_async(sk->socket, 1); |
sk | 538 | net/ipv4/af_inet.c | static void def_callback3(struct sock *sk) |
sk | 540 | net/ipv4/af_inet.c | if(!sk->dead) |
sk | 542 | net/ipv4/af_inet.c | wake_up_interruptible(sk->sleep); |
sk | 543 | net/ipv4/af_inet.c | sock_wake_async(sk->socket, 2); |
sk | 556 | net/ipv4/af_inet.c | struct sock *sk; |
sk | 560 | net/ipv4/af_inet.c | sk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL); |
sk | 561 | net/ipv4/af_inet.c | if (sk == NULL) |
sk | 563 | net/ipv4/af_inet.c | memset(sk,0,sizeof(*sk)); /* Efficient way to set most fields to zero */ |
sk | 572 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 576 | net/ipv4/af_inet.c | sk->no_check = TCP_NO_CHECK; |
sk | 583 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 587 | net/ipv4/af_inet.c | sk->no_check = UDP_NO_CHECK; |
sk | 594 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 599 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 603 | net/ipv4/af_inet.c | sk->reuse = 1; |
sk | 604 | net/ipv4/af_inet.c | sk->num = protocol; |
sk | 610 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 615 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 619 | net/ipv4/af_inet.c | sk->reuse = 1; |
sk | 620 | net/ipv4/af_inet.c | sk->num = protocol; |
sk | 624 | net/ipv4/af_inet.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 627 | net/ipv4/af_inet.c | sk->socket = sock; |
sk | 629 | net/ipv4/af_inet.c | sk->nonagle = 1; |
sk | 633 | net/ipv4/af_inet.c | sk->type = sock->type; |
sk | 634 | net/ipv4/af_inet.c | sk->protocol = protocol; |
sk | 635 | net/ipv4/af_inet.c | sk->allocation = GFP_KERNEL; |
sk | 636 | net/ipv4/af_inet.c | sk->sndbuf = SK_WMEM_MAX; |
sk | 637 | net/ipv4/af_inet.c | sk->rcvbuf = SK_RMEM_MAX; |
sk | 638 | net/ipv4/af_inet.c | sk->rto = TCP_TIMEOUT_INIT; /*TCP_WRITE_TIME*/ |
sk | 639 | net/ipv4/af_inet.c | sk->cong_window = 1; /* start with only sending one packet at a time. */ |
sk | 640 | net/ipv4/af_inet.c | sk->priority = 1; |
sk | 641 | net/ipv4/af_inet.c | sk->state = TCP_CLOSE; |
sk | 643 | net/ipv4/af_inet.c | sk->stamp.tv_sec=0; |
sk | 644 | net/ipv4/af_inet.c | sk->wmem_alloc = 0; |
sk | 645 | net/ipv4/af_inet.c | sk->rmem_alloc = 0; |
sk | 646 | net/ipv4/af_inet.c | sk->pair = NULL; |
sk | 647 | net/ipv4/af_inet.c | sk->opt = NULL; |
sk | 648 | net/ipv4/af_inet.c | sk->write_seq = 0; |
sk | 649 | net/ipv4/af_inet.c | sk->acked_seq = 0; |
sk | 650 | net/ipv4/af_inet.c | sk->copied_seq = 0; |
sk | 651 | net/ipv4/af_inet.c | sk->fin_seq = 0; |
sk | 652 | net/ipv4/af_inet.c | sk->urg_seq = 0; |
sk | 653 | net/ipv4/af_inet.c | sk->urg_data = 0; |
sk | 654 | net/ipv4/af_inet.c | sk->proc = 0; |
sk | 655 | net/ipv4/af_inet.c | sk->rtt = 0; /*TCP_WRITE_TIME << 3;*/ |
sk | 656 | net/ipv4/af_inet.c | sk->mdev = 0; |
sk | 657 | net/ipv4/af_inet.c | sk->backoff = 0; |
sk | 658 | net/ipv4/af_inet.c | sk->packets_out = 0; |
sk | 659 | net/ipv4/af_inet.c | sk->cong_count = 0; |
sk | 660 | net/ipv4/af_inet.c | sk->ssthresh = 0; |
sk | 661 | net/ipv4/af_inet.c | sk->max_window = 0; |
sk | 662 | net/ipv4/af_inet.c | sk->urginline = 0; |
sk | 663 | net/ipv4/af_inet.c | sk->intr = 0; |
sk | 664 | net/ipv4/af_inet.c | sk->linger = 0; |
sk | 665 | net/ipv4/af_inet.c | sk->destroy = 0; |
sk | 666 | net/ipv4/af_inet.c | sk->shutdown = 0; |
sk | 667 | net/ipv4/af_inet.c | sk->keepopen = 0; |
sk | 668 | net/ipv4/af_inet.c | sk->zapped = 0; |
sk | 669 | net/ipv4/af_inet.c | sk->done = 0; |
sk | 670 | net/ipv4/af_inet.c | sk->ack_backlog = 0; |
sk | 671 | net/ipv4/af_inet.c | sk->window = 0; |
sk | 672 | net/ipv4/af_inet.c | sk->bytes_rcv = 0; |
sk | 673 | net/ipv4/af_inet.c | sk->dead = 0; |
sk | 674 | net/ipv4/af_inet.c | sk->ack_timed = 0; |
sk | 675 | net/ipv4/af_inet.c | sk->partial = NULL; |
sk | 676 | net/ipv4/af_inet.c | sk->user_mss = 0; |
sk | 677 | net/ipv4/af_inet.c | sk->debug = 0; |
sk | 680 | net/ipv4/af_inet.c | sk->max_ack_backlog = 0; |
sk | 681 | net/ipv4/af_inet.c | sk->inuse = 0; |
sk | 682 | net/ipv4/af_inet.c | sk->delay_acks = 0; |
sk | 683 | net/ipv4/af_inet.c | sk->daddr = 0; |
sk | 684 | net/ipv4/af_inet.c | sk->saddr = 0 /* ip_my_addr() */; |
sk | 685 | net/ipv4/af_inet.c | sk->err = 0; |
sk | 686 | net/ipv4/af_inet.c | sk->next = NULL; |
sk | 687 | net/ipv4/af_inet.c | sk->pair = NULL; |
sk | 688 | net/ipv4/af_inet.c | sk->send_tail = NULL; |
sk | 689 | net/ipv4/af_inet.c | sk->send_head = NULL; |
sk | 690 | net/ipv4/af_inet.c | sk->timeout = 0; |
sk | 691 | net/ipv4/af_inet.c | sk->broadcast = 0; |
sk | 692 | net/ipv4/af_inet.c | sk->localroute = 0; |
sk | 693 | net/ipv4/af_inet.c | sk->blog = 0; |
sk | 694 | net/ipv4/af_inet.c | sk->dummy_th.res1=0; |
sk | 695 | net/ipv4/af_inet.c | sk->dummy_th.res2=0; |
sk | 696 | net/ipv4/af_inet.c | sk->dummy_th.urg_ptr = 0; |
sk | 697 | net/ipv4/af_inet.c | sk->dummy_th.fin = 0; |
sk | 698 | net/ipv4/af_inet.c | sk->dummy_th.syn = 0; |
sk | 699 | net/ipv4/af_inet.c | sk->dummy_th.rst = 0; |
sk | 700 | net/ipv4/af_inet.c | sk->dummy_th.psh = 0; |
sk | 701 | net/ipv4/af_inet.c | sk->dummy_th.ack = 0; |
sk | 702 | net/ipv4/af_inet.c | sk->dummy_th.urg = 0; |
sk | 703 | net/ipv4/af_inet.c | sk->dummy_th.dest = 0; |
sk | 704 | net/ipv4/af_inet.c | sk->ip_tos=0; |
sk | 705 | net/ipv4/af_inet.c | sk->ip_route_cache=NULL; |
sk | 706 | net/ipv4/af_inet.c | sk->ip_hcache_ver= 0; |
sk | 707 | net/ipv4/af_inet.c | sk->ip_option_len=0; |
sk | 708 | net/ipv4/af_inet.c | sk->ip_option_flen=0; |
sk | 709 | net/ipv4/af_inet.c | sk->ip_opt_next_hop=0; |
sk | 710 | net/ipv4/af_inet.c | sk->ip_opt_ptr[0]=NULL; |
sk | 711 | net/ipv4/af_inet.c | sk->ip_opt_ptr[1]=NULL; |
sk | 715 | net/ipv4/af_inet.c | sk->max_unacked = 2048; /* needs to be at most 2 full packets. */ |
sk | 717 | net/ipv4/af_inet.c | skb_queue_head_init(&sk->write_queue); |
sk | 718 | net/ipv4/af_inet.c | skb_queue_head_init(&sk->receive_queue); |
sk | 719 | net/ipv4/af_inet.c | sk->mtu = 576; |
sk | 720 | net/ipv4/af_inet.c | sk->prot = prot; |
sk | 721 | net/ipv4/af_inet.c | sk->sleep = sock->wait; |
sk | 722 | net/ipv4/af_inet.c | init_timer(&sk->timer); |
sk | 723 | net/ipv4/af_inet.c | init_timer(&sk->retransmit_timer); |
sk | 724 | net/ipv4/af_inet.c | sk->timer.data = (unsigned long)sk; |
sk | 725 | net/ipv4/af_inet.c | sk->timer.function = &net_timer; |
sk | 726 | net/ipv4/af_inet.c | skb_queue_head_init(&sk->back_log); |
sk | 727 | net/ipv4/af_inet.c | sock->data =(void *) sk; |
sk | 728 | net/ipv4/af_inet.c | sk->dummy_th.doff = sizeof(sk->dummy_th)/4; |
sk | 729 | net/ipv4/af_inet.c | sk->ip_ttl=64; |
sk | 730 | net/ipv4/af_inet.c | if(sk->type==SOCK_RAW && protocol==IPPROTO_RAW) |
sk | 731 | net/ipv4/af_inet.c | sk->ip_hdrincl=1; |
sk | 733 | net/ipv4/af_inet.c | sk->ip_hdrincl=0; |
sk | 735 | net/ipv4/af_inet.c | sk->ip_mc_loop=1; |
sk | 736 | net/ipv4/af_inet.c | sk->ip_mc_ttl=1; |
sk | 737 | net/ipv4/af_inet.c | *sk->ip_mc_name=0; |
sk | 738 | net/ipv4/af_inet.c | sk->ip_mc_list=NULL; |
sk | 741 | net/ipv4/af_inet.c | sk->state_change = def_callback1; |
sk | 742 | net/ipv4/af_inet.c | sk->data_ready = def_callback2; |
sk | 743 | net/ipv4/af_inet.c | sk->write_space = def_callback3; |
sk | 744 | net/ipv4/af_inet.c | sk->error_report = def_callback1; |
sk | 746 | net/ipv4/af_inet.c | if (sk->num) |
sk | 754 | net/ipv4/af_inet.c | put_sock(sk->num, sk); |
sk | 755 | net/ipv4/af_inet.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 758 | net/ipv4/af_inet.c | if (sk->prot->init) |
sk | 760 | net/ipv4/af_inet.c | err = sk->prot->init(sk); |
sk | 763 | net/ipv4/af_inet.c | destroy_sock(sk); |
sk | 784 | net/ipv4/af_inet.c | static inline int closing(struct sock * sk) |
sk | 786 | net/ipv4/af_inet.c | switch (sk->state) { |
sk | 804 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 805 | net/ipv4/af_inet.c | if (sk == NULL) |
sk | 808 | net/ipv4/af_inet.c | sk->state_change(sk); |
sk | 814 | net/ipv4/af_inet.c | ip_mc_drop_socket(sk); |
sk | 825 | net/ipv4/af_inet.c | if (sk->linger == 0 || (current->flags & PF_EXITING)) |
sk | 827 | net/ipv4/af_inet.c | sk->prot->close(sk,0); |
sk | 828 | net/ipv4/af_inet.c | sk->dead = 1; |
sk | 832 | net/ipv4/af_inet.c | sk->prot->close(sk, 0); |
sk | 834 | net/ipv4/af_inet.c | if (sk->lingertime) |
sk | 835 | net/ipv4/af_inet.c | current->timeout = jiffies + HZ*sk->lingertime; |
sk | 836 | net/ipv4/af_inet.c | while(closing(sk) && current->timeout>0) |
sk | 838 | net/ipv4/af_inet.c | interruptible_sleep_on(sk->sleep); |
sk | 852 | net/ipv4/af_inet.c | sk->dead = 1; |
sk | 854 | net/ipv4/af_inet.c | sk->inuse = 1; |
sk | 863 | net/ipv4/af_inet.c | release_sock(sk); |
sk | 865 | net/ipv4/af_inet.c | sk->socket = NULL; |
sk | 874 | net/ipv4/af_inet.c | struct sock *sk=(struct sock *)sock->data, *sk2; |
sk | 879 | net/ipv4/af_inet.c | if (sk->state != TCP_CLOSE) |
sk | 886 | net/ipv4/af_inet.c | if (sk->num != 0) |
sk | 900 | net/ipv4/af_inet.c | snum = get_new_socknum(sk->prot, 0); |
sk | 910 | net/ipv4/af_inet.c | sk->saddr = addr->sin_addr.s_addr; |
sk | 916 | net/ipv4/af_inet.c | for(sk2 = sk->prot->sock_array[snum & (SOCK_ARRAY_SIZE -1)]; |
sk | 922 | net/ipv4/af_inet.c | if (!sk->reuse) |
sk | 930 | net/ipv4/af_inet.c | if (sk2->saddr != sk->saddr) |
sk | 940 | net/ipv4/af_inet.c | remove_sock(sk); |
sk | 945 | net/ipv4/af_inet.c | put_sock(snum, sk); |
sk | 946 | net/ipv4/af_inet.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 947 | net/ipv4/af_inet.c | sk->daddr = 0; |
sk | 948 | net/ipv4/af_inet.c | sk->dummy_th.dest = 0; |
sk | 950 | net/ipv4/af_inet.c | sk->ip_route_cache=NULL; |
sk | 958 | net/ipv4/af_inet.c | static int inet_error(struct sock *sk) |
sk | 964 | net/ipv4/af_inet.c | err=sk->err; |
sk | 965 | net/ipv4/af_inet.c | sk->err=0; |
sk | 978 | net/ipv4/af_inet.c | struct sock *sk=(struct sock *)sock->data; |
sk | 982 | net/ipv4/af_inet.c | if (sock->state == SS_CONNECTING && tcp_connected(sk->state)) |
sk | 989 | net/ipv4/af_inet.c | if (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && (flags & O_NONBLOCK)) |
sk | 991 | net/ipv4/af_inet.c | if(sk->err!=0) |
sk | 992 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 998 | net/ipv4/af_inet.c | if(inet_autobind(sk)!=0) |
sk | 1000 | net/ipv4/af_inet.c | if (sk->prot->connect == NULL) |
sk | 1002 | net/ipv4/af_inet.c | err = sk->prot->connect(sk, (struct sockaddr_in *)uaddr, addr_len); |
sk | 1008 | net/ipv4/af_inet.c | if (sk->state > TCP_FIN_WAIT2 && sock->state==SS_CONNECTING) |
sk | 1011 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1014 | net/ipv4/af_inet.c | if (sk->state != TCP_ESTABLISHED &&(flags & O_NONBLOCK)) |
sk | 1018 | net/ipv4/af_inet.c | while(sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 1020 | net/ipv4/af_inet.c | interruptible_sleep_on(sk->sleep); |
sk | 1028 | net/ipv4/af_inet.c | if(sk->err && sk->protocol == IPPROTO_TCP) |
sk | 1032 | net/ipv4/af_inet.c | return inet_error(sk); /* set by tcp_err() */ |
sk | 1038 | net/ipv4/af_inet.c | if (sk->state != TCP_ESTABLISHED && sk->err) |
sk | 1041 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1071 | net/ipv4/af_inet.c | struct sock *sk=(struct sock *)newsock->data; |
sk | 1073 | net/ipv4/af_inet.c | sk->dead = 1; |
sk | 1074 | net/ipv4/af_inet.c | destroy_sock(sk); |
sk | 1138 | net/ipv4/af_inet.c | struct sock *sk; |
sk | 1141 | net/ipv4/af_inet.c | sk = (struct sock *) sock->data; |
sk | 1144 | net/ipv4/af_inet.c | if (!tcp_connected(sk->state)) |
sk | 1146 | net/ipv4/af_inet.c | sin->sin_port = sk->dummy_th.dest; |
sk | 1147 | net/ipv4/af_inet.c | sin->sin_addr.s_addr = sk->daddr; |
sk | 1151 | net/ipv4/af_inet.c | sin->sin_port = sk->dummy_th.source; |
sk | 1152 | net/ipv4/af_inet.c | if (sk->saddr == 0) |
sk | 1155 | net/ipv4/af_inet.c | sin->sin_addr.s_addr = sk->saddr; |
sk | 1169 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 1171 | net/ipv4/af_inet.c | if (sk->prot->recvfrom == NULL) |
sk | 1173 | net/ipv4/af_inet.c | if(sk->err) |
sk | 1174 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1176 | net/ipv4/af_inet.c | if(inet_autobind(sk)!=0) |
sk | 1178 | net/ipv4/af_inet.c | return(sk->prot->recvfrom(sk, (unsigned char *) ubuf, size, noblock, flags, |
sk | 1192 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 1194 | net/ipv4/af_inet.c | if(sk->err) |
sk | 1195 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1197 | net/ipv4/af_inet.c | if(inet_autobind(sk)) |
sk | 1199 | net/ipv4/af_inet.c | return(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, 0)); |
sk | 1205 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 1206 | net/ipv4/af_inet.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 1211 | net/ipv4/af_inet.c | if(sk->err) |
sk | 1212 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1214 | net/ipv4/af_inet.c | if(inet_autobind(sk)!=0) |
sk | 1216 | net/ipv4/af_inet.c | return(sk->prot->write(sk, (const unsigned char *) ubuf, size, noblock, flags)); |
sk | 1227 | net/ipv4/af_inet.c | struct sock *sk = (struct sock *) sock->data; |
sk | 1228 | net/ipv4/af_inet.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 1233 | net/ipv4/af_inet.c | if (sk->prot->sendto == NULL) |
sk | 1235 | net/ipv4/af_inet.c | if(sk->err) |
sk | 1236 | net/ipv4/af_inet.c | return inet_error(sk); |
sk | 1238 | net/ipv4/af_inet.c | if(inet_autobind(sk)!=0) |
sk | 1240 | net/ipv4/af_inet.c | return(sk->prot->sendto(sk, (const unsigned char *) ubuf, size, noblock, flags, |
sk | 1247 | net/ipv4/af_inet.c | struct sock *sk=(struct sock*)sock->data; |
sk | 1258 | net/ipv4/af_inet.c | if (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED) |
sk | 1260 | net/ipv4/af_inet.c | if (!tcp_connected(sk->state)) |
sk | 1262 | net/ipv4/af_inet.c | sk->shutdown |= how; |
sk | 1263 | net/ipv4/af_inet.c | if (sk->prot->shutdown) |
sk | 1264 | net/ipv4/af_inet.c | sk->prot->shutdown(sk, how); |
sk | 1271 | net/ipv4/af_inet.c | struct sock *sk=(struct sock *) sock->data; |
sk | 1272 | net/ipv4/af_inet.c | if (sk->prot->select == NULL) |
sk | 1276 | net/ipv4/af_inet.c | return(sk->prot->select(sk, sel_type, wait)); |
sk | 1291 | net/ipv4/af_inet.c | struct sock *sk=(struct sock *)sock->data; |
sk | 1306 | net/ipv4/af_inet.c | sk->proc = pid; |
sk | 1313 | net/ipv4/af_inet.c | put_fs_long(sk->proc,(int *)arg); |
sk | 1316 | net/ipv4/af_inet.c | if(sk->stamp.tv_sec==0) |
sk | 1321 | net/ipv4/af_inet.c | memcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval)); |
sk | 1369 | net/ipv4/af_inet.c | if (sk->prot->ioctl==NULL) |
sk | 1371 | net/ipv4/af_inet.c | return(sk->prot->ioctl(sk, cmd, arg)); |
sk | 1450 | net/ipv4/af_inet.c | struct sock *get_sock_raw(struct sock *sk, |
sk | 1457 | net/ipv4/af_inet.c | s=sk; |
sk | 1479 | net/ipv4/af_inet.c | struct sock *get_sock_mcast(struct sock *sk, |
sk | 1498 | net/ipv4/af_inet.c | s=sk; |
sk | 532 | net/ipv4/arp.c | if(skb->sk==NULL) |
sk | 535 | net/ipv4/arp.c | dev_queue_xmit(skb,skb->dev,skb->sk->priority); |
sk | 231 | net/ipv4/icmp.c | struct sock *sk=icmp_socket.data; |
sk | 235 | net/ipv4/icmp.c | ip_build_xmit(sk, icmp_glue_bits, icmp_param, |
sk | 709 | net/ipv4/icmp.c | struct sock *sk; |
sk | 716 | net/ipv4/icmp.c | sk=icmp_socket.data; |
sk | 717 | net/ipv4/icmp.c | sk->allocation=GFP_ATOMIC; |
sk | 718 | net/ipv4/icmp.c | sk->num = 256; /* Don't receive any data */ |
sk | 346 | net/ipv4/igmp.c | int ip_mc_join_group(struct sock *sk , struct device *dev, unsigned long addr) |
sk | 354 | net/ipv4/igmp.c | if(sk->ip_mc_list==NULL) |
sk | 356 | net/ipv4/igmp.c | if((sk->ip_mc_list=(struct ip_mc_socklist *)kmalloc(sizeof(*sk->ip_mc_list), GFP_KERNEL))==NULL) |
sk | 358 | net/ipv4/igmp.c | memset(sk->ip_mc_list,'\0',sizeof(*sk->ip_mc_list)); |
sk | 362 | net/ipv4/igmp.c | if(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev) |
sk | 364 | net/ipv4/igmp.c | if(sk->ip_mc_list->multidev[i]==NULL) |
sk | 370 | net/ipv4/igmp.c | sk->ip_mc_list->multiaddr[unused]=addr; |
sk | 371 | net/ipv4/igmp.c | sk->ip_mc_list->multidev[unused]=dev; |
sk | 380 | net/ipv4/igmp.c | int ip_mc_leave_group(struct sock *sk, struct device *dev, unsigned long addr) |
sk | 387 | net/ipv4/igmp.c | if(sk->ip_mc_list==NULL) |
sk | 392 | net/ipv4/igmp.c | if(sk->ip_mc_list->multiaddr[i]==addr && sk->ip_mc_list->multidev[i]==dev) |
sk | 394 | net/ipv4/igmp.c | sk->ip_mc_list->multidev[i]=NULL; |
sk | 406 | net/ipv4/igmp.c | void ip_mc_drop_socket(struct sock *sk) |
sk | 410 | net/ipv4/igmp.c | if(sk->ip_mc_list==NULL) |
sk | 415 | net/ipv4/igmp.c | if(sk->ip_mc_list->multidev[i]) |
sk | 417 | net/ipv4/igmp.c | ip_mc_dec_group(sk->ip_mc_list->multidev[i], sk->ip_mc_list->multiaddr[i]); |
sk | 418 | net/ipv4/igmp.c | sk->ip_mc_list->multidev[i]=NULL; |
sk | 421 | net/ipv4/igmp.c | kfree_s(sk->ip_mc_list,sizeof(*sk->ip_mc_list)); |
sk | 422 | net/ipv4/igmp.c | sk->ip_mc_list=NULL; |
sk | 159 | net/ipv4/ip.c | extern void sort_send(struct sock *sk); |
sk | 576 | net/ipv4/ip.c | int ip_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 660 | net/ipv4/ip.c | if(MULTICAST(daddr) && *dev==NULL && skb->sk && *skb->sk->ip_mc_name) |
sk | 661 | net/ipv4/ip.c | *dev=dev_get(skb->sk->ip_mc_name); |
sk | 1152 | net/ipv4/ip.c | skb->sk = NULL; |
sk | 1253 | net/ipv4/ip.c | skb->sk = NULL; |
sk | 1294 | net/ipv4/ip.c | static void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag) |
sk | 1410 | net/ipv4/ip.c | if (sk) |
sk | 1413 | net/ipv4/ip.c | sk->wmem_alloc += skb2->truesize; |
sk | 1414 | net/ipv4/ip.c | skb2->sk=sk; |
sk | 1464 | net/ipv4/ip.c | ip_queue_xmit(sk, dev, skb2, 2); |
sk | 2316 | net/ipv4/ip.c | newskb->sk=NULL; |
sk | 2357 | net/ipv4/ip.c | void ip_queue_xmit(struct sock *sk, struct device *dev, |
sk | 2407 | net/ipv4/ip.c | if (sk == NULL) |
sk | 2420 | net/ipv4/ip.c | ip_fragment(sk,skb,dev,0); |
sk | 2458 | net/ipv4/ip.c | sk->packets_out++; |
sk | 2469 | net/ipv4/ip.c | if (sk->send_head == NULL) |
sk | 2471 | net/ipv4/ip.c | sk->send_tail = skb; |
sk | 2472 | net/ipv4/ip.c | sk->send_head = skb; |
sk | 2476 | net/ipv4/ip.c | sk->send_tail->link3 = skb; |
sk | 2477 | net/ipv4/ip.c | sk->send_tail = skb; |
sk | 2486 | net/ipv4/ip.c | skb->sk = sk; |
sk | 2505 | net/ipv4/ip.c | if(sk==NULL || sk->ip_mc_loop) |
sk | 2544 | net/ipv4/ip.c | if (sk != NULL) |
sk | 2546 | net/ipv4/ip.c | dev_queue_xmit(skb, dev, sk->priority); |
sk | 2555 | net/ipv4/ip.c | if(sk) |
sk | 2556 | net/ipv4/ip.c | sk->err = ENETDOWN; |
sk | 2640 | net/ipv4/ip.c | int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen) |
sk | 2666 | net/ipv4/ip.c | return ip_mroute_setsockopt(sk,optname,optval,optlen); |
sk | 2701 | net/ipv4/ip.c | old_opt = sk->opt; |
sk | 2702 | net/ipv4/ip.c | sk->opt = opt; |
sk | 2711 | net/ipv4/ip.c | sk->ip_tos=val; |
sk | 2713 | net/ipv4/ip.c | sk->priority=SOPRI_INTERACTIVE; |
sk | 2715 | net/ipv4/ip.c | sk->priority=SOPRI_BACKGROUND; |
sk | 2720 | net/ipv4/ip.c | sk->ip_ttl=val; |
sk | 2723 | net/ipv4/ip.c | if(sk->type!=SOCK_RAW) |
sk | 2725 | net/ipv4/ip.c | sk->ip_hdrincl=val?1:0; |
sk | 2730 | net/ipv4/ip.c | sk->ip_mc_ttl=(int)ucval; |
sk | 2737 | net/ipv4/ip.c | sk->ip_mc_loop=(int)ucval; |
sk | 2762 | net/ipv4/ip.c | sk->ip_mc_name[0]=0; |
sk | 2778 | net/ipv4/ip.c | strcpy(sk->ip_mc_name,dev->name); |
sk | 2840 | net/ipv4/ip.c | return ip_mc_join_group(sk,dev,mreq.imr_multiaddr.s_addr); |
sk | 2889 | net/ipv4/ip.c | return ip_mc_leave_group(sk,dev,mreq.imr_multiaddr.s_addr); |
sk | 2944 | net/ipv4/ip.c | int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen) |
sk | 2957 | net/ipv4/ip.c | return ip_mroute_getsockopt(sk,optname,optval,optlen); |
sk | 2972 | net/ipv4/ip.c | if (sk->opt) |
sk | 2973 | net/ipv4/ip.c | memcpy(optbuf, sk->opt, sizeof(struct options)+sk->opt->optlen); |
sk | 3011 | net/ipv4/ip.c | val=sk->ip_tos; |
sk | 3014 | net/ipv4/ip.c | val=sk->ip_ttl; |
sk | 3017 | net/ipv4/ip.c | val=sk->ip_hdrincl; |
sk | 3021 | net/ipv4/ip.c | val=sk->ip_mc_ttl; |
sk | 3024 | net/ipv4/ip.c | val=sk->ip_mc_loop; |
sk | 3030 | net/ipv4/ip.c | len=strlen(sk->ip_mc_name); |
sk | 3035 | net/ipv4/ip.c | memcpy_tofs((void *)optval,sk->ip_mc_name, len); |
sk | 3074 | net/ipv4/ip.c | int ip_build_xmit(struct sock *sk, |
sk | 3099 | net/ipv4/ip.c | if (opt && opt->srr && !sk->ip_hdrincl) |
sk | 3105 | net/ipv4/ip.c | if(sk && MULTICAST(daddr) && *sk->ip_mc_name) |
sk | 3107 | net/ipv4/ip.c | dev=dev_get(sk->ip_mc_name); |
sk | 3111 | net/ipv4/ip.c | if (sk->saddr && (!LOOPBACK(sk->saddr) || LOOPBACK(daddr))) |
sk | 3112 | net/ipv4/ip.c | saddr = sk->saddr; |
sk | 3123 | net/ipv4/ip.c | if(sk->localroute || flags&MSG_DONTROUTE) |
sk | 3126 | net/ipv4/ip.c | rt = sk->ip_route_cache; |
sk | 3133 | net/ipv4/ip.c | saddr=sk->ip_route_saddr; |
sk | 3134 | net/ipv4/ip.c | if(!rt || sk->ip_route_stamp != rt_stamp || |
sk | 3135 | net/ipv4/ip.c | daddr!=sk->ip_route_daddr || sk->ip_route_local!=local || |
sk | 3136 | net/ipv4/ip.c | (sk->saddr && sk->saddr != saddr)) |
sk | 3142 | net/ipv4/ip.c | sk->ip_route_local=local; |
sk | 3143 | net/ipv4/ip.c | sk->ip_route_daddr=daddr; |
sk | 3144 | net/ipv4/ip.c | sk->ip_route_saddr=saddr; |
sk | 3145 | net/ipv4/ip.c | sk->ip_route_stamp=rt_stamp; |
sk | 3146 | net/ipv4/ip.c | sk->ip_route_cache=rt; |
sk | 3147 | net/ipv4/ip.c | sk->ip_hcache_ver=NULL; |
sk | 3148 | net/ipv4/ip.c | sk->ip_hcache_state= 0; |
sk | 3158 | net/ipv4/ip.c | if(rt->rt_dev->header_cache && sk->ip_hcache_state!= -1) |
sk | 3160 | net/ipv4/ip.c | if(sk->ip_hcache_ver==NULL || sk->ip_hcache_stamp!=*sk->ip_hcache_ver) |
sk | 3161 | net/ipv4/ip.c | rt->rt_dev->header_cache(rt->rt_dev,sk,saddr,daddr); |
sk | 3164 | net/ipv4/ip.c | sk->ip_hcache_state= -1; |
sk | 3174 | net/ipv4/ip.c | if (sk->saddr && (!LOOPBACK(sk->saddr) || LOOPBACK(daddr))) |
sk | 3175 | net/ipv4/ip.c | saddr = sk->saddr; |
sk | 3194 | net/ipv4/ip.c | if (!sk->ip_hdrincl && opt) { |
sk | 3204 | net/ipv4/ip.c | struct sk_buff *skb=sock_alloc_send_skb(sk, length+15+dev->hard_header_len,0, 0,&error); |
sk | 3213 | net/ipv4/ip.c | skb->sk=sk; |
sk | 3218 | net/ipv4/ip.c | if(sk->ip_hcache_state>0) |
sk | 3220 | net/ipv4/ip.c | memcpy(skb_push(skb,dev->hard_header_len),sk->ip_hcache_data,dev->hard_header_len); |
sk | 3232 | net/ipv4/ip.c | if(!sk->ip_hdrincl) |
sk | 3236 | net/ipv4/ip.c | iph->tos=sk->ip_tos; |
sk | 3240 | net/ipv4/ip.c | iph->ttl=sk->ip_ttl; |
sk | 3267 | net/ipv4/ip.c | dev_queue_xmit(skb,dev,sk->priority); |
sk | 3276 | net/ipv4/ip.c | if (sk && !sk->ip_hdrincl && opt) { |
sk | 3282 | net/ipv4/ip.c | if(!sk->ip_hdrincl) |
sk | 3322 | net/ipv4/ip.c | if (sk->ip_hdrincl && offset > 0) |
sk | 3351 | net/ipv4/ip.c | skb = sock_alloc_send_skb(sk, fraglen+15, 0, 0, &error); |
sk | 3369 | net/ipv4/ip.c | skb->sk = sk; |
sk | 3383 | net/ipv4/ip.c | if(sk->ip_hcache_state>0) |
sk | 3385 | net/ipv4/ip.c | memcpy(skb_push(skb,dev->hard_header_len),sk->ip_hcache_data, dev->hard_header_len); |
sk | 3405 | net/ipv4/ip.c | if(!sk->ip_hdrincl) |
sk | 3415 | net/ipv4/ip.c | iph->tos = sk->ip_tos; |
sk | 3422 | net/ipv4/ip.c | iph->ttl = sk->ip_mc_ttl; |
sk | 3425 | net/ipv4/ip.c | iph->ttl = sk->ip_ttl; |
sk | 3480 | net/ipv4/ip.c | if(sk==NULL || sk->ip_mc_loop) |
sk | 3524 | net/ipv4/ip.c | dev_queue_xmit(skb, dev, sk->priority); |
sk | 3540 | net/ipv4/ip.c | if(sk!=NULL) |
sk | 3541 | net/ipv4/ip.c | sk->err=ENETDOWN; |
sk | 873 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk); |
sk | 978 | net/ipv4/ip_fw.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb_ptr->sk); |
sk | 287 | net/ipv4/ipmr.c | skb->sk=NULL; |
sk | 427 | net/ipv4/ipmr.c | int ip_mroute_setsockopt(struct sock *sk,int optname,char *optval,int optlen) |
sk | 435 | net/ipv4/ipmr.c | if(sk!=mroute_socket) |
sk | 442 | net/ipv4/ipmr.c | if(sk->type!=SOCK_RAW || sk->num!=IPPROTO_IGMP) |
sk | 452 | net/ipv4/ipmr.c | mroute_socket=sk; |
sk | 456 | net/ipv4/ipmr.c | mroute_close(sk); |
sk | 568 | net/ipv4/ipmr.c | int ip_mroute_getsockopt(struct sock *sk,int optname,char *optval,int *optlen) |
sk | 573 | net/ipv4/ipmr.c | if(sk!=mroute_socket) |
sk | 596 | net/ipv4/ipmr.c | int ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 639 | net/ipv4/ipmr.c | void mroute_close(struct sock *sk) |
sk | 75 | net/ipv4/packet.c | struct sock *sk; |
sk | 83 | net/ipv4/packet.c | sk = (struct sock *) pt->data; |
sk | 102 | net/ipv4/packet.c | if (sk->rmem_alloc & 0xFF000000) { |
sk | 103 | net/ipv4/packet.c | printk("packet_rcv: sk->rmem_alloc = %ld\n", sk->rmem_alloc); |
sk | 104 | net/ipv4/packet.c | sk->rmem_alloc = 0; |
sk | 107 | net/ipv4/packet.c | if (sk->rmem_alloc + skb->truesize >= sk->rcvbuf) |
sk | 110 | net/ipv4/packet.c | skb->sk = NULL; |
sk | 118 | net/ipv4/packet.c | skb->sk = sk; |
sk | 119 | net/ipv4/packet.c | sk->rmem_alloc += skb->truesize; |
sk | 125 | net/ipv4/packet.c | skb_queue_tail(&sk->receive_queue,skb); |
sk | 126 | net/ipv4/packet.c | if(!sk->dead) |
sk | 127 | net/ipv4/packet.c | sk->data_ready(sk,skb->len); |
sk | 144 | net/ipv4/packet.c | static int packet_sendto(struct sock *sk, const unsigned char *from, int len, |
sk | 190 | net/ipv4/packet.c | skb = sk->prot->wmalloc(sk, len, 0, GFP_KERNEL); |
sk | 206 | net/ipv4/packet.c | skb->sk = sk; |
sk | 216 | net/ipv4/packet.c | dev_queue_xmit(skb, dev, sk->priority); |
sk | 227 | net/ipv4/packet.c | static int packet_write(struct sock *sk, const unsigned char *buff, |
sk | 230 | net/ipv4/packet.c | return(packet_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 240 | net/ipv4/packet.c | static void packet_close(struct sock *sk, int timeout) |
sk | 242 | net/ipv4/packet.c | sk->inuse = 1; |
sk | 243 | net/ipv4/packet.c | sk->state = TCP_CLOSE; |
sk | 244 | net/ipv4/packet.c | dev_remove_pack((struct packet_type *)sk->pair); |
sk | 245 | net/ipv4/packet.c | kfree_s((void *)sk->pair, sizeof(struct packet_type)); |
sk | 246 | net/ipv4/packet.c | sk->pair = NULL; |
sk | 247 | net/ipv4/packet.c | release_sock(sk); |
sk | 258 | net/ipv4/packet.c | static int packet_init(struct sock *sk) |
sk | 267 | net/ipv4/packet.c | p->type = sk->num; |
sk | 268 | net/ipv4/packet.c | p->data = (void *)sk; |
sk | 276 | net/ipv4/packet.c | sk->pair = (struct sock *)p; |
sk | 287 | net/ipv4/packet.c | int packet_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 298 | net/ipv4/packet.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 315 | net/ipv4/packet.c | skb=skb_recv_datagram(sk,flags,noblock,&err); |
sk | 334 | net/ipv4/packet.c | sk->stamp=skb->stamp; |
sk | 357 | net/ipv4/packet.c | release_sock(sk); |
sk | 367 | net/ipv4/packet.c | int packet_read(struct sock *sk, unsigned char *buff, |
sk | 370 | net/ipv4/packet.c | return(packet_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 79 | net/ipv4/raw.c | struct sock *sk; |
sk | 83 | net/ipv4/raw.c | sk = (struct sock *) protocol->data; |
sk | 84 | net/ipv4/raw.c | if (sk == NULL) |
sk | 90 | net/ipv4/raw.c | if (sk->cong_window > 1) sk->cong_window = sk->cong_window/2; |
sk | 96 | net/ipv4/raw.c | sk->err = EPROTO; |
sk | 97 | net/ipv4/raw.c | sk->error_report(sk); |
sk | 102 | net/ipv4/raw.c | sk->err = icmp_err_convert[code & 0xff].errno; |
sk | 103 | net/ipv4/raw.c | sk->error_report(sk); |
sk | 116 | net/ipv4/raw.c | int raw_rcv(struct sock *sk, struct sk_buff *skb, struct device *dev, __u32 saddr, __u32 daddr) |
sk | 119 | net/ipv4/raw.c | skb->sk = sk; |
sk | 129 | net/ipv4/raw.c | if(sock_queue_rcv_skb(sk,skb)<0) |
sk | 132 | net/ipv4/raw.c | skb->sk=NULL; |
sk | 138 | net/ipv4/raw.c | release_sock(sk); |
sk | 178 | net/ipv4/raw.c | static int raw_sendto(struct sock *sk, const unsigned char *from, |
sk | 207 | net/ipv4/raw.c | if (sk->state != TCP_ESTABLISHED) |
sk | 210 | net/ipv4/raw.c | sin.sin_port = sk->protocol; |
sk | 211 | net/ipv4/raw.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 214 | net/ipv4/raw.c | sin.sin_port = sk->protocol; |
sk | 219 | net/ipv4/raw.c | if (sk->broadcast == 0 && ip_chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST) |
sk | 222 | net/ipv4/raw.c | if(sk->ip_hdrincl) |
sk | 226 | net/ipv4/raw.c | err=ip_build_xmit(sk, raw_getrawfrag, from, len, sin.sin_addr.s_addr, 0, sk->opt, flags, sin.sin_port); |
sk | 232 | net/ipv4/raw.c | err=ip_build_xmit(sk, raw_getfrag, from, len, sin.sin_addr.s_addr, 0, sk->opt, flags, sin.sin_port); |
sk | 238 | net/ipv4/raw.c | static int raw_write(struct sock *sk, const unsigned char *buff, int len, int noblock, |
sk | 241 | net/ipv4/raw.c | return(raw_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 245 | net/ipv4/raw.c | static void raw_close(struct sock *sk, int timeout) |
sk | 247 | net/ipv4/raw.c | sk->state = TCP_CLOSE; |
sk | 249 | net/ipv4/raw.c | if(sk==mroute_socket) |
sk | 251 | net/ipv4/raw.c | mroute_close(sk); |
sk | 258 | net/ipv4/raw.c | static int raw_init(struct sock *sk) |
sk | 269 | net/ipv4/raw.c | int raw_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 280 | net/ipv4/raw.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 286 | net/ipv4/raw.c | skb=skb_recv_datagram(sk,flags,noblock,&err); |
sk | 293 | net/ipv4/raw.c | sk->stamp=skb->stamp; |
sk | 302 | net/ipv4/raw.c | release_sock(sk); |
sk | 307 | net/ipv4/raw.c | int raw_read (struct sock *sk, unsigned char *buff, int len, int noblock,unsigned flags) |
sk | 309 | net/ipv4/raw.c | return(raw_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 468 | net/ipv4/tcp.c | static void tcp_close(struct sock *sk, int timeout); |
sk | 494 | net/ipv4/tcp.c | static __inline__ void tcp_set_state(struct sock *sk, int state) |
sk | 496 | net/ipv4/tcp.c | if(sk->state==TCP_ESTABLISHED) |
sk | 499 | net/ipv4/tcp.c | if(sk->debug) |
sk | 500 | net/ipv4/tcp.c | printk("TCP sk=%p, State %s -> %s\n",sk, statename[sk->state],statename[state]); |
sk | 505 | net/ipv4/tcp.c | if(state==TCP_ESTABLISHED && sk->state==TCP_SYN_RECV) |
sk | 509 | net/ipv4/tcp.c | sk->state=state; |
sk | 512 | net/ipv4/tcp.c | if(sk->state==TCP_CLOSE) |
sk | 531 | net/ipv4/tcp.c | int tcp_select_window(struct sock *sk) |
sk | 533 | net/ipv4/tcp.c | int new_window = sk->prot->rspace(sk); |
sk | 535 | net/ipv4/tcp.c | if(sk->window_clamp) |
sk | 536 | net/ipv4/tcp.c | new_window=min(sk->window_clamp,new_window); |
sk | 550 | net/ipv4/tcp.c | if (new_window < min(sk->mss, MAX_WINDOW/2) || new_window < sk->window) |
sk | 551 | net/ipv4/tcp.c | return(sk->window); |
sk | 567 | net/ipv4/tcp.c | if(p->sk->state == TCP_ESTABLISHED || p->sk->state >= TCP_FIN_WAIT1) |
sk | 599 | net/ipv4/tcp.c | static void tcp_close_pending (struct sock *sk) |
sk | 603 | net/ipv4/tcp.c | while ((skb = skb_dequeue(&sk->receive_queue)) != NULL) |
sk | 605 | net/ipv4/tcp.c | skb->sk->dead=1; |
sk | 606 | net/ipv4/tcp.c | tcp_close(skb->sk, 0); |
sk | 616 | net/ipv4/tcp.c | static void tcp_time_wait(struct sock *sk) |
sk | 618 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_TIME_WAIT); |
sk | 619 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 620 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 621 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 622 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 630 | net/ipv4/tcp.c | void tcp_do_retransmit(struct sock *sk, int all) |
sk | 638 | net/ipv4/tcp.c | prot = sk->prot; |
sk | 639 | net/ipv4/tcp.c | skb = sk->send_head; |
sk | 689 | net/ipv4/tcp.c | if(skb->sk) |
sk | 691 | net/ipv4/tcp.c | skb->sk->err=ENETUNREACH; |
sk | 692 | net/ipv4/tcp.c | skb->sk->error_report(skb->sk); |
sk | 720 | net/ipv4/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
sk | 721 | net/ipv4/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
sk | 722 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
sk | 738 | net/ipv4/tcp.c | if (sk && !skb_device_locked(skb)) |
sk | 744 | net/ipv4/tcp.c | dev_queue_xmit(skb, dev, sk->priority); |
sk | 754 | net/ipv4/tcp.c | sk->prot->retransmits ++; |
sk | 769 | net/ipv4/tcp.c | if (ct >= sk->cong_window) |
sk | 779 | net/ipv4/tcp.c | static void reset_xmit_timer(struct sock *sk, int why, unsigned long when) |
sk | 781 | net/ipv4/tcp.c | del_timer(&sk->retransmit_timer); |
sk | 782 | net/ipv4/tcp.c | sk->ip_xmit_timeout = why; |
sk | 788 | net/ipv4/tcp.c | sk->retransmit_timer.expires=jiffies+when; |
sk | 789 | net/ipv4/tcp.c | add_timer(&sk->retransmit_timer); |
sk | 800 | net/ipv4/tcp.c | void tcp_retransmit_time(struct sock *sk, int all) |
sk | 802 | net/ipv4/tcp.c | tcp_do_retransmit(sk, all); |
sk | 821 | net/ipv4/tcp.c | sk->retransmits++; |
sk | 822 | net/ipv4/tcp.c | sk->prot->retransmits++; |
sk | 823 | net/ipv4/tcp.c | sk->backoff++; |
sk | 824 | net/ipv4/tcp.c | sk->rto = min(sk->rto << 1, 120*HZ); |
sk | 825 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 836 | net/ipv4/tcp.c | static void tcp_retransmit(struct sock *sk, int all) |
sk | 840 | net/ipv4/tcp.c | tcp_retransmit_time(sk, all); |
sk | 844 | net/ipv4/tcp.c | sk->ssthresh = sk->cong_window >> 1; /* remember window where we lost */ |
sk | 846 | net/ipv4/tcp.c | sk->cong_count = 0; |
sk | 848 | net/ipv4/tcp.c | sk->cong_window = 1; |
sk | 851 | net/ipv4/tcp.c | tcp_retransmit_time(sk, all); |
sk | 858 | net/ipv4/tcp.c | static int tcp_write_timeout(struct sock *sk) |
sk | 863 | net/ipv4/tcp.c | if ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7)) |
sk | 864 | net/ipv4/tcp.c | || (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) |
sk | 870 | net/ipv4/tcp.c | arp_destroy (sk->daddr, 0); |
sk | 878 | net/ipv4/tcp.c | if(sk->retransmits > TCP_SYN_RETRIES && sk->state==TCP_SYN_SENT) |
sk | 880 | net/ipv4/tcp.c | sk->err=ETIMEDOUT; |
sk | 881 | net/ipv4/tcp.c | sk->error_report(sk); |
sk | 882 | net/ipv4/tcp.c | del_timer(&sk->retransmit_timer); |
sk | 884 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 886 | net/ipv4/tcp.c | release_sock(sk); |
sk | 892 | net/ipv4/tcp.c | if (sk->retransmits > TCP_RETR2) |
sk | 894 | net/ipv4/tcp.c | sk->err = ETIMEDOUT; |
sk | 895 | net/ipv4/tcp.c | sk->error_report(sk); |
sk | 896 | net/ipv4/tcp.c | del_timer(&sk->retransmit_timer); |
sk | 900 | net/ipv4/tcp.c | if (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2 || sk->state == TCP_CLOSING ) |
sk | 902 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_TIME_WAIT); |
sk | 903 | net/ipv4/tcp.c | reset_msl_timer (sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 910 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_CLOSE); |
sk | 911 | net/ipv4/tcp.c | release_sock(sk); |
sk | 930 | net/ipv4/tcp.c | struct sock *sk = (struct sock*)data; |
sk | 931 | net/ipv4/tcp.c | int why = sk->ip_xmit_timeout; |
sk | 938 | net/ipv4/tcp.c | if (sk->inuse || in_bh) |
sk | 941 | net/ipv4/tcp.c | sk->retransmit_timer.expires = jiffies+HZ; |
sk | 942 | net/ipv4/tcp.c | add_timer(&sk->retransmit_timer); |
sk | 947 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 952 | net/ipv4/tcp.c | if (sk->ack_backlog && !sk->zapped) |
sk | 954 | net/ipv4/tcp.c | sk->prot->read_wakeup (sk); |
sk | 955 | net/ipv4/tcp.c | if (! sk->dead) |
sk | 956 | net/ipv4/tcp.c | sk->data_ready(sk,0); |
sk | 965 | net/ipv4/tcp.c | tcp_send_probe0(sk); |
sk | 966 | net/ipv4/tcp.c | tcp_write_timeout(sk); |
sk | 979 | net/ipv4/tcp.c | skb = sk->send_head; |
sk | 990 | net/ipv4/tcp.c | if (jiffies < skb->when + sk->rto) |
sk | 992 | net/ipv4/tcp.c | reset_xmit_timer (sk, TIME_WRITE, skb->when + sk->rto - jiffies); |
sk | 1000 | net/ipv4/tcp.c | sk->retransmits++; |
sk | 1001 | net/ipv4/tcp.c | sk->prot->retransmits++; |
sk | 1002 | net/ipv4/tcp.c | sk->prot->retransmit (sk, 0); |
sk | 1003 | net/ipv4/tcp.c | tcp_write_timeout(sk); |
sk | 1013 | net/ipv4/tcp.c | reset_xmit_timer (sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 1016 | net/ipv4/tcp.c | if (sk->prot->write_wakeup) |
sk | 1017 | net/ipv4/tcp.c | sk->prot->write_wakeup (sk); |
sk | 1018 | net/ipv4/tcp.c | sk->retransmits++; |
sk | 1019 | net/ipv4/tcp.c | sk->prot->retransmits++; |
sk | 1020 | net/ipv4/tcp.c | tcp_write_timeout(sk); |
sk | 1026 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1042 | net/ipv4/tcp.c | struct sock *sk; |
sk | 1049 | net/ipv4/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
sk | 1051 | net/ipv4/tcp.c | if (sk == NULL) |
sk | 1061 | net/ipv4/tcp.c | if (sk->cong_window > 4) |
sk | 1062 | net/ipv4/tcp.c | sk->cong_window--; |
sk | 1068 | net/ipv4/tcp.c | sk->err=EPROTO; |
sk | 1069 | net/ipv4/tcp.c | sk->error_report(sk); |
sk | 1077 | net/ipv4/tcp.c | if (code < 13 && (icmp_err_convert[code].fatal || sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)) |
sk | 1079 | net/ipv4/tcp.c | sk->err = icmp_err_convert[code].errno; |
sk | 1080 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 1083 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 1084 | net/ipv4/tcp.c | sk->error_report(sk); /* Wake people up to see the error (see connect in sock.c) */ |
sk | 1097 | net/ipv4/tcp.c | static int tcp_readable(struct sock *sk) |
sk | 1105 | net/ipv4/tcp.c | if(sk && sk->debug) |
sk | 1106 | net/ipv4/tcp.c | printk("tcp_readable: %p - ",sk); |
sk | 1110 | net/ipv4/tcp.c | if (sk == NULL || (skb = skb_peek(&sk->receive_queue)) == NULL) |
sk | 1113 | net/ipv4/tcp.c | if(sk && sk->debug) |
sk | 1118 | net/ipv4/tcp.c | counted = sk->copied_seq; /* Where we are at the moment */ |
sk | 1160 | net/ipv4/tcp.c | while(skb != (struct sk_buff *)&sk->receive_queue); |
sk | 1163 | net/ipv4/tcp.c | if(sk->debug) |
sk | 1171 | net/ipv4/tcp.c | static int tcp_listen_select(struct sock *sk, int sel_type, select_table *wait) |
sk | 1176 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1177 | net/ipv4/tcp.c | retval = (tcp_find_established(sk) != NULL); |
sk | 1178 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1194 | net/ipv4/tcp.c | static int tcp_select(struct sock *sk, int sel_type, select_table *wait) |
sk | 1196 | net/ipv4/tcp.c | if (sk->state == TCP_LISTEN) |
sk | 1197 | net/ipv4/tcp.c | return tcp_listen_select(sk, sel_type, wait); |
sk | 1201 | net/ipv4/tcp.c | if (sk->err) |
sk | 1203 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 1206 | net/ipv4/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 1209 | net/ipv4/tcp.c | if (sk->acked_seq == sk->copied_seq) |
sk | 1212 | net/ipv4/tcp.c | if (sk->urg_seq != sk->copied_seq || |
sk | 1213 | net/ipv4/tcp.c | sk->acked_seq != sk->copied_seq+1 || |
sk | 1214 | net/ipv4/tcp.c | sk->urginline || !sk->urg_data) |
sk | 1219 | net/ipv4/tcp.c | if (sk->err) |
sk | 1221 | net/ipv4/tcp.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 1223 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 1230 | net/ipv4/tcp.c | if (sk->prot->wspace(sk) < sk->mtu+128+sk->prot->max_header) |
sk | 1235 | net/ipv4/tcp.c | if (sk->urg_data) |
sk | 1239 | net/ipv4/tcp.c | select_wait(sk->sleep, wait); |
sk | 1243 | net/ipv4/tcp.c | int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 1256 | net/ipv4/tcp.c | if (sk->state == TCP_LISTEN) |
sk | 1259 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1260 | net/ipv4/tcp.c | amount = tcp_readable(sk); |
sk | 1261 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1270 | net/ipv4/tcp.c | int answ = sk->urg_data && sk->urg_seq == sk->copied_seq; |
sk | 1282 | net/ipv4/tcp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 1283 | net/ipv4/tcp.c | amount = sk->prot->wspace(sk); |
sk | 1312 | net/ipv4/tcp.c | unsigned long daddr, int len, struct sock *sk) |
sk | 1325 | net/ipv4/tcp.c | static void tcp_send_skb(struct sock *sk, struct sk_buff *skb) |
sk | 1379 | net/ipv4/tcp.c | if (after(skb->h.seq, sk->window_seq) || |
sk | 1380 | net/ipv4/tcp.c | (sk->retransmits && sk->ip_xmit_timeout == TIME_WRITE) || |
sk | 1381 | net/ipv4/tcp.c | sk->packets_out >= sk->cong_window) |
sk | 1391 | net/ipv4/tcp.c | skb_queue_tail(&sk->write_queue, skb); |
sk | 1400 | net/ipv4/tcp.c | if (before(sk->window_seq, sk->write_queue.next->h.seq) && |
sk | 1401 | net/ipv4/tcp.c | sk->send_head == NULL && sk->ack_backlog == 0) |
sk | 1402 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_PROBE0, sk->rto); |
sk | 1410 | net/ipv4/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
sk | 1411 | net/ipv4/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
sk | 1413 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
sk | 1415 | net/ipv4/tcp.c | sk->sent_seq = sk->write_seq; |
sk | 1423 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, 0); |
sk | 1431 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 1444 | net/ipv4/tcp.c | struct sk_buff * tcp_dequeue_partial(struct sock * sk) |
sk | 1451 | net/ipv4/tcp.c | skb = sk->partial; |
sk | 1453 | net/ipv4/tcp.c | sk->partial = NULL; |
sk | 1454 | net/ipv4/tcp.c | del_timer(&sk->partial_timer); |
sk | 1464 | net/ipv4/tcp.c | static void tcp_send_partial(struct sock *sk) |
sk | 1468 | net/ipv4/tcp.c | if (sk == NULL) |
sk | 1470 | net/ipv4/tcp.c | while ((skb = tcp_dequeue_partial(sk)) != NULL) |
sk | 1471 | net/ipv4/tcp.c | tcp_send_skb(sk, skb); |
sk | 1478 | net/ipv4/tcp.c | void tcp_enqueue_partial(struct sk_buff * skb, struct sock * sk) |
sk | 1485 | net/ipv4/tcp.c | tmp = sk->partial; |
sk | 1487 | net/ipv4/tcp.c | del_timer(&sk->partial_timer); |
sk | 1488 | net/ipv4/tcp.c | sk->partial = skb; |
sk | 1489 | net/ipv4/tcp.c | init_timer(&sk->partial_timer); |
sk | 1493 | net/ipv4/tcp.c | sk->partial_timer.expires = jiffies+HZ; |
sk | 1494 | net/ipv4/tcp.c | sk->partial_timer.function = (void (*)(unsigned long)) tcp_send_partial; |
sk | 1495 | net/ipv4/tcp.c | sk->partial_timer.data = (unsigned long) sk; |
sk | 1496 | net/ipv4/tcp.c | add_timer(&sk->partial_timer); |
sk | 1499 | net/ipv4/tcp.c | tcp_send_skb(sk, tmp); |
sk | 1508 | net/ipv4/tcp.c | struct sock *sk, |
sk | 1516 | net/ipv4/tcp.c | if(sk->zapped) |
sk | 1524 | net/ipv4/tcp.c | buff = sk->prot->wmalloc(sk, MAX_ACK_SIZE, 1, GFP_ATOMIC); |
sk | 1534 | net/ipv4/tcp.c | sk->ack_backlog++; |
sk | 1535 | net/ipv4/tcp.c | if (sk->ip_xmit_timeout != TIME_WRITE && tcp_connected(sk->state)) |
sk | 1537 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, HZ); |
sk | 1546 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 1547 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 1553 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev, |
sk | 1554 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl); |
sk | 1558 | net/ipv4/tcp.c | sk->prot->wfree(sk, buff); |
sk | 1573 | net/ipv4/tcp.c | sk->window = tcp_select_window(sk); |
sk | 1574 | net/ipv4/tcp.c | t1->window = ntohs(sk->window); |
sk | 1589 | net/ipv4/tcp.c | if (ack == sk->acked_seq) |
sk | 1591 | net/ipv4/tcp.c | sk->ack_backlog = 0; |
sk | 1592 | net/ipv4/tcp.c | sk->bytes_rcv = 0; |
sk | 1593 | net/ipv4/tcp.c | sk->ack_timed = 0; |
sk | 1594 | net/ipv4/tcp.c | if (sk->send_head == NULL && skb_peek(&sk->write_queue) == NULL |
sk | 1595 | net/ipv4/tcp.c | && sk->ip_xmit_timeout == TIME_WRITE) |
sk | 1597 | net/ipv4/tcp.c | if(sk->keepopen) { |
sk | 1598 | net/ipv4/tcp.c | reset_xmit_timer(sk,TIME_KEEPOPEN,TCP_TIMEOUT_LEN); |
sk | 1600 | net/ipv4/tcp.c | delete_timer(sk); |
sk | 1611 | net/ipv4/tcp.c | tcp_send_check(t1, sk->saddr, daddr, sizeof(*t1), sk); |
sk | 1612 | net/ipv4/tcp.c | if (sk->debug) |
sk | 1615 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 1623 | net/ipv4/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
sk | 1626 | net/ipv4/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
sk | 1627 | net/ipv4/tcp.c | th->seq = htonl(sk->write_seq); |
sk | 1632 | net/ipv4/tcp.c | sk->ack_backlog = 0; |
sk | 1633 | net/ipv4/tcp.c | sk->bytes_rcv = 0; |
sk | 1634 | net/ipv4/tcp.c | sk->ack_timed = 0; |
sk | 1635 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
sk | 1636 | net/ipv4/tcp.c | sk->window = tcp_select_window(sk); |
sk | 1637 | net/ipv4/tcp.c | th->window = htons(sk->window); |
sk | 1647 | net/ipv4/tcp.c | static int tcp_write(struct sock *sk, const unsigned char *from, |
sk | 1658 | net/ipv4/tcp.c | sk->inuse=1; |
sk | 1659 | net/ipv4/tcp.c | prot = sk->prot; |
sk | 1662 | net/ipv4/tcp.c | if (sk->err) |
sk | 1664 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1667 | net/ipv4/tcp.c | tmp = -sk->err; |
sk | 1668 | net/ipv4/tcp.c | sk->err = 0; |
sk | 1676 | net/ipv4/tcp.c | if (sk->shutdown & SEND_SHUTDOWN) |
sk | 1678 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1679 | net/ipv4/tcp.c | sk->err = EPIPE; |
sk | 1682 | net/ipv4/tcp.c | sk->err = 0; |
sk | 1690 | net/ipv4/tcp.c | while(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) |
sk | 1692 | net/ipv4/tcp.c | if (sk->err) |
sk | 1694 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1697 | net/ipv4/tcp.c | tmp = -sk->err; |
sk | 1698 | net/ipv4/tcp.c | sk->err = 0; |
sk | 1702 | net/ipv4/tcp.c | if (sk->state != TCP_SYN_SENT && sk->state != TCP_SYN_RECV) |
sk | 1704 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1708 | net/ipv4/tcp.c | if (sk->err) |
sk | 1710 | net/ipv4/tcp.c | tmp = -sk->err; |
sk | 1711 | net/ipv4/tcp.c | sk->err = 0; |
sk | 1715 | net/ipv4/tcp.c | if (sk->keepopen) |
sk | 1724 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1730 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1733 | net/ipv4/tcp.c | if (sk->state != TCP_ESTABLISHED && |
sk | 1734 | net/ipv4/tcp.c | sk->state != TCP_CLOSE_WAIT && sk->err == 0) |
sk | 1736 | net/ipv4/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 1745 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1765 | net/ipv4/tcp.c | if ((skb = tcp_dequeue_partial(sk)) != NULL) |
sk | 1776 | net/ipv4/tcp.c | copy = min(sk->mss - (skb->len - hdrlen), len); |
sk | 1788 | net/ipv4/tcp.c | sk->write_seq += copy; |
sk | 1790 | net/ipv4/tcp.c | if ((skb->len - hdrlen) >= sk->mss || |
sk | 1791 | net/ipv4/tcp.c | (flags & MSG_OOB) || !sk->packets_out) |
sk | 1792 | net/ipv4/tcp.c | tcp_send_skb(sk, skb); |
sk | 1794 | net/ipv4/tcp.c | tcp_enqueue_partial(skb, sk); |
sk | 1810 | net/ipv4/tcp.c | copy = sk->window_seq - sk->write_seq; |
sk | 1811 | net/ipv4/tcp.c | if (copy <= 0 || copy < (sk->max_window >> 1) || copy > sk->mss) |
sk | 1812 | net/ipv4/tcp.c | copy = sk->mss; |
sk | 1821 | net/ipv4/tcp.c | if (copy < sk->mss && !(flags & MSG_OOB)) |
sk | 1826 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1831 | net/ipv4/tcp.c | skb = prot->wmalloc(sk, sk->mtu + 128 + prot->max_header + 15, 0, GFP_KERNEL); |
sk | 1832 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1840 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1841 | net/ipv4/tcp.c | skb = prot->wmalloc(sk, copy + prot->max_header + 15 , 0, GFP_KERNEL); |
sk | 1842 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1851 | net/ipv4/tcp.c | sk->socket->flags |= SO_NOSPACE; |
sk | 1854 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1864 | net/ipv4/tcp.c | tmp = sk->wmem_alloc; |
sk | 1865 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1870 | net/ipv4/tcp.c | if (tmp <= sk->wmem_alloc && |
sk | 1871 | net/ipv4/tcp.c | (sk->state == TCP_ESTABLISHED||sk->state == TCP_CLOSE_WAIT) |
sk | 1872 | net/ipv4/tcp.c | && sk->err == 0) |
sk | 1874 | net/ipv4/tcp.c | sk->socket->flags &= ~SO_NOSPACE; |
sk | 1875 | net/ipv4/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 1884 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 1889 | net/ipv4/tcp.c | skb->sk = sk; |
sk | 1891 | net/ipv4/tcp.c | skb->localroute = sk->localroute|(flags&MSG_DONTROUTE); |
sk | 1898 | net/ipv4/tcp.c | tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev, |
sk | 1899 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, skb->truesize,sk->ip_tos,sk->ip_ttl); |
sk | 1902 | net/ipv4/tcp.c | prot->wfree(sk, skb); |
sk | 1903 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1910 | net/ipv4/tcp.c | tmp = tcp_build_header(skb->h.th, sk, len-copy); |
sk | 1913 | net/ipv4/tcp.c | prot->wfree(sk, skb); |
sk | 1914 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1932 | net/ipv4/tcp.c | sk->write_seq += copy; |
sk | 1934 | net/ipv4/tcp.c | if (send_tmp != NULL && sk->packets_out) |
sk | 1936 | net/ipv4/tcp.c | tcp_enqueue_partial(send_tmp, sk); |
sk | 1939 | net/ipv4/tcp.c | tcp_send_skb(sk, skb); |
sk | 1941 | net/ipv4/tcp.c | sk->err = 0; |
sk | 1954 | net/ipv4/tcp.c | if(sk->partial && ((!sk->packets_out) |
sk | 1956 | net/ipv4/tcp.c | || (sk->nonagle && before(sk->write_seq , sk->window_seq)) |
sk | 1958 | net/ipv4/tcp.c | tcp_send_partial(sk); |
sk | 1960 | net/ipv4/tcp.c | release_sock(sk); |
sk | 1968 | net/ipv4/tcp.c | static int tcp_sendto(struct sock *sk, const unsigned char *from, |
sk | 1974 | net/ipv4/tcp.c | if (sk->state == TCP_CLOSE) |
sk | 1980 | net/ipv4/tcp.c | if (addr->sin_port != sk->dummy_th.dest) |
sk | 1982 | net/ipv4/tcp.c | if (addr->sin_addr.s_addr != sk->daddr) |
sk | 1984 | net/ipv4/tcp.c | return tcp_write(sk, from, len, nonblock, flags); |
sk | 1993 | net/ipv4/tcp.c | static void tcp_read_wakeup(struct sock *sk) |
sk | 2000 | net/ipv4/tcp.c | if (!sk->ack_backlog) |
sk | 2007 | net/ipv4/tcp.c | if ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT)) |
sk | 2021 | net/ipv4/tcp.c | buff = sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC); |
sk | 2025 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, HZ); |
sk | 2029 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 2030 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 2036 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 2037 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl); |
sk | 2041 | net/ipv4/tcp.c | sk->prot->wfree(sk, buff); |
sk | 2047 | net/ipv4/tcp.c | memcpy(t1,(void *) &sk->dummy_th, sizeof(*t1)); |
sk | 2048 | net/ipv4/tcp.c | t1->seq = htonl(sk->sent_seq); |
sk | 2056 | net/ipv4/tcp.c | sk->ack_backlog = 0; |
sk | 2057 | net/ipv4/tcp.c | sk->bytes_rcv = 0; |
sk | 2058 | net/ipv4/tcp.c | sk->window = tcp_select_window(sk); |
sk | 2059 | net/ipv4/tcp.c | t1->window = ntohs(sk->window); |
sk | 2060 | net/ipv4/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 2062 | net/ipv4/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 2063 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 2075 | net/ipv4/tcp.c | static void cleanup_rbuf(struct sock *sk) |
sk | 2082 | net/ipv4/tcp.c | if(sk->debug) |
sk | 2083 | net/ipv4/tcp.c | printk("cleaning rbuf for sk=%p\n", sk); |
sk | 2088 | net/ipv4/tcp.c | left = sk->prot->rspace(sk); |
sk | 2095 | net/ipv4/tcp.c | while((skb=skb_peek(&sk->receive_queue)) != NULL) |
sk | 2100 | net/ipv4/tcp.c | skb->sk = sk; |
sk | 2113 | net/ipv4/tcp.c | if(sk->debug) |
sk | 2114 | net/ipv4/tcp.c | printk("sk->rspace = %lu, was %lu\n", sk->prot->rspace(sk), |
sk | 2116 | net/ipv4/tcp.c | if ((rspace=sk->prot->rspace(sk)) != left) |
sk | 2128 | net/ipv4/tcp.c | sk->ack_backlog++; |
sk | 2138 | net/ipv4/tcp.c | if (rspace > (sk->window - sk->bytes_rcv + sk->mtu)) |
sk | 2141 | net/ipv4/tcp.c | tcp_read_wakeup(sk); |
sk | 2146 | net/ipv4/tcp.c | int was_active = del_timer(&sk->retransmit_timer); |
sk | 2147 | net/ipv4/tcp.c | if (!was_active || jiffies+TCP_ACK_TIME < sk->timer.expires) |
sk | 2149 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 2152 | net/ipv4/tcp.c | add_timer(&sk->retransmit_timer); |
sk | 2163 | net/ipv4/tcp.c | static int tcp_read_urg(struct sock * sk, int nonblock, |
sk | 2169 | net/ipv4/tcp.c | if (sk->urginline || !sk->urg_data || sk->urg_data == URG_READ) |
sk | 2172 | net/ipv4/tcp.c | if (sk->err) |
sk | 2174 | net/ipv4/tcp.c | int tmp = -sk->err; |
sk | 2175 | net/ipv4/tcp.c | sk->err = 0; |
sk | 2179 | net/ipv4/tcp.c | if (sk->state == TCP_CLOSE || sk->done) |
sk | 2181 | net/ipv4/tcp.c | if (!sk->done) { |
sk | 2182 | net/ipv4/tcp.c | sk->done = 1; |
sk | 2188 | net/ipv4/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 2190 | net/ipv4/tcp.c | sk->done = 1; |
sk | 2193 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 2194 | net/ipv4/tcp.c | if (sk->urg_data & URG_VALID) |
sk | 2196 | net/ipv4/tcp.c | char c = sk->urg_data; |
sk | 2198 | net/ipv4/tcp.c | sk->urg_data = URG_READ; |
sk | 2200 | net/ipv4/tcp.c | release_sock(sk); |
sk | 2203 | net/ipv4/tcp.c | release_sock(sk); |
sk | 2220 | net/ipv4/tcp.c | static int tcp_read(struct sock *sk, unsigned char *to, |
sk | 2233 | net/ipv4/tcp.c | if (sk->state == TCP_LISTEN) |
sk | 2241 | net/ipv4/tcp.c | return tcp_read_urg(sk, nonblock, to, len, flags); |
sk | 2249 | net/ipv4/tcp.c | peek_seq = sk->copied_seq; |
sk | 2250 | net/ipv4/tcp.c | seq = &sk->copied_seq; |
sk | 2254 | net/ipv4/tcp.c | add_wait_queue(sk->sleep, &wait); |
sk | 2255 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 2265 | net/ipv4/tcp.c | if (copied && sk->urg_data && sk->urg_seq == *seq) |
sk | 2274 | net/ipv4/tcp.c | skb = skb_peek(&sk->receive_queue); |
sk | 2292 | net/ipv4/tcp.c | while (skb != (struct sk_buff *)&sk->receive_queue); |
sk | 2297 | net/ipv4/tcp.c | if (sk->err) |
sk | 2299 | net/ipv4/tcp.c | copied = -sk->err; |
sk | 2300 | net/ipv4/tcp.c | sk->err = 0; |
sk | 2304 | net/ipv4/tcp.c | if (sk->state == TCP_CLOSE) |
sk | 2306 | net/ipv4/tcp.c | if (!sk->done) |
sk | 2308 | net/ipv4/tcp.c | sk->done = 1; |
sk | 2315 | net/ipv4/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 2317 | net/ipv4/tcp.c | sk->done = 1; |
sk | 2327 | net/ipv4/tcp.c | cleanup_rbuf(sk); |
sk | 2328 | net/ipv4/tcp.c | release_sock(sk); |
sk | 2329 | net/ipv4/tcp.c | sk->socket->flags |= SO_WAITDATA; |
sk | 2331 | net/ipv4/tcp.c | sk->socket->flags &= ~SO_WAITDATA; |
sk | 2332 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 2362 | net/ipv4/tcp.c | if (sk->urg_data) |
sk | 2364 | net/ipv4/tcp.c | u32 urg_offset = sk->urg_seq - *seq; |
sk | 2369 | net/ipv4/tcp.c | if (!sk->urginline) |
sk | 2408 | net/ipv4/tcp.c | if (after(sk->copied_seq,sk->urg_seq)) |
sk | 2409 | net/ipv4/tcp.c | sk->urg_data = 0; |
sk | 2434 | net/ipv4/tcp.c | sk->shutdown |= RCV_SHUTDOWN; |
sk | 2438 | net/ipv4/tcp.c | remove_wait_queue(sk->sleep, &wait); |
sk | 2442 | net/ipv4/tcp.c | cleanup_rbuf(sk); |
sk | 2443 | net/ipv4/tcp.c | release_sock(sk); |
sk | 2454 | net/ipv4/tcp.c | static int tcp_close_state(struct sock *sk, int dead) |
sk | 2458 | net/ipv4/tcp.c | switch(sk->state) |
sk | 2470 | net/ipv4/tcp.c | ns=sk->state; |
sk | 2481 | net/ipv4/tcp.c | tcp_set_state(sk,ns); |
sk | 2494 | net/ipv4/tcp.c | int timer_active=del_timer(&sk->timer); |
sk | 2496 | net/ipv4/tcp.c | add_timer(&sk->timer); |
sk | 2498 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_FIN_TIMEOUT); |
sk | 2508 | net/ipv4/tcp.c | static void tcp_send_fin(struct sock *sk) |
sk | 2510 | net/ipv4/tcp.c | struct proto *prot =(struct proto *)sk->prot; |
sk | 2511 | net/ipv4/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
sk | 2517 | net/ipv4/tcp.c | release_sock(sk); /* in case the malloc sleeps. */ |
sk | 2519 | net/ipv4/tcp.c | buff = prot->wmalloc(sk, MAX_RESET_SIZE,1 , GFP_KERNEL); |
sk | 2520 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 2533 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 2534 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 2540 | net/ipv4/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
sk | 2541 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, |
sk | 2542 | net/ipv4/tcp.c | sizeof(struct tcphdr),sk->ip_tos,sk->ip_ttl); |
sk | 2552 | net/ipv4/tcp.c | prot->wfree(sk,buff); |
sk | 2553 | net/ipv4/tcp.c | sk->write_seq++; |
sk | 2554 | net/ipv4/tcp.c | t=del_timer(&sk->timer); |
sk | 2556 | net/ipv4/tcp.c | add_timer(&sk->timer); |
sk | 2558 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 2570 | net/ipv4/tcp.c | t1->seq = ntohl(sk->write_seq); |
sk | 2571 | net/ipv4/tcp.c | sk->write_seq++; |
sk | 2572 | net/ipv4/tcp.c | buff->h.seq = sk->write_seq; |
sk | 2574 | net/ipv4/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 2575 | net/ipv4/tcp.c | t1->window = ntohs(sk->window=tcp_select_window(sk)); |
sk | 2579 | net/ipv4/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 2586 | net/ipv4/tcp.c | if (skb_peek(&sk->write_queue) != NULL) |
sk | 2594 | net/ipv4/tcp.c | skb_queue_tail(&sk->write_queue, buff); |
sk | 2598 | net/ipv4/tcp.c | sk->sent_seq = sk->write_seq; |
sk | 2599 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
sk | 2600 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 2609 | net/ipv4/tcp.c | void tcp_shutdown(struct sock *sk, int how) |
sk | 2624 | net/ipv4/tcp.c | if (sk->state == TCP_FIN_WAIT1 || |
sk | 2625 | net/ipv4/tcp.c | sk->state == TCP_FIN_WAIT2 || |
sk | 2626 | net/ipv4/tcp.c | sk->state == TCP_CLOSING || |
sk | 2627 | net/ipv4/tcp.c | sk->state == TCP_LAST_ACK || |
sk | 2628 | net/ipv4/tcp.c | sk->state == TCP_TIME_WAIT || |
sk | 2629 | net/ipv4/tcp.c | sk->state == TCP_CLOSE || |
sk | 2630 | net/ipv4/tcp.c | sk->state == TCP_LISTEN |
sk | 2635 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 2641 | net/ipv4/tcp.c | sk->shutdown |= SEND_SHUTDOWN; |
sk | 2647 | net/ipv4/tcp.c | if (sk->partial) |
sk | 2648 | net/ipv4/tcp.c | tcp_send_partial(sk); |
sk | 2654 | net/ipv4/tcp.c | if(tcp_close_state(sk,0)) |
sk | 2655 | net/ipv4/tcp.c | tcp_send_fin(sk); |
sk | 2657 | net/ipv4/tcp.c | release_sock(sk); |
sk | 2662 | net/ipv4/tcp.c | tcp_recvfrom(struct sock *sk, unsigned char *to, |
sk | 2676 | net/ipv4/tcp.c | result=tcp_read(sk, to, to_len, nonblock, flags); |
sk | 2684 | net/ipv4/tcp.c | addr->sin_port = sk->dummy_th.dest; |
sk | 2685 | net/ipv4/tcp.c | addr->sin_addr.s_addr = sk->daddr; |
sk | 2719 | net/ipv4/tcp.c | buff->sk = NULL; |
sk | 2786 | net/ipv4/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
sk | 2815 | net/ipv4/tcp.c | sk->mtu=min(sk->mtu,ntohs(*(unsigned short *)ptr)); |
sk | 2828 | net/ipv4/tcp.c | sk->mtu=min(sk->mtu, 536); /* default MSS if none sent */ |
sk | 2831 | net/ipv4/tcp.c | sk->mss = min(sk->max_window >> 1, sk->mtu); |
sk | 2833 | net/ipv4/tcp.c | sk->mss = min(sk->max_window, sk->mtu); |
sk | 2871 | net/ipv4/tcp.c | static void tcp_conn_request(struct sock *sk, struct sk_buff *skb, |
sk | 2887 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 2889 | net/ipv4/tcp.c | sk->data_ready(sk,0); |
sk | 2893 | net/ipv4/tcp.c | if(sk->debug) |
sk | 2894 | net/ipv4/tcp.c | printk("Reset on %p: Connect on dead socket.\n",sk); |
sk | 2895 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
sk | 2906 | net/ipv4/tcp.c | if (sk->ack_backlog >= sk->max_ack_backlog) |
sk | 2930 | net/ipv4/tcp.c | memcpy(newsk, sk, sizeof(*newsk)); |
sk | 2933 | net/ipv4/tcp.c | sk->opt = (struct options*)kmalloc(sizeof(struct options)+opt->optlen, GFP_ATOMIC); |
sk | 2934 | net/ipv4/tcp.c | if (!sk->opt) { |
sk | 2940 | net/ipv4/tcp.c | if (ip_options_echo(sk->opt, opt, daddr, saddr, skb)) { |
sk | 2941 | net/ipv4/tcp.c | kfree_s(sk->opt, sizeof(struct options)+opt->optlen); |
sk | 2969 | net/ipv4/tcp.c | newsk->localroute = sk->localroute; |
sk | 3023 | net/ipv4/tcp.c | newsk->ip_ttl=sk->ip_ttl; |
sk | 3041 | net/ipv4/tcp.c | if (sk->user_mss) |
sk | 3042 | net/ipv4/tcp.c | newsk->mtu = sk->user_mss; |
sk | 3074 | net/ipv4/tcp.c | sk->err = ENOMEM; |
sk | 3084 | net/ipv4/tcp.c | buff->sk = newsk; |
sk | 3091 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &ndev, |
sk | 3092 | net/ipv4/tcp.c | IPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl); |
sk | 3100 | net/ipv4/tcp.c | sk->err = tmp; |
sk | 3106 | net/ipv4/tcp.c | skb->sk = sk; |
sk | 3143 | net/ipv4/tcp.c | skb->sk = newsk; |
sk | 3149 | net/ipv4/tcp.c | sk->rmem_alloc -= skb->truesize; |
sk | 3152 | net/ipv4/tcp.c | skb_queue_tail(&sk->receive_queue,skb); |
sk | 3153 | net/ipv4/tcp.c | sk->ack_backlog++; |
sk | 3159 | net/ipv4/tcp.c | static void tcp_close(struct sock *sk, int timeout) |
sk | 3166 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 3168 | net/ipv4/tcp.c | if(th_cache_sk==sk) |
sk | 3170 | net/ipv4/tcp.c | if(sk->state == TCP_LISTEN) |
sk | 3173 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_CLOSE); |
sk | 3174 | net/ipv4/tcp.c | tcp_close_pending(sk); |
sk | 3175 | net/ipv4/tcp.c | release_sock(sk); |
sk | 3179 | net/ipv4/tcp.c | sk->keepopen = 1; |
sk | 3180 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3182 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3183 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3195 | net/ipv4/tcp.c | while((skb=skb_dequeue(&sk->receive_queue))!=NULL) |
sk | 3201 | net/ipv4/tcp.c | if (sk->partial) |
sk | 3202 | net/ipv4/tcp.c | tcp_send_partial(sk); |
sk | 3213 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_CLOSE); /* Dead */ |
sk | 3217 | net/ipv4/tcp.c | if(tcp_close_state(sk,1)==1) |
sk | 3219 | net/ipv4/tcp.c | tcp_send_fin(sk); |
sk | 3222 | net/ipv4/tcp.c | release_sock(sk); |
sk | 3232 | net/ipv4/tcp.c | static void tcp_write_xmit(struct sock *sk) |
sk | 3241 | net/ipv4/tcp.c | if(sk->zapped) |
sk | 3252 | net/ipv4/tcp.c | while((skb = skb_peek(&sk->write_queue)) != NULL && |
sk | 3253 | net/ipv4/tcp.c | before(skb->h.seq, sk->window_seq + 1) && |
sk | 3254 | net/ipv4/tcp.c | (sk->retransmits == 0 || |
sk | 3255 | net/ipv4/tcp.c | sk->ip_xmit_timeout != TIME_WRITE || |
sk | 3256 | net/ipv4/tcp.c | before(skb->h.seq, sk->rcv_ack_seq + 1)) |
sk | 3257 | net/ipv4/tcp.c | && sk->packets_out < sk->cong_window) |
sk | 3266 | net/ipv4/tcp.c | if (before(skb->h.seq, sk->rcv_ack_seq +1)) |
sk | 3273 | net/ipv4/tcp.c | sk->retransmits = 0; |
sk | 3275 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3276 | net/ipv4/tcp.c | sk->write_space(sk); |
sk | 3294 | net/ipv4/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
sk | 3295 | net/ipv4/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
sk | 3297 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
sk | 3299 | net/ipv4/tcp.c | sk->sent_seq = skb->h.seq; |
sk | 3305 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, skb->free); |
sk | 3311 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 3321 | net/ipv4/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
sk | 3333 | net/ipv4/tcp.c | if(sk->zapped) |
sk | 3342 | net/ipv4/tcp.c | if (ntohs(th->window) > sk->max_window) |
sk | 3344 | net/ipv4/tcp.c | sk->max_window = ntohs(th->window); |
sk | 3348 | net/ipv4/tcp.c | sk->mss = min(sk->max_window>>1, sk->mtu); |
sk | 3350 | net/ipv4/tcp.c | sk->mss = min(sk->max_window, sk->mtu); |
sk | 3359 | net/ipv4/tcp.c | if (sk->retransmits && sk->ip_xmit_timeout == TIME_KEEPOPEN) |
sk | 3360 | net/ipv4/tcp.c | sk->retransmits = 0; |
sk | 3367 | net/ipv4/tcp.c | if (after(ack, sk->sent_seq) || before(ack, sk->rcv_ack_seq)) |
sk | 3369 | net/ipv4/tcp.c | if(sk->debug) |
sk | 3370 | net/ipv4/tcp.c | printk("Ack ignored %u %u\n",ack,sk->sent_seq); |
sk | 3376 | net/ipv4/tcp.c | if (after(ack, sk->sent_seq)) |
sk | 3385 | net/ipv4/tcp.c | if (sk->keepopen) |
sk | 3387 | net/ipv4/tcp.c | if(sk->ip_xmit_timeout==TIME_KEEPOPEN) |
sk | 3388 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 3404 | net/ipv4/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
sk | 3417 | net/ipv4/tcp.c | skb2 = sk->send_head; |
sk | 3418 | net/ipv4/tcp.c | sk->send_head = NULL; |
sk | 3419 | net/ipv4/tcp.c | sk->send_tail = NULL; |
sk | 3428 | net/ipv4/tcp.c | sk->window_seq = ack + ntohs(th->window); |
sk | 3435 | net/ipv4/tcp.c | if (after(skb->h.seq, sk->window_seq)) |
sk | 3437 | net/ipv4/tcp.c | if (sk->packets_out > 0) |
sk | 3438 | net/ipv4/tcp.c | sk->packets_out--; |
sk | 3446 | net/ipv4/tcp.c | skb_queue_head(&sk->write_queue,skb); |
sk | 3453 | net/ipv4/tcp.c | if (sk->send_head == NULL) |
sk | 3455 | net/ipv4/tcp.c | sk->send_head = skb; |
sk | 3456 | net/ipv4/tcp.c | sk->send_tail = skb; |
sk | 3460 | net/ipv4/tcp.c | sk->send_tail->link3 = skb; |
sk | 3461 | net/ipv4/tcp.c | sk->send_tail = skb; |
sk | 3473 | net/ipv4/tcp.c | if (sk->send_tail == NULL || sk->send_head == NULL) |
sk | 3475 | net/ipv4/tcp.c | sk->send_head = NULL; |
sk | 3476 | net/ipv4/tcp.c | sk->send_tail = NULL; |
sk | 3477 | net/ipv4/tcp.c | sk->packets_out= 0; |
sk | 3484 | net/ipv4/tcp.c | sk->window_seq = ack + ntohs(th->window); |
sk | 3490 | net/ipv4/tcp.c | if (sk->ip_xmit_timeout == TIME_WRITE && |
sk | 3491 | net/ipv4/tcp.c | sk->cong_window < 2048 && after(ack, sk->rcv_ack_seq)) |
sk | 3502 | net/ipv4/tcp.c | if (sk->cong_window < sk->ssthresh) |
sk | 3506 | net/ipv4/tcp.c | sk->cong_window++; |
sk | 3513 | net/ipv4/tcp.c | if (sk->cong_count >= sk->cong_window) |
sk | 3515 | net/ipv4/tcp.c | sk->cong_window++; |
sk | 3516 | net/ipv4/tcp.c | sk->cong_count = 0; |
sk | 3519 | net/ipv4/tcp.c | sk->cong_count++; |
sk | 3527 | net/ipv4/tcp.c | sk->rcv_ack_seq = ack; |
sk | 3535 | net/ipv4/tcp.c | if (sk->ip_xmit_timeout == TIME_PROBE0) |
sk | 3537 | net/ipv4/tcp.c | sk->retransmits = 0; /* Our probe was answered */ |
sk | 3543 | net/ipv4/tcp.c | if (skb_peek(&sk->write_queue) != NULL && /* should always be non-null */ |
sk | 3544 | net/ipv4/tcp.c | ! before (sk->window_seq, sk->write_queue.next->h.seq)) |
sk | 3546 | net/ipv4/tcp.c | sk->backoff = 0; |
sk | 3552 | net/ipv4/tcp.c | sk->rto = ((sk->rtt >> 2) + sk->mdev) >> 1; |
sk | 3553 | net/ipv4/tcp.c | if (sk->rto > 120*HZ) |
sk | 3554 | net/ipv4/tcp.c | sk->rto = 120*HZ; |
sk | 3555 | net/ipv4/tcp.c | if (sk->rto < 20) /* Was 1*HZ, then 1 - turns out we must allow about |
sk | 3558 | net/ipv4/tcp.c | sk->rto = 20; |
sk | 3566 | net/ipv4/tcp.c | while(sk->send_head != NULL) |
sk | 3569 | net/ipv4/tcp.c | if (sk->send_head->link3 && |
sk | 3570 | net/ipv4/tcp.c | after(sk->send_head->h.seq, sk->send_head->link3->h.seq)) |
sk | 3578 | net/ipv4/tcp.c | if (before(sk->send_head->h.seq, ack+1)) |
sk | 3581 | net/ipv4/tcp.c | if (sk->retransmits) |
sk | 3596 | net/ipv4/tcp.c | if (sk->send_head->link3) /* Any more queued retransmits? */ |
sk | 3597 | net/ipv4/tcp.c | sk->retransmits = 1; |
sk | 3599 | net/ipv4/tcp.c | sk->retransmits = 0; |
sk | 3617 | net/ipv4/tcp.c | if (sk->packets_out > 0) |
sk | 3618 | net/ipv4/tcp.c | sk->packets_out --; |
sk | 3622 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3623 | net/ipv4/tcp.c | sk->write_space(sk); |
sk | 3624 | net/ipv4/tcp.c | oskb = sk->send_head; |
sk | 3641 | net/ipv4/tcp.c | m -= (sk->rtt >> 3); /* m is now error in rtt est */ |
sk | 3642 | net/ipv4/tcp.c | sk->rtt += m; /* rtt = 7/8 rtt + 1/8 new */ |
sk | 3645 | net/ipv4/tcp.c | m -= (sk->mdev >> 2); /* similar update on mdev */ |
sk | 3646 | net/ipv4/tcp.c | sk->mdev += m; /* mdev = 3/4 mdev + 1/4 new */ |
sk | 3652 | net/ipv4/tcp.c | sk->rto = ((sk->rtt >> 2) + sk->mdev) >> 1; |
sk | 3653 | net/ipv4/tcp.c | if (sk->rto > 120*HZ) |
sk | 3654 | net/ipv4/tcp.c | sk->rto = 120*HZ; |
sk | 3655 | net/ipv4/tcp.c | if (sk->rto < 20) /* Was 1*HZ - keep .2 as minimum cos of the BSD delayed acks */ |
sk | 3656 | net/ipv4/tcp.c | sk->rto = 20; |
sk | 3657 | net/ipv4/tcp.c | sk->backoff = 0; |
sk | 3662 | net/ipv4/tcp.c | oskb = sk->send_head; |
sk | 3664 | net/ipv4/tcp.c | sk->send_head = oskb->link3; |
sk | 3665 | net/ipv4/tcp.c | if (sk->send_head == NULL) |
sk | 3667 | net/ipv4/tcp.c | sk->send_tail = NULL; |
sk | 3678 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3679 | net/ipv4/tcp.c | sk->write_space(sk); |
sk | 3700 | net/ipv4/tcp.c | if (skb_peek(&sk->write_queue) != NULL) |
sk | 3702 | net/ipv4/tcp.c | if (after (sk->window_seq+1, sk->write_queue.next->h.seq) && |
sk | 3703 | net/ipv4/tcp.c | (sk->retransmits == 0 || |
sk | 3704 | net/ipv4/tcp.c | sk->ip_xmit_timeout != TIME_WRITE || |
sk | 3705 | net/ipv4/tcp.c | before(sk->write_queue.next->h.seq, sk->rcv_ack_seq + 1)) |
sk | 3706 | net/ipv4/tcp.c | && sk->packets_out < sk->cong_window) |
sk | 3712 | net/ipv4/tcp.c | tcp_write_xmit(sk); |
sk | 3714 | net/ipv4/tcp.c | else if (before(sk->window_seq, sk->write_queue.next->h.seq) && |
sk | 3715 | net/ipv4/tcp.c | sk->send_head == NULL && |
sk | 3716 | net/ipv4/tcp.c | sk->ack_backlog == 0 && |
sk | 3717 | net/ipv4/tcp.c | sk->state != TCP_TIME_WAIT) |
sk | 3722 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_PROBE0, sk->rto); |
sk | 3740 | net/ipv4/tcp.c | switch(sk->state) { |
sk | 3746 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 3758 | net/ipv4/tcp.c | if (sk->send_head || skb_peek(&sk->write_queue) != NULL || sk->ack_backlog) { |
sk | 3759 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 3760 | net/ipv4/tcp.c | } else if (sk->keepopen) { |
sk | 3761 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 3763 | net/ipv4/tcp.c | del_timer(&sk->retransmit_timer); |
sk | 3764 | net/ipv4/tcp.c | sk->ip_xmit_timeout = 0; |
sk | 3775 | net/ipv4/tcp.c | if (sk->packets_out == 0 && sk->partial != NULL && |
sk | 3776 | net/ipv4/tcp.c | skb_peek(&sk->write_queue) == NULL && sk->send_head == NULL) |
sk | 3779 | net/ipv4/tcp.c | tcp_send_partial(sk); |
sk | 3790 | net/ipv4/tcp.c | if (sk->state == TCP_LAST_ACK) |
sk | 3792 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3793 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3794 | net/ipv4/tcp.c | if(sk->debug) |
sk | 3796 | net/ipv4/tcp.c | sk->rcv_ack_seq,sk->write_seq,sk->acked_seq,sk->fin_seq); |
sk | 3797 | net/ipv4/tcp.c | if (sk->rcv_ack_seq == sk->write_seq /*&& sk->acked_seq == sk->fin_seq*/) |
sk | 3800 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 3801 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3812 | net/ipv4/tcp.c | if (sk->state == TCP_FIN_WAIT1) |
sk | 3815 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3816 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3817 | net/ipv4/tcp.c | if (sk->rcv_ack_seq == sk->write_seq) |
sk | 3820 | net/ipv4/tcp.c | sk->shutdown |= SEND_SHUTDOWN; |
sk | 3821 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_FIN_WAIT2); |
sk | 3831 | net/ipv4/tcp.c | if (sk->state == TCP_CLOSING) |
sk | 3834 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3835 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3836 | net/ipv4/tcp.c | if (sk->rcv_ack_seq == sk->write_seq) |
sk | 3839 | net/ipv4/tcp.c | tcp_time_wait(sk); |
sk | 3847 | net/ipv4/tcp.c | if(sk->state==TCP_SYN_RECV) |
sk | 3849 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_ESTABLISHED); |
sk | 3850 | net/ipv4/tcp.c | tcp_options(sk,th); |
sk | 3851 | net/ipv4/tcp.c | sk->dummy_th.dest=th->source; |
sk | 3852 | net/ipv4/tcp.c | sk->copied_seq = sk->acked_seq; |
sk | 3853 | net/ipv4/tcp.c | if(!sk->dead) |
sk | 3854 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3855 | net/ipv4/tcp.c | if(sk->max_window==0) |
sk | 3857 | net/ipv4/tcp.c | sk->max_window=32; /* Sanity check */ |
sk | 3858 | net/ipv4/tcp.c | sk->mss=min(sk->max_window,sk->mtu); |
sk | 3891 | net/ipv4/tcp.c | if (((!flag) || (flag&4)) && sk->send_head != NULL && |
sk | 3892 | net/ipv4/tcp.c | (((flag&2) && sk->retransmits) || |
sk | 3893 | net/ipv4/tcp.c | (sk->send_head->when + sk->rto < jiffies))) |
sk | 3895 | net/ipv4/tcp.c | if(sk->send_head->when + sk->rto < jiffies) |
sk | 3896 | net/ipv4/tcp.c | tcp_retransmit(sk,0); |
sk | 3899 | net/ipv4/tcp.c | tcp_do_retransmit(sk, 1); |
sk | 3900 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 3924 | net/ipv4/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
sk | 3926 | net/ipv4/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
sk | 3928 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 3930 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 3931 | net/ipv4/tcp.c | sock_wake_async(sk->socket, 1); |
sk | 3934 | net/ipv4/tcp.c | switch(sk->state) |
sk | 3943 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE_WAIT); |
sk | 3945 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3960 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 3975 | net/ipv4/tcp.c | if(sk->ip_xmit_timeout != TIME_WRITE) |
sk | 3976 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 3977 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSING); |
sk | 3983 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 3984 | net/ipv4/tcp.c | sk->shutdown|=SHUTDOWN_MASK; |
sk | 3985 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_TIME_WAIT); |
sk | 3993 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_LAST_ACK); |
sk | 3996 | net/ipv4/tcp.c | reset_msl_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 4011 | net/ipv4/tcp.c | extern __inline__ int tcp_data(struct sk_buff *skb, struct sock *sk, |
sk | 4028 | net/ipv4/tcp.c | sk->bytes_rcv += skb->len; |
sk | 4037 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
sk | 4048 | net/ipv4/tcp.c | if(sk->shutdown & RCV_SHUTDOWN) |
sk | 4073 | net/ipv4/tcp.c | shut_seq=sk->acked_seq+1; /* Last byte */ |
sk | 4077 | net/ipv4/tcp.c | if(sk->debug) |
sk | 4079 | net/ipv4/tcp.c | sk, new_seq, shut_seq, sk->blog); |
sk | 4080 | net/ipv4/tcp.c | if(sk->dead) |
sk | 4082 | net/ipv4/tcp.c | sk->acked_seq = new_seq + th->fin; |
sk | 4083 | net/ipv4/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
sk | 4084 | net/ipv4/tcp.c | sk->prot, NULL, skb->dev, sk->ip_tos, sk->ip_ttl); |
sk | 4086 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 4087 | net/ipv4/tcp.c | sk->err = EPIPE; |
sk | 4088 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 4110 | net/ipv4/tcp.c | if (skb_peek(&sk->receive_queue) == NULL) /* Empty queue is easy case */ |
sk | 4112 | net/ipv4/tcp.c | skb_queue_head(&sk->receive_queue,skb); |
sk | 4117 | net/ipv4/tcp.c | for(skb1=sk->receive_queue.prev; ; skb1 = skb1->prev) |
sk | 4119 | net/ipv4/tcp.c | if(sk->debug) |
sk | 4124 | net/ipv4/tcp.c | printk("copied_seq = %d acked_seq = %d\n", sk->copied_seq, |
sk | 4125 | net/ipv4/tcp.c | sk->acked_seq); |
sk | 4159 | net/ipv4/tcp.c | if (skb1 == skb_peek(&sk->receive_queue)) |
sk | 4161 | net/ipv4/tcp.c | skb_queue_head(&sk->receive_queue, skb); |
sk | 4177 | net/ipv4/tcp.c | if (before(sk->acked_seq, sk->copied_seq)) |
sk | 4180 | net/ipv4/tcp.c | sk->acked_seq = sk->copied_seq; |
sk | 4189 | net/ipv4/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
sk | 4191 | net/ipv4/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
sk | 4195 | net/ipv4/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
sk | 4197 | net/ipv4/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
sk | 4200 | net/ipv4/tcp.c | sk->window = newwindow; |
sk | 4201 | net/ipv4/tcp.c | sk->acked_seq = th->ack_seq; |
sk | 4212 | net/ipv4/tcp.c | tcp_fin(skb,sk,skb->h.th); |
sk | 4216 | net/ipv4/tcp.c | skb2 != (struct sk_buff *)&sk->receive_queue; |
sk | 4219 | net/ipv4/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
sk | 4221 | net/ipv4/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
sk | 4223 | net/ipv4/tcp.c | newwindow = sk->window - |
sk | 4224 | net/ipv4/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
sk | 4227 | net/ipv4/tcp.c | sk->window = newwindow; |
sk | 4228 | net/ipv4/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
sk | 4237 | net/ipv4/tcp.c | tcp_fin(skb,sk,skb->h.th); |
sk | 4244 | net/ipv4/tcp.c | sk->ack_backlog = sk->max_ack_backlog; |
sk | 4256 | net/ipv4/tcp.c | if (!sk->delay_acks || |
sk | 4257 | net/ipv4/tcp.c | sk->ack_backlog >= sk->max_ack_backlog || |
sk | 4258 | net/ipv4/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
sk | 4263 | net/ipv4/tcp.c | sk->ack_backlog++; |
sk | 4264 | net/ipv4/tcp.c | if(sk->debug) |
sk | 4266 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 4286 | net/ipv4/tcp.c | while (sk->prot->rspace(sk) < sk->mtu) |
sk | 4288 | net/ipv4/tcp.c | skb1 = skb_peek(&sk->receive_queue); |
sk | 4307 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
sk | 4308 | net/ipv4/tcp.c | sk->ack_backlog++; |
sk | 4309 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 4313 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
sk | 4320 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 4322 | net/ipv4/tcp.c | if(sk->debug) |
sk | 4324 | net/ipv4/tcp.c | sk->data_ready(sk,0); |
sk | 4338 | net/ipv4/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
sk | 4347 | net/ipv4/tcp.c | if (after(sk->copied_seq, ptr)) |
sk | 4351 | net/ipv4/tcp.c | if (sk->urg_data && !after(ptr, sk->urg_seq)) |
sk | 4355 | net/ipv4/tcp.c | if (sk->proc != 0) { |
sk | 4356 | net/ipv4/tcp.c | if (sk->proc > 0) { |
sk | 4357 | net/ipv4/tcp.c | kill_proc(sk->proc, SIGURG, 1); |
sk | 4359 | net/ipv4/tcp.c | kill_pg(-sk->proc, SIGURG, 1); |
sk | 4362 | net/ipv4/tcp.c | sk->urg_data = URG_NOTYET; |
sk | 4363 | net/ipv4/tcp.c | sk->urg_seq = ptr; |
sk | 4370 | net/ipv4/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
sk | 4380 | net/ipv4/tcp.c | tcp_check_urg(sk,th); |
sk | 4386 | net/ipv4/tcp.c | if (sk->urg_data != URG_NOTYET) |
sk | 4393 | net/ipv4/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
sk | 4401 | net/ipv4/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
sk | 4402 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 4403 | net/ipv4/tcp.c | sk->data_ready(sk,0); |
sk | 4411 | net/ipv4/tcp.c | static struct sock *tcp_accept(struct sock *sk, int flags) |
sk | 4421 | net/ipv4/tcp.c | if (sk->state != TCP_LISTEN) |
sk | 4423 | net/ipv4/tcp.c | sk->err = EINVAL; |
sk | 4429 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 4431 | net/ipv4/tcp.c | while((skb = tcp_dequeue_established(sk)) == NULL) |
sk | 4436 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4437 | net/ipv4/tcp.c | sk->err = EAGAIN; |
sk | 4441 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4442 | net/ipv4/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 4446 | net/ipv4/tcp.c | sk->err = ERESTARTSYS; |
sk | 4449 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 4457 | net/ipv4/tcp.c | newsk = skb->sk; |
sk | 4460 | net/ipv4/tcp.c | sk->ack_backlog--; |
sk | 4461 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4470 | net/ipv4/tcp.c | static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len) |
sk | 4480 | net/ipv4/tcp.c | if (sk->state != TCP_CLOSE) |
sk | 4505 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 4506 | net/ipv4/tcp.c | sk->daddr = usin->sin_addr.s_addr; |
sk | 4507 | net/ipv4/tcp.c | sk->write_seq = tcp_init_seq(); |
sk | 4508 | net/ipv4/tcp.c | sk->window_seq = sk->write_seq; |
sk | 4509 | net/ipv4/tcp.c | sk->rcv_ack_seq = sk->write_seq -1; |
sk | 4510 | net/ipv4/tcp.c | sk->err = 0; |
sk | 4511 | net/ipv4/tcp.c | sk->dummy_th.dest = usin->sin_port; |
sk | 4512 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4514 | net/ipv4/tcp.c | buff = sk->prot->wmalloc(sk,MAX_SYN_SIZE,0, GFP_KERNEL); |
sk | 4519 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 4520 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 4522 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 4529 | net/ipv4/tcp.c | if (sk->localroute) |
sk | 4530 | net/ipv4/tcp.c | rt=ip_rt_local(sk->daddr, NULL, sk->saddr ? NULL : &sk->saddr); |
sk | 4532 | net/ipv4/tcp.c | rt=ip_rt_route(sk->daddr, NULL, sk->saddr ? NULL : &sk->saddr); |
sk | 4538 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 4539 | net/ipv4/tcp.c | IPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl); |
sk | 4542 | net/ipv4/tcp.c | sk->prot->wfree(sk, buff); |
sk | 4543 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4549 | net/ipv4/tcp.c | memcpy(t1,(void *)&(sk->dummy_th), sizeof(*t1)); |
sk | 4550 | net/ipv4/tcp.c | t1->seq = ntohl(sk->write_seq++); |
sk | 4551 | net/ipv4/tcp.c | sk->sent_seq = sk->write_seq; |
sk | 4552 | net/ipv4/tcp.c | buff->h.seq = sk->write_seq; |
sk | 4566 | net/ipv4/tcp.c | sk->window_clamp=rt->rt_window; |
sk | 4568 | net/ipv4/tcp.c | sk->window_clamp=0; |
sk | 4570 | net/ipv4/tcp.c | if (sk->user_mss) |
sk | 4571 | net/ipv4/tcp.c | sk->mtu = sk->user_mss; |
sk | 4573 | net/ipv4/tcp.c | sk->mtu = rt->rt_mss; |
sk | 4577 | net/ipv4/tcp.c | if ((sk->saddr ^ sk->daddr) & default_mask(sk->saddr)) |
sk | 4579 | net/ipv4/tcp.c | if ((sk->saddr ^ sk->daddr) & dev->pa_mask) |
sk | 4581 | net/ipv4/tcp.c | sk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr); |
sk | 4583 | net/ipv4/tcp.c | sk->mtu = MAX_WINDOW; |
sk | 4589 | net/ipv4/tcp.c | if(sk->mtu <32) |
sk | 4590 | net/ipv4/tcp.c | sk->mtu = 32; /* Sanity limit */ |
sk | 4592 | net/ipv4/tcp.c | sk->mtu = min(sk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr)); |
sk | 4601 | net/ipv4/tcp.c | ptr[2] = (sk->mtu) >> 8; |
sk | 4602 | net/ipv4/tcp.c | ptr[3] = (sk->mtu) & 0xff; |
sk | 4603 | net/ipv4/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, |
sk | 4604 | net/ipv4/tcp.c | sizeof(struct tcphdr) + 4, sk); |
sk | 4611 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_SYN_SENT); |
sk | 4613 | net/ipv4/tcp.c | sk->rto = rt->rt_irtt; |
sk | 4615 | net/ipv4/tcp.c | sk->rto = TCP_TIMEOUT_INIT; |
sk | 4616 | net/ipv4/tcp.c | sk->retransmit_timer.function=&retransmit_timer; |
sk | 4617 | net/ipv4/tcp.c | sk->retransmit_timer.data = (unsigned long)sk; |
sk | 4618 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); /* Timer for repeating the SYN until an answer */ |
sk | 4619 | net/ipv4/tcp.c | sk->retransmits = 0; /* Now works the right way instead of a hacked initial setting */ |
sk | 4621 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
sk | 4622 | net/ipv4/tcp.c | reset_xmit_timer(sk, TIME_WRITE, sk->rto); |
sk | 4626 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4632 | net/ipv4/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
sk | 4641 | net/ipv4/tcp.c | if (next_seq && !sk->window) |
sk | 4653 | net/ipv4/tcp.c | if (!after(next_seq+1, sk->acked_seq)) |
sk | 4656 | net/ipv4/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
sk | 4673 | net/ipv4/tcp.c | if (sk->state==TCP_SYN_SENT || sk->state==TCP_SYN_RECV) |
sk | 4675 | net/ipv4/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
sk | 4680 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
sk | 4688 | net/ipv4/tcp.c | static int tcp_std_reset(struct sock *sk, struct sk_buff *skb) |
sk | 4690 | net/ipv4/tcp.c | sk->zapped = 1; |
sk | 4691 | net/ipv4/tcp.c | sk->err = ECONNRESET; |
sk | 4692 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_SENT) |
sk | 4693 | net/ipv4/tcp.c | sk->err = ECONNREFUSED; |
sk | 4694 | net/ipv4/tcp.c | if (sk->state == TCP_CLOSE_WAIT) |
sk | 4695 | net/ipv4/tcp.c | sk->err = EPIPE; |
sk | 4700 | net/ipv4/tcp.c | if(sk->state!=TCP_TIME_WAIT) |
sk | 4702 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 4703 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 4706 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_CLOSE); |
sk | 4707 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 4709 | net/ipv4/tcp.c | if (!sk->dead) |
sk | 4710 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 4712 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4726 | net/ipv4/tcp.c | struct sock *sk; |
sk | 4744 | net/ipv4/tcp.c | sk=(struct sock *)th_cache_sk; |
sk | 4748 | net/ipv4/tcp.c | if(sk!=get_sock(&tcp_prot,th->dest, saddr, th->source, daddr)) |
sk | 4753 | net/ipv4/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
sk | 4758 | net/ipv4/tcp.c | th_cache_sk=sk; |
sk | 4770 | net/ipv4/tcp.c | if (sk!=NULL && (sk->zapped || sk->state==TCP_CLOSE)) |
sk | 4771 | net/ipv4/tcp.c | sk=NULL; |
sk | 4787 | net/ipv4/tcp.c | skb->sk = NULL; |
sk | 4798 | net/ipv4/tcp.c | if (sk == NULL) |
sk | 4804 | net/ipv4/tcp.c | skb->sk = NULL; |
sk | 4821 | net/ipv4/tcp.c | if (sk->inuse) |
sk | 4823 | net/ipv4/tcp.c | skb_queue_tail(&sk->back_log, skb); |
sk | 4827 | net/ipv4/tcp.c | sk->inuse = 1; |
sk | 4832 | net/ipv4/tcp.c | if (sk==NULL) |
sk | 4835 | net/ipv4/tcp.c | skb->sk = NULL; |
sk | 4842 | net/ipv4/tcp.c | if (!sk->prot) |
sk | 4853 | net/ipv4/tcp.c | if (sk->rmem_alloc + skb->truesize >= sk->rcvbuf) |
sk | 4856 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4860 | net/ipv4/tcp.c | skb->sk=sk; |
sk | 4861 | net/ipv4/tcp.c | sk->rmem_alloc += skb->truesize; |
sk | 4870 | net/ipv4/tcp.c | if(sk->state!=TCP_ESTABLISHED) /* Skip this lot for normal flow */ |
sk | 4877 | net/ipv4/tcp.c | if(sk->state==TCP_LISTEN) |
sk | 4880 | net/ipv4/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
sk | 4892 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4900 | net/ipv4/tcp.c | tcp_conn_request(sk, skb, daddr, saddr, opt, dev, tcp_init_seq()); |
sk | 4911 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4916 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
sk | 4919 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4928 | net/ipv4/tcp.c | if(sk->state==TCP_SYN_SENT) |
sk | 4934 | net/ipv4/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
sk | 4940 | net/ipv4/tcp.c | sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
sk | 4942 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4946 | net/ipv4/tcp.c | return tcp_std_reset(sk,skb); |
sk | 4952 | net/ipv4/tcp.c | release_sock(sk); |
sk | 4960 | net/ipv4/tcp.c | sk->acked_seq=th->seq+1; |
sk | 4961 | net/ipv4/tcp.c | sk->fin_seq=th->seq; |
sk | 4962 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
sk | 4963 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_ESTABLISHED); |
sk | 4964 | net/ipv4/tcp.c | tcp_options(sk,th); |
sk | 4965 | net/ipv4/tcp.c | sk->dummy_th.dest=th->source; |
sk | 4966 | net/ipv4/tcp.c | sk->copied_seq = sk->acked_seq; |
sk | 4967 | net/ipv4/tcp.c | if(!sk->dead) |
sk | 4969 | net/ipv4/tcp.c | sk->state_change(sk); |
sk | 4970 | net/ipv4/tcp.c | sock_wake_async(sk->socket, 0); |
sk | 4972 | net/ipv4/tcp.c | if(sk->max_window==0) |
sk | 4974 | net/ipv4/tcp.c | sk->max_window = 32; |
sk | 4975 | net/ipv4/tcp.c | sk->mss = min(sk->max_window, sk->mtu); |
sk | 4985 | net/ipv4/tcp.c | if(sk->saddr==saddr && sk->daddr==daddr && |
sk | 4986 | net/ipv4/tcp.c | sk->dummy_th.source==th->source && |
sk | 4987 | net/ipv4/tcp.c | sk->dummy_th.dest==th->dest) |
sk | 4990 | net/ipv4/tcp.c | return tcp_std_reset(sk,skb); |
sk | 4992 | net/ipv4/tcp.c | tcp_set_state(sk,TCP_SYN_RECV); |
sk | 5001 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5018 | net/ipv4/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
sk | 5019 | net/ipv4/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
sk | 5021 | net/ipv4/tcp.c | u32 seq = sk->write_seq; |
sk | 5022 | net/ipv4/tcp.c | if(sk->debug) |
sk | 5025 | net/ipv4/tcp.c | sk->rmem_alloc -= skb->truesize; |
sk | 5026 | net/ipv4/tcp.c | skb->sk = NULL; |
sk | 5027 | net/ipv4/tcp.c | sk->err=ECONNRESET; |
sk | 5028 | net/ipv4/tcp.c | tcp_set_state(sk, TCP_CLOSE); |
sk | 5029 | net/ipv4/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 5030 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5031 | net/ipv4/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
sk | 5032 | net/ipv4/tcp.c | if (sk && sk->state==TCP_LISTEN) |
sk | 5034 | net/ipv4/tcp.c | sk->inuse=1; |
sk | 5035 | net/ipv4/tcp.c | skb->sk = sk; |
sk | 5036 | net/ipv4/tcp.c | sk->rmem_alloc += skb->truesize; |
sk | 5037 | net/ipv4/tcp.c | tcp_conn_request(sk, skb, daddr, saddr,opt, dev,seq+128000); |
sk | 5038 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5053 | net/ipv4/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
sk | 5056 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5061 | net/ipv4/tcp.c | return tcp_std_reset(sk,skb); |
sk | 5070 | net/ipv4/tcp.c | return tcp_std_reset(sk,skb); |
sk | 5078 | net/ipv4/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
sk | 5084 | net/ipv4/tcp.c | if(sk->state==TCP_SYN_RECV) |
sk | 5086 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
sk | 5089 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5099 | net/ipv4/tcp.c | if(tcp_urg(sk, th, saddr, len)) |
sk | 5102 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5111 | net/ipv4/tcp.c | if(tcp_data(skb,sk, saddr, len)) |
sk | 5114 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5122 | net/ipv4/tcp.c | release_sock(sk); |
sk | 5131 | net/ipv4/tcp.c | static void tcp_write_wakeup(struct sock *sk) |
sk | 5138 | net/ipv4/tcp.c | if (sk->zapped) |
sk | 5147 | net/ipv4/tcp.c | if (sk->state != TCP_ESTABLISHED && |
sk | 5148 | net/ipv4/tcp.c | sk->state != TCP_CLOSE_WAIT && |
sk | 5149 | net/ipv4/tcp.c | sk->state != TCP_FIN_WAIT1 && |
sk | 5150 | net/ipv4/tcp.c | sk->state != TCP_LAST_ACK && |
sk | 5151 | net/ipv4/tcp.c | sk->state != TCP_CLOSING |
sk | 5156 | net/ipv4/tcp.c | if ( before(sk->sent_seq, sk->window_seq) && |
sk | 5157 | net/ipv4/tcp.c | (skb=skb_peek(&sk->write_queue))) |
sk | 5178 | net/ipv4/tcp.c | win_size = sk->window_seq - sk->sent_seq; |
sk | 5191 | net/ipv4/tcp.c | buff = sk->prot->wmalloc(sk, win_size + th->doff * 4 + |
sk | 5193 | net/ipv4/tcp.c | sk->prot->max_header + 15, |
sk | 5205 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 5206 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 5212 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 5213 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, buff->truesize, |
sk | 5214 | net/ipv4/tcp.c | sk->ip_tos,sk->ip_ttl); |
sk | 5217 | net/ipv4/tcp.c | sk->prot->wfree(sk, buff); |
sk | 5236 | net/ipv4/tcp.c | nth->ack_seq = ntohl(sk->acked_seq); |
sk | 5237 | net/ipv4/tcp.c | nth->window = ntohs(tcp_select_window(sk)); |
sk | 5256 | net/ipv4/tcp.c | buff->h.seq = sk->sent_seq + win_size; |
sk | 5257 | net/ipv4/tcp.c | sk->sent_seq = buff->h.seq; /* Hack */ |
sk | 5270 | net/ipv4/tcp.c | sk->sent_seq += win_size; |
sk | 5271 | net/ipv4/tcp.c | th->seq = htonl(sk->sent_seq); |
sk | 5295 | net/ipv4/tcp.c | tcp_send_check(nth, sk->saddr, sk->daddr, |
sk | 5296 | net/ipv4/tcp.c | nth->doff * 4 + win_size , sk); |
sk | 5300 | net/ipv4/tcp.c | buff = sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC); |
sk | 5305 | net/ipv4/tcp.c | buff->sk = sk; |
sk | 5306 | net/ipv4/tcp.c | buff->localroute = sk->localroute; |
sk | 5312 | net/ipv4/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 5313 | net/ipv4/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE,sk->ip_tos,sk->ip_ttl); |
sk | 5316 | net/ipv4/tcp.c | sk->prot->wfree(sk, buff); |
sk | 5321 | net/ipv4/tcp.c | memcpy(t1,(void *) &sk->dummy_th, sizeof(*t1)); |
sk | 5328 | net/ipv4/tcp.c | t1->seq = htonl(sk->sent_seq-1); |
sk | 5337 | net/ipv4/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 5338 | net/ipv4/tcp.c | t1->window = ntohs(tcp_select_window(sk)); |
sk | 5340 | net/ipv4/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 5348 | net/ipv4/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 5356 | net/ipv4/tcp.c | void tcp_send_probe0(struct sock *sk) |
sk | 5358 | net/ipv4/tcp.c | if (sk->zapped) |
sk | 5361 | net/ipv4/tcp.c | tcp_write_wakeup(sk); |
sk | 5363 | net/ipv4/tcp.c | sk->backoff++; |
sk | 5364 | net/ipv4/tcp.c | sk->rto = min(sk->rto << 1, 120*HZ); |
sk | 5365 | net/ipv4/tcp.c | reset_xmit_timer (sk, TIME_PROBE0, sk->rto); |
sk | 5366 | net/ipv4/tcp.c | sk->retransmits++; |
sk | 5367 | net/ipv4/tcp.c | sk->prot->retransmits ++; |
sk | 5374 | net/ipv4/tcp.c | int tcp_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen) |
sk | 5379 | net/ipv4/tcp.c | return ip_setsockopt(sk,level,optname,optval,optlen); |
sk | 5400 | net/ipv4/tcp.c | sk->user_mss=val; |
sk | 5403 | net/ipv4/tcp.c | sk->nonagle=(val==0)?0:1; |
sk | 5410 | net/ipv4/tcp.c | int tcp_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen) |
sk | 5415 | net/ipv4/tcp.c | return ip_getsockopt(sk,level,optname,optval,optlen); |
sk | 5420 | net/ipv4/tcp.c | val=sk->user_mss; |
sk | 5423 | net/ipv4/tcp.c | val=sk->nonagle; |
sk | 88 | net/ipv4/timer.c | struct sock *sk = (struct sock*)data; |
sk | 89 | net/ipv4/timer.c | int why = sk->timeout; |
sk | 96 | net/ipv4/timer.c | if (sk->inuse || in_bh) |
sk | 98 | net/ipv4/timer.c | sk->timer.expires = jiffies+10; |
sk | 99 | net/ipv4/timer.c | add_timer(&sk->timer); |
sk | 104 | net/ipv4/timer.c | sk->inuse = 1; |
sk | 109 | net/ipv4/timer.c | if (sk->ack_backlog && !sk->zapped) |
sk | 111 | net/ipv4/timer.c | sk->prot->read_wakeup (sk); |
sk | 112 | net/ipv4/timer.c | if (! sk->dead) |
sk | 113 | net/ipv4/timer.c | sk->data_ready(sk,0); |
sk | 121 | net/ipv4/timer.c | if (! sk->dead || sk->state != TCP_CLOSE) |
sk | 124 | net/ipv4/timer.c | release_sock (sk); |
sk | 127 | net/ipv4/timer.c | destroy_sock (sk); |
sk | 135 | net/ipv4/timer.c | if(sk->wmem_alloc!=0 || sk->rmem_alloc!=0) |
sk | 137 | net/ipv4/timer.c | sk->wmem_alloc++; /* So it DOESN'T go away */ |
sk | 138 | net/ipv4/timer.c | destroy_sock (sk); |
sk | 139 | net/ipv4/timer.c | sk->wmem_alloc--; /* Might now have hit 0 - fall through and do it again if so */ |
sk | 140 | net/ipv4/timer.c | sk->inuse = 0; /* This will be ok, the destroy won't totally work */ |
sk | 142 | net/ipv4/timer.c | if(sk->wmem_alloc==0 && sk->rmem_alloc==0) |
sk | 143 | net/ipv4/timer.c | destroy_sock(sk); /* Socket gone, DON'T update sk->inuse! */ |
sk | 147 | net/ipv4/timer.c | sk->state = TCP_CLOSE; |
sk | 148 | net/ipv4/timer.c | delete_timer (sk); |
sk | 150 | net/ipv4/timer.c | arp_destroy (sk->daddr, 0); |
sk | 151 | net/ipv4/timer.c | if (!sk->dead) |
sk | 152 | net/ipv4/timer.c | sk->state_change(sk); |
sk | 153 | net/ipv4/timer.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 154 | net/ipv4/timer.c | reset_timer (sk, TIME_DESTROY, TCP_DONE_TIME); |
sk | 155 | net/ipv4/timer.c | release_sock (sk); |
sk | 159 | net/ipv4/timer.c | release_sock (sk); |
sk | 137 | net/ipv4/udp.c | static int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len); |
sk | 157 | net/ipv4/udp.c | struct sock *sk; |
sk | 165 | net/ipv4/udp.c | sk = get_sock(&udp_prot, uh->source, daddr, uh->dest, saddr); |
sk | 167 | net/ipv4/udp.c | if (sk == NULL) |
sk | 172 | net/ipv4/udp.c | if (sk->cong_window > 1) |
sk | 173 | net/ipv4/udp.c | sk->cong_window = sk->cong_window/2; |
sk | 179 | net/ipv4/udp.c | sk->err = EPROTO; |
sk | 180 | net/ipv4/udp.c | sk->error_report(sk); |
sk | 198 | net/ipv4/udp.c | sk->err = icmp_err_convert[code].errno; |
sk | 199 | net/ipv4/udp.c | sk->error_report(sk); |
sk | 293 | net/ipv4/udp.c | static int udp_send(struct sock *sk, struct sockaddr_in *sin, |
sk | 304 | net/ipv4/udp.c | ufh.uh.source = sk->dummy_th.source; |
sk | 323 | net/ipv4/udp.c | if(sk->no_check) |
sk | 324 | net/ipv4/udp.c | a = ip_build_xmit(sk, udp_getfrag_nosum, &ufh, ulen, |
sk | 325 | net/ipv4/udp.c | sin->sin_addr.s_addr, saddr, sk->opt, rt, IPPROTO_UDP); |
sk | 327 | net/ipv4/udp.c | a = ip_build_xmit(sk, udp_getfrag, &ufh, ulen, |
sk | 328 | net/ipv4/udp.c | sin->sin_addr.s_addr, saddr, sk->opt, rt, IPPROTO_UDP); |
sk | 336 | net/ipv4/udp.c | static int udp_sendto(struct sock *sk, const unsigned char *from, int len, int noblock, |
sk | 364 | net/ipv4/udp.c | if (sk->state != TCP_ESTABLISHED) |
sk | 367 | net/ipv4/udp.c | sin.sin_port = sk->dummy_th.dest; |
sk | 368 | net/ipv4/udp.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 390 | net/ipv4/udp.c | if(!sk->broadcast && ip_chk_addr(usin->sin_addr.s_addr)==IS_BROADCAST) |
sk | 393 | net/ipv4/udp.c | sk->inuse = 1; |
sk | 396 | net/ipv4/udp.c | tmp = udp_send(sk, usin, from, len, flags, saddr); |
sk | 399 | net/ipv4/udp.c | release_sock(sk); |
sk | 407 | net/ipv4/udp.c | static int udp_write(struct sock *sk, const unsigned char *buff, int len, int noblock, |
sk | 410 | net/ipv4/udp.c | return(udp_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 418 | net/ipv4/udp.c | int udp_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 427 | net/ipv4/udp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 428 | net/ipv4/udp.c | amount = sk->prot->wspace(sk)/*/2*/; |
sk | 442 | net/ipv4/udp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 444 | net/ipv4/udp.c | skb = skb_peek(&sk->receive_queue); |
sk | 473 | net/ipv4/udp.c | int udp_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 494 | net/ipv4/udp.c | skb=skb_recv_datagram(sk,flags,noblock,&er); |
sk | 506 | net/ipv4/udp.c | sk->stamp=skb->stamp; |
sk | 517 | net/ipv4/udp.c | release_sock(sk); |
sk | 525 | net/ipv4/udp.c | int udp_read(struct sock *sk, unsigned char *buff, int len, int noblock, |
sk | 528 | net/ipv4/udp.c | return(udp_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 532 | net/ipv4/udp.c | int udp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len) |
sk | 544 | net/ipv4/udp.c | if(!sk->broadcast && ip_chk_addr(usin->sin_addr.s_addr)==IS_BROADCAST) |
sk | 547 | net/ipv4/udp.c | rt=(sk->localroute?ip_rt_local:ip_rt_route)((__u32)usin->sin_addr.s_addr, NULL, &sa); |
sk | 550 | net/ipv4/udp.c | sk->saddr = sa; /* Update source address */ |
sk | 551 | net/ipv4/udp.c | sk->daddr = usin->sin_addr.s_addr; |
sk | 552 | net/ipv4/udp.c | sk->dummy_th.dest = usin->sin_port; |
sk | 553 | net/ipv4/udp.c | sk->state = TCP_ESTABLISHED; |
sk | 555 | net/ipv4/udp.c | sk->ip_route_cache = rt; |
sk | 556 | net/ipv4/udp.c | sk->ip_route_stamp = rt_stamp; |
sk | 561 | net/ipv4/udp.c | static void udp_close(struct sock *sk, int timeout) |
sk | 563 | net/ipv4/udp.c | sk->inuse = 1; |
sk | 564 | net/ipv4/udp.c | sk->state = TCP_CLOSE; |
sk | 565 | net/ipv4/udp.c | if(uh_cache_sk==sk) |
sk | 567 | net/ipv4/udp.c | if (sk->dead) |
sk | 568 | net/ipv4/udp.c | destroy_sock(sk); |
sk | 570 | net/ipv4/udp.c | release_sock(sk); |
sk | 582 | net/ipv4/udp.c | struct sock *sk; |
sk | 650 | net/ipv4/udp.c | sk=get_sock_mcast(udp_prot.sock_array[ntohs(uh->dest)&(SOCK_ARRAY_SIZE-1)], uh->dest, |
sk | 652 | net/ipv4/udp.c | if(sk) |
sk | 658 | net/ipv4/udp.c | sknext=get_sock_mcast(sk->next, uh->dest, saddr, uh->source, daddr); |
sk | 664 | net/ipv4/udp.c | udp_deliver(sk, uh, skb1, dev,saddr,daddr,len); |
sk | 665 | net/ipv4/udp.c | sk=sknext; |
sk | 675 | net/ipv4/udp.c | sk=(struct sock *)uh_cache_sk; |
sk | 678 | net/ipv4/udp.c | sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr); |
sk | 683 | net/ipv4/udp.c | uh_cache_sk=sk; |
sk | 686 | net/ipv4/udp.c | if (sk == NULL) |
sk | 697 | net/ipv4/udp.c | skb->sk = NULL; |
sk | 701 | net/ipv4/udp.c | return udp_deliver(sk,uh,skb,dev, saddr, daddr, len); |
sk | 704 | net/ipv4/udp.c | static int udp_deliver(struct sock *sk, struct udphdr *uh, struct sk_buff *skb, struct device *dev, long saddr, long daddr, int len) |
sk | 706 | net/ipv4/udp.c | skb->sk = sk; |
sk | 725 | net/ipv4/udp.c | if (sock_queue_rcv_skb(sk,skb)<0) |
sk | 730 | net/ipv4/udp.c | skb->sk = NULL; |
sk | 732 | net/ipv4/udp.c | release_sock(sk); |
sk | 736 | net/ipv4/udp.c | release_sock(sk); |
sk | 135 | net/ipx/af_ipx.c | ipx_remove_socket(ipx_socket *sk) |
sk | 145 | net/ipx/af_ipx.c | intrfc = sk->ipx_intrfc; |
sk | 152 | net/ipx/af_ipx.c | if(s==sk) { |
sk | 159 | net/ipx/af_ipx.c | if(s->next==sk) { |
sk | 160 | net/ipx/af_ipx.c | s->next=sk->next; |
sk | 177 | net/ipx/af_ipx.c | ipx_destroy_socket(ipx_socket *sk) |
sk | 181 | net/ipx/af_ipx.c | ipx_remove_socket(sk); |
sk | 182 | net/ipx/af_ipx.c | while((skb=skb_dequeue(&sk->receive_queue))!=NULL) { |
sk | 186 | net/ipx/af_ipx.c | kfree_s(sk,sizeof(*sk)); |
sk | 232 | net/ipx/af_ipx.c | ipxitf_insert_socket(ipx_interface *intrfc, ipx_socket *sk) |
sk | 236 | net/ipx/af_ipx.c | sk->ipx_intrfc = intrfc; |
sk | 237 | net/ipx/af_ipx.c | sk->next = NULL; |
sk | 239 | net/ipx/af_ipx.c | intrfc->if_sklist = sk; |
sk | 243 | net/ipx/af_ipx.c | s->next = sk; |
sk | 532 | net/ipx/af_ipx.c | if (skb->sk != NULL) { |
sk | 536 | net/ipx/af_ipx.c | skb->sk->wmem_alloc += skb->truesize; |
sk | 992 | net/ipx/af_ipx.c | ipxrtr_route_packet(ipx_socket *sk, struct sockaddr_ipx *usipx, const void *ubuf, int len) |
sk | 1017 | net/ipx/af_ipx.c | if(size+sk->wmem_alloc>sk->sndbuf) return -EAGAIN; |
sk | 1022 | net/ipx/af_ipx.c | skb->sk=sk; |
sk | 1035 | net/ipx/af_ipx.c | ipx->ipx_source.net = sk->ipx_intrfc->if_netnum; |
sk | 1036 | net/ipx/af_ipx.c | memcpy(ipx->ipx_source.node, sk->ipx_intrfc->if_node, IPX_NODE_LEN); |
sk | 1037 | net/ipx/af_ipx.c | ipx->ipx_source.sock = sk->ipx_port; |
sk | 1285 | net/ipx/af_ipx.c | ipx_socket *sk; |
sk | 1288 | net/ipx/af_ipx.c | sk=(ipx_socket *)sock->data; |
sk | 1304 | net/ipx/af_ipx.c | sk->ipx_type=opt; |
sk | 1312 | net/ipx/af_ipx.c | return sock_setsockopt(sk,level,optname,optval,optlen); |
sk | 1322 | net/ipx/af_ipx.c | ipx_socket *sk; |
sk | 1326 | net/ipx/af_ipx.c | sk=(ipx_socket *)sock->data; |
sk | 1335 | net/ipx/af_ipx.c | val=sk->ipx_type; |
sk | 1343 | net/ipx/af_ipx.c | return sock_getsockopt(sk,level,optname,optval,optlen); |
sk | 1362 | net/ipx/af_ipx.c | static void def_callback1(struct sock *sk) |
sk | 1364 | net/ipx/af_ipx.c | if(!sk->dead) |
sk | 1365 | net/ipx/af_ipx.c | wake_up_interruptible(sk->sleep); |
sk | 1368 | net/ipx/af_ipx.c | static void def_callback2(struct sock *sk, int len) |
sk | 1370 | net/ipx/af_ipx.c | if(!sk->dead) |
sk | 1372 | net/ipx/af_ipx.c | wake_up_interruptible(sk->sleep); |
sk | 1373 | net/ipx/af_ipx.c | sock_wake_async(sk->socket, 1); |
sk | 1380 | net/ipx/af_ipx.c | ipx_socket *sk; |
sk | 1381 | net/ipx/af_ipx.c | sk=(ipx_socket *)kmalloc(sizeof(*sk),GFP_KERNEL); |
sk | 1382 | net/ipx/af_ipx.c | if(sk==NULL) |
sk | 1389 | net/ipx/af_ipx.c | kfree_s((void *)sk,sizeof(*sk)); |
sk | 1392 | net/ipx/af_ipx.c | sk->dead=0; |
sk | 1393 | net/ipx/af_ipx.c | sk->next=NULL; |
sk | 1394 | net/ipx/af_ipx.c | sk->broadcast=0; |
sk | 1395 | net/ipx/af_ipx.c | sk->rcvbuf=SK_RMEM_MAX; |
sk | 1396 | net/ipx/af_ipx.c | sk->sndbuf=SK_WMEM_MAX; |
sk | 1397 | net/ipx/af_ipx.c | sk->wmem_alloc=0; |
sk | 1398 | net/ipx/af_ipx.c | sk->rmem_alloc=0; |
sk | 1399 | net/ipx/af_ipx.c | sk->inuse=0; |
sk | 1400 | net/ipx/af_ipx.c | sk->shutdown=0; |
sk | 1401 | net/ipx/af_ipx.c | sk->prot=NULL; /* So we use default free mechanisms */ |
sk | 1402 | net/ipx/af_ipx.c | sk->err=0; |
sk | 1403 | net/ipx/af_ipx.c | skb_queue_head_init(&sk->receive_queue); |
sk | 1404 | net/ipx/af_ipx.c | skb_queue_head_init(&sk->write_queue); |
sk | 1405 | net/ipx/af_ipx.c | sk->send_head=NULL; |
sk | 1406 | net/ipx/af_ipx.c | skb_queue_head_init(&sk->back_log); |
sk | 1407 | net/ipx/af_ipx.c | sk->state=TCP_CLOSE; |
sk | 1408 | net/ipx/af_ipx.c | sk->socket=sock; |
sk | 1409 | net/ipx/af_ipx.c | sk->type=sock->type; |
sk | 1410 | net/ipx/af_ipx.c | sk->ipx_type=0; /* General user level IPX */ |
sk | 1411 | net/ipx/af_ipx.c | sk->debug=0; |
sk | 1412 | net/ipx/af_ipx.c | sk->ipx_intrfc = NULL; |
sk | 1413 | net/ipx/af_ipx.c | memset(&sk->ipx_dest_addr,'\0',sizeof(sk->ipx_dest_addr)); |
sk | 1414 | net/ipx/af_ipx.c | sk->ipx_port = 0; |
sk | 1415 | net/ipx/af_ipx.c | sk->mtu=IPX_MTU; |
sk | 1419 | net/ipx/af_ipx.c | sock->data=(void *)sk; |
sk | 1420 | net/ipx/af_ipx.c | sk->sleep=sock->wait; |
sk | 1423 | net/ipx/af_ipx.c | sk->state_change=def_callback1; |
sk | 1424 | net/ipx/af_ipx.c | sk->data_ready=def_callback2; |
sk | 1425 | net/ipx/af_ipx.c | sk->write_space=def_callback1; |
sk | 1426 | net/ipx/af_ipx.c | sk->error_report=def_callback1; |
sk | 1428 | net/ipx/af_ipx.c | sk->zapped=1; |
sk | 1434 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1435 | net/ipx/af_ipx.c | if(sk==NULL) |
sk | 1437 | net/ipx/af_ipx.c | if(!sk->dead) |
sk | 1438 | net/ipx/af_ipx.c | sk->state_change(sk); |
sk | 1439 | net/ipx/af_ipx.c | sk->dead=1; |
sk | 1441 | net/ipx/af_ipx.c | ipx_destroy_socket(sk); |
sk | 1470 | net/ipx/af_ipx.c | ipx_socket *sk; |
sk | 1474 | net/ipx/af_ipx.c | sk=(ipx_socket *)sock->data; |
sk | 1476 | net/ipx/af_ipx.c | if(sk->zapped==0) |
sk | 1499 | net/ipx/af_ipx.c | if(sk->debug) |
sk | 1505 | net/ipx/af_ipx.c | sk->ipx_port=addr->sipx_port; |
sk | 1506 | net/ipx/af_ipx.c | ipxitf_insert_socket(intrfc, sk); |
sk | 1507 | net/ipx/af_ipx.c | sk->zapped=0; |
sk | 1508 | net/ipx/af_ipx.c | if(sk->debug) |
sk | 1516 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1519 | net/ipx/af_ipx.c | sk->state = TCP_CLOSE; |
sk | 1526 | net/ipx/af_ipx.c | if(sk->ipx_port==0) |
sk | 1540 | net/ipx/af_ipx.c | sk->ipx_dest_addr.net=addr->sipx_network; |
sk | 1541 | net/ipx/af_ipx.c | sk->ipx_dest_addr.sock=addr->sipx_port; |
sk | 1542 | net/ipx/af_ipx.c | memcpy(sk->ipx_dest_addr.node,addr->sipx_node,IPX_NODE_LEN); |
sk | 1543 | net/ipx/af_ipx.c | sk->ipx_type=addr->sipx_type; |
sk | 1545 | net/ipx/af_ipx.c | sk->state=TCP_ESTABLISHED; |
sk | 1566 | net/ipx/af_ipx.c | ipx_socket *sk; |
sk | 1568 | net/ipx/af_ipx.c | sk=(ipx_socket *)sock->data; |
sk | 1573 | net/ipx/af_ipx.c | if(sk->state!=TCP_ESTABLISHED) |
sk | 1575 | net/ipx/af_ipx.c | addr=&sk->ipx_dest_addr; |
sk | 1580 | net/ipx/af_ipx.c | if (sk->ipx_intrfc != NULL) { |
sk | 1581 | net/ipx/af_ipx.c | sipx.sipx_network = sk->ipx_intrfc->if_netnum; |
sk | 1582 | net/ipx/af_ipx.c | memcpy(sipx.sipx_node, sk->ipx_intrfc->if_node, |
sk | 1588 | net/ipx/af_ipx.c | sipx.sipx_port = sk->ipx_port; |
sk | 1592 | net/ipx/af_ipx.c | sipx.sipx_type = sk->ipx_type; |
sk | 1697 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1702 | net/ipx/af_ipx.c | if (sk->zapped) return -EIO; /* Socket not bound */ |
sk | 1706 | net/ipx/af_ipx.c | if(sk->ipx_port == 0) { |
sk | 1721 | net/ipx/af_ipx.c | if(sk->state!=TCP_ESTABLISHED) |
sk | 1725 | net/ipx/af_ipx.c | usipx->sipx_type=sk->ipx_type; |
sk | 1726 | net/ipx/af_ipx.c | usipx->sipx_port=sk->ipx_dest_addr.sock; |
sk | 1727 | net/ipx/af_ipx.c | usipx->sipx_network=sk->ipx_dest_addr.net; |
sk | 1728 | net/ipx/af_ipx.c | memcpy(usipx->sipx_node,sk->ipx_dest_addr.node,IPX_NODE_LEN); |
sk | 1731 | net/ipx/af_ipx.c | retval = ipxrtr_route_packet(sk, usipx, ubuf, len); |
sk | 1745 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1753 | net/ipx/af_ipx.c | if(sk->err) |
sk | 1755 | net/ipx/af_ipx.c | er= -sk->err; |
sk | 1756 | net/ipx/af_ipx.c | sk->err=0; |
sk | 1760 | net/ipx/af_ipx.c | if (sk->zapped) |
sk | 1764 | net/ipx/af_ipx.c | skb=skb_recv_datagram(sk,flags,noblock,&er); |
sk | 1796 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1797 | net/ipx/af_ipx.c | if(sk->zapped) |
sk | 1808 | net/ipx/af_ipx.c | static int ipx_shutdown(struct socket *sk,int how) |
sk | 1815 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1817 | net/ipx/af_ipx.c | return datagram_select(sk,sel_type,wait); |
sk | 1824 | net/ipx/af_ipx.c | ipx_socket *sk=(ipx_socket *)sock->data; |
sk | 1832 | net/ipx/af_ipx.c | amount=sk->sndbuf-sk->wmem_alloc; |
sk | 1841 | net/ipx/af_ipx.c | if((skb=skb_peek(&sk->receive_queue))!=NULL) |
sk | 1869 | net/ipx/af_ipx.c | if (sk) |
sk | 1871 | net/ipx/af_ipx.c | if(sk->stamp.tv_sec==0) |
sk | 1876 | net/ipx/af_ipx.c | memcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval)); |
sk | 76 | net/netrom/af_netrom.c | static void nr_remove_socket(struct sock *sk) |
sk | 84 | net/netrom/af_netrom.c | if ((s = nr_list) == sk) { |
sk | 91 | net/netrom/af_netrom.c | if (s->next == sk) { |
sk | 92 | net/netrom/af_netrom.c | s->next = sk->next; |
sk | 141 | net/netrom/af_netrom.c | static void nr_insert_socket(struct sock *sk) |
sk | 148 | net/netrom/af_netrom.c | sk->next = nr_list; |
sk | 149 | net/netrom/af_netrom.c | nr_list = sk; |
sk | 242 | net/netrom/af_netrom.c | void nr_destroy_socket(struct sock *sk) /* Not static as its used by the timer */ |
sk | 250 | net/netrom/af_netrom.c | del_timer(&sk->timer); |
sk | 252 | net/netrom/af_netrom.c | nr_remove_socket(sk); |
sk | 253 | net/netrom/af_netrom.c | nr_clear_queues(sk); /* Flush the queues */ |
sk | 255 | net/netrom/af_netrom.c | while ((skb = skb_dequeue(&sk->receive_queue)) != NULL) { |
sk | 256 | net/netrom/af_netrom.c | if (skb->sk != sk) { /* A pending connection */ |
sk | 257 | net/netrom/af_netrom.c | skb->sk->dead = 1; /* Queue the unaccepted socket for death */ |
sk | 258 | net/netrom/af_netrom.c | nr_set_timer(skb->sk); |
sk | 259 | net/netrom/af_netrom.c | skb->sk->nr->state = NR_STATE_0; |
sk | 265 | net/netrom/af_netrom.c | if (sk->wmem_alloc || sk->rmem_alloc) { /* Defer: outstanding buffers */ |
sk | 266 | net/netrom/af_netrom.c | init_timer(&sk->timer); |
sk | 267 | net/netrom/af_netrom.c | sk->timer.expires = jiffies + 10 * HZ; |
sk | 268 | net/netrom/af_netrom.c | sk->timer.function = nr_destroy_timer; |
sk | 269 | net/netrom/af_netrom.c | sk->timer.data = (unsigned long)sk; |
sk | 270 | net/netrom/af_netrom.c | add_timer(&sk->timer); |
sk | 272 | net/netrom/af_netrom.c | kfree_s(sk->nr, sizeof(*sk->nr)); |
sk | 273 | net/netrom/af_netrom.c | kfree_s(sk, sizeof(*sk)); |
sk | 297 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 300 | net/netrom/af_netrom.c | sk = (struct sock *)sock->data; |
sk | 303 | net/netrom/af_netrom.c | return sock_setsockopt(sk, level, optname, optval, optlen); |
sk | 320 | net/netrom/af_netrom.c | sk->nr->rtt = (opt * PR_SLOWHZ) / 2; |
sk | 326 | net/netrom/af_netrom.c | sk->nr->t2 = opt * PR_SLOWHZ; |
sk | 332 | net/netrom/af_netrom.c | sk->nr->n2 = opt; |
sk | 336 | net/netrom/af_netrom.c | sk->nr->hdrincl = opt ? 1 : 0; |
sk | 347 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 351 | net/netrom/af_netrom.c | sk = (struct sock *)sock->data; |
sk | 354 | net/netrom/af_netrom.c | return sock_getsockopt(sk, level, optname, optval, optlen); |
sk | 361 | net/netrom/af_netrom.c | val = (sk->nr->t1 * 2) / PR_SLOWHZ; |
sk | 365 | net/netrom/af_netrom.c | val = sk->nr->t2 / PR_SLOWHZ; |
sk | 369 | net/netrom/af_netrom.c | val = sk->nr->n2; |
sk | 373 | net/netrom/af_netrom.c | val = sk->nr->hdrincl; |
sk | 395 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 397 | net/netrom/af_netrom.c | if (sk->type == SOCK_SEQPACKET && sk->state != TCP_LISTEN) { |
sk | 398 | net/netrom/af_netrom.c | memset(&sk->nr->user_addr, '\0', sizeof(ax25_address)); |
sk | 399 | net/netrom/af_netrom.c | sk->max_ack_backlog = backlog; |
sk | 400 | net/netrom/af_netrom.c | sk->state = TCP_LISTEN; |
sk | 407 | net/netrom/af_netrom.c | static void def_callback1(struct sock *sk) |
sk | 409 | net/netrom/af_netrom.c | if (!sk->dead) |
sk | 410 | net/netrom/af_netrom.c | wake_up_interruptible(sk->sleep); |
sk | 413 | net/netrom/af_netrom.c | static void def_callback2(struct sock *sk, int len) |
sk | 415 | net/netrom/af_netrom.c | if (!sk->dead) |
sk | 416 | net/netrom/af_netrom.c | wake_up_interruptible(sk->sleep); |
sk | 421 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 427 | net/netrom/af_netrom.c | if ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL) |
sk | 431 | net/netrom/af_netrom.c | kfree_s(sk, sizeof(*sk)); |
sk | 435 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->receive_queue); |
sk | 436 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->write_queue); |
sk | 437 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->back_log); |
sk | 439 | net/netrom/af_netrom.c | init_timer(&sk->timer); |
sk | 441 | net/netrom/af_netrom.c | sk->socket = sock; |
sk | 442 | net/netrom/af_netrom.c | sk->type = sock->type; |
sk | 443 | net/netrom/af_netrom.c | sk->protocol = protocol; |
sk | 444 | net/netrom/af_netrom.c | sk->dead = 0; |
sk | 445 | net/netrom/af_netrom.c | sk->next = NULL; |
sk | 446 | net/netrom/af_netrom.c | sk->broadcast = 0; |
sk | 447 | net/netrom/af_netrom.c | sk->allocation = GFP_KERNEL; |
sk | 448 | net/netrom/af_netrom.c | sk->rcvbuf = SK_RMEM_MAX; |
sk | 449 | net/netrom/af_netrom.c | sk->sndbuf = SK_WMEM_MAX; |
sk | 450 | net/netrom/af_netrom.c | sk->wmem_alloc = 0; |
sk | 451 | net/netrom/af_netrom.c | sk->rmem_alloc = 0; |
sk | 452 | net/netrom/af_netrom.c | sk->inuse = 0; |
sk | 453 | net/netrom/af_netrom.c | sk->debug = 0; |
sk | 454 | net/netrom/af_netrom.c | sk->destroy = 0; |
sk | 455 | net/netrom/af_netrom.c | sk->prot = NULL; /* So we use default free mechanisms */ |
sk | 456 | net/netrom/af_netrom.c | sk->err = 0; |
sk | 457 | net/netrom/af_netrom.c | sk->localroute = 0; |
sk | 458 | net/netrom/af_netrom.c | sk->send_head = NULL; |
sk | 459 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 460 | net/netrom/af_netrom.c | sk->shutdown = 0; |
sk | 461 | net/netrom/af_netrom.c | sk->priority = SOPRI_NORMAL; |
sk | 462 | net/netrom/af_netrom.c | sk->ack_backlog = 0; |
sk | 463 | net/netrom/af_netrom.c | sk->mtu = NETROM_MTU; /* 236 */ |
sk | 464 | net/netrom/af_netrom.c | sk->zapped = 1; |
sk | 465 | net/netrom/af_netrom.c | sk->window = nr_default.window; |
sk | 467 | net/netrom/af_netrom.c | sk->state_change = def_callback1; |
sk | 468 | net/netrom/af_netrom.c | sk->data_ready = def_callback2; |
sk | 469 | net/netrom/af_netrom.c | sk->write_space = def_callback1; |
sk | 470 | net/netrom/af_netrom.c | sk->error_report = def_callback1; |
sk | 473 | net/netrom/af_netrom.c | sock->data = (void *)sk; |
sk | 474 | net/netrom/af_netrom.c | sk->sleep = sock->wait; |
sk | 514 | net/netrom/af_netrom.c | nr->sk = sk; |
sk | 515 | net/netrom/af_netrom.c | sk->nr = nr; |
sk | 522 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 528 | net/netrom/af_netrom.c | if ((sk = (struct sock *)kmalloc(sizeof(*sk), GFP_ATOMIC)) == NULL) |
sk | 532 | net/netrom/af_netrom.c | kfree_s(sk, sizeof(*sk)); |
sk | 536 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->receive_queue); |
sk | 537 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->write_queue); |
sk | 538 | net/netrom/af_netrom.c | skb_queue_head_init(&sk->back_log); |
sk | 540 | net/netrom/af_netrom.c | init_timer(&sk->timer); |
sk | 542 | net/netrom/af_netrom.c | sk->type = osk->type; |
sk | 543 | net/netrom/af_netrom.c | sk->socket = osk->socket; |
sk | 544 | net/netrom/af_netrom.c | sk->dead = 0; |
sk | 545 | net/netrom/af_netrom.c | sk->next = NULL; |
sk | 546 | net/netrom/af_netrom.c | sk->priority = osk->priority; |
sk | 547 | net/netrom/af_netrom.c | sk->broadcast = 0; |
sk | 548 | net/netrom/af_netrom.c | sk->protocol = osk->protocol; |
sk | 549 | net/netrom/af_netrom.c | sk->rcvbuf = osk->rcvbuf; |
sk | 550 | net/netrom/af_netrom.c | sk->sndbuf = osk->sndbuf; |
sk | 551 | net/netrom/af_netrom.c | sk->wmem_alloc = 0; |
sk | 552 | net/netrom/af_netrom.c | sk->rmem_alloc = 0; |
sk | 553 | net/netrom/af_netrom.c | sk->inuse = 0; |
sk | 554 | net/netrom/af_netrom.c | sk->ack_backlog = 0; |
sk | 555 | net/netrom/af_netrom.c | sk->destroy = 0; |
sk | 556 | net/netrom/af_netrom.c | sk->prot = NULL; /* So we use default free mechanisms */ |
sk | 557 | net/netrom/af_netrom.c | sk->err = 0; |
sk | 558 | net/netrom/af_netrom.c | sk->localroute = 0; |
sk | 559 | net/netrom/af_netrom.c | sk->send_head = NULL; |
sk | 560 | net/netrom/af_netrom.c | sk->debug = osk->debug; |
sk | 561 | net/netrom/af_netrom.c | sk->state = TCP_ESTABLISHED; |
sk | 562 | net/netrom/af_netrom.c | sk->window = osk->window; |
sk | 563 | net/netrom/af_netrom.c | sk->shutdown = 0; |
sk | 564 | net/netrom/af_netrom.c | sk->mtu = osk->mtu; |
sk | 565 | net/netrom/af_netrom.c | sk->sleep = osk->sleep; |
sk | 566 | net/netrom/af_netrom.c | sk->zapped = osk->zapped; |
sk | 568 | net/netrom/af_netrom.c | sk->state_change = def_callback1; |
sk | 569 | net/netrom/af_netrom.c | sk->data_ready = def_callback2; |
sk | 570 | net/netrom/af_netrom.c | sk->write_space = def_callback1; |
sk | 571 | net/netrom/af_netrom.c | sk->error_report = def_callback1; |
sk | 597 | net/netrom/af_netrom.c | sk->nr = nr; |
sk | 598 | net/netrom/af_netrom.c | nr->sk = sk; |
sk | 600 | net/netrom/af_netrom.c | return sk; |
sk | 605 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)oldsock->data; |
sk | 607 | net/netrom/af_netrom.c | return nr_create(newsock, sk->protocol); |
sk | 612 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 614 | net/netrom/af_netrom.c | if (sk == NULL) return 0; |
sk | 616 | net/netrom/af_netrom.c | if (sk->type == SOCK_SEQPACKET) { |
sk | 617 | net/netrom/af_netrom.c | switch (sk->nr->state) { |
sk | 619 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 620 | net/netrom/af_netrom.c | sk->state_change(sk); |
sk | 621 | net/netrom/af_netrom.c | sk->dead = 1; |
sk | 622 | net/netrom/af_netrom.c | nr_destroy_socket(sk); |
sk | 626 | net/netrom/af_netrom.c | sk->nr->state = NR_STATE_0; |
sk | 627 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 628 | net/netrom/af_netrom.c | sk->state_change(sk); |
sk | 629 | net/netrom/af_netrom.c | sk->dead = 1; |
sk | 630 | net/netrom/af_netrom.c | nr_destroy_socket(sk); |
sk | 634 | net/netrom/af_netrom.c | nr_write_internal(sk, NR_DISCACK); |
sk | 635 | net/netrom/af_netrom.c | sk->nr->state = NR_STATE_0; |
sk | 636 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 637 | net/netrom/af_netrom.c | sk->state_change(sk); |
sk | 638 | net/netrom/af_netrom.c | sk->dead = 1; |
sk | 639 | net/netrom/af_netrom.c | nr_destroy_socket(sk); |
sk | 643 | net/netrom/af_netrom.c | nr_clear_queues(sk); |
sk | 644 | net/netrom/af_netrom.c | sk->nr->n2count = 0; |
sk | 645 | net/netrom/af_netrom.c | nr_write_internal(sk, NR_DISCREQ); |
sk | 646 | net/netrom/af_netrom.c | sk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk); |
sk | 647 | net/netrom/af_netrom.c | sk->nr->t2timer = 0; |
sk | 648 | net/netrom/af_netrom.c | sk->nr->t4timer = 0; |
sk | 649 | net/netrom/af_netrom.c | sk->nr->state = NR_STATE_2; |
sk | 650 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 651 | net/netrom/af_netrom.c | sk->state_change(sk); |
sk | 652 | net/netrom/af_netrom.c | sk->dead = 1; |
sk | 653 | net/netrom/af_netrom.c | sk->destroy = 1; |
sk | 660 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 661 | net/netrom/af_netrom.c | sk->state_change(sk); |
sk | 662 | net/netrom/af_netrom.c | sk->dead = 1; |
sk | 663 | net/netrom/af_netrom.c | nr_destroy_socket(sk); |
sk | 667 | net/netrom/af_netrom.c | sk->socket = NULL; /* Not used, but we should do this. **/ |
sk | 674 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 679 | net/netrom/af_netrom.c | sk = (struct sock *)sock->data; |
sk | 681 | net/netrom/af_netrom.c | if (sk->zapped == 0) |
sk | 688 | net/netrom/af_netrom.c | if (nr_find_listener(&addr->fsa_ax25.sax25_call, sk->type) != NULL) { |
sk | 689 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 696 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 707 | net/netrom/af_netrom.c | memcpy(&sk->nr->user_addr, &addr->fsa_digipeater[0], sizeof(ax25_address)); |
sk | 708 | net/netrom/af_netrom.c | memcpy(&sk->nr->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address)); |
sk | 718 | net/netrom/af_netrom.c | memcpy(&sk->nr->user_addr, user, sizeof(ax25_address)); |
sk | 719 | net/netrom/af_netrom.c | memcpy(&sk->nr->source_addr, source, sizeof(ax25_address)); |
sk | 722 | net/netrom/af_netrom.c | sk->nr->device = dev; |
sk | 723 | net/netrom/af_netrom.c | nr_insert_socket(sk); |
sk | 725 | net/netrom/af_netrom.c | sk->zapped = 0; |
sk | 727 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 736 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 741 | net/netrom/af_netrom.c | if (sk->state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { |
sk | 746 | net/netrom/af_netrom.c | if (sk->state == TCP_CLOSE && sock->state == SS_CONNECTING) { |
sk | 751 | net/netrom/af_netrom.c | if (sk->state == TCP_ESTABLISHED && sk->type == SOCK_SEQPACKET) |
sk | 754 | net/netrom/af_netrom.c | sk->state = TCP_CLOSE; |
sk | 763 | net/netrom/af_netrom.c | if (sk->zapped) { /* Must bind first - autobinding in this may or may not work */ |
sk | 764 | net/netrom/af_netrom.c | sk->zapped = 0; |
sk | 774 | net/netrom/af_netrom.c | memcpy(&sk->nr->user_addr, user, sizeof(ax25_address)); |
sk | 775 | net/netrom/af_netrom.c | memcpy(&sk->nr->source_addr, source, sizeof(ax25_address)); |
sk | 777 | net/netrom/af_netrom.c | sk->nr->device = dev; |
sk | 779 | net/netrom/af_netrom.c | nr_insert_socket(sk); /* Finish the bind */ |
sk | 782 | net/netrom/af_netrom.c | memcpy(&sk->nr->dest_addr, &addr->sax25_call, sizeof(ax25_address)); |
sk | 787 | net/netrom/af_netrom.c | sk->nr->my_index = circuit / 256; |
sk | 788 | net/netrom/af_netrom.c | sk->nr->my_id = circuit % 256; |
sk | 794 | net/netrom/af_netrom.c | sk->state = TCP_SYN_SENT; |
sk | 795 | net/netrom/af_netrom.c | nr_establish_data_link(sk); |
sk | 796 | net/netrom/af_netrom.c | sk->nr->state = NR_STATE_1; |
sk | 797 | net/netrom/af_netrom.c | nr_set_timer(sk); |
sk | 800 | net/netrom/af_netrom.c | if (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) |
sk | 808 | net/netrom/af_netrom.c | while (sk->state == TCP_SYN_SENT) { |
sk | 809 | net/netrom/af_netrom.c | interruptible_sleep_on(sk->sleep); |
sk | 816 | net/netrom/af_netrom.c | if (sk->state != TCP_ESTABLISHED) { |
sk | 819 | net/netrom/af_netrom.c | return -sk->err; /* Always set at this point */ |
sk | 836 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 845 | net/netrom/af_netrom.c | sk = (struct sock *)sock->data; |
sk | 847 | net/netrom/af_netrom.c | if (sk->type != SOCK_SEQPACKET) |
sk | 850 | net/netrom/af_netrom.c | if (sk->state != TCP_LISTEN) |
sk | 857 | net/netrom/af_netrom.c | if ((skb = skb_dequeue(&sk->receive_queue)) == NULL) { |
sk | 862 | net/netrom/af_netrom.c | interruptible_sleep_on(sk->sleep); |
sk | 870 | net/netrom/af_netrom.c | newsk = skb->sk; |
sk | 875 | net/netrom/af_netrom.c | skb->sk = NULL; |
sk | 877 | net/netrom/af_netrom.c | sk->ack_backlog--; |
sk | 887 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 889 | net/netrom/af_netrom.c | sk = (struct sock *)sock->data; |
sk | 892 | net/netrom/af_netrom.c | if (sk->state != TCP_ESTABLISHED) |
sk | 896 | net/netrom/af_netrom.c | memcpy(&sax->fsa_ax25.sax25_call, &sk->nr->user_addr, sizeof(ax25_address)); |
sk | 897 | net/netrom/af_netrom.c | memcpy(&sax->fsa_digipeater[0], &sk->nr->dest_addr, sizeof(ax25_address)); |
sk | 902 | net/netrom/af_netrom.c | memcpy(&sax->fsa_ax25.sax25_call, &sk->nr->source_addr, sizeof(ax25_address)); |
sk | 911 | net/netrom/af_netrom.c | struct sock *sk; |
sk | 917 | net/netrom/af_netrom.c | skb->sk = NULL; /* Initially we don't know who its for */ |
sk | 946 | net/netrom/af_netrom.c | if (((frametype & 0x0F) != NR_CONNREQ && (sk = nr_find_socket(circuit_index, circuit_id, SOCK_SEQPACKET)) != NULL) || |
sk | 947 | net/netrom/af_netrom.c | ((frametype & 0x0F) == NR_CONNREQ && (sk = nr_find_peer(circuit_index, circuit_id, SOCK_SEQPACKET)) != NULL)) { |
sk | 951 | net/netrom/af_netrom.c | sk->nr->bpqext = 1; |
sk | 953 | net/netrom/af_netrom.c | sk->nr->bpqext = 0; |
sk | 955 | net/netrom/af_netrom.c | return nr_process_rx_frame(sk, skb); |
sk | 961 | net/netrom/af_netrom.c | sk = nr_find_listener(dest, SOCK_SEQPACKET); |
sk | 965 | net/netrom/af_netrom.c | if (sk == NULL || sk->ack_backlog == sk->max_ack_backlog || (make = nr_make_new(sk)) == NULL) { |
sk | 972 | net/netrom/af_netrom.c | skb->sk = make; |
sk | 1010 | net/netrom/af_netrom.c | sk->ack_backlog++; |
sk | 1011 | net/netrom/af_netrom.c | make->pair = sk; |
sk | 1015 | net/netrom/af_netrom.c | skb_queue_head(&sk->receive_queue, skb); |
sk | 1019 | net/netrom/af_netrom.c | if (!sk->dead) |
sk | 1020 | net/netrom/af_netrom.c | sk->data_ready(sk, skb->len); |
sk | 1027 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1035 | net/netrom/af_netrom.c | if (sk->err) { |
sk | 1036 | net/netrom/af_netrom.c | err = sk->err; |
sk | 1037 | net/netrom/af_netrom.c | sk->err = 0; |
sk | 1044 | net/netrom/af_netrom.c | if (sk->zapped) |
sk | 1047 | net/netrom/af_netrom.c | if (sk->nr->device == NULL) |
sk | 1054 | net/netrom/af_netrom.c | if (sk->type == SOCK_SEQPACKET && memcmp(&sk->nr->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0) |
sk | 1059 | net/netrom/af_netrom.c | if (sk->state != TCP_ESTABLISHED) |
sk | 1062 | net/netrom/af_netrom.c | memcpy(&sax.sax25_call, &sk->nr->dest_addr, sizeof(ax25_address)); |
sk | 1065 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1069 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1074 | net/netrom/af_netrom.c | if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL) |
sk | 1077 | net/netrom/af_netrom.c | skb->sk = sk; |
sk | 1089 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1094 | net/netrom/af_netrom.c | *asmptr++ = sk->nr->your_index; |
sk | 1095 | net/netrom/af_netrom.c | *asmptr++ = sk->nr->your_id; |
sk | 1100 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1111 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1117 | net/netrom/af_netrom.c | if (sk->debug) |
sk | 1120 | net/netrom/af_netrom.c | if (sk->state != TCP_ESTABLISHED) { |
sk | 1125 | net/netrom/af_netrom.c | nr_output(sk, skb); /* Shove it onto the queue */ |
sk | 1160 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1166 | net/netrom/af_netrom.c | if (sk->err) { |
sk | 1168 | net/netrom/af_netrom.c | er = -sk->err; |
sk | 1169 | net/netrom/af_netrom.c | sk->err = 0; |
sk | 1181 | net/netrom/af_netrom.c | if (sk->type == SOCK_SEQPACKET && sk->state != TCP_ESTABLISHED) |
sk | 1185 | net/netrom/af_netrom.c | if ((skb = skb_recv_datagram(sk, flags, noblock, &er)) == NULL) |
sk | 1188 | net/netrom/af_netrom.c | if (!sk->nr->hdrincl) { |
sk | 1236 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1238 | net/netrom/af_netrom.c | if (sk->zapped) |
sk | 1249 | net/netrom/af_netrom.c | static int nr_shutdown(struct socket *sk, int how) |
sk | 1256 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1258 | net/netrom/af_netrom.c | return datagram_select(sk, sel_type, wait); |
sk | 1263 | net/netrom/af_netrom.c | struct sock *sk = (struct sock *)sock->data; |
sk | 1271 | net/netrom/af_netrom.c | amount = sk->sndbuf - sk->wmem_alloc; |
sk | 1281 | net/netrom/af_netrom.c | if ((skb = skb_peek(&sk->receive_queue)) != NULL) |
sk | 1290 | net/netrom/af_netrom.c | if (sk != NULL) { |
sk | 1291 | net/netrom/af_netrom.c | if (sk->stamp.tv_sec==0) |
sk | 1295 | net/netrom/af_netrom.c | memcpy_tofs((void *)arg, &sk->stamp, sizeof(struct timeval)); |
sk | 53 | net/netrom/nr_in.c | static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) |
sk | 58 | net/netrom/nr_in.c | sk->nr->fraglen += skb->len; |
sk | 59 | net/netrom/nr_in.c | skb_queue_tail(&sk->nr->frag_queue, skb); |
sk | 63 | net/netrom/nr_in.c | if (!more && sk->nr->fraglen > 0) { /* End of fragment */ |
sk | 64 | net/netrom/nr_in.c | sk->nr->fraglen += skb->len; |
sk | 65 | net/netrom/nr_in.c | skb_queue_tail(&sk->nr->frag_queue, skb); |
sk | 67 | net/netrom/nr_in.c | if ((skbn = alloc_skb(sk->nr->fraglen, GFP_ATOMIC)) == NULL) |
sk | 72 | net/netrom/nr_in.c | skbn->sk = sk; |
sk | 73 | net/netrom/nr_in.c | sk->rmem_alloc += skbn->truesize; |
sk | 76 | net/netrom/nr_in.c | skbo = skb_dequeue(&sk->nr->frag_queue); |
sk | 80 | net/netrom/nr_in.c | while ((skbo = skb_dequeue(&sk->nr->frag_queue)) != NULL) { |
sk | 86 | net/netrom/nr_in.c | sk->nr->fraglen = 0; |
sk | 89 | net/netrom/nr_in.c | return sock_queue_rcv_skb(sk, skbn); |
sk | 97 | net/netrom/nr_in.c | static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) |
sk | 102 | net/netrom/nr_in.c | nr_calculate_rtt(sk); |
sk | 103 | net/netrom/nr_in.c | sk->window = skb->data[20]; |
sk | 104 | net/netrom/nr_in.c | sk->nr->your_index = skb->data[17]; |
sk | 105 | net/netrom/nr_in.c | sk->nr->your_id = skb->data[18]; |
sk | 106 | net/netrom/nr_in.c | sk->nr->t1timer = 0; |
sk | 107 | net/netrom/nr_in.c | sk->nr->t2timer = 0; |
sk | 108 | net/netrom/nr_in.c | sk->nr->t4timer = 0; |
sk | 109 | net/netrom/nr_in.c | sk->nr->vs = 0; |
sk | 110 | net/netrom/nr_in.c | sk->nr->va = 0; |
sk | 111 | net/netrom/nr_in.c | sk->nr->vr = 0; |
sk | 112 | net/netrom/nr_in.c | sk->nr->vl = 0; |
sk | 113 | net/netrom/nr_in.c | sk->nr->state = NR_STATE_3; |
sk | 114 | net/netrom/nr_in.c | sk->state = TCP_ESTABLISHED; |
sk | 115 | net/netrom/nr_in.c | sk->nr->n2count = 0; |
sk | 117 | net/netrom/nr_in.c | if (!sk->dead) |
sk | 118 | net/netrom/nr_in.c | sk->state_change(sk); |
sk | 122 | net/netrom/nr_in.c | nr_clear_queues(sk); |
sk | 123 | net/netrom/nr_in.c | sk->nr->state = NR_STATE_0; |
sk | 124 | net/netrom/nr_in.c | sk->state = TCP_CLOSE; |
sk | 125 | net/netrom/nr_in.c | sk->err = ECONNREFUSED; |
sk | 126 | net/netrom/nr_in.c | if (!sk->dead) |
sk | 127 | net/netrom/nr_in.c | sk->state_change(sk); |
sk | 128 | net/netrom/nr_in.c | sk->dead = 1; |
sk | 143 | net/netrom/nr_in.c | static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) |
sk | 148 | net/netrom/nr_in.c | nr_write_internal(sk, NR_DISCACK); |
sk | 151 | net/netrom/nr_in.c | sk->nr->state = NR_STATE_0; |
sk | 152 | net/netrom/nr_in.c | sk->state = TCP_CLOSE; |
sk | 153 | net/netrom/nr_in.c | sk->err = 0; |
sk | 154 | net/netrom/nr_in.c | if (!sk->dead) |
sk | 155 | net/netrom/nr_in.c | sk->state_change(sk); |
sk | 156 | net/netrom/nr_in.c | sk->dead = 1; |
sk | 171 | net/netrom/nr_in.c | static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype) |
sk | 185 | net/netrom/nr_in.c | nr_write_internal(sk, NR_CONNACK); |
sk | 189 | net/netrom/nr_in.c | nr_clear_queues(sk); |
sk | 190 | net/netrom/nr_in.c | nr_write_internal(sk, NR_DISCACK); |
sk | 191 | net/netrom/nr_in.c | sk->nr->state = NR_STATE_0; |
sk | 192 | net/netrom/nr_in.c | sk->state = TCP_CLOSE; |
sk | 193 | net/netrom/nr_in.c | sk->err = 0; |
sk | 194 | net/netrom/nr_in.c | if (!sk->dead) |
sk | 195 | net/netrom/nr_in.c | sk->state_change(sk); |
sk | 196 | net/netrom/nr_in.c | sk->dead = 1; |
sk | 200 | net/netrom/nr_in.c | nr_clear_queues(sk); |
sk | 201 | net/netrom/nr_in.c | sk->nr->state = NR_STATE_0; |
sk | 202 | net/netrom/nr_in.c | sk->state = TCP_CLOSE; |
sk | 203 | net/netrom/nr_in.c | sk->err = ECONNRESET; |
sk | 204 | net/netrom/nr_in.c | if (!sk->dead) |
sk | 205 | net/netrom/nr_in.c | sk->state_change(sk); |
sk | 206 | net/netrom/nr_in.c | sk->dead = 1; |
sk | 214 | net/netrom/nr_in.c | sk->nr->condition |= PEER_RX_BUSY_CONDITION; |
sk | 215 | net/netrom/nr_in.c | sk->nr->t4timer = nr_default.busy_delay; |
sk | 217 | net/netrom/nr_in.c | sk->nr->condition &= ~PEER_RX_BUSY_CONDITION; |
sk | 218 | net/netrom/nr_in.c | sk->nr->t4timer = 0; |
sk | 220 | net/netrom/nr_in.c | if (!nr_validate_nr(sk, nr)) { |
sk | 224 | net/netrom/nr_in.c | nr_frames_acked(sk, nr); |
sk | 225 | net/netrom/nr_in.c | nr_send_nak_frame(sk); |
sk | 227 | net/netrom/nr_in.c | if (sk->nr->condition & PEER_RX_BUSY_CONDITION) { |
sk | 228 | net/netrom/nr_in.c | nr_frames_acked(sk, nr); |
sk | 230 | net/netrom/nr_in.c | nr_check_iframes_acked(sk, nr); |
sk | 244 | net/netrom/nr_in.c | sk->nr->condition |= PEER_RX_BUSY_CONDITION; |
sk | 245 | net/netrom/nr_in.c | sk->nr->t4timer = nr_default.busy_delay; |
sk | 247 | net/netrom/nr_in.c | sk->nr->condition &= ~PEER_RX_BUSY_CONDITION; |
sk | 248 | net/netrom/nr_in.c | sk->nr->t4timer = 0; |
sk | 250 | net/netrom/nr_in.c | if (nr_validate_nr(sk, nr)) { |
sk | 252 | net/netrom/nr_in.c | nr_frames_acked(sk, nr); |
sk | 253 | net/netrom/nr_in.c | nr_send_nak_frame(sk); |
sk | 255 | net/netrom/nr_in.c | if (sk->nr->condition & PEER_RX_BUSY_CONDITION) { |
sk | 256 | net/netrom/nr_in.c | nr_frames_acked(sk, nr); |
sk | 258 | net/netrom/nr_in.c | nr_check_iframes_acked(sk, nr); |
sk | 263 | net/netrom/nr_in.c | skb_queue_head(&sk->nr->reseq_queue, skb); |
sk | 264 | net/netrom/nr_in.c | if (sk->nr->condition & OWN_RX_BUSY_CONDITION) |
sk | 268 | net/netrom/nr_in.c | save_vr = sk->nr->vr; |
sk | 269 | net/netrom/nr_in.c | while ((skbn = skb_dequeue(&sk->nr->reseq_queue)) != NULL) { |
sk | 271 | net/netrom/nr_in.c | if (ns == sk->nr->vr) { |
sk | 272 | net/netrom/nr_in.c | if (nr_queue_rx_frame(sk, skbn, frametype & NR_MORE_FLAG) == 0) { |
sk | 273 | net/netrom/nr_in.c | sk->nr->vr = (sk->nr->vr + 1) % NR_MODULUS; |
sk | 275 | net/netrom/nr_in.c | sk->nr->condition |= OWN_RX_BUSY_CONDITION; |
sk | 278 | net/netrom/nr_in.c | } else if (nr_in_rx_window(sk, ns)) { |
sk | 286 | net/netrom/nr_in.c | skb_queue_tail(&sk->nr->reseq_queue, skbn); |
sk | 288 | net/netrom/nr_in.c | } while (save_vr != sk->nr->vr); |
sk | 292 | net/netrom/nr_in.c | if (((sk->nr->vl + sk->window) % NR_MODULUS) == sk->nr->vr) { |
sk | 293 | net/netrom/nr_in.c | nr_enquiry_response(sk); |
sk | 295 | net/netrom/nr_in.c | if (!(sk->nr->condition & ACK_PENDING_CONDITION)) { |
sk | 296 | net/netrom/nr_in.c | sk->nr->t2timer = sk->nr->t2; |
sk | 297 | net/netrom/nr_in.c | sk->nr->condition |= ACK_PENDING_CONDITION; |
sk | 310 | net/netrom/nr_in.c | int nr_process_rx_frame(struct sock *sk, struct sk_buff *skb) |
sk | 314 | net/netrom/nr_in.c | if (sk->nr->state == NR_STATE_0 && sk->dead) |
sk | 317 | net/netrom/nr_in.c | if (sk->nr->state != NR_STATE_1 && sk->nr->state != NR_STATE_2 && |
sk | 318 | net/netrom/nr_in.c | sk->nr->state != NR_STATE_3) { |
sk | 319 | net/netrom/nr_in.c | printk("nr_process_rx_frame: frame received - state: %d\n", sk->nr->state); |
sk | 323 | net/netrom/nr_in.c | del_timer(&sk->timer); |
sk | 327 | net/netrom/nr_in.c | switch (sk->nr->state) |
sk | 330 | net/netrom/nr_in.c | queued = nr_state1_machine(sk, skb, frametype); |
sk | 333 | net/netrom/nr_in.c | queued = nr_state2_machine(sk, skb, frametype); |
sk | 336 | net/netrom/nr_in.c | queued = nr_state3_machine(sk, skb, frametype); |
sk | 340 | net/netrom/nr_in.c | nr_set_timer(sk); |
sk | 49 | net/netrom/nr_out.c | void nr_output(struct sock *sk, struct sk_buff *skb) |
sk | 55 | net/netrom/nr_out.c | mtu = sk->nr->device->mtu; |
sk | 65 | net/netrom/nr_out.c | if ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, 0, &err)) == NULL) |
sk | 68 | net/netrom/nr_out.c | skbn->sk = sk; |
sk | 87 | net/netrom/nr_out.c | skb_queue_tail(&sk->write_queue, skbn); /* Throw it on the queue */ |
sk | 93 | net/netrom/nr_out.c | skb_queue_tail(&sk->write_queue, skb); /* Throw it on the queue */ |
sk | 96 | net/netrom/nr_out.c | if (sk->nr->state == NR_STATE_3) |
sk | 97 | net/netrom/nr_out.c | nr_kick(sk); |
sk | 104 | net/netrom/nr_out.c | static void nr_send_iframe(struct sock *sk, struct sk_buff *skb) |
sk | 109 | net/netrom/nr_out.c | skb->data[2] = sk->nr->vs; |
sk | 110 | net/netrom/nr_out.c | skb->data[3] = sk->nr->vr; |
sk | 112 | net/netrom/nr_out.c | if (sk->nr->condition & OWN_RX_BUSY_CONDITION) |
sk | 115 | net/netrom/nr_out.c | nr_transmit_buffer(sk, skb); |
sk | 118 | net/netrom/nr_out.c | void nr_send_nak_frame(struct sock *sk) |
sk | 122 | net/netrom/nr_out.c | if ((skb = skb_peek(&sk->nr->ack_queue)) == NULL) |
sk | 128 | net/netrom/nr_out.c | skbn->data[2] = sk->nr->va; |
sk | 129 | net/netrom/nr_out.c | skbn->data[3] = sk->nr->vr; |
sk | 131 | net/netrom/nr_out.c | if (sk->nr->condition & OWN_RX_BUSY_CONDITION) |
sk | 134 | net/netrom/nr_out.c | nr_transmit_buffer(sk, skbn); |
sk | 136 | net/netrom/nr_out.c | sk->nr->condition &= ~ACK_PENDING_CONDITION; |
sk | 137 | net/netrom/nr_out.c | sk->nr->vl = sk->nr->vr; |
sk | 138 | net/netrom/nr_out.c | sk->nr->t1timer = 0; |
sk | 141 | net/netrom/nr_out.c | void nr_kick(struct sock *sk) |
sk | 147 | net/netrom/nr_out.c | del_timer(&sk->timer); |
sk | 149 | net/netrom/nr_out.c | start = (skb_peek(&sk->nr->ack_queue) == NULL) ? sk->nr->va : sk->nr->vs; |
sk | 150 | net/netrom/nr_out.c | end = (sk->nr->va + sk->window) % NR_MODULUS; |
sk | 152 | net/netrom/nr_out.c | if (!(sk->nr->condition & PEER_RX_BUSY_CONDITION) && |
sk | 154 | net/netrom/nr_out.c | skb_peek(&sk->write_queue) != NULL) { |
sk | 156 | net/netrom/nr_out.c | sk->nr->vs = start; |
sk | 166 | net/netrom/nr_out.c | skb = skb_dequeue(&sk->write_queue); |
sk | 170 | net/netrom/nr_out.c | skb_queue_head(&sk->write_queue, skb); |
sk | 174 | net/netrom/nr_out.c | next = (sk->nr->vs + 1) % NR_MODULUS; |
sk | 180 | net/netrom/nr_out.c | nr_send_iframe(sk, skbn); |
sk | 182 | net/netrom/nr_out.c | sk->nr->vs = next; |
sk | 187 | net/netrom/nr_out.c | skb_queue_tail(&sk->nr->ack_queue, skb); |
sk | 189 | net/netrom/nr_out.c | } while (!last && (skb = skb_dequeue(&sk->write_queue)) != NULL); |
sk | 191 | net/netrom/nr_out.c | sk->nr->vl = sk->nr->vr; |
sk | 192 | net/netrom/nr_out.c | sk->nr->condition &= ~ACK_PENDING_CONDITION; |
sk | 194 | net/netrom/nr_out.c | if (sk->nr->t1timer == 0) { |
sk | 195 | net/netrom/nr_out.c | sk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk); |
sk | 199 | net/netrom/nr_out.c | nr_set_timer(sk); |
sk | 202 | net/netrom/nr_out.c | void nr_transmit_buffer(struct sock *sk, struct sk_buff *skb) |
sk | 211 | net/netrom/nr_out.c | memcpy(dptr, &sk->nr->source_addr, sizeof(ax25_address)); |
sk | 217 | net/netrom/nr_out.c | memcpy(dptr, &sk->nr->dest_addr, sizeof(ax25_address)); |
sk | 230 | net/netrom/nr_out.c | sk->state = TCP_CLOSE; |
sk | 231 | net/netrom/nr_out.c | sk->err = ENETUNREACH; |
sk | 232 | net/netrom/nr_out.c | if (!sk->dead) |
sk | 233 | net/netrom/nr_out.c | sk->state_change(sk); |
sk | 234 | net/netrom/nr_out.c | sk->dead = 1; |
sk | 243 | net/netrom/nr_out.c | void nr_establish_data_link(struct sock *sk) |
sk | 245 | net/netrom/nr_out.c | sk->nr->condition = 0x00; |
sk | 246 | net/netrom/nr_out.c | sk->nr->n2count = 0; |
sk | 248 | net/netrom/nr_out.c | nr_write_internal(sk, NR_CONNREQ); |
sk | 250 | net/netrom/nr_out.c | sk->nr->t2timer = 0; |
sk | 251 | net/netrom/nr_out.c | sk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk); |
sk | 257 | net/netrom/nr_out.c | void nr_enquiry_response(struct sock *sk) |
sk | 261 | net/netrom/nr_out.c | if (sk->nr->condition & OWN_RX_BUSY_CONDITION) { |
sk | 264 | net/netrom/nr_out.c | if (skb_peek(&sk->nr->reseq_queue) != NULL) { |
sk | 269 | net/netrom/nr_out.c | nr_write_internal(sk, frametype); |
sk | 271 | net/netrom/nr_out.c | sk->nr->vl = sk->nr->vr; |
sk | 272 | net/netrom/nr_out.c | sk->nr->condition &= ~ACK_PENDING_CONDITION; |
sk | 275 | net/netrom/nr_out.c | void nr_check_iframes_acked(struct sock *sk, unsigned short nr) |
sk | 277 | net/netrom/nr_out.c | if (sk->nr->vs == nr) { |
sk | 278 | net/netrom/nr_out.c | nr_frames_acked(sk, nr); |
sk | 279 | net/netrom/nr_out.c | nr_calculate_rtt(sk); |
sk | 280 | net/netrom/nr_out.c | sk->nr->t1timer = 0; |
sk | 281 | net/netrom/nr_out.c | sk->nr->n2count = 0; |
sk | 283 | net/netrom/nr_out.c | if (sk->nr->va != nr) { |
sk | 284 | net/netrom/nr_out.c | nr_frames_acked(sk, nr); |
sk | 285 | net/netrom/nr_out.c | sk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk); |
sk | 47 | net/netrom/nr_subr.c | void nr_clear_queues(struct sock *sk) |
sk | 51 | net/netrom/nr_subr.c | while ((skb = skb_dequeue(&sk->write_queue)) != NULL) { |
sk | 52 | net/netrom/nr_subr.c | skb->sk = sk; |
sk | 57 | net/netrom/nr_subr.c | while ((skb = skb_dequeue(&sk->nr->ack_queue)) != NULL) { |
sk | 58 | net/netrom/nr_subr.c | skb->sk = sk; |
sk | 63 | net/netrom/nr_subr.c | while ((skb = skb_dequeue(&sk->nr->reseq_queue)) != NULL) { |
sk | 67 | net/netrom/nr_subr.c | while ((skb = skb_dequeue(&sk->nr->frag_queue)) != NULL) { |
sk | 77 | net/netrom/nr_subr.c | void nr_frames_acked(struct sock *sk, unsigned short nr) |
sk | 84 | net/netrom/nr_subr.c | if (sk->nr->va != nr) { |
sk | 85 | net/netrom/nr_subr.c | while (skb_peek(&sk->nr->ack_queue) != NULL && sk->nr->va != nr) { |
sk | 86 | net/netrom/nr_subr.c | skb = skb_dequeue(&sk->nr->ack_queue); |
sk | 87 | net/netrom/nr_subr.c | skb->sk = sk; |
sk | 90 | net/netrom/nr_subr.c | sk->nr->va = (sk->nr->va + 1) % NR_MODULUS; |
sk | 100 | net/netrom/nr_subr.c | void nr_requeue_frames(struct sock *sk) |
sk | 104 | net/netrom/nr_subr.c | while ((skb = skb_dequeue(&sk->nr->ack_queue)) != NULL) { |
sk | 106 | net/netrom/nr_subr.c | skb_queue_head(&sk->write_queue, skb); |
sk | 117 | net/netrom/nr_subr.c | int nr_validate_nr(struct sock *sk, unsigned short nr) |
sk | 119 | net/netrom/nr_subr.c | unsigned short vc = sk->nr->va; |
sk | 121 | net/netrom/nr_subr.c | while (vc != sk->nr->vs) { |
sk | 126 | net/netrom/nr_subr.c | if (nr == sk->nr->vs) return 1; |
sk | 134 | net/netrom/nr_subr.c | int nr_in_rx_window(struct sock *sk, unsigned short ns) |
sk | 136 | net/netrom/nr_subr.c | unsigned short vc = sk->nr->vr; |
sk | 137 | net/netrom/nr_subr.c | unsigned short vt = (sk->nr->vl + sk->window) % NR_MODULUS; |
sk | 151 | net/netrom/nr_subr.c | void nr_write_internal(struct sock *sk, int frametype) |
sk | 164 | net/netrom/nr_subr.c | len += (sk->nr->bpqext) ? 2 : 1; |
sk | 188 | net/netrom/nr_subr.c | timeout = (sk->nr->rtt / PR_SLOWHZ) * 2; |
sk | 189 | net/netrom/nr_subr.c | *dptr++ = sk->nr->my_index; |
sk | 190 | net/netrom/nr_subr.c | *dptr++ = sk->nr->my_id; |
sk | 194 | net/netrom/nr_subr.c | *dptr++ = sk->window; |
sk | 195 | net/netrom/nr_subr.c | memcpy(dptr, &sk->nr->user_addr, sizeof(ax25_address)); |
sk | 200 | net/netrom/nr_subr.c | memcpy(dptr, &sk->nr->source_addr, sizeof(ax25_address)); |
sk | 210 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_index; |
sk | 211 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_id; |
sk | 212 | net/netrom/nr_subr.c | *dptr++ = sk->nr->my_index; |
sk | 213 | net/netrom/nr_subr.c | *dptr++ = sk->nr->my_id; |
sk | 215 | net/netrom/nr_subr.c | *dptr++ = sk->window; |
sk | 216 | net/netrom/nr_subr.c | if (sk->nr->bpqext) *dptr++ = nr_default.ttl; |
sk | 221 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_index; |
sk | 222 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_id; |
sk | 229 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_index; |
sk | 230 | net/netrom/nr_subr.c | *dptr++ = sk->nr->your_id; |
sk | 232 | net/netrom/nr_subr.c | *dptr++ = sk->nr->vr; |
sk | 239 | net/netrom/nr_subr.c | nr_transmit_buffer(sk, skb); |
sk | 283 | net/netrom/nr_subr.c | skbn->sk = NULL; |
sk | 292 | net/netrom/nr_subr.c | unsigned short nr_calculate_t1(struct sock *sk) |
sk | 296 | net/netrom/nr_subr.c | for (t = 2, n = 0; n < sk->nr->n2count; n++) |
sk | 301 | net/netrom/nr_subr.c | return t * sk->nr->rtt; |
sk | 307 | net/netrom/nr_subr.c | void nr_calculate_rtt(struct sock *sk) |
sk | 309 | net/netrom/nr_subr.c | if (sk->nr->t1timer > 0 && sk->nr->n2count == 0) |
sk | 310 | net/netrom/nr_subr.c | sk->nr->rtt = (9 * sk->nr->rtt + sk->nr->t1 - sk->nr->t1timer) / 10; |
sk | 314 | net/netrom/nr_subr.c | if (sk->nr->rtt < (NR_T1CLAMPLO)) |
sk | 315 | net/netrom/nr_subr.c | sk->nr->rtt = (NR_T1CLAMPLO); |
sk | 317 | net/netrom/nr_subr.c | if (sk->nr->rtt == 0) |
sk | 318 | net/netrom/nr_subr.c | sk->nr->rtt = PR_SLOWHZ; |
sk | 322 | net/netrom/nr_subr.c | if (sk->nr->rtt > (NR_T1CLAMPHI)) |
sk | 323 | net/netrom/nr_subr.c | sk->nr->rtt = (NR_T1CLAMPHI); |
sk | 48 | net/netrom/nr_timer.c | void nr_set_timer(struct sock *sk) |
sk | 54 | net/netrom/nr_timer.c | del_timer(&sk->timer); |
sk | 57 | net/netrom/nr_timer.c | sk->timer.next = sk->timer.prev = NULL; |
sk | 58 | net/netrom/nr_timer.c | sk->timer.data = (unsigned long)sk; |
sk | 59 | net/netrom/nr_timer.c | sk->timer.function = &nr_timer; |
sk | 61 | net/netrom/nr_timer.c | sk->timer.expires = jiffies+10; |
sk | 62 | net/netrom/nr_timer.c | add_timer(&sk->timer); |
sk | 65 | net/netrom/nr_timer.c | static void nr_reset_timer(struct sock *sk) |
sk | 71 | net/netrom/nr_timer.c | del_timer(&sk->timer); |
sk | 74 | net/netrom/nr_timer.c | sk->timer.data = (unsigned long)sk; |
sk | 75 | net/netrom/nr_timer.c | sk->timer.function = &nr_timer; |
sk | 76 | net/netrom/nr_timer.c | sk->timer.expires = jiffies+10; |
sk | 77 | net/netrom/nr_timer.c | add_timer(&sk->timer); |
sk | 88 | net/netrom/nr_timer.c | struct sock *sk = (struct sock *)param; |
sk | 90 | net/netrom/nr_timer.c | switch (sk->nr->state) { |
sk | 94 | net/netrom/nr_timer.c | if (sk->destroy || (sk->state == TCP_LISTEN && sk->dead)) { |
sk | 95 | net/netrom/nr_timer.c | del_timer(&sk->timer); |
sk | 96 | net/netrom/nr_timer.c | nr_destroy_socket(sk); |
sk | 105 | net/netrom/nr_timer.c | if (sk->rmem_alloc < (sk->rcvbuf / 2) && (sk->nr->condition & OWN_RX_BUSY_CONDITION)) { |
sk | 106 | net/netrom/nr_timer.c | sk->nr->condition &= ~OWN_RX_BUSY_CONDITION; |
sk | 107 | net/netrom/nr_timer.c | nr_write_internal(sk, NR_INFOACK); |
sk | 108 | net/netrom/nr_timer.c | sk->nr->condition &= ~ACK_PENDING_CONDITION; |
sk | 109 | net/netrom/nr_timer.c | sk->nr->vl = sk->nr->vr; |
sk | 115 | net/netrom/nr_timer.c | nr_kick(sk); |
sk | 122 | net/netrom/nr_timer.c | if (sk->nr->t2timer > 0 && --sk->nr->t2timer == 0) { |
sk | 123 | net/netrom/nr_timer.c | if (sk->nr->state == NR_STATE_3) { |
sk | 124 | net/netrom/nr_timer.c | if (sk->nr->condition & ACK_PENDING_CONDITION) { |
sk | 125 | net/netrom/nr_timer.c | sk->nr->condition &= ~ACK_PENDING_CONDITION; |
sk | 126 | net/netrom/nr_timer.c | nr_enquiry_response(sk); |
sk | 131 | net/netrom/nr_timer.c | if (sk->nr->t4timer > 0 && --sk->nr->t4timer == 0) { |
sk | 132 | net/netrom/nr_timer.c | sk->nr->condition &= ~PEER_RX_BUSY_CONDITION; |
sk | 135 | net/netrom/nr_timer.c | if (sk->nr->t1timer == 0 || --sk->nr->t1timer > 0) { |
sk | 136 | net/netrom/nr_timer.c | nr_reset_timer(sk); |
sk | 140 | net/netrom/nr_timer.c | switch (sk->nr->state) { |
sk | 142 | net/netrom/nr_timer.c | if (sk->nr->n2count == sk->nr->n2) { |
sk | 143 | net/netrom/nr_timer.c | nr_clear_queues(sk); |
sk | 144 | net/netrom/nr_timer.c | sk->nr->state = NR_STATE_0; |
sk | 145 | net/netrom/nr_timer.c | sk->state = TCP_CLOSE; |
sk | 146 | net/netrom/nr_timer.c | sk->err = ETIMEDOUT; |
sk | 147 | net/netrom/nr_timer.c | if (!sk->dead) |
sk | 148 | net/netrom/nr_timer.c | sk->state_change(sk); |
sk | 149 | net/netrom/nr_timer.c | sk->dead = 1; |
sk | 151 | net/netrom/nr_timer.c | sk->nr->n2count++; |
sk | 152 | net/netrom/nr_timer.c | nr_write_internal(sk, NR_CONNREQ); |
sk | 157 | net/netrom/nr_timer.c | if (sk->nr->n2count == sk->nr->n2) { |
sk | 158 | net/netrom/nr_timer.c | nr_clear_queues(sk); |
sk | 159 | net/netrom/nr_timer.c | sk->nr->state = NR_STATE_0; |
sk | 160 | net/netrom/nr_timer.c | sk->state = TCP_CLOSE; |
sk | 161 | net/netrom/nr_timer.c | sk->err = ETIMEDOUT; |
sk | 162 | net/netrom/nr_timer.c | if (!sk->dead) |
sk | 163 | net/netrom/nr_timer.c | sk->state_change(sk); |
sk | 164 | net/netrom/nr_timer.c | sk->dead = 1; |
sk | 166 | net/netrom/nr_timer.c | sk->nr->n2count++; |
sk | 167 | net/netrom/nr_timer.c | nr_write_internal(sk, NR_DISCREQ); |
sk | 172 | net/netrom/nr_timer.c | if (sk->nr->n2count == sk->nr->n2) { |
sk | 173 | net/netrom/nr_timer.c | nr_clear_queues(sk); |
sk | 174 | net/netrom/nr_timer.c | sk->nr->state = NR_STATE_0; |
sk | 175 | net/netrom/nr_timer.c | sk->state = TCP_CLOSE; |
sk | 176 | net/netrom/nr_timer.c | sk->err = ETIMEDOUT; |
sk | 177 | net/netrom/nr_timer.c | if (!sk->dead) |
sk | 178 | net/netrom/nr_timer.c | sk->state_change(sk); |
sk | 179 | net/netrom/nr_timer.c | sk->dead = 1; |
sk | 181 | net/netrom/nr_timer.c | sk->nr->n2count++; |
sk | 182 | net/netrom/nr_timer.c | nr_requeue_frames(sk); |
sk | 187 | net/netrom/nr_timer.c | sk->nr->t1timer = sk->nr->t1 = nr_calculate_t1(sk); |
sk | 189 | net/netrom/nr_timer.c | nr_set_timer(sk); |
sk | 69 | net/unix/af_unix.c | static void unix_remove_socket(unix_socket *sk) |
sk | 75 | net/unix/af_unix.c | if(s==sk) |
sk | 83 | net/unix/af_unix.c | if(s->next==sk) |
sk | 85 | net/unix/af_unix.c | s->next=sk->next; |
sk | 94 | net/unix/af_unix.c | static void unix_insert_socket(unix_socket *sk) |
sk | 97 | net/unix/af_unix.c | sk->next=unix_socket_list; |
sk | 98 | net/unix/af_unix.c | unix_socket_list=sk; |
sk | 126 | net/unix/af_unix.c | unix_socket *sk=(unix_socket *)data; |
sk | 127 | net/unix/af_unix.c | if(sk->protinfo.af_unix.locks==0 && sk->wmem_alloc==0) |
sk | 129 | net/unix/af_unix.c | if(sk->protinfo.af_unix.name) |
sk | 130 | net/unix/af_unix.c | kfree(sk->protinfo.af_unix.name); |
sk | 131 | net/unix/af_unix.c | kfree_s(sk,sizeof(*sk)); |
sk | 139 | net/unix/af_unix.c | sk->timer.expires=jiffies+10*HZ; /* No real hurry try it every 10 seconds or so */ |
sk | 140 | net/unix/af_unix.c | add_timer(&sk->timer); |
sk | 144 | net/unix/af_unix.c | static void unix_delayed_delete(unix_socket *sk) |
sk | 146 | net/unix/af_unix.c | sk->timer.data=(unsigned long)sk; |
sk | 147 | net/unix/af_unix.c | sk->timer.expires=jiffies+HZ; /* Normally 1 second after will clean up. After that we try every 10 */ |
sk | 148 | net/unix/af_unix.c | sk->timer.function=unix_destroy_timer; |
sk | 149 | net/unix/af_unix.c | add_timer(&sk->timer); |
sk | 152 | net/unix/af_unix.c | static void unix_destroy_socket(unix_socket *sk) |
sk | 155 | net/unix/af_unix.c | unix_remove_socket(sk); |
sk | 157 | net/unix/af_unix.c | while((skb=skb_dequeue(&sk->receive_queue))!=NULL) |
sk | 159 | net/unix/af_unix.c | if(sk->state==TCP_LISTEN) |
sk | 161 | net/unix/af_unix.c | unix_socket *osk=skb->sk; |
sk | 174 | net/unix/af_unix.c | if(sk->protinfo.af_unix.inode!=NULL) |
sk | 176 | net/unix/af_unix.c | iput(sk->protinfo.af_unix.inode); |
sk | 177 | net/unix/af_unix.c | sk->protinfo.af_unix.inode=NULL; |
sk | 180 | net/unix/af_unix.c | if(--sk->protinfo.af_unix.locks==0 && sk->wmem_alloc==0) |
sk | 182 | net/unix/af_unix.c | if(sk->protinfo.af_unix.name) |
sk | 183 | net/unix/af_unix.c | kfree(sk->protinfo.af_unix.name); |
sk | 184 | net/unix/af_unix.c | kfree_s(sk,sizeof(*sk)); |
sk | 188 | net/unix/af_unix.c | sk->dead=1; |
sk | 189 | net/unix/af_unix.c | unix_delayed_delete(sk); /* Try every so often until buffers are all freed */ |
sk | 208 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 211 | net/unix/af_unix.c | return sock_setsockopt(sk,level,optname,optval,optlen); |
sk | 216 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 219 | net/unix/af_unix.c | return sock_getsockopt(sk,level,optname,optval,optlen); |
sk | 224 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 225 | net/unix/af_unix.c | if(sk->type!=SOCK_STREAM) |
sk | 227 | net/unix/af_unix.c | sk->max_ack_backlog=backlog; |
sk | 228 | net/unix/af_unix.c | sk->state=TCP_LISTEN; |
sk | 232 | net/unix/af_unix.c | static void def_callback1(struct sock *sk) |
sk | 234 | net/unix/af_unix.c | if(!sk->dead) |
sk | 235 | net/unix/af_unix.c | wake_up_interruptible(sk->sleep); |
sk | 238 | net/unix/af_unix.c | static void def_callback2(struct sock *sk, int len) |
sk | 240 | net/unix/af_unix.c | if(!sk->dead) |
sk | 242 | net/unix/af_unix.c | wake_up_interruptible(sk->sleep); |
sk | 243 | net/unix/af_unix.c | sock_wake_async(sk->socket, 1); |
sk | 247 | net/unix/af_unix.c | static void def_callback3(struct sock *sk) |
sk | 249 | net/unix/af_unix.c | if(!sk->dead) |
sk | 251 | net/unix/af_unix.c | wake_up_interruptible(sk->sleep); |
sk | 252 | net/unix/af_unix.c | sock_wake_async(sk->socket, 2); |
sk | 258 | net/unix/af_unix.c | unix_socket *sk; |
sk | 262 | net/unix/af_unix.c | sk=(unix_socket *)kmalloc(sizeof(*sk),GFP_KERNEL); |
sk | 263 | net/unix/af_unix.c | if(sk==NULL) |
sk | 265 | net/unix/af_unix.c | sk->type=sock->type; |
sk | 273 | net/unix/af_unix.c | kfree_s(sk,sizeof(*sk)); |
sk | 276 | net/unix/af_unix.c | init_timer(&sk->timer); |
sk | 277 | net/unix/af_unix.c | skb_queue_head_init(&sk->write_queue); |
sk | 278 | net/unix/af_unix.c | skb_queue_head_init(&sk->receive_queue); |
sk | 279 | net/unix/af_unix.c | skb_queue_head_init(&sk->back_log); |
sk | 280 | net/unix/af_unix.c | sk->protinfo.af_unix.family=AF_UNIX; |
sk | 281 | net/unix/af_unix.c | sk->protinfo.af_unix.inode=NULL; |
sk | 282 | net/unix/af_unix.c | sk->protinfo.af_unix.locks=1; /* Us */ |
sk | 283 | net/unix/af_unix.c | sk->protinfo.af_unix.readsem=MUTEX; /* single task reading lock */ |
sk | 284 | net/unix/af_unix.c | sk->protinfo.af_unix.name=NULL; |
sk | 285 | net/unix/af_unix.c | sk->protinfo.af_unix.other=NULL; |
sk | 286 | net/unix/af_unix.c | sk->protocol=0; |
sk | 287 | net/unix/af_unix.c | sk->rmem_alloc=0; |
sk | 288 | net/unix/af_unix.c | sk->wmem_alloc=0; |
sk | 289 | net/unix/af_unix.c | sk->dead=0; |
sk | 290 | net/unix/af_unix.c | sk->next=NULL; |
sk | 291 | net/unix/af_unix.c | sk->broadcast=0; |
sk | 292 | net/unix/af_unix.c | sk->rcvbuf=SK_RMEM_MAX; |
sk | 293 | net/unix/af_unix.c | sk->sndbuf=SK_WMEM_MAX; |
sk | 294 | net/unix/af_unix.c | sk->allocation=GFP_KERNEL; |
sk | 295 | net/unix/af_unix.c | sk->inuse=0; |
sk | 296 | net/unix/af_unix.c | sk->debug=0; |
sk | 297 | net/unix/af_unix.c | sk->prot=NULL; |
sk | 298 | net/unix/af_unix.c | sk->err=0; |
sk | 299 | net/unix/af_unix.c | sk->localroute=0; |
sk | 300 | net/unix/af_unix.c | sk->send_head=NULL; |
sk | 301 | net/unix/af_unix.c | sk->state=TCP_CLOSE; |
sk | 302 | net/unix/af_unix.c | sk->priority=SOPRI_NORMAL; |
sk | 303 | net/unix/af_unix.c | sk->ack_backlog=0; |
sk | 304 | net/unix/af_unix.c | sk->shutdown=0; |
sk | 305 | net/unix/af_unix.c | sk->state_change=def_callback1; |
sk | 306 | net/unix/af_unix.c | sk->data_ready=def_callback2; |
sk | 307 | net/unix/af_unix.c | sk->write_space=def_callback3; |
sk | 308 | net/unix/af_unix.c | sk->error_report=def_callback1; |
sk | 309 | net/unix/af_unix.c | sk->mtu=4096; |
sk | 310 | net/unix/af_unix.c | sk->socket=sock; |
sk | 311 | net/unix/af_unix.c | sock->data=(void *)sk; |
sk | 312 | net/unix/af_unix.c | sk->sleep=sock->wait; |
sk | 313 | net/unix/af_unix.c | sk->zapped=0; |
sk | 314 | net/unix/af_unix.c | unix_insert_socket(sk); |
sk | 325 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 330 | net/unix/af_unix.c | if(sk==NULL) |
sk | 333 | net/unix/af_unix.c | sk->state_change(sk); |
sk | 334 | net/unix/af_unix.c | sk->dead=1; |
sk | 335 | net/unix/af_unix.c | skpair=(unix_socket *)sk->protinfo.af_unix.other; /* Person we send to (default) */ |
sk | 336 | net/unix/af_unix.c | if(sk->type==SOCK_STREAM && skpair!=NULL && skpair->state!=TCP_LISTEN) |
sk | 343 | net/unix/af_unix.c | sk->protinfo.af_unix.other=NULL; /* No pair */ |
sk | 344 | net/unix/af_unix.c | unix_destroy_socket(sk); /* Try and flush out this socket. Throw our buffers at least */ |
sk | 379 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 389 | net/unix/af_unix.c | if(sk->protinfo.af_unix.inode!=NULL) |
sk | 392 | net/unix/af_unix.c | sk->protinfo.af_unix.name=kmalloc(addr_len+1, GFP_KERNEL); |
sk | 393 | net/unix/af_unix.c | if(sk->protinfo.af_unix.name==NULL) |
sk | 395 | net/unix/af_unix.c | memcpy(sk->protinfo.af_unix.name, sun->sun_path, addr_len+1); |
sk | 400 | net/unix/af_unix.c | err=do_mknod(sk->protinfo.af_unix.name,S_IFSOCK|S_IRWXUGO,0); |
sk | 402 | net/unix/af_unix.c | err=open_namei(sk->protinfo.af_unix.name, 2, S_IFSOCK, &sk->protinfo.af_unix.inode, NULL); |
sk | 408 | net/unix/af_unix.c | kfree_s(sk->protinfo.af_unix.name,addr_len+1); |
sk | 409 | net/unix/af_unix.c | sk->protinfo.af_unix.name=NULL; |
sk | 422 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 428 | net/unix/af_unix.c | if(sk->type==SOCK_STREAM && sk->protinfo.af_unix.other) |
sk | 430 | net/unix/af_unix.c | if(sock->state==SS_CONNECTING && sk->state==TCP_ESTABLISHED) |
sk | 435 | net/unix/af_unix.c | if(sock->state==SS_CONNECTING && sk->state == TCP_CLOSE) |
sk | 450 | net/unix/af_unix.c | if(sk->type==SOCK_DGRAM && sk->protinfo.af_unix.other) |
sk | 452 | net/unix/af_unix.c | sk->protinfo.af_unix.other->protinfo.af_unix.locks--; |
sk | 453 | net/unix/af_unix.c | sk->protinfo.af_unix.other=NULL; |
sk | 463 | net/unix/af_unix.c | sk->protinfo.af_unix.other=other; |
sk | 465 | net/unix/af_unix.c | sk->state=TCP_ESTABLISHED; |
sk | 476 | net/unix/af_unix.c | skb=sock_alloc_send_skb(sk, 0, 0, 0, &err); /* Marker object */ |
sk | 479 | net/unix/af_unix.c | skb->sk=sk; /* So they know it is us */ |
sk | 481 | net/unix/af_unix.c | sk->state=TCP_CLOSE; |
sk | 491 | net/unix/af_unix.c | sk->protinfo.af_unix.other=other; |
sk | 493 | net/unix/af_unix.c | sk->state=TCP_SYN_SENT; |
sk | 503 | net/unix/af_unix.c | while(sk->state==TCP_SYN_SENT) |
sk | 510 | net/unix/af_unix.c | interruptible_sleep_on(sk->sleep); |
sk | 522 | net/unix/af_unix.c | if(sk->state==TCP_CLOSE) |
sk | 524 | net/unix/af_unix.c | sk->protinfo.af_unix.other->protinfo.af_unix.locks--; |
sk | 525 | net/unix/af_unix.c | sk->protinfo.af_unix.other=NULL; |
sk | 572 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 576 | net/unix/af_unix.c | if(sk->type!=SOCK_STREAM) |
sk | 580 | net/unix/af_unix.c | if(sk->state!=TCP_LISTEN) |
sk | 586 | net/unix/af_unix.c | if(sk->protinfo.af_unix.name!=NULL) |
sk | 588 | net/unix/af_unix.c | newsk->protinfo.af_unix.name=kmalloc(strlen(sk->protinfo.af_unix.name)+1, GFP_KERNEL); |
sk | 591 | net/unix/af_unix.c | strcpy(newsk->protinfo.af_unix.name, sk->protinfo.af_unix.name); |
sk | 597 | net/unix/af_unix.c | skb=skb_dequeue(&sk->receive_queue); |
sk | 605 | net/unix/af_unix.c | interruptible_sleep_on(sk->sleep); |
sk | 615 | net/unix/af_unix.c | tsk=skb->sk; |
sk | 617 | net/unix/af_unix.c | sk->ack_backlog--; |
sk | 623 | net/unix/af_unix.c | sk->protinfo.af_unix.locks--; /* Locked to child socket not master */ |
sk | 633 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 638 | net/unix/af_unix.c | if(sk->protinfo.af_unix.other==NULL) |
sk | 640 | net/unix/af_unix.c | sk=sk->protinfo.af_unix.other; |
sk | 643 | net/unix/af_unix.c | if(sk->protinfo.af_unix.name==NULL) |
sk | 649 | net/unix/af_unix.c | *uaddr_len=sizeof(sun->sun_family)+strlen(sk->protinfo.af_unix.name)+1; |
sk | 650 | net/unix/af_unix.c | strcpy(sun->sun_path,sk->protinfo.af_unix.name); /* 108 byte limited */ |
sk | 656 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 664 | net/unix/af_unix.c | if(sk->err) |
sk | 667 | net/unix/af_unix.c | err=sk->err; |
sk | 668 | net/unix/af_unix.c | sk->err=0; |
sk | 680 | net/unix/af_unix.c | if(sk->state==TCP_ESTABLISHED) |
sk | 688 | net/unix/af_unix.c | if(sk->protinfo.af_unix.other==NULL) |
sk | 702 | net/unix/af_unix.c | if(size>(sk->sndbuf-sizeof(struct sk_buff))/2) /* Keep two messages in the pipe so it schedules better */ |
sk | 706 | net/unix/af_unix.c | size=(sk->sndbuf-sizeof(struct sk_buff))/2; |
sk | 723 | net/unix/af_unix.c | skb=sock_alloc_send_skb(sk,size,limit,nonblock, &err); |
sk | 729 | net/unix/af_unix.c | sk->err=-err; |
sk | 736 | net/unix/af_unix.c | skb->sk=sk; |
sk | 744 | net/unix/af_unix.c | other=sk->protinfo.af_unix.other; |
sk | 748 | net/unix/af_unix.c | sk->protinfo.af_unix.other=NULL; |
sk | 781 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 795 | net/unix/af_unix.c | if(sk->err) |
sk | 798 | net/unix/af_unix.c | err=sk->err; |
sk | 799 | net/unix/af_unix.c | sk->err=0; |
sk | 805 | net/unix/af_unix.c | down(&sk->protinfo.af_unix.readsem); /* Lock the socket */ |
sk | 819 | net/unix/af_unix.c | up(&sk->protinfo.af_unix.readsem); |
sk | 823 | net/unix/af_unix.c | skb=skb_peek(&sk->receive_queue); |
sk | 826 | net/unix/af_unix.c | up(&sk->protinfo.af_unix.readsem); |
sk | 827 | net/unix/af_unix.c | if(sk->shutdown & RCV_SHUTDOWN) |
sk | 842 | net/unix/af_unix.c | sk->socket->flags |= SO_WAITDATA; |
sk | 843 | net/unix/af_unix.c | interruptible_sleep_on(sk->sleep); |
sk | 844 | net/unix/af_unix.c | sk->socket->flags &= ~SO_WAITDATA; |
sk | 853 | net/unix/af_unix.c | down(&sk->protinfo.af_unix.readsem); |
sk | 859 | net/unix/af_unix.c | if(skb->sk->protinfo.af_unix.name) |
sk | 861 | net/unix/af_unix.c | memcpy(sun->sun_path, skb->sk->protinfo.af_unix.name, 108); |
sk | 893 | net/unix/af_unix.c | up(&sk->protinfo.af_unix.readsem); |
sk | 899 | net/unix/af_unix.c | unix_socket *sk=(unix_socket *)sock->data; |
sk | 900 | net/unix/af_unix.c | unix_socket *other=sk->protinfo.af_unix.other; |
sk | 903 | net/unix/af_unix.c | sk->shutdown|=SEND_SHUTDOWN; |
sk | 904 | net/unix/af_unix.c | sk->state_change(sk); |
sk | 911 | net/unix/af_unix.c | other=sk->protinfo.af_unix.other; |
sk | 914 | net/unix/af_unix.c | sk->shutdown|=RCV_SHUTDOWN; |
sk | 915 | net/unix/af_unix.c | sk->state_change(sk); |
sk | 933 | net/unix/af_unix.c | unix_socket *sk=sock->data; |
sk | 944 | net/unix/af_unix.c | amount=sk->sndbuf-sk->wmem_alloc; |
sk | 952 | net/unix/af_unix.c | if(sk->state==TCP_LISTEN) |
sk | 955 | net/unix/af_unix.c | if((skb=skb_peek(&sk->receive_queue))!=NULL) |