Skip to content

Commit

Permalink
[NET]: include/linux/udp.h - remove duplicate include
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Mar 24, 2008
1 parent cc32e05 commit 310afe8
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions include/linux/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ struct udphdr {
__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 */
#define UDP_CORK 1 /* Never send partially complete segments */
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
Expand All @@ -45,9 +36,14 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */

#ifdef __KERNEL__
#include <linux/types.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

struct udp_sock {
Expand Down

0 comments on commit 310afe8

Please sign in to comment.