/*-------------------------------------------------------------*/
typedef netwib_err (*netwib_ip_frag_pf)(netwib_constbuf *pfrag,
netwib_ptr infos);
/*-------------------------------------------------------------*/
/* Name : netwib_ip_frag
Description :
Fragment an IP packet
Input parameter(s) :
*pippkt : IP packet (containing IP header)
fragsize : fragment size (1 means 8 bytes, and n means
8*n bytes)
fragsize = (mtu - NETWIB_IP4HDR_LEN -
NETWIB_IP4OPT_MAXLEN) / 8
if fragsize == 0, there is no fragmentation
pfunc : memory address of the function which will
be called for each fragment
For each call, the first parameter ('infos')
will be set with the optional parameter below.
Input/output parameter(s) :
infos : optional parameter (can be NULL) which will be
used as the first parameter for *pfunc.
This may be used to send information to *pfunc.
Output parameter(s) :
Normal return values :
NETWIB_ERR_OK : ok
*/
netwib_err netwib_ip_frag(netwib_constbuf *pippkt,
netwib_uint32 fragsize,
netwib_ip_frag_pf pfunc,
netwib_ptr infos);