Mercurial > flash_v2
changeset 1502:be94ccfe8f4f
* doc/freebsd.sgml: Import text from openbsd doc about use of __ECOS
<network.h>, etc.
| author | jlarmour |
|---|---|
| date | Wed, 18 Feb 2004 11:05:15 +0000 |
| parents | 5eb5b0f94930 |
| children | 0ec4d1b9182f |
| files | packages/net/bsd_tcpip/current/ChangeLog packages/net/bsd_tcpip/current/doc/freebsd.sgml |
| diffstat | 2 files changed, 37 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,8 @@ +2004-02-18 Jonathan Larmour <jifl@eCosCentric.com> + + * doc/freebsd.sgml: Import text from openbsd doc about use of __ECOS + <network.h>, etc. + 2004-01-17 Andrew Lunn <andrew.lunn@ascom.ch> * src/sys/kern/sockio.c (bsd_connect): Set the sa_len field in
--- a/packages/net/bsd_tcpip/current/doc/freebsd.sgml +++ b/packages/net/bsd_tcpip/current/doc/freebsd.sgml @@ -134,6 +134,38 @@ found in <FILENAME>/usr/include</FILENAM install/include/sys/sockio.h </PROGRAMLISTING> </PARA> +<PARA> +<filename>network.h</filename> at the top level +defines various extensions, for example the API +<function>init_all_network_interfaces(void)</function> +described +above. We advise including <filename>network.h</filename> whether +you use these features or not.</PARA> +<PARA>In general, using the networking code may require definition +of two symbols: _KERNEL and __ECOS. _KERNEL +is not normally required; __ECOS is normally required. +So add this to your compile lines for files which use the network +stack:</PARA> +<PROGRAMLISTING> -D__ECOS</PROGRAMLISTING> +<PARA>To expand a little, it’s like this because this is +a port of a standard distribution external to eCos. One goal +is to perturb the sources as little as possible, so that upgrading +and maintenance from the external distribution is simplified. The __ECOS +symbol marks out the eCos additions in making the port. +The _KERNEL symbol is traditional UNIX practice: it distinguishes +a compilation which is to be linked into the kernel from one which +is part of an application. eCos applications are fully linked, +so this distinction does not apply. _KERNEL can however +be used to control the visibility of the internals of the stack, +so depending on what features your application uses, it may or may +not be necessary.</PARA> +<PARA>The include file <filename>network.h</filename> undefines _KERNEL +unconditionally, to provide an application-like compilation environment. +If you were writing code which, for example, +enumerates the stack’s internal +structures, that is a kernel-like compilation environment, so you +would need to define _KERNEL (in addition to __ECOS) +and avoid including <filename>network.h</filename>.</PARA> </SECT1> <SECT1 id="tcpip-freebsd-enhanced-select"> <TITLE>Enhanced Select()</TITLE>
