summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.h
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2008-12-06 13:19:54 +0000
committerrrs <rrs@FreeBSD.org>2008-12-06 13:19:54 +0000
commit0f2b9dafa358fb3b64efed4842cd31650ceea672 (patch)
tree773b646ae7f5af08e1421071f2aa493698537042 /sys/netinet/sctp_pcb.h
parentf4594595d3de298d45caf389d9cee0d893cedfc0 (diff)
downloadFreeBSD-src-0f2b9dafa358fb3b64efed4842cd31650ceea672.zip
FreeBSD-src-0f2b9dafa358fb3b64efed4842cd31650ceea672.tar.gz
Code from the hack-session known as the IETF (and a
bit of debugging afterwards): - Fix protection code for notification generation. - Decouple associd from vtag - Allow vtags to have less strigent requirements in non-uniqueness. o don't pre-hash them when you issue one in a cookie. o Allow duplicates and use addresses and ports to discriminate amongst the duplicates during lookup. - Add support for the NAT draft draft-ietf-behave-sctpnat-00, this is still experimental and needs more extensive testing with the Jason Butt ipfw changes. - Support for the SENDER_DRY event to get DTLS in OpenSSL working with a set of patches from Michael Tuexen (hopefully heading to OpenSSL soon). - Update the support of SCTP-AUTH by Peter Lei. - Use macros for refcounting. - Fix MTU for UDP encapsulation. - Fix reporting back of unsent data. - Update assoc send counter handling to be consistent with endpoint sent counter. - Fix a bug in PR-SCTP. - Fix so we only send another FWD-TSN when a SACK arrives IF and only if the adv-peer-ack point progressed. However we still make sure a timer is running if we do have an adv_peer_ack point. - Fix PR-SCTP bug where chunks were retransmitted if they are sent unreliable but not abandoned yet. With the help of: Michael Teuxen and Peter Lei :-) MFC after: 4 weeks
Diffstat (limited to 'sys/netinet/sctp_pcb.h')
-rw-r--r--sys/netinet/sctp_pcb.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index 19d1190..66c5f7b 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -133,6 +133,8 @@ struct sctp_block_entry {
struct sctp_timewait {
uint32_t tv_sec_at_expire; /* the seconds from boot to expire */
uint32_t v_tag; /* the vtag that can not be reused */
+ uint16_t lport; /* the local port used in vtag */
+ uint16_t rport; /* the remote port used in vtag */
};
struct sctp_tagblock {
@@ -148,8 +150,6 @@ struct sctp_epinfo {
struct sctppcbhead *sctp_ephash;
u_long hashmark;
- struct sctpasochead *sctp_restarthash;
- u_long hashrestartmark;
/*-
* The TCP model represents a substantial overhead in that we get an
* additional hash table to keep explicit connections in. The
@@ -411,6 +411,10 @@ struct sctp_inpcb {
uint32_t total_recvs;
uint32_t last_abort_code;
uint32_t total_nospaces;
+ struct sctpasochead *sctp_asocidhash;
+ u_long hashasocidmark;
+ uint32_t sctp_associd_counter;
+
#ifdef SCTP_ASOCLOG_OF_TSNS
struct sctp_pcbtsn_rlog readlog[SCTP_READ_LOG_SIZE];
uint32_t readlog_index;
@@ -424,7 +428,7 @@ struct sctp_tcb {
* table */
LIST_ENTRY(sctp_tcb) sctp_tcblist; /* list of all of the
* TCB's */
- LIST_ENTRY(sctp_tcb) sctp_tcbrestarhash; /* next link in restart
+ LIST_ENTRY(sctp_tcb) sctp_tcbasocidhash; /* next link in asocid
* hash table */
LIST_ENTRY(sctp_tcb) sctp_asocs; /* vtag hash list */
struct sctp_block_entry *block_entry; /* pointer locked by socket
@@ -537,12 +541,15 @@ sctp_findassociation_ep_addr(struct sctp_inpcb **,
struct sctp_tcb *);
struct sctp_tcb *
+ sctp_findasoc_ep_asocid_locked(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock);
+
+struct sctp_tcb *
sctp_findassociation_ep_asocid(struct sctp_inpcb *,
sctp_assoc_t, int);
struct sctp_tcb *
sctp_findassociation_ep_asconf(struct mbuf *, int, int,
- struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **);
+ struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id);
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id);
@@ -557,12 +564,12 @@ sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int);
-void sctp_delete_from_timewait(uint32_t);
+void sctp_delete_from_timewait(uint32_t, uint16_t, uint16_t);
-int sctp_is_in_timewait(uint32_t tag);
+int sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport);
void
- sctp_add_vtag_to_timewait(uint32_t, uint32_t);
+ sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, uint16_t lport, uint16_t rport);
void sctp_add_local_addr_ep(struct sctp_inpcb *, struct sctp_ifa *, uint32_t);
@@ -593,7 +600,7 @@ int
sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *,
struct sctp_nets *);
-int sctp_is_vtag_good(struct sctp_inpcb *, uint32_t, struct timeval *, int);
+int sctp_is_vtag_good(struct sctp_inpcb *, uint32_t, uint16_t lport, uint16_t rport, struct timeval *, int);
/* void sctp_drain(void); */
OpenPOWER on IntegriCloud