OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [net/] [bsd_tcpip/] [v2_0/] [doc/] [freebsd.sgml] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
30
31
 
32
33
FreeBSD TCP/IP Stack port for eCos
34
35
          TCP/IP Networking for eCos
36
          now provides a complete
37
          TCP/IP networking stack,
38
based on a recent snapshot of the FreeBSD code, released by the
39
KAME project.
40
The networking support is
41
          fully featured and well tested within the eCos environment.
42
        
43
44
 
45
46
Networking Stack Features
47
Since this networking package is based on BSD code, it is
48
very complete and robust.  The eCos implementation includes support
49
for the following protocols:   
50
51
IPv4
52
UDP
53
TCP
54
ICMP
55
raw packet interface
56
Multi-cast addressing
57
IPv6 (including UDP, ICP, ICMP)
58
59
These additional features are also present in the package,
60
        but are not supported:
61
62
Berkeley Packet Filter   
63
Uni-cast support   
64
Multi-cast routing   
65
66
67
68
Freebsd TCP/IP stack port
69
This document describes how to get started with the Freebsd
70
TCP/IP network stack. 
71
72
Targets
73
A number of ethernet devices may be supported. The default configuration
74
supports two instances of the interface by default,
75
and you will need to write your own driver instantiation code,
76
and supplemental startup and initialization code,
77
if you should add additional ones.
78
The target for your board will normally be supplied with an
79
ethernet driver, in which case including the network stack and
80
generic ethernet driver package to your build will automatically
81
enable usage of the ethernet device driver.
82
If your target is not supplied with an ethernet
83
driver, you will need to use loopback (see
84
).
85
86
87
<!--<conditionaltext>-->Building the Network Stack
88
Using the Build->Packages dialog,
89
add the packages “Networking”,
90
“Freebsd TCP/IP Stack”
91
and “Common Ethernet Support”
92
to your configuration.  Their package names
93
are CYGPKG_NET, CYGPKG_NET_FREEBSD_STACK and CYGPKG_NET_ETH_DRIVERS
94
respectively.
95
A short-cut way to do this is by
96
using the “net” template
97
if it is available for your platform.
98
The platform-specific ethernet device driver for your platform
99
will be added as part of the target selection (in the
100
Build->Templates “Hardware” item),
101
along with the
102
PCI I/O subsystem (if relevent) and the appropriate serial device driver.
103
104
For example, the PowerPC MBX target selection adds the package
105
PKG_NET_QUICC_ETH_DRIVERS,
106
and the Cirrus Logic EDB7xxx target selection adds the package
107
CYGPKG_NET_EDB7XXX_ETH_DRIVERS.
108
After this, eCos and its tests can be built exactly as usual.
109
110
By default, most of the network tests are not built.  This
111
is because some of them require manual intervention, i.e. they are
112
to be run “by hand”, and are not suitable for
113
automated testing.  To build the full set of network tests, set
114
the configuration option CYGPKG_NET_BUILD_TESTS “Build
115
networking tests (demo programs)” within “Networking
116
support build options”.
117
118
119
120
121
APIs
122
123
Standard networking
124
The APIs for the standard networking calls such as
125
socket(), recv() and so on, are
126
in header files relative to the top-level
127
include directory, within the standard subdirectories as conventionally
128
found in /usr/include.  For example:
129
130
 install/include/arpa/tftp.h
131
 install/include/netinet/tcpip.h
132
 install/include/sys/socket.h
133
 install/include/sys/socketvar.h
134
 install/include/sys/sockio.h
135
136
137
138
139
Enhanced Select()
140
The network stack supports an extension to the standard select
141
semantics which allows all threads that are waiting to be restarted
142
even if the select conditions are not satisfied.
143
The standard select() API:  
144
int
145
select(int nfd,
146
       fd_set *in, fd_set *out, fd_set *ex,
147
       struct timeval *tv); 
148
does not support the restart.
149
The additional API:  
150
int
151
cyg_select_with_abort(int nfd,
152
       fd_set *in, fd_set *out, fd_set *ex,
153
       struct timeval *tv)
154
155
behaves exactly as select() with the additional feature that
156
a call to
157
158
void cyg_select_abort(void)
159
160
will cause all threads waiting in any
161
cyg_select_with_abort() call
162
to cease waiting and continue execution.
163
164
165
 
166

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.