uip_ore_config Struct Reference

Configuration for the uIP library. More...

List of all members.

Public Attributes

char ip [16]
 IP address.
unsigned short port_nr
 port number to use
L4_CV void(* recv_callback )(const void *buf, const unsigned size, unsigned port)
 Received a packet.
L4_CV void(* ack_callback )(void *addr, unsigned port)
 Send acknowledgement received.
L4_CV void(* rexmit_callback )(void *addr, unsigned size, unsigned port)
 Retransmit of message necessary.
L4_CV void(* connect_callback )(const struct in_addr ip, unsigned port)
 Connection established.
L4_CV void(* abort_callback )(unsigned port)
 Connection has been aborted.
L4_CV void(* timeout_callback )(unsigned port)
 Connection timed out.
L4_CV void(* close_callback )(unsigned port)
 Connection closed.
L4_CV void(* poll_callback )(void)
 Periodic poll callback.


Detailed Description

Configuration for the uIP library.

Definition at line 21 of file uip-ore.h.


Member Data Documentation

L4_CV void(* uip_ore_config::recv_callback)(const void *buf, const unsigned size, unsigned port)

Received a packet.

Parameters:
buf the packet data
size data size in bytes
port port the data was received through
NOTE: buf is invalid after returning from this function, so you need to make a copy if necessary.

L4_CV void(* uip_ore_config::ack_callback)(void *addr, unsigned port)

Send acknowledgement received.

This is called so that the user is able to free dynamically allocated buffers after they have been successfully sent.

NOTE: When closing the connection, all pending data is dropped. For each dropped packet the ack_callback() is also called, because also these packets might be needed to be freed.

Parameters:
addr address of the buffer that has been acknowledged/dropped.
port port this packet was sent through

L4_CV void(* uip_ore_config::rexmit_callback)(void *addr, unsigned size, unsigned port)

Retransmit of message necessary.

This could also be done by the library, but the callback shall give you the opportunity to react upon such situations.

Parameters:
addr packet needing to be retransmitted. Just call uip_ore_send() again.
size size of packet
port port to resend to

L4_CV void(* uip_ore_config::connect_callback)(const struct in_addr ip, unsigned port)

Connection established.

Parameters:
ip IP address remote host
port remote port

L4_CV void(* uip_ore_config::abort_callback)(unsigned port)

Connection has been aborted.

Parameters:
port remote port

L4_CV void(* uip_ore_config::timeout_callback)(unsigned port)

Connection timed out.

Parameters:
port remote port

L4_CV void(* uip_ore_config::close_callback)(unsigned port)

Connection closed.

Parameters:
port remote port

L4_CV void(* uip_ore_config::poll_callback)(void)

Periodic poll callback.

uIP periodically polls the server callback function every 500 ms. If you want to do something upon this period, this is the callback to do so.


The documentation for this struct was generated from the following file:

Generated on Wed Apr 11 06:37:32 2012 for ORe - a software network switch for L4 by  doxygen 1.5.6