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);
678 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in __tipc_bind() local
685 if (ua->addrtype == TIPC_SERVICE_ADDR) { in __tipc_bind()
686 ua->addrtype = TIPC_SERVICE_RANGE; in __tipc_bind()
687 ua->sr.upper = ua->sr.lower; in __tipc_bind()
689 if (ua->scope < 0) { in __tipc_bind()
691 ua->scope = -ua->scope; in __tipc_bind()
694 if (ua->scope != TIPC_NODE_SCOPE) in __tipc_bind()
695 ua->scope = TIPC_CLUSTER_SCOPE; in __tipc_bind()
701 return tipc_sk_withdraw(tsk, ua); in __tipc_bind()
702 return tipc_sk_publish(tsk, ua); in __tipc_bind()
717 struct tipc_uaddr *ua = (struct tipc_uaddr *)skaddr; in tipc_bind() local
718 u32 atype = ua->addrtype; in tipc_bind()
721 if (!tipc_uaddr_valid(ua, alen)) in tipc_bind()
725 if (ua->sr.type < TIPC_RESERVED_TYPES) { in tipc_bind()
727 ua->sr.type); in tipc_bind()
843 static int tipc_sendmcast(struct socket *sock, struct tipc_uaddr *ua, in tipc_sendmcast() argument
865 tipc_nametbl_lookup_mcast_nodes(net, ua, &dsts); in tipc_sendmcast()
875 msg_set_nametype(hdr, ua->sr.type); in tipc_sendmcast()
876 msg_set_namelower(hdr, ua->sr.lower); in tipc_sendmcast()
877 msg_set_nameupper(hdr, ua->sr.upper); in tipc_sendmcast()
961 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_unicast() local
969 node = ua->sk.node; in tipc_send_group_unicast()
970 port = ua->sk.ref; in tipc_send_group_unicast()
1004 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_anycast() local
1020 ua->sa.type = msg_nametype(hdr); in tipc_send_group_anycast()
1021 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_anycast()
1030 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, in tipc_send_group_anycast()
1086 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_bcast() local
1111 if (ua) { in tipc_send_group_bcast()
1113 msg_set_nameinst(hdr, ua->sa.instance); in tipc_send_group_bcast()
1160 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in tipc_send_group_mcast() local
1170 ua->sa.type = msg_nametype(hdr); in tipc_send_group_mcast()
1171 ua->scope = msg_lookup_scope(hdr); in tipc_send_group_mcast()
1174 if (!tipc_nametbl_lookup_group(net, ua, &dsts, &dstcnt, exclude, true)) in tipc_send_group_mcast()
1178 tipc_dest_pop(&dsts, &ua->sk.node, &ua->sk.ref); in tipc_send_group_mcast()
1203 struct tipc_uaddr ua; in tipc_sk_mcast_rcv() local
1208 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_mcast_rcv()
1218 ua.sr.type = msg_nametype(hdr); in tipc_sk_mcast_rcv()
1219 ua.sr.lower = msg_namelower(hdr); in tipc_sk_mcast_rcv()
1220 ua.sr.upper = msg_nameupper(hdr); in tipc_sk_mcast_rcv()
1222 ua.scope = TIPC_ANY_SCOPE; in tipc_sk_mcast_rcv()
1224 ua.scope = TIPC_CLUSTER_SCOPE; in tipc_sk_mcast_rcv()
1239 ua.sr.lower = 0; in tipc_sk_mcast_rcv()
1240 ua.sr.upper = ~0; in tipc_sk_mcast_rcv()
1241 ua.scope = msg_lookup_scope(hdr); in tipc_sk_mcast_rcv()
1245 tipc_nametbl_lookup_mcast_sockets(net, &ua, &dports); in tipc_sk_mcast_rcv()
1414 struct tipc_uaddr *ua = (struct tipc_uaddr *)m->msg_name; in __tipc_sendmsg() local
1427 if (ua) { in __tipc_sendmsg()
1428 if (!tipc_uaddr_valid(ua, m->msg_namelen)) in __tipc_sendmsg()
1430 atype = ua->addrtype; in __tipc_sendmsg()
1435 if (!ua) in __tipc_sendmsg()
1446 if (!ua) { in __tipc_sendmsg()
1447 ua = (struct tipc_uaddr *)&tsk->peer; in __tipc_sendmsg()
1448 if (!syn && ua->family != AF_TIPC) in __tipc_sendmsg()
1450 atype = ua->addrtype; in __tipc_sendmsg()
1469 return tipc_sendmcast(sock, ua, m, dlen, timeout); in __tipc_sendmsg()
1471 skaddr.node = ua->lookup_node; in __tipc_sendmsg()
1472 ua->scope = tipc_node2scope(skaddr.node); in __tipc_sendmsg()
1473 if (!tipc_nametbl_lookup_anycast(net, ua, &skaddr)) in __tipc_sendmsg()
1476 skaddr = ua->sk; in __tipc_sendmsg()
1493 msg_set_nametype(hdr, ua->sa.type); in __tipc_sendmsg()
1494 msg_set_nameinst(hdr, ua->sa.instance); in __tipc_sendmsg()
1495 msg_set_lookup_scope(hdr, ua->scope); in __tipc_sendmsg()
2901 static int tipc_sk_publish(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_publish() argument
2916 p = tipc_nametbl_publish(net, ua, &skaddr, key); in tipc_sk_publish()
2926 static int tipc_sk_withdraw(struct tipc_sock *tsk, struct tipc_uaddr *ua) in tipc_sk_withdraw() argument
2934 if (!ua) { in tipc_sk_withdraw()
2941 if (p->scope != ua->scope) in tipc_sk_withdraw()
2943 if (p->sr.type != ua->sr.type) in tipc_sk_withdraw()
2945 if (p->sr.lower != ua->sr.lower) in tipc_sk_withdraw()
2947 if (p->sr.upper != ua->sr.upper) in tipc_sk_withdraw()
2949 tipc_nametbl_withdraw(net, ua, &p->sk, p->key); in tipc_sk_withdraw()
3073 struct tipc_uaddr ua; in tipc_sk_join() local
3091 tipc_uaddr(&ua, TIPC_SERVICE_RANGE, mreq->scope, in tipc_sk_join()
3093 tipc_nametbl_build_group(net, grp, &ua); in tipc_sk_join()
3094 rc = tipc_sk_publish(tsk, &ua); in tipc_sk_join()
3111 struct tipc_uaddr ua; in tipc_sk_leave() local
3116 ua.addrtype = TIPC_SERVICE_RANGE; in tipc_sk_leave()
3117 tipc_group_self(grp, &ua.sr, &scope); in tipc_sk_leave()
3118 ua.scope = scope; in tipc_sk_leave()
3121 tipc_sk_withdraw(tsk, &ua); in tipc_sk_leave()