#ifndef _UDP_H_
#define _UDP_H_

#include <netutil/ip.h>
#include <netutil/types.h>


//#define UDP_DEBUG_OPTION 1

#if defined(UDP_DEBUG_OPTION)
#define UDP_DEBUG(x...) debug_printf("[ip] " x);
#else
#define UDP_DEBUG(fmt, ...) ((void)0)
#endif

/**
 * UDP header
 */
#define UDP_HLEN 8
struct udp_hdr {
  struct uint16_net src;
  struct uint16_net dest;  /* src/dest UDP ports */
  struct uint16_net len;
  struct uint16_net chksum;
} __attribute__((__packed__));


#endif
