Hi!
I am busy writing a small socket api for bgpd to lookup as paths and other
routing info from external applications and while looking at the code I
realised that stream_read() will only return if size bytes were read (even
on a non-blocking socket which means it will busy-loop).
I am pretty sure this was not the intention. If it was why even bother with
non-blocking sockets at all (e.g. the one used between zebra and the other
daemons, e.g. bgpd).
Even worse, it doesn't look like stream_read() can be modified to
return with less than size bytes since some code depend on the current
[broken] behaviour, e.g. zserv.c in zebra.
--
Regards
Abraham
TODAY the Pond!
TOMORROW the World!
-- Frogs (1972)
___________________________________________________
Abraham vd Merwe - Frogfoot Networks CC
1st Floor, Albion Springs, 183 Main Road, Newlands
Phone: +27 21 689 3876 Cell: +27 82 565 4451
Http: http://www.frogfoot.net/ Email: abz@frogfoot.net
I am busy writing a small socket api for bgpd to lookup as paths and other
routing info from external applications and while looking at the code I
realised that stream_read() will only return if size bytes were read (even
on a non-blocking socket which means it will busy-loop).
I am pretty sure this was not the intention. If it was why even bother with
non-blocking sockets at all (e.g. the one used between zebra and the other
daemons, e.g. bgpd).
Even worse, it doesn't look like stream_read() can be modified to
return with less than size bytes since some code depend on the current
[broken] behaviour, e.g. zserv.c in zebra.
--
Regards
Abraham
TODAY the Pond!
TOMORROW the World!
-- Frogs (1972)
___________________________________________________
Abraham vd Merwe - Frogfoot Networks CC
1st Floor, Albion Springs, 183 Main Road, Newlands
Phone: +27 21 689 3876 Cell: +27 82 565 4451
Http: http://www.frogfoot.net/ Email: abz@frogfoot.net