Lines Matching defs:port

318 	if (!sctp_sk(sk)->ep->base.bind_addr.port)
395 pr_debug("%s: sk:%p, new addr:%pISc, port:%d, new port:%d, len:%d\n",
396 __func__, sk, &addr->sa, bp->port, snum, len);
402 /* We must either be unbound, or bind to the same port.
404 * We'll just inhert an already bound port in this case
406 if (bp->port) {
408 snum = bp->port;
409 else if (snum != bp->port) {
410 pr_debug("%s: new port %d doesn't match existing port "
411 "%d\n", __func__, snum, bp->port);
434 /* Refresh ephemeral port. */
435 if (!bp->port) {
436 bp->port = inet_sk(sk)->inet_num;
716 sa_addr->v4.sin_port != htons(bp->port)) {
722 sa_addr->v4.sin_port = htons(bp->port);
837 htons(bp->port);
914 /* It is safe to write port space in caller. */
916 addr->v4.sin_port = htons(sp->ep->base.bind_addr.port);
952 * For SCTP, the port given in each socket address must be the same, or
1080 if (!ep->base.bind_addr.port) {
1084 if (inet_port_requires_bind_service(net, ep->base.bind_addr.port) &&
1213 if (asoc->peer.port != ntohs(daddr->v4.sin_port))
1238 inet_sk(sk)->inet_dport = htons(asoc->peer.port);
1280 * For SCTP, the port given in each socket address must be the same, or
1724 daddr->v4.sin_port = htons(asoc->peer.port);
1735 daddr->v6.sin6_port = htons(asoc->peer.port);
4256 if (sctp_sk(sk)->ep->base.bind_addr.port)
6190 static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
6213 temp.v4.sin_port = htons(port);
6288 cnt = sctp_copy_laddrs(sk, bp->port, addrs,
8319 /* Check if port is acceptable. Possibly find first available port.
8321 * The port hash table (contained in the 'global' SCTP protocol storage
8324 * list (the list number is the port number hashed out, so as you
8328 * link to the socket (struct sock) that uses it, the port number and
8350 /* Search for an available port. */
8368 if ((pp->port == rover) &&
8377 /* Exhausted local port range during search? */
8382 /* OK, here is the one we will use. HEAD (the port
8388 /* We are given an specific port number; we verify
8391 * to the port number (snum) - we detect that with the
8392 * port iterator, pp being NULL.
8397 if ((pp->port == snum) && net_eq(pp->net, net))
8405 /* We had a port hash table hit - there is an
8406 * available port (pp != NULL) and it is being
8420 /* Run through the list of sockets bound to the port
8421 * (pp->port) [via the pointers bind_next and
8427 * that this port/socket (sk) combination are already
8454 /* If there was a hash table miss, create a new port. */
8502 /* Assign a 'snum' port to the socket. If snum == 0, an ephemeral
8503 * port is requested.
8514 /* Note: sk->sk_num gets filled in if ephemeral port request. */
8543 * picks an ephemeral port and will choose an address set equivalent
8552 if (!ep->base.bind_addr.port) {
8709 pp->port = snum;
8728 /* Release this socket's reference to a local port. */
8753 * The system picks an ephemeral port and choose an address set equivalent
8762 __be16 port;
8767 port = htons(inet_sk(sk)->inet_num);
8768 af->inaddr_any(&autoaddr, port);
9482 newinet->inet_dport = htons(asoc->peer.port);
9520 struct sctp_bind_bucket *pp; /* hash list port iterator */