Lines Matching full:ua

150 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua);
151 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua);
676 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in __tipc_bind() local
683 if (ua->addrtype == TIPC_SERVICE_ADDR) { in __tipc_bind()
684 ua->addrtype = TIPC_SERVICE_RANGE; in __tipc_bind()
685 ua->sr.upper = ua->sr.lower; in __tipc_bind()
687 if (ua->scope < 0) { in __tipc_bind()
689 ua->scope = -ua->scope; in __tipc_bind()
692 if (ua->scope != TIPC_NODE_SCOPE) in __tipc_bind()
693 ua->scope = TIPC_CLUSTER_SCOPE; in __tipc_bind()
699 return tipc_sk_withdraw(tsk, ua); in __tipc_bind()
700 return tipc_sk_publish(tsk, ua); in __tipc_bind()
715 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in tipc_bind() local
716 u32 atype = ua->addrtype; in tipc_bind()
719 if (!tipc_uaddr_valid(ua, alen)) in tipc_bind()
723 if (ua->sr.type < TIPC_RESERVED_TYPES) { in tipc_bind()
725 ua->sr.type); in tipc_bind()
833 * @ua: destination address struct
841 static int tipc_sendmcast(struct socket *sock, struct tipc_uaddr *ua, in tipc_sendmcast() argument
863 tipc_nametbl_lookup_mcast_nodes(net, ua, &dsts); in tipc_sendmcast()
873 msg_set_nametype(hdr, ua->sr.type); in tipc_sendmcast()
874 msg_set_namelower(hdr, ua->sr.lower); in tipc_sendmcast()
875 msg_set_nameupper(hdr, ua->sr.upper); in tipc_sendmcast()
959 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_unicast() local
967 node = ua->sk.node; in tipc_send_group_unicast()
968 port = ua->sk.ref; in tipc_send_group_unicast()
1002 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_anycast() local
1017 ua->sa.type = msg_nametype(hdr); in tipc_send_group_anycast()
1018 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_anycast()
1027 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, in tipc_send_group_anycast()
1083 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_bcast() local
1108 if (ua) { in tipc_send_group_bcast()
1110 msg_set_nameinst(hdr, ua->sa.instance); in tipc_send_group_bcast()
1157 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_mcast() local
1166 ua->sa.type = msg_nametype(hdr); in tipc_send_group_mcast()
1167 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_mcast()
1170 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, exclude, true)) in tipc_send_group_mcast()
1174 tipc_dest_pop(&dsts, &ua->sk.node, &ua->sk.ref); in tipc_send_group_mcast()
1199 struct tipc_uaddr ua; in tipc_sk_mcast_rcv() local
1204 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_mcast_rcv()
1214 ua.sr.type = msg_nametype(hdr); in tipc_sk_mcast_rcv()
1215 ua.sr.lower = msg_namelower(hdr); in tipc_sk_mcast_rcv()
1216 ua.sr.upper = msg_nameupper(hdr); in tipc_sk_mcast_rcv()
1218 ua.scope = TIPC_ANY_SCOPE; in tipc_sk_mcast_rcv()
1220 ua.scope = TIPC_CLUSTER_SCOPE; in tipc_sk_mcast_rcv()
1235 ua.sr.lower = 0; in tipc_sk_mcast_rcv()
1236 ua.sr.upper = ~0; in tipc_sk_mcast_rcv()
1237 ua.scope = msg_lookup_scope(hdr); in tipc_sk_mcast_rcv()
1241 tipc_nametbl_lookup_mcast_sockets(net, &ua, &dports); in tipc_sk_mcast_rcv()
1410 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in __tipc_sendmsg() local
1423 if (ua) { in __tipc_sendmsg()
1424 if (!tipc_uaddr_valid(ua, m->msg_namelen)) in __tipc_sendmsg()
1426 atype = ua->addrtype; in __tipc_sendmsg()
1431 if (!ua) in __tipc_sendmsg()
1442 if (!ua) { in __tipc_sendmsg()
1443 ua = (struct tipc_uaddr *)&tsk->peer; in __tipc_sendmsg()
1444 if (!syn && ua->family != AF_TIPC) in __tipc_sendmsg()
1446 atype = ua->addrtype; in __tipc_sendmsg()
1465 return tipc_sendmcast(sock, ua, m, dlen, timeout); in __tipc_sendmsg()
1467 skaddr.node = ua->lookup_node; in __tipc_sendmsg()
1468 ua->scope = tipc_node2scope(skaddr.node); in __tipc_sendmsg()
1469 if (!tipc_nametbl_lookup_anycast(net, ua, &skaddr)) in __tipc_sendmsg()
1472 skaddr = ua->sk; in __tipc_sendmsg()
1489 msg_set_nametype(hdr, ua->sa.type); in __tipc_sendmsg()
1490 msg_set_nameinst(hdr, ua->sa.instance); in __tipc_sendmsg()
1491 msg_set_lookup_scope(hdr, ua->scope); in __tipc_sendmsg()
2900 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_publish() argument
2915 p = tipc_nametbl_publish(net, ua, &skaddr, key); in tipc_sk_publish()
2925 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_withdraw() argument
2933 if (!ua) { in tipc_sk_withdraw()
2940 if (p->scope != ua->scope) in tipc_sk_withdraw()
2942 if (p->sr.type != ua->sr.type) in tipc_sk_withdraw()
2944 if (p->sr.lower != ua->sr.lower) in tipc_sk_withdraw()
2946 if (p->sr.upper != ua->sr.upper) in tipc_sk_withdraw()
2948 tipc_nametbl_withdraw(net, ua, &p->sk, p->key); in tipc_sk_withdraw()
3072 struct tipc_uaddr ua; in tipc_sk_join() local
3090 tipc_uaddr(&ua, TIPC_SERVICE_RANGE, mreq->scope, in tipc_sk_join()
3092 tipc_nametbl_build_group(net, grp, &ua); in tipc_sk_join()
3093 rc = tipc_sk_publish(tsk, &ua); in tipc_sk_join()
3110 struct tipc_uaddr ua; in tipc_sk_leave() local
3115 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_leave()
3116 tipc_group_self(grp, &ua.sr, &scope); in tipc_sk_leave()
3117 ua.scope = scope; in tipc_sk_leave()
3120 tipc_sk_withdraw(tsk, &ua); in tipc_sk_leave()