1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker /* 3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2019 Martin Doucha <[email protected]> 4*49cdfc7eSAndroid Build Coastguard Worker */ 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard Worker /* 7*49cdfc7eSAndroid Build Coastguard Worker * Common settings and data types for bind() connection tests 8*49cdfc7eSAndroid Build Coastguard Worker */ 9*49cdfc7eSAndroid Build Coastguard Worker 10*49cdfc7eSAndroid Build Coastguard Worker #include <sys/types.h> 11*49cdfc7eSAndroid Build Coastguard Worker #include <sys/socket.h> 12*49cdfc7eSAndroid Build Coastguard Worker #include <sys/un.h> 13*49cdfc7eSAndroid Build Coastguard Worker #include <arpa/inet.h> 14*49cdfc7eSAndroid Build Coastguard Worker #include <netinet/in.h> 15*49cdfc7eSAndroid Build Coastguard Worker #include <netinet/ip.h> 16*49cdfc7eSAndroid Build Coastguard Worker 17*49cdfc7eSAndroid Build Coastguard Worker #define MAIN_SOCKET_FILE "test.sock" 18*49cdfc7eSAndroid Build Coastguard Worker #define ABSTRACT_SOCKET_PATH "\0test.sock" 19*49cdfc7eSAndroid Build Coastguard Worker #define PEER_SOCKET_FILE "peer.sock" 20*49cdfc7eSAndroid Build Coastguard Worker #define IPV4_ADDRESS "127.0.0.1" 21*49cdfc7eSAndroid Build Coastguard Worker #define BUFFER_SIZE 128 22*49cdfc7eSAndroid Build Coastguard Worker 23*49cdfc7eSAndroid Build Coastguard Worker struct test_case { 24*49cdfc7eSAndroid Build Coastguard Worker int type, protocol; 25*49cdfc7eSAndroid Build Coastguard Worker struct sockaddr *address; 26*49cdfc7eSAndroid Build Coastguard Worker socklen_t addrlen; 27*49cdfc7eSAndroid Build Coastguard Worker const char *description; 28*49cdfc7eSAndroid Build Coastguard Worker }; 29