lcrzo_packet(3)

NAME
lcrzo_packet - lcrzo library : packet shaping and decoding

CONTENTS
/*    Laurent Constantin's network library (lcrzo)
                 lcrzo_packet module
  Functions herein allow to create and decode packets.
*/
/*-------------------------------------------------------------*/
/************************************************************
 * Note about header fields modification :                  *
 * Some header fields (hdrlip.totlen, hdrludp.len, etc.)    *
 * might be computed by functions lcrzo_packet_init_xxx.    *
 *                                                          *
 * the function lcrzo_global_set_hdr_computefields allows   *
 * to define if lcrzo has to recompute fields :             *
 *  - lcrzo_global_set_hdr_computefields(LCRZO_FALSE) :     *
 *    do not recompute, so use user's values                *
 *  - lcrzo_global_set_hdr_computefields(LCRZO_TRUE) :      *
 *    recompute (we can refine computed fields with         *
 *    lcrzo_global_set_hdr_cf_xxx)                          *
 *                                                          *
 * If we choose to compute, fields are computed only if     *
 * they value is different from default value. Concerned    *
 * fields are (followed by they default value) :            *
 *     hdrleth.type    LCRZO_VALDEF_ETHTYPE                 *
 *     hdrlip.totlen   LCRZO_VALDEF_IPTOTLEN                *
 *     hdrlip.ihl      LCRZO_VALDEF_IPIHL                   *
 *     hdrlip.check    LCRZO_VALDEF_IPCHECK                 *
 *     hdrlip.protocol LCRZO_VALDEF_IPPROTOCOL              *
 *     hdrludp.len     LCRZO_VALDEF_UDPLEN                  *
 *     hdrludp.check   LCRZO_VALDEF_UDPCHECK                *
 *     hdrltcp.doff    LCRZO_VALDEF_TCPDOFF                 *
 *     hdrltcp.check   LCRZO_VALDEF_TCPCHECK                *
 *     hdrlicmp.check  LCRZO_VALDEF_ICMPCHECK               *
 * Other fields aren't computed by lcrzo.                   *
 ************************************************************/
