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

TOMOYO Linux Cross Reference
Linux/tools/testing/vsock/util.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/vsock/util.h (Version linux-6.11.5) and /tools/testing/vsock/util.h (Version linux-2.4.37.11)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2 #ifndef UTIL_H                                    
  3 #define UTIL_H                                    
  4                                                   
  5 #include <sys/socket.h>                           
  6 #include <linux/vm_sockets.h>                     
  7                                                   
  8 /* Tests can either run as the client or the s    
  9 enum test_mode {                                  
 10         TEST_MODE_UNSET,                          
 11         TEST_MODE_CLIENT,                         
 12         TEST_MODE_SERVER                          
 13 };                                                
 14                                                   
 15 #define DEFAULT_PEER_PORT       1234              
 16                                                   
 17 /* Test runner options */                         
 18 struct test_opts {                                
 19         enum test_mode mode;                      
 20         unsigned int peer_cid;                    
 21         unsigned int peer_port;                   
 22 };                                                
 23                                                   
 24 /* A test case definition.  Test functions mus    
 25  * terminate with exit(EXIT_FAILURE).             
 26  */                                               
 27 struct test_case {                                
 28         const char *name; /* human-readable na    
 29                                                   
 30         /* Called when test mode is TEST_MODE_    
 31         void (*run_client)(const struct test_o    
 32                                                   
 33         /* Called when test mode is TEST_MODE_    
 34         void (*run_server)(const struct test_o    
 35                                                   
 36         bool skip;                                
 37 };                                                
 38                                                   
 39 void init_signals(void);                          
 40 unsigned int parse_cid(const char *str);          
 41 unsigned int parse_port(const char *str);         
 42 int vsock_stream_connect(unsigned int cid, uns    
 43 int vsock_bind_connect(unsigned int cid, unsig    
 44                        unsigned int bind_port,    
 45 int vsock_seqpacket_connect(unsigned int cid,     
 46 int vsock_stream_accept(unsigned int cid, unsi    
 47                         struct sockaddr_vm *cl    
 48 int vsock_stream_listen(unsigned int cid, unsi    
 49 int vsock_seqpacket_accept(unsigned int cid, u    
 50                            struct sockaddr_vm     
 51 void vsock_wait_remote_close(int fd);             
 52 void send_buf(int fd, const void *buf, size_t     
 53               ssize_t expected_ret);              
 54 void recv_buf(int fd, void *buf, size_t len, i    
 55 void send_byte(int fd, int expected_ret, int f    
 56 void recv_byte(int fd, int expected_ret, int f    
 57 void run_tests(const struct test_case *test_ca    
 58                const struct test_opts *opts);     
 59 void list_tests(const struct test_case *test_c    
 60 void skip_test(struct test_case *test_cases, s    
 61                const char *test_id_str);          
 62 unsigned long hash_djb2(const void *data, size    
 63 size_t iovec_bytes(const struct iovec *iov, si    
 64 unsigned long iovec_hash_djb2(const struct iov    
 65 struct iovec *alloc_test_iovec(const struct io    
 66 void free_test_iovec(const struct iovec *test_    
 67                      struct iovec *iovec, int     
 68 #endif /* UTIL_H */                               
 69                                                   

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php