Terry Lambert wrote:
Peter Wemm wrote:
Terry: will you please check your facts? It takes around 30 seconds
to find out that it doesn't even compile.
[ ... lots of trivial to fix warnings and errors ... ]
Tell you what, I'll fix these and post a patch. Will that make you
guys happy?
This crap is *s* trivial to fix, it's easier to fix than
to watch you guys bitch about it not being fixable.
Here are two patches. The first fixes missing pieces in /sys/conf/files
and /sys/conf/options, the second fixes all the files that need it in
/sys/netns/.
It's now possible to add:
options NS
to a kernel config, and still get a kernel that does it's thing.
Note that I did not go through and made the protosw[] changes,
so there's some initialization warnings there, but by my clock,
I only spent an hour on the thing, and what you guys were bitching
about was it doesn't even compile.
If you want that fixed too, then it's an easy fix, using the IPX
sources as a guide, since IPX is derives from XNS.
-- TerryIndex: files
===
RCS file: /usr/cvs/src/sys/conf/files,v
retrieving revision 1.340.2.87
diff -c -r1.340.2.87 files
*** files 19 Dec 2001 20:59:27 - 1.340.2.87
--- files 5 Mar 2003 00:49:18 -
***
*** 923,928
--- 923,929
netns/ns_output.c optional ns
netns/ns_pcb.coptional ns
netns/ns_proto.c optional ns
+ netns/ns_cksum.c optional ns
netns/spp_debug.c optional ns
netns/spp_usrreq.coptional ns
nfs/nfs_bio.c optional nfs
Index: options
===
RCS file: /usr/cvs/src/sys/conf/options,v
retrieving revision 1.191.2.37
diff -c -r1.191.2.37 options
*** options 3 Nov 2001 01:41:07 - 1.191.2.37
--- options 4 Mar 2003 22:10:11 -
***
*** 272,277
--- 272,278
TCPDEBUG
TCP_DROP_SYNFIN opt_tcp_input.h
XBONEHACK
+ NSopt_ns.h
# Netgraph(4). Use option NETGRAPH to enable the base netgraph code.
# Each netgraph node type can be either be compiled into the kernel
Index: idp_usrreq.c
===
RCS file: /usr/cvs/src/sys/netns/idp_usrreq.c,v
retrieving revision 1.9
diff -c -r1.9 idp_usrreq.c
*** idp_usrreq.c28 Aug 1999 00:49:47 - 1.9
--- idp_usrreq.c5 Mar 2003 01:15:42 -
***
*** 54,59
--- 54,63
#include netns/idp_var.h
#include netns/ns_error.h
+ extern int idpcksum; /* from ns_input.c */
+ extern long ns_pexseq;/* from ns_input.c */
+ extern struct nspcb nsrawpcb; /* from ns_input.c */
+
/*
* IDP protocol implementation.
*/
***
*** 63,68
--- 67,73
/*
* This may also be called for raw listeners.
*/
+ void
idp_input(m, nsp)
struct mbuf *m;
register struct nspcb *nsp;
***
*** 79,92
idp_ns.sns_addr = idp-idp_sna;
if (ns_neteqnn(idp-idp_sna.x_net, ns_zeronet) ifp) {
register struct ifaddr *ifa;
! for (ifa = ifp-if_addrlist; ifa; ifa = ifa-ifa_next) {
if (ifa-ifa_addr-sa_family == AF_NS) {
idp_ns.sns_addr.x_net =
IA_SNS(ifa)-sns_addr.x_net;
break;
}
! }
}
nsp-nsp_rpt = idp-idp_pt;
if ( ! (nsp-nsp_flags NSP_RAWIN) ) {
--- 84,99
idp_ns.sns_addr = idp-idp_sna;
if (ns_neteqnn(idp-idp_sna.x_net, ns_zeronet) ifp) {
register struct ifaddr *ifa;
+ int s;
! s = splimp();
! TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link)
if (ifa-ifa_addr-sa_family == AF_NS) {
idp_ns.sns_addr.x_net =
IA_SNS(ifa)-sns_addr.x_net;
break;
}
! splx(s);
}
nsp-nsp_rpt = idp-idp_pt;
if ( ! (nsp-nsp_flags NSP_RAWIN) ) {
***
*** 103,108
--- 110,116
m_freem(m);
}
+ void
idp_abort(nsp)
struct nspcb *nsp;
{
***
*** 134,153
so-so_error = errno;
ns_pcbdisconnect(nsp);
soisdisconnected(so);
}
int noIdpRoute;
idp_output(nsp, m0)
struct nspcb *nsp;
struct mbuf *m0;
{
! register struct mbuf *m;
register struct idp *idp;
register struct socket *so;
register int len = 0;
register struct route *ro;
! struct mbuf *mprev;
! extern int idpcksum;
/*
* Calculate data length.
--- 142,163
so-so_error = errno;
ns_pcbdisconnect(nsp);