network stack sysctl problems.

Steven Johnson sjohnson at sakuraindustries.com
Thu Aug 24 19:17:30 UTC 2006


Please see attached patch against rtems 4.6.99.3.

It appeared to us that when building rtems, the network sysctl's were
being excluded by either the compiler or linker such that after the
program was being built they were invisible. (This is with GCC 4.1, and
latest binutils, etc)

We had to remove the static declarations in __MAKE_SET and SYSCTL_OID,
to force them to be public, so the compiler/linker wouldn't make
incorrect assumptions about them being referenced or not.  We noticed
that in kern_sysctl.c there is an rtems change of

#if defined(__rtems__)
void
#else
static void
#endif
sysctl_register_all(void *arg)

So we made our patch reflect this.

The only other change we made, which isn't reflected by the diff,
because it is part of our code and not the rtems code case was:

*(set_sysctl_*);
line in the link script changed to be
KEEP(*(set_sysctl_*))

This may effect the standard BSP's, but I don't use or build those, so
it wasn't possible for me to test that it was necessary for the standard
BSP's.

Also, I asked this before, but I don't remember getting a reply,  is it
possible to get "sysctlbyname" added as a standard network stack
function in rtems for 4.7?  The wiki mentions the function.  Its useful
for editing these types of sysctl values and isn't much code.  I know
its not currently an impediment to anyone because they can just include
the routine in their own code like I did, but it does seem like a useful
thin to have available as standard, without having to go to the wiki,
and add the code to your own project.  Just asking, it isn't an
impediment to me either way. 

Steven J


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems-4.6.99.3-sysctl-non-static-fix.patch
Type: text/x-patch
Size: 2075 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20060825/02ada1e1/attachment.bin>


More information about the users mailing list