/* Name : lcrzo_packet_initm_ipoptdata
   Description :
     Initialize a packet with {IP header, IP options, IP data}.
   Input parameter(s) :
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     data : IP data
     datasize : IP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ipoptdata(lcrzo_hdrlip hdrlip,
				 lcrzo_constipopt ipopt,
				 lcrzo_uint8 ipoptsize,
				 lcrzo_constdata data,
				 lcrzo_uint16 datasize,
				 lcrzo_data *pdataout,
				 lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ipoptudpdata
   Description :
     Initialize a packet with {IP header, IP options,
     UDP header, UDP data}.
   Input parameter(s) :
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrludp : UDP header
     data : UDP data
     datasize : UDP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ipoptudpdata(lcrzo_hdrlip hdrlip,
				    lcrzo_constipopt ipopt,
				    lcrzo_uint8 ipoptsize,
				    lcrzo_hdrludp hdrludp,
				    lcrzo_constdata data,
				    lcrzo_uint16 datasize,
				    lcrzo_data *pdataout,
				    lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ipopttcpoptdata
   Description :
     Initialize a packet with {IP header, IP options,
     TCP header, TCP options, TCP data}.
   Input parameter(s) :
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrltcp : TCP header
     tcpopt : TCP options
     tcpoptsize : TCP options size
     data : TCP data
     datasize : TCP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ipopttcpoptdata(lcrzo_hdrlip hdrlip,
				       lcrzo_constipopt ipopt,
				       lcrzo_uint8 ipoptsize,
				       lcrzo_hdrltcp hdrltcp,
				       lcrzo_consttcpopt tcpopt,
				       lcrzo_uint8 tcpoptsize,
				       lcrzo_constdata data,
				       lcrzo_uint16 datasize,
				       lcrzo_data *pdataout,
				       lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_icmpdata
   Description :
     Initialize a packet with {ICMP header, ICMP data}.
   Input parameter(s) :
     hdrlicmp : ICMP header
     icmpdata : ICMP data
     icmpdatasize : ICMP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_icmpdata(lcrzo_hdrlicmp hdrlicmp,
				lcrzo_constdata icmpdata,
				lcrzo_uint16 icmpdatasize,
				lcrzo_data *pdataout,
				lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ipopticmpdata
   Description :
     Initialize a packet with {IP header, IP options,
     ICMP header, ICMP data}.
   Input parameter(s) :
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrlicmp : ICMP header
     data : ICMP data
     datasize : ICMP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ipopticmpdata(lcrzo_hdrlip hdrlip,
				     lcrzo_constipopt ipopt,
				     lcrzo_uint8 ipoptsize,
				     lcrzo_hdrlicmp hdrlicmp,
				     lcrzo_constdata data,
				     lcrzo_uint16 datasize,
				     lcrzo_data *pdataout,
				     lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ethdata
   Description :
     Initialize a packet with {Ethernet header, Ethernet data}.
   Input parameter(s) :
     hdrleth : Ethernet header
     data : Ethernet data
     datasize : Ethernet data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ethdata(lcrzo_hdrleth hdrleth,
			       lcrzo_constdata data,
			       lcrzo_uint16 datasize,
			       lcrzo_data *pdataout,
			       lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ethipoptdata
   Description :
     Initialize a packet with {Ethernet header, IP header,
     IP options, IP data}.
   Input parameter(s) :
     hdrleth : Ethernet header
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     data : IP data
     datasize : IP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ethipoptdata(lcrzo_hdrleth hdrleth,
				    lcrzo_hdrlip hdrlip,
				    lcrzo_constipopt ipopt,
				    lcrzo_uint8 ipoptsize,
				    lcrzo_constdata data,
				    lcrzo_uint16 datasize,
				    lcrzo_data *pdataout,
				    lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ethipoptudpdata
   Description :
     Initialize a packet with {Ethernet header, IP header,
     IP options, UDP header, UDP data}.
   Input parameter(s) :
     hdrleth : Ethernet header
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrludp : UDP header
     data : UDP data
     datasize : UDP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ethipoptudpdata(lcrzo_hdrleth hdrleth,
				       lcrzo_hdrlip hdrlip,
				       lcrzo_constipopt ipopt,
				       lcrzo_uint8 ipoptsize,
				       lcrzo_hdrludp hdrludp,
				       lcrzo_constdata data,
				       lcrzo_uint16 datasize,
				       lcrzo_data *pdataout,
				       lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ethipopttcpoptdata
   Description :
     Initialize a packet with {Ethernet header, IP header,
     IP options, TCP header, TCP options, TCP data}.
   Input parameter(s) :
     hdrleth : Ethernet header
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrltcp : TCP header
     tcpopt : TCP options
     tcpoptsize : TCP options size
     data : TCP data
     datasize : TCP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ethipopttcpoptdata(lcrzo_hdrleth hdrleth,
					  lcrzo_hdrlip hdrlip,
					  lcrzo_constipopt ipopt,
					  lcrzo_uint8 ipoptsize,
					  lcrzo_hdrltcp hdrltcp,
					  lcrzo_consttcpopt tcpopt,
					  lcrzo_uint8 tcpoptsize,
					  lcrzo_constdata data,
					  lcrzo_uint16 datasize,
					  lcrzo_data *pdataout,
					  lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_ethipopticmpdata
   Description :
     Initialize a packet with {Ethernet header, IP header,
     IP options, ICMP header, ICMP data}.
   Input parameter(s) :
     hdrleth : Ethernet header
     hdrlip : IP header
     ipopt : IP options
     ipoptsize : IP options size
     hdrlicmp : ICMP header
     data : ICMP data
     datasize : ICMP data size
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_ethipopticmpdata(lcrzo_hdrleth hdrleth,
					lcrzo_hdrlip hdrlip,
					lcrzo_constipopt ipopt,
					lcrzo_uint8 ipoptsize,
					lcrzo_hdrlicmp hdrlicmp,
					lcrzo_constdata data,
					lcrzo_uint16 datasize,
					lcrzo_data *pdataout,
					lcrzo_int32 *pdataoutsize);
/* Name : lcrzo_packet_initm_etharp
   Description :
     Initialize a packet with {Ethernet header, ARP header}.
   Input parameter(s) :
     hdrleth : Ethernet header
     hdrlarp : ARP header
   Input/output parameter(s) :
   Output parameter(s) :
     dataout : output array.
     *pdataoutsize : reached size of dataout
   Normal return values :
     LCRZO_ERR_OK : ok
*/
int lcrzo_packet_initm_etharp(lcrzo_hdrleth hdrleth,
			      lcrzo_hdrlarp hdrlarp,
			      lcrzo_data *pdataout,
			      lcrzo_int32 *pdataoutsize);
