diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2003-10-02 12:48:58 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-10-02 12:48:58 -0700 |
| commit | 67e6a91ee3704db49c3c973d67c7cd8ef11ff6d8 (patch) | |
| tree | ffc126531c0b727f371a556f8c95fcdb340fc3bc /include/net | |
| parent | 773bc0e3a00ab16f9e40ef73aa3c641d9ec7f9fc (diff) | |
| parent | 0b49f36e7c57b37faa042bdf9dc8dd405b5996ba (diff) | |
Merge http://linux-lksctp.bkbits.net/lksctp-2.5
into nuts.ninka.net:/disk1/davem/BK/net-2.5
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/sctp/command.h | 6 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 32 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 12 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 8 |
4 files changed, 37 insertions, 21 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 420f9cf919a6..941f935b012b 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h @@ -1,5 +1,6 @@ -/* SCTP kernel reference Implementation Copyright (C) 1999-2001 - * Cisco, Motorola, and IBM +/* SCTP kernel reference Implementation + * (C) Copyright IBM Corp. 2001, 2003 + * Copyright (C) 1999-2001 Cisco, Motorola * * This file is part of the SCTP kernel reference Implementation * @@ -88,6 +89,7 @@ typedef enum { SCTP_CMD_PART_DELIVER, /* Partial data delivery considerations. */ SCTP_CMD_RENEGE, /* Renege data on an association. */ SCTP_CMD_SETUP_T4, /* ADDIP, setup T4 RTO timer parms. */ + SCTP_CMD_PROCESS_OPERR, /* Process an ERROR chunk. */ SCTP_CMD_LAST } sctp_verb_t; diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 3f21f1985699..bf33562cd101 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -116,6 +116,9 @@ #define SCTP_STATIC static #endif +#define MSECS_TO_JIFFIES(msec) (msec * HZ / 1000) +#define JIFFIES_TO_MSECS(jiff) (jiff * 1000 / HZ) + /* * Function declarations. */ @@ -495,22 +498,19 @@ for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ #define tv_lt(s, t) \ (s.tv_sec < t.tv_sec || (s.tv_sec == t.tv_sec && s.tv_usec < t.tv_usec)) -/* Stolen from net/profile.h. Using it from there is more grief than - * it is worth. - */ -static inline void tv_add(const struct timeval *entered, struct timeval *leaved) -{ - time_t usecs = leaved->tv_usec + entered->tv_usec; - time_t secs = leaved->tv_sec + entered->tv_sec; - - if (usecs >= 1000000) { - usecs -= 1000000; - secs++; - } - leaved->tv_sec = secs; - leaved->tv_usec = usecs; -} - +/* Add tv1 to tv2. */ +#define TIMEVAL_ADD(tv1, tv2) \ +({ \ + suseconds_t usecs = (tv2).tv_usec + (tv1).tv_usec; \ + time_t secs = (tv2).tv_sec + (tv1).tv_sec; \ +\ + if (usecs >= 1000000) { \ + usecs -= 1000000; \ + secs++; \ + } \ + (tv2).tv_sec = secs; \ + (tv2).tv_usec = usecs; \ +}) /* External references. */ diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 3eb9c18df0c5..2b62b1afef2a 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -265,13 +265,19 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *, struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc, union sctp_addr *addr, int vparam_len); +struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, + union sctp_addr *, + struct sockaddr *, + int, int); +struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, + union sctp_addr *addr); +struct sctp_chunk *sctp_make_asconf_ack(struct sctp_association *asoc, + int serial, int vparam_len); + struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, struct sctp_chunk *asconf, int vparam_len); -struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, - union sctp_addr *addr); - void sctp_chunk_assign_tsn(struct sctp_chunk *); void sctp_chunk_assign_ssn(struct sctp_chunk *); diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 7ba32701be00..bf2745654d7a 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -1085,6 +1085,10 @@ int sctp_add_bind_addr(struct sctp_bind_addr *, 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_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, + const union sctp_addr *addrs, + int addrcnt, + struct sctp_opt *opt); union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, int *addrs_len, int gfp); int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, @@ -1389,6 +1393,10 @@ struct sctp_association { __u8 ipv4_address; /* Peer understands IPv4 addresses? */ __u8 ipv6_address; /* Peer understands IPv6 addresses? */ __u8 hostname_address;/* Peer understands DNS addresses? */ + + /* Does peer support ADDIP? */ + __u8 asconf_capable; + struct sctp_inithdr i; int cookie_len; void *cookie; |
