File: nasl_udp.h

package info (click to toggle)
libnasl 2.2.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,468 kB
  • ctags: 1,264
  • sloc: ansic: 15,596; sh: 7,735; yacc: 1,051; makefile: 255; perl: 27
file content (25 lines) | stat: -rw-r--r-- 569 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef NESSUS_UDP_H__
#define NESSUS_UDP_H__

#ifdef HAVE_NETINET_UDP_H
#include <netinet/udp.h>
#endif

#if !defined(HAVE_STRUCT_UDPHDR) || HAVE_STRUCT_UDPHDR == 0
#define HAVE_STRUCT_UDPHDR 1
struct udphdr {
	u_short	uh_sport;		/* source port */
	u_short	uh_dport;		/* destination port */
	u_short	uh_ulen;		/* udp length */
	u_short	uh_sum;			/* udp checksum */
};
#endif

#if defined(HAVE_STRUCT_UDPHDR) && !defined(HAVE_BSD_STRUCT_UDPHDR) && !defined(_CYGWIN_)
#define uh_sport source
#define uh_dport dest
#define uh_ulen len
#define uh_sum check
#endif

#endif