]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/flow.h
[IPV6]: flowlabels are net-endian
[net-next-2.6.git] / include / net / flow.h
index 3ca210ec1379f549e0e2f0d4e3fd821283b70709..270d4c1761af478badd4da3e86bc590ccf9ae773 100644 (file)
@@ -16,8 +16,8 @@ struct flowi {
 
        union {
                struct {
-                       __u32                   daddr;
-                       __u32                   saddr;
+                       __be32                  daddr;
+                       __be32                  saddr;
                        __u32                   fwmark;
                        __u8                    tos;
                        __u8                    scope;
@@ -27,7 +27,7 @@ struct flowi {
                        struct in6_addr         daddr;
                        struct in6_addr         saddr;
                        __u32                   fwmark;
-                       __u32                   flowlabel;
+                       __be32                  flowlabel;
                } ip6_u;
 
                struct {
@@ -56,8 +56,8 @@ struct flowi {
 #define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01
        union {
                struct {
-                       __u16   sport;
-                       __u16   dport;
+                       __be16  sport;
+                       __be16  dport;
                } ports;
 
                struct {
@@ -68,12 +68,9 @@ struct flowi {
                struct {
                        __le16  sport;
                        __le16  dport;
-                       __u8    objnum;
-                       __u8    objnamel; /* Not 16 bits since max val is 16 */
-                       __u8    objname[16]; /* Not zero terminated */
                } dnports;
 
-               __u32           spi;
+               __be32          spi;
 
 #ifdef CONFIG_IPV6_MIP6
                struct {
@@ -97,7 +94,7 @@ struct flowi {
 #define FLOW_DIR_FWD   2
 
 struct sock;
-typedef void (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir,
+typedef int (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir,
                               void **objp, atomic_t **obj_refp);
 
 extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir,