]> sjero.net Git - iperf/commitdiff
Add CCID selection ability using the --ccid or -Z option
authorSamuel Jero <sj323707@ohio.edu>
Tue, 23 Oct 2012 03:50:11 +0000 (23:50 -0400)
committerSamuel Jero <sj323707@ohio.edu>
Tue, 23 Oct 2012 03:50:11 +0000 (23:50 -0400)
include/udplite.h [new file with mode: 0644]

diff --git a/include/udplite.h b/include/udplite.h
new file mode 100644 (file)
index 0000000..0fd5b36
--- /dev/null
@@ -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 <features.h>
+#include <sys/types.h>
+
+/* 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 */