# HG changeset patch # User jlarmour # Date 1077102315 0 # Node ID be94ccfe8f4fd67a0888079825f529bdcc1e1709 # Parent 5eb5b0f9493037a5ca25d2ad6f22ee324ddc6ba6 * doc/freebsd.sgml: Import text from openbsd doc about use of __ECOS , etc. diff --git a/packages/net/bsd_tcpip/current/ChangeLog b/packages/net/bsd_tcpip/current/ChangeLog --- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,8 @@ +2004-02-18 Jonathan Larmour + + * doc/freebsd.sgml: Import text from openbsd doc about use of __ECOS + , etc. + 2004-01-17 Andrew Lunn * src/sys/kern/sockio.c (bsd_connect): Set the sa_len field in diff --git a/packages/net/bsd_tcpip/current/doc/freebsd.sgml b/packages/net/bsd_tcpip/current/doc/freebsd.sgml --- a/packages/net/bsd_tcpip/current/doc/freebsd.sgml +++ b/packages/net/bsd_tcpip/current/doc/freebsd.sgml @@ -134,6 +134,38 @@ found in /usr/include + +network.h at the top level +defines various extensions, for example the API +init_all_network_interfaces(void) +described +above. We advise including network.h whether +you use these features or not. +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: + -D__ECOS +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. +The include file network.h 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 network.h. Enhanced Select()