]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/dccp.h
[PATCH] ipc: convert /proc/sysvipc/* to generic seq_file interface
[linux-2.6-omap-h63xx.git] / include / linux / dccp.h
index fd1412ddb3ff3de7a0f24c7b99a7083ecf8a68c1..007c290f74d4557b38161fe1ef9378fc4919f0bb 100644 (file)
@@ -186,6 +186,9 @@ enum {
        DCCPF_MAX_CCID_SPECIFIC = 255,
 };
 
+/* DCCP socket options */
+#define DCCP_SOCKOPT_PACKET_SIZE       1
+
 #ifdef __KERNEL__
 
 #include <linux/in.h>
@@ -194,6 +197,7 @@ enum {
 #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>
@@ -242,10 +246,15 @@ static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
        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)
@@ -297,10 +306,15 @@ static inline struct dccp_hdr_reset *dccp_hdr_reset(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));
 }
 
 
@@ -344,6 +358,8 @@ static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req)
        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
 
@@ -383,7 +399,7 @@ enum dccp_role {
  * @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
@@ -402,9 +418,9 @@ struct dccp_sock {
        __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;