source: rtems/cpukit/libnetworking/rtems/rtems_bsdnet.h @ 96b39164

4.104.114.84.95
Last change on this file since 96b39164 was 96b39164, checked in by Joel Sherrill <joel.sherrill@…>, on 08/20/98 at 21:56:40

Added CVS Ids

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 *  $Id$
3 */
4
5#ifndef _RTEMS_BSDNET_
6#define _RTEMS_BSDNET_
7
8#include <rtems.h>
9
10/*
11 * Values that may be obtained by BOOTP
12 */
13extern struct in_addr rtems_bsdnet_bootp_server_address;
14extern char *rtems_bsdnet_bootp_boot_file_name;
15
16/*
17 * Manipulate routing tables
18 */
19struct sockaddr;
20struct rtentry;
21int rtems_bsdnet_rtrequest (
22    int req,
23    struct sockaddr *dst,
24    struct sockaddr *gateway,
25    struct sockaddr *netmask,
26    int flags,
27    struct rtentry **net_nrt);
28
29/*
30 * Diagnostics
31 */
32void rtems_bsdnet_show_inet_routes (void);
33void rtems_bsdnet_show_mbuf_stats (void);
34void rtems_bsdnet_show_if_stats (void);
35void rtems_bsdnet_show_ip_stats (void);
36void rtems_bsdnet_show_icmp_stats (void);
37void rtems_bsdnet_show_udp_stats (void);
38void rtems_bsdnet_show_tcp_stats (void);
39
40/*
41 * Network configuration
42 */
43struct rtems_bsdnet_ifconfig {
44        /*
45         * These two entries must be supplied for each interface.
46         */
47        char            *name;
48        int             (*attach)(struct rtems_bsdnet_ifconfig *conf);
49
50        /*
51         * Link to next interface
52         */
53        struct rtems_bsdnet_ifconfig *next;
54
55        /*
56         * The following entries may be obtained
57         * from BOOTP or explicitily supplied.
58         */
59        char            *ip_address;
60        char            *ip_netmask;
61        void            *hardware_address;
62
63        /*
64         * The driver assigns defaults values to the following
65         * entries if they are not explicitly supplied.
66         */
67        int             ignore_broadcast;
68        int             mtu;
69        int             rbuf_count;
70        int             xbuf_count;
71};
72
73struct rtems_bsdnet_config {
74        /*
75         * This entry points to the head of the ifconfig chain.
76         */
77        struct rtems_bsdnet_ifconfig *ifconfig;
78
79        /*
80         * This entry should be rtems_bsdnet_do_bootp if BOOTP
81         * is being used to configure the network, and NULL
82         * if BOOTP is not being used.
83         */
84        void                    (*bootp)(void);
85
86        /*
87         * The remaining items can be initialized to 0, in
88         * which case the default value will be used.
89         */
90        rtems_task_priority     network_task_priority;  /* 100          */
91        unsigned long           mbuf_bytecount;         /* 64 kbytes    */
92        unsigned long           mbuf_cluster_bytecount; /* 128 kbytes   */
93        char                    *hostname;              /* BOOTP        */
94        char                    *domainname;            /* BOOTP        */
95        char                    *gateway;               /* BOOTP        */
96        char                    *log_host;              /* BOOTP        */
97        char                    *name_server[3];        /* BOOTP        */
98};
99extern struct rtems_bsdnet_config rtems_bsdnet_config;
100int rtems_bsdnet_initialize_network (void);
101void rtems_bsdnet_do_bootp (void);
102
103#endif /* _RTEMS_BSDNET_ */
Note: See TracBrowser for help on using the repository browser.