Deleted Added
full compact
34c34
< __FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 179157 2008-05-20 13:47:46Z rrs $");
---
> __FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 179783 2008-06-14 07:58:05Z rrs $");
60d59
< /* Init the SCTP pcb in sctp_pcb.c */
63c62
< sctp_pcb_init();
---
> bzero(&SCTP_BASE_STATS, sizeof(struct sctpstat));
64a64,65
> /* Initialize and modify the sysctled variables */
> sctp_init_sysctls();
67c68
< sctp_max_chunks_on_queue = (nmbclusters / 8);
---
> SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue) = (nmbclusters / 8);
73c74
< sctp_sendspace = min(sb_max_adj,
---
> SCTP_BASE_SYSCTL(sctp_sendspace) = min(sb_max_adj,
80c81
< sctp_recvspace = sctp_sendspace;
---
> SCTP_BASE_SYSCTL(sctp_recvspace) = SCTP_BASE_SYSCTL(sctp_sendspace);
82c83,90
< }
---
> SCTP_BASE_VAR(first_time) = 0;
> SCTP_BASE_VAR(sctp_pcb_initialized) = 0;
> sctp_pcb_init();
> #if defined(SCTP_PACKET_LOGGING)
> SCTP_BASE_VAR(packet_log_writers) = 0;
> SCTP_BASE_VAR(packet_log_end) = 0;
> bzero(&SCTP_BASE_VAR(packet_log_buffer), SCTP_PACKET_LOG_SIZE);
> #endif
84a93
> }
85a95,100
> void
> sctp_finish(void)
> {
> sctp_pcb_finish();
> }
>
87,88c102,103
< * cleanup of the sctppcbinfo structure.
< * Assumes that the sctppcbinfo lock is held.
---
> * cleanup of the SCTP_BASE_INFO() structure.
> * Assumes that the SCTP_BASE_INFO() lock is held.
94,101c109,116
< if (sctppcbinfo.sctp_asochash != NULL)
< SCTP_HASH_FREE(sctppcbinfo.sctp_asochash, sctppcbinfo.hashasocmark);
< if (sctppcbinfo.sctp_ephash != NULL)
< SCTP_HASH_FREE(sctppcbinfo.sctp_ephash, sctppcbinfo.hashmark);
< if (sctppcbinfo.sctp_tcpephash != NULL)
< SCTP_HASH_FREE(sctppcbinfo.sctp_tcpephash, sctppcbinfo.hashtcpmark);
< if (sctppcbinfo.sctp_restarthash != NULL)
< SCTP_HASH_FREE(sctppcbinfo.sctp_restarthash, sctppcbinfo.hashrestartmark);
---
> if (SCTP_BASE_INFO(sctp_asochash) != NULL)
> SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_asochash), SCTP_BASE_INFO(hashasocmark));
> if (SCTP_BASE_INFO(sctp_ephash) != NULL)
> SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_ephash), SCTP_BASE_INFO(hashmark));
> if (SCTP_BASE_INFO(sctp_tcpephash) != NULL)
> SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_tcpephash), SCTP_BASE_INFO(hashtcpmark));
> if (SCTP_BASE_INFO(sctp_restarthash) != NULL)
> SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_restarthash), SCTP_BASE_INFO(hashrestartmark));
137c152
< if (sctp_logging_level & SCTP_FLIGHT_LOGGING_ENABLE) {
---
> if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) {
296c311
< if (sctp_cmt_on_off && sctp_cmt_pf) {
---
> if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && SCTP_BASE_SYSCTL(sctp_cmt_pf)) {
524c539
< error = SCTP_SORESERVE(so, sctp_sendspace, sctp_recvspace);
---
> error = SCTP_SORESERVE(so, SCTP_BASE_SYSCTL(sctp_sendspace), SCTP_BASE_SYSCTL(sctp_recvspace));
1677c1692
< if (sctp_cmt_on_off) {
---
> if (SCTP_BASE_SYSCTL(sctp_cmt_on_off)) {
2743c2758
< if (sctp_cmt_on_off) {
---
> if (SCTP_BASE_SYSCTL(sctp_cmt_on_off)) {
3702,3703c3717,3718
< SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EDOM);
< error = EDOM;
---
> SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
> error = EINVAL;
3725,3726c3740,3741
< SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EDOM);
< error = EDOM;
---
> SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
> error = EINVAL;
4193c4208
< if (sctp_logging_level & SCTP_LOCK_LOGGING_ENABLE) {
---
> if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) {