Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90057
b: refs/heads/master
c: 37c5798
h: refs/heads/master
i:
  90055: 16b673d
v: v3
  • Loading branch information
Luis Carlos Cobo authored and John W. Linville committed Mar 6, 2008
1 parent d6c2e8b commit ac8ae46
Show file tree
Hide file tree
Showing 34 changed files with 1,429 additions and 1,346 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551
refs/heads/master: 37c5798968d0ce4d479f114f1d5785551b57bfa5
35 changes: 35 additions & 0 deletions trunk/include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
#define IEEE80211_MAX_FRAME_LEN 2352

#define IEEE80211_MAX_SSID_LEN 32
#define IEEE80211_MAX_MESH_ID_LEN 32

struct ieee80211_hdr {
__le16 frame_control;
Expand All @@ -109,6 +110,16 @@ struct ieee80211_hdr {
} __attribute__ ((packed));


struct ieee80211s_hdr {
u8 flags;
u8 ttl;
u8 seqnum[3];
u8 eaddr1[6];
u8 eaddr2[6];
u8 eaddr3[6];
} __attribute__ ((packed));


struct ieee80211_mgmt {
__le16 frame_control;
__le16 duration;
Expand Down Expand Up @@ -206,6 +217,23 @@ struct ieee80211_mgmt {
__le16 params;
__le16 reason_code;
} __attribute__((packed)) delba;
struct{
u8 action_code;
/* capab_info for open and confirm,
* reason for close
*/
__le16 aux;
/* Followed in plink_confirm by status
* code, AID and supported rates,
* and directly by supported rates in
* plink_open and plink_close
*/
u8 variable[0];
} __attribute__((packed)) plink_action;
struct{
u8 action_code;
u8 variable[0];
} __attribute__((packed)) mesh_action;
} u;
} __attribute__ ((packed)) action;
} u;
Expand Down Expand Up @@ -437,6 +465,13 @@ enum ieee80211_eid {
WLAN_EID_TS_DELAY = 43,
WLAN_EID_TCLAS_PROCESSING = 44,
WLAN_EID_QOS_CAPA = 46,
/* 802.11s */
WLAN_EID_MESH_CONFIG = 36, /* Pending IEEE 802.11 ANA approval */
WLAN_EID_MESH_ID = 37, /* Pending IEEE 802.11 ANA approval */
WLAN_EID_PEER_LINK = 40, /* Pending IEEE 802.11 ANA approval */
WLAN_EID_PREQ = 53, /* Pending IEEE 802.11 ANA approval */
WLAN_EID_PREP = 54, /* Pending IEEE 802.11 ANA approval */
WLAN_EID_PERR = 55, /* Pending IEEE 802.11 ANA approval */
/* 802.11h */
WLAN_EID_PWR_CONSTRAINT = 32,
WLAN_EID_PWR_CAPABILITY = 33,
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/linux/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ struct udp_sock {
#define UDPLITE_BIT 0x1 /* set by udplite proto init function */
#define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */
#define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */
#ifdef CONFIG_IP_UDPLITE
__u8 pcflag; /* marks socket as UDP-Lite if > 0 */
__u8 unused[3];
#endif
/*
* For encapsulation sockets.
*/
Expand All @@ -83,7 +85,15 @@ static inline struct udp_sock *udp_sk(const struct sock *sk)
return (struct udp_sock *)sk;
}

#ifdef CONFIG_IP_UDPLITE
#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag)
#define IS_PROTO_UDPLITE(__proto) ((__proto) == IPPROTO_UDPLITE)
#define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP || (level) == SOL_UDPLITE)
#else
#define IS_UDPLITE(__sk) 0
#define IS_PROTO_UDPLITE(__proto) 0
#define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP)
#endif

#endif

Expand Down
5 changes: 5 additions & 0 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,13 @@ extern int tcp6_proc_init(void);
extern void tcp6_proc_exit(void);
extern int udp6_proc_init(void);
extern void udp6_proc_exit(void);
#ifdef CONFIG_IP_UDPLITE
extern int udplite6_proc_init(void);
extern void udplite6_proc_exit(void);
#else
static inline int udplite6_proc_init(void) { return 0; }
static inline void udplite6_proc_exit(void) { }
#endif
extern int ipv6_misc_proc_init(void);
extern void ipv6_misc_proc_exit(void);
extern int snmp6_register_dev(struct inet6_dev *idev);
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/net/netns/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,5 @@ struct netns_ipv6 {
struct fib_rules_ops *fib6_rules_ops;
#endif
struct sock **icmp_sk;
struct sock *ndisc_sk;
struct sock *tcp_sk;
struct sock *igmp_sk;
};
#endif
9 changes: 0 additions & 9 deletions trunk/include/net/tipc/tipc_bearer.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ struct tipc_bearer {
char name[TIPC_MAX_BEARER_NAME];
};

/*
* TIPC routines available to supported media types
*/

int tipc_register_media(u32 media_type,
char *media_name,
Expand All @@ -126,12 +123,6 @@ void tipc_continue(struct tipc_bearer *tb_ptr);
int tipc_enable_bearer(const char *bearer_name, u32 bcast_scope, u32 priority);
int tipc_disable_bearer(const char *name);

/*
* Routines made available to TIPC by supported media types
*/

int tipc_eth_media_start(void);
void tipc_eth_media_stop(void);

#endif

Expand Down
7 changes: 7 additions & 0 deletions trunk/include/net/tipc/tipc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ u32 tipc_createport_raw(void *usr_handle,
void (*wakeup)(struct tipc_port *),
const u32 importance);

/*
* tipc_set_msg_option(): port must be locked.
*/
int tipc_set_msg_option(struct tipc_port *tp_ptr,
const char *opt,
const u32 len);

int tipc_reject_msg(struct sk_buff *buf, u32 err);

int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode);
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/net/transp_v6.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ extern int rawv6_init(void);
extern void rawv6_exit(void);
extern int udpv6_init(void);
extern void udpv6_exit(void);
#ifdef CONFIG_IP_UDPLITE
extern int udplitev6_init(void);
extern void udplitev6_exit(void);
#else
static inline int udplitev6_init(void) { return 0; }
static inline void udplitev6_exit(void) { }
#endif
extern int tcpv6_init(void);
extern void tcpv6_exit(void);

Expand Down
9 changes: 7 additions & 2 deletions trunk/include/net/udplite.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ static __inline__ int udplite_getfrag(void *from, char *to, int offset,
/* Designate sk as UDP-Lite socket */
static inline int udplite_sk_init(struct sock *sk)
{
#ifdef CONFIG_IP_UDPLITE
udp_sk(sk)->pcflag = UDPLITE_BIT;
#endif
return 0;
}

Expand Down Expand Up @@ -69,7 +71,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh)
static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
{
int cscov = up->len;

#ifdef CONFIG_IP_UDPLITE
/*
* Sender has set `partial coverage' option on UDP-Lite socket
*/
Expand All @@ -93,13 +95,15 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
* illegal, we fall back to the defaults here.
*/
}
#endif
return cscov;
}

