summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2013-11-02 18:02:02 +0000
committert00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2013-11-02 18:02:02 +0000
commitfdb25d424e4a8793c59ed557f48c4d3bcd9d6f60 (patch)
tree0784e46fe2a0fb4005cbe2f5c4853db8da49290e
parente2eb1964053526b32793c0b96a8fe58a6be20709 (diff)
downloadusrsctplib-fdb25d424e4a8793c59ed557f48c4d3bcd9d6f60.tar.gz
Address more warnings when compiling without INET and INET6.
git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8648 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-xnetinet/sctp_pcb.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/netinet/sctp_pcb.c b/netinet/sctp_pcb.c
index 7cf4f0e..3b20422 100755
--- a/netinet/sctp_pcb.c
+++ b/netinet/sctp_pcb.c
@@ -918,8 +918,13 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr,
static int
sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to)
{
- int loopback_scope, ipv4_local_scope, local_scope, site_scope;
- int ipv4_addr_legal, ipv6_addr_legal;
+ int loopback_scope;
+#if defined(INET)
+ int ipv4_local_scope, ipv4_addr_legal;
+#endif
+#if defined(INET6)
+ int local_scope, site_scope, ipv6_addr_legal;
+#endif
#if defined(__Userspace__)
int conn_addr_legal;
#endif
@@ -928,11 +933,15 @@ sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to)
struct sctp_ifa *sctp_ifa;
loopback_scope = stcb->asoc.scope.loopback_scope;
+#if defined(INET)
ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope;
+ ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal;
+#endif
+#if defined(INET6)
local_scope = stcb->asoc.scope.local_scope;
site_scope = stcb->asoc.scope.site_scope;
- ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal;
ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal;
+#endif
#if defined(__Userspace__)
conn_addr_legal = stcb->asoc.scope.conn_addr_legal;
#endif
@@ -2311,7 +2320,10 @@ sctp_findassociation_special_addr(struct mbuf *m, int offset,
{
struct sctp_paramhdr *phdr, parm_buf;
struct sctp_tcb *stcb;
- uint32_t ptype, plen;
+#if defined(INET) || defined(INET6)
+ uint16_t ptype;
+#endif
+ uint16_t plen;
#ifdef INET
struct sockaddr_in sin4;
#endif
@@ -2342,7 +2354,9 @@ sctp_findassociation_special_addr(struct mbuf *m, int offset,
phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf));
while (phdr != NULL) {
/* now we must see if we want the parameter */
+#if defined(INET) || defined(INET6)
ptype = ntohs(phdr->param_type);
+#endif
plen = ntohs(phdr->param_length);
if (plen == 0) {
break;
@@ -3134,7 +3148,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
/* bind a ep to a socket address */
struct sctppcbhead *head;
struct sctp_inpcb *inp, *inp_tmp;
+#if defined(INET) || defined(INET6)
struct inpcb *ip_inp;
+#endif
int port_reuse_active = 0;
int bindall;
#ifdef SCTP_MVRF
@@ -3148,7 +3164,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
error = 0;
bindall = 1;
inp = (struct sctp_inpcb *)so->so_pcb;
+#if defined(INET) || defined(INET6)
ip_inp = (struct inpcb *)so->so_pcb;
+#endif
#ifdef SCTP_DEBUG
if (addr) {
SCTPDBG(SCTP_DEBUG_PCB1, "Bind called port: %d\n",