[klibc] [PATCH 2/3] Remove packet_peek and adjusted packet_rcv as well as process_receive_event.

maximilian attems max at stro.at
Tue Mar 29 05:59:50 PDT 2011


On Mon, 28 Mar 2011, Ulrich Dangel wrote:

> packet_peek is not really necessary as it does basically nothing besides
> testing if a packet is availabe. This is already done in packet_recv.
> Adjusted do_pkt_recv to only use process_receive_event.
> 
> packet_recv was modified to only receive and use packets from the specified
> interface.
> 
> process_receive_event was adjusted to handle discared/ignored packages from
> the corresponding recv functions. As packet_recv could return 0 for
> ignored packets process_receive_event handled them as processed/handled
> packets resulting in an endless loop if new (non valid dhcp/bootp) packets
> were received.
> 
> As a side effect ignored packets are now shown automatically in the debug
> output.
> 
> Signed-off-by: Ulrich Dangel <uli at spamt.net>
> ---
>  usr/kinit/ipconfig/main.c   |   24 +++++++++++++-----------
>  usr/kinit/ipconfig/packet.c |   43 +++++++------------------------------------
>  usr/kinit/ipconfig/packet.h |    1 -
>  3 files changed, 20 insertions(+), 48 deletions(-)

applied and pushed out.

-- 
maks



More information about the klibc mailing list