source: rtems/c/src/lib/libnetworking/rtems/rtems_bsdnet.h @ 847375f

4.104.114.84.9
Last change on this file since 847375f was 847375f, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 19, 1998 at 5:35:49 PM

Patch from Eric Norum <eric@…>:

1) Socket timeout field changed from short' to long'. This makes longer

timeouts possible. With a 1 kHz system clock the old system allowed
timeouts only up to a little over 30 seconds! This change is a
slightly cleaned-up version of the patch proposed by Ian Lance Taylor.

2) Major changes to BOOTP/DHCP reply handling. Now supports much of

RFC2132. These changes were done at the request of, and with the
assistance of, Erik Ivanenko.

If you're making changes, you might want to change the network
supplement Essentially just do a global search and replace of BOOTP
with BOOTP/DHCP.

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