~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/vmw_vsock/vmci_transport_notify.h

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * VMware vSockets Driver
  3  *
  4  * Copyright (C) 2009-2013 VMware, Inc. All rights reserved.
  5  *
  6  * This program is free software; you can redistribute it and/or modify it
  7  * under the terms of the GNU General Public License as published by the Free
  8  * Software Foundation version 2 and no later version.
  9  *
 10  * This program is distributed in the hope that it will be useful, but WITHOUT
 11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 13  * more details.
 14  */
 15 
 16 #ifndef __VMCI_TRANSPORT_NOTIFY_H__
 17 #define __VMCI_TRANSPORT_NOTIFY_H__
 18 
 19 #include <linux/types.h>
 20 #include <linux/vmw_vmci_defs.h>
 21 #include <linux/vmw_vmci_api.h>
 22 #include <linux/vm_sockets.h>
 23 
 24 #include "vmci_transport.h"
 25 
 26 /* Comment this out to compare with old protocol. */
 27 #define VSOCK_OPTIMIZATION_WAITING_NOTIFY 1
 28 #if defined(VSOCK_OPTIMIZATION_WAITING_NOTIFY)
 29 /* Comment this out to remove flow control for "new" protocol */
 30 #define VSOCK_OPTIMIZATION_FLOW_CONTROL 1
 31 #endif
 32 
 33 #define VMCI_TRANSPORT_MAX_DGRAM_RESENDS       10
 34 
 35 struct vmci_transport_recv_notify_data {
 36         u64 consume_head;
 37         u64 produce_tail;
 38         bool notify_on_block;
 39 };
 40 
 41 struct vmci_transport_send_notify_data {
 42         u64 consume_head;
 43         u64 produce_tail;
 44 };
 45 
 46 /* Socket notification callbacks. */
 47 struct vmci_transport_notify_ops {
 48         void (*socket_init) (struct sock *sk);
 49         void (*socket_destruct) (struct vsock_sock *vsk);
 50         int (*poll_in) (struct sock *sk, size_t target,
 51                           bool *data_ready_now);
 52         int (*poll_out) (struct sock *sk, size_t target,
 53                            bool *space_avail_now);
 54         void (*handle_notify_pkt) (struct sock *sk,
 55                                    struct vmci_transport_packet *pkt,
 56                                    bool bottom_half, struct sockaddr_vm *dst,
 57                                    struct sockaddr_vm *src,
 58                                    bool *pkt_processed);
 59         int (*recv_init) (struct sock *sk, size_t target,
 60                           struct vmci_transport_recv_notify_data *data);
 61         int (*recv_pre_block) (struct sock *sk, size_t target,
 62                                struct vmci_transport_recv_notify_data *data);
 63         int (*recv_pre_dequeue) (struct sock *sk, size_t target,
 64                                  struct vmci_transport_recv_notify_data *data);
 65         int (*recv_post_dequeue) (struct sock *sk, size_t target,
 66                                   ssize_t copied, bool data_read,
 67                                   struct vmci_transport_recv_notify_data *data);
 68         int (*send_init) (struct sock *sk,
 69                           struct vmci_transport_send_notify_data *data);
 70         int (*send_pre_block) (struct sock *sk,
 71                                struct vmci_transport_send_notify_data *data);
 72         int (*send_pre_enqueue) (struct sock *sk,
 73                                  struct vmci_transport_send_notify_data *data);
 74         int (*send_post_enqueue) (struct sock *sk, ssize_t written,
 75                                   struct vmci_transport_send_notify_data *data);
 76         void (*process_request) (struct sock *sk);
 77         void (*process_negotiate) (struct sock *sk);
 78 };
 79 
 80 extern const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops;
 81 extern const
 82 struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops;
 83 
 84 #endif /* __VMCI_TRANSPORT_NOTIFY_H__ */
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp