[NET]: include/linux/udp.h - remove duplicate include
Remove duplicate #include <linux/types.h> Combine #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cc32e05416
commit
310afe86af
1 changed files with 7 additions and 11 deletions
|
@ -26,15 +26,6 @@ struct udphdr {
|
||||||
__sum16 check;
|
__sum16 check;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
|
|
||||||
static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return (struct udphdr *)skb_transport_header(skb);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* UDP socket options */
|
/* UDP socket options */
|
||||||
#define UDP_CORK 1 /* Never send partially complete segments */
|
#define UDP_CORK 1 /* Never send partially complete segments */
|
||||||
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
|
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
|
||||||
|
@ -45,9 +36,14 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
|
||||||
#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
|
#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
#include <net/inet_sock.h>
|
#include <net/inet_sock.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
|
||||||
|
static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return (struct udphdr *)skb_transport_header(skb);
|
||||||
|
}
|
||||||
|
|
||||||
#define UDP_HTABLE_SIZE 128
|
#define UDP_HTABLE_SIZE 128
|
||||||
|
|
||||||
struct udp_sock {
|
struct udp_sock {
|
||||||
|
|
Loading…
Reference in a new issue