From: Samuel Jero Date: Tue, 23 Oct 2012 03:50:11 +0000 (-0400) Subject: Add CCID selection ability using the --ccid or -Z option X-Git-Url: http://sjero.net/git/?p=iperf;a=commitdiff_plain;h=aa46daeecd3ec48b050a72325693993204762a34 Add CCID selection ability using the --ccid or -Z option --- diff --git a/include/udplite.h b/include/udplite.h new file mode 100644 index 0000000..0fd5b36 --- /dev/null +++ b/include/udplite.h @@ -0,0 +1,40 @@ +/* + * /usr/include/netinet/udplite.h: + * + * UDP-Lite (RFC 3828) fields and protocol constants. + * + * + * By William Stanislaus and Gerrit Renker, 2006. + */ + +#ifndef __NETINET_UDPLITE_H +#define __NETINET_UDPLITE_H 1 + +#include +#include + +/* UDP-Lite does not support BSD style sockets, the following is always used. */ + +struct udplitehdr { + u_int16_t source; /* Source port. */ + u_int16_t dest; /* Destination port. */ + u_int16_t len; /* UDP Lite checksum coverage length. */ + u_int16_t check; /* UDP Lite checksum. */ +}; + +/* + * Socket options for UDP Lite, see set|getsockopt(2). + */ +#define SOL_UDPLITE 136 /* Sockopt level */ +/* + * The following socket options set the checksum coverage lengths. + * Sender checksum coverage sets the coverage to exactly the value passed to + * sockopt (given a valid value is passed). + * Receiver checksum coverage is a _minimum_ checksum coverage: all incoming + * packets not matching this value will be discarded. + * See also RFC 3828. + */ +#define UDPLITE_SEND_CSCOV 10 /* Actual coverage length */ +#define UDPLITE_RECV_CSCOV 11 /* Minimum acceptable coverage */ + +#endif /* __NETINET_UDPLITE_H */