Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

udp.h

Go to the documentation of this file.
00001 /*!     \file include/net/udp.h
00002  *      \brief UDP (User Datagram Protocol) layer header.
00003  *      \author Andrea Righi <drizzt@inwind.it>
00004  *      \date Last update: 2003-11-09
00005  *      \note Copyright (&copy;) 2003 Andrea Righi
00006  */
00007 
00008 #ifndef UDP_H
00009 #define UDP_H
00010 
00011 /** \ingroup Network
00012  *  \defgroup NetUDP UDP (User Datagram Protocol) layer
00013  *  The UDP (User Datagram Protocol) layer.
00014  *  @{
00015  */
00016 
00017 //! The UDP packet structure.
00018 typedef struct udp
00019 {
00020         //! The source port.
00021         uint16_t udp_src;
00022         //! The destination port.
00023         uint16_t udp_dst;
00024 
00025         //! The packet length.
00026         uint16_t udp_len;
00027         //! The UDP checksum.
00028         uint16_t udp_chk;
00029 
00030 } __attribute__ ((packed)) udp_t;
00031 
00032 // --- Prototypes ----------------------------------------------------- //
00033 
00034 void to_udp_layer(udp_t *packet, in_addr_t ip_src, in_addr_t ip_dst);
00035 
00036 /** @} */ // end of NetUDP
00037 
00038 #endif

Generated on Fri Feb 20 15:32:16 2004 for Minirighi by doxygen1.2.18