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