PERFORCE change 143218 for review
Julian Elischer
julian at FreeBSD.org
Mon Jun 9 21:59:52 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143218
Change 143218 by julian at julian_trafmon1 on 2008/06/09 21:59:11
Work towards compiling
Affected files ...
.. //depot/projects/vimage-commit/src/sys/net/if.h#2 edit
.. //depot/projects/vimage-commit/src/sys/net/if_gif.h#3 edit
.. //depot/projects/vimage-commit/src/sys/net/if_var.h#3 edit
.. //depot/projects/vimage-commit/src/sys/net/raw_cb.c#3 edit
.. //depot/projects/vimage-commit/src/sys/net/raw_usrreq.c#3 edit
.. //depot/projects/vimage-commit/src/sys/netinet/in.h#2 edit
.. //depot/projects/vimage-commit/src/sys/netinet/in_mcast.c#3 edit
.. //depot/projects/vimage-commit/src/sys/netinet/in_rmx.c#3 edit
.. //depot/projects/vimage-commit/src/sys/netinet/ip6.h#3 edit
.. //depot/projects/vimage-commit/src/sys/netinet/ip_fw.h#2 edit
.. //depot/projects/vimage-commit/src/sys/sys/vimage.h#2 edit
Differences ...
==== //depot/projects/vimage-commit/src/sys/net/if.h#2 (text+ko) ====
@@ -457,4 +457,107 @@
#include <net/if_var.h>
#endif
+
+/*-
+ * Copyright (c) 2006 University of Zagreb
+ * Copyright (c) 2006 FreeBSD Foundation
+ *
+ * This software was developed by the University of Zagreb and the
+ * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
+ * FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * XXX RCS tag goes here
+ */
+
+#ifndef _NET_VNET_H_
+#define _NET_VNET_H_
+
+
+#ifdef XVIMAGE
+#include "opt_route.h"
+
+#include <sys/proc.h>
+#include <sys/protosw.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_var.h>
+#include <net/route.h>
+#include <net/raw_cb.h>
+
+
+/* calculate this the same as in route.c */
+#ifndef ROUTETABLES
+ #define RT_MAXFIBS 1
+#else
+ #define RT_MAXFIBS 16
+#endif
+
+struct vnet_net {
+ int _if_index;
+ struct ifindex_entry *_ifindex_table;
+ struct ifnethead _ifnet;
+ struct ifgrouphead _ifg_head;
+
+ int _if_indexlim;
+ struct knlist _ifklist;
+
+ struct rtstat _rtstat;
+ struct radix_node_head *_rt_tables[RT_MAXFIBS][AF_MAX+1];
+ int _rttrash;
+
+ struct ifnet *_loif;
+ LIST_HEAD(, lo_softc) _lo_list;
+
+ LIST_HEAD(, rawcb) _rawcb_list;
+
+ int _ether_ipfw;
+};
+
+#endif
+
+/*
+ * Symbol translation macros
+ */
+#define INIT_VNET_NET(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_NET, struct vnet_net, vnet_net)
+
+#define VNET_NET(sym) VSYM(vnet_net, sym)
+
+#define V_if_index VNET_NET(if_index)
+#define V_ifindex_table VNET_NET(ifindex_table)
+#define V_ifnet VNET_NET(ifnet)
+#define V_ifg_head VNET_NET(ifg_head)
+#define V_if_indexlim VNET_NET(if_indexlim)
+#define V_ifklist VNET_NET(ifklist)
+#define V_rtstat VNET_NET(rtstat)
+#define V_rt_tables VNET_NET(rt_tables)
+#define V_rttrash VNET_NET(rttrash)
+#define V_loif VNET_NET(loif)
+#define V_lo_list VNET_NET(lo_list)
+#define V_rawcb_list VNET_NET(rawcb_list)
+#define V_ether_ipfw VNET_NET(ether_ipfw)
+
+#endif /* !_NET_VNET_H_ */
#endif /* !_NET_IF_H_ */
==== //depot/projects/vimage-commit/src/sys/net/if_gif.h#3 (text+ko) ====
@@ -110,6 +110,30 @@
void gif_delete_tunnel(struct ifnet *);
int gif_encapcheck(const struct mbuf *, int, int, void *);
+/*
+ * Virtualization support
+ * XXX for now should result in no changes until vimage enabled
+ */
+
+#define INIT_VNET_GIF(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_GIF, struct vnet_gif, vnet_gif)
+
+#define VNET_GIF(sym) VSYM(vnet_gif, sym)
+
+struct vnet_gif {
+ LIST_HEAD(, gif_softc) _gif_softc_list;
+ int _max_gif_nesting;
+ int _parallel_tunnels;
+ int _ip_gif_ttl;
+ int _ip6_gif_hlim;
+};
+
+#define V_gif_softc_list VNET_GIF(gif_softc_list)
+#define V_max_gif_nesting VNET_GIF(max_gif_nesting)
+#define V_parallel_tunnels VNET_GIF(parallel_tunnels)
+#define V_ip_gif_ttl VNET_GIF(ip_gif_ttl)
+#define V_ip6_gif_hlim VNET_GIF(ip6_gif_hlim)
+
#endif /* _KERNEL */
#endif /* _NET_IF_GIF_H_ */
==== //depot/projects/vimage-commit/src/sys/net/if_var.h#3 (text+ko) ====
@@ -665,7 +665,6 @@
int if_allmulti(struct ifnet *, int);
struct ifnet* if_alloc(u_char);
void if_attach(struct ifnet *);
-void if_grow(void);
int if_delmulti(struct ifnet *, struct sockaddr *);
void if_delmulti_ifma(struct ifmultiaddr *);
void if_detach(struct ifnet *);
==== //depot/projects/vimage-commit/src/sys/net/raw_cb.c#3 (text+ko) ====
@@ -44,6 +44,7 @@
#include <sys/vimage.h>
#include <net/raw_cb.h>
+#include <net/if.h>
/*
* Routines to manage the raw protocol control blocks.
==== //depot/projects/vimage-commit/src/sys/net/raw_usrreq.c#3 (text+ko) ====
@@ -48,6 +48,7 @@
#include <sys/vimage.h>
#include <net/raw_cb.h>
+#include <net/if.h>
MTX_SYSINIT(rawcb_mtx, &rawcb_mtx, "rawcb", MTX_DEF);
==== //depot/projects/vimage-commit/src/sys/netinet/in.h#2 (text+ko) ====
@@ -743,4 +743,319 @@
#undef __KAME_NETINET_IN_H_INCLUDED_
#endif
+/*-
+ * Copyright (c) 2006 University of Zagreb
+ * Copyright (c) 2006 FreeBSD Foundation
+ *
+ * This software was developed by the University of Zagreb and the
+ * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
+ * FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * XXX RCS tag goes here
+ */
+
+#ifndef _NETINET_VINET_H_
+#define _NETINET_VINET_H_
+
+#ifdef XVIMAGE
+#include <sys/socketvar.h>
+#include <sys/sysctl.h>
+#include <sys/md5.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/in_var.h>
+#include <netinet/in_pcb.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/icmp_var.h>
+#include <netinet/igmp_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_hostcache.h>
+#include <netinet/tcp_syncache.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+struct vnet_inet {
+ struct in_ifaddrhashhead *_in_ifaddrhashtbl;
+ struct in_ifaddrhead _in_ifaddrhead;
+ u_long _in_ifaddrhmask;
+ struct in_multihead _in_multihead;
+
+ int _arpt_keep;
+ int _arp_maxtries;
+ int _useloopback;
+ int _arp_proxyall;
+ int _subnetsarelocal;
+ int _sameprefixcarponly;
+
+ int _ipforwarding;
+ int _ipfastforward_active;
+ int _ipsendredirects;
+ int _ip_defttl;
+ int _ip_keepfaith;
+ int _ip_sendsourcequench;
+ int _ip_do_randomid;
+ int _ip_checkinterface;
+ u_short _ip_id;
+
+ uma_zone_t _ipq_zone;
+ int _nipq; /* Total # of reass queues */
+ int _maxnipq; /* Admin. limit on # reass queues. */
+ int _maxfragsperpacket;
+ TAILQ_HEAD(ipqhead, ipq) _ipq[IPREASS_NHASH];
+
+ struct inpcbhead _tcb; /* head of queue of active tcpcb's */
+ struct inpcbinfo _tcbinfo;
+ struct tcpstat _tcpstat; /* tcp statistics */
+ struct tcp_hostcache _tcp_hostcache;
+ struct callout _tcp_hc_callout;
+ struct tcp_syncache _tcp_syncache;
+ struct inpcbhead _divcb;
+ struct inpcbinfo _divcbinfo;
+ TAILQ_HEAD(, tcptw) _twq_2msl;
+
+ int _tcp_sc_rst_sock_fail;
+ int _tcp_mssdflt;
+ int _tcp_v6mssdflt;
+ int _tcp_minmss;
+ int _tcp_do_rfc1323;
+ int _icmp_may_rst;
+ int _tcp_isn_reseed_interval;
+ int _tcp_inflight_enable;
+ int _tcp_inflight_rttthresh;
+ int _tcp_inflight_min;
+ int _tcp_inflight_max;
+ int _tcp_inflight_stab;
+ int _nolocaltimewait;
+ int _path_mtu_discovery;
+ int _ss_fltsz;
+ int _ss_fltsz_local;
+ int _tcp_do_newreno;
+ int _tcp_do_tso;
+ int _tcp_do_autosndbuf;
+ int _tcp_autosndbuf_inc;
+ int _tcp_autosndbuf_max;
+ int _tcp_do_sack;
+ int _tcp_sack_maxholes;
+ int _tcp_sack_globalmaxholes;
+ int _tcp_sack_globalholes;
+ int _blackhole;
+ int _tcp_delack_enabled;
+ int _drop_synfin;
+ int _tcp_do_rfc3042;
+ int _tcp_do_rfc3390;
+ int _tcp_insecure_rst;
+ int _tcp_do_autorcvbuf;
+ int _tcp_autorcvbuf_inc;
+ int _tcp_autorcvbuf_max;
+ int _tcp_reass_maxseg;
+ int _tcp_reass_qsize;
+ int _tcp_reass_maxqlen;
+ int _tcp_reass_overflows;
+
+ u_char _isn_secret[32];
+ int _isn_last_reseed;
+ u_int32_t _isn_offset;
+ u_int32_t _isn_offset_old;
+ MD5_CTX _isn_ctx;
+
+ struct inpcbhead _udb;
+ struct inpcbinfo _udbinfo;
+ struct udpstat _udpstat;
+
+ struct inpcbhead _ripcb;
+ struct inpcbinfo _ripcbinfo;
+ struct socket *_ip_mrouter;
+
+ struct socket *_ip_rsvpd;
+ int _ip_rsvp_on;
+ int _rsvp_on;
+
+ struct icmpstat _icmpstat;
+ struct ipstat _ipstat;
+ struct igmpstat _igmpstat;
+
+ SLIST_HEAD(, router_info) _router_info_head;
+
+ int _rtq_timeout;
+ int _rtq_reallyold;
+ int _rtq_minreallyold;
+ int _rtq_toomany;
+ struct callout _rtq_timer;
+
+ int _ipport_lowfirstauto;
+ int _ipport_lowlastauto;
+ int _ipport_firstauto;
+ int _ipport_lastauto;
+ int _ipport_hifirstauto;
+ int _ipport_hilastauto;
+ int _ipport_reservedhigh;
+ int _ipport_reservedlow;
+ int _ipport_randomized;
+ int _ipport_randomcps;
+ int _ipport_randomtime;
+ int _ipport_stoprandom;
+ int _ipport_tcpallocs;
+ int _ipport_tcplastcount;
+};
+#endif
+
+
+/*
+ * Symbol translation macros
+ */
+#define INIT_VNET_INET(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_INET, struct vnet_inet, vnet_inet)
+
+#define VNET_INET(sym) VSYM(vnet_inet, sym)
+
+#define V_in_ifaddrhead VNET_INET(in_ifaddrhead)
+#define V_in_ifaddrhashtbl VNET_INET(in_ifaddrhashtbl)
+#define V_in_ifaddrhmask VNET_INET(in_ifaddrhmask)
+#define V_in_multihead VNET_INET(in_multihead)
+
+#define V_llinfo_arp VNET_INET(llinfo_arp)
+#define V_arpt_prune VNET_INET(arpt_prune)
+#define V_arpt_keep VNET_INET(arpt_keep)
+#define V_arp_maxtries VNET_INET(arp_maxtries)
+#define V_useloopback VNET_INET(useloopback)
+#define V_arp_proxyall VNET_INET(arp_proxyall)
+#define V_subnetsarelocal VNET_INET(subnetsarelocal)
+#define V_sameprefixcarponly VNET_INET(sameprefixcarponly)
+
+#define V_ipforwarding VNET_INET(ipforwarding)
+#define V_ipfastforward_active VNET_INET(ipfastforward_active)
+#define V_ipsendredirects VNET_INET(ipsendredirects)
+#define V_ip_defttl VNET_INET(ip_defttl)
+#define V_ip_keepfaith VNET_INET(ip_keepfaith)
+#define V_ip_sendsourcequench VNET_INET(ip_sendsourcequench)
+#define V_ip_id VNET_INET(ip_id)
+#define V_ip_do_randomid VNET_INET(ip_do_randomid)
+#define V_ip_checkinterface VNET_INET(ip_checkinterface)
+
+#define V_ipq VNET_INET(ipq)
+#define V_ipq_zone VNET_INET(ipq_zone)
+#define V_nipq VNET_INET(nipq)
+#define V_maxnipq VNET_INET(maxnipq)
+#define V_maxfragsperpacket VNET_INET(maxfragsperpacket)
+
+#define V_tcb VNET_INET(tcb)
+#define V_tcbinfo VNET_INET(tcbinfo)
+#define V_tcpstat VNET_INET(tcpstat)
+#define V_twq_2msl VNET_INET(twq_2msl)
+#define V_tcp_hostcache VNET_INET(tcp_hostcache)
+#define V_tcp_hc_callout VNET_INET(tcp_hc_callout)
+#define V_tcp_syncache VNET_INET(tcp_syncache)
+#define V_tcp_sc_rst_sock_fail VNET_INET(tcp_sc_rst_sock_fail)
+
+#define V_tcp_mssdflt VNET_INET(tcp_mssdflt)
+#define V_tcp_v6mssdflt VNET_INET(tcp_v6mssdflt)
+#define V_tcp_minmss VNET_INET(tcp_minmss)
+#define V_tcp_do_rfc1323 VNET_INET(tcp_do_rfc1323)
+#define V_icmp_may_rst VNET_INET(icmp_may_rst)
+#define V_tcp_isn_reseed_interval VNET_INET(tcp_isn_reseed_interval)
+#define V_tcp_inflight_enable VNET_INET(tcp_inflight_enable)
+#define V_tcp_inflight_rttthresh VNET_INET(tcp_inflight_rttthresh)
+#define V_tcp_inflight_min VNET_INET(tcp_inflight_min)
+#define V_tcp_inflight_max VNET_INET(tcp_inflight_max)
+#define V_tcp_inflight_stab VNET_INET(tcp_inflight_stab)
+#define V_nolocaltimewait VNET_INET(nolocaltimewait)
+#define V_path_mtu_discovery VNET_INET(path_mtu_discovery)
+#define V_ss_fltsz VNET_INET(ss_fltsz)
+#define V_ss_fltsz_local VNET_INET(ss_fltsz_local)
+#define V_tcp_do_newreno VNET_INET(tcp_do_newreno)
+#define V_tcp_do_tso VNET_INET(tcp_do_tso)
+#define V_tcp_do_autosndbuf VNET_INET(tcp_do_autosndbuf)
+#define V_tcp_autosndbuf_inc VNET_INET(tcp_autosndbuf_inc)
+#define V_tcp_autosndbuf_max VNET_INET(tcp_autosndbuf_max)
+#define V_tcp_do_sack VNET_INET(tcp_do_sack)
+#define V_tcp_sack_maxholes VNET_INET(tcp_sack_maxholes)
+#define V_tcp_sack_globalmaxholes VNET_INET(tcp_sack_globalmaxholes)
+#define V_tcp_sack_globalholes VNET_INET(tcp_sack_globalholes)
+#define V_blackhole VNET_INET(blackhole)
+#define V_tcp_delack_enabled VNET_INET(tcp_delack_enabled)
+#define V_drop_synfin VNET_INET(drop_synfin)
+#define V_tcp_do_rfc3042 VNET_INET(tcp_do_rfc3042)
+#define V_tcp_do_rfc3390 VNET_INET(tcp_do_rfc3390)
+#define V_tcp_insecure_rst VNET_INET(tcp_insecure_rst)
+#define V_tcp_do_autorcvbuf VNET_INET(tcp_do_autorcvbuf)
+#define V_tcp_autorcvbuf_inc VNET_INET(tcp_autorcvbuf_inc)
+#define V_tcp_autorcvbuf_max VNET_INET(tcp_autorcvbuf_max)
+#define V_tcp_reass_maxseg VNET_INET(tcp_reass_maxseg)
+#define V_tcp_reass_qsize VNET_INET(tcp_reass_qsize)
+#define V_tcp_reass_maxqlen VNET_INET(tcp_reass_maxqlen)
+#define V_tcp_reass_overflows VNET_INET(tcp_reass_overflows)
+
+#define V_isn_secret VNET_INET(isn_secret)
+#define V_isn_last_reseed VNET_INET(isn_last_reseed)
+#define V_isn_offset VNET_INET(isn_offset)
+#define V_isn_offset_old VNET_INET(isn_offset_old)
+#define V_isn_ctx VNET_INET(isn_ctx)
+
+#define V_udb VNET_INET(udb)
+#define V_udbinfo VNET_INET(udbinfo)
+#define V_udpstat VNET_INET(udpstat)
+
+#define V_ripcb VNET_INET(ripcb)
+#define V_ripcbinfo VNET_INET(ripcbinfo)
+#define V_ip_mrouter VNET_INET(ip_mrouter)
+
+#define V_rsvp_on VNET_INET(rsvp_on)
+#define V_ip_rsvp_on VNET_INET(ip_rsvp_on)
+#define V_ip_rsvpd VNET_INET(ip_rsvpd)
+
+#define V_icmpstat VNET_INET(icmpstat)
+#define V_ipstat VNET_INET(ipstat)
+#define V_igmpstat VNET_INET(igmpstat)
+
+#define V_router_info_head VNET_INET(router_info_head)
+
+#define V_rtq_timeout VNET_INET(rtq_timeout)
+#define V_rtq_reallyold VNET_INET(rtq_reallyold)
+#define V_rtq_minreallyold VNET_INET(rtq_minreallyold)
+#define V_rtq_toomany VNET_INET(rtq_toomany)
+#define V_rtq_timer VNET_INET(rtq_timer)
+
+#define V_ipport_lowfirstauto VNET_INET(ipport_lowfirstauto)
+#define V_ipport_lowlastauto VNET_INET(ipport_lowlastauto)
+#define V_ipport_firstauto VNET_INET(ipport_firstauto)
+#define V_ipport_lastauto VNET_INET(ipport_lastauto)
+#define V_ipport_hifirstauto VNET_INET(ipport_hifirstauto)
+#define V_ipport_hilastauto VNET_INET(ipport_hilastauto)
+#define V_ipport_reservedhigh VNET_INET(ipport_reservedhigh)
+#define V_ipport_reservedlow VNET_INET(ipport_reservedlow)
+#define V_ipport_randomized VNET_INET(ipport_randomized)
+#define V_ipport_randomcps VNET_INET(ipport_randomcps)
+#define V_ipport_randomtime VNET_INET(ipport_randomtime)
+#define V_ipport_stoprandom VNET_INET(ipport_stoprandom)
+#define V_ipport_tcpallocs VNET_INET(ipport_tcpallocs)
+#define V_ipport_tcplastcount VNET_INET(ipport_tcplastcount)
+
+#define V_divcb VNET_INET(divcb)
+#define V_divcbinfo VNET_INET(divcbinfo)
+#endif /* !_NETINET_VINET_H_ */
#endif /* !_NETINET_IN_H_*/
==== //depot/projects/vimage-commit/src/sys/netinet/in_mcast.c#3 (text+ko) ====
@@ -1028,9 +1028,9 @@
* If all of these conditions fail, return EADDRNOTAVAIL, and
* reject the IPv4 multicast join.
*/
- if (mreqs.imr_interface.s_addr != INADDR_ANY)
- ifp = ip_multicast_if(&mreqs.imr_interface);
- else {
+ if (mreqs.imr_interface.s_addr != INADDR_ANY) {
+ INADDR_TO_IFP(mreqs.imr_interface, ifp);
+ } else {
struct route ro;
ro.ro_rt = NULL;
==== //depot/projects/vimage-commit/src/sys/netinet/in_rmx.c#3 (text+ko) ====
@@ -376,7 +376,7 @@
rnh->rnh_close = in_clsroute;
if (_in_rt_was_here == 0 ) {
callout_init(&V_rtq_timer, CALLOUT_MPSAFE);
- in_rtqtimo(curvnet); /* kick off timeout first time */
+ in_rtqtimo(rnh); /* kick off timeout first time */
_in_rt_was_here = 1;
}
return 1;
==== //depot/projects/vimage-commit/src/sys/netinet/ip6.h#3 (text+ko) ====
@@ -348,4 +348,275 @@
} while (/*CONSTCOND*/ 0)
#endif /*_KERNEL*/
+
+/*-
+ * Copyright (c) 2006 University of Zagreb
+ * Copyright (c) 2006 FreeBSD Foundation
+ *
+ * This software was developed by the University of Zagreb and the
+ * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
+ * FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * XXX RCS tag goes here
+ */
+
+#ifndef _NETINET6_VINET6_H_
+#define _NETINET6_VINET6_H_
+
+#ifdef VIMAGE
+#include <netinet/ip6.h>
+#include <netinet/ip6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/raw_ip6.h>
+#include <netinet/in_pcb.h>
+#include <netinet/icmp6.h>
+#include <netinet6/scope6_var.h>
+#include <netinet6/in6_ifattach.h>
+#include <netinet6/nd6.h>
+
+
+struct vnet_inet6 {
+ struct in6_ifaddr * _in6_ifaddr;
+
+ u_int _frag6_nfragpackets;
+ u_int _frag6_nfrags;
+ struct ip6q _ip6q;
+
+ struct route_in6 _ip6_forward_rt;
+
+ struct in6_addrpolicy _defaultaddrpolicy;
+ TAILQ_HEAD(, addrsel_policyent) _addrsel_policytab;
+ u_int _in6_maxmtu;
+ int _ip6_auto_linklocal;
+
+ struct ip6stat _ip6stat;
+ struct rip6stat _rip6stat;
+ struct icmp6stat _icmp6stat;
+
+ int _rtq_timeout6;
+ struct callout _rtq_timer6;
+ struct callout _rtq_mtutimer;
+ struct callout _nd6_slowtimo_ch;
+ struct callout _nd6_timer_ch;
+ struct callout _in6_tmpaddrtimer_ch;
+
+ int _nd6_inuse;
+ int _nd6_allocated;
+ struct llinfo_nd6 _llinfo_nd6;
+ struct nd_drhead _nd_defrouter;
+ struct nd_prhead _nd_prefix;
+ struct ifnet * _nd6_defifp;
+ int _nd6_defifindex;
+
+ struct scope6_id _sid_default;
+
+ TAILQ_HEAD(, dadq) _dadq;
+ int _dad_init;
+
+ int _icmp6errpps_count;
+ //int _icmp6errppslim_last;
+ //int _icmp6_nodeinfo;
+
+ int _ip6_forwarding;
+ int _ip6_sendredirects;
+ int _ip6_defhlim;
+ int _ip6_defmcasthlim;
+ int _ip6_accept_rtadv;
+ int _ip6_maxfragpackets;
+ int _ip6_maxfrags;
+ int _ip6_log_interval;
+ int _ip6_hdrnestlimit;
+ int _ip6_dad_count;
+ int _ip6_auto_flowlabel;
+ int _ip6_use_deprecated;
+ int _ip6_rr_prune;
+ int _ip6_mcast_pmtu;
+ int _ip6_v6only;
+ int _ip6_keepfaith;
+ int _ip6stealth;
+ time_t _ip6_log_time;
+
+ int _pmtu_expire;
+ int _pmtu_probe;
+ u_long _rip6_sendspace;
+ u_long _rip6_recvspace;
+ int _icmp6_rediraccept;
+ int _icmp6_redirtimeout;
+ int _icmp6errppslim;
+ int _icmp6_nodeinfo;
+ int _udp6_sendspace;
+ int _udp6_recvspace;
+ int _ip6qmaxlen;
+ int _ip6_prefer_tempaddr;
+ int _ip6_forward_srcrt;
+ int _ip6_sourcecheck;
+ int _ip6_sourcecheck_interval;
+ int _ip6_ours_check_algorithm;
+
+ int _nd6_prune;
+ int _nd6_delay;
+ int _nd6_umaxtries;
+ int _nd6_mmaxtries;
+ int _nd6_useloopback;
+ int _nd6_gctimer;
+ int _nd6_maxndopt;
+ int _nd6_maxnudhint;
+ int _nd6_maxqueuelen;
+ int _nd6_debug;
+ int _nd6_recalc_reachtm_interval;
+ int _dad_ignore_ns;
+ int _dad_maxtry;
+ int _ip6_use_tempaddr;
+ int _ip6_desync_factor;
+ u_int32_t _ip6_temp_preferred_lifetime;
+ u_int32_t _ip6_temp_valid_lifetime;
+
+ int _ip6_mrouter_ver;
+ int _pim6;
+ u_int _mrt6debug;
+
+ int _ip6_temp_regen_advance;
+ int _ip6_use_defzone;
+
+ struct ip6_pktopts _ip6_opts;
+};
+#endif
+
+#define INIT_VNET_INET6(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_INET6, \
+ struct vnet_inet6, vnet_inet6)
+
+#define VNET_INET6(sym) VSYM(vnet_inet6, sym)
+
+
+/*
+ * Symbol translation macros
+ */
+#define V_in6_ifaddr VNET_INET6(in6_ifaddr)
+
+#define V_frag6_nfragpackets VNET_INET6(frag6_nfragpackets)
+#define V_frag6_nfrags VNET_INET6(frag6_nfrags)
+#define V_ip6q VNET_INET6(ip6q)
+
+#define V_ip6_forward_rt VNET_INET6(ip6_forward_rt)
+
+#define V_defaultaddrpolicy VNET_INET6(defaultaddrpolicy)
+#define V_addrsel_policytab VNET_INET6(addrsel_policytab)
+#define V_in6_maxmtu VNET_INET6(in6_maxmtu)
+#define V_ip6_auto_linklocal VNET_INET6(ip6_auto_linklocal)
+
+#define V_ip6stat VNET_INET6(ip6stat)
+#define V_rip6stat VNET_INET6(rip6stat)
+#define V_icmp6stat VNET_INET6(icmp6stat)
+
+#define V_rtq_timeout6 VNET_INET6(rtq_timeout6)
+#define V_rtq_timer6 VNET_INET6(rtq_timer6)
+#define V_rtq_mtutimer VNET_INET6(rtq_mtutimer)
+#define V_nd6_slowtimo_ch VNET_INET6(nd6_slowtimo_ch)
+#define V_nd6_timer_ch VNET_INET6(nd6_timer_ch)
+#define V_in6_tmpaddrtimer_ch VNET_INET6(in6_tmpaddrtimer_ch)
+
+#define V_nd6_inuse VNET_INET6(nd6_inuse)
+#define V_nd6_allocated VNET_INET6(nd6_allocated)
+#define V_llinfo_nd6 VNET_INET6(llinfo_nd6)
+#define V_nd_defrouter VNET_INET6(nd_defrouter)
+#define V_nd_prefix VNET_INET6(nd_prefix)
+#define V_nd6_defifp VNET_INET6(nd6_defifp)
+#define V_nd6_defifindex VNET_INET6(nd6_defifindex)
+
+#define V_sid_default VNET_INET6(sid_default)
+
+#define V_dadq VNET_INET6(dadq)
+#define V_dad_init VNET_INET6(dad_init)
+
+//#define V_icmp6errppslim VNET_INET6(icmp6errppslim)
+#define V_icmp6errpps_count VNET_INET6(icmp6errpps_count)
+//#define V_icmp6_nodeinfo VNET_INET6(icmp6_nodeinfo)
+
+#define V_ip6_forwarding VNET_INET6(ip6_forwarding)
+#define V_ip6_sendredirects VNET_INET6(ip6_sendredirects)
+#define V_ip6_defhlim VNET_INET6(ip6_defhlim)
+#define V_ip6_defmcasthlim VNET_INET6(ip6_defmcasthlim)
+#define V_ip6_accept_rtadv VNET_INET6(ip6_accept_rtadv)
+#define V_ip6_maxfragpackets VNET_INET6(ip6_maxfragpackets)
+#define V_ip6_maxfrags VNET_INET6(ip6_maxfrags)
+#define V_ip6_log_interval VNET_INET6(ip6_log_interval)
+#define V_ip6_hdrnestlimit VNET_INET6(ip6_hdrnestlimit)
+#define V_ip6_dad_count VNET_INET6(ip6_dad_count)
+#define V_ip6_auto_flowlabel VNET_INET6(ip6_auto_flowlabel)
+#define V_ip6_use_deprecated VNET_INET6(ip6_use_deprecated)
+#define V_ip6_rr_prune VNET_INET6(ip6_rr_prune)
+#define V_ip6_mcast_pmtu VNET_INET6(ip6_mcast_pmtu)
+#define V_ip6_v6only VNET_INET6(ip6_v6only)
+#define V_ip6_keepfaith VNET_INET6(ip6_keepfaith)
+#define V_ip6stealth VNET_INET6(ip6stealth)
+#define V_ip6_log_time VNET_INET6(ip6_log_time)
+
+#define V_pmtu_expire VNET_INET6(pmtu_expire)
+#define V_pmtu_probe VNET_INET6(pmtu_probe)
+#define V_rip6_sendspace VNET_INET6(rip6_sendspace)
+#define V_rip6_recvspace VNET_INET6(rip6_recvspace)
+#define V_icmp6_rediraccept VNET_INET6(icmp6_rediraccept)
+#define V_icmp6_redirtimeout VNET_INET6(icmp6_redirtimeout)
+#define V_icmp6errppslim VNET_INET6(icmp6errppslim)
+#define V_icmp6_nodeinfo VNET_INET6(icmp6_nodeinfo)
+#define V_udp6_sendspace VNET_INET6(udp6_sendspace)
+#define V_udp6_recvspace VNET_INET6(udp6_recvspace)
+//#define V_icmp6errppslim_last VNET_INET6(icmp6errppslim_last)
+#define V_ip6_prefer_tempaddr VNET_INET6(ip6_prefer_tempaddr)
+#define V_ip6qmaxlen VNET_INET6(ip6qmaxlen)
+#define V_ip6_forward_srcrt VNET_INET6(ip6_forward_srcrt)
+#define V_ip6_sourcecheck VNET_INET6(ip6_sourcecheck)
+#define V_ip6_sourcecheck_interval VNET_INET6(ip6_sourcecheck_interval)
+#define V_ip6_ours_check_algorithm VNET_INET6(ip6_ours_check_algorithm)
+#define V_nd6_prune VNET_INET6(nd6_prune)
+#define V_nd6_delay VNET_INET6(nd6_delay)
+#define V_nd6_umaxtries VNET_INET6(nd6_umaxtries)
+#define V_nd6_mmaxtries VNET_INET6(nd6_mmaxtries)
+#define V_nd6_useloopback VNET_INET6(nd6_useloopback)
+#define V_nd6_gctimer VNET_INET6(nd6_gctimer)
+#define V_nd6_maxndopt VNET_INET6(nd6_maxndopt)
+#define V_nd6_maxnudhint VNET_INET6(nd6_maxnudhint)
+#define V_nd6_maxqueuelen VNET_INET6(nd6_maxqueuelen)
+#define V_nd6_debug VNET_INET6(nd6_debug)
+#define V_nd6_recalc_reachtm_interval VNET_INET6(nd6_recalc_reachtm_interval)
+#define V_dad_ignore_ns VNET_INET6(dad_ignore_ns)
+#define V_dad_maxtry VNET_INET6(dad_maxtry)
+#define V_ip6_use_tempaddr VNET_INET6(ip6_use_tempaddr)
+#define V_ip6_desync_factor VNET_INET6(ip6_desync_factor)
+#define V_ip6_temp_preferred_lifetime VNET_INET6(ip6_temp_preferred_lifetime)
+#define V_ip6_temp_valid_lifetime VNET_INET6(ip6_temp_valid_lifetime)
+
+#define V_ip6_mrouter_ver VNET_INET6(ip6_mrouter_ver)
+#define V_pim6 VNET_INET6(pim6)
+#define V_mrt6debug VNET_INET6(mrt6debug)
+#define V_ip6_temp_regen_advance VNET_INET6(ip6_temp_regen_advance)
+
+#define V_ip6_use_defzone VNET_INET6(ip6_use_defzone)
+
+#define V_ip6_opts VNET_INET6(ip6_opts)
+
+#endif /* !_NETINET6_VINET6_H_ */
#endif /* not _NETINET_IP6_H_ */
==== //depot/projects/vimage-commit/src/sys/netinet/ip_fw.h#2 (text+ko) ====
@@ -662,5 +662,90 @@
typedef int ipfw_nat_cfg_t(struct sockopt *);
#endif
+/*
+ * Stack virtualization support.
+ */
+#ifdef VIMAGE
+struct vnet_ipfw {
+ int _fw_one_pass;
+ int _fw_enable;
+ int _fw6_enable;
+
+ u_int32_t _set_disable;
+ int _fw_deny_unknown_exthdrs;
+ int _fw_verbose;
+ int _verbose_limit;
+ int _fw_debug;
+ int _autoinc_step;
+
+ ipfw_dyn_rule **_ipfw_dyn_v;
+ struct ip_fw_chain _layer3_chain;
+ u_int32_t _dyn_buckets;
+ u_int32_t _curr_dyn_buckets;
+
+ u_int32_t _dyn_ack_lifetime;
+ u_int32_t _dyn_syn_lifetime;
+ u_int32_t _dyn_fin_lifetime;
+ u_int32_t _dyn_rst_lifetime;
+ u_int32_t _dyn_udp_lifetime;
+ u_int32_t _dyn_short_lifetime;
+ u_int32_t _dyn_keepalive_interval;
+ u_int32_t _dyn_keepalive_period;
+ u_int32_t _dyn_keepalive;
+ u_int32_t _static_count;
+ u_int32_t _static_len;
+ u_int32_t _dyn_count;
+ u_int32_t _dyn_max;
+
+ u_int64_t _norule_counter;
+
+ struct callout _ipfw_timeout;
+};
+#endif
+
+/*
+ * Symbol translation macros
+ */
+
+#define INIT_VNET_IPFW(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_IPFW, struct vnet_ipfw, vnet_ipfw)
+
+#define VNET_IPFW(sym) VSYM(vnet_ipfw, sym)
+
+#define V_fw_one_pass VNET_IPFW(fw_one_pass)
+#define V_fw_enable VNET_IPFW(fw_enable)
+#define V_fw6_enable VNET_IPFW(fw6_enable)
+
+#define V_set_disable VNET_IPFW(set_disable)
+#define V_fw_deny_unknown_exthdrs VNET_IPFW(fw_deny_unknown_exthdrs)
+#define V_fw_verbose VNET_IPFW(fw_verbose)
+#define V_verbose_limit VNET_IPFW(verbose_limit)
+
+#define V_fw_debug VNET_IPFW(fw_debug)
+#define V_autoinc_step VNET_IPFW(autoinc_step)
+
+#define V_ipfw_dyn_v VNET_IPFW(ipfw_dyn_v)
+#define V_layer3_chain VNET_IPFW(layer3_chain)
+#define V_dyn_buckets VNET_IPFW(dyn_buckets)
+#define V_curr_dyn_buckets VNET_IPFW(curr_dyn_buckets)
+
+#define V_dyn_ack_lifetime VNET_IPFW(dyn_ack_lifetime)
+#define V_dyn_syn_lifetime VNET_IPFW(dyn_syn_lifetime)
+#define V_dyn_fin_lifetime VNET_IPFW(dyn_fin_lifetime)
+#define V_dyn_rst_lifetime VNET_IPFW(dyn_rst_lifetime)
+#define V_dyn_udp_lifetime VNET_IPFW(dyn_udp_lifetime)
+#define V_dyn_short_lifetime VNET_IPFW(dyn_short_lifetime)
+#define V_dyn_keepalive_interval VNET_IPFW(dyn_keepalive_interval)
+#define V_dyn_keepalive_period VNET_IPFW(dyn_keepalive_period)
+#define V_dyn_keepalive VNET_IPFW(dyn_keepalive)
+#define V_static_count VNET_IPFW(static_count)
+#define V_static_len VNET_IPFW(static_len)
+#define V_dyn_count VNET_IPFW(dyn_count)
+#define V_dyn_max VNET_IPFW(dyn_max)
+
+#define V_norule_counter VNET_IPFW(norule_counter)
+#define V_ipfw_timeout VNET_IPFW(ipfw_timeout)
+#define V_ifaddr_event_tag VNET_IPFW(ifaddr_event_tag)
+
#endif /* _KERNEL */
#endif /* _IPFW2_H */
==== //depot/projects/vimage-commit/src/sys/sys/vimage.h#2 (text+ko) ====
@@ -56,7 +56,7 @@
typedef int vnet_detach_fn(const void *);
-#ifdef VIMAGE
+#ifdef XVIMAGE
#define V_GLOBAL 0
#define V_NET 1
@@ -331,7 +331,7 @@
#define V_avg1_fixp VCPU(avg1_fixp)
#define V_avg2_fixp VCPU(avg2_fixp)
-#ifdef VIMAGE
+#ifdef XVIMAGE
void vnet_mod_register(const struct vnet_modinfo *);
void vnet_mod_deregister(const struct vnet_modinfo *);
void vnet_mod_register_multi(const struct vnet_modinfo *, const void *,
More information about the p4-projects
mailing list