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