~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/net/inet_sock.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        unsigned char   __data[0];
58
58
};
59
59
 
60
 
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
 
60
struct ip_options_rcu {
 
61
        struct rcu_head rcu;
 
62
        struct ip_options opt;
 
63
};
 
64
 
 
65
struct ip_options_data {
 
66
        struct ip_options_rcu   opt;
 
67
        char                    data[40];
 
68
};
61
69
 
62
70
struct inet_request_sock {
63
71
        struct request_sock     req;
78
86
                                acked      : 1,
79
87
                                no_srccheck: 1;
80
88
        kmemcheck_bitfield_end(flags);
81
 
        struct ip_options       *opt;
 
89
        struct ip_options_rcu   *opt;
82
90
};
83
91
 
84
92
static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
86
94
        return (struct inet_request_sock *)sk;
87
95
}
88
96
 
 
97
struct inet_cork {
 
98
        unsigned int            flags;
 
99
        __be32                  addr;
 
100
        struct ip_options       *opt;
 
101
        unsigned int            fragsize;
 
102
        struct dst_entry        *dst;
 
103
        int                     length; /* Total length of all frames */
 
104
        struct page             *page;
 
105
        u32                     off;
 
106
        u8                      tx_flags;
 
107
};
 
108
 
 
109
struct inet_cork_full {
 
110
        struct inet_cork        base;
 
111
        struct flowi            fl;
 
112
};
 
113
 
89
114
struct ip_mc_socklist;
90
115
struct ipv6_pinfo;
91
116
struct rtable;
127
152
        __be16                  inet_sport;
128
153
        __u16                   inet_id;
129
154
 
130
 
        struct ip_options       *opt;
 
155
        struct ip_options_rcu __rcu     *inet_opt;
131
156
        __u8                    tos;
132
157
        __u8                    min_ttl;
133
158
        __u8                    mc_ttl;
143
168
        int                     mc_index;
144
169
        __be32                  mc_addr;
145
170
        struct ip_mc_socklist __rcu     *mc_list;
146
 
        struct {
147
 
                unsigned int            flags;
148
 
                unsigned int            fragsize;
149
 
                struct ip_options       *opt;
150
 
                struct dst_entry        *dst;
151
 
                int                     length; /* Total length of all frames */
152
 
                __be32                  addr;
153
 
                struct flowi            fl;
154
 
        } cork;
 
171
        struct inet_cork_full   cork;
155
172
};
156
173
 
157
174
#define IPCORK_OPT      1       /* ip-options has been held in ipcork.opt */
219
236
 
220
237
static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
221
238
{
222
 
        return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0;
 
239
        __u8 flags = 0;
 
240
 
 
241
        if (inet_sk(sk)->transparent)
 
242
                flags |= FLOWI_FLAG_ANYSRC;
 
243
        if (sk->sk_protocol == IPPROTO_TCP)
 
244
                flags |= FLOWI_FLAG_PRECOW_METRICS;
 
245
        return flags;
223
246
}
224
247
 
225
248
#endif  /* _INET_SOCK_H */