Changeset ead7fdc in rtems-libbsd
- Timestamp:
- 05/16/14 11:35:21 (10 years ago)
- Branches:
- 4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
- Children:
- 8e2e9b3
- Parents:
- 14ba206
- git-author:
- Sebastian Huber <sebastian.huber@…> (05/16/14 11:35:21)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (05/16/14 11:37:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libbsd.txt
r14ba206 read7fdc 50 50 . Clone the Git repository +git clone git://git.rtems.org/rtems-libbsd.git+. 51 51 . Change into the RTEMS BSD library root directory. 52 . Edit the 'config.inc'Makefile configuration file and adjust it to your environment.52 . Edit the `config.inc` Makefile configuration file and adjust it to your environment. 53 53 . Run +make clean+. 54 54 . Run +make install+. … … 116 116 === BSD Library Configuration and Build === 117 117 118 In the BSD library source directory edit the file 'config.inc'. Continuing on119 the above, the 'config.inc'used to match the above is:118 In the BSD library source directory edit the file `config.inc`. Continuing on 119 the above, the `config.inc` used to match the above is: 120 120 121 121 ------------------------------------------------------------------------------- … … 173 173 ------------------------------------------------------------------------------- 174 174 #include <assert.h> 175 175 #include <sysexits.h> 176 177 #include <machine/rtems-bsd-commands.h> 176 178 #include <rtems/bsd/bsd.h> 177 179 178 void do_init(void) 180 static void 181 network_ifconfig_lo0(void) 179 182 { 180 rtems_status_code sc; 181 182 sc = rtems_bsd_initialize(); 183 assert(sc == RTEMS_SUCCESSFUL); 183 int exit_code; 184 char *lo0[] = { 185 "ifconfig", 186 "lo0", 187 "inet", 188 "127.0.0.1", 189 "netmask", 190 "255.255.255.0", 191 NULL 192 }; 193 char *lo0_inet6[] = { 194 "ifconfig", 195 "lo0", 196 "inet6", 197 "::1", 198 "prefixlen", 199 "128", 200 NULL 201 }; 202 203 exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0), lo0); 204 assert(exit_code == EX_OK); 205 206 exit_code = rtems_bsd_command_ifconfig(RTEMS_BSD_ARGC(lo0_inet6), lo0_inet6); 207 assert(exit_code == EX_OK); 184 208 } 185 ------------------------------------------------------------------------------- 209 210 void 211 network_init(void) 212 { 213 rtems_status_code sc; 214 215 sc = rtems_bsd_initialize(); 216 assert(sc == RTEMS_SUCCESSFUL); 217 218 network_ifconfig_lo0(); 219 } 220 ------------------------------------------------------------------------------- 221 222 This performs the basic network stack initialization with a loopback interface. 223 Further initialization must be done using the standard BSD network 224 configuration commands 225 http://www.freebsd.org/cgi/man.cgi?query=ifconfig&apropos=0&sektion=8&manpath=FreeBSD+9.2-RELEASE&arch=default&format=html[IFCONFIG(8)] 226 using `rtems_bsd_command_ifconfig()` and 227 http://www.freebsd.org/cgi/man.cgi?query=route&apropos=0&sektion=8&manpath=FreeBSD+9.2-RELEASE&arch=default&format=html[ROUTE(8)] 228 using `rtems_bsd_command_route()`. For an example please have a look at 229 `testsuite/include/rtems/bsd/test/default-network-init.h`. 186 230 187 231 == Network Stack Features
Note: See TracChangeset
for help on using the changeset viewer.