Lines Matching full:msg

244 	struct ksmbd_ipc_msg *msg;  in ipc_msg_alloc()  local
247 msg = kvzalloc(msg_sz, KSMBD_DEFAULT_GFP); in ipc_msg_alloc()
248 if (msg) in ipc_msg_alloc()
249 msg->sz = sz; in ipc_msg_alloc()
250 return msg; in ipc_msg_alloc()
253 static void ipc_msg_free(struct ksmbd_ipc_msg *msg) in ipc_msg_free() argument
255 kvfree(msg); in ipc_msg_free()
441 static int ipc_msg_send(struct ksmbd_ipc_msg *msg) in ipc_msg_send() argument
450 skb = genlmsg_new(msg->sz, KSMBD_DEFAULT_GFP); in ipc_msg_send()
454 nlh = genlmsg_put(skb, 0, 0, &ksmbd_genl_family, 0, msg->type); in ipc_msg_send()
458 ret = nla_put(skb, msg->type, msg->sz, msg->payload); in ipc_msg_send()
522 static void *ipc_msg_send_request(struct ksmbd_ipc_msg *msg, unsigned int handle) in ipc_msg_send_request() argument
530 entry.type = msg->type; in ipc_msg_send_request()
539 ret = ipc_msg_send(msg); in ipc_msg_send_request()
562 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_heartbeat_request() local
565 msg = ipc_msg_alloc(sizeof(struct ksmbd_heartbeat)); in ksmbd_ipc_heartbeat_request()
566 if (!msg) in ksmbd_ipc_heartbeat_request()
569 msg->type = KSMBD_EVENT_HEARTBEAT_REQUEST; in ksmbd_ipc_heartbeat_request()
570 ret = ipc_msg_send(msg); in ksmbd_ipc_heartbeat_request()
571 ipc_msg_free(msg); in ksmbd_ipc_heartbeat_request()
577 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_login_request() local
584 msg = ipc_msg_alloc(sizeof(struct ksmbd_login_request)); in ksmbd_ipc_login_request()
585 if (!msg) in ksmbd_ipc_login_request()
588 msg->type = KSMBD_EVENT_LOGIN_REQUEST; in ksmbd_ipc_login_request()
589 req = (struct ksmbd_login_request *)msg->payload; in ksmbd_ipc_login_request()
593 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_ipc_login_request()
595 ipc_msg_free(msg); in ksmbd_ipc_login_request()
601 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_login_request_ext() local
608 msg = ipc_msg_alloc(sizeof(struct ksmbd_login_request)); in ksmbd_ipc_login_request_ext()
609 if (!msg) in ksmbd_ipc_login_request_ext()
612 msg->type = KSMBD_EVENT_LOGIN_REQUEST_EXT; in ksmbd_ipc_login_request_ext()
613 req = (struct ksmbd_login_request *)msg->payload; in ksmbd_ipc_login_request_ext()
616 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_ipc_login_request_ext()
618 ipc_msg_free(msg); in ksmbd_ipc_login_request_ext()
625 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_spnego_authen_request() local
629 msg = ipc_msg_alloc(sizeof(struct ksmbd_spnego_authen_request) + in ksmbd_ipc_spnego_authen_request()
631 if (!msg) in ksmbd_ipc_spnego_authen_request()
634 msg->type = KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST; in ksmbd_ipc_spnego_authen_request()
635 req = (struct ksmbd_spnego_authen_request *)msg->payload; in ksmbd_ipc_spnego_authen_request()
640 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_ipc_spnego_authen_request()
642 ipc_msg_free(msg); in ksmbd_ipc_spnego_authen_request()
652 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_tree_connect_request() local
662 msg = ipc_msg_alloc(sizeof(struct ksmbd_tree_connect_request)); in ksmbd_ipc_tree_connect_request()
663 if (!msg) in ksmbd_ipc_tree_connect_request()
666 msg->type = KSMBD_EVENT_TREE_CONNECT_REQUEST; in ksmbd_ipc_tree_connect_request()
667 req = (struct ksmbd_tree_connect_request *)msg->payload; in ksmbd_ipc_tree_connect_request()
682 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_ipc_tree_connect_request()
684 ipc_msg_free(msg); in ksmbd_ipc_tree_connect_request()
691 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_tree_disconnect_request() local
695 msg = ipc_msg_alloc(sizeof(struct ksmbd_tree_disconnect_request)); in ksmbd_ipc_tree_disconnect_request()
696 if (!msg) in ksmbd_ipc_tree_disconnect_request()
699 msg->type = KSMBD_EVENT_TREE_DISCONNECT_REQUEST; in ksmbd_ipc_tree_disconnect_request()
700 req = (struct ksmbd_tree_disconnect_request *)msg->payload; in ksmbd_ipc_tree_disconnect_request()
704 ret = ipc_msg_send(msg); in ksmbd_ipc_tree_disconnect_request()
705 ipc_msg_free(msg); in ksmbd_ipc_tree_disconnect_request()
711 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_logout_request() local
718 msg = ipc_msg_alloc(sizeof(struct ksmbd_logout_request)); in ksmbd_ipc_logout_request()
719 if (!msg) in ksmbd_ipc_logout_request()
722 msg->type = KSMBD_EVENT_LOGOUT_REQUEST; in ksmbd_ipc_logout_request()
723 req = (struct ksmbd_logout_request *)msg->payload; in ksmbd_ipc_logout_request()
727 ret = ipc_msg_send(msg); in ksmbd_ipc_logout_request()
728 ipc_msg_free(msg); in ksmbd_ipc_logout_request()
735 struct ksmbd_ipc_msg *msg; in ksmbd_ipc_share_config_request() local
742 msg = ipc_msg_alloc(sizeof(struct ksmbd_share_config_request)); in ksmbd_ipc_share_config_request()
743 if (!msg) in ksmbd_ipc_share_config_request()
746 msg->type = KSMBD_EVENT_SHARE_CONFIG_REQUEST; in ksmbd_ipc_share_config_request()
747 req = (struct ksmbd_share_config_request *)msg->payload; in ksmbd_ipc_share_config_request()
751 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_ipc_share_config_request()
753 ipc_msg_free(msg); in ksmbd_ipc_share_config_request()
759 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_open() local
763 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command)); in ksmbd_rpc_open()
764 if (!msg) in ksmbd_rpc_open()
767 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_open()
768 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_open()
774 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_open()
775 ipc_msg_free(msg); in ksmbd_rpc_open()
781 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_close() local
785 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command)); in ksmbd_rpc_close()
786 if (!msg) in ksmbd_rpc_close()
789 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_close()
790 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_close()
796 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_close()
797 ipc_msg_free(msg); in ksmbd_rpc_close()
804 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_write() local
808 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command) + payload_sz + 1); in ksmbd_rpc_write()
809 if (!msg) in ksmbd_rpc_write()
812 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_write()
813 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_write()
821 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_write()
822 ipc_msg_free(msg); in ksmbd_rpc_write()
828 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_read() local
832 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command)); in ksmbd_rpc_read()
833 if (!msg) in ksmbd_rpc_read()
836 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_read()
837 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_read()
844 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_read()
845 ipc_msg_free(msg); in ksmbd_rpc_read()
852 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_ioctl() local
856 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command) + payload_sz + 1); in ksmbd_rpc_ioctl()
857 if (!msg) in ksmbd_rpc_ioctl()
860 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_ioctl()
861 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_ioctl()
869 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_ioctl()
870 ipc_msg_free(msg); in ksmbd_rpc_ioctl()
877 struct ksmbd_ipc_msg *msg; in ksmbd_rpc_rap() local
881 msg = ipc_msg_alloc(sizeof(struct ksmbd_rpc_command) + payload_sz + 1); in ksmbd_rpc_rap()
882 if (!msg) in ksmbd_rpc_rap()
885 msg->type = KSMBD_EVENT_RPC_REQUEST; in ksmbd_rpc_rap()
886 req = (struct ksmbd_rpc_command *)msg->payload; in ksmbd_rpc_rap()
893 resp = ipc_msg_send_request(msg, req->handle); in ksmbd_rpc_rap()
895 ipc_msg_free(msg); in ksmbd_rpc_rap()