/linux-2.6.39/drivers/isdn/capi/ |
D | capiutil.c | 416 #define TYP (cdef[cmsg->par[cmsg->p]].typ) 417 #define OFF (((u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off) 419 static void jumpcstruct(_cmsg * cmsg) in jumpcstruct() argument 422 for (cmsg->p++, layer = 1; layer;) { in jumpcstruct() 424 cmsg->p++; in jumpcstruct() 436 static void pars_2_message(_cmsg * cmsg) in pars_2_message() argument 439 for (; TYP != _CEND; cmsg->p++) { in pars_2_message() 442 byteTLcpy(cmsg->m + cmsg->l, OFF); in pars_2_message() 443 cmsg->l++; in pars_2_message() 446 wordTLcpy(cmsg->m + cmsg->l, OFF); in pars_2_message() [all …]
|
D | capidrv.c | 505 static void send_message(capidrv_contr * card, _cmsg * cmsg) in send_message() argument 510 capi_cmsg2message(cmsg, cmsg->buf); in send_message() 511 len = CAPIMSG_LEN(cmsg->buf); in send_message() 517 memcpy(skb_put(skb, len), cmsg->buf, len); in send_message() 659 static _cmsg cmsg; variable 665 capi_fill_DISCONNECT_REQ(&cmsg, in n0() 675 send_message(card, &cmsg); in n0() 768 static void handle_controller(_cmsg * cmsg) in handle_controller() argument 770 capidrv_contr *card = findcontrbynumber(cmsg->adr.adrController & 0x7f); in handle_controller() 774 capi_cmd2str(cmsg->Command, cmsg->Subcommand), in handle_controller() [all …]
|
/linux-2.6.39/include/linux/isdn/ |
D | capiutil.h | 150 unsigned capi_cmsg2message(_cmsg * cmsg, __u8 * msg); 156 unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg); 163 unsigned capi_cmsg_header(_cmsg * cmsg, __u16 _ApplId, 194 _cdebbuf *capi_cmsg2str(_cmsg *cmsg); 199 static inline void capi_cmsg_answer(_cmsg * cmsg) in capi_cmsg_answer() argument 201 cmsg->Subcommand |= 0x01; in capi_cmsg_answer() 206 static inline void capi_fill_CONNECT_B3_REQ(_cmsg * cmsg, __u16 ApplId, __u16 Messagenumber, in capi_fill_CONNECT_B3_REQ() argument 210 capi_cmsg_header(cmsg, ApplId, 0x82, 0x80, Messagenumber, adr); in capi_fill_CONNECT_B3_REQ() 211 cmsg->NCPI = NCPI; in capi_fill_CONNECT_B3_REQ() 214 static inline void capi_fill_FACILITY_REQ(_cmsg * cmsg, __u16 ApplId, __u16 Messagenumber, in capi_fill_FACILITY_REQ() argument [all …]
|
/linux-2.6.39/drivers/isdn/gigaset/ |
D | capi.c | 1123 _cmsg *cmsg = &iif->acmsg; in do_facility_req() local 1131 capi_message2cmsg(cmsg, skb->data); in do_facility_req() 1132 dump_cmsg(DEBUG_CMD, __func__, cmsg); in do_facility_req() 1138 switch (cmsg->FacilitySelector) { in do_facility_req() 1155 pparam = cmsg->FacilityRequestParameter; in do_facility_req() 1227 capi_cmsg_answer(cmsg); in do_facility_req() 1228 cmsg->Info = info; in do_facility_req() 1229 cmsg->FacilityConfirmationParameter = confparam; in do_facility_req() 1236 capi_cmsg2message(cmsg, __skb_put(cskb, msgsize)); in do_facility_req() 1237 dump_cmsg(DEBUG_CMD, __func__, cmsg); in do_facility_req() [all …]
|
/linux-2.6.39/Documentation/networking/timestamping/ |
D | timestamping.c | 160 struct cmsghdr *cmsg; in printpacket() local 173 for (cmsg = CMSG_FIRSTHDR(msg); in printpacket() 174 cmsg; in printpacket() 175 cmsg = CMSG_NXTHDR(msg, cmsg)) { in printpacket() 176 printf(" cmsg len %zu: ", cmsg->cmsg_len); in printpacket() 177 switch (cmsg->cmsg_level) { in printpacket() 180 switch (cmsg->cmsg_type) { in printpacket() 183 (struct timeval *)CMSG_DATA(cmsg); in printpacket() 191 (struct timespec *)CMSG_DATA(cmsg); in printpacket() 199 (struct timespec *)CMSG_DATA(cmsg); in printpacket() [all …]
|
/linux-2.6.39/net/ipv6/ |
D | datagram.c | 601 struct cmsghdr *cmsg; in datagram_send_ctl() local 607 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in datagram_send_ctl() 610 if (!CMSG_OK(msg, cmsg)) { in datagram_send_ctl() 615 if (cmsg->cmsg_level != SOL_IPV6) in datagram_send_ctl() 618 switch (cmsg->cmsg_type) { in datagram_send_ctl() 624 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) { in datagram_send_ctl() 629 src_info = (struct in6_pktinfo *)CMSG_DATA(cmsg); in datagram_send_ctl() 670 if (cmsg->cmsg_len < CMSG_LEN(4)) { in datagram_send_ctl() 676 if ((fl6->flowlabel^*(__be32 *)CMSG_DATA(cmsg))&~IPV6_FLOWINFO_MASK) { in datagram_send_ctl() 681 fl6->flowlabel = IPV6_FLOWINFO_MASK & *(__be32 *)CMSG_DATA(cmsg); in datagram_send_ctl() [all …]
|
/linux-2.6.39/net/core/ |
D | scm.c | 60 static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) in scm_fp_copy() argument 62 int *fdp = (int*)CMSG_DATA(cmsg); in scm_fp_copy() 67 num = (cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)))/sizeof(int); in scm_fp_copy() 138 struct cmsghdr *cmsg; in __scm_send() local 141 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) in __scm_send() 153 if (!CMSG_OK(msg, cmsg)) in __scm_send() 156 if (cmsg->cmsg_level != SOL_SOCKET) in __scm_send() 159 switch (cmsg->cmsg_type) in __scm_send() 164 err=scm_fp_copy(cmsg, &p->fp); in __scm_send() 169 if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct ucred))) in __scm_send() [all …]
|
/linux-2.6.39/include/linux/ |
D | socket.h | 95 #define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) argument 96 #define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg)) argument 100 #define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) argument 108 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \ argument 109 (cmsg)->cmsg_len <= (unsigned long) \ 111 ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
|
/linux-2.6.39/crypto/ |
D | af_alg.c | 398 struct cmsghdr *cmsg; in af_alg_cmsg_send() local 400 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in af_alg_cmsg_send() 401 if (!CMSG_OK(msg, cmsg)) in af_alg_cmsg_send() 403 if (cmsg->cmsg_level != SOL_ALG) in af_alg_cmsg_send() 406 switch(cmsg->cmsg_type) { in af_alg_cmsg_send() 408 if (cmsg->cmsg_len < CMSG_LEN(sizeof(*con->iv))) in af_alg_cmsg_send() 410 con->iv = (void *)CMSG_DATA(cmsg); in af_alg_cmsg_send() 411 if (cmsg->cmsg_len < CMSG_LEN(con->iv->ivlen + in af_alg_cmsg_send() 417 if (cmsg->cmsg_len < CMSG_LEN(sizeof(u32))) in af_alg_cmsg_send() 419 con->op = *(u32 *)CMSG_DATA(cmsg); in af_alg_cmsg_send()
|
/linux-2.6.39/net/rds/ |
D | send.c | 818 struct cmsghdr *cmsg; in rds_rm_size() local 823 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in rds_rm_size() 824 if (!CMSG_OK(msg, cmsg)) in rds_rm_size() 827 if (cmsg->cmsg_level != SOL_RDS) in rds_rm_size() 830 switch (cmsg->cmsg_type) { in rds_rm_size() 833 retval = rds_rdma_extra_size(CMSG_DATA(cmsg)); in rds_rm_size() 872 struct cmsghdr *cmsg; in rds_cmsg_send() local 875 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in rds_cmsg_send() 876 if (!CMSG_OK(msg, cmsg)) in rds_cmsg_send() 879 if (cmsg->cmsg_level != SOL_RDS) in rds_cmsg_send() [all …]
|
D | rdma.c | 547 struct cmsghdr *cmsg) in rds_cmsg_rdma_args() argument 559 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_rdma_args)) in rds_cmsg_rdma_args() 563 args = CMSG_DATA(cmsg); in rds_cmsg_rdma_args() 712 struct cmsghdr *cmsg) in rds_cmsg_rdma_dest() argument 719 if (cmsg->cmsg_len < CMSG_LEN(sizeof(rds_rdma_cookie_t)) || in rds_cmsg_rdma_dest() 723 memcpy(&rm->m_rdma_cookie, CMSG_DATA(cmsg), sizeof(rm->m_rdma_cookie)); in rds_cmsg_rdma_dest() 754 struct cmsghdr *cmsg) in rds_cmsg_rdma_map() argument 756 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_get_mr_args)) || in rds_cmsg_rdma_map() 760 return __rds_rdma_map(rs, CMSG_DATA(cmsg), &rm->m_rdma_cookie, &rm->rdma.op_rdma_mr); in rds_cmsg_rdma_map() 767 struct cmsghdr *cmsg) in rds_cmsg_atomic() argument [all …]
|
D | recv.c | 298 struct rds_rdma_notify cmsg = { 0 }; /* fill holes with zero */ in rds_notify_queue_get() local 313 max_messages = msghdr->msg_controllen / CMSG_SPACE(sizeof(cmsg)); in rds_notify_queue_get() 334 cmsg.user_token = notifier->n_user_token; in rds_notify_queue_get() 335 cmsg.status = notifier->n_status; in rds_notify_queue_get() 338 sizeof(cmsg), &cmsg); in rds_notify_queue_get()
|
D | rds.h | 738 struct cmsghdr *cmsg); 740 struct cmsghdr *cmsg); 742 struct cmsghdr *cmsg); 744 struct cmsghdr *cmsg); 750 struct cmsghdr *cmsg);
|
/linux-2.6.39/drivers/w1/ |
D | w1_netlink.c | 279 struct cn_msg *cmsg; in w1_netlink_send_error() local 283 cmsg = kzalloc(sizeof(*msg) + sizeof(*cmd) + sizeof(*cmsg), GFP_KERNEL); in w1_netlink_send_error() 284 if (!cmsg) in w1_netlink_send_error() 287 msg = (struct w1_netlink_msg *)(cmsg + 1); in w1_netlink_send_error() 290 memcpy(cmsg, rcmsg, sizeof(*cmsg)); in w1_netlink_send_error() 291 cmsg->len = sizeof(*msg); in w1_netlink_send_error() 301 cmsg->len += sizeof(*cmd); in w1_netlink_send_error() 304 error = cn_netlink_send(cmsg, 0, GFP_KERNEL); in w1_netlink_send_error() 305 kfree(cmsg); in w1_netlink_send_error()
|
/linux-2.6.39/arch/um/os-Linux/drivers/ |
D | tuntap_user.c | 73 struct cmsghdr *cmsg; in tuntap_open_tramp() local 113 cmsg = CMSG_FIRSTHDR(&msg); in tuntap_open_tramp() 114 if (cmsg == NULL) { in tuntap_open_tramp() 119 if ((cmsg->cmsg_level != SOL_SOCKET) || in tuntap_open_tramp() 120 (cmsg->cmsg_type != SCM_RIGHTS)) { in tuntap_open_tramp() 125 *fd_out = ((int *) CMSG_DATA(cmsg))[0]; in tuntap_open_tramp()
|
/linux-2.6.39/net/rxrpc/ |
D | ar-output.c | 36 struct cmsghdr *cmsg; in rxrpc_sendmsg_cmsg() local 44 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in rxrpc_sendmsg_cmsg() 45 if (!CMSG_OK(msg, cmsg)) in rxrpc_sendmsg_cmsg() 48 len = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)); in rxrpc_sendmsg_cmsg() 50 cmsg->cmsg_level, cmsg->cmsg_type, len); in rxrpc_sendmsg_cmsg() 52 if (cmsg->cmsg_level != SOL_RXRPC) in rxrpc_sendmsg_cmsg() 55 switch (cmsg->cmsg_type) { in rxrpc_sendmsg_cmsg() 60 *user_call_ID = *(u32 *) CMSG_DATA(cmsg); in rxrpc_sendmsg_cmsg() 65 CMSG_DATA(cmsg); in rxrpc_sendmsg_cmsg() 76 *abort_code = *(unsigned int *) CMSG_DATA(cmsg); in rxrpc_sendmsg_cmsg()
|
/linux-2.6.39/arch/um/os-Linux/ |
D | file.c | 471 struct cmsghdr *cmsg; in os_rcv_fd() local 490 cmsg = CMSG_FIRSTHDR(&msg); in os_rcv_fd() 491 if (cmsg == NULL) { in os_rcv_fd() 496 if ((cmsg->cmsg_level != SOL_SOCKET) || in os_rcv_fd() 497 (cmsg->cmsg_type != SCM_RIGHTS)) { in os_rcv_fd() 502 new = ((int *) CMSG_DATA(cmsg))[0]; in os_rcv_fd()
|
/linux-2.6.39/net/dccp/ |
D | proto.c | 707 struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); in dccp_msghdr_parse() local 721 for (; cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) { in dccp_msghdr_parse() 723 if (!CMSG_OK(msg, cmsg)) in dccp_msghdr_parse() 726 if (cmsg->cmsg_level != SOL_DCCP) in dccp_msghdr_parse() 729 if (cmsg->cmsg_type <= DCCP_SCM_QPOLICY_MAX && in dccp_msghdr_parse() 730 !dccp_qpolicy_param_ok(skb->sk, cmsg->cmsg_type)) in dccp_msghdr_parse() 733 switch (cmsg->cmsg_type) { in dccp_msghdr_parse() 735 if (cmsg->cmsg_len != CMSG_LEN(sizeof(__u32))) in dccp_msghdr_parse() 737 skb->priority = *(__u32 *)CMSG_DATA(cmsg); in dccp_msghdr_parse()
|
/linux-2.6.39/fs/dlm/ |
D | lowcomms.c | 408 struct cmsghdr *cmsg; in sctp_send_shutdown() local 422 cmsg = CMSG_FIRSTHDR(&outmessage); in sctp_send_shutdown() 423 cmsg->cmsg_level = IPPROTO_SCTP; in sctp_send_shutdown() 424 cmsg->cmsg_type = SCTP_SNDRCV; in sctp_send_shutdown() 425 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); in sctp_send_shutdown() 426 outmessage.msg_controllen = cmsg->cmsg_len; in sctp_send_shutdown() 427 sinfo = CMSG_DATA(cmsg); in sctp_send_shutdown() 847 struct cmsghdr *cmsg; in sctp_init_assoc() local 894 cmsg = CMSG_FIRSTHDR(&outmessage); in sctp_init_assoc() 895 cmsg->cmsg_level = IPPROTO_SCTP; in sctp_init_assoc() [all …]
|
/linux-2.6.39/net/ipv4/ |
D | ip_sockglue.c | 198 struct cmsghdr *cmsg; in ip_cmsg_send() local 200 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in ip_cmsg_send() 201 if (!CMSG_OK(msg, cmsg)) in ip_cmsg_send() 203 if (cmsg->cmsg_level != SOL_IP) in ip_cmsg_send() 205 switch (cmsg->cmsg_type) { in ip_cmsg_send() 207 err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)); in ip_cmsg_send() 208 err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg), in ip_cmsg_send() 216 if (cmsg->cmsg_len != CMSG_LEN(sizeof(struct in_pktinfo))) in ip_cmsg_send() 218 info = (struct in_pktinfo *)CMSG_DATA(cmsg); in ip_cmsg_send()
|
/linux-2.6.39/drivers/isdn/i4l/ |
D | isdn_tty.c | 776 cmd.parm.cmsg.Length = l+18; in isdn_tty_suspend() 777 cmd.parm.cmsg.Command = CAPI_FACILITY; in isdn_tty_suspend() 778 cmd.parm.cmsg.Subcommand = CAPI_REQ; in isdn_tty_suspend() 779 cmd.parm.cmsg.adr.Controller = info->isdn_driver + 1; in isdn_tty_suspend() 780 cmd.parm.cmsg.para[0] = 3; /* 16 bit 0x0003 suplementary service */ in isdn_tty_suspend() 781 cmd.parm.cmsg.para[1] = 0; in isdn_tty_suspend() 782 cmd.parm.cmsg.para[2] = l + 3; in isdn_tty_suspend() 783 cmd.parm.cmsg.para[3] = 4; /* 16 bit 0x0004 Suspend */ in isdn_tty_suspend() 784 cmd.parm.cmsg.para[4] = 0; in isdn_tty_suspend() 785 cmd.parm.cmsg.para[5] = l; in isdn_tty_suspend() [all …]
|
/linux-2.6.39/net/iucv/ |
D | af_iucv.c | 890 struct cmsghdr *cmsg; in iucv_sock_sendmsg() local 927 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; in iucv_sock_sendmsg() 928 cmsg = CMSG_NXTHDR(msg, cmsg)) { in iucv_sock_sendmsg() 930 if (!CMSG_OK(msg, cmsg)) { in iucv_sock_sendmsg() 935 if (cmsg->cmsg_level != SOL_IUCV) in iucv_sock_sendmsg() 938 if (cmsg->cmsg_type & cmsg_done) { in iucv_sock_sendmsg() 942 cmsg_done |= cmsg->cmsg_type; in iucv_sock_sendmsg() 944 switch (cmsg->cmsg_type) { in iucv_sock_sendmsg() 946 if (cmsg->cmsg_len != CMSG_LEN(TRGCLS_SIZE)) { in iucv_sock_sendmsg() 953 (void *) CMSG_DATA(cmsg), TRGCLS_SIZE); in iucv_sock_sendmsg()
|
/linux-2.6.39/Documentation/isdn/ |
D | INTERFACE.CAPI | 308 unsigned capi_cmsg2message(_cmsg *cmsg, u8 *msg) 309 Assembles a CAPI 2.0 message from the parameters in *cmsg, storing the 312 unsigned capi_message2cmsg(_cmsg *cmsg, u8 *msg) 314 *cmsg. 316 unsigned capi_cmsg_header(_cmsg *cmsg, u16 ApplId, u8 Command, u8 Subcommand, 318 Fills the header part and address field of the _cmsg structure *cmsg 323 void capi_cmsg_answer(_cmsg *cmsg) 324 Sets the low bit of the Subcommand field in *cmsg, thereby converting
|
/linux-2.6.39/Documentation/networking/ |
D | dccp.txt | 57 be formatted using a cmsg(3) message header filled in as follows: 58 cmsg->cmsg_level = SOL_DCCP; 59 cmsg->cmsg_type = DCCP_SCM_PRIORITY; 60 cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
|
/linux-2.6.39/net/ |
D | compat.c | 109 #define CMSG_COMPAT_DATA(cmsg) \ argument 110 ((void __user *)((char __user *)(cmsg) + CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)))) 128 struct compat_cmsghdr __user *cmsg, int cmsg_len) in cmsg_compat_nxthdr() 130 char __user *ptr = (char __user *)cmsg + CMSG_COMPAT_ALIGN(cmsg_len); in cmsg_compat_nxthdr()
|