source: rtems/c/src/exec/libnetworking/rtems/rtems_bsdnet.h @ d9d75fc

4.104.114.84.95
Last change on this file since d9d75fc was d9d75fc, checked in by Joel Sherrill <joel.sherrill@…>, on 08/31/98 at 23:06:50

Patch from Emmanuel Raguet <raguet@…>:

I have reworked the ethernet driver for the BSP pc386 and
here is the patch to apply.

  • 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_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  /*
73   * For external ethernet controller board the following
74   * parameters are needed
75   */
76  unsigned int                  port;   /* port of the board */
77  unsigned int                  irno;   /* irq of the board */
78  unsigned int                  bpar;   /* memory of the board */
79
80};
81
82struct rtems_bsdnet_config {
83        /*
84         * This entry points to the head of the ifconfig chain.
85         */
86        struct rtems_bsdnet_ifconfig *ifconfig;
87
88        /*
89         * This entry should be rtems_bsdnet_do_bootp if BOOTP
90         * is being used to configure the network, and NULL
91         * if BOOTP is not being used.
92         */
93        void                    (*bootp)(void);
94
95        /*
96         * The remaining items can be initialized to 0, in
97         * which case the default value will be used.
98         */
99        rtems_task_priority     network_task_priority;  /* 100          */
100        unsigned long           mbuf_bytecount;         /* 64 kbytes    */
101        unsigned long           mbuf_cluster_bytecount; /* 128 kbytes   */
102        char                    *hostname;              /* BOOTP        */
103        char                    *domainname;            /* BOOTP        */
104        char                    *gateway;               /* BOOTP        */
105        char                    *log_host;              /* BOOTP        */
106        char                    *name_server[3];        /* BOOTP        */
107};
108extern struct rtems_bsdnet_config rtems_bsdnet_config;
109int rtems_bsdnet_initialize_network (void);
110void rtems_bsdnet_do_bootp (void);
111
112#endif /* _RTEMS_BSDNET_ */
Note: See TracBrowser for help on using the repository browser.