diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/genetlink.h | 20 | ||||
| -rw-r--r-- | include/net/netdma.h | 2 | ||||
| -rw-r--r-- | include/net/pkt_sched.h | 18 | ||||
| -rw-r--r-- | include/net/protocol.h | 2 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 11 | ||||
| -rw-r--r-- | include/net/sctp/user.h | 9 | ||||
| -rw-r--r-- | include/net/tcp.h | 1 |
7 files changed, 45 insertions, 18 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 805de50df00d..8c2287264266 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
| @@ -150,4 +150,24 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) | |||
| 150 | return nlmsg_unicast(genl_sock, skb, pid); | 150 | return nlmsg_unicast(genl_sock, skb, pid); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | /** | ||
| 154 | * gennlmsg_data - head of message payload | ||
| 155 | * @gnlh: genetlink messsage header | ||
| 156 | */ | ||
| 157 | static inline void *genlmsg_data(const struct genlmsghdr *gnlh) | ||
| 158 | { | ||
| 159 | return ((unsigned char *) gnlh + GENL_HDRLEN); | ||
| 160 | } | ||
| 161 | |||
| 162 | /** | ||
| 163 | * genlmsg_len - length of message payload | ||
| 164 | * @gnlh: genetlink message header | ||
| 165 | */ | ||
| 166 | static inline int genlmsg_len(const struct genlmsghdr *gnlh) | ||
| 167 | { | ||
| 168 | struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - | ||
| 169 | NLMSG_HDRLEN); | ||
| 170 | return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN); | ||
| 171 | } | ||
| 172 | |||
| 153 | #endif /* __NET_GENERIC_NETLINK_H */ | 173 | #endif /* __NET_GENERIC_NETLINK_H */ |
diff --git a/include/net/netdma.h b/include/net/netdma.h index 19760eb131aa..ceae5ee85c04 100644 --- a/include/net/netdma.h +++ b/include/net/netdma.h | |||
| @@ -37,7 +37,7 @@ static inline struct dma_chan *get_softnet_dma(void) | |||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | int dma_skb_copy_datagram_iovec(struct dma_chan* chan, | 39 | int dma_skb_copy_datagram_iovec(struct dma_chan* chan, |
| 40 | const struct sk_buff *skb, int offset, struct iovec *to, | 40 | struct sk_buff *skb, int offset, struct iovec *to, |
| 41 | size_t len, struct dma_pinned_list *pinned_list); | 41 | size_t len, struct dma_pinned_list *pinned_list); |
| 42 | 42 | ||
| 43 | #endif /* CONFIG_NET_DMA */ | 43 | #endif /* CONFIG_NET_DMA */ |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 1925c65e617b..f6afee73235d 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -169,23 +169,17 @@ psched_tod_diff(int delta_sec, int bound) | |||
| 169 | 169 | ||
| 170 | #define PSCHED_TADD2(tv, delta, tv_res) \ | 170 | #define PSCHED_TADD2(tv, delta, tv_res) \ |
| 171 | ({ \ | 171 | ({ \ |
| 172 | int __delta = (delta); \ | 172 | int __delta = (tv).tv_usec + (delta); \ |
| 173 | (tv_res) = (tv); \ | 173 | (tv_res).tv_sec = (tv).tv_sec; \ |
| 174 | while(__delta >= USEC_PER_SEC){ \ | 174 | while (__delta >= USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ |
| 175 | (tv_res).tv_sec++; \ | ||
| 176 | __delta -= USEC_PER_SEC; \ | ||
| 177 | } \ | ||
| 178 | (tv_res).tv_usec = __delta; \ | 175 | (tv_res).tv_usec = __delta; \ |
| 179 | }) | 176 | }) |
| 180 | 177 | ||
| 181 | #define PSCHED_TADD(tv, delta) \ | 178 | #define PSCHED_TADD(tv, delta) \ |
| 182 | ({ \ | 179 | ({ \ |
| 183 | int __delta = (delta); \ | 180 | (tv).tv_usec += (delta); \ |
| 184 | while(__delta >= USEC_PER_SEC){ \ | 181 | while ((tv).tv_usec >= USEC_PER_SEC) { (tv).tv_sec++; \ |
| 185 | (tv).tv_sec++; \ | 182 | (tv).tv_usec -= USEC_PER_SEC; } \ |
| 186 | __delta -= USEC_PER_SEC; \ | ||
| 187 | } \ | ||
| 188 | (tv).tv_usec = __delta; \ | ||
| 189 | }) | 183 | }) |
| 190 | 184 | ||
| 191 | /* Set/check that time is in the "past perfect"; | 185 | /* Set/check that time is in the "past perfect"; |
diff --git a/include/net/protocol.h b/include/net/protocol.h index a225d6371cb1..c643bce64e55 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | struct net_protocol { | 36 | struct net_protocol { |
| 37 | int (*handler)(struct sk_buff *skb); | 37 | int (*handler)(struct sk_buff *skb); |
| 38 | void (*err_handler)(struct sk_buff *skb, u32 info); | 38 | void (*err_handler)(struct sk_buff *skb, u32 info); |
| 39 | int (*gso_send_check)(struct sk_buff *skb); | ||
| 39 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 40 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
| 40 | int features); | 41 | int features); |
| 41 | int no_policy; | 42 | int no_policy; |
| @@ -51,6 +52,7 @@ struct inet6_protocol | |||
| 51 | int type, int code, int offset, | 52 | int type, int code, int offset, |
| 52 | __u32 info); | 53 | __u32 info); |
| 53 | 54 | ||
| 55 | int (*gso_send_check)(struct sk_buff *skb); | ||
| 54 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 56 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
| 55 | int features); | 57 | int features); |
| 56 | 58 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 5f69158c1006..e5aa7ff1f5b5 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -445,6 +445,7 @@ typedef struct sctp_sender_hb_info { | |||
| 445 | struct sctp_paramhdr param_hdr; | 445 | struct sctp_paramhdr param_hdr; |
| 446 | union sctp_addr daddr; | 446 | union sctp_addr daddr; |
| 447 | unsigned long sent_at; | 447 | unsigned long sent_at; |
| 448 | __u64 hb_nonce; | ||
| 448 | } __attribute__((packed)) sctp_sender_hb_info_t; | 449 | } __attribute__((packed)) sctp_sender_hb_info_t; |
| 449 | 450 | ||
| 450 | /* | 451 | /* |
| @@ -730,13 +731,10 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *, | |||
| 730 | const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | 731 | const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); |
| 731 | 732 | ||
| 732 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 733 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
| 733 | /* sin_family -- AF_INET or AF_INET6 | ||
| 734 | * sin_port -- ordinary port number | ||
| 735 | * sin_addr -- cast to either (struct in_addr) or (struct in6_addr) | ||
| 736 | */ | ||
| 737 | struct sctp_sockaddr_entry { | 734 | struct sctp_sockaddr_entry { |
| 738 | struct list_head list; | 735 | struct list_head list; |
| 739 | union sctp_addr a; | 736 | union sctp_addr a; |
| 737 | __u8 use_as_src; | ||
| 740 | }; | 738 | }; |
| 741 | 739 | ||
| 742 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 740 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
| @@ -984,6 +982,9 @@ struct sctp_transport { | |||
| 984 | */ | 982 | */ |
| 985 | char cacc_saw_newack; | 983 | char cacc_saw_newack; |
| 986 | } cacc; | 984 | } cacc; |
| 985 | |||
| 986 | /* 64-bit random number sent with heartbeat. */ | ||
| 987 | __u64 hb_nonce; | ||
| 987 | }; | 988 | }; |
| 988 | 989 | ||
| 989 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, | 990 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, |
| @@ -1138,7 +1139,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
| 1138 | sctp_scope_t scope, gfp_t gfp, | 1139 | sctp_scope_t scope, gfp_t gfp, |
| 1139 | int flags); | 1140 | int flags); |
| 1140 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1141 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
| 1141 | gfp_t gfp); | 1142 | __u8 use_as_src, gfp_t gfp); |
| 1142 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1143 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); |
| 1143 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1144 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
| 1144 | struct sctp_sock *); | 1145 | struct sctp_sock *); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 8a6bef6f91eb..1b7aae6cdd82 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
| @@ -560,9 +560,18 @@ struct sctp_paddrinfo { | |||
| 560 | } __attribute__((packed, aligned(4))); | 560 | } __attribute__((packed, aligned(4))); |
| 561 | 561 | ||
| 562 | /* Peer addresses's state. */ | 562 | /* Peer addresses's state. */ |
| 563 | /* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x] | ||
| 564 | * calls. | ||
| 565 | * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters. | ||
| 566 | * Not yet confirmed by a heartbeat and not available for data | ||
| 567 | * transfers. | ||
| 568 | * ACTIVE : Peer address confirmed, active and available for data transfers. | ||
| 569 | * INACTIVE: Peer address inactive and not available for data transfers. | ||
| 570 | */ | ||
| 563 | enum sctp_spinfo_state { | 571 | enum sctp_spinfo_state { |
| 564 | SCTP_INACTIVE, | 572 | SCTP_INACTIVE, |
| 565 | SCTP_ACTIVE, | 573 | SCTP_ACTIVE, |
| 574 | SCTP_UNCONFIRMED, | ||
| 566 | SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ | 575 | SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ |
| 567 | }; | 576 | }; |
| 568 | 577 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 3cd803b0d7a5..0720bddff1e9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -1086,6 +1086,7 @@ extern struct request_sock_ops tcp_request_sock_ops; | |||
| 1086 | 1086 | ||
| 1087 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1087 | extern int tcp_v4_destroy_sock(struct sock *sk); |
| 1088 | 1088 | ||
| 1089 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
| 1089 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1090 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); |
| 1090 | 1091 | ||
| 1091 | #ifdef CONFIG_PROC_FS | 1092 | #ifdef CONFIG_PROC_FS |
