• Home
  • Raw
  • Download

Lines Matching refs:addr

34 static bool mctp_sockaddr_is_ok(const struct sockaddr_mctp *addr)  in mctp_sockaddr_is_ok()  argument
36 return !addr->__smctp_pad0 && !addr->__smctp_pad1; in mctp_sockaddr_is_ok()
39 static int mctp_bind(struct socket *sock, struct sockaddr *addr, int addrlen) in mctp_bind() argument
49 if (addr->sa_family != AF_MCTP) in mctp_bind()
56 smctp = (struct sockaddr_mctp *)addr; in mctp_bind()
82 DECLARE_SOCKADDR(struct sockaddr_mctp *, addr, msg->msg_name); in mctp_sendmsg()
90 if (addr) { in mctp_sendmsg()
93 if (addr->smctp_family != AF_MCTP) in mctp_sendmsg()
95 if (!mctp_sockaddr_is_ok(addr)) in mctp_sendmsg()
97 if (addr->smctp_tag & ~(MCTP_TAG_MASK | MCTP_TAG_OWNER)) in mctp_sendmsg()
108 if (addr->smctp_network == MCTP_NET_ANY) in mctp_sendmsg()
109 addr->smctp_network = mctp_default_net(sock_net(sk)); in mctp_sendmsg()
111 rt = mctp_route_lookup(sock_net(sk), addr->smctp_network, in mctp_sendmsg()
112 addr->smctp_addr.s_addr); in mctp_sendmsg()
124 *(u8 *)skb_put(skb, 1) = addr->smctp_type; in mctp_sendmsg()
134 cb->net = addr->smctp_network; in mctp_sendmsg()
136 rc = mctp_local_output(sk, rt, skb, addr->smctp_addr.s_addr, in mctp_sendmsg()
137 addr->smctp_tag); in mctp_sendmsg()
145 DECLARE_SOCKADDR(struct sockaddr_mctp *, addr, msg->msg_name); in mctp_recvmsg()
179 if (addr) { in mctp_recvmsg()
184 addr = msg->msg_name; in mctp_recvmsg()
185 addr->smctp_family = AF_MCTP; in mctp_recvmsg()
186 addr->__smctp_pad0 = 0; in mctp_recvmsg()
187 addr->smctp_network = cb->net; in mctp_recvmsg()
188 addr->smctp_addr.s_addr = hdr->src; in mctp_recvmsg()
189 addr->smctp_type = type; in mctp_recvmsg()
190 addr->smctp_tag = hdr->flags_seq_tag & in mctp_recvmsg()
192 addr->__smctp_pad1 = 0; in mctp_recvmsg()
193 msg->msg_namelen = sizeof(*addr); in mctp_recvmsg()