/*-------------------------------------------------------------*/
/* Name : lcrzo_packet_decodem_ipoptdata
   Description :
     Check if a packet contains {IP header,
     IP options, IP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     data : IP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ipoptdata(lcrzo_constdata packet,
				   lcrzo_int32 packetsize,
				   lcrzo_hdrlip *phdrlip,
				   lcrzo_ipopt ipopt,
				   lcrzo_uint8 *pipoptsize,
				   lcrzo_data *pdata,
				   lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_udpdata
   Description :
     Check if a packet contains {UDP header, UDP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrludp : UDP header
     data : UDP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_udpdata(lcrzo_constdata packet,
				 lcrzo_int32 packetsize,
				 lcrzo_hdrludp *phdrludp,
				 lcrzo_data *pdata,
				 lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_tcpoptdata
   Description :
     Check if a packet contains {TCP header,
     TCP options, TCP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrltcp : TCP header
     tcpopt : TCP options
     *ptcpoptsize : size of tcpopt
     data : TCP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_tcpoptdata(lcrzo_constdata packet,
				    lcrzo_int32 packetsize,
				    lcrzo_hdrltcp *phdrltcp,
				    lcrzo_tcpopt tcpopt,
				    lcrzo_uint8 *ptcpoptsize,
				    lcrzo_data *pdata,
				    lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_icmpdata
   Description :
     Check if a packet contains {ICMP header, ICMP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlicmp : ICMP header
     data : ICMP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_icmpdata(lcrzo_constdata packet,
				  lcrzo_int32 packetsize,
				  lcrzo_hdrlicmp *phdrlicmp,
				  lcrzo_data *pdata,
				  lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ethdata
   Description :
     Check if a packet contains {Ethernet header, Ethernet data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     data : Ethernet data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ethdata(lcrzo_constdata packet,
				 lcrzo_int32 packetsize,
				 lcrzo_hdrleth *phdrleth,
				 lcrzo_data *pdata,
				 lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decode_arp
   Description :
     Check if a packet contains {ARP/RARP header}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlarp : arp/rarp header
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decode_arp(lcrzo_constdata packet,
			    lcrzo_int32 packetsize,
			    lcrzo_hdrlarp *phdrlarp);

/* Name : lcrzo_packet_decodem_ipoptudpdata
   Description :
     Check if a packet contains {IP header,
     IP options, UDP header, UDP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrludp : UDP header
     data : UDP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ipoptudpdata(lcrzo_constdata packet,
				      lcrzo_int32 packetsize,
				      lcrzo_hdrlip *phdrlip,
				      lcrzo_ipopt ipopt,
				      lcrzo_uint8 *pipoptsize,
				      lcrzo_hdrludp *phdrludp,
				      lcrzo_data *pdata,
				      lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ipopttcpoptdata
   Description :
     Check if a packet contains {IP header,
     IP options, TCP header, TCP options, TCP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrltcp : TCP header
     tcpopt : TCP options
     *ptcpoptsize : size of tcpopt
     data : TCP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ipopttcpoptdata(lcrzo_constdata packet,
					 lcrzo_int32 packetsize,
					 lcrzo_hdrlip *phdrlip,
					 lcrzo_ipopt ipopt,
					 lcrzo_uint8 *pipoptsize,
					 lcrzo_hdrltcp *phdrltcp,
					 lcrzo_tcpopt tcpopt,
					 lcrzo_uint8 *ptcpoptsize,
					 lcrzo_data *pdata,
					 lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ipopticmpdata
   Description :
     Check if a packet contains {IP header,
     IP options, ICMP header, ICMP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrlicmp : ICMP header
     data : ICMP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ipopticmpdata(lcrzo_constdata packet,
				       lcrzo_int32 packetsize,
				       lcrzo_hdrlip *phdrlip,
				       lcrzo_ipopt ipopt,
				       lcrzo_uint8 *pipoptsize,
				       lcrzo_hdrlicmp *phdrlicmp,
				       lcrzo_data *pdata,
				       lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ethipoptdata
   Description :
     Check if a packet contains {Ethernet header, IP header,
     IP options, IP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     data : IP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ethipoptdata(lcrzo_constdata packet,
				      lcrzo_int32 packetsize,
				      lcrzo_hdrleth *phdrleth,
				      lcrzo_hdrlip *phdrlip,
				      lcrzo_ipopt ipopt,
				      lcrzo_uint8 *pipoptsize,
				      lcrzo_data *pdata,
				      lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ethipoptudpdata
   Description :
     Check if a packet contains {Ethernet header, IP header,
     IP options, UDP header, UDP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrludp : UDP header
     data : UDP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ethipoptudpdata(lcrzo_constdata packet,
					 lcrzo_int32 packetsize,
					 lcrzo_hdrleth *phdrleth,
					 lcrzo_hdrlip *phdrlip,
					 lcrzo_ipopt ipopt,
					 lcrzo_uint8 *pipoptsize,
					 lcrzo_hdrludp *phdrludp,
					 lcrzo_data *pdata,
					 lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decodem_ethipopttcpoptdata
   Description :
     Check if a packet contains {Ethernet header, IP header,
     IP options, TCP header, TCP options, TCP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrltcp : TCP header
     tcpopt : TCP options
     *ptcpoptsize : size of tcpopt
     data : TCP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ethipopttcpoptdata(lcrzo_constdata packet,
					    lcrzo_int32 packetsize,
					    lcrzo_hdrleth *phdrleth,
					    lcrzo_hdrlip *phdrlip,
					    lcrzo_ipopt ipopt,
					    lcrzo_uint8 *pipoptsize,
					    lcrzo_hdrltcp *phdrltcp,
					    lcrzo_tcpopt tcpopt,
					    lcrzo_uint8 *ptcpoptsize,
					    lcrzo_data *pdata,
					    lcrzo_uint16 *pdatasize);

/* Name : lcrzo_packet_decodem_ethipopticmpdata
   Description :
     Check if a packet contains {Ethernet header, IP header,
     IP options, ICMP header, ICMP data}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     *phdrlip : IP header
     ipopt : IP options
     *pipoptsize : size of ipopt
     *phdrlicmp : ICMP header
     data : ICMP data
     *pdatasize : reached size of data
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decodem_ethipopticmpdata(lcrzo_constdata packet,
					  lcrzo_int32 packetsize,
					  lcrzo_hdrleth *phdrleth,
					  lcrzo_hdrlip *phdrlip,
					  lcrzo_ipopt ipopt,
					  lcrzo_uint8 *pipoptsize,
					  lcrzo_hdrlicmp *phdrlicmp,
					  lcrzo_data *pdata,
					  lcrzo_uint16 *pdatasize);
/* Name : lcrzo_packet_decode_etharp
   Description :
     Check if a packet contains {Ethernet header, ARP header}.
   Input parameter(s) :
     packet : packet to check
     packetsize : size of packet
   Input/output parameter(s) :
   Output parameter(s) :
     *phdrleth : Ethernet header
     *phdrlarp : arp/rarp header
   Normal return values :
     LCRZO_ERR_OK : packet decoded
     LCRZO_ERR_OKNOTDECODED : packet not decoded
*/
int lcrzo_packet_decode_etharp(lcrzo_constdata packet,
			       lcrzo_int32 packetsize,
			       lcrzo_hdrleth *phdrleth,
			       lcrzo_hdrlarp *phdrlarp);

SEE ALSO
lcrzo(3), lcrzo_types(3), lcrzo_data(3), lcrzo_string(3), lcrzo_time(3), lcrzo_file(3), lcrzo_address(3), lcrzo_device(3), lcrzo_list(3), lcrzo_process(3), lcrzo_ipc(3), lcrzo_header(3), lcrzo_ipopt(3), lcrzo_tcpopt(3), lcrzo_packet(3), lcrzo_icmp(3), lcrzo_print(3), lcrzo_record(3), lcrzo_conf(3), lcrzo_spoof(3), lcrzo_sniff(3), lcrzo_sock(3), lcrzo_wait(3), lcrzo_global(3), lcrzo_error(3) lcrzo_misc(3), lcrzo_obso(3),