static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
{
int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));
__wsum csum = 0;
#ifdef CONFIG_IP_UDPLITE
int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));

skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */

Expand All @@ -112,6 +116,7 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
if ((cscov -= len) <= 0)
break;
}
#endif
return csum;
}

Expand Down
10 changes: 10 additions & 0 deletions trunk/net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -632,5 +632,15 @@ config TCP_MD5SIG

If unsure, say N.

config IP_UDPLITE
bool "IP: UDP-Lite Protocol (RFC 3828)"
default n
---help---
UDP-Lite (RFC 3828) is a UDP-like protocol with variable-length
checksum. Read <file:Documentation/networking/udplite.txt> for
details.

If unsure, say N.

source "net/ipv4/ipvs/Kconfig"

3 changes: 2 additions & 1 deletion trunk/net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ obj-y := route.o inetpeer.o protocol.o \
inet_timewait_sock.o inet_connection_sock.o \
tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o \
tcp_minisocks.o tcp_cong.o \
datagram.o raw.o udp.o udplite.o \
datagram.o raw.o udp.o udp_ipv4.o \
arp.o icmp.o devinet.o af_inet.o igmp.o \
fib_frontend.o fib_semantics.o \
inet_fragment.o
Expand Down Expand Up @@ -49,6 +49,7 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
obj-$(CONFIG_IP_UDPLITE) += udplite_ipv4.o
obj-$(CONFIG_NETLABEL) += cipso_ipv4.o

obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,15 +1317,18 @@ static int __init init_ipv4_mibs(void)
if (snmp_mib_init((void **)udp_statistics,
sizeof(struct udp_mib)) < 0)
goto err_udp_mib;
#ifdef CONFIG_IP_UDPLITE
if (snmp_mib_init((void **)udplite_statistics,
sizeof(struct udp_mib)) < 0)
goto err_udplite_mib;

#endif
tcp_mib_init();

return 0;

#ifdef CONFIG_IP_UDPLITE
err_udplite_mib:
#endif
snmp_mib_free((void **)udp_statistics);
err_udp_mib:
snmp_mib_free((void **)tcp_statistics);
Expand Down Expand Up @@ -1423,8 +1426,10 @@ static int __init inet_init(void)
/* Setup UDP memory threshold */
udp_init();

#ifdef CONFIG_IP_UDPLITE
/* Add UDP-Lite (RFC 3828) */
udplite4_register();
#endif

/*
* Set the ICMP layer up
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/ipv4/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ static int sockstat_seq_show(struct seq_file *seq, void *v)
atomic_read(&tcp_memory_allocated));
seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse_get(&udp_prot),
atomic_read(&udp_memory_allocated));
#ifdef CONFIG_IP_UDPLITE
seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse_get(&udplite_prot));
#endif
seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(&raw_prot));
seq_printf(seq, "FRAG: inuse %d memory %d\n",
ip_frag_nqueues(&init_net), ip_frag_mem(&init_net));
Expand Down Expand Up @@ -349,6 +351,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
snmp_fold_field((void **)udp_statistics,
snmp4_udp_list[i].entry));

#ifdef CONFIG_IP_UDPLITE
/* the UDP and UDP-Lite MIBs are the same */
seq_puts(seq, "\nUdpLite:");
for (i = 0; snmp4_udp_list[i].name != NULL; i++)
Expand All @@ -359,7 +362,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, " %lu",
snmp_fold_field((void **)udplite_statistics,
snmp4_udp_list[i].entry));

#endif
seq_putc(seq, '\n');
return 0;
}
Expand Down
Loading

0 comments on commit ac8ae46

Please sign in to comment.