aboutsummaryrefslogtreecommitdiff
path: root/sys/netiso/clnp_subr.c
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-05-01 08:00:00 +0000
committersvn2git <svn2git@FreeBSD.org>1994-05-01 08:00:00 +0000
commita16f65c7d117419bd266c28a1901ef129a337569 (patch)
tree2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /sys/netiso/clnp_subr.c
parent8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff)
Diffstat (limited to 'sys/netiso/clnp_subr.c')
-rw-r--r--sys/netiso/clnp_subr.c84
1 files changed, 49 insertions, 35 deletions
diff --git a/sys/netiso/clnp_subr.c b/sys/netiso/clnp_subr.c
index 20da605fe0eb..c1f577311a7e 100644
--- a/sys/netiso/clnp_subr.c
+++ b/sys/netiso/clnp_subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)clnp_subr.c 7.13 (Berkeley) 5/6/91
- * $Id: clnp_subr.c,v 1.3 1993/10/16 21:04:56 rgrimes Exp $
+ * $Id: clnp_subr.c,v 1.6 1993/12/19 00:53:16 wollman Exp $
*/
/***********************************************************
@@ -86,6 +86,12 @@ SOFTWARE.
#include "clnp_stat.h"
#include "argo_debug.h"
+#ifdef TROLL
+struct troll trollctl;
+#endif
+struct clnp_stat clnp_stat;
+
+
/*
* FUNCTION: clnp_data_ck
*
@@ -103,9 +109,9 @@ SOFTWARE.
*/
struct mbuf *
clnp_data_ck(m, length)
-register struct mbuf *m; /* ptr to mbuf chain containing hdr & data */
-int length; /* length (in bytes) of packet */
- {
+ register struct mbuf *m; /* ptr to mbuf chain containing hdr & data */
+ int length; /* length (in bytes) of packet */
+{
register int len; /* length of data */
register struct mbuf *mhead; /* ptr to head of chain */
@@ -185,7 +191,7 @@ register struct iso_addr *destp; /* ptr to destination address buffer */
else
return (caddr_t) 0;
}
-#endif notdef
+#endif /* notdef */
/*
* FUNCTION: clnp_ours
@@ -200,8 +206,9 @@ register struct iso_addr *destp; /* ptr to destination address buffer */
*
* NOTES:
*/
+int
clnp_ours(dst)
-register struct iso_addr *dst; /* ptr to destination address */
+ register struct iso_addr *dst; /* ptr to destination address */
{
register struct iso_ifaddr *ia; /* scan through interface addresses */
@@ -233,7 +240,7 @@ int congest_threshold = 0;
* clnpintr guarantees that the header will be
* contigious (a cluster mbuf will be used if necessary).
*
- * If oidx is NULL, no options are present.
+ * If oidx is NULL, no options are present.
*
* RETURNS: nothing
*
@@ -241,13 +248,14 @@ int congest_threshold = 0;
*
* NOTES:
*/
+void
clnp_forward(m, len, dst, oidx, seg_off, inbound_shp)
-struct mbuf *m; /* pkt to forward */
-int len; /* length of pkt */
-struct iso_addr *dst; /* destination address */
-struct clnp_optidx *oidx; /* option index */
-int seg_off;/* offset of segmentation part */
-struct snpa_hdr *inbound_shp; /* subnetwork header of inbound packet */
+ struct mbuf *m; /* pkt to forward */
+ int len; /* length of pkt */
+ struct iso_addr *dst; /* destination address */
+ struct clnp_optidx *oidx; /* option index */
+ int seg_off; /* offset of segmentation part */
+ struct snpa_hdr *inbound_shp; /* subnetwork header of inbound packet */
{
struct clnp_fixed *clnp; /* ptr to fixed part of header */
int error; /* return value of route function */
@@ -364,7 +372,7 @@ struct snpa_hdr *inbound_shp; /* subnetwork header of inbound packet */
}
}
}
-#endif DECBIT
+#endif /* DECBIT */
/*
* Dispatch the datagram if it is small enough, otherwise fragment
@@ -414,7 +422,7 @@ register struct iso_addr *dstp; /* ptr to dst addr */
return bufp;
}
-#endif notdef
+#endif /* notdef */
/*
* FUNCTION: clnp_route
@@ -435,12 +443,13 @@ register struct iso_addr *dstp; /* ptr to dst addr */
* NOTES: It is up to the caller to free the routing entry
* allocated in route.
*/
+int
clnp_route(dst, ro, flags, first_hop, ifa)
- struct iso_addr *dst; /* ptr to datagram destination */
- register struct route_iso *ro; /* existing route structure */
- int flags; /* flags for routing */
- struct sockaddr **first_hop; /* result: fill in with ptr to firsthop */
- struct iso_ifaddr **ifa; /* result: fill in with ptr to interface */
+ struct iso_addr *dst; /* ptr to datagram destination */
+ register struct route_iso *ro; /* existing route structure */
+ int flags; /* flags for routing */
+ struct sockaddr **first_hop; /* result: fill in with ptr to firsthop */
+ struct iso_ifaddr **ifa; /* result: fill in with ptr to interface */
{
if (flags & SO_DONTROUTE) {
struct iso_ifaddr *ia;
@@ -530,13 +539,14 @@ clnp_route(dst, ro, flags, first_hop, ifa)
* NOTES: Remember that option index pointers are really
* offsets from the beginning of the mbuf.
*/
+int
clnp_srcroute(options, oidx, ro, first_hop, ifa, final_dst)
-struct mbuf *options; /* ptr to options */
-struct clnp_optidx *oidx; /* index to options */
-struct route_iso *ro; /* route structure */
-struct sockaddr **first_hop; /* RETURN: fill in with ptr to firsthop */
-struct iso_ifaddr **ifa; /* RETURN: fill in with ptr to interface */
-struct iso_addr *final_dst; /* final destination */
+ struct mbuf *options; /* ptr to options */
+ struct clnp_optidx *oidx; /* index to options */
+ struct route_iso *ro; /* route structure */
+ struct sockaddr **first_hop; /* RETURN: fill in with ptr to firsthop */
+ struct iso_ifaddr **ifa; /* RETURN: fill in with ptr to interface */
+ struct iso_addr *final_dst; /* final destination */
{
struct iso_addr dst; /* first hop specified by src rt */
int error = 0; /* return code */
@@ -586,17 +596,18 @@ struct iso_addr *final_dst; /* final destination */
*
* SIDE EFFECTS: prints notice, slows down system.
*/
+int
clnp_badmtu(ifp, rt, line, file)
-struct ifnet *ifp; /* outgoing interface */
-struct rtentry *rt; /* dst route */
-int line; /* where the dirty deed occured */
-char *file; /* where the dirty deed occured */
+ struct ifnet *ifp; /* outgoing interface */
+ struct rtentry *rt; /* dst route */
+ int line; /* where the dirty deed occured */
+ const char *file; /* where the dirty deed occured */
{
printf("sending on route %x with no mtu, line %s of file %s\n",
rt, line, file);
#ifdef ARGO_DEBUG
printf("route dst is");
- dump_isoaddr(rt_key(rt));
+ dump_isoaddr((struct sockaddr_iso *)rt_key(rt));
#endif
return ifp->if_mtu;
}
@@ -612,12 +623,15 @@ char *file; /* where the dirty deed occured */
*
* NOTES: No attempt has been made to make this efficient
*/
+void
clnp_ypocb(from, to, len)
-caddr_t from; /* src buffer */
-caddr_t to; /* dst buffer */
-u_int len; /* number of bytes */
+ caddr_t from; /* src buffer */
+ caddr_t to; /* dst buffer */
+ u_int len; /* number of bytes */
{
while (len--)
*(to + len) = *(from + len);
}
-#endif ISO
+#endif /* ISO */
+
+