Lines Matching refs:ua

152 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua);
153 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua);
677 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in __tipc_bind() local
684 if (ua->addrtype == TIPC_SERVICE_ADDR) { in __tipc_bind()
685 ua->addrtype = TIPC_SERVICE_RANGE; in __tipc_bind()
686 ua->sr.upper = ua->sr.lower; in __tipc_bind()
688 if (ua->scope < 0) { in __tipc_bind()
690 ua->scope = -ua->scope; in __tipc_bind()
693 if (ua->scope != TIPC_NODE_SCOPE) in __tipc_bind()
694 ua->scope = TIPC_CLUSTER_SCOPE; in __tipc_bind()
700 return tipc_sk_withdraw(tsk, ua); in __tipc_bind()
701 return tipc_sk_publish(tsk, ua); in __tipc_bind()
716 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in tipc_bind() local
717 u32 atype = ua->addrtype; in tipc_bind()
720 if (!tipc_uaddr_valid(ua, alen)) in tipc_bind()
724 if (ua->sr.type < TIPC_RESERVED_TYPES) { in tipc_bind()
726 ua->sr.type); in tipc_bind()
842 static int tipc_sendmcast(struct socket *sock, struct tipc_uaddr *ua, in tipc_sendmcast() argument
864 tipc_nametbl_lookup_mcast_nodes(net, ua, &dsts); in tipc_sendmcast()
874 msg_set_nametype(hdr, ua->sr.type); in tipc_sendmcast()
875 msg_set_namelower(hdr, ua->sr.lower); in tipc_sendmcast()
876 msg_set_nameupper(hdr, ua->sr.upper); in tipc_sendmcast()
960 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_unicast() local
968 node = ua->sk.node; in tipc_send_group_unicast()
969 port = ua->sk.ref; in tipc_send_group_unicast()
1003 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_anycast() local
1019 ua->sa.type = msg_nametype(hdr); in tipc_send_group_anycast()
1020 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_anycast()
1029 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, in tipc_send_group_anycast()
1085 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_bcast() local
1110 if (ua) { in tipc_send_group_bcast()
1112 msg_set_nameinst(hdr, ua->sa.instance); in tipc_send_group_bcast()
1159 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_mcast() local
1169 ua->sa.type = msg_nametype(hdr); in tipc_send_group_mcast()
1170 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_mcast()
1173 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, exclude, true)) in tipc_send_group_mcast()
1177 tipc_dest_pop(&dsts, &ua->sk.node, &ua->sk.ref); in tipc_send_group_mcast()
1202 struct tipc_uaddr ua; in tipc_sk_mcast_rcv() local
1207 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_mcast_rcv()
1217 ua.sr.type = msg_nametype(hdr); in tipc_sk_mcast_rcv()
1218 ua.sr.lower = msg_namelower(hdr); in tipc_sk_mcast_rcv()
1219 ua.sr.upper = msg_nameupper(hdr); in tipc_sk_mcast_rcv()
1221 ua.scope = TIPC_ANY_SCOPE; in tipc_sk_mcast_rcv()
1223 ua.scope = TIPC_CLUSTER_SCOPE; in tipc_sk_mcast_rcv()
1238 ua.sr.lower = 0; in tipc_sk_mcast_rcv()
1239 ua.sr.upper = ~0; in tipc_sk_mcast_rcv()
1240 ua.scope = msg_lookup_scope(hdr); in tipc_sk_mcast_rcv()
1244 tipc_nametbl_lookup_mcast_sockets(net, &ua, &dports); in tipc_sk_mcast_rcv()
1413 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in __tipc_sendmsg() local
1426 if (ua) { in __tipc_sendmsg()
1427 if (!tipc_uaddr_valid(ua, m->msg_namelen)) in __tipc_sendmsg()
1429 atype = ua->addrtype; in __tipc_sendmsg()
1434 if (!ua) in __tipc_sendmsg()
1445 if (!ua) { in __tipc_sendmsg()
1446 ua = (struct tipc_uaddr *)&tsk->peer; in __tipc_sendmsg()
1447 if (!syn && ua->family != AF_TIPC) in __tipc_sendmsg()
1449 atype = ua->addrtype; in __tipc_sendmsg()
1468 return tipc_sendmcast(sock, ua, m, dlen, timeout); in __tipc_sendmsg()
1470 skaddr.node = ua->lookup_node; in __tipc_sendmsg()
1471 ua->scope = tipc_node2scope(skaddr.node); in __tipc_sendmsg()
1472 if (!tipc_nametbl_lookup_anycast(net, ua, &skaddr)) in __tipc_sendmsg()
1475 skaddr = ua->sk; in __tipc_sendmsg()
1492 msg_set_nametype(hdr, ua->sa.type); in __tipc_sendmsg()
1493 msg_set_nameinst(hdr, ua->sa.instance); in __tipc_sendmsg()
1494 msg_set_lookup_scope(hdr, ua->scope); in __tipc_sendmsg()
2899 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_publish() argument
2914 p = tipc_nametbl_publish(net, ua, &skaddr, key); in tipc_sk_publish()
2924 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_withdraw() argument
2932 if (!ua) { in tipc_sk_withdraw()
2939 if (p->scope != ua->scope) in tipc_sk_withdraw()
2941 if (p->sr.type != ua->sr.type) in tipc_sk_withdraw()
2943 if (p->sr.lower != ua->sr.lower) in tipc_sk_withdraw()
2945 if (p->sr.upper != ua->sr.upper) in tipc_sk_withdraw()
2947 tipc_nametbl_withdraw(net, ua, &p->sk, p->key); in tipc_sk_withdraw()
3071 struct tipc_uaddr ua; in tipc_sk_join() local
3089 tipc_uaddr(&ua, TIPC_SERVICE_RANGE, mreq->scope, in tipc_sk_join()
3091 tipc_nametbl_build_group(net, grp, &ua); in tipc_sk_join()
3092 rc = tipc_sk_publish(tsk, &ua); in tipc_sk_join()
3109 struct tipc_uaddr ua; in tipc_sk_leave() local
3114 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_leave()
3115 tipc_group_self(grp, &ua.sr, &scope); in tipc_sk_leave()
3116 ua.scope = scope; in tipc_sk_leave()
3119 tipc_sk_withdraw(tsk, &ua); in tipc_sk_leave()