tcp_input.c (da0f40995d6ecef1ded88a6261c47343a3bc4a00) | tcp_input.c (36e8826ffbfb16b1970dec46e3dd8487c014788a) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 346 unchanged lines hidden (view full) --- 355 register struct tcpcb *tp = 0; 356 register int thflags; 357 struct socket *so = 0; 358 int todrop, acked, ourfinisacked, needoutput = 0; 359 u_long tiwin; 360 struct tcpopt to; /* options in this segment */ 361 struct rmxp_tao tao; /* our TAO cache entry */ 362 int headlocked = 0; | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 346 unchanged lines hidden (view full) --- 355 register struct tcpcb *tp = 0; 356 register int thflags; 357 struct socket *so = 0; 358 int todrop, acked, ourfinisacked, needoutput = 0; 359 u_long tiwin; 360 struct tcpopt to; /* options in this segment */ 361 struct rmxp_tao tao; /* our TAO cache entry */ 362 int headlocked = 0; |
363 struct sockaddr_in *next_hop; | 363 struct sockaddr_in *next_hop = NULL; |
364 int rstreason; /* For badport_bandlim accounting purposes */ 365 366 struct ip6_hdr *ip6 = NULL; 367#ifdef INET6 368 int isipv6; 369#else 370 const int isipv6 = 0; 371#endif 372 373#ifdef TCPDEBUG 374 /* 375 * The size of tcp_saveipgen must be the size of the max ip header, 376 * now IPv6. 377 */ 378 u_char tcp_saveipgen[40]; 379 struct tcphdr tcp_savetcp; 380 short ostate = 0; 381#endif 382 | 364 int rstreason; /* For badport_bandlim accounting purposes */ 365 366 struct ip6_hdr *ip6 = NULL; 367#ifdef INET6 368 int isipv6; 369#else 370 const int isipv6 = 0; 371#endif 372 373#ifdef TCPDEBUG 374 /* 375 * The size of tcp_saveipgen must be the size of the max ip header, 376 * now IPv6. 377 */ 378 u_char tcp_saveipgen[40]; 379 struct tcphdr tcp_savetcp; 380 short ostate = 0; 381#endif 382 |
383 next_hop = ip_claim_next_hop(m); | 383 /* Grab info from MT_TAG mbufs prepended to the chain. */ 384 for (;m && m->m_type == MT_TAG; m = m->m_next) { 385 if (m->_m_tag_id == PACKET_TAG_IPFORWARD) 386 next_hop = (struct sockaddr_in *)m->m_hdr.mh_data; 387 } |
384#ifdef INET6 385 isipv6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; 386#endif 387 bzero(&tao, sizeof(tao)); 388 bzero((char *)&to, sizeof(to)); 389 390 tcpstat.tcps_rcvtotal++; 391 --- 2761 unchanged lines hidden --- | 388#ifdef INET6 389 isipv6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; 390#endif 391 bzero(&tao, sizeof(tao)); 392 bzero((char *)&to, sizeof(to)); 393 394 tcpstat.tcps_rcvtotal++; 395 --- 2761 unchanged lines hidden --- |