DCCPF_MAX_CCID_SPECIFIC = 255,
};
+/* DCCP socket options */
+#define DCCP_SOCKOPT_PACKET_SIZE 1
+
#ifdef __KERNEL__
#include <linux/in.h>
#include <linux/workqueue.h>
#include <net/inet_connection_sock.h>
+#include <net/inet_timewait_sock.h>
#include <net/sock.h>
#include <net/tcp_states.h>
#include <net/tcp.h>
return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr));
}
+static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
+{
+ return sizeof(*dh) + (dh->dccph_x ? sizeof(struct dccp_hdr_ext) : 0);
+}
+
static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
{
const struct dccp_hdr *dh = dccp_hdr(skb);
- return sizeof(*dh) + (dh->dccph_x ? sizeof(struct dccp_hdr_ext) : 0);
+ return __dccp_basic_hdr_len(dh);
}
static inline __u64 dccp_hdr_seq(const struct sk_buff *skb)
return (struct dccp_hdr_reset *)(skb->h.raw + dccp_basic_hdr_len(skb));
}
+static inline unsigned int __dccp_hdr_len(const struct dccp_hdr *dh)
+{
+ return __dccp_basic_hdr_len(dh) +
+ dccp_packet_hdr_len(dh->dccph_type);
+}
+
static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
{
- return dccp_basic_hdr_len(skb) +
- dccp_packet_hdr_len(dccp_hdr(skb)->dccph_type);
+ return __dccp_hdr_len(dccp_hdr(skb));
}
return (struct dccp_request_sock *)req;
}
+extern struct inet_timewait_death_row dccp_death_row;
+
/* Read about the ECN nonce to see why it is 253 */
#define DCCP_MAX_ACK_VECTOR_LEN 253
* @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
* @dccps_ext_header_len - network protocol overhead (IP/IPv6 options)
* @dccps_pmtu_cookie - Last pmtu seen by socket
- * @dccps_avg_packet_size - FIXME: has to be set by the app thru some setsockopt or ioctl, CCID3 uses it
+ * @dccps_packet_size - Set thru setsockopt
* @dccps_role - Role of this sock, one of %dccp_role
* @dccps_ndp_count - number of Non Data Packets since last data packet
* @dccps_hc_rx_ackpkts - receiver half connection acked packets
__u64 dccps_gsr;
__u64 dccps_gar;
unsigned long dccps_service;
- unsigned long dccps_timestamp_time;
+ struct timeval dccps_timestamp_time;
__u32 dccps_timestamp_echo;
- __u32 dccps_avg_packet_size;
+ __u32 dccps_packet_size;
unsigned long dccps_ndp_count;
__u16 dccps_ext_header_len;
__u32 dccps_pmtu_cookie;