summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1997-09-30 16:25:11 +0000
committerDavid Greenman <dg@FreeBSD.org>1997-09-30 16:25:11 +0000
commit430ac1d361804c853facaf2f16b57b7df77a40b3 (patch)
treef1d68d21880d5bb9a2b263bcbc8b40dfb13c7c53
parent41324220213505c364e9803060d0b65203802a87 (diff)
Notes
-rw-r--r--sys/netinet/in_pcb.c7
-rw-r--r--sys/netinet/in_pcb.h18
-rw-r--r--sys/netinet/ip_divert.c4
-rw-r--r--sys/netinet/ip_output.c10
-rw-r--r--sys/netinet/raw_ip.c8
-rw-r--r--sys/netinet/tcp_output.c6
-rw-r--r--sys/netinet/tcp_subr.c4
-rw-r--r--sys/netinet/udp_usrreq.c8
8 files changed, 36 insertions, 29 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 93241a71f222..3c0edea25a5a 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id: in_pcb.c,v 1.23 1996/10/30 06:13:09 peter Exp $
+ * $Id: in_pcb.c,v 1.23.2.1 1997/03/03 09:24:36 davidg Exp $
*/
#include <sys/param.h>
@@ -675,8 +675,9 @@ in_pcblookuphash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard)
head = &pcbinfo->hashbase[INP_PCBHASH(faddr.s_addr, lport, fport, pcbinfo->hashmask)];
for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
if (inp->inp_faddr.s_addr == faddr.s_addr &&
- inp->inp_fport == fport && inp->inp_lport == lport &&
- inp->inp_laddr.s_addr == laddr.s_addr)
+ inp->inp_laddr.s_addr == laddr.s_addr &&
+ inp->inp_fport == fport &&
+ inp->inp_lport == lport)
goto found;
}
if (wildcard) {
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 770c666f028f..6bb988d554cb 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- * $Id: in_pcb.h,v 1.14.2.1 1996/11/11 23:40:40 phk Exp $
+ * $Id: in_pcb.h,v 1.14.2.2 1997/03/03 09:24:37 davidg Exp $
*/
#ifndef _NETINET_IN_PCB_H_
@@ -51,18 +51,24 @@ LIST_HEAD(inpcbhead, inpcb);
struct inpcb {
LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
LIST_ENTRY(inpcb) inp_hash; /* hash list */
- struct inpcbinfo *inp_pcbinfo;
+ struct inpcbinfo *inp_pcbinfo; /* PCB list info */
struct in_addr inp_faddr; /* foreign host table entry */
- u_short inp_fport; /* foreign port */
struct in_addr inp_laddr; /* local host table entry */
+ u_short inp_fport; /* foreign port */
u_short inp_lport; /* local port */
- struct socket *inp_socket; /* back pointer to socket */
caddr_t inp_ppcb; /* pointer to per-protocol pcb */
+ struct socket *inp_socket; /* back pointer to socket */
+ struct mbuf *inp_options; /* IP options */
struct route inp_route; /* placeholder for routing entry */
int inp_flags; /* generic IP/datagram flags */
- struct ip inp_ip; /* header prototype; should have more */
- struct mbuf *inp_options; /* IP options */
+ u_char inp_ip_tos; /* type of service proto */
+ u_char inp_ip_ttl; /* time to live proto */
+ u_char inp_ip_p; /* protocol proto */
+ u_char pad[1]; /* alignment */
struct ip_moptions *inp_moptions; /* IP multicast options */
+#if 0 /* Someday, perhaps... */
+ struct ip inp_ip; /* header prototype; should have more */
+#endif
};
struct inpcbinfo {
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 44f5610af223..6443f742966e 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ip_divert.c,v 1.1 1997/05/09 17:46:44 archie Exp $
+ * $Id: ip_divert.c,v 1.1.2.3 1997/06/20 23:05:32 julian Exp $
*/
#include <sys/param.h>
@@ -293,7 +293,7 @@ div_usrreq(so, req, m, nam, control)
(error = in_pcballoc(so, &divcbinfo)))
break;
inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip.ip_p = (int)nam; /* XXX */
+ inp->inp_ip_p = (int)nam; /* XXX */
inp->inp_flags |= INP_HDRINCL;
/* The socket is always "connected" because
we always know "where" to send the packet */
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 6c63e93d9e66..31b05102e4c4 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id: ip_output.c,v 1.44.2.5 1997/05/17 19:18:15 fenner Exp $
+ * $Id: ip_output.c,v 1.44.2.6 1997/06/20 23:05:38 julian Exp $
*/
#define _IP_VHL
@@ -634,11 +634,11 @@ ip_ctloutput(op, so, level, optname, mp)
switch (optname) {
case IP_TOS:
- inp->inp_ip.ip_tos = optval;
+ inp->inp_ip_tos = optval;
break;
case IP_TTL:
- inp->inp_ip.ip_ttl = optval;
+ inp->inp_ip_ttl = optval;
break;
#define OPTSET(bit) \
if (optval) \
@@ -737,11 +737,11 @@ ip_ctloutput(op, so, level, optname, mp)
switch (optname) {
case IP_TOS:
- optval = inp->inp_ip.ip_tos;
+ optval = inp->inp_ip_tos;
break;
case IP_TTL:
- optval = inp->inp_ip.ip_ttl;
+ optval = inp->inp_ip_ttl;
break;
#define OPTBIT(bit) (inp->inp_flags & bit ? 1 : 0)
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 568895147160..806b63e9c441 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id: raw_ip.c,v 1.37.2.2 1997/03/03 09:24:38 davidg Exp $
+ * $Id: raw_ip.c,v 1.37.2.3 1997/05/22 20:53:36 fenner Exp $
*/
#include <sys/param.h>
@@ -112,7 +112,7 @@ rip_input(m, iphlen)
ripsrc.sin_addr = ip->ip_src;
for (inp = ripcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p)
+ if (inp->inp_ip_p && inp->inp_ip_p != ip->ip_p)
continue;
if (inp->inp_laddr.s_addr &&
inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
@@ -185,7 +185,7 @@ rip_output(m, so, dst)
ip = mtod(m, struct ip *);
ip->ip_tos = 0;
ip->ip_off = 0;
- ip->ip_p = inp->inp_ip.ip_p;
+ ip->ip_p = inp->inp_ip_p;
ip->ip_len = m->m_pkthdr.len;
ip->ip_src = inp->inp_laddr;
ip->ip_dst.s_addr = dst;
@@ -345,7 +345,7 @@ rip_usrreq(so, req, m, nam, control)
(error = in_pcballoc(so, &ripcbinfo)))
break;
inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip.ip_p = (int)nam;
+ inp->inp_ip_p = (int)nam;
break;
case PRU_DISCONNECT:
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 0d4a681c34a7..c581c77a5ea3 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_output.c 8.4 (Berkeley) 5/24/95
- * $Id: tcp_output.c,v 1.21 1996/06/08 08:19:00 bde Exp $
+ * $Id: tcp_output.c,v 1.21.2.1 1997/09/16 18:37:01 joerg Exp $
*/
#include "opt_tcpdebug.h"
@@ -675,8 +675,8 @@ send:
struct rtentry *rt;
#endif
((struct ip *)ti)->ip_len = m->m_pkthdr.len;
- ((struct ip *)ti)->ip_ttl = tp->t_inpcb->inp_ip.ip_ttl; /* XXX */
- ((struct ip *)ti)->ip_tos = tp->t_inpcb->inp_ip.ip_tos; /* XXX */
+ ((struct ip *)ti)->ip_ttl = tp->t_inpcb->inp_ip_ttl; /* XXX */
+ ((struct ip *)ti)->ip_tos = tp->t_inpcb->inp_ip_tos; /* XXX */
#if 1
/*
* See if we should do MTU discovery. We do it only if the following
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 980f856d5dfe..64410b3e0415 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
- * $Id: tcp_subr.c,v 1.31.2.1 1997/03/03 09:24:39 davidg Exp $
+ * $Id: tcp_subr.c,v 1.31.2.2 1997/09/16 18:37:01 joerg Exp $
*/
#include "opt_tcpdebug.h"
@@ -278,7 +278,7 @@ tcp_newtcpcb(inp)
tp->t_rxtcur = TCPTV_RTOBASE;
tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT;
- inp->inp_ip.ip_ttl = ip_defttl;
+ inp->inp_ip_ttl = ip_defttl;
inp->inp_ppcb = (caddr_t)tp;
return (tp);
}
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index cc6b61dc3e6c..89162cf68842 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
- * $Id: udp_usrreq.c,v 1.30.2.1 1996/11/11 23:41:00 phk Exp $
+ * $Id: udp_usrreq.c,v 1.30.2.2 1997/03/03 09:24:40 davidg Exp $
*/
#include <sys/param.h>
@@ -436,8 +436,8 @@ udp_output(inp, m, addr, control)
ui->ui_sum = 0xffff;
}
((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
- ((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl; /* XXX */
- ((struct ip *)ui)->ip_tos = inp->inp_ip.ip_tos; /* XXX */
+ ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
+ ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
udpstat.udps_opackets++;
error = ip_output(m, inp->inp_options, &inp->inp_route,
inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
@@ -501,7 +501,7 @@ udp_usrreq(so, req, m, addr, control)
error = soreserve(so, udp_sendspace, udp_recvspace);
if (error)
break;
- ((struct inpcb *) so->so_pcb)->inp_ip.ip_ttl = ip_defttl;
+ ((struct inpcb *) so->so_pcb)->inp_ip_ttl = ip_defttl;
break;
case PRU_DETACH: