Skip to content

Commit

Permalink
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Jun 20, 2005
2 parents 91b9047 + 246955f commit fb39588
Show file tree
Hide file tree
Showing 40 changed files with 839 additions and 318 deletions.
26 changes: 13 additions & 13 deletions include/linux/atalk.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0)

struct atalk_addr {
__u16 s_net;
__be16 s_net;
__u8 s_node;
};

Expand All @@ -33,8 +33,8 @@ struct sockaddr_at {

struct atalk_netrange {
__u8 nr_phase;
__u16 nr_firstnet;
__u16 nr_lastnet;
__be16 nr_firstnet;
__be16 nr_lastnet;
};

#ifdef __KERNEL__
Expand Down Expand Up @@ -70,8 +70,8 @@ struct atalk_iface {
struct atalk_sock {
/* struct sock has to be the first member of atalk_sock */
struct sock sk;
unsigned short dest_net;
unsigned short src_net;
__be16 dest_net;
__be16 src_net;
unsigned char dest_node;
unsigned char src_node;
unsigned char dest_port;
Expand All @@ -95,9 +95,9 @@ struct ddpehdr {
deh_hops:4,
deh_len:10;
#endif
__u16 deh_sum;
__u16 deh_dnet;
__u16 deh_snet;
__be16 deh_sum;
__be16 deh_dnet;
__be16 deh_snet;
__u8 deh_dnode;
__u8 deh_snode;
__u8 deh_dport;
Expand Down Expand Up @@ -142,24 +142,24 @@ struct ddpshdr {

/* AppleTalk AARP headers */
struct elapaarp {
__u16 hw_type;
__be16 hw_type;
#define AARP_HW_TYPE_ETHERNET 1
#define AARP_HW_TYPE_TOKENRING 2
__u16 pa_type;
__be16 pa_type;
__u8 hw_len;
__u8 pa_len;
#define AARP_PA_ALEN 4
__u16 function;
__be16 function;
#define AARP_REQUEST 1
#define AARP_REPLY 2
#define AARP_PROBE 3
__u8 hw_src[ETH_ALEN] __attribute__ ((packed));
__u8 pa_src_zero __attribute__ ((packed));
__u16 pa_src_net __attribute__ ((packed));
__be16 pa_src_net __attribute__ ((packed));
__u8 pa_src_node __attribute__ ((packed));
__u8 hw_dst[ETH_ALEN] __attribute__ ((packed));
__u8 pa_dst_zero __attribute__ ((packed));
__u16 pa_dst_net __attribute__ ((packed));
__be16 pa_dst_net __attribute__ ((packed));
__u8 pa_dst_node __attribute__ ((packed));
};

Expand Down
1 change: 1 addition & 0 deletions include/linux/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define NETLINK_SELINUX 7 /* SELinux event notifications */
#define NETLINK_ARPD 8
#define NETLINK_AUDIT 9 /* auditing */
#define NETLINK_FIB_LOOKUP 10
#define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */
#define NETLINK_IP6_FW 13
#define NETLINK_DNRTMSG 14 /* DECnet routing messages */
Expand Down
1 change: 1 addition & 0 deletions include/linux/pfkeyv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ struct sadb_x_nat_t_port {

/* Security Association flags */
#define SADB_SAFLAGS_PFS 1
#define SADB_SAFLAGS_NOPMTUDISC 0x20000000
#define SADB_SAFLAGS_DECAP_DSCP 0x40000000
#define SADB_SAFLAGS_NOECN 0x80000000

Expand Down
1 change: 1 addition & 0 deletions include/linux/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ struct xfrm_usersa_info {
__u8 flags;
#define XFRM_STATE_NOECN 1
#define XFRM_STATE_DECAP_DSCP 2
#define XFRM_STATE_NOPMTUDISC 4
};

struct xfrm_usersa_id {
Expand Down
2 changes: 1 addition & 1 deletion include/net/ax25.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static __inline__ void ax25_cb_put(ax25_cb *ax25)
}
}

static inline unsigned short ax25_type_trans(struct sk_buff *skb, struct net_device *dev)
static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *dev)
{
skb->dev = dev;
skb->pkt_type = PACKET_HOST;
Expand Down
14 changes: 14 additions & 0 deletions include/net/ip_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ struct fib_result {
#endif
};

struct fib_result_nl {
u32 fl_addr; /* To be looked up*/
u32 fl_fwmark;
unsigned char fl_tos;
unsigned char fl_scope;
unsigned char tb_id_in;

unsigned char tb_id; /* Results */
unsigned char prefixlen;
unsigned char nh_sel;
unsigned char type;
unsigned char scope;
int err;
};

#ifdef CONFIG_IP_ROUTE_MULTIPATH

Expand Down
8 changes: 4 additions & 4 deletions include/net/sctp/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ typedef enum {
SCTP_CMD_TIMER_START, /* Start a timer. */
SCTP_CMD_TIMER_RESTART, /* Restart a timer. */
SCTP_CMD_TIMER_STOP, /* Stop a timer. */
SCTP_CMD_COUNTER_RESET, /* Reset a counter. */
SCTP_CMD_COUNTER_INC, /* Increment a counter. */
SCTP_CMD_INIT_CHOOSE_TRANSPORT, /* Choose transport for an INIT. */
SCTP_CMD_INIT_COUNTER_RESET, /* Reset init counter. */
SCTP_CMD_INIT_COUNTER_INC, /* Increment init counter. */
SCTP_CMD_INIT_RESTART, /* High level, do init timer work. */
SCTP_CMD_COOKIEECHO_RESTART, /* High level, do cookie-echo timer work. */
SCTP_CMD_INIT_FAILED, /* High level, do init failure work. */
SCTP_CMD_REPORT_DUP, /* Report a duplicate TSN. */
SCTP_CMD_STRIKE, /* Mark a strike against a transport. */
Expand Down Expand Up @@ -118,7 +120,6 @@ typedef union {
int error;
sctp_state_t state;
sctp_event_timeout_t to;
sctp_counter_t counter;
void *ptr;
struct sctp_chunk *chunk;
struct sctp_association *asoc;
Expand Down Expand Up @@ -165,7 +166,6 @@ SCTP_ARG_CONSTRUCTOR(U16, __u16, u16)
SCTP_ARG_CONSTRUCTOR(U8, __u8, u8)
SCTP_ARG_CONSTRUCTOR(ERROR, int, error)
SCTP_ARG_CONSTRUCTOR(STATE, sctp_state_t, state)
SCTP_ARG_CONSTRUCTOR(COUNTER, sctp_counter_t, counter)
SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to)
SCTP_ARG_CONSTRUCTOR(PTR, void *, ptr)
SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk)
Expand Down
7 changes: 0 additions & 7 deletions include/net/sctp/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,6 @@ enum { SCTP_MIN_PMTU = 576 };
enum { SCTP_MAX_DUP_TSNS = 16 };
enum { SCTP_MAX_GABS = 16 };

typedef enum {
SCTP_COUNTER_INIT_ERROR,
} sctp_counter_t;

/* How many counters does an association need? */
#define SCTP_NUMBER_COUNTERS 5

/* Here we define the default timers. */

/* cookie timer def = ? seconds */
Expand Down
17 changes: 17 additions & 0 deletions include/net/sctp/sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,22 @@ DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
extern int sctp_debug_flag;
#define SCTP_DEBUG_PRINTK(whatever...) \
((void) (sctp_debug_flag && printk(KERN_DEBUG whatever)))
#define SCTP_DEBUG_PRINTK_IPADDR(lead, trail, leadparm, saddr, otherparms...) \
if (sctp_debug_flag) { \
if (saddr->sa.sa_family == AF_INET6) { \
printk(KERN_DEBUG \
lead "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" trail, \
leadparm, \
NIP6(saddr->v6.sin6_addr), \
otherparms); \
} else { \
printk(KERN_DEBUG \
lead "%u.%u.%u.%u" trail, \
leadparm, \
NIPQUAD(saddr->v4.sin_addr.s_addr), \
otherparms); \
} \
}
#define SCTP_ENABLE_DEBUG { sctp_debug_flag = 1; }
#define SCTP_DISABLE_DEBUG { sctp_debug_flag = 0; }

Expand All @@ -236,6 +252,7 @@ extern int sctp_debug_flag;
#else /* SCTP_DEBUG */

#define SCTP_DEBUG_PRINTK(whatever...)
#define SCTP_DEBUG_PRINTK_IPADDR(whatever...)
#define SCTP_ENABLE_DEBUG
#define SCTP_DISABLE_DEBUG
#define SCTP_ASSERT(expr, str, func)
Expand Down
8 changes: 6 additions & 2 deletions include/net/sctp/sm.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ sctp_state_fn_t sctp_sf_eat_data_fast_4_4;
sctp_state_fn_t sctp_sf_eat_sack_6_2;
sctp_state_fn_t sctp_sf_tabort_8_4_8;
sctp_state_fn_t sctp_sf_operr_notify;
sctp_state_fn_t sctp_sf_t1_timer_expire;
sctp_state_fn_t sctp_sf_t1_init_timer_expire;
sctp_state_fn_t sctp_sf_t1_cookie_timer_expire;
sctp_state_fn_t sctp_sf_t2_timer_expire;
sctp_state_fn_t sctp_sf_t4_timer_expire;
sctp_state_fn_t sctp_sf_t5_timer_expire;
Expand Down Expand Up @@ -258,7 +259,10 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc,
void sctp_chunk_assign_tsn(struct sctp_chunk *);
void sctp_chunk_assign_ssn(struct sctp_chunk *);

void sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands, __u16 error);
sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
__u16 error,
const struct sctp_association *asoc,
struct sctp_transport *transport);

/* Prototypes for statetable processing. */

Expand Down
41 changes: 32 additions & 9 deletions include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,13 @@ struct sctp_transport {
*/
unsigned long last_time_ecne_reduced;

/* active : The current active state of this destination,
* : i.e. DOWN, UP, etc.
/* The number of times INIT has been sent on this transport. */
int init_sent_count;

/* state : The current state of this destination,
* : i.e. SCTP_ACTIVE, SCTP_INACTIVE, SCTP_UNKOWN.
*/
int active;
int state;

/* hb_allowed : The current heartbeat state of this destination,
* : i.e. ALLOW-HB, NO-HEARTBEAT, etc.
Expand Down Expand Up @@ -1222,9 +1225,6 @@ struct sctp_endpoint {

/* sendbuf acct. policy. */
__u32 sndbuf_policy;

/* Name for debugging output... */
char *debug_name;
};

/* Recover the outter endpoint structure. */
Expand Down Expand Up @@ -1314,11 +1314,23 @@ struct sctp_association {
* : association. Normally this information is
* : hashed or keyed for quick lookup and access
* : of the TCB.
* : The list is also initialized with the list
* : of addresses passed with the sctp_connectx()
* : call.
*
* It is a list of SCTP_transport's.
*/
struct list_head transport_addr_list;

/* transport_count
*
* Peer : A count of the number of peer addresses
* Transport : in the Peer Transport Address List.
* Address :
* Count :
*/
__u16 transport_count;

/* port
* The transport layer port number.
*/
Expand Down Expand Up @@ -1486,6 +1498,9 @@ struct sctp_association {
/* Transport to which SHUTDOWN chunk was last sent. */
struct sctp_transport *shutdown_last_sent_to;

/* Transport to which INIT chunk was last sent. */
struct sctp_transport *init_last_sent_to;

/* Next TSN : The next TSN number to be assigned to a new
* : DATA chunk. This is sent in the INIT or INIT
* : ACK chunk to the peer and incremented each
Expand Down Expand Up @@ -1549,8 +1564,11 @@ struct sctp_association {
/* The message size at which SCTP fragmentation will occur. */
__u32 frag_point;

/* Currently only one counter is used to count INIT errors. */
int counters[SCTP_NUMBER_COUNTERS];
/* Counter used to count INIT errors. */
int init_err_counter;

/* Count the number of INIT cycles (for doubling timeout). */
int init_cycle;

/* Default send parameters. */
__u16 default_stream;
Expand Down Expand Up @@ -1708,6 +1726,8 @@ void sctp_association_free(struct sctp_association *);
void sctp_association_put(struct sctp_association *);
void sctp_association_hold(struct sctp_association *);

struct sctp_transport *sctp_assoc_choose_init_transport(
struct sctp_association *);
struct sctp_transport *sctp_assoc_choose_shutdown_transport(
struct sctp_association *);
void sctp_assoc_update_retran_path(struct sctp_association *);
Expand All @@ -1717,9 +1737,12 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
const union sctp_addr *laddr);
struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
const union sctp_addr *address,
const int gfp);
const int gfp,
const int peer_state);
void sctp_assoc_del_peer(struct sctp_association *asoc,
const union sctp_addr *addr);
void sctp_assoc_rm_peer(struct sctp_association *asoc,
struct sctp_transport *peer);
void sctp_assoc_control_transport(struct sctp_association *,
struct sctp_transport *,
sctp_transport_cmd_t, sctp_sn_error_t);
Expand Down
3 changes: 3 additions & 0 deletions include/net/sctp/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ enum sctp_optname {
#define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM
SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
};

/*
Expand Down Expand Up @@ -527,6 +529,7 @@ struct sctp_paddrinfo {
enum sctp_spinfo_state {
SCTP_INACTIVE,
SCTP_ACTIVE,
SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */
};

/*
Expand Down
4 changes: 3 additions & 1 deletion include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ struct xfrm_state_afinfo {
rwlock_t lock;
struct list_head *state_bydst;
struct list_head *state_byspi;
int (*init_flags)(struct xfrm_state *x);
void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
struct xfrm_tmpl *tmpl,
xfrm_address_t *daddr, xfrm_address_t *saddr);
Expand All @@ -225,7 +226,7 @@ struct xfrm_type
struct module *owner;
__u8 proto;

int (*init_state)(struct xfrm_state *x, void *args);
int (*init_state)(struct xfrm_state *x);
void (*destructor)(struct xfrm_state *);
int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
Expand Down Expand Up @@ -839,6 +840,7 @@ extern int xfrm_replay_check(struct xfrm_state *x, u32 seq);
extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq);
extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
extern int xfrm_init_state(struct xfrm_state *x);
extern int xfrm4_rcv(struct sk_buff *skb);
extern int xfrm4_output(struct sk_buff *skb);
extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
Expand Down
2 changes: 1 addition & 1 deletion net/appletalk/aarp.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
* numbers we just happen to need. Now put the
* length in the lower two.
*/
*((__u16 *)skb->data) = htons(skb->len);
*((__be16 *)skb->data) = htons(skb->len);
ft = 1;
}
/*
Expand Down
2 changes: 1 addition & 1 deletion net/appletalk/ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static struct atalk_iface *atalk_find_anynet(int node, struct net_device *dev)
}

/* Find a match for a specific network:node pair */
static struct atalk_iface *atalk_find_interface(int net, int node)
static struct atalk_iface *atalk_find_interface(__be16 net, int node)
{
struct atalk_iface *iface;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ah4.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static void ah4_err(struct sk_buff *skb, u32 info)
xfrm_state_put(x);
}

static int ah_init_state(struct xfrm_state *x, void *args)
static int ah_init_state(struct xfrm_state *x)
{
struct ah_data *ahp = NULL;
struct xfrm_algo_desc *aalg_desc;
Expand Down
Loading

0 comments on commit fb39588

Please sign in to comment.