
* IP  		streams driver

%DRIVER

Type:		stream
Prefix:		ip
Funcs:		init
Major:		- 
* Controller:
* Physical:
* Logical:
* LineDis:
* Options:

%PARAM

NIP 		10 	# number of minor devices
NIP_BOT 	10 	# Number of bottom end output drivers
ADDRCNT 	10 	# total number of addresses assigned to bottom ends
NROUTES 	16 	# Number of entries in the route table
MYAUTHORITY 	0x10 	# Security authority level
MYCLASS 	0x00 	# Security Classification
STREAM 		0x50 	# Stream Identifier
IP_TTL 		0x0f 	# IP time-to-live
IP_TOS 		0x00 	# IP type-of-service
IPOPT_OUT 	0x00	# see comment below

* The ipopt_out flag is checked when getting IP options with getsockopt.
* If set then outgoing options will be returned 
* else the incoming IP options will be returned to the user.
*
* The following tunable parameters control the gateway action of /dev/ip

IPFORWARDING	1	# Enables or Disables routing between interfaces.
IPGATEWAY_ICMP	0	# Send ICMP errors if unable to forward packet.
IPSENDREDIRECTS	1	# Send ICMP redirects for net/routing changes.

%CONFIG

#include "tcp/sys/socket.h"
#include "tcp/sys/inet.h"
#include "tcp/sys/if.h"
#include "tcp/sys/in.h"
#include "tcp/sys/in_var.h"
#include "tcp/sys/ip.h"
#include "tcp/sys/ip_var.h"
#include "tcp/sys/route.h"

struct ipd	 ipd[NIP];
struct ifnet	 ipb[NIP_BOT];
struct in_ifaddr in_addr[ADDRCNT];
struct rtentry	 route[NROUTES];

int		ipd_cnt		= NIP;
int		ipb_cnt		= NIP_BOT;
int		in_cnt		= ADDRCNT;
int		route_cnt	= NROUTES;

int		ipforwarding	= IPFORWARDING;
int		ipgateway_icmp	= IPGATEWAY_ICMP;
int		ipsendredirects	= IPSENDREDIRECTS;

short		stream_id	= STREAM;

char		my_hosts_authority = MYAUTHORITY;
char		my_hosts_class	= MYCLASS;
char		ip_ttl		= IP_TTL;
char		ipopt_out	= IPOPT_OUT;
