]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/sctp/structs.h
[SCTP]: Use HMAC template and hash interface
[linux-2.6-omap-h63xx.git] / include / net / sctp / structs.h
index 7f4fea173fb1a5bf1c11eb4099f3558c01be2220..0412e730c76537d97077e2b000645fcb1482aaa5 100644 (file)
@@ -87,6 +87,7 @@ struct sctp_bind_addr;
 struct sctp_ulpq;
 struct sctp_ep_common;
 struct sctp_ssnmap;
+struct crypto_hash;
 
 
 #include <net/sctp/tsnmap.h>
@@ -264,7 +265,7 @@ struct sctp_sock {
        struct sctp_pf *pf;
 
        /* Access to HMAC transform. */
-       struct crypto_tfm *hmac;
+       struct crypto_hash *hmac;
 
        /* What is our base endpointer? */
        struct sctp_endpoint *ep;
@@ -445,6 +446,7 @@ typedef struct sctp_sender_hb_info {
        struct sctp_paramhdr param_hdr;
        union sctp_addr daddr;
        unsigned long sent_at;
+       __u64 hb_nonce;
 } __attribute__((packed)) sctp_sender_hb_info_t;
 
 /*
@@ -555,7 +557,8 @@ struct sctp_af {
        int             (*to_addr_param) (const union sctp_addr *,
                                          union sctp_addr_param *); 
        int             (*addr_valid)   (union sctp_addr *,
-                                        struct sctp_sock *);
+                                        struct sctp_sock *,
+                                        const struct sk_buff *);
        sctp_scope_t    (*scope) (union sctp_addr *);
        void            (*inaddr_any)   (union sctp_addr *, unsigned short);
        int             (*is_any)       (const union sctp_addr *);
@@ -729,13 +732,10 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
 const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
 
 /* This is a structure for holding either an IPv6 or an IPv4 address.  */
-/* sin_family -- AF_INET or AF_INET6
- * sin_port -- ordinary port number
- * sin_addr -- cast to either (struct in_addr) or (struct in6_addr)
- */
 struct sctp_sockaddr_entry {
        struct list_head list;
        union sctp_addr a;
+       __u8 use_as_src;
 };
 
 typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
@@ -983,6 +983,9 @@ struct sctp_transport {
                 */
                char cacc_saw_newack;
        } cacc;
+
+       /* 64-bit random number sent with heartbeat. */
+       __u64 hb_nonce;
 };
 
 struct sctp_transport *sctp_transport_new(const union sctp_addr *,
@@ -1137,7 +1140,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
                        sctp_scope_t scope, gfp_t gfp,
                        int flags);
 int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
-                      gfp_t gfp);
+                      __u8 use_as_src, gfp_t gfp);
 int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
 int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
                         struct sctp_sock *);