Commit eb643da0 authored by Jon Grimm's avatar Jon Grimm

[SCTP] More typedef removals.

Continue typedef removal.  Also, change sctp_chunk.num_times_sent
counter to a resent flag.  There was a rather obscure, unlikely,
and in the end fairly benign bug sitting there if num_times_sent 
wrapped.  However, there's no need to keep this counter, as its
use was really just to know if we'd ever resent this chunk. 
parent 2dd53b84
......@@ -209,66 +209,66 @@ __u32 sctp_generate_verification_tag(void);
void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag);
/* Prototypes for chunk-building functions. */
sctp_chunk_t *sctp_make_init(const struct sctp_association *,
const sctp_bind_addr_t *,
struct sctp_chunk *sctp_make_init(const struct sctp_association *,
const struct sctp_bind_addr *,
int gfp, int vparam_len);
sctp_chunk_t *sctp_make_init_ack(const struct sctp_association *,
const sctp_chunk_t *,
struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *,
const struct sctp_chunk *,
const int gfp,
const int unkparam_len);
sctp_chunk_t *sctp_make_cookie_echo(const struct sctp_association *,
const sctp_chunk_t *);
sctp_chunk_t *sctp_make_cookie_ack(const struct sctp_association *,
const sctp_chunk_t *);
sctp_chunk_t *sctp_make_cwr(const struct sctp_association *,
struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *,
const struct sctp_chunk *);
struct sctp_chunk *sctp_make_cookie_ack(const struct sctp_association *,
const struct sctp_chunk *);
struct sctp_chunk *sctp_make_cwr(const struct sctp_association *,
const __u32 lowest_tsn,
const sctp_chunk_t *);
sctp_chunk_t *sctp_make_datafrag(struct sctp_association *,
const struct sctp_chunk *);
struct sctp_chunk *sctp_make_datafrag(struct sctp_association *,
const struct sctp_sndrcvinfo *sinfo,
int len, const __u8 *data,
__u8 flags, __u16 ssn);
sctp_chunk_t * sctp_make_datafrag_empty(struct sctp_association *,
struct sctp_chunk * sctp_make_datafrag_empty(struct sctp_association *,
const struct sctp_sndrcvinfo *sinfo,
int len, const __u8 flags,
__u16 ssn);
sctp_chunk_t *sctp_make_data(struct sctp_association *,
struct sctp_chunk *sctp_make_data(struct sctp_association *,
const struct sctp_sndrcvinfo *sinfo,
int len, const __u8 *data);
sctp_chunk_t *sctp_make_data_empty(struct sctp_association *,
struct sctp_chunk *sctp_make_data_empty(struct sctp_association *,
const struct sctp_sndrcvinfo *, int len);
sctp_chunk_t *sctp_make_ecne(const struct sctp_association *,
struct sctp_chunk *sctp_make_ecne(const struct sctp_association *,
const __u32);
sctp_chunk_t *sctp_make_sack(const struct sctp_association *);
sctp_chunk_t *sctp_make_shutdown(const struct sctp_association *asoc);
sctp_chunk_t *sctp_make_shutdown_ack(const struct sctp_association *asoc,
const sctp_chunk_t *);
sctp_chunk_t *sctp_make_shutdown_complete(const struct sctp_association *,
const sctp_chunk_t *);
void sctp_init_cause(sctp_chunk_t *, __u16 cause, const void *, size_t);
sctp_chunk_t *sctp_make_abort(const struct sctp_association *,
const sctp_chunk_t *,
struct sctp_chunk *sctp_make_sack(const struct sctp_association *);
struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc);
struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc,
const struct sctp_chunk *);
struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *,
const struct sctp_chunk *);
void sctp_init_cause(struct sctp_chunk *, __u16 cause, const void *, size_t);
struct sctp_chunk *sctp_make_abort(const struct sctp_association *,
const struct sctp_chunk *,
const size_t hint);
sctp_chunk_t *sctp_make_abort_no_data(const struct sctp_association *,
const sctp_chunk_t *,
struct sctp_chunk *sctp_make_abort_no_data(const struct sctp_association *,
const struct sctp_chunk *,
__u32 tsn);
sctp_chunk_t *sctp_make_abort_user(const struct sctp_association *,
const sctp_chunk_t *,
struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *,
const struct sctp_chunk *,
const struct msghdr *);
sctp_chunk_t *sctp_make_heartbeat(const struct sctp_association *,
struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *,
const struct sctp_transport *,
const void *payload,
const size_t paylen);
sctp_chunk_t *sctp_make_heartbeat_ack(const struct sctp_association *,
const sctp_chunk_t *,
struct sctp_chunk *sctp_make_heartbeat_ack(const struct sctp_association *,
const struct sctp_chunk *,
const void *payload,
const size_t paylen);
sctp_chunk_t *sctp_make_op_error(const struct sctp_association *,
const sctp_chunk_t *chunk,
struct sctp_chunk *sctp_make_op_error(const struct sctp_association *,
const struct sctp_chunk *chunk,
__u16 cause_code,
const void *payload,
size_t paylen);
void sctp_chunk_assign_tsn(sctp_chunk_t *);
void sctp_chunk_assign_ssn(sctp_chunk_t *);
void sctp_chunk_assign_tsn(struct sctp_chunk *);
void sctp_chunk_assign_ssn(struct sctp_chunk *);
int sctp_datachunks_from_user(struct sctp_association *,
const struct sctp_sndrcvinfo *,
struct msghdr *, int len,
......@@ -306,12 +306,12 @@ sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype,
int sctp_gen_sack(struct sctp_association *, int force, sctp_cmd_seq_t *);
void sctp_do_TSNdup(struct sctp_association *, sctp_chunk_t *, long gap);
void sctp_do_TSNdup(struct sctp_association *, struct sctp_chunk *, long gap);
void sctp_generate_t3_rtx_event(unsigned long peer);
void sctp_generate_heartbeat_event(unsigned long peer);
sctp_sackhdr_t *sctp_sm_pull_sack(sctp_chunk_t *);
sctp_sackhdr_t *sctp_sm_pull_sack(struct sctp_chunk *);
struct sctp_packet *sctp_abort_pkt_new(const struct sctp_endpoint *,
const struct sctp_association *,
struct sctp_chunk *chunk,
......@@ -327,15 +327,15 @@ sctp_pack_cookie(const struct sctp_endpoint *, const struct sctp_association *,
const __u8 *, int addrs_len);
struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *,
const struct sctp_association *,
sctp_chunk_t *, int gfp, int *err,
sctp_chunk_t **err_chk_p);
struct sctp_chunk *, int gfp, int *err,
struct sctp_chunk **err_chk_p);
int sctp_addip_addr_config(struct sctp_association *, sctp_param_t,
struct sockaddr_storage*, int);
void sctp_send_stale_cookie_err(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_chunk_t *chunk,
const struct sctp_chunk *chunk,
sctp_cmd_seq_t *commands,
sctp_chunk_t *err_chunk);
struct sctp_chunk *err_chunk);
/* 3rd level prototypes */
__u32 sctp_generate_tag(const struct sctp_endpoint *);
......@@ -361,7 +361,7 @@ extern sctp_timer_event_t *sctp_timer_events[SCTP_NUM_TIMEOUT_TYPES];
/* Get the size of a DATA chunk payload. */
static inline __u16 sctp_data_size(sctp_chunk_t *chunk)
static inline __u16 sctp_data_size(struct sctp_chunk *chunk)
{
__u16 size;
......@@ -449,7 +449,7 @@ static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb, sctp_a
* tag and the T bit is set in the Chunk Flags.
*/
static inline int
sctp_vtag_verify_either(const sctp_chunk_t *chunk,
sctp_vtag_verify_either(const struct sctp_chunk *chunk,
const struct sctp_association *asoc)
{
/* RFC 2960 Section 8.5.1, sctpimpguide-06 Section 2.13.2
......
......@@ -86,8 +86,6 @@ struct sctp_opt;
struct sctp_ep_common;
struct sctp_ssnmap;
typedef struct sctp_chunk sctp_chunk_t;
typedef struct sctp_bind_addr sctp_bind_addr_t;
#include <net/sctp/tsnmap.h>
#include <net/sctp/ulpevent.h>
......@@ -464,8 +462,8 @@ struct sctp_chunk {
* three elements of struct sk_buff. This allows us to reuse
* all the skb_* queue management functions.
*/
sctp_chunk_t *next;
sctp_chunk_t *prev;
struct sctp_chunk *next;
struct sctp_chunk *prev;
struct sk_buff_head *list;
/* This is our link to the per-transport transmitted list. */
......@@ -522,7 +520,7 @@ struct sctp_chunk {
unsigned long sent_at;
__u8 rtt_in_progress; /* Is this chunk used for RTT calculation? */
__u8 num_times_sent; /* How man times did we send this? */
__u8 resent; /* Has this chunk ever been retransmitted. */
__u8 has_tsn; /* Does this chunk have a TSN yet? */
__u8 has_ssn; /* Does this chunk have a SSN yet? */
__u8 singleton; /* Was this the only chunk in the packet? */
......@@ -545,14 +543,16 @@ struct sctp_chunk {
struct sctp_transport *transport;
};
sctp_chunk_t *sctp_make_chunk(const struct sctp_association *, __u8 type,
struct sctp_chunk *sctp_make_chunk(const struct sctp_association *, __u8 type,
__u8 flags, int size);
void sctp_free_chunk(sctp_chunk_t *);
void *sctp_addto_chunk(sctp_chunk_t *chunk, int len, const void *data);
sctp_chunk_t *sctp_chunkify(struct sk_buff *, const struct sctp_association *,
void sctp_free_chunk(struct sctp_chunk *);
void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
struct sctp_chunk *sctp_chunkify(struct sk_buff *,
const struct sctp_association *,
struct sock *);
void sctp_init_addrs(sctp_chunk_t *, union sctp_addr *, union sctp_addr *);
const union sctp_addr *sctp_source(const sctp_chunk_t *chunk);
void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
union sctp_addr *);
const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
/* This is a structure for holding either an IPv6 or an IPv4 address. */
/* sin_family -- AF_INET or AF_INET6
......@@ -564,7 +564,7 @@ struct sockaddr_storage_list {
union sctp_addr a;
};
typedef sctp_chunk_t *(sctp_packet_phandler_t)(struct sctp_association *);
typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
/* This structure holds lists of chunks as we are assembling for
* transmission.
......@@ -621,7 +621,7 @@ typedef struct sctp_packet *(sctp_outq_ohandler_config_t)
int ecn_capable,
sctp_packet_phandler_t *get_prepend_chunk);
typedef sctp_xmit_t (sctp_outq_ohandler_t)(struct sctp_packet *,
sctp_chunk_t *);
struct sctp_chunk *);
typedef int (sctp_outq_ohandler_force_t)(struct sctp_packet *);
sctp_outq_ohandler_init_t sctp_packet_init;
......@@ -832,7 +832,7 @@ struct sctp_inq {
/* This is the packet which is currently off the in queue and is
* being worked on through the inbound chunk processing.
*/
sctp_chunk_t *in_progress;
struct sctp_chunk *in_progress;
/* This is the delayed task to finish delivering inbound
* messages.
......@@ -845,7 +845,7 @@ struct sctp_inq {
struct sctp_inq *sctp_inq_new(void);
void sctp_inq_init(struct sctp_inq *);
void sctp_inq_free(struct sctp_inq *);
void sctp_inq_push(struct sctp_inq *, sctp_chunk_t *packet);
void sctp_inq_push(struct sctp_inq *, struct sctp_chunk *packet);
struct sctp_chunk *sctp_inq_pop(struct sctp_inq *);
void sctp_inq_set_th_handler(struct sctp_inq *, void (*)(void *), void *);
......@@ -916,7 +916,7 @@ struct sctp_outq *sctp_outq_new(struct sctp_association *);
void sctp_outq_init(struct sctp_association *, struct sctp_outq *);
void sctp_outq_teardown(struct sctp_outq *);
void sctp_outq_free(struct sctp_outq*);
int sctp_outq_tail(struct sctp_outq *, sctp_chunk_t *chunk);
int sctp_outq_tail(struct sctp_outq *, struct sctp_chunk *chunk);
int sctp_outq_flush(struct sctp_outq *, int);
int sctp_outq_sack(struct sctp_outq *, sctp_sackhdr_t *);
int sctp_outq_is_empty(const struct sctp_outq *);
......@@ -953,15 +953,16 @@ struct sctp_bind_addr {
int malloced; /* Are we kfree()able? */
};
sctp_bind_addr_t *sctp_bind_addr_new(int gfp_mask);
void sctp_bind_addr_init(sctp_bind_addr_t *, __u16 port);
void sctp_bind_addr_free(sctp_bind_addr_t *);
int sctp_bind_addr_copy(sctp_bind_addr_t *dest, const sctp_bind_addr_t *src,
struct sctp_bind_addr *sctp_bind_addr_new(int gfp_mask);
void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port);
void sctp_bind_addr_free(struct sctp_bind_addr *);
int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src,
sctp_scope_t scope, int gfp,int flags);
int sctp_add_bind_addr(sctp_bind_addr_t *, union sctp_addr *,
int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
int gfp);
int sctp_del_bind_addr(sctp_bind_addr_t *, union sctp_addr *);
int sctp_bind_addr_match(sctp_bind_addr_t *, const union sctp_addr *,
int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
struct sctp_opt *);
union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
int *addrs_len, int gfp);
......@@ -1025,7 +1026,7 @@ struct sctp_ep_common {
* bind_addr.port is our shared port number.
* bind_addr.address_list is our set of local IP addresses.
*/
sctp_bind_addr_t bind_addr;
struct sctp_bind_addr bind_addr;
/* Protection during address list comparisons. */
rwlock_t addr_lock;
......@@ -1477,7 +1478,7 @@ struct sctp_association {
* [This is our one-and-only-one ASCONF in flight. If we do
* not have an ASCONF in flight, this is NULL.]
*/
sctp_chunk_t *addip_last_asconf;
struct sctp_chunk *addip_last_asconf;
/* ADDIP Section 4.2 Upon reception of an ASCONF Chunk.
*
......@@ -1492,7 +1493,7 @@ struct sctp_association {
* [This is our saved ASCONF-ACK. We invalidate it when a new
* ASCONF serial number arrives.]
*/
sctp_chunk_t *addip_last_asconf_ack;
struct sctp_chunk *addip_last_asconf_ack;
/* These ASCONF chunks are waiting to be sent.
*
......@@ -1611,8 +1612,8 @@ int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
int sctp_cmp_addr_exact(const union sctp_addr *ss1,
const union sctp_addr *ss2);
sctp_chunk_t *sctp_get_ecne_prepend(struct sctp_association *asoc);
sctp_chunk_t *sctp_get_no_prepend(struct sctp_association *asoc);
struct sctp_chunk *sctp_get_ecne_prepend(struct sctp_association *asoc);
struct sctp_chunk *sctp_get_no_prepend(struct sctp_association *asoc);
/* A convenience structure to parse out SCTP specific CMSGs. */
typedef struct sctp_cmsgs {
......
......@@ -664,7 +664,7 @@ int sctp_cmp_addr_exact(const union sctp_addr *ss1,
* Note: We are sly and return a shared, prealloced chunk. FIXME:
* No we don't, but we could/should.
*/
sctp_chunk_t *sctp_get_ecne_prepend(struct sctp_association *asoc)
struct sctp_chunk *sctp_get_ecne_prepend(struct sctp_association *asoc)
{
struct sctp_chunk *chunk;
......@@ -682,7 +682,7 @@ sctp_chunk_t *sctp_get_ecne_prepend(struct sctp_association *asoc)
/* Use this function for the packet prepend callback when no ECNE
* packet is desired (e.g. some packets don't like to be bundled).
*/
sctp_chunk_t *sctp_get_no_prepend(struct sctp_association *asoc)
struct sctp_chunk *sctp_get_no_prepend(struct sctp_association *asoc)
{
return NULL;
}
......@@ -690,13 +690,14 @@ sctp_chunk_t *sctp_get_no_prepend(struct sctp_association *asoc)
/*
* Find which transport this TSN was sent on.
*/
struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *asoc, __u32 tsn)
struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *asoc,
__u32 tsn)
{
struct sctp_transport *active;
struct sctp_transport *match;
struct list_head *entry, *pos;
struct sctp_transport *transport;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
__u32 key = htonl(tsn);
match = NULL;
......@@ -719,7 +720,7 @@ struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *asoc, __u3
active = asoc->peer.active_path;
list_for_each(entry, &active->transmitted) {
chunk = list_entry(entry, sctp_chunk_t, transmitted_list);
chunk = list_entry(entry, struct sctp_chunk, transmitted_list);
if (key == chunk->subh.data_hdr->tsn) {
match = active;
......@@ -734,7 +735,7 @@ struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *asoc, __u3
if (transport == active)
break;
list_for_each(entry, &transport->transmitted) {
chunk = list_entry(entry, sctp_chunk_t,
chunk = list_entry(entry, struct sctp_chunk,
transmitted_list);
if (key == chunk->subh.data_hdr->tsn) {
match = transport;
......@@ -776,7 +777,7 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
static void sctp_assoc_bh_rcv(struct sctp_association *asoc)
{
struct sctp_endpoint *ep;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sock *sk;
struct sctp_inq *inqueue;
int state, subtype;
......@@ -852,7 +853,8 @@ void sctp_assoc_migrate(struct sctp_association *assoc, struct sock *newsk)
}
/* Update an association (possibly from unexpected COOKIE-ECHO processing). */
void sctp_assoc_update(struct sctp_association *asoc, struct sctp_association *new)
void sctp_assoc_update(struct sctp_association *asoc,
struct sctp_association *new)
{
/* Copy in new parameters of peer. */
asoc->c = new->c;
......@@ -946,7 +948,8 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
}
/* Choose the transport for sending a SHUTDOWN packet. */
struct sctp_transport *sctp_assoc_choose_shutdown_transport(struct sctp_association *asoc)
struct sctp_transport *sctp_assoc_choose_shutdown_transport(
struct sctp_association *asoc)
{
/* If this is the first time SHUTDOWN is sent, use the active path,
* else use the retran path. If the last SHUTDOWN was sent over the
......@@ -1011,7 +1014,7 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc)
/* Increase asoc's rwnd by len and send any window update SACK if needed. */
void sctp_assoc_rwnd_increase(struct sctp_association *asoc, int len)
{
sctp_chunk_t *sack;
struct sctp_chunk *sack;
struct timer_list *timer;
if (asoc->rwnd_over) {
......
......@@ -52,16 +52,17 @@
#include <net/sctp/sm.h>
/* Forward declarations for internal helpers. */
static int sctp_copy_one_addr(sctp_bind_addr_t *, union sctp_addr *,
static int sctp_copy_one_addr(struct sctp_bind_addr *, union sctp_addr *,
sctp_scope_t scope, int gfp, int flags);
static void sctp_bind_addr_clean(sctp_bind_addr_t *);
static void sctp_bind_addr_clean(struct sctp_bind_addr *);
/* First Level Abstractions. */
/* Copy 'src' to 'dest' taking 'scope' into account. Omit addresses
* in 'src' which have a broader scope than 'scope'.
*/
int sctp_bind_addr_copy(sctp_bind_addr_t *dest, const sctp_bind_addr_t *src,
int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src,
sctp_scope_t scope, int gfp, int flags)
{
struct sockaddr_storage_list *addr;
......@@ -104,11 +105,11 @@ int sctp_bind_addr_copy(sctp_bind_addr_t *dest, const sctp_bind_addr_t *src,
}
/* Create a new SCTP_bind_addr from nothing. */
sctp_bind_addr_t *sctp_bind_addr_new(int gfp)
struct sctp_bind_addr *sctp_bind_addr_new(int gfp)
{
sctp_bind_addr_t *retval;
struct sctp_bind_addr *retval;
retval = t_new(sctp_bind_addr_t, gfp);
retval = t_new(struct sctp_bind_addr, gfp);
if (!retval)
goto nomem;
......@@ -123,7 +124,7 @@ sctp_bind_addr_t *sctp_bind_addr_new(int gfp)
/* Initialize the SCTP_bind_addr structure for either an endpoint or
* an association.
*/
void sctp_bind_addr_init(sctp_bind_addr_t *bp, __u16 port)
void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port)
{
bp->malloced = 0;
......@@ -132,7 +133,7 @@ void sctp_bind_addr_init(sctp_bind_addr_t *bp, __u16 port)
}
/* Dispose of the address list. */
static void sctp_bind_addr_clean(sctp_bind_addr_t *bp)
static void sctp_bind_addr_clean(struct sctp_bind_addr *bp)
{
struct sockaddr_storage_list *addr;
struct list_head *pos, *temp;
......@@ -147,7 +148,7 @@ static void sctp_bind_addr_clean(sctp_bind_addr_t *bp)
}
/* Dispose of an SCTP_bind_addr structure */
void sctp_bind_addr_free(sctp_bind_addr_t *bp)
void sctp_bind_addr_free(struct sctp_bind_addr *bp)
{
/* Empty the bind address list. */
sctp_bind_addr_clean(bp);
......@@ -159,7 +160,7 @@ void sctp_bind_addr_free(sctp_bind_addr_t *bp)
}
/* Add an address to the bind address list in the SCTP_bind_addr structure. */
int sctp_add_bind_addr(sctp_bind_addr_t *bp, union sctp_addr *new,
int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
int gfp)
{
struct sockaddr_storage_list *addr;
......@@ -187,7 +188,7 @@ int sctp_add_bind_addr(sctp_bind_addr_t *bp, union sctp_addr *new,
/* Delete an address from the bind address list in the SCTP_bind_addr
* structure.
*/
int sctp_del_bind_addr(sctp_bind_addr_t *bp, union sctp_addr *del_addr)
int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr)
{
struct list_head *pos, *temp;
struct sockaddr_storage_list *addr;
......@@ -212,7 +213,7 @@ int sctp_del_bind_addr(sctp_bind_addr_t *bp, union sctp_addr *del_addr)
*
* The second argument is the return value for the length.
*/
union sctp_params sctp_bind_addrs_to_raw(const sctp_bind_addr_t *bp,
union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
int *addrs_len, int gfp)
{
union sctp_params addrparms;
......@@ -261,7 +262,7 @@ union sctp_params sctp_bind_addrs_to_raw(const sctp_bind_addr_t *bp,
* Create an address list out of the raw address list format (IPv4 and IPv6
* address parameters).
*/
int sctp_raw_to_bind_addrs(sctp_bind_addr_t *bp, __u8 *raw_addr_list,
int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list,
int addrs_len, __u16 port, int gfp)
{
sctp_addr_param_t *rawaddr;
......@@ -307,7 +308,8 @@ int sctp_raw_to_bind_addrs(sctp_bind_addr_t *bp, __u8 *raw_addr_list,
********************************************************************/
/* Does this contain a specified address? Allow wildcarding. */
int sctp_bind_addr_match(sctp_bind_addr_t *bp, const union sctp_addr *addr,
int sctp_bind_addr_match(struct sctp_bind_addr *bp,
const union sctp_addr *addr,
struct sctp_opt *opt)
{
struct sockaddr_storage_list *laddr;
......@@ -323,7 +325,8 @@ int sctp_bind_addr_match(sctp_bind_addr_t *bp, const union sctp_addr *addr,
}
/* Copy out addresses from the global local address list. */
static int sctp_copy_one_addr(sctp_bind_addr_t *dest, union sctp_addr *addr,
static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
union sctp_addr *addr,
sctp_scope_t scope, int gfp, int flags)
{
struct sctp_protocol *proto = sctp_get_protocol();
......
......@@ -315,7 +315,7 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep,
{
struct list_head *pos;
struct sockaddr_storage_list *addr;
sctp_bind_addr_t *bp;
struct sctp_bind_addr *bp;
sctp_read_lock(&ep->base.addr_lock);
bp = &ep->base.bind_addr;
......@@ -339,7 +339,7 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep)
struct sctp_association *asoc;
struct sock *sk;
struct sctp_transport *transport;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sctp_inq *inqueue;
sctp_subtype_t subtype;
sctp_state_t state;
......
......@@ -106,7 +106,7 @@ int sctp_rcv(struct sk_buff *skb)
struct sctp_endpoint *ep = NULL;
struct sctp_ep_common *rcvr;
struct sctp_transport *transport = NULL;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sctphdr *sh;
union sctp_addr src;
union sctp_addr dest;
......@@ -250,13 +250,13 @@ int sctp_rcv(struct sk_buff *skb)
*/
int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sctp_inq *inqueue;
/* One day chunk will live inside the skb, but for
* now this works.
*/
chunk = (sctp_chunk_t *) skb;
chunk = (struct sctp_chunk *) skb;
inqueue = &chunk->rcvr->inqueue;
sctp_inq_push(inqueue, chunk);
......
......@@ -75,10 +75,10 @@ struct sctp_inq *sctp_inq_new(void)
/* Release the memory associated with an SCTP inqueue. */
void sctp_inq_free(struct sctp_inq *queue)
{
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
/* Empty the queue. */
while ((chunk = (sctp_chunk_t *) skb_dequeue(&queue->in)))
while ((chunk = (struct sctp_chunk *) skb_dequeue(&queue->in)))
sctp_free_chunk(chunk);
/* If there is a packet which is currently being worked on,
......@@ -96,7 +96,7 @@ void sctp_inq_free(struct sctp_inq *queue)
/* Put a new packet in an SCTP inqueue.
* We assume that packet->sctp_hdr is set and in host byte order.
*/
void sctp_inq_push(struct sctp_inq *q, sctp_chunk_t *packet)
void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *packet)
{
/* Directly call the packet handling routine. */
......@@ -114,9 +114,9 @@ void sctp_inq_push(struct sctp_inq *q, sctp_chunk_t *packet)
* WARNING: If you need to put the chunk on another queue, you need to
* make a shallow copy (clone) of it.
*/
sctp_chunk_t *sctp_inq_pop(struct sctp_inq *queue)
struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
{
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
sctp_chunkhdr_t *ch = NULL;
/* The assumption is that we are safe to process the chunks
......@@ -149,7 +149,7 @@ sctp_chunk_t *sctp_inq_pop(struct sctp_inq *queue)
return NULL;
chunk = queue->in_progress =
(sctp_chunk_t *) skb_dequeue(&queue->in);
(struct sctp_chunk *) skb_dequeue(&queue->in);
/* This is the first chunk in the packet. */
chunk->singleton = 1;
......
......@@ -246,7 +246,7 @@ static inline int sctp_v6_addr_match_len(union sctp_addr *s1,
void sctp_v6_get_saddr(struct sctp_association *asoc, struct dst_entry *dst,
union sctp_addr *daddr, union sctp_addr *saddr)
{
sctp_bind_addr_t *bp;
struct sctp_bind_addr *bp;
rwlock_t *addr_lock;
struct sockaddr_storage_list *laddr;
struct list_head *pos;
......
......@@ -327,7 +327,6 @@ int sctp_packet_transmit(struct sctp_packet *packet)
sh->vtag = htonl(packet->vtag);
sh->checksum = 0;
/* 2) Calculate the Adler-32 checksum of the whole packet,
* including the SCTP common header and all the
* chunks.
......@@ -358,9 +357,10 @@ int sctp_packet_transmit(struct sctp_packet *packet)
*/
SCTP_DEBUG_PRINTK("***sctp_transmit_packet***\n");
while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks))) {
chunk->num_times_sent++;
chunk->sent_at = jiffies;
if (sctp_chunk_is_data(chunk)) {
if (!chunk->has_tsn) {
sctp_chunk_assign_tsn(chunk);
/* 6.3.1 C4) When data is in flight and when allowed
......@@ -369,13 +369,18 @@ int sctp_packet_transmit(struct sctp_packet *packet)
* SHOULD be made no more than once per round-trip
* for a given destination transport address.
*/
if ((1 == chunk->num_times_sent) &&
(!tp->rto_pending)) {
if (!tp->rto_pending) {
chunk->rtt_in_progress = 1;
tp->rto_pending = 1;
}
} else
chunk->resent = 1;
chunk->sent_at = jiffies;
has_data = 1;
}
padding = WORD_ROUND(chunk->skb->len) - chunk->skb->len;
if (padding)
memset(skb_put(chunk->skb, padding), 0, padding);
......@@ -384,8 +389,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
chunk->skb->data,
chunk->skb->len, crc32);
SCTP_DEBUG_PRINTK("%s %p[%s] %s 0x%x, %s %d, %s %d, %s %d, "
"%s %d\n",
SCTP_DEBUG_PRINTK("%s %p[%s] %s 0x%x, %s %d, %s %d, %s %d\n",
"*** Chunk", chunk,
sctp_cname(SCTP_ST_CHUNK(
chunk->chunk_hdr->type)),
......@@ -394,7 +398,6 @@ int sctp_packet_transmit(struct sctp_packet *packet)
ntohl(chunk->subh.data_hdr->tsn) : 0,
"length", ntohs(chunk->chunk_hdr->length),
"chunk->skb->len", chunk->skb->len,
"num_times_sent", chunk->num_times_sent,
"rtt_in_progress", chunk->rtt_in_progress);
/*
......
......@@ -143,14 +143,14 @@ void sctp_outq_teardown(struct sctp_outq *q)
{
struct sctp_transport *transport;
struct list_head *lchunk, *pos, *temp;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sctp_ulpevent *ev;
/* Throw away unacknowledged chunks. */
list_for_each(pos, &q->asoc->peer.transport_addr_list) {
transport = list_entry(pos, struct sctp_transport, transports);
while ((lchunk = sctp_list_dequeue(&transport->transmitted))) {
chunk = list_entry(lchunk, sctp_chunk_t,
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
/* Generate a SEND FAILED event. */
......@@ -167,14 +167,16 @@ void sctp_outq_teardown(struct sctp_outq *q)
/* Throw away chunks that have been gap ACKed. */
list_for_each_safe(lchunk, temp, &q->sacked) {
list_del(lchunk);
chunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
sctp_free_chunk(chunk);
}
/* Throw away any chunks in the retransmit queue. */
list_for_each_safe(lchunk, temp, &q->retransmit) {
list_del(lchunk);
chunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
sctp_free_chunk(chunk);
}
......@@ -194,7 +196,7 @@ void sctp_outq_teardown(struct sctp_outq *q)
q->error = 0;
/* Throw away any leftover control chunks. */
while ((chunk = (sctp_chunk_t *) skb_dequeue(&q->control)))
while ((chunk = (struct sctp_chunk *) skb_dequeue(&q->control)))
sctp_free_chunk(chunk);
}
......@@ -210,7 +212,7 @@ void sctp_outq_free(struct sctp_outq *q)
}
/* Put a new chunk in an sctp_outq. */
int sctp_outq_tail(struct sctp_outq *q, sctp_chunk_t *chunk)
int sctp_outq_tail(struct sctp_outq *q, struct sctp_chunk *chunk)
{
int error = 0;
......@@ -276,15 +278,16 @@ int sctp_outq_tail(struct sctp_outq *q, sctp_chunk_t *chunk)
void sctp_retransmit_insert(struct list_head *tlchunk, struct sctp_outq *q)
{
struct list_head *rlchunk;
sctp_chunk_t *tchunk, *rchunk;
struct sctp_chunk *tchunk, *rchunk;
__u32 ttsn, rtsn;
int done = 0;
tchunk = list_entry(tlchunk, sctp_chunk_t, transmitted_list);
tchunk = list_entry(tlchunk, struct sctp_chunk, transmitted_list);
ttsn = ntohl(tchunk->subh.data_hdr->tsn);
list_for_each(rlchunk, &q->retransmit) {
rchunk = list_entry(rlchunk, sctp_chunk_t, transmitted_list);
rchunk = list_entry(rlchunk, struct sctp_chunk,
transmitted_list);
rtsn = ntohl(rchunk->subh.data_hdr->tsn);
if (TSN_lt(ttsn, rtsn)) {
list_add(tlchunk, rlchunk->prev);
......@@ -303,11 +306,12 @@ void sctp_retransmit_mark(struct sctp_outq *q,
__u8 fast_retransmit)
{
struct list_head *lchunk, *ltemp;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
/* Walk through the specified transmitted queue. */
list_for_each_safe(lchunk, ltemp, &transport->transmitted) {
chunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
/* If we are doing retransmission due to a fast retransmit,
* only the chunk's that are marked for fast retransmit
......@@ -416,7 +420,7 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
struct list_head *lchunk;
struct sctp_transport *transport = pkt->transport;
sctp_xmit_t status;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sctp_association *asoc;
int error = 0;
......@@ -442,7 +446,8 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
lchunk = sctp_list_dequeue(lqueue);
while (lchunk) {
chunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
/* Make sure that Gap Acked TSNs are not retransmitted. A
* simple approach is just to move such TSNs out of the
......@@ -582,7 +587,7 @@ void sctp_xmit_frag(struct sctp_outq *q, struct sctp_chunk *pos,
* of all the other fragments in the 'frag_list' field.
*/
void sctp_xmit_fragmented_chunks(struct sctp_outq *q, struct sctp_packet *pkt,
sctp_chunk_t *frag)
struct sctp_chunk *frag)
{
struct sctp_association *asoc = frag->asoc;
struct list_head *lfrag, *frag_list;
......@@ -606,7 +611,7 @@ void sctp_xmit_fragmented_chunks(struct sctp_outq *q, struct sctp_packet *pkt,
/* Transmit the rest of fragments. */
frag_list = &frag->frag_list;
list_for_each(lfrag, frag_list) {
frag = list_entry(lfrag, sctp_chunk_t, frag_list);
frag = list_entry(lfrag, struct sctp_chunk, frag_list);
sctp_xmit_frag(q, pos, pkt, frag, tsn++);
}
}
......@@ -615,7 +620,7 @@ void sctp_xmit_fragmented_chunks(struct sctp_outq *q, struct sctp_packet *pkt,
* fragments. It returns the first fragment with the frag_list field holding
* the remaining fragments.
*/
sctp_chunk_t *sctp_fragment_chunk(sctp_chunk_t *chunk,
struct sctp_chunk *sctp_fragment_chunk(struct sctp_chunk *chunk,
size_t max_frag_data_len)
{
struct sctp_association *asoc = chunk->asoc;
......@@ -623,7 +628,7 @@ sctp_chunk_t *sctp_fragment_chunk(sctp_chunk_t *chunk,
struct sctp_sndrcvinfo *sinfo = &chunk->sinfo;
__u16 chunk_data_len = sctp_data_size(chunk);
__u16 ssn = ntohs(chunk->subh.data_hdr->ssn);
sctp_chunk_t *first_frag, *frag;
struct sctp_chunk *first_frag, *frag;
struct list_head *frag_list;
int nfrags;
__u8 old_flags, flags;
......@@ -700,7 +705,7 @@ sctp_chunk_t *sctp_fragment_chunk(sctp_chunk_t *chunk,
/* Free all the fragments off the first one. */
flist = &first_frag->frag_list;
while (NULL != (lfrag = sctp_list_dequeue(flist))) {
frag = list_entry(lfrag, sctp_chunk_t, frag_list);
frag = list_entry(lfrag, struct sctp_chunk, frag_list);
sctp_free_chunk(frag);
}
......@@ -735,7 +740,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
struct sk_buff_head *queue;
struct sctp_transport *transport = NULL;
struct sctp_transport *new_transport;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
sctp_xmit_t status;
int error = 0;
int start_timer = 0;
......@@ -762,7 +767,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
}
queue = &q->control;
while ((chunk = (sctp_chunk_t *)skb_dequeue(queue))) {
while ((chunk = (struct sctp_chunk *)skb_dequeue(queue))) {
/* Pick the right transport to use. */
new_transport = chunk->transport;
......@@ -980,7 +985,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
break;
case SCTP_XMIT_MUST_FRAG: {
sctp_chunk_t *frag;
struct sctp_chunk *frag;
frag = sctp_fragment_chunk(chunk,
packet->transport->asoc->frag_point);
......@@ -1101,7 +1106,7 @@ static __u32 sctp_highest_new_tsn(sctp_sackhdr_t *sack,
{
struct list_head *ltransport, *lchunk;
struct sctp_transport *transport;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
__u32 highest_new_tsn, tsn;
struct list_head *transport_list = &asoc->peer.transport_addr_list;
......@@ -1111,7 +1116,7 @@ static __u32 sctp_highest_new_tsn(sctp_sackhdr_t *sack,
transport = list_entry(ltransport, struct sctp_transport,
transports);
list_for_each(lchunk, &transport->transmitted) {
chunk = list_entry(lchunk, sctp_chunk_t,
chunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
tsn = ntohl(chunk->subh.data_hdr->tsn);
......@@ -1134,7 +1139,7 @@ int sctp_outq_sack(struct sctp_outq *q, sctp_sackhdr_t *sack)
{
struct sctp_association *asoc = q->asoc;
struct sctp_transport *transport;
sctp_chunk_t *tchunk;
struct sctp_chunk *tchunk;
struct list_head *lchunk, *transport_list, *pos;
sctp_sack_variable_t *frags = sack->variable;
__u32 sack_ctsn, ctsn, tsn;
......@@ -1191,7 +1196,8 @@ int sctp_outq_sack(struct sctp_outq *q, sctp_sackhdr_t *sack)
/* Throw away stuff rotting on the sack queue. */
list_for_each(lchunk, &q->sacked) {
tchunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
tchunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
tsn = ntohl(tchunk->subh.data_hdr->tsn);
if (TSN_lte(tsn, ctsn)) {
lchunk = lchunk->prev;
......@@ -1264,7 +1270,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
__u32 highest_new_tsn_in_sack)
{
struct list_head *lchunk;
sctp_chunk_t *tchunk;
struct sctp_chunk *tchunk;
struct list_head tlist;
__u32 tsn;
__u32 sack_ctsn;
......@@ -1294,7 +1300,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
/* The while loop will skip empty transmitted queues. */
while (NULL != (lchunk = sctp_list_dequeue(transmitted_queue))) {
tchunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
tchunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
tsn = ntohl(tchunk->subh.data_hdr->tsn);
if (sctp_acked(sack, tsn)) {
......@@ -1315,9 +1322,9 @@ static void sctp_check_transmitted(struct sctp_outq *q,
* first instance of the packet or a later
* instance).
*/
if ((!tchunk->tsn_gap_acked) &&
(1 == tchunk->num_times_sent) &&
(tchunk->rtt_in_progress)) {
if (!tchunk->tsn_gap_acked &&
!tchunk->resent &&
tchunk->rtt_in_progress) {
rtt = jiffies - tchunk->sent_at;
sctp_transport_update_rto(transport,
rtt);
......@@ -1557,7 +1564,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
* acked by the Cumulative TSN Ack.
*/
while (NULL != (lchunk = sctp_list_dequeue(&tlist))) {
tchunk = list_entry(lchunk, sctp_chunk_t, transmitted_list);
tchunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
tsn = ntohl(tchunk->subh.data_hdr->tsn);
/* RFC 2960 7.2.4, sctpimpguide-05 2.8.2 M3) Examine all
......
......@@ -393,7 +393,7 @@ struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
{
struct rtable *rt;
struct flowi fl;
sctp_bind_addr_t *bp;
struct sctp_bind_addr *bp;
rwlock_t *addr_lock;
struct sockaddr_storage_list *laddr;
struct list_head *pos;
......
This diff is collapsed.
......@@ -81,11 +81,11 @@ static void sctp_do_ecn_ce_work(struct sctp_association *asoc,
* This element represents the lowest TSN number in the datagram
* that was originally marked with the CE bit.
*/
static sctp_chunk_t *sctp_do_ecn_ecne_work(struct sctp_association *asoc,
static struct sctp_chunk *sctp_do_ecn_ecne_work(struct sctp_association *asoc,
__u32 lowest_tsn,
sctp_chunk_t *chunk)
struct sctp_chunk *chunk)
{
sctp_chunk_t *repl;
struct sctp_chunk *repl;
/* Our previously transmitted packet ran into some congestion
* so we should take action by reducing cwnd and ssthresh
......@@ -528,7 +528,7 @@ static void sctp_cmd_hb_timer_update(sctp_cmd_seq_t *cmds,
static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
struct sctp_association *asoc,
struct sctp_transport *t,
sctp_chunk_t *chunk)
struct sctp_chunk *chunk)
{
sctp_sender_hb_info_t *hbinfo;
......@@ -596,7 +596,7 @@ static int sctp_cmd_process_sack(sctp_cmd_seq_t *cmds,
*/
static void sctp_cmd_setup_t2(sctp_cmd_seq_t *cmds,
struct sctp_association *asoc,
sctp_chunk_t *chunk)
struct sctp_chunk *chunk)
{
struct sctp_transport *t;
......@@ -810,8 +810,8 @@ int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype,
int error = 0;
int force;
sctp_cmd_t *cmd;
sctp_chunk_t *new_obj;
sctp_chunk_t *chunk = NULL;
struct sctp_chunk *new_obj;
struct sctp_chunk *chunk = NULL;
struct sctp_packet *packet;
struct list_head *pos;
struct timer_list *timer;
......@@ -819,8 +819,8 @@ int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype,
struct sctp_transport *t;
sctp_sackhdr_t sackh;
if(SCTP_EVENT_T_TIMEOUT != event_type)
chunk = (sctp_chunk_t *) event_arg;
if (SCTP_EVENT_T_TIMEOUT != event_type)
chunk = (struct sctp_chunk *) event_arg;
/* Note: This whole file is a huge candidate for rework.
* For example, each command could either have its own handler, so
......
This diff is collapsed.
......@@ -82,7 +82,7 @@
/* Forward declarations for internal helper functions. */
static int sctp_writeable(struct sock *sk);
static inline int sctp_wspace(struct sctp_association *asoc);
static inline void sctp_set_owner_w(sctp_chunk_t *chunk);
static inline void sctp_set_owner_w(struct sctp_chunk *chunk);
static void sctp_wfree(struct sk_buff *skb);
static int sctp_wait_for_sndbuf(struct sctp_association *, long *timeo_p,
int msg_len);
......@@ -195,7 +195,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
{
struct sctp_opt *sp = sctp_sk(sk);
struct sctp_endpoint *ep = sp->ep;
sctp_bind_addr_t *bp = &ep->base.bind_addr;
struct sctp_bind_addr *bp = &ep->base.bind_addr;
struct sctp_af *af;
unsigned short snum;
int ret = 0;
......@@ -488,7 +488,7 @@ int sctp_bindx_rem(struct sock *sk, struct sockaddr_storage *addrs, int addrcnt)
struct sctp_opt *sp = sctp_sk(sk);
struct sctp_endpoint *ep = sp->ep;
int cnt;
sctp_bind_addr_t *bp = &ep->base.bind_addr;
struct sctp_bind_addr *bp = &ep->base.bind_addr;
int retval = 0;
union sctp_addr saveaddr;
......@@ -750,7 +750,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct sctp_endpoint *ep;
struct sctp_association *new_asoc=NULL, *asoc=NULL;
struct sctp_transport *transport;
sctp_chunk_t *chunk = NULL;
struct sctp_chunk *chunk = NULL;
union sctp_addr to;
struct sockaddr *msg_name = NULL;
struct sctp_sndrcvinfo default_sinfo = { 0 };
......@@ -1020,7 +1020,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
}
/* Now send the (possibly) fragmented message. */
while ((chunk = (sctp_chunk_t *)__skb_dequeue(&chunks))) {
while ((chunk = (struct sctp_chunk *)__skb_dequeue(&chunks))) {
/* Do accounting for the write space. */
sctp_set_owner_w(chunk);
......@@ -2177,7 +2177,7 @@ static int sctp_getsockopt_local_addrs_num(struct sock *sk, int len,
char *optval, int *optlen)
{
sctp_assoc_t id;
sctp_bind_addr_t *bp;
struct sctp_bind_addr *bp;
struct sctp_association *asoc;
struct list_head *pos;
int cnt = 0;
......@@ -2215,7 +2215,7 @@ static int sctp_getsockopt_local_addrs_num(struct sock *sk, int len,
static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
char *optval, int *optlen)
{
sctp_bind_addr_t *bp;
struct sctp_bind_addr *bp;
struct sctp_association *asoc;
struct list_head *pos;
int cnt = 0;
......@@ -3200,7 +3200,7 @@ static inline int sctp_wspace(struct sctp_association *asoc)
* destructor in the data chunk skb for the purpose of the sndbuf space
* tracking.
*/
static inline void sctp_set_owner_w(sctp_chunk_t *chunk)
static inline void sctp_set_owner_w(struct sctp_chunk *chunk)
{
struct sctp_association *asoc = chunk->asoc;
struct sock *sk = asoc->base.sk;
......@@ -3210,7 +3210,7 @@ static inline void sctp_set_owner_w(sctp_chunk_t *chunk)
chunk->skb->destructor = sctp_wfree;
/* Save the chunk pointer in skb for sctp_wfree to use later. */
*((sctp_chunk_t **)(chunk->skb->cb)) = chunk;
*((struct sctp_chunk **)(chunk->skb->cb)) = chunk;
asoc->sndbuf_used += SCTP_DATA_SNDSIZE(chunk);
sk->wmem_queued += SCTP_DATA_SNDSIZE(chunk);
......@@ -3248,11 +3248,11 @@ static void __sctp_write_space(struct sctp_association *asoc)
static void sctp_wfree(struct sk_buff *skb)
{
struct sctp_association *asoc;
sctp_chunk_t *chunk;
struct sctp_chunk *chunk;
struct sock *sk;
/* Get the saved chunk pointer. */
chunk = *((sctp_chunk_t **)(skb->cb));
chunk = *((struct sctp_chunk **)(skb->cb));
asoc = chunk->asoc;
sk = asoc->base.sk;
asoc->sndbuf_used -= SCTP_DATA_SNDSIZE(chunk);
......
......@@ -316,7 +316,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change(
* error formats.
*/
struct sctp_ulpevent *sctp_ulpevent_make_remote_error(
const struct sctp_association *asoc, sctp_chunk_t *chunk,
const struct sctp_association *asoc, struct sctp_chunk *chunk,
__u16 flags, int gfp)
{
struct sctp_ulpevent *event;
......@@ -420,7 +420,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_remote_error(
* 5.3.1.4 SCTP_SEND_FAILED
*/
struct sctp_ulpevent *sctp_ulpevent_make_send_failed(
const struct sctp_association *asoc, sctp_chunk_t *chunk,
const struct sctp_association *asoc, struct sctp_chunk *chunk,
__u16 flags, __u32 error, int gfp)
{
struct sctp_ulpevent *event;
......@@ -588,7 +588,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event(
* 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
*/
struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
sctp_chunk_t *chunk, int gfp)
struct sctp_chunk *chunk,
int gfp)
{
struct sctp_ulpevent *event;
struct sctp_sndrcvinfo *info;
......
......@@ -118,7 +118,7 @@ void sctp_ulpq_free(struct sctp_ulpq *ulpq)
}
/* Process an incoming DATA chunk. */
int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, sctp_chunk_t *chunk,
int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
int gfp)
{
struct sk_buff_head temp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment