Lines Matching full:ua

153 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua);
154 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua);
679 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in __tipc_bind() local
686 if (ua->addrtype == TIPC_SERVICE_ADDR) { in __tipc_bind()
687 ua->addrtype = TIPC_SERVICE_RANGE; in __tipc_bind()
688 ua->sr.upper = ua->sr.lower; in __tipc_bind()
690 if (ua->scope < 0) { in __tipc_bind()
692 ua->scope = -ua->scope; in __tipc_bind()
695 if (ua->scope != TIPC_NODE_SCOPE) in __tipc_bind()
696 ua->scope = TIPC_CLUSTER_SCOPE; in __tipc_bind()
702 return tipc_sk_withdraw(tsk, ua); in __tipc_bind()
703 return tipc_sk_publish(tsk, ua); in __tipc_bind()
718 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in tipc_bind() local
719 u32 atype = ua->addrtype; in tipc_bind()
722 if (!tipc_uaddr_valid(ua, alen)) in tipc_bind()
726 if (ua->sr.type < TIPC_RESERVED_TYPES) { in tipc_bind()
728 ua->sr.type); in tipc_bind()
836 * @ua: destination address struct
844 static int tipc_sendmcast(struct socket *sock, struct tipc_uaddr *ua, in tipc_sendmcast() argument
866 tipc_nametbl_lookup_mcast_nodes(net, ua, &dsts); in tipc_sendmcast()
876 msg_set_nametype(hdr, ua->sr.type); in tipc_sendmcast()
877 msg_set_namelower(hdr, ua->sr.lower); in tipc_sendmcast()
878 msg_set_nameupper(hdr, ua->sr.upper); in tipc_sendmcast()
962 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_unicast() local
970 node = ua->sk.node; in tipc_send_group_unicast()
971 port = ua->sk.ref; in tipc_send_group_unicast()
1005 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_anycast() local
1021 ua->sa.type = msg_nametype(hdr); in tipc_send_group_anycast()
1022 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_anycast()
1031 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, in tipc_send_group_anycast()
1087 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_bcast() local
1112 if (ua) { in tipc_send_group_bcast()
1114 msg_set_nameinst(hdr, ua->sa.instance); in tipc_send_group_bcast()
1161 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_mcast() local
1171 ua->sa.type = msg_nametype(hdr); in tipc_send_group_mcast()
1172 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_mcast()
1175 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, exclude, true)) in tipc_send_group_mcast()
1179 tipc_dest_pop(&dsts, &ua->sk.node, &ua->sk.ref); in tipc_send_group_mcast()
1204 struct tipc_uaddr ua; in tipc_sk_mcast_rcv() local
1209 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_mcast_rcv()
1219 ua.sr.type = msg_nametype(hdr); in tipc_sk_mcast_rcv()
1220 ua.sr.lower = msg_namelower(hdr); in tipc_sk_mcast_rcv()
1221 ua.sr.upper = msg_nameupper(hdr); in tipc_sk_mcast_rcv()
1223 ua.scope = TIPC_ANY_SCOPE; in tipc_sk_mcast_rcv()
1225 ua.scope = TIPC_CLUSTER_SCOPE; in tipc_sk_mcast_rcv()
1240 ua.sr.lower = 0; in tipc_sk_mcast_rcv()
1241 ua.sr.upper = ~0; in tipc_sk_mcast_rcv()
1242 ua.scope = msg_lookup_scope(hdr); in tipc_sk_mcast_rcv()
1246 tipc_nametbl_lookup_mcast_sockets(net, &ua, &dports); in tipc_sk_mcast_rcv()
1415 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in __tipc_sendmsg() local
1428 if (ua) { in __tipc_sendmsg()
1429 if (!tipc_uaddr_valid(ua, m->msg_namelen)) in __tipc_sendmsg()
1431 atype = ua->addrtype; in __tipc_sendmsg()
1436 if (!ua) in __tipc_sendmsg()
1447 if (!ua) { in __tipc_sendmsg()
1448 ua = (struct tipc_uaddr *)&tsk->peer; in __tipc_sendmsg()
1449 if (!syn && ua->family != AF_TIPC) in __tipc_sendmsg()
1451 atype = ua->addrtype; in __tipc_sendmsg()
1470 return tipc_sendmcast(sock, ua, m, dlen, timeout); in __tipc_sendmsg()
1472 skaddr.node = ua->lookup_node; in __tipc_sendmsg()
1473 ua->scope = tipc_node2scope(skaddr.node); in __tipc_sendmsg()
1474 if (!tipc_nametbl_lookup_anycast(net, ua, &skaddr)) in __tipc_sendmsg()
1477 skaddr = ua->sk; in __tipc_sendmsg()
1494 msg_set_nametype(hdr, ua->sa.type); in __tipc_sendmsg()
1495 msg_set_nameinst(hdr, ua->sa.instance); in __tipc_sendmsg()
1496 msg_set_lookup_scope(hdr, ua->scope); in __tipc_sendmsg()
2906 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_publish() argument
2921 p = tipc_nametbl_publish(net, ua, &skaddr, key); in tipc_sk_publish()
2931 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_withdraw() argument
2939 if (!ua) { in tipc_sk_withdraw()
2946 if (p->scope != ua->scope) in tipc_sk_withdraw()
2948 if (p->sr.type != ua->sr.type) in tipc_sk_withdraw()
2950 if (p->sr.lower != ua->sr.lower) in tipc_sk_withdraw()
2952 if (p->sr.upper != ua->sr.upper) in tipc_sk_withdraw()
2954 tipc_nametbl_withdraw(net, ua, &p->sk, p->key); in tipc_sk_withdraw()
3078 struct tipc_uaddr ua; in tipc_sk_join() local
3096 tipc_uaddr(&ua, TIPC_SERVICE_RANGE, mreq->scope, in tipc_sk_join()
3098 tipc_nametbl_build_group(net, grp, &ua); in tipc_sk_join()
3099 rc = tipc_sk_publish(tsk, &ua); in tipc_sk_join()
3116 struct tipc_uaddr ua; in tipc_sk_leave() local
3121 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_leave()
3122 tipc_group_self(grp, &ua.sr, &scope); in tipc_sk_leave()
3123 ua.scope = scope; in tipc_sk_leave()
3126 tipc_sk_withdraw(tsk, &ua); in tipc_sk_leave()