summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/net/rtsock.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-03 18:09:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-03 18:09:57 +0000
commit36799d4063c2e6e74d5d5a520aabac199913227a (patch)
tree676ad75ffd851ab3bd5c01beb39c0c0b0c348490 /cpukit/libnetworking/net/rtsock.c
parent2003-01-03 Victor V. Vengerov <vvv@oktet.ru> (diff)
downloadrtems-36799d4063c2e6e74d5d5a520aabac199913227a.tar.bz2
2002-11-26 Chris Johns <cjohns@cybertec.com.au>
* Makefile.am: Added sys/linker_set.h * kern/Makefile.am: Added kern_mib.c and kern_sysctl.c. * kern/uipc_socket.c: OID changed from KERN_SOMAXCONN to KIPC_SOMAXCONN. * kern/uipc_socket2.c: OID changed from KERN_MAXSOCKBUF to KIPC_MAXSOCKBUF. * net/if_ethersubr.c: FreeBSD 2.2.2 does not have a _net_link node while 5.0 does. * net/if_ppp.c: Removed the TEXT_SET define as these macros are now implemented. * net/rtsock.c: Enable sysctl support plus fix the bug with the lastest FreeBSD sysctl header file. * netinet/icmp_var.h: FreeBSD 2.2.2 does not have a _net_inet_icmp node while 5.0 does. * netinet/if_ether.c: FreeBSD 2.2.2 does not have a _net_link_ether node while 5.0 does. * netinet/igmp_var.h: FreeBSD 2.2.2 does not have a _net_inet_igmp node while 5.0 does. * netinet/in_pcb.c: Fixed the arguments to the sysctl call. Add inp_gencnt and ipi_count. These are used when listing connections. * netinet/in_pcb.h: Added counters to aid the listing of connections. * netinet/in_var.h: Provide the _net_inet_ip and _net_inet_raw nodes. * netinet/ip_fw.c: Disable the firewall sysctl calls. * netinet/tcp_subr.c: Merge tcp_pcblist from the lastest FreeBSD source. * netinet/tcp_var.h: Add structures needed by net-snmp to list connections. * netinet/udp_usrreq.c: Merged udp_pcblist from the lastest FreeBSD source. * netinet/udp_var.h: Added the sysctl id UDPCTL_PCBLIST. Used by net-snmp. * rtems_glue.c: Call sysctl_register_all when initialising the network stack to register all the sysctl calls. These are in the special sections and required an updated linker script. * rtems/rtems_syscall.c: Add the sysctl call. * sys/kernel.h: Use the lastest FreeBSD method of handling sysctl structures. This now held in the sys/linker_set.h file. * sys/queue.h: This is from the lastest FreeBSD code with the circular code merged back in as it is not used in the lastest FreeBSD kernel. * sys/sysctl.h: The lastest sysctl. This was needed to use with the new linker set method. The FreeBSD 2.2.2 version has asm hacks. The lastest version of the FreeBSD does not have these hacks. It uses gcc attribute directives.
Diffstat (limited to 'cpukit/libnetworking/net/rtsock.c')
-rw-r--r--cpukit/libnetworking/net/rtsock.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/cpukit/libnetworking/net/rtsock.c b/cpukit/libnetworking/net/rtsock.c
index 274f6fccff..af45607a3e 100644
--- a/cpukit/libnetworking/net/rtsock.c
+++ b/cpukit/libnetworking/net/rtsock.c
@@ -67,10 +67,8 @@ static struct mbuf *
static int rt_msg2 __P((int,
struct rt_addrinfo *, caddr_t, struct walkarg *));
static int rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *));
-#if !defined(__rtems__)
static int sysctl_dumpentry __P((struct radix_node *rn, void *vw));
static int sysctl_iflist __P((int af, struct walkarg *w));
-#endif
static int route_output __P((struct mbuf *, struct socket *));
static int route_usrreq __P((struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *));
@@ -677,7 +675,6 @@ rt_newaddrmsg(cmd, ifa, error, rt)
/*
* This is used in dumping the kernel table via sysctl().
*/
-#if !defined(__rtems__)
int
sysctl_dumpentry(rn, vw)
struct radix_node *rn;
@@ -710,9 +707,7 @@ sysctl_dumpentry(rn, vw)
}
return (error);
}
-#endif
-#if !defined(__rtems__)
int
sysctl_iflist(af, w)
int af;
@@ -739,7 +734,7 @@ sysctl_iflist(af, w)
ifm->ifm_flags = (u_short)ifp->if_flags;
ifm->ifm_data = ifp->if_data;
ifm->ifm_addrs = info.rti_addrs;
- error =0;
+ error = SYSCTL_OUT(w->w_req,(caddr_t)ifm, len);
if (error)
return (error);
}
@@ -758,7 +753,7 @@ sysctl_iflist(af, w)
ifam->ifam_flags = ifa->ifa_flags;
ifam->ifam_metric = ifa->ifa_metric;
ifam->ifam_addrs = info.rti_addrs;
- error = 0;
+ error = SYSCTL_OUT(w->w_req, w->w_tmem, len);
if (error)
return (error);
}
@@ -767,11 +762,9 @@ sysctl_iflist(af, w)
}
return (0);
}
-#endif
-#if !defined(__rtems__)
static int
-sysctl_rtsock SYSCTL_HANDLER_ARGS
+sysctl_rtsock(SYSCTL_HANDLER_ARGS)
{
int *name = (int *)arg1;
u_int namelen = arg2;
@@ -814,7 +807,6 @@ sysctl_rtsock SYSCTL_HANDLER_ARGS
}
SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock,"");
-#endif
/*
* Definitions of protocols supported in the ROUTE domain.