Home
last modified time | relevance | path

Searched refs:msg (Results 1 – 25 of 168) sorted by relevance

1234567

/net/nfc/
Dnetlink.c67 static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target, in nfc_genl_send_target() argument
72 hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in nfc_genl_send_target()
79 if (nla_put_u32(msg, NFC_ATTR_TARGET_INDEX, target->idx) || in nfc_genl_send_target()
80 nla_put_u32(msg, NFC_ATTR_PROTOCOLS, target->supported_protocols) || in nfc_genl_send_target()
81 nla_put_u16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res) || in nfc_genl_send_target()
82 nla_put_u8(msg, NFC_ATTR_TARGET_SEL_RES, target->sel_res)) in nfc_genl_send_target()
85 nla_put(msg, NFC_ATTR_TARGET_NFCID1, target->nfcid1_len, in nfc_genl_send_target()
89 nla_put(msg, NFC_ATTR_TARGET_SENSB_RES, target->sensb_res_len, in nfc_genl_send_target()
93 nla_put(msg, NFC_ATTR_TARGET_SENSF_RES, target->sensf_res_len, in nfc_genl_send_target()
98 if (nla_put_u8(msg, NFC_ATTR_TARGET_ISO15693_DSFID, in nfc_genl_send_target()
[all …]
/net/sctp/
Dchunk.c50 static void sctp_datamsg_init(struct sctp_datamsg *msg) in sctp_datamsg_init() argument
52 atomic_set(&msg->refcnt, 1); in sctp_datamsg_init()
53 msg->send_failed = 0; in sctp_datamsg_init()
54 msg->send_error = 0; in sctp_datamsg_init()
55 msg->can_abandon = 0; in sctp_datamsg_init()
56 msg->can_delay = 1; in sctp_datamsg_init()
57 msg->expires_at = 0; in sctp_datamsg_init()
58 INIT_LIST_HEAD(&msg->chunks); in sctp_datamsg_init()
64 struct sctp_datamsg *msg; in sctp_datamsg_new() local
65 msg = kmalloc(sizeof(struct sctp_datamsg), gfp); in sctp_datamsg_new()
[all …]
/net/ieee802154/
Dnl-mac.c42 static int nla_put_hwaddr(struct sk_buff *msg, int type, __le64 hwaddr) in nla_put_hwaddr() argument
44 return nla_put_u64(msg, type, swab64((__force u64)hwaddr)); in nla_put_hwaddr()
52 static int nla_put_shortaddr(struct sk_buff *msg, int type, __le16 addr) in nla_put_shortaddr() argument
54 return nla_put_u16(msg, type, le16_to_cpu(addr)); in nla_put_shortaddr()
66 struct sk_buff *msg; in ieee802154_nl_assoc_indic() local
75 msg = ieee802154_nl_create(0, IEEE802154_ASSOCIATE_INDIC); in ieee802154_nl_assoc_indic()
76 if (!msg) in ieee802154_nl_assoc_indic()
79 if (nla_put_string(msg, IEEE802154_ATTR_DEV_NAME, dev->name) || in ieee802154_nl_assoc_indic()
80 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_assoc_indic()
81 nla_put(msg, IEEE802154_ATTR_HW_ADDR, IEEE802154_ADDR_LEN, in ieee802154_nl_assoc_indic()
[all …]
Dnetlink.c47 struct sk_buff *msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); in ieee802154_nl_create() local
50 if (!msg) in ieee802154_nl_create()
54 hdr = genlmsg_put(msg, 0, ieee802154_seq_num++, in ieee802154_nl_create()
58 nlmsg_free(msg); in ieee802154_nl_create()
62 return msg; in ieee802154_nl_create()
65 int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group) in ieee802154_nl_mcast() argument
67 struct nlmsghdr *nlh = nlmsg_hdr(msg); in ieee802154_nl_mcast()
70 if (genlmsg_end(msg, hdr) < 0) in ieee802154_nl_mcast()
73 return genlmsg_multicast(&nl802154_family, msg, 0, group, GFP_ATOMIC); in ieee802154_nl_mcast()
75 nlmsg_free(msg); in ieee802154_nl_mcast()
[all …]
Dnl-phy.c38 static int ieee802154_nl_fill_phy(struct sk_buff *msg, u32 portid, in ieee802154_nl_fill_phy() argument
50 hdr = genlmsg_put(msg, 0, seq, &nl802154_family, flags, in ieee802154_nl_fill_phy()
56 if (nla_put_string(msg, IEEE802154_ATTR_PHY_NAME, wpan_phy_name(phy)) || in ieee802154_nl_fill_phy()
57 nla_put_u8(msg, IEEE802154_ATTR_PAGE, phy->current_page) || in ieee802154_nl_fill_phy()
58 nla_put_u8(msg, IEEE802154_ATTR_CHANNEL, phy->current_channel)) in ieee802154_nl_fill_phy()
65 nla_put(msg, IEEE802154_ATTR_CHANNEL_PAGE_LIST, in ieee802154_nl_fill_phy()
70 return genlmsg_end(msg, hdr); in ieee802154_nl_fill_phy()
74 genlmsg_cancel(msg, hdr); in ieee802154_nl_fill_phy()
85 struct sk_buff *msg; in ieee802154_list_phy() local
104 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); in ieee802154_list_phy()
[all …]
/net/tipc/
Dmsg.c69 struct tipc_msg *msg; in tipc_msg_create() local
76 msg = buf_msg(buf); in tipc_msg_create()
77 tipc_msg_init(msg, user, type, hdr_sz, dnode); in tipc_msg_create()
78 msg_set_size(msg, hdr_sz + data_sz); in tipc_msg_create()
79 msg_set_prevnode(msg, onode); in tipc_msg_create()
80 msg_set_origport(msg, oport); in tipc_msg_create()
81 msg_set_destport(msg, dport); in tipc_msg_create()
82 msg_set_errcode(msg, errcode); in tipc_msg_create()
84 msg_set_orignode(msg, onode); in tipc_msg_create()
85 msg_set_destnode(msg, dnode); in tipc_msg_create()
[all …]
Dlink.c167 struct tipc_msg *msg = buf_msg(l_ptr->first_out); in link_timeout() local
168 u32 length = msg_size(msg); in link_timeout()
170 if ((msg_user(msg) == MSG_FRAGMENTER) && in link_timeout()
171 (msg_type(msg) == FIRST_FRAGMENT)) { in link_timeout()
172 length = msg_size(msg_get_wrapped(msg)); in link_timeout()
222 struct tipc_msg *msg; in tipc_link_create() local
263 msg = l_ptr->pmsg; in tipc_link_create()
264 tipc_msg_init(msg, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, l_ptr->addr); in tipc_link_create()
265 msg_set_size(msg, sizeof(l_ptr->proto_msg)); in tipc_link_create()
266 msg_set_session(msg, (tipc_random & 0xffff)); in tipc_link_create()
[all …]
Deth_media.c54 static int tipc_eth_addr2msg(char *msg, struct tipc_media_addr *addr) in tipc_eth_addr2msg() argument
56 memset(msg, 0, TIPC_MEDIA_ADDR_SIZE); in tipc_eth_addr2msg()
57 msg[TIPC_MEDIA_TYPE_OFFSET] = TIPC_MEDIA_TYPE_ETH; in tipc_eth_addr2msg()
58 memcpy(msg + ETH_ADDR_OFFSET, addr->value, ETH_ALEN); in tipc_eth_addr2msg()
65 char *msg) in tipc_eth_raw2addr() argument
70 ether_addr_copy(addr->value, msg); in tipc_eth_raw2addr()
79 char *msg) in tipc_eth_msg2addr() argument
82 msg += ETH_ADDR_OFFSET; in tipc_eth_msg2addr()
83 return tipc_eth_raw2addr(b, addr, msg); in tipc_eth_msg2addr()
Dsocket.c253 static bool tsk_peer_msg(struct tipc_sock *tsk, struct tipc_msg *msg) in tsk_peer_msg() argument
262 if (unlikely(msg_origport(msg) != peer_port)) in tsk_peer_msg()
265 orig_node = msg_orignode(msg); in tsk_peer_msg()
299 struct tipc_msg *msg; in tipc_sk_create() local
342 msg = &tsk->phdr; in tipc_sk_create()
343 tipc_msg_init(msg, TIPC_LOW_IMPORTANCE, TIPC_NAMED_MSG, in tipc_sk_create()
345 msg_set_origport(msg, ref); in tipc_sk_create()
748 struct tipc_msg *msg = buf_msg(buf); in tipc_sk_mcast_rcv() local
755 if (in_own_node(msg_orignode(msg))) in tipc_sk_mcast_rcv()
759 tipc_nametbl_mc_translate(msg_nametype(msg), in tipc_sk_mcast_rcv()
[all …]
Dib_media.c58 static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr) in tipc_ib_addr2msg() argument
60 memset(msg, 0, TIPC_MEDIA_ADDR_SIZE); in tipc_ib_addr2msg()
61 memcpy(msg, addr->value, INFINIBAND_ALEN); in tipc_ib_addr2msg()
68 char *msg) in tipc_ib_raw2addr() argument
71 memcpy(addr->value, msg, INFINIBAND_ALEN); in tipc_ib_raw2addr()
73 addr->broadcast = !memcmp(msg, b->bcast_addr.value, in tipc_ib_raw2addr()
81 char *msg) in tipc_ib_msg2addr() argument
83 return tipc_ib_raw2addr(b, addr, msg); in tipc_ib_msg2addr()
Dbcast.c358 struct tipc_msg *msg = buf_msg(buf); in tipc_bclink_update_link_state() local
360 tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, in tipc_bclink_update_link_state()
362 msg_set_non_seq(msg, 1); in tipc_bclink_update_link_state()
363 msg_set_mc_netid(msg, tipc_net_id); in tipc_bclink_update_link_state()
364 msg_set_bcast_ack(msg, n_ptr->bclink.last_in); in tipc_bclink_update_link_state()
365 msg_set_bcgap_after(msg, n_ptr->bclink.last_in); in tipc_bclink_update_link_state()
366 msg_set_bcgap_to(msg, n_ptr->bclink.deferred_head in tipc_bclink_update_link_state()
386 static void bclink_peek_nack(struct tipc_msg *msg) in bclink_peek_nack() argument
388 struct tipc_node *n_ptr = tipc_node_find(msg_destnode(msg)); in bclink_peek_nack()
397 (n_ptr->bclink.last_in == msg_bcgap_after(msg))) in bclink_peek_nack()
[all …]
Ddiscover.c77 struct tipc_msg *msg; in tipc_disc_init_msg() local
80 msg = buf_msg(buf); in tipc_disc_init_msg()
81 tipc_msg_init(msg, LINK_CONFIG, type, INT_H_SIZE, dest_domain); in tipc_disc_init_msg()
82 msg_set_non_seq(msg, 1); in tipc_disc_init_msg()
83 msg_set_node_sig(msg, tipc_random); in tipc_disc_init_msg()
84 msg_set_dest_domain(msg, dest_domain); in tipc_disc_init_msg()
85 msg_set_bc_netid(msg, tipc_net_id); in tipc_disc_init_msg()
86 b_ptr->media->addr2msg(msg_media_addr(msg), &b_ptr->addr); in tipc_disc_init_msg()
119 struct tipc_msg *msg = buf_msg(buf); in tipc_disc_rcv() local
120 u32 ddom = msg_dest_domain(msg); in tipc_disc_rcv()
[all …]
/net/atm/
Dsignaling.c57 static void modify_qos(struct atm_vcc *vcc, struct atmsvc_msg *msg) in modify_qos() argument
64 msg->type = as_error; in modify_qos()
66 msg->reply = -EOPNOTSUPP; in modify_qos()
69 msg->reply = vcc->dev->ops->change_qos(vcc, &msg->qos, in modify_qos()
70 msg->reply); in modify_qos()
71 if (!msg->reply) in modify_qos()
72 msg->type = as_okay; in modify_qos()
80 *(struct atmsvc_msg *)skb_put(skb, sizeof(struct atmsvc_msg)) = *msg; in modify_qos()
86 struct atmsvc_msg *msg; in sigd_send() local
90 msg = (struct atmsvc_msg *) skb->data; in sigd_send()
[all …]
Dmpoa_caches.c135 struct k_message msg; in cache_hit() local
143 msg.type = SND_MPOA_RES_RQST; in cache_hit()
144 msg.content.in_info = entry->ctrl_info; in cache_hit()
145 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
148 msg.qos = qos->qos; in cache_hit()
149 msg_to_mpoad(&msg, mpc); in cache_hit()
166 msg.type = SND_MPOA_RES_RQST; in cache_hit()
167 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
168 msg.content.in_info = entry->ctrl_info; in cache_hit()
171 msg.qos = qos->qos; in cache_hit()
[all …]
/net/wireless/
Dnl80211.c575 static int nl80211_msg_put_channel(struct sk_buff *msg, in nl80211_msg_put_channel() argument
586 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_FREQ, in nl80211_msg_put_channel()
591 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_DISABLED)) in nl80211_msg_put_channel()
594 if (nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_IR)) in nl80211_msg_put_channel()
596 if (nla_put_flag(msg, __NL80211_FREQUENCY_ATTR_NO_IBSS)) in nl80211_msg_put_channel()
600 if (nla_put_flag(msg, NL80211_FREQUENCY_ATTR_RADAR)) in nl80211_msg_put_channel()
607 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_STATE, in nl80211_msg_put_channel()
610 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_TIME, in nl80211_msg_put_channel()
613 if (nla_put_u32(msg, in nl80211_msg_put_channel()
622 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS)) in nl80211_msg_put_channel()
[all …]
/net/ceph/
Dmsgpool.c13 struct ceph_msg *msg; in msgpool_alloc() local
15 msg = ceph_msg_new(pool->type, pool->front_len, gfp_mask, true); in msgpool_alloc()
16 if (!msg) { in msgpool_alloc()
19 dout("msgpool_alloc %s %p\n", pool->name, msg); in msgpool_alloc()
20 msg->pool = pool; in msgpool_alloc()
22 return msg; in msgpool_alloc()
28 struct ceph_msg *msg = element; in msgpool_free() local
30 dout("msgpool_release %s %p\n", pool->name, msg); in msgpool_free()
31 msg->pool = NULL; in msgpool_free()
32 ceph_msg_put(msg); in msgpool_free()
[all …]
Dmessenger.c520 struct msghdr msg = { .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL }; in ceph_tcp_recvmsg() local
523 r = kernel_recvmsg(sock, &msg, &iov, 1, len, msg.msg_flags); in ceph_tcp_recvmsg()
552 struct msghdr msg = { .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL }; in ceph_tcp_sendmsg() local
556 msg.msg_flags |= MSG_MORE; in ceph_tcp_sendmsg()
558 msg.msg_flags |= MSG_EOR; /* superfluous, but what the hell */ in ceph_tcp_sendmsg()
560 r = kernel_sendmsg(sock, &msg, iov, kvlen, len); in ceph_tcp_sendmsg()
628 static void ceph_msg_remove(struct ceph_msg *msg) in ceph_msg_remove() argument
630 list_del_init(&msg->list_head); in ceph_msg_remove()
631 BUG_ON(msg->con == NULL); in ceph_msg_remove()
632 msg->con->ops->put(msg->con); in ceph_msg_remove()
[all …]
Dmon_client.c193 struct ceph_msg *msg = monc->m_subscribe; in __send_subscribe() local
198 p = msg->front.iov_base; in __send_subscribe()
199 end = p + msg->front_alloc_len; in __send_subscribe()
229 msg->front.iov_len = p - msg->front.iov_base; in __send_subscribe()
230 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len); in __send_subscribe()
231 ceph_msg_revoke(msg); in __send_subscribe()
232 ceph_con_send(&monc->con, ceph_msg_get(msg)); in __send_subscribe()
239 struct ceph_msg *msg) in handle_subscribe_ack() argument
242 struct ceph_mon_subscribe_ack *h = msg->front.iov_base; in handle_subscribe_ack()
244 if (msg->front.iov_len < sizeof(*h)) in handle_subscribe_ack()
[all …]
/net/core/
Dscm.c127 int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) in __scm_send() argument
132 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) in __scm_send()
144 if (!CMSG_OK(msg, cmsg)) in __scm_send()
210 int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data) in put_cmsg() argument
213 = (__force struct cmsghdr __user *)msg->msg_control; in put_cmsg()
218 if (MSG_CMSG_COMPAT & msg->msg_flags) in put_cmsg()
219 return put_cmsg_compat(msg, level, type, len, data); in put_cmsg()
221 if (cm==NULL || msg->msg_controllen < sizeof(*cm)) { in put_cmsg()
222 msg->msg_flags |= MSG_CTRUNC; in put_cmsg()
225 if (msg->msg_controllen < cmlen) { in put_cmsg()
[all …]
/net/decnet/
Ddn_nsp_out.c482 struct nsp_conn_ack_msg *msg; in dn_send_conn_ack() local
487 msg = (struct nsp_conn_ack_msg *)skb_put(skb, 3); in dn_send_conn_ack()
488 msg->msgflg = 0x24; in dn_send_conn_ack()
489 msg->dstaddr = scp->addrrem; in dn_send_conn_ack()
519 struct nsp_conn_init_msg *msg; in dn_send_conn_conf() local
525 msg = (struct nsp_conn_init_msg *)skb_put(skb, sizeof(*msg)); in dn_send_conn_conf()
526 msg->msgflg = 0x28; in dn_send_conn_conf()
527 msg->dstaddr = scp->addrrem; in dn_send_conn_conf()
528 msg->srcaddr = scp->addrloc; in dn_send_conn_conf()
529 msg->services = scp->services_loc; in dn_send_conn_conf()
[all …]
/net/rxrpc/
Dar-output.c29 struct msghdr *msg, size_t len);
34 static int rxrpc_sendmsg_cmsg(struct rxrpc_sock *rx, struct msghdr *msg, in rxrpc_sendmsg_cmsg() argument
45 if (msg->msg_controllen == 0) in rxrpc_sendmsg_cmsg()
48 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in rxrpc_sendmsg_cmsg()
49 if (!CMSG_OK(msg, cmsg)) in rxrpc_sendmsg_cmsg()
61 if (msg->msg_flags & MSG_CMSG_COMPAT) { in rxrpc_sendmsg_cmsg()
133 struct rxrpc_transport *trans, struct msghdr *msg, in rxrpc_client_sendmsg() argument
149 ret = rxrpc_sendmsg_cmsg(rx, msg, &user_call_ID, &cmd, &abort_code, in rxrpc_client_sendmsg()
157 if (msg->msg_name) { in rxrpc_client_sendmsg()
159 msg->msg_name); in rxrpc_client_sendmsg()
[all …]
Dar-recvmsg.c47 struct msghdr *msg, size_t len, int flags) in rxrpc_recvmsg() argument
64 ullen = msg->msg_flags & MSG_CMSG_COMPAT ? 4 : sizeof(unsigned long); in rxrpc_recvmsg()
67 msg->msg_flags |= MSG_MORE; in rxrpc_recvmsg()
146 if (msg->msg_name) { in rxrpc_recvmsg()
149 memcpy(msg->msg_name, in rxrpc_recvmsg()
151 msg->msg_namelen = len; in rxrpc_recvmsg()
153 sock_recv_ts_and_drops(msg, &rx->sk, skb); in rxrpc_recvmsg()
165 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_USER_CALL_ID, in rxrpc_recvmsg()
183 ret = skb_copy_datagram_iovec(skb, offset, msg->msg_iov, copy); in rxrpc_recvmsg()
220 msg->msg_flags &= ~MSG_MORE; in rxrpc_recvmsg()
[all …]
/net/ipv6/
Ddatagram.c348 int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) in ipv6_recv_error() argument
353 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin, msg->msg_name); in ipv6_recv_error()
368 msg->msg_flags |= MSG_TRUNC; in ipv6_recv_error()
371 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); in ipv6_recv_error()
375 sock_recv_timestamp(msg, sk, skb); in ipv6_recv_error()
408 ip6_datagram_recv_common_ctl(sk, msg, skb); in ipv6_recv_error()
412 ip6_datagram_recv_specific_ctl(sk, msg, skb); in ipv6_recv_error()
420 ip_cmsg_recv(msg, skb); in ipv6_recv_error()
424 put_cmsg(msg, SOL_IPV6, IPV6_RECVERR, sizeof(errhdr), &errhdr); in ipv6_recv_error()
428 msg->msg_flags |= MSG_ERRQUEUE; in ipv6_recv_error()
[all …]
/net/irda/
Dirnetlink.c83 struct sk_buff *msg; in irda_nl_get_mode() local
91 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); in irda_nl_get_mode()
92 if (!msg) { in irda_nl_get_mode()
103 hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, in irda_nl_get_mode()
110 if(nla_put_string(msg, IRDA_NL_ATTR_IFNAME, in irda_nl_get_mode()
114 if(nla_put_u32(msg, IRDA_NL_ATTR_MODE, irlap->mode)) in irda_nl_get_mode()
117 genlmsg_end(msg, hdr); in irda_nl_get_mode()
119 return genlmsg_reply(msg, info); in irda_nl_get_mode()
122 nlmsg_free(msg); in irda_nl_get_mode()
/net/netfilter/
Dnf_conntrack_pptp.c275 u_int16_t msg; in pptp_inbound_pkt() local
279 msg = ntohs(ctlh->messageType); in pptp_inbound_pkt()
280 pr_debug("inbound control message %s\n", pptp_msg_name[msg]); in pptp_inbound_pkt()
282 switch (msg) { in pptp_inbound_pkt()
315 pr_debug("%s, CID=%X, PCID=%X\n", pptp_msg_name[msg], in pptp_inbound_pkt()
332 pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid)); in pptp_inbound_pkt()
351 pr_debug("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(pcid)); in pptp_inbound_pkt()
361 pr_debug("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid)); in pptp_inbound_pkt()
388 msg <= PPTP_MSG_MAX ? pptp_msg_name[msg] : pptp_msg_name[0], in pptp_inbound_pkt()
389 msg, ntohs(cid), ntohs(pcid), info->cstate, info->sstate, in pptp_inbound_pkt()
[all …]

1234567