summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc1ced7)
SCCS-vsn: sys/net/if.h 4.8
SCCS-vsn: sys/net/if.c 4.9
SCCS-vsn: sys/vax/if/if_en.c 4.37
SCCS-vsn: sys/netinet/ip_input.c 1.31
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
COUNT(IF_IFWITHADDR);
for (ifp = ifnet; ifp; ifp = ifp->if_next)
COUNT(IF_IFWITHADDR);
for (ifp = ifnet; ifp; ifp = ifp->if_next)
- if (ifp->if_addr.s_addr == in.s_addr)
+ if (in.s_addr == ifp->if_addr.s_addr ||
+ (ifp->if_broadaddr.s_addr != 0 &&
+ in.s_addr == ifp->if_broadaddr.s_addr))
/*
* Structures defining a network interface, providing a packet
/*
* Structures defining a network interface, providing a packet
short if_net; /* network number of interface */
int if_host[2]; /* local net host number */
struct in_addr if_addr; /* internet address of interface */
short if_net; /* network number of interface */
int if_host[2]; /* local net host number */
struct in_addr if_addr; /* internet address of interface */
+ struct in_addr if_broadaddr; /* broadcast address of interface */
struct ifqueue {
struct mbuf *ifq_head;
struct mbuf *ifq_tail;
struct ifqueue {
struct mbuf *ifq_head;
struct mbuf *ifq_tail;
}
#define IF_PREPEND(ifq, m) { \
(m)->m_act = (ifq)->ifq_head; \
}
#define IF_PREPEND(ifq, m) { \
(m)->m_act = (ifq)->ifq_head; \
+ if ((ifq)->ifq_tail == 0) \
+ (ifq)->ifq_tail = (m); \
(ifq)->ifq_head = (m); \
}
#define IF_DEQUEUE(ifq, m) { \
(ifq)->ifq_head = (m); \
}
#define IF_DEQUEUE(ifq, m) { \
-/* ip_input.c 1.30 82/02/15 */
+/* ip_input.c 1.31 82/03/09 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
- for (; m != NULL; m = m->m_next)
+ for (; m != NULL; m = m->m_next) {
+ if (m->m_free) panic("ipinput already free");
m = m0;
if (i != ip->ip_len) {
if (i < ip->ip_len) {
m = m0;
if (i != ip->ip_len) {
if (i < ip->ip_len) {
if (hlen > sizeof (struct ip))
ip_dooptions(ip);
if (ifnet && ip->ip_dst.s_addr != ifnet->if_addr.s_addr &&
if (hlen > sizeof (struct ip))
ip_dooptions(ip);
if (ifnet && ip->ip_dst.s_addr != ifnet->if_addr.s_addr &&
+ ip->ip_dst.s_addr != ifnet->if_broadaddr.s_addr &&
if_ifwithaddr(ip->ip_dst) == 0) {
printf("ip->ip_dst %x ip->ip_ttl %x\n", ip->ip_dst, ip->ip_ttl);
if_ifwithaddr(ip->ip_dst) == 0) {
printf("ip->ip_dst %x ip->ip_ttl %x\n", ip->ip_dst, ip->ip_ttl);
if (--ip->ip_ttl == 0) {
icmp_error(ip, ICMP_TIMXCEED, 0);
goto next;
if (--ip->ip_ttl == 0) {
icmp_error(ip, ICMP_TIMXCEED, 0);
goto next;
-/* if_en.c 4.36 82/03/03 */
+/* if_en.c 4.37 82/03/09 */
#endif
es->es_if.if_addr =
if_makeaddr(es->es_if.if_net, es->es_if.if_host[0]);
#endif
es->es_if.if_addr =
if_makeaddr(es->es_if.if_net, es->es_if.if_host[0]);
+ es->es_if.if_broadaddr =
+ if_makeaddr(es->es_if.if_net, 0);
es->es_if.if_init = eninit;
es->es_if.if_output = enoutput;
es->es_if.if_ubareset = enreset;
es->es_if.if_init = eninit;
es->es_if.if_output = enoutput;
es->es_if.if_ubareset = enreset;