# 0 "criu/net.c" # 0 "" # 0 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 0 "" 2 # 1 "criu/net.c" # 1 "/usr/include/unistd.h" 1 3 4 # 25 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 394 "/usr/include/features.h" 3 4 # 1 "/usr/include/features-time64.h" 1 3 4 # 20 "/usr/include/features-time64.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 21 "/usr/include/features-time64.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4 # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4 # 22 "/usr/include/features-time64.h" 2 3 4 # 395 "/usr/include/features.h" 2 3 4 # 502 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 # 576 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 577 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 # 578 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 503 "/usr/include/features.h" 2 3 4 # 526 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 527 "/usr/include/features.h" 2 3 4 # 26 "/usr/include/unistd.h" 2 3 4 # 202 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4 # 203 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4 # 207 "/usr/include/unistd.h" 2 3 4 # 217 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4 # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 # 31 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; typedef long int __intmax_t; typedef unsigned long int __uintmax_t; # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time64.h" 1 3 4 # 143 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef long int __suseconds64_t; typedef int __daddr_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __fsword_t; typedef long int __ssize_t; typedef long int __syscall_slong_t; typedef unsigned long int __syscall_ulong_t; typedef __off64_t __loff_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; typedef int __sig_atomic_t; # 218 "/usr/include/unistd.h" 2 3 4 typedef __ssize_t ssize_t; # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 214 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4 typedef long unsigned int size_t; # 227 "/usr/include/unistd.h" 2 3 4 typedef __gid_t gid_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __useconds_t useconds_t; typedef __pid_t pid_t; typedef __intptr_t intptr_t; typedef __socklen_t socklen_t; # 287 "/usr/include/unistd.h" 3 4 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int euidaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int eaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int execveat (int __fd, const char *__path, char *const __argv[], char *const __envp[], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int faccessat (int __fd, const char *__file, int __type, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); # 339 "/usr/include/unistd.h" 3 4 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); # 350 "/usr/include/unistd.h" 3 4 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); extern int close (int __fd); extern void closefrom (int __lowfd) __attribute__ ((__nothrow__ , __leaf__)); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 389 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 422 "/usr/include/unistd.h" 3 4 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); # 452 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); # 464 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __attribute__ ((__nothrow__ , __leaf__)); extern int usleep (__useconds_t __useconds); # 489 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); # 531 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__)); extern char *getwd (char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))); extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern char **__environ; extern char **environ; extern int execve (const char *__path, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int execv (const char *__path, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execle (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execl (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execvp (const char *__file, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execlp (const char *__file, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int execvpe (const char *__file, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4 enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT, _SC_MINSIGSTKSZ, _SC_SIGSTKSZ }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; # 631 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (const char *__path, int __name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 2))); extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); # 682 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) __attribute__ ((__nothrow__ , __leaf__)); extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) __attribute__ ((__nothrow__ , __leaf__)); extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern __pid_t fork (void) __attribute__ ((__nothrow__)); extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t _Fork (void) __attribute__ ((__nothrow__ , __leaf__)); extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); extern int link (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern int linkat (int __fromfd, const char *__from, int __tofd, const char *__to, int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); extern int symlink (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2))); extern int symlinkat (const char *__from, int __tofd, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3))); extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, const char *__name, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1))); extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4 extern char *optarg; # 50 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 91 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 2 3 4 # 49 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4 # 904 "/usr/include/unistd.h" 2 3 4 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1))); extern int sethostname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2))); extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int getdomainname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))); extern int setdomainname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2))); extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); extern int fsync (int __fd); extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern long int gethostid (void); extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); # 1026 "/usr/include/unistd.h" 3 4 extern int truncate (const char *__file, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1038 "/usr/include/unistd.h" 3 4 extern int truncate64 (const char *__file, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1049 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); # 1059 "/usr/include/unistd.h" 3 4 extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); # 1070 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); # 1091 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); # 1114 "/usr/include/unistd.h" 3 4 extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); # 1124 "/usr/include/unistd.h" 3 4 extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); # 1142 "/usr/include/unistd.h" 3 4 ssize_t copy_file_range (int __infd, __off64_t *__pinoff, int __outfd, __off64_t *__poutoff, size_t __length, unsigned int __flags); extern int fdatasync (int __fildes); # 1162 "/usr/include/unistd.h" 3 4 extern char *crypt (const char *__key, const char *__salt) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__read_only__, 1, 3))) __attribute__ ((__access__ (__write_only__, 2, 3))); # 1201 "/usr/include/unistd.h" 3 4 int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); # 1211 "/usr/include/unistd.h" 3 4 extern int close_range (unsigned int __fd, unsigned int __max_fd, int __flags) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/unistd-decl.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/unistd-decl.h" 3 4 extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) ; extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) ; extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) ; extern ssize_t __readlink_chk (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) ; extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4))); extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4))); extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) ; extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) ; extern char *__getwd_chk (char *__buf, size_t buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) ; extern size_t __confstr_chk (int __name, char *__buf, size_t __len, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) ; extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1))); extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1))); extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) ; extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) ; extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1))); extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) ; extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) ; extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) ; # 24 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 2 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 0)) && (__builtin_dynamic_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char)))))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_dynamic_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_dynamic_object_size (__buf, 0)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 0)) && (__builtin_dynamic_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0)))) ; } # 53 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 0)) && (__builtin_dynamic_object_size (__buf, 0)) == (long unsigned int) -1) || (((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char))))) && (((long unsigned int) (__nbytes)) <= ((__builtin_dynamic_object_size (__buf, 0))) / ((sizeof (char)))))) ? __pread64_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_dynamic_object_size (__buf, 0)) / (sizeof (char)))) ? __pread64_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0)) : __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_dynamic_object_size (__buf, 0)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __readlink_chk (__path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_dynamic_object_size (__buf, 1)) : __getcwd_chk (__buf, __size, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf) { if (__builtin_dynamic_object_size (__buf, 1) != (size_t) -1) return __getwd_chk (__buf, __builtin_dynamic_object_size (__buf, 1)); return __getwd_warn (__buf); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_dynamic_object_size (__buf, 1)) : __confstr_chk (__name, __buf, __len, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[]) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__list, 1)) && (__builtin_dynamic_object_size (__list, 1)) == (long unsigned int) -1) || (((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__list, 1))) / ((sizeof (__gid_t))))) && (((long unsigned int) (__size)) <= ((__builtin_dynamic_object_size (__list, 1))) / ((sizeof (__gid_t)))))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__list, 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_dynamic_object_size (__list, 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_dynamic_object_size (__list, 1)) : __getgroups_chk (__size, __list, __builtin_dynamic_object_size (__list, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int getlogin_r (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __gethostname_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)))) ; } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __getdomainname_chk (__buf, __buflen, __builtin_dynamic_object_size (__buf, 1)))) ; } # 1218 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h" 1 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h" 3 4 extern __pid_t gettid (void) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/linux/close_range.h" 1 3 4 # 39 "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h" 2 3 4 # 1222 "/usr/include/unistd.h" 2 3 4 # 2 "criu/net.c" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 2 3 4 struct iovec { void *iov_base; size_t iov_len; }; # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; # 69 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __mode_t mode_t; typedef __nlink_t nlink_t; # 103 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __id_t id_t; # 114 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4 typedef __clock_t clock_t; # 127 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4 typedef __clockid_t clockid_t; # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4 typedef __time_t time_t; # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4 typedef __timer_t timer_t; # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 145 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4 typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; # 156 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef int register_t __attribute__ ((__mode__ (__word__))); # 176 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 24 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 1 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/endian.h" 2 3 4 # 25 "/usr/include/endian.h" 2 3 4 # 35 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 # 33 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { return __builtin_bswap16 (__bsx); } static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { return __builtin_bswap32 (__bsx); } # 69 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __builtin_bswap64 (__bsx); } # 36 "/usr/include/endian.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 # 32 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } # 37 "/usr/include/endian.h" 2 3 4 # 177 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4 typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4 typedef __sigset_t sigset_t; # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 struct timespec { __time_t tv_sec; __syscall_slong_t tv_nsec; # 31 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 }; # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 49 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef long int __fd_mask; # 59 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 91 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 102 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 127 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # 150 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select2.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/select2.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select-decl.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/select-decl.h" 3 4 extern long int __fdelt_chk (long int __d); extern long int __fdelt_warn (long int __d) __attribute__((__warning__ ("bit outside of fd_set selected"))); # 24 "/usr/include/x86_64-linux-gnu/bits/select2.h" 2 3 4 # 151 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 180 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4 # 44 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4 # 45 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 3 4 typedef union { __extension__ unsigned long long int __value64; struct { unsigned int __low; unsigned int __high; } __value32; } __atomic_wide_counter; # 47 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; # 76 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; __pthread_list_t __list; # 53 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 }; # 77 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 # 89 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; int __cur_writer; int __shared; signed char __rwelision; unsigned char __pad1[7]; unsigned long int __pad2; unsigned int __flags; # 55 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 }; # 90 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 struct __pthread_cond_s { __atomic_wide_counter __wseq; __atomic_wide_counter __g1_start; unsigned int __g_refs[2] ; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; typedef unsigned int __tss_t; typedef unsigned long int __thrd_t; typedef struct { int __data ; } __once_flag; # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 typedef unsigned long int pthread_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; union pthread_attr_t { char __size[56]; long int __align; }; typedef union pthread_attr_t pthread_attr_t; typedef union { struct __pthread_mutex_s __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { struct __pthread_rwlock_arch_t __data; char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 228 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 30 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4 enum __socket_type { SOCK_STREAM = 1, SOCK_DGRAM = 2, SOCK_RAW = 3, SOCK_RDM = 4, SOCK_SEQPACKET = 5, SOCK_DCCP = 6, SOCK_PACKET = 10, SOCK_CLOEXEC = 02000000, SOCK_NONBLOCK = 00004000 }; # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 # 180 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4 typedef unsigned short int sa_family_t; # 181 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 struct sockaddr { sa_family_t sa_family; char sa_data[14]; }; # 196 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 struct sockaddr_storage { sa_family_t ss_family; char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))]; unsigned long int __ss_align; }; enum { MSG_OOB = 0x01, MSG_PEEK = 0x02, MSG_DONTROUTE = 0x04, MSG_TRYHARD = MSG_DONTROUTE, MSG_CTRUNC = 0x08, MSG_PROXY = 0x10, MSG_TRUNC = 0x20, MSG_DONTWAIT = 0x40, MSG_EOR = 0x80, MSG_WAITALL = 0x100, MSG_FIN = 0x200, MSG_SYN = 0x400, MSG_CONFIRM = 0x800, MSG_RST = 0x1000, MSG_ERRQUEUE = 0x2000, MSG_NOSIGNAL = 0x4000, MSG_MORE = 0x8000, MSG_WAITFORONE = 0x10000, MSG_BATCH = 0x40000, MSG_ZEROCOPY = 0x4000000, MSG_FASTOPEN = 0x20000000, MSG_CMSG_CLOEXEC = 0x40000000 }; struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; size_t msg_iovlen; void *msg_control; size_t msg_controllen; int msg_flags; }; struct cmsghdr { size_t cmsg_len; int cmsg_level; int cmsg_type; __extension__ unsigned char __cmsg_data []; }; # 316 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__)); extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr * __attribute__ ((__nothrow__ , __leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) { unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control; unsigned char * __cmsg_ptr = (unsigned char *) __cmsg; size_t __size_needed = sizeof (struct cmsghdr) + ((sizeof (size_t) - ((__cmsg->cmsg_len) & (sizeof (size_t) - 1))) & (sizeof (size_t) - 1)); if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) return (struct cmsghdr *) 0; if (((size_t) (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr) < __size_needed) || ((size_t) (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr - __size_needed) < __cmsg->cmsg_len)) return (struct cmsghdr *) 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); return __cmsg; } enum { SCM_RIGHTS = 0x01 , SCM_CREDENTIALS = 0x02 , SCM_SECURITY = 0x03 , SCM_PIDFD = 0x04 }; struct ucred { pid_t pid; uid_t uid; gid_t gid; }; # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4 # 1 "/usr/include/asm-generic/socket.h" 1 3 4 # 1 "/usr/include/linux/posix_types.h" 1 3 4 # 1 "/usr/include/linux/stddef.h" 1 3 4 # 6 "/usr/include/linux/posix_types.h" 2 3 4 # 25 "/usr/include/linux/posix_types.h" 3 4 typedef struct { unsigned long fds_bits[1024 / (8 * sizeof(long))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 3 4 typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned long __kernel_old_dev_t; # 1 "/usr/include/asm-generic/posix_types.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 1 3 4 # 11 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 3 4 # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 # 12 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 2 3 4 # 6 "/usr/include/asm-generic/posix_types.h" 2 3 4 # 15 "/usr/include/asm-generic/posix_types.h" 3 4 typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef __kernel_ulong_t __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef int __kernel_pid_t; typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef __kernel_long_t __kernel_suseconds_t; typedef int __kernel_daddr_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; # 72 "/usr/include/asm-generic/posix_types.h" 3 4 typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef __kernel_long_t __kernel_ptrdiff_t; typedef struct { int val[2]; } __kernel_fsid_t; typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; # 19 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 2 3 4 # 8 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 2 3 4 # 37 "/usr/include/linux/posix_types.h" 2 3 4 # 6 "/usr/include/asm-generic/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4 # 7 "/usr/include/asm-generic/socket.h" 2 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4 # 390 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 struct linger { int l_onoff; int l_linger; }; # 34 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h" 1 3 4 struct osockaddr { unsigned short int sa_family; unsigned char sa_data[14]; }; # 37 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 enum { SHUT_RD = 0, SHUT_WR, SHUT_RDWR }; # 79 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__; } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); typedef union { const struct sockaddr *__restrict __sockaddr__; const struct sockaddr_at *__restrict __sockaddr_at__; const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; const struct sockaddr_dl *__restrict __sockaddr_dl__; const struct sockaddr_eon *__restrict __sockaddr_eon__; const struct sockaddr_in *__restrict __sockaddr_in__; const struct sockaddr_in6 *__restrict __sockaddr_in6__; const struct sockaddr_inarp *__restrict __sockaddr_inarp__; const struct sockaddr_ipx *__restrict __sockaddr_ipx__; const struct sockaddr_iso *__restrict __sockaddr_iso__; const struct sockaddr_ns *__restrict __sockaddr_ns__; const struct sockaddr_un *__restrict __sockaddr_un__; const struct sockaddr_x25 *__restrict __sockaddr_x25__; } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); struct mmsghdr { struct msghdr msg_hdr; unsigned int msg_len; }; extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ , __leaf__)); extern int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __attribute__ ((__nothrow__ , __leaf__)); extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __attribute__ ((__nothrow__ , __leaf__)); extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__)); # 126 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__)); extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); extern ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); # 163 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); # 195 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); # 216 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); # 235 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, struct timespec *__tmo); # 255 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ , __leaf__)); # 277 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int setsockopt (int __fd, int __level, int __optname, const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__)); # 296 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__)); # 306 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern int accept4 (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len, int __flags); # 324 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ , __leaf__)); extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 3 4 extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags); extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv") ; extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk") __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t recv (int __fd, void *__buf, size_t __n, int __flags) { size_t sz = __builtin_dynamic_object_size (__buf, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __recv_alias (__fd, __buf, __n, __flags); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __recv_chk_warn (__fd, __buf, __n, sz, __flags); return __recv_chk (__fd, __buf, __n, sz, __flags); } extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom") ; extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk") __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) { size_t sz = __builtin_dynamic_object_size (__buf, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr, __addr_len); return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len); } # 344 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 3 "criu/net.c" 2 # 1 "/usr/include/linux/netlink.h" 1 3 4 # 1 "/usr/include/linux/const.h" 1 3 4 # 6 "/usr/include/linux/netlink.h" 2 3 4 # 1 "/usr/include/linux/socket.h" 1 3 4 # 10 "/usr/include/linux/socket.h" 3 4 typedef unsigned short __kernel_sa_family_t; struct __kernel_sockaddr_storage { union { struct { __kernel_sa_family_t ss_family; char __data[128 - sizeof(unsigned short)]; }; void *__align; }; }; # 7 "/usr/include/linux/netlink.h" 2 3 4 # 1 "/usr/include/linux/types.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/types.h" 1 3 4 # 1 "/usr/include/asm-generic/types.h" 1 3 4 # 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 # 20 "/usr/include/asm-generic/int-ll64.h" 3 4 typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; # 8 "/usr/include/asm-generic/types.h" 2 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/types.h" 2 3 4 # 6 "/usr/include/linux/types.h" 2 3 4 typedef __signed__ __int128 __s128 __attribute__((aligned(16))); typedef unsigned __int128 __u128 __attribute__((aligned(16))); # 31 "/usr/include/linux/types.h" 3 4 typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; # 54 "/usr/include/linux/types.h" 3 4 typedef unsigned __poll_t; # 8 "/usr/include/linux/netlink.h" 2 3 4 # 37 "/usr/include/linux/netlink.h" 3 4 struct sockaddr_nl { __kernel_sa_family_t nl_family; unsigned short nl_pad; __u32 nl_pid; __u32 nl_groups; }; # 52 "/usr/include/linux/netlink.h" 3 4 struct nlmsghdr { __u32 nlmsg_len; __u16 nlmsg_type; __u16 nlmsg_flags; __u32 nlmsg_seq; __u32 nlmsg_pid; }; # 119 "/usr/include/linux/netlink.h" 3 4 struct nlmsgerr { int error; struct nlmsghdr msg; # 131 "/usr/include/linux/netlink.h" 3 4 }; # 150 "/usr/include/linux/netlink.h" 3 4 enum nlmsgerr_attrs { NLMSGERR_ATTR_UNUSED, NLMSGERR_ATTR_MSG, NLMSGERR_ATTR_OFFS, NLMSGERR_ATTR_COOKIE, NLMSGERR_ATTR_POLICY, NLMSGERR_ATTR_MISS_TYPE, NLMSGERR_ATTR_MISS_NEST, __NLMSGERR_ATTR_MAX, NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1 }; # 176 "/usr/include/linux/netlink.h" 3 4 struct nl_pktinfo { __u32 group; }; struct nl_mmap_req { unsigned int nm_block_size; unsigned int nm_block_nr; unsigned int nm_frame_size; unsigned int nm_frame_nr; }; struct nl_mmap_hdr { unsigned int nm_status; unsigned int nm_len; __u32 nm_group; __u32 nm_pid; __u32 nm_uid; __u32 nm_gid; }; enum nl_mmap_status { NL_MMAP_STATUS_UNUSED, NL_MMAP_STATUS_RESERVED, NL_MMAP_STATUS_VALID, NL_MMAP_STATUS_COPY, NL_MMAP_STATUS_SKIP, }; enum { NETLINK_UNCONNECTED = 0, NETLINK_CONNECTED, }; # 225 "/usr/include/linux/netlink.h" 3 4 struct nlattr { __u16 nla_len; __u16 nla_type; }; # 261 "/usr/include/linux/netlink.h" 3 4 struct nla_bitfield32 { __u32 value; __u32 selector; }; # 300 "/usr/include/linux/netlink.h" 3 4 enum netlink_attribute_type { NL_ATTR_TYPE_INVALID, NL_ATTR_TYPE_FLAG, NL_ATTR_TYPE_U8, NL_ATTR_TYPE_U16, NL_ATTR_TYPE_U32, NL_ATTR_TYPE_U64, NL_ATTR_TYPE_S8, NL_ATTR_TYPE_S16, NL_ATTR_TYPE_S32, NL_ATTR_TYPE_S64, NL_ATTR_TYPE_BINARY, NL_ATTR_TYPE_STRING, NL_ATTR_TYPE_NUL_STRING, NL_ATTR_TYPE_NESTED, NL_ATTR_TYPE_NESTED_ARRAY, NL_ATTR_TYPE_BITFIELD32, NL_ATTR_TYPE_SINT, NL_ATTR_TYPE_UINT, }; # 359 "/usr/include/linux/netlink.h" 3 4 enum netlink_policy_type_attr { NL_POLICY_TYPE_ATTR_UNSPEC, NL_POLICY_TYPE_ATTR_TYPE, NL_POLICY_TYPE_ATTR_MIN_VALUE_S, NL_POLICY_TYPE_ATTR_MAX_VALUE_S, NL_POLICY_TYPE_ATTR_MIN_VALUE_U, NL_POLICY_TYPE_ATTR_MAX_VALUE_U, NL_POLICY_TYPE_ATTR_MIN_LENGTH, NL_POLICY_TYPE_ATTR_MAX_LENGTH, NL_POLICY_TYPE_ATTR_POLICY_IDX, NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE, NL_POLICY_TYPE_ATTR_BITFIELD32_MASK, NL_POLICY_TYPE_ATTR_PAD, NL_POLICY_TYPE_ATTR_MASK, __NL_POLICY_TYPE_ATTR_MAX, NL_POLICY_TYPE_ATTR_MAX = __NL_POLICY_TYPE_ATTR_MAX - 1 }; # 4 "criu/net.c" 2 # 1 "/usr/include/linux/rtnetlink.h" 1 3 4 # 1 "/usr/include/linux/if_link.h" 1 3 4 # 9 "/usr/include/linux/if_link.h" 3 4 struct rtnl_link_stats { __u32 rx_packets; __u32 tx_packets; __u32 rx_bytes; __u32 tx_bytes; __u32 rx_errors; __u32 tx_errors; __u32 rx_dropped; __u32 tx_dropped; __u32 multicast; __u32 collisions; __u32 rx_length_errors; __u32 rx_over_errors; __u32 rx_crc_errors; __u32 rx_frame_errors; __u32 rx_fifo_errors; __u32 rx_missed_errors; __u32 tx_aborted_errors; __u32 tx_carrier_errors; __u32 tx_fifo_errors; __u32 tx_heartbeat_errors; __u32 tx_window_errors; __u32 rx_compressed; __u32 tx_compressed; __u32 rx_nohandler; }; # 218 "/usr/include/linux/if_link.h" 3 4 struct rtnl_link_stats64 { __u64 rx_packets; __u64 tx_packets; __u64 rx_bytes; __u64 tx_bytes; __u64 rx_errors; __u64 tx_errors; __u64 rx_dropped; __u64 tx_dropped; __u64 multicast; __u64 collisions; __u64 rx_length_errors; __u64 rx_over_errors; __u64 rx_crc_errors; __u64 rx_frame_errors; __u64 rx_fifo_errors; __u64 rx_missed_errors; __u64 tx_aborted_errors; __u64 tx_carrier_errors; __u64 tx_fifo_errors; __u64 tx_heartbeat_errors; __u64 tx_window_errors; __u64 rx_compressed; __u64 tx_compressed; __u64 rx_nohandler; __u64 rx_otherhost_dropped; }; struct rtnl_hw_stats64 { __u64 rx_packets; __u64 tx_packets; __u64 rx_bytes; __u64 tx_bytes; __u64 rx_errors; __u64 tx_errors; __u64 rx_dropped; __u64 tx_dropped; __u64 multicast; }; struct rtnl_link_ifmap { __u64 mem_start; __u64 mem_end; __u64 base_addr; __u16 irq; __u8 dma; __u8 port; }; # 296 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_UNSPEC, IFLA_ADDRESS, IFLA_BROADCAST, IFLA_IFNAME, IFLA_MTU, IFLA_LINK, IFLA_QDISC, IFLA_STATS, IFLA_COST, IFLA_PRIORITY, IFLA_MASTER, IFLA_WIRELESS, IFLA_PROTINFO, IFLA_TXQLEN, IFLA_MAP, IFLA_WEIGHT, IFLA_OPERSTATE, IFLA_LINKMODE, IFLA_LINKINFO, IFLA_NET_NS_PID, IFLA_IFALIAS, IFLA_NUM_VF, IFLA_VFINFO_LIST, IFLA_STATS64, IFLA_VF_PORTS, IFLA_PORT_SELF, IFLA_AF_SPEC, IFLA_GROUP, IFLA_NET_NS_FD, IFLA_EXT_MASK, IFLA_PROMISCUITY, IFLA_NUM_TX_QUEUES, IFLA_NUM_RX_QUEUES, IFLA_CARRIER, IFLA_PHYS_PORT_ID, IFLA_CARRIER_CHANGES, IFLA_PHYS_SWITCH_ID, IFLA_LINK_NETNSID, IFLA_PHYS_PORT_NAME, IFLA_PROTO_DOWN, IFLA_GSO_MAX_SEGS, IFLA_GSO_MAX_SIZE, IFLA_PAD, IFLA_XDP, IFLA_EVENT, IFLA_NEW_NETNSID, IFLA_IF_NETNSID, IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, IFLA_CARRIER_UP_COUNT, IFLA_CARRIER_DOWN_COUNT, IFLA_NEW_IFINDEX, IFLA_MIN_MTU, IFLA_MAX_MTU, IFLA_PROP_LIST, IFLA_ALT_IFNAME, IFLA_PERM_ADDRESS, IFLA_PROTO_DOWN_REASON, IFLA_PARENT_DEV_NAME, IFLA_PARENT_DEV_BUS_NAME, IFLA_GRO_MAX_SIZE, IFLA_TSO_MAX_SIZE, IFLA_TSO_MAX_SEGS, IFLA_ALLMULTI, IFLA_DEVLINK_PORT, IFLA_GSO_IPV4_MAX_SIZE, IFLA_GRO_IPV4_MAX_SIZE, IFLA_DPLL_PIN, __IFLA_MAX }; enum { IFLA_PROTO_DOWN_REASON_UNSPEC, IFLA_PROTO_DOWN_REASON_MASK, IFLA_PROTO_DOWN_REASON_VALUE, __IFLA_PROTO_DOWN_REASON_CNT, IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1 }; enum { IFLA_INET_UNSPEC, IFLA_INET_CONF, __IFLA_INET_MAX, }; # 437 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_INET6_UNSPEC, IFLA_INET6_FLAGS, IFLA_INET6_CONF, IFLA_INET6_STATS, IFLA_INET6_MCAST, IFLA_INET6_CACHEINFO, IFLA_INET6_ICMP6STATS, IFLA_INET6_TOKEN, IFLA_INET6_ADDR_GEN_MODE, IFLA_INET6_RA_MTU, __IFLA_INET6_MAX }; enum in6_addr_gen_mode { IN6_ADDR_GEN_MODE_EUI64, IN6_ADDR_GEN_MODE_NONE, IN6_ADDR_GEN_MODE_STABLE_PRIVACY, IN6_ADDR_GEN_MODE_RANDOM, }; # 742 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_BR_UNSPEC, IFLA_BR_FORWARD_DELAY, IFLA_BR_HELLO_TIME, IFLA_BR_MAX_AGE, IFLA_BR_AGEING_TIME, IFLA_BR_STP_STATE, IFLA_BR_PRIORITY, IFLA_BR_VLAN_FILTERING, IFLA_BR_VLAN_PROTOCOL, IFLA_BR_GROUP_FWD_MASK, IFLA_BR_ROOT_ID, IFLA_BR_BRIDGE_ID, IFLA_BR_ROOT_PORT, IFLA_BR_ROOT_PATH_COST, IFLA_BR_TOPOLOGY_CHANGE, IFLA_BR_TOPOLOGY_CHANGE_DETECTED, IFLA_BR_HELLO_TIMER, IFLA_BR_TCN_TIMER, IFLA_BR_TOPOLOGY_CHANGE_TIMER, IFLA_BR_GC_TIMER, IFLA_BR_GROUP_ADDR, IFLA_BR_FDB_FLUSH, IFLA_BR_MCAST_ROUTER, IFLA_BR_MCAST_SNOOPING, IFLA_BR_MCAST_QUERY_USE_IFADDR, IFLA_BR_MCAST_QUERIER, IFLA_BR_MCAST_HASH_ELASTICITY, IFLA_BR_MCAST_HASH_MAX, IFLA_BR_MCAST_LAST_MEMBER_CNT, IFLA_BR_MCAST_STARTUP_QUERY_CNT, IFLA_BR_MCAST_LAST_MEMBER_INTVL, IFLA_BR_MCAST_MEMBERSHIP_INTVL, IFLA_BR_MCAST_QUERIER_INTVL, IFLA_BR_MCAST_QUERY_INTVL, IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, IFLA_BR_MCAST_STARTUP_QUERY_INTVL, IFLA_BR_NF_CALL_IPTABLES, IFLA_BR_NF_CALL_IP6TABLES, IFLA_BR_NF_CALL_ARPTABLES, IFLA_BR_VLAN_DEFAULT_PVID, IFLA_BR_PAD, IFLA_BR_VLAN_STATS_ENABLED, IFLA_BR_MCAST_STATS_ENABLED, IFLA_BR_MCAST_IGMP_VERSION, IFLA_BR_MCAST_MLD_VERSION, IFLA_BR_VLAN_STATS_PER_PORT, IFLA_BR_MULTI_BOOLOPT, IFLA_BR_MCAST_QUERIER_STATE, IFLA_BR_FDB_N_LEARNED, IFLA_BR_FDB_MAX_LEARNED, __IFLA_BR_MAX, }; struct ifla_bridge_id { __u8 prio[2]; __u8 addr[6]; }; # 813 "/usr/include/linux/if_link.h" 3 4 enum { BRIDGE_MODE_UNSPEC, BRIDGE_MODE_HAIRPIN, }; # 1049 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_BRPORT_UNSPEC, IFLA_BRPORT_STATE, IFLA_BRPORT_PRIORITY, IFLA_BRPORT_COST, IFLA_BRPORT_MODE, IFLA_BRPORT_GUARD, IFLA_BRPORT_PROTECT, IFLA_BRPORT_FAST_LEAVE, IFLA_BRPORT_LEARNING, IFLA_BRPORT_UNICAST_FLOOD, IFLA_BRPORT_PROXYARP, IFLA_BRPORT_LEARNING_SYNC, IFLA_BRPORT_PROXYARP_WIFI, IFLA_BRPORT_ROOT_ID, IFLA_BRPORT_BRIDGE_ID, IFLA_BRPORT_DESIGNATED_PORT, IFLA_BRPORT_DESIGNATED_COST, IFLA_BRPORT_ID, IFLA_BRPORT_NO, IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, IFLA_BRPORT_CONFIG_PENDING, IFLA_BRPORT_MESSAGE_AGE_TIMER, IFLA_BRPORT_FORWARD_DELAY_TIMER, IFLA_BRPORT_HOLD_TIMER, IFLA_BRPORT_FLUSH, IFLA_BRPORT_MULTICAST_ROUTER, IFLA_BRPORT_PAD, IFLA_BRPORT_MCAST_FLOOD, IFLA_BRPORT_MCAST_TO_UCAST, IFLA_BRPORT_VLAN_TUNNEL, IFLA_BRPORT_BCAST_FLOOD, IFLA_BRPORT_GROUP_FWD_MASK, IFLA_BRPORT_NEIGH_SUPPRESS, IFLA_BRPORT_ISOLATED, IFLA_BRPORT_BACKUP_PORT, IFLA_BRPORT_MRP_RING_OPEN, IFLA_BRPORT_MRP_IN_OPEN, IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, IFLA_BRPORT_LOCKED, IFLA_BRPORT_MAB, IFLA_BRPORT_MCAST_N_GROUPS, IFLA_BRPORT_MCAST_MAX_GROUPS, IFLA_BRPORT_NEIGH_VLAN_SUPPRESS, IFLA_BRPORT_BACKUP_NHID, __IFLA_BRPORT_MAX }; struct ifla_cacheinfo { __u32 max_reasm_len; __u32 tstamp; __u32 reachable_time; __u32 retrans_time; }; enum { IFLA_INFO_UNSPEC, IFLA_INFO_KIND, IFLA_INFO_DATA, IFLA_INFO_XSTATS, IFLA_INFO_SLAVE_KIND, IFLA_INFO_SLAVE_DATA, __IFLA_INFO_MAX, }; enum { IFLA_VLAN_UNSPEC, IFLA_VLAN_ID, IFLA_VLAN_FLAGS, IFLA_VLAN_EGRESS_QOS, IFLA_VLAN_INGRESS_QOS, IFLA_VLAN_PROTOCOL, __IFLA_VLAN_MAX, }; struct ifla_vlan_flags { __u32 flags; __u32 mask; }; enum { IFLA_VLAN_QOS_UNSPEC, IFLA_VLAN_QOS_MAPPING, __IFLA_VLAN_QOS_MAX }; struct ifla_vlan_qos_mapping { __u32 from; __u32 to; }; enum { IFLA_MACVLAN_UNSPEC, IFLA_MACVLAN_MODE, IFLA_MACVLAN_FLAGS, IFLA_MACVLAN_MACADDR_MODE, IFLA_MACVLAN_MACADDR, IFLA_MACVLAN_MACADDR_DATA, IFLA_MACVLAN_MACADDR_COUNT, IFLA_MACVLAN_BC_QUEUE_LEN, IFLA_MACVLAN_BC_QUEUE_LEN_USED, IFLA_MACVLAN_BC_CUTOFF, __IFLA_MACVLAN_MAX, }; enum macvlan_mode { MACVLAN_MODE_PRIVATE = 1, MACVLAN_MODE_VEPA = 2, MACVLAN_MODE_BRIDGE = 4, MACVLAN_MODE_PASSTHRU = 8, MACVLAN_MODE_SOURCE = 16, }; enum macvlan_macaddr_mode { MACVLAN_MACADDR_ADD, MACVLAN_MACADDR_DEL, MACVLAN_MACADDR_FLUSH, MACVLAN_MACADDR_SET, }; enum { IFLA_VRF_UNSPEC, IFLA_VRF_TABLE, __IFLA_VRF_MAX }; enum { IFLA_VRF_PORT_UNSPEC, IFLA_VRF_PORT_TABLE, __IFLA_VRF_PORT_MAX }; enum { IFLA_MACSEC_UNSPEC, IFLA_MACSEC_SCI, IFLA_MACSEC_PORT, IFLA_MACSEC_ICV_LEN, IFLA_MACSEC_CIPHER_SUITE, IFLA_MACSEC_WINDOW, IFLA_MACSEC_ENCODING_SA, IFLA_MACSEC_ENCRYPT, IFLA_MACSEC_PROTECT, IFLA_MACSEC_INC_SCI, IFLA_MACSEC_ES, IFLA_MACSEC_SCB, IFLA_MACSEC_REPLAY_PROTECT, IFLA_MACSEC_VALIDATION, IFLA_MACSEC_PAD, IFLA_MACSEC_OFFLOAD, __IFLA_MACSEC_MAX, }; enum { IFLA_XFRM_UNSPEC, IFLA_XFRM_LINK, IFLA_XFRM_IF_ID, IFLA_XFRM_COLLECT_METADATA, __IFLA_XFRM_MAX }; enum macsec_validation_type { MACSEC_VALIDATE_DISABLED = 0, MACSEC_VALIDATE_CHECK = 1, MACSEC_VALIDATE_STRICT = 2, __MACSEC_VALIDATE_END, MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1, }; enum macsec_offload { MACSEC_OFFLOAD_OFF = 0, MACSEC_OFFLOAD_PHY = 1, MACSEC_OFFLOAD_MAC = 2, __MACSEC_OFFLOAD_END, MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, }; enum { IFLA_IPVLAN_UNSPEC, IFLA_IPVLAN_MODE, IFLA_IPVLAN_FLAGS, __IFLA_IPVLAN_MAX }; enum ipvlan_mode { IPVLAN_MODE_L2 = 0, IPVLAN_MODE_L3, IPVLAN_MODE_L3S, IPVLAN_MODE_MAX }; struct tunnel_msg { __u8 family; __u8 flags; __u16 reserved2; __u32 ifindex; }; enum netkit_action { NETKIT_NEXT = -1, NETKIT_PASS = 0, NETKIT_DROP = 2, NETKIT_REDIRECT = 7, }; enum netkit_mode { NETKIT_L2, NETKIT_L3, }; enum { IFLA_NETKIT_UNSPEC, IFLA_NETKIT_PEER_INFO, IFLA_NETKIT_PRIMARY, IFLA_NETKIT_POLICY, IFLA_NETKIT_PEER_POLICY, IFLA_NETKIT_MODE, __IFLA_NETKIT_MAX, }; # 1312 "/usr/include/linux/if_link.h" 3 4 enum { VNIFILTER_ENTRY_STATS_UNSPEC, VNIFILTER_ENTRY_STATS_RX_BYTES, VNIFILTER_ENTRY_STATS_RX_PKTS, VNIFILTER_ENTRY_STATS_RX_DROPS, VNIFILTER_ENTRY_STATS_RX_ERRORS, VNIFILTER_ENTRY_STATS_TX_BYTES, VNIFILTER_ENTRY_STATS_TX_PKTS, VNIFILTER_ENTRY_STATS_TX_DROPS, VNIFILTER_ENTRY_STATS_TX_ERRORS, VNIFILTER_ENTRY_STATS_PAD, __VNIFILTER_ENTRY_STATS_MAX }; enum { VXLAN_VNIFILTER_ENTRY_UNSPEC, VXLAN_VNIFILTER_ENTRY_START, VXLAN_VNIFILTER_ENTRY_END, VXLAN_VNIFILTER_ENTRY_GROUP, VXLAN_VNIFILTER_ENTRY_GROUP6, VXLAN_VNIFILTER_ENTRY_STATS, __VXLAN_VNIFILTER_ENTRY_MAX }; enum { VXLAN_VNIFILTER_UNSPEC, VXLAN_VNIFILTER_ENTRY, __VXLAN_VNIFILTER_MAX }; enum { IFLA_VXLAN_UNSPEC, IFLA_VXLAN_ID, IFLA_VXLAN_GROUP, IFLA_VXLAN_LINK, IFLA_VXLAN_LOCAL, IFLA_VXLAN_TTL, IFLA_VXLAN_TOS, IFLA_VXLAN_LEARNING, IFLA_VXLAN_AGEING, IFLA_VXLAN_LIMIT, IFLA_VXLAN_PORT_RANGE, IFLA_VXLAN_PROXY, IFLA_VXLAN_RSC, IFLA_VXLAN_L2MISS, IFLA_VXLAN_L3MISS, IFLA_VXLAN_PORT, IFLA_VXLAN_GROUP6, IFLA_VXLAN_LOCAL6, IFLA_VXLAN_UDP_CSUM, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, IFLA_VXLAN_REMCSUM_TX, IFLA_VXLAN_REMCSUM_RX, IFLA_VXLAN_GBP, IFLA_VXLAN_REMCSUM_NOPARTIAL, IFLA_VXLAN_COLLECT_METADATA, IFLA_VXLAN_LABEL, IFLA_VXLAN_GPE, IFLA_VXLAN_TTL_INHERIT, IFLA_VXLAN_DF, IFLA_VXLAN_VNIFILTER, IFLA_VXLAN_LOCALBYPASS, IFLA_VXLAN_LABEL_POLICY, __IFLA_VXLAN_MAX }; struct ifla_vxlan_port_range { __be16 low; __be16 high; }; enum ifla_vxlan_df { VXLAN_DF_UNSET = 0, VXLAN_DF_SET, VXLAN_DF_INHERIT, __VXLAN_DF_END, VXLAN_DF_MAX = __VXLAN_DF_END - 1, }; enum ifla_vxlan_label_policy { VXLAN_LABEL_FIXED = 0, VXLAN_LABEL_INHERIT = 1, __VXLAN_LABEL_END, VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1, }; enum { IFLA_GENEVE_UNSPEC, IFLA_GENEVE_ID, IFLA_GENEVE_REMOTE, IFLA_GENEVE_TTL, IFLA_GENEVE_TOS, IFLA_GENEVE_PORT, IFLA_GENEVE_COLLECT_METADATA, IFLA_GENEVE_REMOTE6, IFLA_GENEVE_UDP_CSUM, IFLA_GENEVE_UDP_ZERO_CSUM6_TX, IFLA_GENEVE_UDP_ZERO_CSUM6_RX, IFLA_GENEVE_LABEL, IFLA_GENEVE_TTL_INHERIT, IFLA_GENEVE_DF, IFLA_GENEVE_INNER_PROTO_INHERIT, __IFLA_GENEVE_MAX }; enum ifla_geneve_df { GENEVE_DF_UNSET = 0, GENEVE_DF_SET, GENEVE_DF_INHERIT, __GENEVE_DF_END, GENEVE_DF_MAX = __GENEVE_DF_END - 1, }; enum { IFLA_BAREUDP_UNSPEC, IFLA_BAREUDP_PORT, IFLA_BAREUDP_ETHERTYPE, IFLA_BAREUDP_SRCPORT_MIN, IFLA_BAREUDP_MULTIPROTO_MODE, __IFLA_BAREUDP_MAX }; enum { IFLA_PPP_UNSPEC, IFLA_PPP_DEV_FD, __IFLA_PPP_MAX }; enum ifla_gtp_role { GTP_ROLE_GGSN = 0, GTP_ROLE_SGSN, }; enum { IFLA_GTP_UNSPEC, IFLA_GTP_FD0, IFLA_GTP_FD1, IFLA_GTP_PDP_HASHSIZE, IFLA_GTP_ROLE, IFLA_GTP_CREATE_SOCKETS, IFLA_GTP_RESTART_COUNT, __IFLA_GTP_MAX, }; enum { IFLA_BOND_UNSPEC, IFLA_BOND_MODE, IFLA_BOND_ACTIVE_SLAVE, IFLA_BOND_MIIMON, IFLA_BOND_UPDELAY, IFLA_BOND_DOWNDELAY, IFLA_BOND_USE_CARRIER, IFLA_BOND_ARP_INTERVAL, IFLA_BOND_ARP_IP_TARGET, IFLA_BOND_ARP_VALIDATE, IFLA_BOND_ARP_ALL_TARGETS, IFLA_BOND_PRIMARY, IFLA_BOND_PRIMARY_RESELECT, IFLA_BOND_FAIL_OVER_MAC, IFLA_BOND_XMIT_HASH_POLICY, IFLA_BOND_RESEND_IGMP, IFLA_BOND_NUM_PEER_NOTIF, IFLA_BOND_ALL_SLAVES_ACTIVE, IFLA_BOND_MIN_LINKS, IFLA_BOND_LP_INTERVAL, IFLA_BOND_PACKETS_PER_SLAVE, IFLA_BOND_AD_LACP_RATE, IFLA_BOND_AD_SELECT, IFLA_BOND_AD_INFO, IFLA_BOND_AD_ACTOR_SYS_PRIO, IFLA_BOND_AD_USER_PORT_KEY, IFLA_BOND_AD_ACTOR_SYSTEM, IFLA_BOND_TLB_DYNAMIC_LB, IFLA_BOND_PEER_NOTIF_DELAY, IFLA_BOND_AD_LACP_ACTIVE, IFLA_BOND_MISSED_MAX, IFLA_BOND_NS_IP6_TARGET, __IFLA_BOND_MAX, }; enum { IFLA_BOND_AD_INFO_UNSPEC, IFLA_BOND_AD_INFO_AGGREGATOR, IFLA_BOND_AD_INFO_NUM_PORTS, IFLA_BOND_AD_INFO_ACTOR_KEY, IFLA_BOND_AD_INFO_PARTNER_KEY, IFLA_BOND_AD_INFO_PARTNER_MAC, __IFLA_BOND_AD_INFO_MAX, }; enum { IFLA_BOND_SLAVE_UNSPEC, IFLA_BOND_SLAVE_STATE, IFLA_BOND_SLAVE_MII_STATUS, IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, IFLA_BOND_SLAVE_PERM_HWADDR, IFLA_BOND_SLAVE_QUEUE_ID, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE, IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE, IFLA_BOND_SLAVE_PRIO, __IFLA_BOND_SLAVE_MAX, }; enum { IFLA_VF_INFO_UNSPEC, IFLA_VF_INFO, __IFLA_VF_INFO_MAX, }; enum { IFLA_VF_UNSPEC, IFLA_VF_MAC, IFLA_VF_VLAN, IFLA_VF_TX_RATE, IFLA_VF_SPOOFCHK, IFLA_VF_LINK_STATE, IFLA_VF_RATE, IFLA_VF_RSS_QUERY_EN, IFLA_VF_STATS, IFLA_VF_TRUST, IFLA_VF_IB_NODE_GUID, IFLA_VF_IB_PORT_GUID, IFLA_VF_VLAN_LIST, IFLA_VF_BROADCAST, __IFLA_VF_MAX, }; struct ifla_vf_mac { __u32 vf; __u8 mac[32]; }; struct ifla_vf_broadcast { __u8 broadcast[32]; }; struct ifla_vf_vlan { __u32 vf; __u32 vlan; __u32 qos; }; enum { IFLA_VF_VLAN_INFO_UNSPEC, IFLA_VF_VLAN_INFO, __IFLA_VF_VLAN_INFO_MAX, }; struct ifla_vf_vlan_info { __u32 vf; __u32 vlan; __u32 qos; __be16 vlan_proto; }; struct ifla_vf_tx_rate { __u32 vf; __u32 rate; }; struct ifla_vf_rate { __u32 vf; __u32 min_tx_rate; __u32 max_tx_rate; }; struct ifla_vf_spoofchk { __u32 vf; __u32 setting; }; struct ifla_vf_guid { __u32 vf; __u64 guid; }; enum { IFLA_VF_LINK_STATE_AUTO, IFLA_VF_LINK_STATE_ENABLE, IFLA_VF_LINK_STATE_DISABLE, __IFLA_VF_LINK_STATE_MAX, }; struct ifla_vf_link_state { __u32 vf; __u32 link_state; }; struct ifla_vf_rss_query_en { __u32 vf; __u32 setting; }; enum { IFLA_VF_STATS_RX_PACKETS, IFLA_VF_STATS_TX_PACKETS, IFLA_VF_STATS_RX_BYTES, IFLA_VF_STATS_TX_BYTES, IFLA_VF_STATS_BROADCAST, IFLA_VF_STATS_MULTICAST, IFLA_VF_STATS_PAD, IFLA_VF_STATS_RX_DROPPED, IFLA_VF_STATS_TX_DROPPED, __IFLA_VF_STATS_MAX, }; struct ifla_vf_trust { __u32 vf; __u32 setting; }; # 1675 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_VF_PORT_UNSPEC, IFLA_VF_PORT, __IFLA_VF_PORT_MAX, }; enum { IFLA_PORT_UNSPEC, IFLA_PORT_VF, IFLA_PORT_PROFILE, IFLA_PORT_VSI_TYPE, IFLA_PORT_INSTANCE_UUID, IFLA_PORT_HOST_UUID, IFLA_PORT_REQUEST, IFLA_PORT_RESPONSE, __IFLA_PORT_MAX, }; enum { PORT_REQUEST_PREASSOCIATE = 0, PORT_REQUEST_PREASSOCIATE_RR, PORT_REQUEST_ASSOCIATE, PORT_REQUEST_DISASSOCIATE, }; enum { PORT_VDP_RESPONSE_SUCCESS = 0, PORT_VDP_RESPONSE_INVALID_FORMAT, PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, PORT_VDP_RESPONSE_UNUSED_VTID, PORT_VDP_RESPONSE_VTID_VIOLATION, PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, PORT_VDP_RESPONSE_OUT_OF_SYNC, PORT_PROFILE_RESPONSE_SUCCESS = 0x100, PORT_PROFILE_RESPONSE_INPROGRESS, PORT_PROFILE_RESPONSE_INVALID, PORT_PROFILE_RESPONSE_BADSTATE, PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, PORT_PROFILE_RESPONSE_ERROR, }; struct ifla_port_vsi { __u8 vsi_mgr_id; __u8 vsi_type_id[3]; __u8 vsi_type_version; __u8 pad[3]; }; enum { IFLA_IPOIB_UNSPEC, IFLA_IPOIB_PKEY, IFLA_IPOIB_MODE, IFLA_IPOIB_UMCAST, __IFLA_IPOIB_MAX }; enum { IPOIB_MODE_DATAGRAM = 0, IPOIB_MODE_CONNECTED = 1, }; enum { HSR_PROTOCOL_HSR, HSR_PROTOCOL_PRP, HSR_PROTOCOL_MAX, }; enum { IFLA_HSR_UNSPEC, IFLA_HSR_SLAVE1, IFLA_HSR_SLAVE2, IFLA_HSR_MULTICAST_SPEC, IFLA_HSR_SUPERVISION_ADDR, IFLA_HSR_SEQ_NR, IFLA_HSR_VERSION, IFLA_HSR_PROTOCOL, __IFLA_HSR_MAX, }; struct if_stats_msg { __u8 family; __u8 pad1; __u16 pad2; __u32 ifindex; __u32 filter_mask; }; enum { IFLA_STATS_UNSPEC, IFLA_STATS_LINK_64, IFLA_STATS_LINK_XSTATS, IFLA_STATS_LINK_XSTATS_SLAVE, IFLA_STATS_LINK_OFFLOAD_XSTATS, IFLA_STATS_AF_SPEC, __IFLA_STATS_MAX, }; enum { IFLA_STATS_GETSET_UNSPEC, IFLA_STATS_GET_FILTERS, IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, __IFLA_STATS_GETSET_MAX, }; # 1819 "/usr/include/linux/if_link.h" 3 4 enum { LINK_XSTATS_TYPE_UNSPEC, LINK_XSTATS_TYPE_BRIDGE, LINK_XSTATS_TYPE_BOND, __LINK_XSTATS_TYPE_MAX }; enum { IFLA_OFFLOAD_XSTATS_UNSPEC, IFLA_OFFLOAD_XSTATS_CPU_HIT, IFLA_OFFLOAD_XSTATS_HW_S_INFO, IFLA_OFFLOAD_XSTATS_L3_STATS, __IFLA_OFFLOAD_XSTATS_MAX }; enum { IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC, IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST, IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, }; # 1860 "/usr/include/linux/if_link.h" 3 4 enum { XDP_ATTACHED_NONE = 0, XDP_ATTACHED_DRV, XDP_ATTACHED_SKB, XDP_ATTACHED_HW, XDP_ATTACHED_MULTI, }; enum { IFLA_XDP_UNSPEC, IFLA_XDP_FD, IFLA_XDP_ATTACHED, IFLA_XDP_FLAGS, IFLA_XDP_PROG_ID, IFLA_XDP_DRV_PROG_ID, IFLA_XDP_SKB_PROG_ID, IFLA_XDP_HW_PROG_ID, IFLA_XDP_EXPECTED_FD, __IFLA_XDP_MAX, }; enum { IFLA_EVENT_NONE, IFLA_EVENT_REBOOT, IFLA_EVENT_FEATURES, IFLA_EVENT_BONDING_FAILOVER, IFLA_EVENT_NOTIFY_PEERS, IFLA_EVENT_IGMP_RESEND, IFLA_EVENT_BONDING_OPTIONS, }; enum { IFLA_TUN_UNSPEC, IFLA_TUN_OWNER, IFLA_TUN_GROUP, IFLA_TUN_TYPE, IFLA_TUN_PI, IFLA_TUN_VNET_HDR, IFLA_TUN_PERSIST, IFLA_TUN_MULTI_QUEUE, IFLA_TUN_NUM_QUEUES, IFLA_TUN_NUM_DISABLED_QUEUES, __IFLA_TUN_MAX, }; # 1920 "/usr/include/linux/if_link.h" 3 4 enum { IFLA_RMNET_UNSPEC, IFLA_RMNET_MUX_ID, IFLA_RMNET_FLAGS, __IFLA_RMNET_MAX, }; struct ifla_rmnet_flags { __u32 flags; __u32 mask; }; enum { IFLA_MCTP_UNSPEC, IFLA_MCTP_NET, __IFLA_MCTP_MAX, }; enum { IFLA_DSA_UNSPEC, IFLA_DSA_CONDUIT, IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, __IFLA_DSA_MAX, }; # 8 "/usr/include/linux/rtnetlink.h" 2 3 4 # 1 "/usr/include/linux/if_addr.h" 1 3 4 struct ifaddrmsg { __u8 ifa_family; __u8 ifa_prefixlen; __u8 ifa_flags; __u8 ifa_scope; __u32 ifa_index; }; # 26 "/usr/include/linux/if_addr.h" 3 4 enum { IFA_UNSPEC, IFA_ADDRESS, IFA_LOCAL, IFA_LABEL, IFA_BROADCAST, IFA_ANYCAST, IFA_CACHEINFO, IFA_MULTICAST, IFA_FLAGS, IFA_RT_PRIORITY, IFA_TARGET_NETNSID, IFA_PROTO, __IFA_MAX, }; # 60 "/usr/include/linux/if_addr.h" 3 4 struct ifa_cacheinfo { __u32 ifa_prefered; __u32 ifa_valid; __u32 cstamp; __u32 tstamp; }; # 9 "/usr/include/linux/rtnetlink.h" 2 3 4 # 1 "/usr/include/linux/neighbour.h" 1 3 4 struct ndmsg { __u8 ndm_family; __u8 ndm_pad1; __u16 ndm_pad2; __s32 ndm_ifindex; __u16 ndm_state; __u8 ndm_flags; __u8 ndm_type; }; enum { NDA_UNSPEC, NDA_DST, NDA_LLADDR, NDA_CACHEINFO, NDA_PROBES, NDA_VLAN, NDA_PORT, NDA_VNI, NDA_IFINDEX, NDA_MASTER, NDA_LINK_NETNSID, NDA_SRC_VNI, NDA_PROTOCOL, NDA_NH_ID, NDA_FDB_EXT_ATTRS, NDA_FLAGS_EXT, NDA_NDM_STATE_MASK, NDA_NDM_FLAGS_MASK, __NDA_MAX }; # 97 "/usr/include/linux/neighbour.h" 3 4 struct nda_cacheinfo { __u32 ndm_confirmed; __u32 ndm_used; __u32 ndm_updated; __u32 ndm_refcnt; }; # 129 "/usr/include/linux/neighbour.h" 3 4 struct ndt_stats { __u64 ndts_allocs; __u64 ndts_destroys; __u64 ndts_hash_grows; __u64 ndts_res_failed; __u64 ndts_lookups; __u64 ndts_hits; __u64 ndts_rcv_probes_mcast; __u64 ndts_rcv_probes_ucast; __u64 ndts_periodic_gc_runs; __u64 ndts_forced_gc_runs; __u64 ndts_table_fulls; }; enum { NDTPA_UNSPEC, NDTPA_IFINDEX, NDTPA_REFCNT, NDTPA_REACHABLE_TIME, NDTPA_BASE_REACHABLE_TIME, NDTPA_RETRANS_TIME, NDTPA_GC_STALETIME, NDTPA_DELAY_PROBE_TIME, NDTPA_QUEUE_LEN, NDTPA_APP_PROBES, NDTPA_UCAST_PROBES, NDTPA_MCAST_PROBES, NDTPA_ANYCAST_DELAY, NDTPA_PROXY_DELAY, NDTPA_PROXY_QLEN, NDTPA_LOCKTIME, NDTPA_QUEUE_LENBYTES, NDTPA_MCAST_REPROBES, NDTPA_PAD, NDTPA_INTERVAL_PROBE_TIME_MS, __NDTPA_MAX }; struct ndtmsg { __u8 ndtm_family; __u8 ndtm_pad1; __u16 ndtm_pad2; }; struct ndt_config { __u16 ndtc_key_len; __u16 ndtc_entry_size; __u32 ndtc_entries; __u32 ndtc_last_flush; __u32 ndtc_last_rand; __u32 ndtc_hash_rnd; __u32 ndtc_hash_mask; __u32 ndtc_hash_chain_gc; __u32 ndtc_proxy_qlen; }; enum { NDTA_UNSPEC, NDTA_NAME, NDTA_THRESH1, NDTA_THRESH2, NDTA_THRESH3, NDTA_CONFIG, NDTA_PARMS, NDTA_STATS, NDTA_GC_INTERVAL, NDTA_PAD, __NDTA_MAX }; enum { FDB_NOTIFY_BIT = (1 << 0), FDB_NOTIFY_INACTIVE_BIT = (1 << 1) }; enum { NFEA_UNSPEC, NFEA_ACTIVITY_NOTIFY, NFEA_DONT_REFRESH, __NFEA_MAX }; # 10 "/usr/include/linux/rtnetlink.h" 2 3 4 # 24 "/usr/include/linux/rtnetlink.h" 3 4 enum { RTM_BASE = 16, RTM_NEWLINK = 16, RTM_DELLINK, RTM_GETLINK, RTM_SETLINK, RTM_NEWADDR = 20, RTM_DELADDR, RTM_GETADDR, RTM_NEWROUTE = 24, RTM_DELROUTE, RTM_GETROUTE, RTM_NEWNEIGH = 28, RTM_DELNEIGH, RTM_GETNEIGH, RTM_NEWRULE = 32, RTM_DELRULE, RTM_GETRULE, RTM_NEWQDISC = 36, RTM_DELQDISC, RTM_GETQDISC, RTM_NEWTCLASS = 40, RTM_DELTCLASS, RTM_GETTCLASS, RTM_NEWTFILTER = 44, RTM_DELTFILTER, RTM_GETTFILTER, RTM_NEWACTION = 48, RTM_DELACTION, RTM_GETACTION, RTM_NEWPREFIX = 52, RTM_GETMULTICAST = 58, RTM_GETANYCAST = 62, RTM_NEWNEIGHTBL = 64, RTM_GETNEIGHTBL = 66, RTM_SETNEIGHTBL, RTM_NEWNDUSEROPT = 68, RTM_NEWADDRLABEL = 72, RTM_DELADDRLABEL, RTM_GETADDRLABEL, RTM_GETDCB = 78, RTM_SETDCB, RTM_NEWNETCONF = 80, RTM_DELNETCONF, RTM_GETNETCONF = 82, RTM_NEWMDB = 84, RTM_DELMDB = 85, RTM_GETMDB = 86, RTM_NEWNSID = 88, RTM_DELNSID = 89, RTM_GETNSID = 90, RTM_NEWSTATS = 92, RTM_GETSTATS = 94, RTM_SETSTATS, RTM_NEWCACHEREPORT = 96, RTM_NEWCHAIN = 100, RTM_DELCHAIN, RTM_GETCHAIN, RTM_NEWNEXTHOP = 104, RTM_DELNEXTHOP, RTM_GETNEXTHOP, RTM_NEWLINKPROP = 108, RTM_DELLINKPROP, RTM_GETLINKPROP, RTM_NEWVLAN = 112, RTM_DELVLAN, RTM_GETVLAN, RTM_NEWNEXTHOPBUCKET = 116, RTM_DELNEXTHOPBUCKET, RTM_GETNEXTHOPBUCKET, RTM_NEWTUNNEL = 120, RTM_DELTUNNEL, RTM_GETTUNNEL, __RTM_MAX, }; # 211 "/usr/include/linux/rtnetlink.h" 3 4 struct rtattr { unsigned short rta_len; unsigned short rta_type; }; # 237 "/usr/include/linux/rtnetlink.h" 3 4 struct rtmsg { unsigned char rtm_family; unsigned char rtm_dst_len; unsigned char rtm_src_len; unsigned char rtm_tos; unsigned char rtm_table; unsigned char rtm_protocol; unsigned char rtm_scope; unsigned char rtm_type; unsigned rtm_flags; }; enum { RTN_UNSPEC, RTN_UNICAST, RTN_LOCAL, RTN_BROADCAST, RTN_ANYCAST, RTN_MULTICAST, RTN_BLACKHOLE, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_THROW, RTN_NAT, RTN_XRESOLVE, __RTN_MAX }; # 320 "/usr/include/linux/rtnetlink.h" 3 4 enum rt_scope_t { RT_SCOPE_UNIVERSE=0, RT_SCOPE_SITE=200, RT_SCOPE_LINK=253, RT_SCOPE_HOST=254, RT_SCOPE_NOWHERE=255 }; # 347 "/usr/include/linux/rtnetlink.h" 3 4 enum rt_class_t { RT_TABLE_UNSPEC=0, RT_TABLE_COMPAT=252, RT_TABLE_DEFAULT=253, RT_TABLE_MAIN=254, RT_TABLE_LOCAL=255, RT_TABLE_MAX=0xFFFFFFFF }; enum rtattr_type_t { RTA_UNSPEC, RTA_DST, RTA_SRC, RTA_IIF, RTA_OIF, RTA_GATEWAY, RTA_PRIORITY, RTA_PREFSRC, RTA_METRICS, RTA_MULTIPATH, RTA_PROTOINFO, RTA_FLOW, RTA_CACHEINFO, RTA_SESSION, RTA_MP_ALGO, RTA_TABLE, RTA_MARK, RTA_MFC_STATS, RTA_VIA, RTA_NEWDST, RTA_PREF, RTA_ENCAP_TYPE, RTA_ENCAP, RTA_EXPIRES, RTA_PAD, RTA_UID, RTA_TTL_PROPAGATE, RTA_IP_PROTO, RTA_SPORT, RTA_DPORT, RTA_NH_ID, __RTA_MAX }; # 409 "/usr/include/linux/rtnetlink.h" 3 4 struct rtnexthop { unsigned short rtnh_len; unsigned char rtnh_flags; unsigned char rtnh_hops; int rtnh_ifindex; }; # 441 "/usr/include/linux/rtnetlink.h" 3 4 struct rtvia { __kernel_sa_family_t rtvia_family; __u8 rtvia_addr[]; }; struct rta_cacheinfo { __u32 rta_clntref; __u32 rta_lastuse; __s32 rta_expires; __u32 rta_error; __u32 rta_used; __u32 rta_id; __u32 rta_ts; __u32 rta_tsage; }; enum { RTAX_UNSPEC, RTAX_LOCK, RTAX_MTU, RTAX_WINDOW, RTAX_RTT, RTAX_RTTVAR, RTAX_SSTHRESH, RTAX_CWND, RTAX_ADVMSS, RTAX_REORDERING, RTAX_HOPLIMIT, RTAX_INITCWND, RTAX_FEATURES, RTAX_RTO_MIN, RTAX_INITRWND, RTAX_QUICKACK, RTAX_CC_ALGO, RTAX_FASTOPEN_NO_COOKIE, __RTAX_MAX }; # 517 "/usr/include/linux/rtnetlink.h" 3 4 struct rta_session { __u8 proto; __u8 pad1; __u16 pad2; union { struct { __u16 sport; __u16 dport; } ports; struct { __u8 type; __u8 code; __u16 ident; } icmpt; __u32 spi; } u; }; struct rta_mfc_stats { __u64 mfcs_packets; __u64 mfcs_bytes; __u64 mfcs_wrong_if; }; struct rtgenmsg { unsigned char rtgen_family; }; # 561 "/usr/include/linux/rtnetlink.h" 3 4 struct ifinfomsg { unsigned char ifi_family; unsigned char __ifi_pad; unsigned short ifi_type; int ifi_index; unsigned ifi_flags; unsigned ifi_change; }; struct prefixmsg { unsigned char prefix_family; unsigned char prefix_pad1; unsigned short prefix_pad2; int prefix_ifindex; unsigned char prefix_type; unsigned char prefix_len; unsigned char prefix_flags; unsigned char prefix_pad3; }; enum { PREFIX_UNSPEC, PREFIX_ADDRESS, PREFIX_CACHEINFO, __PREFIX_MAX }; struct prefix_cacheinfo { __u32 preferred_time; __u32 valid_time; }; struct tcmsg { unsigned char tcm_family; unsigned char tcm__pad1; unsigned short tcm__pad2; int tcm_ifindex; __u32 tcm_handle; __u32 tcm_parent; __u32 tcm_info; }; enum { TCA_UNSPEC, TCA_KIND, TCA_OPTIONS, TCA_STATS, TCA_XSTATS, TCA_RATE, TCA_FCNT, TCA_STATS2, TCA_STAB, TCA_PAD, TCA_DUMP_INVISIBLE, TCA_CHAIN, TCA_HW_OFFLOAD, TCA_INGRESS_BLOCK, TCA_EGRESS_BLOCK, TCA_DUMP_FLAGS, TCA_EXT_WARN_MSG, __TCA_MAX }; # 660 "/usr/include/linux/rtnetlink.h" 3 4 struct nduseroptmsg { unsigned char nduseropt_family; unsigned char nduseropt_pad1; unsigned short nduseropt_opts_len; int nduseropt_ifindex; __u8 nduseropt_icmp_type; __u8 nduseropt_icmp_code; unsigned short nduseropt_pad2; unsigned int nduseropt_pad3; }; enum { NDUSEROPT_UNSPEC, NDUSEROPT_SRCADDR, __NDUSEROPT_MAX }; # 702 "/usr/include/linux/rtnetlink.h" 3 4 enum rtnetlink_groups { RTNLGRP_NONE, RTNLGRP_LINK, RTNLGRP_NOTIFY, RTNLGRP_NEIGH, RTNLGRP_TC, RTNLGRP_IPV4_IFADDR, RTNLGRP_IPV4_MROUTE, RTNLGRP_IPV4_ROUTE, RTNLGRP_IPV4_RULE, RTNLGRP_IPV6_IFADDR, RTNLGRP_IPV6_MROUTE, RTNLGRP_IPV6_ROUTE, RTNLGRP_IPV6_IFINFO, RTNLGRP_DECnet_IFADDR, RTNLGRP_NOP2, RTNLGRP_DECnet_ROUTE, RTNLGRP_DECnet_RULE, RTNLGRP_NOP4, RTNLGRP_IPV6_PREFIX, RTNLGRP_IPV6_RULE, RTNLGRP_ND_USEROPT, RTNLGRP_PHONET_IFADDR, RTNLGRP_PHONET_ROUTE, RTNLGRP_DCB, RTNLGRP_IPV4_NETCONF, RTNLGRP_IPV6_NETCONF, RTNLGRP_MDB, RTNLGRP_MPLS_ROUTE, RTNLGRP_NSID, RTNLGRP_MPLS_NETCONF, RTNLGRP_IPV4_MROUTE_R, RTNLGRP_IPV6_MROUTE_R, RTNLGRP_NEXTHOP, RTNLGRP_BRVLAN, RTNLGRP_MCTP_IFADDR, RTNLGRP_TUNNEL, RTNLGRP_STATS, __RTNLGRP_MAX }; struct tcamsg { unsigned char tca_family; unsigned char tca__pad1; unsigned short tca__pad2; }; enum { TCA_ROOT_UNSPEC, TCA_ROOT_TAB, TCA_ROOT_FLAGS, TCA_ROOT_COUNT, TCA_ROOT_TIME_DELTA, TCA_ROOT_EXT_WARN_MSG, __TCA_ROOT_MAX, }; # 5 "criu/net.c" 2 # 1 "/usr/include/linux/netfilter/nfnetlink.h" 1 3 4 # 1 "/usr/include/linux/netfilter/nfnetlink_compat.h" 1 3 4 # 24 "/usr/include/linux/netfilter/nfnetlink_compat.h" 3 4 struct nfattr { __u16 nfa_len; __u16 nfa_type; }; # 6 "/usr/include/linux/netfilter/nfnetlink.h" 2 3 4 enum nfnetlink_groups { NFNLGRP_NONE, NFNLGRP_CONNTRACK_NEW, NFNLGRP_CONNTRACK_UPDATE, NFNLGRP_CONNTRACK_DESTROY, NFNLGRP_CONNTRACK_EXP_NEW, NFNLGRP_CONNTRACK_EXP_UPDATE, NFNLGRP_CONNTRACK_EXP_DESTROY, NFNLGRP_NFTABLES, NFNLGRP_ACCT_QUOTA, NFNLGRP_NFTRACE, __NFNLGRP_MAX, }; struct nfgenmsg { __u8 nfgen_family; __u8 version; __be16 res_id; }; # 75 "/usr/include/linux/netfilter/nfnetlink.h" 3 4 enum nfnl_batch_attributes { NFNL_BATCH_UNSPEC, NFNL_BATCH_GENID, __NFNL_BATCH_MAX }; # 6 "criu/net.c" 2 # 1 "/usr/include/linux/netfilter/nfnetlink_conntrack.h" 1 3 4 enum cntl_msg_types { IPCTNL_MSG_CT_NEW, IPCTNL_MSG_CT_GET, IPCTNL_MSG_CT_DELETE, IPCTNL_MSG_CT_GET_CTRZERO, IPCTNL_MSG_CT_GET_STATS_CPU, IPCTNL_MSG_CT_GET_STATS, IPCTNL_MSG_CT_GET_DYING, IPCTNL_MSG_CT_GET_UNCONFIRMED, IPCTNL_MSG_MAX }; enum ctnl_exp_msg_types { IPCTNL_MSG_EXP_NEW, IPCTNL_MSG_EXP_GET, IPCTNL_MSG_EXP_DELETE, IPCTNL_MSG_EXP_GET_STATS_CPU, IPCTNL_MSG_EXP_MAX }; enum ctattr_type { CTA_UNSPEC, CTA_TUPLE_ORIG, CTA_TUPLE_REPLY, CTA_STATUS, CTA_PROTOINFO, CTA_HELP, CTA_NAT_SRC, CTA_TIMEOUT, CTA_MARK, CTA_COUNTERS_ORIG, CTA_COUNTERS_REPLY, CTA_USE, CTA_ID, CTA_NAT_DST, CTA_TUPLE_MASTER, CTA_SEQ_ADJ_ORIG, CTA_NAT_SEQ_ADJ_ORIG = CTA_SEQ_ADJ_ORIG, CTA_SEQ_ADJ_REPLY, CTA_NAT_SEQ_ADJ_REPLY = CTA_SEQ_ADJ_REPLY, CTA_SECMARK, CTA_ZONE, CTA_SECCTX, CTA_TIMESTAMP, CTA_MARK_MASK, CTA_LABELS, CTA_LABELS_MASK, CTA_SYNPROXY, CTA_FILTER, CTA_STATUS_MASK, __CTA_MAX }; enum ctattr_tuple { CTA_TUPLE_UNSPEC, CTA_TUPLE_IP, CTA_TUPLE_PROTO, CTA_TUPLE_ZONE, __CTA_TUPLE_MAX }; enum ctattr_ip { CTA_IP_UNSPEC, CTA_IP_V4_SRC, CTA_IP_V4_DST, CTA_IP_V6_SRC, CTA_IP_V6_DST, __CTA_IP_MAX }; enum ctattr_l4proto { CTA_PROTO_UNSPEC, CTA_PROTO_NUM, CTA_PROTO_SRC_PORT, CTA_PROTO_DST_PORT, CTA_PROTO_ICMP_ID, CTA_PROTO_ICMP_TYPE, CTA_PROTO_ICMP_CODE, CTA_PROTO_ICMPV6_ID, CTA_PROTO_ICMPV6_TYPE, CTA_PROTO_ICMPV6_CODE, __CTA_PROTO_MAX }; enum ctattr_protoinfo { CTA_PROTOINFO_UNSPEC, CTA_PROTOINFO_TCP, CTA_PROTOINFO_DCCP, CTA_PROTOINFO_SCTP, __CTA_PROTOINFO_MAX }; enum ctattr_protoinfo_tcp { CTA_PROTOINFO_TCP_UNSPEC, CTA_PROTOINFO_TCP_STATE, CTA_PROTOINFO_TCP_WSCALE_ORIGINAL, CTA_PROTOINFO_TCP_WSCALE_REPLY, CTA_PROTOINFO_TCP_FLAGS_ORIGINAL, CTA_PROTOINFO_TCP_FLAGS_REPLY, __CTA_PROTOINFO_TCP_MAX }; enum ctattr_protoinfo_dccp { CTA_PROTOINFO_DCCP_UNSPEC, CTA_PROTOINFO_DCCP_STATE, CTA_PROTOINFO_DCCP_ROLE, CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, CTA_PROTOINFO_DCCP_PAD, __CTA_PROTOINFO_DCCP_MAX, }; enum ctattr_protoinfo_sctp { CTA_PROTOINFO_SCTP_UNSPEC, CTA_PROTOINFO_SCTP_STATE, CTA_PROTOINFO_SCTP_VTAG_ORIGINAL, CTA_PROTOINFO_SCTP_VTAG_REPLY, __CTA_PROTOINFO_SCTP_MAX }; enum ctattr_counters { CTA_COUNTERS_UNSPEC, CTA_COUNTERS_PACKETS, CTA_COUNTERS_BYTES, CTA_COUNTERS32_PACKETS, CTA_COUNTERS32_BYTES, CTA_COUNTERS_PAD, __CTA_COUNTERS_MAX }; enum ctattr_tstamp { CTA_TIMESTAMP_UNSPEC, CTA_TIMESTAMP_START, CTA_TIMESTAMP_STOP, CTA_TIMESTAMP_PAD, __CTA_TIMESTAMP_MAX }; enum ctattr_nat { CTA_NAT_UNSPEC, CTA_NAT_V4_MINIP, CTA_NAT_V4_MAXIP, CTA_NAT_PROTO, CTA_NAT_V6_MINIP, CTA_NAT_V6_MAXIP, __CTA_NAT_MAX }; enum ctattr_protonat { CTA_PROTONAT_UNSPEC, CTA_PROTONAT_PORT_MIN, CTA_PROTONAT_PORT_MAX, __CTA_PROTONAT_MAX }; enum ctattr_seqadj { CTA_SEQADJ_UNSPEC, CTA_SEQADJ_CORRECTION_POS, CTA_SEQADJ_OFFSET_BEFORE, CTA_SEQADJ_OFFSET_AFTER, __CTA_SEQADJ_MAX }; enum ctattr_natseq { CTA_NAT_SEQ_UNSPEC, CTA_NAT_SEQ_CORRECTION_POS, CTA_NAT_SEQ_OFFSET_BEFORE, CTA_NAT_SEQ_OFFSET_AFTER, __CTA_NAT_SEQ_MAX }; enum ctattr_synproxy { CTA_SYNPROXY_UNSPEC, CTA_SYNPROXY_ISN, CTA_SYNPROXY_ITS, CTA_SYNPROXY_TSOFF, __CTA_SYNPROXY_MAX, }; enum ctattr_expect { CTA_EXPECT_UNSPEC, CTA_EXPECT_MASTER, CTA_EXPECT_TUPLE, CTA_EXPECT_MASK, CTA_EXPECT_TIMEOUT, CTA_EXPECT_ID, CTA_EXPECT_HELP_NAME, CTA_EXPECT_ZONE, CTA_EXPECT_FLAGS, CTA_EXPECT_CLASS, CTA_EXPECT_NAT, CTA_EXPECT_FN, __CTA_EXPECT_MAX }; enum ctattr_expect_nat { CTA_EXPECT_NAT_UNSPEC, CTA_EXPECT_NAT_DIR, CTA_EXPECT_NAT_TUPLE, __CTA_EXPECT_NAT_MAX }; enum ctattr_help { CTA_HELP_UNSPEC, CTA_HELP_NAME, CTA_HELP_INFO, __CTA_HELP_MAX }; enum ctattr_secctx { CTA_SECCTX_UNSPEC, CTA_SECCTX_NAME, __CTA_SECCTX_MAX }; enum ctattr_stats_cpu { CTA_STATS_UNSPEC, CTA_STATS_SEARCHED, CTA_STATS_FOUND, CTA_STATS_NEW, CTA_STATS_INVALID, CTA_STATS_IGNORE, CTA_STATS_DELETE, CTA_STATS_DELETE_LIST, CTA_STATS_INSERT, CTA_STATS_INSERT_FAILED, CTA_STATS_DROP, CTA_STATS_EARLY_DROP, CTA_STATS_ERROR, CTA_STATS_SEARCH_RESTART, CTA_STATS_CLASH_RESOLVE, CTA_STATS_CHAIN_TOOLONG, __CTA_STATS_MAX, }; enum ctattr_stats_global { CTA_STATS_GLOBAL_UNSPEC, CTA_STATS_GLOBAL_ENTRIES, CTA_STATS_GLOBAL_MAX_ENTRIES, __CTA_STATS_GLOBAL_MAX, }; enum ctattr_expect_stats { CTA_STATS_EXP_UNSPEC, CTA_STATS_EXP_NEW, CTA_STATS_EXP_CREATE, CTA_STATS_EXP_DELETE, __CTA_STATS_EXP_MAX, }; enum ctattr_filter { CTA_FILTER_UNSPEC, CTA_FILTER_ORIG_FLAGS, CTA_FILTER_REPLY_FLAGS, __CTA_FILTER_MAX }; # 7 "criu/net.c" 2 # 1 "/usr/include/linux/netfilter/nf_conntrack_tcp.h" 1 3 4 # 9 "/usr/include/linux/netfilter/nf_conntrack_tcp.h" 3 4 enum tcp_conntrack { TCP_CONNTRACK_NONE, TCP_CONNTRACK_SYN_SENT, TCP_CONNTRACK_SYN_RECV, TCP_CONNTRACK_ESTABLISHED, TCP_CONNTRACK_FIN_WAIT, TCP_CONNTRACK_CLOSE_WAIT, TCP_CONNTRACK_LAST_ACK, TCP_CONNTRACK_TIME_WAIT, TCP_CONNTRACK_CLOSE, TCP_CONNTRACK_LISTEN, TCP_CONNTRACK_MAX, TCP_CONNTRACK_IGNORE, TCP_CONNTRACK_RETRANS, TCP_CONNTRACK_UNACK, TCP_CONNTRACK_TIMEOUT_MAX }; # 52 "/usr/include/linux/netfilter/nf_conntrack_tcp.h" 3 4 struct nf_ct_tcp_flags { __u8 flags; __u8 mask; }; # 8 "criu/net.c" 2 # 1 "/usr/include/string.h" 1 3 4 # 26 "/usr/include/string.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/string.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 # 43 "/usr/include/string.h" 3 4 extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, const void *__src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 80 "/usr/include/string.h" 3 4 extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 107 "/usr/include/string.h" 3 4 extern void *memchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 120 "/usr/include/string.h" 3 4 extern void *rawmemchr (const void *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 133 "/usr/include/string.h" 3 4 extern void *memrchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__read_only__, 1, 3))); extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3))); # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 3 4 struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; }; typedef struct __locale_struct *__locale_t; # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4 typedef __locale_t locale_t; # 173 "/usr/include/string.h" 2 3 4 extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__access__ (__write_only__, 1, 3))); extern char *strdup (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (const char *__string, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 246 "/usr/include/string.h" 3 4 extern char *strchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 273 "/usr/include/string.h" 3 4 extern char *strrchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 286 "/usr/include/string.h" 3 4 extern char *strchrnul (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (const char *__s, const char *__reject) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 323 "/usr/include/string.h" 3 4 extern char *strpbrk (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 350 "/usr/include/string.h" 3 4 extern char *strstr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 380 "/usr/include/string.h" 3 4 extern char *strcasestr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__access__ (__read_only__, 1, 2))) __attribute__ ((__access__ (__read_only__, 3, 4))); extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (const char *__string, size_t __maxlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); # 444 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3))); extern const char *strerrordesc_np (int __err) __attribute__ ((__nothrow__ , __leaf__)); extern const char *strerrorname_np (int __err) __attribute__ ((__nothrow__ , __leaf__)); extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/strings.h" 1 3 4 # 23 "/usr/include/strings.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 24 "/usr/include/strings.h" 2 3 4 extern int bcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void bcopy (const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 68 "/usr/include/strings.h" 3 4 extern char *index (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 96 "/usr/include/strings.h" 3 4 extern char *rindex (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int strcasecmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); # 1 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len) { (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) { (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_dynamic_object_size (__dest, 0)); } # 145 "/usr/include/strings.h" 2 3 4 # 463 "/usr/include/string.h" 2 3 4 extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1))); extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern const char *sigabbrev_np (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern const char *sigdescr_np (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 3))); extern size_t strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__read_write__, 1, 3))); extern int strverscmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__read_write__, 1, 2))); # 540 "/usr/include/string.h" 3 4 extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len) { return __builtin___memmove_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 0)); } # 56 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) { return __builtin___memset_chk (__dest, __ch, __len, __builtin_dynamic_object_size (__dest, 0)); } void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void __attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len) { __explicit_bzero_chk (__dest, __len, __builtin_dynamic_object_size (__dest, 0)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcpy_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src) { return __builtin___stpcpy_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) { return __builtin___stpncpy_chk (__dest, __src, __n, __builtin_dynamic_object_size (__dest, 1)); } # 127 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcat_chk (__dest, __src, __builtin_dynamic_object_size (__dest, 1)); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncat_chk (__dest, __src, __len, __builtin_dynamic_object_size (__dest, 1)); } extern size_t __strlcpy_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); extern size_t __strlcpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "strlcpy") __attribute__ ((__nothrow__ , __leaf__)) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n) { if (__builtin_dynamic_object_size (__dest, 1) != (size_t) -1 && (!__builtin_constant_p (__n > __builtin_dynamic_object_size (__dest, 1)) || __n > __builtin_dynamic_object_size (__dest, 1))) return __strlcpy_chk (__dest, __src, __n, __builtin_dynamic_object_size (__dest, 1)); return __strlcpy_alias (__dest, __src, __n); } extern size_t __strlcat_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); extern size_t __strlcat_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "strlcat") __attribute__ ((__nothrow__ , __leaf__)) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n) { if (__builtin_dynamic_object_size (__dest, 1) != (size_t) -1 && (!__builtin_constant_p (__n > __builtin_dynamic_object_size (__dest, 1)) || __n > __builtin_dynamic_object_size (__dest, 1))) return __strlcat_chk (__dest, __src, __n, __builtin_dynamic_object_size (__dest, 1)); return __strlcat_alias (__dest, __src, __n); } # 549 "/usr/include/string.h" 2 3 4 # 9 "criu/net.c" 2 # 1 "/usr/include/net/if_arp.h" 1 3 4 # 26 "/usr/include/net/if_arp.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 1 3 4 # 9 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 26 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 30 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4 typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; # 38 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-least.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/stdint-least.h" 3 4 typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; # 42 "/usr/include/stdint.h" 2 3 4 typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; # 60 "/usr/include/stdint.h" 3 4 typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; # 79 "/usr/include/stdint.h" 3 4 typedef unsigned long int uintptr_t; # 90 "/usr/include/stdint.h" 3 4 typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # 10 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h" 2 3 4 # 27 "/usr/include/net/if_arp.h" 2 3 4 # 52 "/usr/include/net/if_arp.h" 3 4 struct arphdr { unsigned short int ar_hrd; unsigned short int ar_pro; unsigned char ar_hln; unsigned char ar_pln; unsigned short int ar_op; # 67 "/usr/include/net/if_arp.h" 3 4 }; # 139 "/usr/include/net/if_arp.h" 3 4 struct arpreq { struct sockaddr arp_pa; struct sockaddr arp_ha; int arp_flags; struct sockaddr arp_netmask; char arp_dev[16]; }; struct arpreq_old { struct sockaddr arp_pa; struct sockaddr arp_ha; int arp_flags; struct sockaddr arp_netmask; }; # 172 "/usr/include/net/if_arp.h" 3 4 struct arpd_request { unsigned short int req; uint32_t ip; unsigned long int dev; unsigned long int stamp; unsigned long int updated; unsigned char ha[7]; }; # 10 "criu/net.c" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 # 36 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 # 1 "/usr/include/signal.h" 1 3 4 # 27 "/usr/include/signal.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 1 3 4 # 76 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/signum-arch.h" 1 3 4 # 77 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 2 3 4 # 31 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 1 3 4 typedef __sig_atomic_t sig_atomic_t; # 33 "/usr/include/signal.h" 2 3 4 # 57 "/usr/include/signal.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 3 4 union sigval { int sival_int; void *sival_ptr; }; typedef union sigval __sigval_t; # 7 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 16 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h" 1 3 4 # 17 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4 typedef struct { int si_signo; int si_errno; int si_code; int __pad0; union { int _pad[((128 / sizeof (int)) - 4)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; __sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; __sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; short int si_addr_lsb; union { struct { void *_lower; void *_upper; } _addr_bnd; __uint32_t _pkey; } _bounds; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; struct { void *_call_addr; int _syscall; unsigned int _arch; } _sigsys; } _sifields; } siginfo_t ; # 58 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4 enum { SI_ASYNCNL = -60, SI_DETHREAD = -7, SI_TKILL, SI_SIGIO, SI_ASYNCIO, SI_MESGQ, SI_TIMER, SI_QUEUE, SI_USER, SI_KERNEL = 0x80 # 66 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4 }; enum { ILL_ILLOPC = 1, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG, ILL_COPROC, ILL_BADSTK, ILL_BADIADDR }; enum { FPE_INTDIV = 1, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES, FPE_FLTINV, FPE_FLTSUB, FPE_FLTUNK = 14, FPE_CONDTRAP }; enum { SEGV_MAPERR = 1, SEGV_ACCERR, SEGV_BNDERR, SEGV_PKUERR, SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR, SEGV_MTEAERR, SEGV_MTESERR, SEGV_CPERR }; enum { BUS_ADRALN = 1, BUS_ADRERR, BUS_OBJERR, BUS_MCEERR_AR, BUS_MCEERR_AO }; enum { TRAP_BRKPT = 1, TRAP_TRACE, TRAP_BRANCH, TRAP_HWBKPT, TRAP_UNK }; enum { CLD_EXITED = 1, CLD_KILLED, CLD_DUMPED, CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED }; enum { POLL_IN = 1, POLL_OUT, POLL_MSG, POLL_ERR, POLL_PRI, POLL_HUP }; # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts-arch.h" 1 3 4 # 216 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 2 3 4 # 59 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 1 3 4 # 16 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 3 4 typedef __sigval_t sigval_t; # 63 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 3 4 typedef struct sigevent { __sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 4)]; __pid_t _tid; struct { void (*_function) (__sigval_t); pthread_attr_t *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; # 67 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 3 4 enum { SIGEV_SIGNAL = 0, SIGEV_NONE, SIGEV_THREAD, SIGEV_THREAD_ID = 4 }; # 68 "/usr/include/signal.h" 2 3 4 typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); # 112 "/usr/include/signal.h" 3 4 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); extern void psignal (int __sig, const char *__s); extern void psiginfo (const siginfo_t *__pinfo, const char *__s); # 151 "/usr/include/signal.h" 3 4 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") __attribute__ ((__deprecated__ ("Use the sigsuspend function instead"))); # 173 "/usr/include/signal.h" 3 4 extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); # 188 "/usr/include/signal.h" 3 4 typedef __sighandler_t sighandler_t; typedef __sighandler_t sig_t; extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigismember (const sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigandset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int sigorset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4 struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; # 230 "/usr/include/signal.h" 2 3 4 extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__)); extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__)); extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); # 292 "/usr/include/signal.h" 3 4 extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4 struct _fpx_sw_bytes { __uint32_t magic1; __uint32_t extended_size; __uint64_t xstate_bv; __uint32_t xstate_size; __uint32_t __glibc_reserved1[7]; }; struct _fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short __glibc_reserved1[3]; }; struct _xmmreg { __uint32_t element[4]; }; # 123 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4 struct _fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _fpxreg _st[8]; struct _xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; struct sigcontext { __uint64_t r8; __uint64_t r9; __uint64_t r10; __uint64_t r11; __uint64_t r12; __uint64_t r13; __uint64_t r14; __uint64_t r15; __uint64_t rdi; __uint64_t rsi; __uint64_t rbp; __uint64_t rbx; __uint64_t rdx; __uint64_t rax; __uint64_t rcx; __uint64_t rsp; __uint64_t rip; __uint64_t eflags; unsigned short cs; unsigned short gs; unsigned short fs; unsigned short __pad0; __uint64_t err; __uint64_t trapno; __uint64_t oldmask; __uint64_t cr2; __extension__ union { struct _fpstate * fpstate; __uint64_t __fpstate_word; }; __uint64_t __reserved1 [8]; }; struct _xsave_hdr { __uint64_t xstate_bv; __uint64_t __glibc_reserved1[2]; __uint64_t __glibc_reserved2[5]; }; struct _ymmh_state { __uint32_t ymmh_space[64]; }; struct _xstate { struct _fpstate fpstate; struct _xsave_hdr xstate_hdr; struct _ymmh_state ymmh; }; # 302 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 312 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 2 3 4 typedef struct { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 314 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4 # 37 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4 __extension__ typedef long long int greg_t; # 46 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4 typedef greg_t gregset_t[23]; enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2 }; struct _libc_fpxreg { unsigned short int significand[4]; unsigned short int exponent; unsigned short int __glibc_reserved1[3]; }; struct _libc_xmmreg { __uint32_t element[4]; }; struct _libc_fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; typedef struct _libc_fpstate *fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; __extension__ unsigned long long __reserved1 [8]; } mcontext_t; typedef struct ucontext_t { unsigned long int uc_flags; struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; __extension__ unsigned long long int __ssp[4]; } ucontext_t; # 317 "/usr/include/signal.h" 2 3 4 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead"))); # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4 # 328 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sigstksz.h" 1 3 4 # 329 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 3 4 enum { SS_ONSTACK = 1, SS_DISABLE }; # 330 "/usr/include/signal.h" 2 3 4 extern int sigaltstack (const stack_t *__restrict __ss, stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; # 340 "/usr/include/signal.h" 2 3 4 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__ ("Use the sigprocmask function instead"))); extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__ ("Use the signal function instead"))); extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__ ("Use the signal and sigprocmask functions instead"))) ; # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4 extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__)); extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __attribute__ ((__nothrow__ , __leaf__)); # 377 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/signal_ext.h" 1 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/signal_ext.h" 3 4 extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal); # 392 "/usr/include/signal.h" 2 3 4 # 37 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 49 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 # 50 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 74 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h" 1 3 4 typedef enum { P_ALL, P_PID, P_PGID, P_PIDFD, } idtype_t; # 75 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 83 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 extern __pid_t wait (int *__stat_loc); # 106 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); # 127 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, int __options); struct rusage; extern __pid_t wait3 (int *__stat_loc, int __options, struct rusage * __usage) __attribute__ ((__nothrow__)); # 159 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options, struct rusage *__usage) __attribute__ ((__nothrow__)); # 173 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 # 11 "criu/net.c" 2 # 1 "/usr/include/sched.h" 1 3 4 # 29 "/usr/include/sched.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 30 "/usr/include/sched.h" 2 3 4 # 43 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 # 80 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4 struct sched_param { int sched_priority; }; # 81 "/usr/include/x86_64-linux-gnu/bits/sched.h" 2 3 4 extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ , __leaf__)); extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__)); # 44 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4 # 32 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 115 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __attribute__ ((__nothrow__ , __leaf__)); extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__)); # 45 "/usr/include/sched.h" 2 3 4 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__)); # 130 "/usr/include/sched.h" 3 4 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); # 12 "criu/net.c" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/mount.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/sys/mount.h" 3 4 # 1 "/usr/include/fcntl.h" 1 3 4 # 28 "/usr/include/fcntl.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4 struct flock { short int l_type; short int l_whence; __off_t l_start; __off_t l_len; __pid_t l_pid; }; struct flock64 { short int l_type; short int l_whence; __off64_t l_start; __off64_t l_len; __pid_t l_pid; }; # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4 # 265 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 enum __pid_type { F_OWNER_TID = 0, F_OWNER_PID, F_OWNER_PGRP, F_OWNER_GID = F_OWNER_PGRP }; struct f_owner_ex { enum __pid_type type; __pid_t pid; }; # 355 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 # 1 "/usr/include/linux/falloc.h" 1 3 4 # 356 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 2 3 4 struct file_handle { unsigned int handle_bytes; int handle_type; unsigned char f_handle[0]; }; # 382 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __attribute__ ((__nothrow__ , __leaf__)); extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags); extern __ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # 437 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); extern int name_to_handle_at (int __dfd, const char *__name, struct file_handle *__handle, int *__mnt_id, int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, int __flags); # 62 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4 # 36 "/usr/include/fcntl.h" 2 3 4 # 78 "/usr/include/fcntl.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 3 4 struct stat { __dev_t st_dev; __ino_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt_t st_blocks; # 74 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 3 4 struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; # 89 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 3 4 __syscall_slong_t __glibc_reserved[3]; # 99 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 3 4 }; struct stat64 { __dev_t st_dev; __ino64_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt64_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; # 151 "/usr/include/x86_64-linux-gnu/bits/struct_stat.h" 3 4 __syscall_slong_t __glibc_reserved[3]; }; # 26 "/usr/include/x86_64-linux-gnu/bits/stat.h" 2 3 4 # 79 "/usr/include/fcntl.h" 2 3 4 # 177 "/usr/include/fcntl.h" 3 4 extern int fcntl (int __fd, int __cmd, ...); # 186 "/usr/include/fcntl.h" 3 4 extern int fcntl64 (int __fd, int __cmd, ...); # 209 "/usr/include/fcntl.h" 3 4 extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); # 219 "/usr/include/fcntl.h" 3 4 extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); # 233 "/usr/include/fcntl.h" 3 4 extern int openat (int __fd, const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (2))); # 244 "/usr/include/fcntl.h" 3 4 extern int openat64 (int __fd, const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (2))); # 255 "/usr/include/fcntl.h" 3 4 extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); # 265 "/usr/include/fcntl.h" 3 4 extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); # 301 "/usr/include/fcntl.h" 3 4 extern int posix_fadvise (int __fd, off_t __offset, off_t __len, int __advise) __attribute__ ((__nothrow__ , __leaf__)); # 313 "/usr/include/fcntl.h" 3 4 extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, int __advise) __attribute__ ((__nothrow__ , __leaf__)); # 323 "/usr/include/fcntl.h" 3 4 extern int posix_fallocate (int __fd, off_t __offset, off_t __len); # 334 "/usr/include/fcntl.h" 3 4 extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl2.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/fcntl2.h" 3 4 extern int __open_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); extern int __open_alias (const char *__path, int __oflag, ...) __asm__ ("" "open") __attribute__ ((__nonnull__ (1))); extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) ; extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT or O_TMPFILE in second argument needs 3 arguments"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int open (const char *__path, int __oflag, ...) { if (__builtin_va_arg_pack_len () > 1) __open_too_many_args (); if (__builtin_constant_p (__oflag)) { if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) { __open_missing_mode (); return __open_2 (__path, __oflag); } return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); } if (__builtin_va_arg_pack_len () < 1) return __open_2 (__path, __oflag); return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); } extern int __open64_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); extern int __open64_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64") __attribute__ ((__nonnull__ (1))); extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more"))) ; extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int open64 (const char *__path, int __oflag, ...) { if (__builtin_va_arg_pack_len () > 1) __open64_too_many_args (); if (__builtin_constant_p (__oflag)) { if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) { __open64_missing_mode (); return __open64_2 (__path, __oflag); } return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); } if (__builtin_va_arg_pack_len () < 1) return __open64_2 (__path, __oflag); return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); } extern int __openat_2 (int __fd, const char *__path, int __oflag) __attribute__ ((__nonnull__ (2))); extern int __openat_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat") __attribute__ ((__nonnull__ (2))); # 111 "/usr/include/x86_64-linux-gnu/bits/fcntl2.h" 3 4 extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) ; extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int openat (int __fd, const char *__path, int __oflag, ...) { if (__builtin_va_arg_pack_len () > 1) __openat_too_many_args (); if (__builtin_constant_p (__oflag)) { if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) { __openat_missing_mode (); return __openat_2 (__fd, __path, __oflag); } return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); } if (__builtin_va_arg_pack_len () < 1) return __openat_2 (__fd, __path, __oflag); return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); } extern int __openat64_2 (int __fd, const char *__path, int __oflag) __attribute__ ((__nonnull__ (2))); extern int __openat64_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64") __attribute__ ((__nonnull__ (2))); extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more"))) ; extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int openat64 (int __fd, const char *__path, int __oflag, ...) { if (__builtin_va_arg_pack_len () > 1) __openat64_too_many_args (); if (__builtin_constant_p (__oflag)) { if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 0200000)) == (020000000 | 0200000)) && __builtin_va_arg_pack_len () < 1) { __openat64_missing_mode (); return __openat64_2 (__fd, __path, __oflag); } return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); } if (__builtin_va_arg_pack_len () < 1) return __openat64_2 (__fd, __path, __oflag); return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); } # 343 "/usr/include/fcntl.h" 2 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/mount.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 145 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 329 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4 typedef int wchar_t; # 425 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4 typedef struct { long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); # 436 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 3 4 } max_align_t; # 28 "/usr/include/x86_64-linux-gnu/sys/mount.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4 # 1 "/usr/include/linux/ioctl.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 2 3 4 # 6 "/usr/include/linux/ioctl.h" 2 3 4 # 6 "/usr/include/asm-generic/ioctls.h" 2 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 2 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 2 3 4 # 27 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 2 3 4 struct winsize { unsigned short int ws_row; unsigned short int ws_col; unsigned short int ws_xpixel; unsigned short int ws_ypixel; }; struct termio { unsigned short int c_iflag; unsigned short int c_oflag; unsigned short int c_cflag; unsigned short int c_lflag; unsigned char c_line; unsigned char c_cc[8]; }; # 30 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h" 1 3 4 # 37 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__)); # 53 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4 # 29 "/usr/include/x86_64-linux-gnu/sys/mount.h" 2 3 4 # 1 "criu/include/linux/mount.h" 1 3 4 # 1 "include/common/config.h" 1 3 4 # 5 "criu/include/linux/mount.h" 2 3 4 # 1 "./compel/include/uapi/compel/plugins/std/syscall-codes.h" 1 3 4 # 1 "./compel/include/uapi/compel/plugins/std/syscall-codes-64.h" 1 3 4 # 9 "./compel/include/uapi/compel/plugins/std/syscall-codes.h" 2 3 4 # 6 "criu/include/linux/mount.h" 2 3 4 enum fsconfig_command { FSCONFIG_SET_FLAG = 0, FSCONFIG_SET_STRING = 1, FSCONFIG_SET_BINARY = 2, FSCONFIG_SET_PATH = 3, FSCONFIG_SET_PATH_EMPTY = 4, FSCONFIG_SET_FD = 5, FSCONFIG_CMD_CREATE = 6, FSCONFIG_CMD_RECONFIGURE = 7, }; # 33 "/usr/include/x86_64-linux-gnu/sys/mount.h" 2 3 4 # 43 "/usr/include/x86_64-linux-gnu/sys/mount.h" 3 4 enum { MS_RDONLY = 1, MS_NOSUID = 2, MS_NODEV = 4, MS_NOEXEC = 8, MS_SYNCHRONOUS = 16, MS_REMOUNT = 32, MS_MANDLOCK = 64, MS_DIRSYNC = 128, MS_NOSYMFOLLOW = 256, MS_NOATIME = 1024, MS_NODIRATIME = 2048, MS_BIND = 4096, MS_MOVE = 8192, MS_REC = 16384, MS_SILENT = 32768, MS_POSIXACL = 1 << 16, MS_UNBINDABLE = 1 << 17, MS_PRIVATE = 1 << 18, MS_SLAVE = 1 << 19, MS_SHARED = 1 << 20, MS_RELATIME = 1 << 21, MS_KERNMOUNT = 1 << 22, MS_I_VERSION = 1 << 23, MS_STRICTATIME = 1 << 24, MS_LAZYTIME = 1 << 25, MS_ACTIVE = 1 << 30, MS_NOUSER = 1 << 31 }; # 178 "/usr/include/x86_64-linux-gnu/sys/mount.h" 3 4 enum { MNT_FORCE = 1, MNT_DETACH = 2, MNT_EXPIRE = 4, UMOUNT_NOFOLLOW = 8 }; # 210 "/usr/include/x86_64-linux-gnu/sys/mount.h" 3 4 struct mount_attr { uint64_t attr_set; uint64_t attr_clr; uint64_t propagation; uint64_t userns_fd; }; # 272 "/usr/include/x86_64-linux-gnu/sys/mount.h" 3 4 extern int mount (const char *__special_file, const char *__dir, const char *__fstype, unsigned long int __rwflag, const void *__data) __attribute__ ((__nothrow__ , __leaf__)); extern int umount (const char *__special_file) __attribute__ ((__nothrow__ , __leaf__)); extern int umount2 (const char *__special_file, int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int fsopen (const char *__fs_name, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int fsmount (int __fd, unsigned int __flags, unsigned int __ms_flags) __attribute__ ((__nothrow__ , __leaf__)); extern int move_mount (int __from_dfd, const char *__from_pathname, int __to_dfd, const char *__to_pathname, unsigned int flags) __attribute__ ((__nothrow__ , __leaf__)); extern int fsconfig (int __fd, unsigned int __cmd, const char *__key, const void *__value, int __aux) __attribute__ ((__nothrow__ , __leaf__)); extern int fspick (int __dfd, const char *__path, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int open_tree (int __dfd, const char *__filename, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags, struct mount_attr *__uattr, size_t __usize) __attribute__ ((__nothrow__ , __leaf__)); # 13 "criu/net.c" 2 # 1 "/usr/include/net/if.h" 1 3 4 # 33 "/usr/include/net/if.h" 3 4 struct if_nameindex { unsigned int if_index; char *if_name; }; enum { IFF_UP = 0x1, IFF_BROADCAST = 0x2, IFF_DEBUG = 0x4, IFF_LOOPBACK = 0x8, IFF_POINTOPOINT = 0x10, IFF_NOTRAILERS = 0x20, IFF_RUNNING = 0x40, IFF_NOARP = 0x80, IFF_PROMISC = 0x100, IFF_ALLMULTI = 0x200, IFF_MASTER = 0x400, IFF_SLAVE = 0x800, IFF_MULTICAST = 0x1000, IFF_PORTSEL = 0x2000, IFF_AUTOMEDIA = 0x4000, IFF_DYNAMIC = 0x8000 }; struct ifaddr { struct sockaddr ifa_addr; union { struct sockaddr ifu_broadaddr; struct sockaddr ifu_dstaddr; } ifa_ifu; struct iface *ifa_ifp; struct ifaddr *ifa_next; }; # 111 "/usr/include/net/if.h" 3 4 struct ifmap { unsigned long int mem_start; unsigned long int mem_end; unsigned short int base_addr; unsigned char irq; unsigned char dma; unsigned char port; }; struct ifreq { union { char ifrn_name[16]; } ifr_ifrn; union { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; struct sockaddr ifru_netmask; struct sockaddr ifru_hwaddr; short int ifru_flags; int ifru_ivalue; int ifru_mtu; struct ifmap ifru_map; char ifru_slave[16]; char ifru_newname[16]; __caddr_t ifru_data; } ifr_ifru; }; # 176 "/usr/include/net/if.h" 3 4 struct ifconf { int ifc_len; union { __caddr_t ifcu_buf; struct ifreq *ifcu_req; } ifc_ifcu; }; extern unsigned int if_nametoindex (const char *__ifname) __attribute__ ((__nothrow__ , __leaf__)); extern char *if_indextoname (unsigned int __ifindex, char __ifname[16]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 2))); extern struct if_nameindex *if_nameindex (void) __attribute__ ((__nothrow__ , __leaf__)); extern void if_freenameindex (struct if_nameindex *__ptr) __attribute__ ((__nothrow__ , __leaf__)); # 15 "criu/net.c" 2 # 1 "/usr/include/linux/sockios.h" 1 3 4 # 23 "/usr/include/linux/sockios.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4 # 24 "/usr/include/linux/sockios.h" 2 3 4 # 16 "criu/net.c" 2 # 1 "/usr/include/libnl3/netlink/attr.h" 1 3 4 # 9 "/usr/include/libnl3/netlink/attr.h" 3 4 # 1 "/usr/include/libnl3/netlink/netlink.h" 1 3 4 # 9 "/usr/include/libnl3/netlink/netlink.h" 3 4 # 1 "/usr/include/stdio.h" 1 3 4 # 28 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 29 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 1 3 4 # 40 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 38 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 # 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 2 3 4 typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; # 41 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; # 42 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4 struct _IO_FILE; typedef struct _IO_FILE __FILE; # 43 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 44 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; typedef void _IO_lock_t; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; # 45 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4 typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); typedef int cookie_close_function_t (void *__cookie); typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; # 48 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 85 "/usr/include/stdio.h" 3 4 typedef __fpos_t fpos_t; typedef __fpos64_t fpos64_t; # 129 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 # 130 "/usr/include/stdio.h" 2 3 4 # 149 "/usr/include/stdio.h" 3 4 extern FILE *stdin; extern FILE *stdout; extern FILE *stderr; extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); # 176 "/usr/include/stdio.h" 3 4 extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int fclose (FILE *__stream) __attribute__ ((__nonnull__ (1))); # 194 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile (void) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); # 206 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern char *tmpnam (char[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *tmpnam_r (char __s[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); # 228 "/usr/include/stdio.h" 3 4 extern char *tempnam (const char *__dir, const char *__pfx) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__malloc__ (__builtin_free, 1))); extern int fflush (FILE *__stream); # 245 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 255 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); # 264 "/usr/include/stdio.h" 3 4 extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3))); # 289 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3))); extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__)); # 334 "/usr/include/stdio.h" 3 4 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...) __attribute__ ((__nonnull__ (1))); extern int printf (const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nonnull__ (1))); extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4 # 119 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4 # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4 # 438 "/usr/include/stdio.h" 2 3 4 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc23_fscanf") __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc23_scanf") __attribute__ ((__warn_unused_result__)); extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc23_sscanf") __attribute__ ((__nothrow__ , __leaf__)) ; # 490 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc23_vfscanf") __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc23_vscanf") __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc23_vsscanf") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); # 575 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern int getc (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern int getchar (void); extern int getc_unlocked (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern int getchar_unlocked (void); # 600 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream) __attribute__ ((__nonnull__ (1))); # 611 "/usr/include/stdio.h" 3 4 extern int fputc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern int putc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern int putchar (int __c); # 627 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern int putc_unlocked (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern int putw (int __w, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__nonnull__ (3))); # 677 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__nonnull__ (3))); # 694 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))); extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3))); extern int fputs (const char *__restrict __s, FILE *__restrict __stream) __attribute__ ((__nonnull__ (2))); extern int puts (const char *__s); extern int ungetc (int __c, FILE *__stream) __attribute__ ((__nonnull__ (2))); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))); extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) __attribute__ ((__nonnull__ (4))); # 755 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream) __attribute__ ((__nonnull__ (2))); # 766 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))); extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__nonnull__ (4))); extern int fseek (FILE *__stream, long int __off, int __whence) __attribute__ ((__nonnull__ (1))); extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern void rewind (FILE *__stream) __attribute__ ((__nonnull__ (1))); # 803 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence) __attribute__ ((__nonnull__ (1))); extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); # 829 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __attribute__ ((__nonnull__ (1))); extern int fsetpos (FILE *__stream, const fpos_t *__pos) __attribute__ ((__nonnull__ (1))); # 851 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) __attribute__ ((__nonnull__ (1))); extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos) __attribute__ ((__nonnull__ (1))); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos) __attribute__ ((__nonnull__ (1))); extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern void perror (const char *__s) __attribute__ ((__cold__)); extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); # 897 "/usr/include/stdio.h" 3 4 extern int pclose (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) __attribute__ ((__warn_unused_result__)); extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1))); extern char *cuserid (char *__s) __attribute__ ((__access__ (__write_only__, 1))); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (1))); extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 959 "/usr/include/stdio.h" 3 4 extern int __uflow (FILE *); extern int __overflow (FILE *, int); # 1 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 3 4 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))); extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __fprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, ...) __attribute__ ((__nonnull__ (1))); extern int __printf_chk (int __flag, const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nonnull__ (1))); extern int __vprintf_chk (int __flag, const char *__restrict __format, __gnuc_va_list __ap); extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __vdprintf_chk (int __fd, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 3, 0))); extern int __asprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); extern int __vasprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); extern int __obstack_printf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))); # 96 "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h" 3 4 extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) ; extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__nonnull__ (4))); extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__)); extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) ; extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (5))); extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))); extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) ; extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__nonnull__ (4))); extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__)); extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) ; extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (5))); # 965 "/usr/include/stdio.h" 2 3 4 # 976 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4 # 46 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int getchar (void) { return getc (stdin); } extern __inline __attribute__ ((__gnu_inline__)) int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int putchar (int __c) { return putc (__c, stdout); } extern __inline __attribute__ ((__gnu_inline__)) int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x0010) != 0); } extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x0020) != 0); } # 977 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) { return __builtin___sprintf_chk (__s, 3 - 1, __builtin_dynamic_object_size (__s, 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsprintf_chk (__s, 3 - 1, __builtin_dynamic_object_size (__s, 1), __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) { return __builtin___snprintf_chk (__s, __n, 3 - 1, __builtin_dynamic_object_size (__s, 1), __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) { return __builtin___vsnprintf_chk (__s, __n, 3 - 1, __builtin_dynamic_object_size (__s, 1), __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) int fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) { return __fprintf_chk (__stream, 3 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int printf (const char *__restrict __fmt, ...) { return __printf_chk (3 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (stdout, 3 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) int vfprintf (FILE *__restrict __stream, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (__stream, 3 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int dprintf (int __fd, const char *__restrict __fmt, ...) { return __dprintf_chk (__fd, 3 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vdprintf_chk (__fd, 3 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) { return __asprintf_chk (__ptr, 3 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) { return __asprintf_chk (__ptr, 3 - 1, __fmt, __builtin_va_arg_pack ()); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) { return __obstack_printf_chk (__obstack, 3 - 1, __fmt, __builtin_va_arg_pack ()); } # 165 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vasprintf_chk (__ptr, 3 - 1, __fmt, __ap); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) { return __obstack_vprintf_chk (__obstack, 3 - 1, __fmt, __ap); } # 194 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__nonnull__ (3))) char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __builtin_dynamic_object_size (__s, 1); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __fgets_alias (__s, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __fgets_chk_warn (__s, sz, __n, __stream); return __fgets_chk (__s, sz, __n, __stream); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))) size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __builtin_dynamic_object_size (__ptr, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size)))))) return __fread_alias (__ptr, __size, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) return __fread_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_chk (__ptr, sz, __size, __n, __stream); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__nonnull__ (3))) char * fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __builtin_dynamic_object_size (__s, 1); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))) && (((long unsigned int) (__n)) <= ((sz)) / ((sizeof (char))))))) return __fgets_unlocked_alias (__s, __n, __stream); if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char))))) return __fgets_unlocked_chk_warn (__s, sz, __n, __stream); return __fgets_unlocked_chk (__s, sz, __n, __stream); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (4))) size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __builtin_dynamic_object_size (__ptr, 0); if (((__builtin_constant_p (sz) && (sz) == (long unsigned int) -1) || (((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= ((sz)) / ((__size)))) && (((long unsigned int) (__n)) <= ((sz)) / ((__size)))))) { if (__builtin_constant_p (__size) && __builtin_constant_p (__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) && __size * __n <= 8) { size_t __cnt = __size * __n; char *__cptr = (char *) __ptr; if (__cnt == 0) return 0; for (; __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == (-1)) break; *__cptr++ = __c; } return (__cptr - (char *) __ptr) / __size; } return __fread_unlocked_alias (__ptr, __size, __n, __stream); } if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size)))) return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream); } # 981 "/usr/include/stdio.h" 2 3 4 # 10 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/stdlib.h" 1 3 4 # 26 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 33 "/usr/include/stdlib.h" 2 3 4 # 59 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 98 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern double atof (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 141 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float128 strtof128 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 177 "/usr/include/stdlib.h" 3 4 extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtol") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoul") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoll") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoull") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoll") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoull") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 278 "/usr/include/stdlib.h" 3 4 extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); # 298 "/usr/include/stdlib.h" 3 4 extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf128 (char *__dest, size_t __size, const char * __format, _Float128 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); # 340 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __asm__ ("" "__isoc23_strtol_l") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __asm__ ("" "__isoc23_strtoul_l") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __asm__ ("" "__isoc23_strtoll_l") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __asm__ ("" "__isoc23_strtoull_l") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); # 415 "/usr/include/stdlib.h" 3 4 extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); # 436 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float128 strtof128_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); # 480 "/usr/include/stdlib.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int __attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline __attribute__ ((__gnu_inline__)) long int __attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int __attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 505 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern long int a64l (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 521 "/usr/include/stdlib.h" 3 4 extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; __extension__ unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern __uint32_t arc4random (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void arc4random_buf (void *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern __uint32_t arc4random_uniform (__uint32_t __upper_bound) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__)); extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__)); extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2, 3))) __attribute__ ((__malloc__ (__builtin_free, 1))); extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__ (reallocarray, 1))); # 1 "/usr/include/alloca.h" 1 3 4 # 24 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 25 "/usr/include/alloca.h" 2 3 4 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); # 707 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern void *aligned_alloc (size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1))) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__)); extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern char *secure_getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int setenv (const char *__name, const char *__value, int __replace) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); # 814 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 827 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 837 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 849 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 859 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 870 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 881 "/usr/include/stdlib.h" 3 4 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 891 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 901 "/usr/include/stdlib.h" 3 4 extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 913 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 923 "/usr/include/stdlib.h" 3 4 extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); extern char *canonicalize_file_name (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (__builtin_free, 1))) __attribute__ ((__warn_unused_result__)); # 940 "/usr/include/stdlib.h" 3 4 extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); typedef int (*__compar_fn_t) (const void *, const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (const void *, const void *, void *); extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 1 3 4 # 19 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; const void *__p; int __comparison; __l = 0; __u = __nmemb; while (__l < __u) { __idx = (__l + __u) / 2; __p = (const void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-qual" return (void *) __p; #pragma GCC diagnostic pop } } return ((void *)0); } # 966 "/usr/include/stdlib.h" 2 3 4 extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int llabs (long long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); # 1012 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)); extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__read_only__, 2))); extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1))) __attribute__ ((__access__ (__read_only__, 2))); extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); # 1099 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 1155 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) double __attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } # 1156 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 3 4 extern char *__realpath_chk (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * __attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) { size_t sz = __builtin_dynamic_object_size (__resolved, 1); if (sz == (size_t) -1) return __realpath_alias (__name, __resolved); return __realpath_chk (__name, __resolved, sz); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3))); extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__buf, 1)) && (__builtin_dynamic_object_size (__buf, 1)) == (long unsigned int) -1) || (((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char))))) && (((long unsigned int) (__buflen)) <= ((__builtin_dynamic_object_size (__buf, 1))) / ((sizeof (char)))))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_dynamic_object_size (__buf, 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_dynamic_object_size (__buf, 1)))) ; } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) { if (__builtin_dynamic_object_size (__s, 1) != (size_t) -1 && 16 > __builtin_dynamic_object_size (__s, 1)) return __wctomb_chk (__s, __wchar, __builtin_dynamic_object_size (__s, 1)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); extern size_t __mbstowcs_nulldst (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__read_only__, 2))); extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) ; extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) { if (__builtin_constant_p (__dst == ((void *)0)) && __dst == ((void *)0)) return __mbstowcs_nulldst (__dst, __src, __len); else return (((__builtin_constant_p (__builtin_dynamic_object_size (__dst, 1)) && (__builtin_dynamic_object_size (__dst, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (wchar_t))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (wchar_t)))))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (wchar_t))))) ; } extern size_t __wcstombs_chk (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2))); extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__dst, 1)) && (__builtin_dynamic_object_size (__dst, 1)) == (long unsigned int) -1) || (((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (char))))) && (((long unsigned int) (__len)) <= ((__builtin_dynamic_object_size (__dst, 1))) / ((sizeof (char)))))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_dynamic_object_size (__dst, 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_dynamic_object_size (__dst, 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_dynamic_object_size (__dst, 1)))) ; } # 1160 "/usr/include/stdlib.h" 2 3 4 # 13 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/poll.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/poll.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/poll.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4 typedef unsigned long int nfds_t; struct pollfd { int fd; short int events; short int revents; }; # 54 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4 extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) __attribute__ ((__access__ (__write_only__, 1))); # 64 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4 extern int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) __attribute__ ((__access__ (__write_only__, 1))); # 82 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4 extern int __poll_alias (struct pollfd *__fds, nfds_t __nfds, int __timeout) __asm__ ("" "poll") ; extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout, long unsigned int __fdslen) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __poll_chk_warn (struct pollfd *__fds, nfds_t __nfds, int __timeout, long unsigned int __fdslen) __asm__ ("" "__poll_chk") __attribute__((__warning__ ("poll called with fds buffer too small file nfds entries"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__access__ (__write_only__, 1))) int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__fds, 1)) && (__builtin_dynamic_object_size (__fds, 1)) == (long unsigned int) -1) || (((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds))))) && (((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds)))))) ? __poll_alias (__fds, __nfds, __timeout) : ((((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) && !(((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) ? __poll_chk_warn (__fds, __nfds, __timeout, __builtin_dynamic_object_size (__fds, 1)) : __poll_chk (__fds, __nfds, __timeout, __builtin_dynamic_object_size (__fds, 1)))) ; } # 70 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4 extern int __ppoll_alias (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) __asm__ ("" "ppoll") ; extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss, long unsigned int __fdslen) __attribute__ ((__access__ (__write_only__, 1, 2))); extern int __ppoll_chk_warn (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss, long unsigned int __fdslen) __asm__ ("" "__ppoll_chk") __attribute__((__warning__ ("ppoll called with fds buffer too small file nfds entries"))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__access__ (__write_only__, 1))) int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) { return (((__builtin_constant_p (__builtin_dynamic_object_size (__fds, 1)) && (__builtin_dynamic_object_size (__fds, 1)) == (long unsigned int) -1) || (((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds))))) && (((long unsigned int) (__nfds)) <= ((__builtin_dynamic_object_size (__fds, 1))) / ((sizeof (*__fds)))))) ? __ppoll_alias (__fds, __nfds, __timeout, __ss) : ((((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) && !(((long unsigned int) (__nfds)) <= (__builtin_dynamic_object_size (__fds, 1)) / (sizeof (*__fds)))) ? __ppoll_chk_warn (__fds, __nfds, __timeout, __ss, __builtin_dynamic_object_size (__fds, 1)) : __ppoll_chk (__fds, __nfds, __timeout, __ss, __builtin_dynamic_object_size (__fds, 1)))) ; } # 88 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4 # 2 "/usr/include/poll.h" 2 3 4 # 14 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4 # 34 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 # 52 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 struct timezone { int tz_minuteswest; int tz_dsttime; }; # 67 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 extern int gettimeofday (struct timeval *__restrict __tv, void *__restrict __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 86 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __attribute__ ((__nothrow__ , __leaf__)); extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); # 114 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef enum __itimer_which __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__)); extern int setitimer (__itimer_which_t __which, const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); extern int utimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 189 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 extern int lutimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); # 214 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 extern int futimesat (int __fd, const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); # 258 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 # 17 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/netdb.h" 1 3 4 # 27 "/usr/include/netdb.h" 3 4 # 1 "/usr/include/netinet/in.h" 1 3 4 # 27 "/usr/include/netinet/in.h" 3 4 typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4 # 145 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 struct ip_opts { struct in_addr ip_dst; char ip_opts[40]; }; struct in_pktinfo { int ipi_ifindex; struct in_addr ipi_spec_dst; struct in_addr ipi_addr; }; # 38 "/usr/include/netinet/in.h" 2 3 4 enum { IPPROTO_IP = 0, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_IPIP = 4, IPPROTO_TCP = 6, IPPROTO_EGP = 8, IPPROTO_PUP = 12, IPPROTO_UDP = 17, IPPROTO_IDP = 22, IPPROTO_TP = 29, IPPROTO_DCCP = 33, IPPROTO_IPV6 = 41, IPPROTO_RSVP = 46, IPPROTO_GRE = 47, IPPROTO_ESP = 50, IPPROTO_AH = 51, IPPROTO_MTP = 92, IPPROTO_BEETPH = 94, IPPROTO_ENCAP = 98, IPPROTO_PIM = 103, IPPROTO_COMP = 108, IPPROTO_L2TP = 115, IPPROTO_SCTP = 132, IPPROTO_UDPLITE = 136, IPPROTO_MPLS = 137, IPPROTO_ETHERNET = 143, IPPROTO_RAW = 255, IPPROTO_MPTCP = 262, IPPROTO_MAX }; enum { IPPROTO_HOPOPTS = 0, IPPROTO_ROUTING = 43, IPPROTO_FRAGMENT = 44, IPPROTO_ICMPV6 = 58, IPPROTO_NONE = 59, IPPROTO_DSTOPTS = 60, IPPROTO_MH = 135 }; typedef uint16_t in_port_t; enum { IPPORT_ECHO = 7, IPPORT_DISCARD = 9, IPPORT_SYSTAT = 11, IPPORT_DAYTIME = 13, IPPORT_NETSTAT = 15, IPPORT_FTP = 21, IPPORT_TELNET = 23, IPPORT_SMTP = 25, IPPORT_TIMESERVER = 37, IPPORT_NAMESERVER = 42, IPPORT_WHOIS = 43, IPPORT_MTP = 57, IPPORT_TFTP = 69, IPPORT_RJE = 77, IPPORT_FINGER = 79, IPPORT_TTYLINK = 87, IPPORT_SUPDUP = 95, IPPORT_EXECSERVER = 512, IPPORT_LOGINSERVER = 513, IPPORT_CMDSERVER = 514, IPPORT_EFSSERVER = 520, IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520, IPPORT_RESERVED = 1024, IPPORT_USERRESERVED = 5000 }; # 221 "/usr/include/netinet/in.h" 3 4 struct in6_addr { union { uint8_t __u6_addr8[16]; uint16_t __u6_addr16[8]; uint32_t __u6_addr32[4]; } __in6_u; }; extern const struct in6_addr in6addr_any; extern const struct in6_addr in6addr_loopback; # 247 "/usr/include/netinet/in.h" 3 4 struct sockaddr_in { sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; unsigned char sin_zero[sizeof (struct sockaddr) - (sizeof (unsigned short int)) - sizeof (in_port_t) - sizeof (struct in_addr)]; }; struct sockaddr_in6 { sa_family_t sin6_family; in_port_t sin6_port; uint32_t sin6_flowinfo; struct in6_addr sin6_addr; uint32_t sin6_scope_id; }; struct ip_mreq { struct in_addr imr_multiaddr; struct in_addr imr_interface; }; struct ip_mreqn { struct in_addr imr_multiaddr; struct in_addr imr_address; int imr_ifindex; }; struct ip_mreq_source { struct in_addr imr_multiaddr; struct in_addr imr_interface; struct in_addr imr_sourceaddr; }; struct ipv6_mreq { struct in6_addr ipv6mr_multiaddr; unsigned int ipv6mr_interface; }; struct group_req { uint32_t gr_interface; struct sockaddr_storage gr_group; }; struct group_source_req { uint32_t gsr_interface; struct sockaddr_storage gsr_group; struct sockaddr_storage gsr_source; }; struct ip_msfilter { struct in_addr imsf_multiaddr; struct in_addr imsf_interface; uint32_t imsf_fmode; uint32_t imsf_numsrc; struct in_addr imsf_slist[1]; }; struct group_filter { uint32_t gf_interface; struct sockaddr_storage gf_group; uint32_t gf_fmode; uint32_t gf_numsrc; struct sockaddr_storage gf_slist[1]; }; # 397 "/usr/include/netinet/in.h" 3 4 extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint16_t ntohs (uint16_t __netshort) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint32_t htonl (uint32_t __hostlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint16_t htons (uint16_t __hostshort) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 # 409 "/usr/include/netinet/in.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 # 410 "/usr/include/netinet/in.h" 2 3 4 # 525 "/usr/include/netinet/in.h" 3 4 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__)); extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __attribute__ ((__nothrow__ , __leaf__)); # 555 "/usr/include/netinet/in.h" 3 4 struct cmsghdr; struct in6_pktinfo { struct in6_addr ipi6_addr; unsigned int ipi6_ifindex; }; struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; uint32_t ip6m_mtu; }; extern int inet6_option_space (int __nbytes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_append (struct cmsghdr *__cmsg, const uint8_t *__typep, int __multx, int __plusy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_next (const struct cmsghdr *__cmsg, uint8_t **__tptrp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_find (const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t __len, uint8_t __align, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, uint8_t *__typep, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__)); extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__ , __leaf__)); extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_reverse (const void *__in, void *__out) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_segments (const void *__bp) __attribute__ ((__nothrow__ , __leaf__)); extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) __attribute__ ((__nothrow__ , __leaf__)); extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t *__fmode, uint32_t *__numsrc, struct in_addr *__slist) __attribute__ ((__nothrow__ , __leaf__)); extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, const struct in_addr *__slist) __attribute__ ((__nothrow__ , __leaf__)); extern int getsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__)); extern int setsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__)); # 28 "/usr/include/netdb.h" 2 3 4 # 1 "/usr/include/rpc/netdb.h" 1 3 4 # 42 "/usr/include/rpc/netdb.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 43 "/usr/include/rpc/netdb.h" 2 3 4 struct rpcent { char *r_name; char **r_aliases; int r_number; }; extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__ , __leaf__)); extern void endrpcent (void) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); # 33 "/usr/include/netdb.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 3 4 struct netent { char *n_name; char **n_aliases; int n_addrtype; uint32_t n_net; }; # 41 "/usr/include/netdb.h" 2 3 4 # 51 "/usr/include/netdb.h" 3 4 extern int *__h_errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); # 90 "/usr/include/netdb.h" 3 4 extern void herror (const char *__str) __attribute__ ((__nothrow__ , __leaf__)); extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__ , __leaf__)); struct hostent { char *h_name; char **h_aliases; int h_addrtype; int h_length; char **h_addr_list; }; extern void sethostent (int __stay_open); extern void endhostent (void); extern struct hostent *gethostent (void); extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, int __type); extern struct hostent *gethostbyname (const char *__name); # 153 "/usr/include/netdb.h" 3 4 extern struct hostent *gethostbyname2 (const char *__name, int __af); # 165 "/usr/include/netdb.h" 3 4 extern int gethostent_r (struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname_r (const char *__restrict __name, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname2_r (const char *__restrict __name, int __af, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); # 196 "/usr/include/netdb.h" 3 4 extern void setnetent (int __stay_open); extern void endnetent (void); extern struct netent *getnetent (void); extern struct netent *getnetbyaddr (uint32_t __net, int __type); extern struct netent *getnetbyname (const char *__name); # 235 "/usr/include/netdb.h" 3 4 extern int getnetent_r (struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyaddr_r (uint32_t __net, int __type, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyname_r (const char *__restrict __name, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); struct servent { char *s_name; char **s_aliases; int s_port; char *s_proto; }; extern void setservent (int __stay_open); extern void endservent (void); extern struct servent *getservent (void); extern struct servent *getservbyname (const char *__name, const char *__proto); extern struct servent *getservbyport (int __port, const char *__proto); # 306 "/usr/include/netdb.h" 3 4 extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); struct protoent { char *p_name; char **p_aliases; int p_proto; }; extern void setprotoent (int __stay_open); extern void endprotoent (void); extern struct protoent *getprotoent (void); extern struct protoent *getprotobyname (const char *__name); extern struct protoent *getprotobynumber (int __proto); # 372 "/usr/include/netdb.h" 3 4 extern int getprotoent_r (struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobynumber_r (int __proto, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); # 393 "/usr/include/netdb.h" 3 4 extern int setnetgrent (const char *__netgroup); extern void endnetgrent (void); # 410 "/usr/include/netdb.h" 3 4 extern int getnetgrent (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp); # 421 "/usr/include/netdb.h" 3 4 extern int innetgr (const char *__netgroup, const char *__host, const char *__user, const char *__domain); extern int getnetgrent_r (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp, char *__restrict __buffer, size_t __buflen); # 449 "/usr/include/netdb.h" 3 4 extern int rcmd (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p); # 461 "/usr/include/netdb.h" 3 4 extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); # 477 "/usr/include/netdb.h" 3 4 extern int rexec (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p); # 489 "/usr/include/netdb.h" 3 4 extern int rexec_af (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); # 503 "/usr/include/netdb.h" 3 4 extern int ruserok (const char *__rhost, int __suser, const char *__remuser, const char *__locuser); # 513 "/usr/include/netdb.h" 3 4 extern int ruserok_af (const char *__rhost, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); # 526 "/usr/include/netdb.h" 3 4 extern int iruserok (uint32_t __raddr, int __suser, const char *__remuser, const char *__locuser); # 537 "/usr/include/netdb.h" 3 4 extern int iruserok_af (const void *__raddr, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); # 549 "/usr/include/netdb.h" 3 4 extern int rresvport (int *__alport); # 558 "/usr/include/netdb.h" 3 4 extern int rresvport_af (int *__alport, sa_family_t __af); struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; socklen_t ai_addrlen; struct sockaddr *ai_addr; char *ai_canonname; struct addrinfo *ai_next; }; struct gaicb { const char *ar_name; const char *ar_service; const struct addrinfo *ar_request; struct addrinfo *ar_result; int __return; int __glibc_reserved[5]; }; # 660 "/usr/include/netdb.h" 3 4 extern int getaddrinfo (const char *__restrict __name, const char *__restrict __service, const struct addrinfo *__restrict __req, struct addrinfo **__restrict __pai); extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__ , __leaf__)); extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__ , __leaf__)); extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, int __flags); # 690 "/usr/include/netdb.h" 3 4 extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict], int __ent, struct sigevent *__restrict __sig); # 701 "/usr/include/netdb.h" 3 4 extern int gai_suspend (const struct gaicb *const __list[], int __ent, const struct timespec *__timeout); # 716 "/usr/include/netdb.h" 3 4 extern int gai_error (struct gaicb *__req) __attribute__ ((__nothrow__ , __leaf__)); extern int gai_cancel (struct gaicb *__gaicbp) __attribute__ ((__nothrow__ , __leaf__)); # 18 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/netlink-compat.h" 1 3 4 # 19 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/linux/genetlink.h" 1 3 4 # 13 "/usr/include/linux/genetlink.h" 3 4 struct genlmsghdr { __u8 cmd; __u8 version; __u16 reserved; }; # 40 "/usr/include/linux/genetlink.h" 3 4 enum { CTRL_CMD_UNSPEC, CTRL_CMD_NEWFAMILY, CTRL_CMD_DELFAMILY, CTRL_CMD_GETFAMILY, CTRL_CMD_NEWOPS, CTRL_CMD_DELOPS, CTRL_CMD_GETOPS, CTRL_CMD_NEWMCAST_GRP, CTRL_CMD_DELMCAST_GRP, CTRL_CMD_GETMCAST_GRP, CTRL_CMD_GETPOLICY, __CTRL_CMD_MAX, }; enum { CTRL_ATTR_UNSPEC, CTRL_ATTR_FAMILY_ID, CTRL_ATTR_FAMILY_NAME, CTRL_ATTR_VERSION, CTRL_ATTR_HDRSIZE, CTRL_ATTR_MAXATTR, CTRL_ATTR_OPS, CTRL_ATTR_MCAST_GROUPS, CTRL_ATTR_POLICY, CTRL_ATTR_OP_POLICY, CTRL_ATTR_OP, __CTRL_ATTR_MAX, }; enum { CTRL_ATTR_OP_UNSPEC, CTRL_ATTR_OP_ID, CTRL_ATTR_OP_FLAGS, __CTRL_ATTR_OP_MAX, }; enum { CTRL_ATTR_MCAST_GRP_UNSPEC, CTRL_ATTR_MCAST_GRP_NAME, CTRL_ATTR_MCAST_GRP_ID, __CTRL_ATTR_MCAST_GRP_MAX, }; enum { CTRL_ATTR_POLICY_UNSPEC, CTRL_ATTR_POLICY_DO, CTRL_ATTR_POLICY_DUMP, __CTRL_ATTR_POLICY_DUMP_MAX, CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1 }; # 22 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/netinet/tcp.h" 1 3 4 # 93 "/usr/include/netinet/tcp.h" 3 4 typedef uint32_t tcp_seq; struct tcphdr { __extension__ union { struct { uint16_t th_sport; uint16_t th_dport; tcp_seq th_seq; tcp_seq th_ack; uint8_t th_x2:4; uint8_t th_off:4; uint8_t th_flags; uint16_t th_win; uint16_t th_sum; uint16_t th_urp; }; struct { uint16_t source; uint16_t dest; uint32_t seq; uint32_t ack_seq; uint16_t res1:4; uint16_t doff:4; uint16_t fin:1; uint16_t syn:1; uint16_t rst:1; uint16_t psh:1; uint16_t ack:1; uint16_t urg:1; uint16_t res2:2; # 156 "/usr/include/netinet/tcp.h" 3 4 uint16_t window; uint16_t check; uint16_t urg_ptr; }; }; }; enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT, TCP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK, TCP_LISTEN, TCP_CLOSING }; # 217 "/usr/include/netinet/tcp.h" 3 4 enum tcp_ca_state { TCP_CA_Open = 0, TCP_CA_Disorder = 1, TCP_CA_CWR = 2, TCP_CA_Recovery = 3, TCP_CA_Loss = 4 }; struct tcp_info { uint8_t tcpi_state; uint8_t tcpi_ca_state; uint8_t tcpi_retransmits; uint8_t tcpi_probes; uint8_t tcpi_backoff; uint8_t tcpi_options; uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; uint32_t tcpi_rto; uint32_t tcpi_ato; uint32_t tcpi_snd_mss; uint32_t tcpi_rcv_mss; uint32_t tcpi_unacked; uint32_t tcpi_sacked; uint32_t tcpi_lost; uint32_t tcpi_retrans; uint32_t tcpi_fackets; uint32_t tcpi_last_data_sent; uint32_t tcpi_last_ack_sent; uint32_t tcpi_last_data_recv; uint32_t tcpi_last_ack_recv; uint32_t tcpi_pmtu; uint32_t tcpi_rcv_ssthresh; uint32_t tcpi_rtt; uint32_t tcpi_rttvar; uint32_t tcpi_snd_ssthresh; uint32_t tcpi_snd_cwnd; uint32_t tcpi_advmss; uint32_t tcpi_reordering; uint32_t tcpi_rcv_rtt; uint32_t tcpi_rcv_space; uint32_t tcpi_total_retrans; }; # 277 "/usr/include/netinet/tcp.h" 3 4 struct tcp_md5sig { struct sockaddr_storage tcpm_addr; uint8_t tcpm_flags; uint8_t tcpm_prefixlen; uint16_t tcpm_keylen; int tcpm_ifindex; uint8_t tcpm_key[80]; }; struct tcp_repair_opt { uint32_t opt_code; uint32_t opt_val; }; enum { TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR, }; # 320 "/usr/include/netinet/tcp.h" 3 4 struct tcp_cookie_transactions { uint16_t tcpct_flags; uint8_t __tcpct_pad1; uint8_t tcpct_cookie_desired; uint16_t tcpct_s_data_desired; uint16_t tcpct_used; uint8_t tcpct_value[536U]; }; struct tcp_repair_window { uint32_t snd_wl1; uint32_t snd_wnd; uint32_t max_window; uint32_t rcv_wnd; uint32_t rcv_wup; }; struct tcp_zerocopy_receive { uint64_t address; uint32_t length; uint32_t recv_skip_hint; }; # 24 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/version.h" 1 3 4 # 26 "/usr/include/libnl3/netlink/version.h" 3 4 extern const int nl_ver_num; extern const int nl_ver_maj; extern const int nl_ver_min; extern const int nl_ver_mic; # 25 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/errno.h" 1 3 4 # 51 "/usr/include/libnl3/netlink/errno.h" 3 4 extern const char * nl_geterror(int); extern void nl_perror(int, const char *); extern int nl_syserr2nlerr(int); # 26 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/types.h" 1 3 4 # 15 "/usr/include/libnl3/netlink/types.h" 3 4 enum nl_dump_type { NL_DUMP_LINE, NL_DUMP_DETAILS, NL_DUMP_STATS, __NL_DUMP_MAX, }; struct nl_dump_params { enum nl_dump_type dp_type; int dp_prefix; int dp_print_index; int dp_dump_msgtype; # 57 "/usr/include/libnl3/netlink/types.h" 3 4 void (*dp_cb)(struct nl_dump_params *, char *); # 67 "/usr/include/libnl3/netlink/types.h" 3 4 void (*dp_nl_cb)(struct nl_dump_params *, int); void *dp_data; FILE * dp_fd; char * dp_buf; size_t dp_buflen; int dp_pre_dump; int dp_ivar; unsigned int dp_line; }; # 27 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/handlers.h" 1 3 4 # 13 "/usr/include/libnl3/netlink/handlers.h" 3 4 # 1 "/usr/include/libnl3/netlink/netlink-kernel.h" 1 3 4 # 14 "/usr/include/libnl3/netlink/handlers.h" 2 3 4 struct nlmsgerr; struct sockaddr_nl; struct ucred; struct nl_cb; struct nl_sock; struct nl_msg; # 38 "/usr/include/libnl3/netlink/handlers.h" 3 4 typedef int (*nl_recvmsg_msg_cb_t)(struct nl_msg *msg, void *arg); # 47 "/usr/include/libnl3/netlink/handlers.h" 3 4 typedef int (*nl_recvmsg_err_cb_t)(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg); enum nl_cb_action { NL_OK, NL_SKIP, NL_STOP, }; enum nl_cb_kind { NL_CB_DEFAULT, NL_CB_VERBOSE, NL_CB_DEBUG, NL_CB_CUSTOM, __NL_CB_KIND_MAX, }; enum nl_cb_type { NL_CB_VALID, NL_CB_FINISH, NL_CB_OVERRUN, NL_CB_SKIPPED, NL_CB_ACK, NL_CB_MSG_IN, NL_CB_MSG_OUT, NL_CB_INVALID, NL_CB_SEQ_CHECK, NL_CB_SEND_ACK, NL_CB_DUMP_INTR, __NL_CB_TYPE_MAX, }; extern struct nl_cb * nl_cb_alloc(enum nl_cb_kind); extern struct nl_cb * nl_cb_clone(struct nl_cb *); extern struct nl_cb * nl_cb_get(struct nl_cb *); extern void nl_cb_put(struct nl_cb *); extern int nl_cb_set(struct nl_cb *, enum nl_cb_type, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *); extern int nl_cb_set_all(struct nl_cb *, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *); extern int nl_cb_err(struct nl_cb *, enum nl_cb_kind, nl_recvmsg_err_cb_t, void *); extern void nl_cb_overwrite_recvmsgs(struct nl_cb *, int (*func)(struct nl_sock *, struct nl_cb *)); extern void nl_cb_overwrite_recv(struct nl_cb *, int (*func)(struct nl_sock *, struct sockaddr_nl *, unsigned char **, struct ucred **)); extern void nl_cb_overwrite_send(struct nl_cb *, int (*func)(struct nl_sock *, struct nl_msg *)); extern enum nl_cb_type nl_cb_active_type(struct nl_cb *cb); # 28 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/socket.h" 1 3 4 # 16 "/usr/include/libnl3/netlink/socket.h" 3 4 extern struct nl_sock * nl_socket_alloc(void); extern struct nl_sock * nl_socket_alloc_cb(struct nl_cb *); extern void nl_socket_free(struct nl_sock *); extern uint32_t nl_socket_get_local_port(const struct nl_sock *); extern void nl_socket_set_local_port(struct nl_sock *, uint32_t); extern int nl_socket_add_memberships(struct nl_sock *, int, ...); extern int nl_socket_add_membership(struct nl_sock *, int); extern int nl_socket_drop_memberships(struct nl_sock *, int, ...); extern int nl_socket_drop_membership(struct nl_sock *, int); extern void nl_join_groups(struct nl_sock *, int); extern uint32_t nl_socket_get_peer_port(const struct nl_sock *); extern void nl_socket_set_peer_port(struct nl_sock *, uint32_t); extern uint32_t nl_socket_get_peer_groups(const struct nl_sock *sk); extern void nl_socket_set_peer_groups(struct nl_sock *sk, uint32_t groups); extern struct nl_cb * nl_socket_get_cb(const struct nl_sock *); extern void nl_socket_set_cb(struct nl_sock *, struct nl_cb *); extern int nl_socket_modify_cb(struct nl_sock *, enum nl_cb_type, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *); extern int nl_socket_modify_err_cb(struct nl_sock *, enum nl_cb_kind, nl_recvmsg_err_cb_t, void *); extern int nl_socket_set_buffer_size(struct nl_sock *, int, int); extern int nl_socket_set_msg_buf_size(struct nl_sock *, size_t); extern size_t nl_socket_get_msg_buf_size(struct nl_sock *); extern int nl_socket_set_passcred(struct nl_sock *, int); extern int nl_socket_recv_pktinfo(struct nl_sock *, int); extern void nl_socket_disable_seq_check(struct nl_sock *); extern unsigned int nl_socket_use_seq(struct nl_sock *); extern void nl_socket_disable_auto_ack(struct nl_sock *); extern void nl_socket_enable_auto_ack(struct nl_sock *); extern int nl_socket_get_fd(const struct nl_sock *); extern int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd); extern int nl_socket_set_nonblocking(const struct nl_sock *); extern void nl_socket_enable_msg_peek(struct nl_sock *); extern void nl_socket_disable_msg_peek(struct nl_sock *); # 29 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/object.h" 1 3 4 # 9 "/usr/include/libnl3/netlink/object.h" 3 4 # 1 "/usr/include/libnl3/netlink/netlink.h" 1 3 4 # 10 "/usr/include/libnl3/netlink/object.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/utils.h" 1 3 4 # 10 "/usr/include/libnl3/netlink/utils.h" 3 4 # 1 "/usr/include/libnl3/netlink/list.h" 1 3 4 # 9 "/usr/include/libnl3/netlink/list.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 10 "/usr/include/libnl3/netlink/list.h" 2 3 4 struct nl_list_head { struct nl_list_head * next; struct nl_list_head * prev; }; static inline void NL_INIT_LIST_HEAD(struct nl_list_head *list) { list->next = list; list->prev = list; } static inline void __nl_list_add(struct nl_list_head *obj, struct nl_list_head *prev, struct nl_list_head *next) { prev->next = obj; obj->prev = prev; next->prev = obj; obj->next = next; } static inline void nl_list_add_tail(struct nl_list_head *obj, struct nl_list_head *head) { __nl_list_add(obj, head->prev, head); } static inline void nl_list_add_head(struct nl_list_head *obj, struct nl_list_head *head) { __nl_list_add(obj, head, head->next); } static inline void nl_list_del(struct nl_list_head *obj) { obj->next->prev = obj->prev; obj->prev->next = obj->next; } static inline int nl_list_empty(struct nl_list_head *head) { return head->next == head; } # 11 "/usr/include/libnl3/netlink/utils.h" 2 3 4 # 41 "/usr/include/libnl3/netlink/utils.h" 3 4 enum { NL_BYTE_RATE, NL_BIT_RATE, }; extern double nl_cancel_down_bytes(unsigned long long, char **); extern double nl_cancel_down_bits(unsigned long long, char **); extern int nl_rate2str(unsigned long long, int, char *, size_t); extern double nl_cancel_down_us(uint32_t, char **); extern long nl_size2int(const char *); extern char * nl_size2str(const size_t, char *, const size_t); extern long nl_prob2int(const char *); extern int nl_get_user_hz(void); extern int nl_get_psched_hz(void); extern uint32_t nl_us2ticks(uint32_t); extern uint32_t nl_ticks2us(uint32_t); extern int nl_str2msec(const char *, uint64_t *); extern char * nl_msec2str(uint64_t, char *, size_t); extern char * nl_llproto2str(int, char *, size_t); extern int nl_str2llproto(const char *); extern char * nl_ether_proto2str(int, char *, size_t); extern int nl_str2ether_proto(const char *); extern char * nl_ip_proto2str(int, char *, size_t); extern int nl_str2ip_proto(const char *); extern void nl_new_line(struct nl_dump_params *); extern void nl_dump(struct nl_dump_params *, const char *, ...) __attribute__((__format__(printf, 2, 3))); extern void nl_dump_line(struct nl_dump_params *, const char *, ...) __attribute__((__format__(printf, 2, 3))); enum { NL_CAPABILITY_NONE, NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE = 1, NL_CAPABILITY_ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE = 2, NL_CAPABILITY_ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE = 3, # 113 "/usr/include/libnl3/netlink/utils.h" 3 4 NL_CAPABILITY_NL_CONNECT_RETRY_GENERATE_PORT_ON_ADDRINUSE = 4, NL_CAPABILITY_ROUTE_LINK_GET_KERNEL_FAIL_OPNOTSUPP = 5, NL_CAPABILITY_ROUTE_ADDR_COMPARE_CACHEINFO = 6, NL_CAPABILITY_VERSION_3_2_26 = 7, NL_CAPABILITY_NL_RECV_FAIL_TRUNC_NO_PEEK = 8, NL_CAPABILITY_LINK_BUILD_CHANGE_REQUEST_SET_CHANGE = 9, NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX = 10, NL_CAPABILITY_VERSION_3_2_27 = 11, NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE = 12, NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE = 13, NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR = 14, NL_CAPABILITY_RTNL_LINK_VXLAN_IO_COMPARE = 15, NL_CAPABILITY_NL_OBJECT_DIFF64 = 16, NL_CAPABILITY_XFRM_SA_KEY_SIZE = 17, NL_CAPABILITY_RTNL_ADDR_PEER_FIX = 18, NL_CAPABILITY_VERSION_3_2_28 = 19, NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX = 20, NL_CAPABILITY_NL_ADDR_FILL_SOCKADDR = 21, NL_CAPABILITY_XFRM_SEC_CTX_LEN = 22, NL_CAPABILITY_LINK_BUILD_ADD_REQUEST_SET_CHANGE = 23, # 261 "/usr/include/libnl3/netlink/utils.h" 3 4 NL_CAPABILITY_NL_RECVMSGS_PEEK_BY_DEFAULT = 24, NL_CAPABILITY_VERSION_3_2_29 = 25, NL_CAPABILITY_XFRM_SP_SEC_CTX_LEN = 26, NL_CAPABILITY_VERSION_3_3_0 = 27, NL_CAPABILITY_VERSION_3_4_0 = 28, NL_CAPABILITY_ROUTE_FIX_VLAN_SET_EGRESS_MAP = 29, NL_CAPABILITY_VERSION_3_5_0 = 30, NL_CAPABILITY_NL_OBJECT_IDENTICAL_PARTIAL = 31, NL_CAPABILITY_VERSION_3_6_0 = 32, NL_CAPABILITY_VERSION_3_7_0 = 33, __NL_CAPABILITY_MAX, NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1), }; int nl_has_capability (int capability); # 11 "/usr/include/libnl3/netlink/object.h" 2 3 4 struct nl_cache; struct nl_object; struct nl_object_ops; extern struct nl_object * nl_object_alloc(struct nl_object_ops *); extern int nl_object_alloc_name(const char *, struct nl_object **); extern void nl_object_free(struct nl_object *); extern struct nl_object * nl_object_clone(struct nl_object *obj); extern int nl_object_update(struct nl_object *dst, struct nl_object *src); extern void nl_object_get(struct nl_object *); extern void nl_object_put(struct nl_object *); extern int nl_object_shared(struct nl_object *); extern void nl_object_dump(struct nl_object *, struct nl_dump_params *); extern void nl_object_dump_buf(struct nl_object *, char *, size_t); extern int nl_object_identical(struct nl_object *, struct nl_object *); extern uint32_t nl_object_diff(struct nl_object *, struct nl_object *); extern uint64_t nl_object_diff64(struct nl_object *, struct nl_object *); extern int nl_object_match_filter(struct nl_object *, struct nl_object *); extern char * nl_object_attrs2str(struct nl_object *, uint32_t attrs, char *buf, size_t); extern char * nl_object_attr_list(struct nl_object *, char *, size_t); extern void nl_object_keygen(struct nl_object *, uint32_t *, uint32_t); extern void nl_object_mark(struct nl_object *); extern void nl_object_unmark(struct nl_object *); extern int nl_object_is_marked(struct nl_object *); extern int nl_object_get_refcnt(struct nl_object *); extern struct nl_cache * nl_object_get_cache(struct nl_object *); extern const char * nl_object_get_type(const struct nl_object *); extern int nl_object_get_msgtype(const struct nl_object *); struct nl_object_ops * nl_object_get_ops(const struct nl_object *); uint32_t nl_object_get_id_attrs(struct nl_object *obj); static inline void * nl_object_priv(struct nl_object *obj) { return obj; } # 30 "/usr/include/libnl3/netlink/netlink.h" 2 3 4 struct nlmsghdr; struct ucred; struct nl_cache_ops; struct nl_parser_param; struct nl_object; struct nl_sock; extern int nl_debug; extern struct nl_dump_params nl_debug_dp; extern int nl_connect(struct nl_sock *, int); extern void nl_close(struct nl_sock *); extern int nl_sendto(struct nl_sock *, void *, size_t); extern int nl_sendmsg(struct nl_sock *, struct nl_msg *, struct msghdr *); extern int nl_send(struct nl_sock *, struct nl_msg *); extern int nl_send_iovec(struct nl_sock *, struct nl_msg *, struct iovec *, unsigned); extern void nl_complete_msg(struct nl_sock *, struct nl_msg *); extern void nl_auto_complete(struct nl_sock *, struct nl_msg *); extern int nl_send_auto(struct nl_sock *, struct nl_msg *); extern int nl_send_auto_complete(struct nl_sock *, struct nl_msg *); extern int nl_send_sync(struct nl_sock *, struct nl_msg *); extern int nl_send_simple(struct nl_sock *, int, int, void *, size_t); extern int nl_recv(struct nl_sock *, struct sockaddr_nl *, unsigned char **, struct ucred **); extern int nl_recvmsgs(struct nl_sock *, struct nl_cb *); extern int nl_recvmsgs_report(struct nl_sock *, struct nl_cb *); extern int nl_recvmsgs_default(struct nl_sock *); extern int nl_wait_for_ack(struct nl_sock *); extern int nl_pickup(struct nl_sock *, int (*parser)(struct nl_cache_ops *, struct sockaddr_nl *, struct nlmsghdr *, struct nl_parser_param *), struct nl_object **); extern int nl_pickup_keep_syserr(struct nl_sock *sk, int (*parser)(struct nl_cache_ops *, struct sockaddr_nl *, struct nlmsghdr *, struct nl_parser_param *), struct nl_object **result, int *syserror); extern char * nl_nlfamily2str(int, char *, size_t); extern int nl_str2nlfamily(const char *); # 10 "/usr/include/libnl3/netlink/attr.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/addr.h" 1 3 4 # 15 "/usr/include/libnl3/netlink/addr.h" 3 4 struct nlattr; struct nl_addr; extern struct nl_addr * nl_addr_alloc(size_t); extern struct nl_addr * nl_addr_alloc_attr(const struct nlattr *, int); extern struct nl_addr * nl_addr_build(int, const void *, size_t); extern int nl_addr_parse(const char *, int, struct nl_addr **); extern struct nl_addr * nl_addr_clone(const struct nl_addr *); extern struct nl_addr * nl_addr_get(struct nl_addr *); extern void nl_addr_put(struct nl_addr *); extern int nl_addr_shared(const struct nl_addr *); extern int nl_addr_cmp(const struct nl_addr *, const struct nl_addr *); extern int nl_addr_cmp_prefix(const struct nl_addr *, const struct nl_addr *); extern int nl_addr_iszero(const struct nl_addr *); extern int nl_addr_valid(const char *, int); extern int nl_addr_guess_family(const struct nl_addr *); extern int nl_addr_fill_sockaddr(const struct nl_addr *, struct sockaddr *, socklen_t *); extern int nl_addr_info(const struct nl_addr *, struct addrinfo **); extern int nl_addr_resolve(const struct nl_addr *, char *, size_t); extern void nl_addr_set_family(struct nl_addr *, int); extern int nl_addr_get_family(const struct nl_addr *); extern int nl_addr_set_binary_addr(struct nl_addr *, const void *, size_t); extern void * nl_addr_get_binary_addr(const struct nl_addr *); extern unsigned int nl_addr_get_len(const struct nl_addr *); extern void nl_addr_set_prefixlen(struct nl_addr *, int); extern unsigned int nl_addr_get_prefixlen(const struct nl_addr *); extern char * nl_af2str(int, char *, size_t); extern int nl_str2af(const char *); extern char * nl_addr2str(const struct nl_addr *, char *, size_t); # 12 "/usr/include/libnl3/netlink/attr.h" 2 3 4 # 1 "/usr/include/libnl3/netlink/data.h" 1 3 4 # 15 "/usr/include/libnl3/netlink/data.h" 3 4 struct nlattr; struct nl_data; extern struct nl_data * nl_data_alloc(const void *, size_t); extern struct nl_data * nl_data_alloc_attr(const struct nlattr *); extern struct nl_data * nl_data_clone(const struct nl_data *); extern int nl_data_append(struct nl_data *, const void *, size_t); extern void nl_data_free(struct nl_data *); extern void * nl_data_get(const struct nl_data *); extern size_t nl_data_get_size(const struct nl_data *); extern int nl_data_cmp(const struct nl_data *, const struct nl_data *); # 13 "/usr/include/libnl3/netlink/attr.h" 2 3 4 struct nlattr; struct nl_msg; # 33 "/usr/include/libnl3/netlink/attr.h" 3 4 enum { NLA_UNSPEC, NLA_U8, NLA_U16, NLA_U32, NLA_U64, NLA_STRING, NLA_FLAG, NLA_MSECS, NLA_NESTED, NLA_NESTED_COMPAT, NLA_NUL_STRING, NLA_BINARY, NLA_S8, NLA_S16, NLA_S32, NLA_S64, __NLA_TYPE_MAX, }; # 63 "/usr/include/libnl3/netlink/attr.h" 3 4 struct nla_policy { uint16_t type; uint16_t minlen; uint16_t maxlen; }; extern int nla_attr_size(int payload); extern int nla_total_size(int payload); extern int nla_padlen(int payload); extern int nla_type(const struct nlattr *); extern void * nla_data(const struct nlattr *); extern int nla_len(const struct nlattr *); extern int nla_ok(const struct nlattr *, int); extern struct nlattr * nla_next(const struct nlattr *, int *); extern int nla_parse(struct nlattr **, int, struct nlattr *, int, const struct nla_policy *); extern int nla_validate(const struct nlattr *, int, int, const struct nla_policy *); extern struct nlattr * nla_find(const struct nlattr *, int, int); extern int nla_memcpy(void *, const struct nlattr *, int); extern size_t nla_strlcpy(char *, const struct nlattr *, size_t); extern int nla_memcmp(const struct nlattr *, const void *, size_t); extern int nla_strcmp(const struct nlattr *, const char *); extern struct nlattr * nla_reserve(struct nl_msg *, int, int); extern int nla_put(struct nl_msg *, int, int, const void *); extern int nla_put_data(struct nl_msg *, int, const struct nl_data *); extern int nla_put_addr(struct nl_msg *, int, struct nl_addr *); extern int8_t nla_get_s8(const struct nlattr *); extern int nla_put_s8(struct nl_msg *, int, int8_t); extern uint8_t nla_get_u8(const struct nlattr *); extern int nla_put_u8(struct nl_msg *, int, uint8_t); extern int16_t nla_get_s16(const struct nlattr *); extern int nla_put_s16(struct nl_msg *, int, int16_t); extern uint16_t nla_get_u16(const struct nlattr *); extern int nla_put_u16(struct nl_msg *, int, uint16_t); extern int32_t nla_get_s32(const struct nlattr *); extern int nla_put_s32(struct nl_msg *, int, int32_t); extern uint32_t nla_get_u32(const struct nlattr *); extern int nla_put_u32(struct nl_msg *, int, uint32_t); extern int64_t nla_get_s64(const struct nlattr *); extern int nla_put_s64(struct nl_msg *, int, int64_t); extern uint64_t nla_get_u64(const struct nlattr *); extern int nla_put_u64(struct nl_msg *, int, uint64_t); extern char * nla_get_string(const struct nlattr *); extern char * nla_strdup(const struct nlattr *); extern int nla_put_string(struct nl_msg *, int, const char *); extern int nla_get_flag(const struct nlattr *); extern int nla_put_flag(struct nl_msg *, int); extern unsigned long nla_get_msecs(const struct nlattr *); extern int nla_put_msecs(struct nl_msg *, int, unsigned long); extern int nla_put_nested(struct nl_msg *, int, const struct nl_msg *); extern struct nlattr * nla_nest_start(struct nl_msg *, int); extern int nla_nest_end(struct nl_msg *, struct nlattr *); extern int nla_nest_end_keep_empty(struct nl_msg *, struct nlattr *); extern void nla_nest_cancel(struct nl_msg *, const struct nlattr *); extern int nla_parse_nested(struct nlattr **, int, struct nlattr *, const struct nla_policy *); extern int nla_is_nested(const struct nlattr *); # 17 "criu/net.c" 2 # 1 "/usr/include/libnl3/netlink/msg.h" 1 3 4 # 11 "/usr/include/libnl3/netlink/msg.h" 3 4 # 1 "/usr/include/libnl3/netlink/attr.h" 1 3 4 # 12 "/usr/include/libnl3/netlink/msg.h" 2 3 4 struct nlmsghdr; # 42 "/usr/include/libnl3/netlink/msg.h" 3 4 struct nl_msg; struct nl_tree; struct ucred; extern int nlmsg_size(int); extern int nlmsg_total_size(int); extern int nlmsg_padlen(int); extern void * nlmsg_data(const struct nlmsghdr *); extern int nlmsg_datalen(const struct nlmsghdr *); extern void * nlmsg_tail(const struct nlmsghdr *); extern struct nlattr * nlmsg_attrdata(const struct nlmsghdr *, int); extern int nlmsg_attrlen(const struct nlmsghdr *, int); extern int nlmsg_valid_hdr(const struct nlmsghdr *, int); extern int nlmsg_ok(const struct nlmsghdr *, int); extern struct nlmsghdr * nlmsg_next(struct nlmsghdr *, int *); extern int nlmsg_parse(struct nlmsghdr *, int, struct nlattr **, int, const struct nla_policy *); extern struct nlattr * nlmsg_find_attr(struct nlmsghdr *, int, int); extern int nlmsg_validate(struct nlmsghdr *, int, int, const struct nla_policy *); extern struct nl_msg * nlmsg_alloc(void); extern struct nl_msg * nlmsg_alloc_size(size_t); extern struct nl_msg * nlmsg_alloc_simple(int, int); extern void nlmsg_set_default_size(size_t); extern struct nl_msg * nlmsg_inherit(struct nlmsghdr *); extern struct nl_msg * nlmsg_convert(struct nlmsghdr *); extern void * nlmsg_reserve(struct nl_msg *, size_t, int); extern int nlmsg_append(struct nl_msg *, void *, size_t, int); extern int nlmsg_expand(struct nl_msg *, size_t); extern struct nlmsghdr * nlmsg_put(struct nl_msg *, uint32_t, uint32_t, int, int, int); extern struct nlmsghdr * nlmsg_hdr(struct nl_msg *); extern void nlmsg_get(struct nl_msg *); extern void nlmsg_free(struct nl_msg *); extern void nlmsg_set_proto(struct nl_msg *, int); extern int nlmsg_get_proto(struct nl_msg *); extern size_t nlmsg_get_max_size(struct nl_msg *); extern void nlmsg_set_src(struct nl_msg *, struct sockaddr_nl *); extern struct sockaddr_nl *nlmsg_get_src(struct nl_msg *); extern void nlmsg_set_dst(struct nl_msg *, struct sockaddr_nl *); extern struct sockaddr_nl *nlmsg_get_dst(struct nl_msg *); extern void nlmsg_set_creds(struct nl_msg *, struct ucred *); extern struct ucred * nlmsg_get_creds(struct nl_msg *); extern char * nl_nlmsgtype2str(int, char *, size_t); extern int nl_str2nlmsgtype(const char *); extern char * nl_nlmsg_flags2str(int, char *, size_t); extern int nl_msg_parse(struct nl_msg *, void (*cb)(struct nl_object *, void *), void *); extern void nl_msg_dump(struct nl_msg *, FILE *); # 18 "criu/net.c" 2 # 1 "/usr/include/libnl3/netlink/netlink.h" 1 3 4 # 19 "criu/net.c" 2 # 28 "criu/net.c" # 1 "criu/../soccr/soccr.h" 1 # 53 "criu/../soccr/soccr.h" # 53 "criu/../soccr/soccr.h" void libsoccr_set_log(unsigned int level, void (*fn)(unsigned int level, const char *fmt, ...)); struct libsoccr_sk; union libsoccr_addr { struct sockaddr sa; struct sockaddr_in v4; struct sockaddr_in6 v6; }; struct libsoccr_sk_data { uint32_t state; uint32_t inq_len; uint32_t inq_seq; uint32_t outq_len; uint32_t outq_seq; uint32_t unsq_len; uint32_t opt_mask; uint32_t mss_clamp; uint32_t snd_wscale; uint32_t rcv_wscale; uint32_t timestamp; uint32_t flags; uint32_t snd_wl1; uint32_t snd_wnd; uint32_t max_window; uint32_t rcv_wnd; uint32_t rcv_wup; }; # 123 "criu/../soccr/soccr.h" struct libsoccr_sk *libsoccr_pause(int fd); void libsoccr_resume(struct libsoccr_sk *sk); void libsoccr_release(struct libsoccr_sk *sk); # 168 "criu/../soccr/soccr.h" int libsoccr_save(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, unsigned data_size); # 183 "criu/../soccr/soccr.h" char *libsoccr_get_queue_bytes(struct libsoccr_sk *sk, int queue_id, unsigned flags); union libsoccr_addr *libsoccr_get_addr(struct libsoccr_sk *sk, int self, unsigned flags); # 219 "criu/../soccr/soccr.h" int libsoccr_set_queue_bytes(struct libsoccr_sk *sk, int queue_id, char *bytes, unsigned flags); int libsoccr_set_addr(struct libsoccr_sk *sk, int self, union libsoccr_addr *, unsigned flags); int libsoccr_restore(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, unsigned data_size); # 29 "criu/net.c" 2 # 1 "criu/include/imgset.h" 1 # 1 "criu/include/image-desc.h" 1 # 1 "criu/include/int.h" 1 # 1 "criu/arch/x86/include/asm/int.h" 1 # 1 "criu/include/asm-generic/int.h" 1 typedef uint64_t u64; typedef int64_t s64; typedef uint32_t u32; typedef int32_t s32; typedef uint16_t u16; typedef int16_t s16; typedef uint8_t u8; typedef int8_t s8; # 5 "criu/arch/x86/include/asm/int.h" 2 # 4 "criu/include/int.h" 2 # 5 "criu/include/image-desc.h" 2 enum { CR_FD_INVENTORY, CR_FD_STATS, _CR_FD_TASK_FROM, CR_FD_CORE, CR_FD_IDS, CR_FD_MM, CR_FD_CREDS, CR_FD_FS, _CR_FD_TASK_TO, CR_FD_PAGEMAP, CR_FD_UTSNS, CR_FD_MNTS, CR_FD_USERNS, CR_FD_TIMENS, CR_FD_PIDNS, _CR_FD_IPCNS_FROM, CR_FD_IPC_VAR, CR_FD_IPCNS_SHM, CR_FD_IPCNS_MSG, CR_FD_IPCNS_SEM, _CR_FD_IPCNS_TO, _CR_FD_NETNS_FROM, CR_FD_NETDEV, CR_FD_IFADDR, CR_FD_ROUTE, CR_FD_ROUTE6, CR_FD_RULE, CR_FD_IPTABLES, CR_FD_IP6TABLES, CR_FD_NFTABLES, CR_FD_NETNS, CR_FD_NETNF_CT, CR_FD_NETNF_EXP, _CR_FD_NETNS_TO, CR_FD_PSTREE, CR_FD_SHMEM_PAGEMAP, CR_FD_GHOST_FILE, CR_FD_TCP_STREAM, CR_FD_FDINFO, _CR_FD_GLOB_FROM, CR_FD_FILES, CR_FD_SK_QUEUES, CR_FD_PIPES_DATA, CR_FD_FIFO_DATA, CR_FD_TTY_INFO, CR_FD_TTY_DATA, CR_FD_REMAP_FPATH, CR_FD_CGROUP, CR_FD_FILE_LOCKS, CR_FD_SECCOMP, CR_FD_APPARMOR, CR_FD_MEMFD_INODE, CR_FD_BPFMAP_FILE, CR_FD_BPFMAP_DATA, _CR_FD_GLOB_TO, CR_FD_TMPFS_IMG, CR_FD_TMPFS_DEV, CR_FD_BINFMT_MISC, CR_FD_BINFMT_MISC_OLD, CR_FD_PAGES, CR_FD_SIGACT, CR_FD_VMAS, CR_FD_PAGES_OLD, CR_FD_SHM_PAGES_OLD, CR_FD_RLIMIT, CR_FD_ITIMERS, CR_FD_POSIX_TIMERS, CR_FD_IRMAP_CACHE, CR_FD_CPUINFO, CR_FD_SIGNAL, CR_FD_PSIGNAL, CR_FD_INOTIFY_WD, CR_FD_FANOTIFY_MARK, CR_FD_EVENTPOLL_TFD, CR_FD_REG_FILES, CR_FD_INETSK, CR_FD_NS_FILES, CR_FD_PACKETSK, CR_FD_NETLINK_SK, CR_FD_EVENTFD_FILE, CR_FD_EVENTPOLL_FILE, CR_FD_SIGNALFD, CR_FD_TUNFILE, CR_FD_TIMERFD, CR_FD_INOTIFY_FILE, CR_FD_FANOTIFY_FILE, CR_FD_EXT_FILES, CR_FD_UNIXSK, CR_FD_FIFO, CR_FD_PIPES, CR_FD_TTY_FILES, CR_FD_MEMFD_FILE, CR_FD_AUTOFS, CR_FD_MAX }; struct cr_fd_desc_tmpl { const char *fmt; u32 magic; int oflags; }; extern struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX]; # 5 "criu/include/imgset.h" 2 # 1 "criu/include/log.h" 1 # 1 "/usr/include/inttypes.h" 1 3 4 # 34 "/usr/include/inttypes.h" 3 4 # 34 "/usr/include/inttypes.h" 3 4 typedef int __gwchar_t; # 327 "/usr/include/inttypes.h" 3 4 typedef struct { long int quot; long int rem; } imaxdiv_t; # 351 "/usr/include/inttypes.h" 3 4 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoimax") __attribute__ ((__nothrow__ , __leaf__)) ; extern uintmax_t strtoumax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __asm__ ("" "__isoc23_strtoumax") __attribute__ ((__nothrow__ , __leaf__)) ; extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __asm__ ("" "__isoc23_wcstoimax") __attribute__ ((__nothrow__ , __leaf__)) ; extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __asm__ ("" "__isoc23_wcstoumax") __attribute__ ((__nothrow__ , __leaf__)) ; # 415 "/usr/include/inttypes.h" 3 4 # 5 "criu/include/log.h" 2 # 1 "/usr/include/errno.h" 1 3 4 # 28 "/usr/include/errno.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 # 6 "/usr/include/asm-generic/errno.h" 2 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4 # 2 "/usr/include/linux/errno.h" 2 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4 # 29 "/usr/include/errno.h" 2 3 4 extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern char *program_invocation_name; extern char *program_invocation_short_name; # 1 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 3 4 typedef int error_t; # 49 "/usr/include/errno.h" 2 3 4 # 10 "criu/include/log.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h" 1 3 4 # 11 "criu/include/log.h" 2 # 27 "criu/include/log.h" # 27 "criu/include/log.h" extern void print_on_level(unsigned int loglevel, const char *format, ...) __attribute__((__format__(__printf__, 2, 3))); void flush_early_log_buffer(int fd); # 6 "criu/include/imgset.h" 2 # 1 "include/common/bug.h" 1 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stdbool.h" 1 3 4 # 6 "include/common/bug.h" 2 # 1 "include/common/compiler.h" 1 # 8 "include/common/bug.h" 2 # 7 "criu/include/imgset.h" 2 # 1 "criu/include/image.h" 1 # 1 "criu/include/servicefd.h" 1 # 10 "criu/include/servicefd.h" # 1 "criu/include/criu-log.h" 1 # 26 "criu/include/criu-log.h" extern int log_init(const char *output); extern void log_fini(void); extern int log_init_by_pid(pid_t pid); extern int log_keep_err(void); extern char *log_first_err(void); extern void log_set_fd(int fd); extern int log_get_fd(void); extern void log_set_loglevel(unsigned int loglevel); extern unsigned int log_get_loglevel(void); struct timeval; extern void log_get_logstart(struct timeval *); extern int write_pidfile(int pid); static inline int pr_quelled(unsigned int loglevel) { return log_get_loglevel() < loglevel && loglevel != (0); } # 11 "criu/include/servicefd.h" 2 enum sfd_type { SERVICE_FD_MIN, LOG_FD_OFF, IMG_FD_OFF, IMG_STREAMER_FD_OFF, PROC_FD_OFF, PROC_PID_FD_OFF, PROC_SELF_FD_OFF, CR_PROC_FD_OFF, ROOT_FD_OFF, CGROUP_YARD, CGROUPD_SK, USERNSD_SK, NS_FD_OFF, TRANSPORT_FD_OFF, RPC_SK_OFF, FDSTORE_SK_OFF, SERVICE_FD_MAX }; struct pstree_item; extern # 38 "criu/include/servicefd.h" 3 4 _Bool # 38 "criu/include/servicefd.h" sfds_protected; extern const char *sfd_type_name(enum sfd_type type); extern int init_service_fd(void); extern int get_service_fd(enum sfd_type type); extern # 43 "criu/include/servicefd.h" 3 4 _Bool # 43 "criu/include/servicefd.h" is_any_service_fd(int fd); extern # 44 "criu/include/servicefd.h" 3 4 _Bool # 44 "criu/include/servicefd.h" is_service_fd(int fd, enum sfd_type type); extern int service_fd_min_fd(struct pstree_item *item); extern int install_service_fd(enum sfd_type type, int fd); extern int close_service_fd(enum sfd_type type); extern void __close_service_fd(enum sfd_type type); extern int clone_service_fd(struct pstree_item *me); # 8 "criu/include/image.h" 2 # 1 "criu/include/fcntl.h" 1 # 10 "criu/include/image.h" 2 # 1 "criu/include/magic.h" 1 # 11 "criu/include/image.h" 2 # 1 "criu/include/bfd.h" 1 # 1 "include/common/err.h" 1 # 19 "include/common/err.h" static inline void *ERR_PTR(long error) { return (void *)error; } static inline long PTR_ERR(const void *ptr) { return (long)ptr; } static inline long IS_ERR(const void *ptr) { return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0); } static inline long IS_ERR_OR_NULL(const void *ptr) { return !ptr || __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0); } static inline void *ERR_CAST(const void *ptr) { return (void *)ptr; } static inline int PTR_RET(const void *ptr) { if (IS_ERR(ptr)) return PTR_ERR(ptr); else return 0; } # 5 "criu/include/bfd.h" 2 struct bfd_buf; struct xbuf { char *mem; char *data; unsigned int sz; struct bfd_buf *buf; }; struct bfd { int fd; # 16 "criu/include/bfd.h" 3 4 _Bool # 16 "criu/include/bfd.h" writable; struct xbuf b; }; static inline # 20 "criu/include/bfd.h" 3 4 _Bool # 20 "criu/include/bfd.h" bfd_buffered(struct bfd *b) { return b->b.mem != # 22 "criu/include/bfd.h" 3 4 ((void *)0) # 22 "criu/include/bfd.h" ; } static inline void bfd_setraw(struct bfd *b) { b->b.mem = # 27 "criu/include/bfd.h" 3 4 ((void *)0) # 27 "criu/include/bfd.h" ; } int bfdopenr(struct bfd *f); int bfdopenw(struct bfd *f); void bclose(struct bfd *f); char *breadline(struct bfd *f); char *breadchr(struct bfd *f, char c); int bwrite(struct bfd *f, const void *buf, int sz); struct iovec; int bwritev(struct bfd *f, const struct iovec *iov, int cnt); int bread(struct bfd *f, void *buf, int sz); int bfd_flush_images(void); # 12 "criu/include/image.h" 2 # 103 "criu/include/image.h" extern # 103 "criu/include/image.h" 3 4 _Bool # 103 "criu/include/image.h" ns_per_id; extern # 104 "criu/include/image.h" 3 4 _Bool # 104 "criu/include/image.h" img_common_magic; struct cr_img { union { struct bfd _x; struct { int fd; int type; unsigned long oflags; char *path; }; }; }; static inline # 127 "criu/include/image.h" 3 4 _Bool # 127 "criu/include/image.h" empty_image(struct cr_img *img) { return img && img->_x.fd == (-404); } static inline # 132 "criu/include/image.h" 3 4 _Bool # 132 "criu/include/image.h" lazy_image(struct cr_img *img) { return img->_x.fd == (-505); } extern int open_image_lazy(struct cr_img *img); static inline int img_raw_fd(struct cr_img *img) { if (!img) return -1; if (lazy_image(img) && open_image_lazy(img)) return -1; do { if (((bfd_buffered(&img->_x)))) { print_on_level((1), "Error (%s:%d): " "BUG at %s:%d\n", "criu/include/image.h", 146, "criu/include/image.h", 146); raise( # 146 "criu/include/image.h" 3 4 6 # 146 "criu/include/image.h" ); *(volatile unsigned long *) # 146 "criu/include/image.h" 3 4 ((void *)0) # 146 "criu/include/image.h" = 0xdead0000 + 146; __builtin_unreachable(); } } while (0); return img->_x.fd; } extern off_t img_raw_size(struct cr_img *img); extern int open_image_dir(char *dir, int mode); extern void close_image_dir(void); extern int open_parent(int dfd, int *pfd); extern struct cr_img *open_image_at(int dfd, int type, unsigned long flags, ...); extern int open_image_lazy(struct cr_img *img); extern struct cr_img *open_pages_image(unsigned long flags, struct cr_img *pmi, u32 *pages_id); extern struct cr_img *open_pages_image_at(int dfd, unsigned long flags, struct cr_img *pmi, u32 *pages_id); extern void up_page_ids_base(void); extern struct cr_img *img_from_fd(int fd); extern int write_img_buf(struct cr_img *, const void *ptr, int size); extern int read_img_buf_eof(struct cr_img *, void *ptr, int size); extern int read_img_buf(struct cr_img *, void *ptr, int size); extern int read_img_str(struct cr_img *, char **pstr, int size); extern void close_image(struct cr_img *); # 8 "criu/include/imgset.h" 2 struct cr_imgset { int fd_off; int fd_nr; struct cr_img **_imgs; }; static inline struct cr_img *img_from_set(const struct cr_imgset *imgset, int type) { int idx; idx = type - imgset->fd_off; do { if (((idx > imgset->fd_nr))) { print_on_level((1), "Error (%s:%d): " "BUG at %s:%d\n", "criu/include/imgset.h", 20, "criu/include/imgset.h", 20); raise( # 20 "criu/include/imgset.h" 3 4 6 # 20 "criu/include/imgset.h" ); *(volatile unsigned long *) # 20 "criu/include/imgset.h" 3 4 ((void *)0) # 20 "criu/include/imgset.h" = 0xdead0000 + 20; __builtin_unreachable(); } } while (0); return imgset->_imgs[idx]; } extern struct cr_imgset *glob_imgset; extern struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX]; extern struct cr_imgset *cr_task_imgset_open(int pid, int mode); extern struct cr_imgset *cr_imgset_open_range(int pid, int from, int to, unsigned long flags); extern struct cr_imgset *cr_glob_imgset_open(int mode); extern void close_cr_imgset(struct cr_imgset **cr_imgset); # 31 "criu/net.c" 2 # 1 "criu/include/namespaces.h" 1 # 1 "criu/include/files.h" 1 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4 # 99 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4 # 102 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4 # 205 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 # 205 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 240 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 264 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 291 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 313 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); # 338 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); # 352 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int chmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int lchmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)); extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__)); extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__)); extern int mkdir (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int mkfifo (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 452 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__)); # 465 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/statx.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/bits/statx.h" 3 4 # 1 "/usr/include/linux/stat.h" 1 3 4 # 56 "/usr/include/linux/stat.h" 3 4 struct statx_timestamp { __s64 tv_sec; __u32 tv_nsec; __s32 __reserved; }; # 99 "/usr/include/linux/stat.h" 3 4 struct statx { __u32 stx_mask; __u32 stx_blksize; __u64 stx_attributes; __u32 stx_nlink; __u32 stx_uid; __u32 stx_gid; __u16 stx_mode; __u16 __spare0[1]; __u64 stx_ino; __u64 stx_size; __u64 stx_blocks; __u64 stx_attributes_mask; struct statx_timestamp stx_atime; struct statx_timestamp stx_btime; struct statx_timestamp stx_ctime; struct statx_timestamp stx_mtime; __u32 stx_rdev_major; __u32 stx_rdev_minor; __u32 stx_dev_major; __u32 stx_dev_minor; __u64 stx_mnt_id; __u32 stx_dio_mem_align; __u32 stx_dio_offset_align; __u64 __spare3[12]; }; # 32 "/usr/include/x86_64-linux-gnu/bits/statx.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 2 3 4 # 58 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4 int statx (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct statx *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5))); # 40 "/usr/include/x86_64-linux-gnu/bits/statx.h" 2 3 4 # 466 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4 # 5 "criu/include/files.h" 2 # 1 "include/common/lock.h" 1 # 1 "/usr/include/linux/futex.h" 1 3 4 # 89 "/usr/include/linux/futex.h" 3 4 struct futex_waitv { __u64 val; __u64 uaddr; __u32 flags; __u32 __reserved; }; # 110 "/usr/include/linux/futex.h" 3 4 struct robust_list { struct robust_list *next; }; # 122 "/usr/include/linux/futex.h" 3 4 struct robust_list_head { struct robust_list list; long futex_offset; # 146 "/usr/include/linux/futex.h" 3 4 struct robust_list *list_op_pending; }; # 6 "include/common/lock.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4 # 34 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/syslimits.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4 # 205 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 26 "/usr/include/limits.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 # 27 "/usr/include/limits.h" 2 3 4 # 195 "/usr/include/limits.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4 # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 # 81 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 3 4 extern long int __sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); # 82 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 # 162 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 # 196 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4 # 200 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 1 3 4 # 64 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uio_lim.h" 1 3 4 # 65 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 2 3 4 # 204 "/usr/include/limits.h" 2 3 4 # 206 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 2 3 4 # 8 "/usr/lib/gcc/x86_64-linux-gnu/13/include/syslimits.h" 2 3 4 # 35 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 2 3 4 # 8 "include/common/lock.h" 2 # 1 "include/common/asm/atomic.h" 1 # 1 "include/common/arch/x86/asm/cmpxchg.h" 1 # 5 "include/common/asm/atomic.h" 2 # 6 "include/common/asm/atomic.h" typedef struct { int counter; } atomic_t; static inline int atomic_read(const atomic_t *v) { return (*(volatile int *)&(v)->counter); } static inline void atomic_set(atomic_t *v, int i) { v->counter = i; } static inline void atomic_add(int i, atomic_t *v) { asm volatile("\n\tlock; " "addl %1,%0" : "+m"(v->counter) : "ir"(i)); } static inline void atomic_sub(int i, atomic_t *v) { asm volatile("\n\tlock; " "subl %1,%0" : "+m"(v->counter) : "ir"(i)); } static inline void atomic_inc(atomic_t *v) { asm volatile("\n\tlock; " "incl %0" : "+m"(v->counter)); } static inline void atomic_dec(atomic_t *v) { asm volatile("\n\tlock; " "decl %0" : "+m"(v->counter)); } static inline int atomic_dec_and_test(atomic_t *v) { unsigned char c; asm volatile("\n\tlock; " "decl %0; sete %1" : "+m"(v->counter), "=qm"(c) : : "memory"); return c != 0; } static inline int atomic_add_return(int i, atomic_t *v) { return i + ({ __typeof__(*(((&v->counter)))) __ret = (((i))); switch (sizeof(*(((&v->counter))))) { case 1: asm volatile("lock ;" "xadd" "b %b0, %1\n" : "+q"(__ret), "+m"(*(((&v->counter)))) : : "memory", "cc"); break; case 2: asm volatile("lock ;" "xadd" "w %w0, %1\n" : "+r"(__ret), "+m"(*(((&v->counter)))) : : "memory", "cc"); break; case 4: asm volatile("lock ;" "xadd" "l %0, %1\n" : "+r"(__ret), "+m"(*(((&v->counter)))) : : "memory", "cc"); break; case 8: asm volatile("lock ;" "xadd" "q %q0, %1\n" : "+r"(__ret), "+m"(*(((&v->counter)))) : : "memory", "cc"); break; } __ret; }); } static inline int atomic_sub_return(int i, atomic_t *v) { return atomic_add_return(-i, v); } static inline int atomic_cmpxchg(atomic_t *v, int old, int new) { return ({ __typeof__(*((&v->counter))) __ret; __typeof__(*((&v->counter))) __old = ((old)); __typeof__(*((&v->counter))) __new = ((new)); switch ((sizeof(*(&v->counter)))) { case 1: { volatile uint8_t *__ptr = (volatile uint8_t *)((&v->counter)); asm volatile("\n\tlock; " "cmpxchgb %2,%1" : "=a"(__ret), "+m"(*__ptr) : "q"(__new), "0"(__old) : "memory"); break; } case 2: { volatile uint16_t *__ptr = (volatile uint16_t *)((&v->counter)); asm volatile("\n\tlock; " "cmpxchgw %2,%1" : "=a"(__ret), "+m"(*__ptr) : "r"(__new), "0"(__old) : "memory"); break; } case 4: { volatile uint32_t *__ptr = (volatile uint32_t *)((&v->counter)); asm volatile("\n\tlock; " "cmpxchgl %2,%1" : "=a"(__ret), "+m"(*__ptr) : "r"(__new), "0"(__old) : "memory"); break; } case 8: { volatile uint64_t *__ptr = (volatile uint64_t *)((&v->counter)); asm volatile("\n\tlock; " "cmpxchgq %2,%1" : "=a"(__ret), "+m"(*__ptr) : "r"(__new), "0"(__old) : "memory"); break; } } __ret; }); } # 10 "include/common/lock.h" 2 # 24 "include/common/lock.h" # 1 "/usr/include/x86_64-linux-gnu/sys/syscall.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/sys/syscall.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/unistd.h" 1 3 4 # 20 "/usr/include/x86_64-linux-gnu/asm/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/unistd_64.h" 1 3 4 # 21 "/usr/include/x86_64-linux-gnu/asm/unistd.h" 2 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/syscall.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/syscall.h" 1 3 4 # 30 "/usr/include/x86_64-linux-gnu/sys/syscall.h" 2 3 4 # 25 "include/common/lock.h" 2 static inline long sys_futex(uint32_t *addr1, int op, uint32_t val1, struct timespec *timeout, uint32_t *addr2, uint32_t val3) { int rc = syscall( # 28 "include/common/lock.h" 3 4 202 # 28 "include/common/lock.h" , addr1, op, val1, timeout, addr2, val3); if (rc == -1) rc = - # 30 "include/common/lock.h" 3 4 (*__errno_location ()) # 30 "include/common/lock.h" ; return rc; } typedef struct { atomic_t raw; } __attribute__((aligned(sizeof(int)))) futex_t; static inline uint32_t futex_get(futex_t *f) { return atomic_read(&f->raw); } static inline void futex_set(futex_t *f, uint32_t v) { atomic_set(&f->raw, (int)v); } # 78 "include/common/lock.h" static inline void futex_set_and_wake(futex_t *f, uint32_t v) { atomic_set(&f->raw, (int)v); if ((sys_futex((uint32_t *)&f->raw.counter, # 81 "include/common/lock.h" 3 4 1 # 81 "include/common/lock.h" , 0x7fffffff # 81 "include/common/lock.h" , # 81 "include/common/lock.h" 3 4 ((void *)0) # 81 "include/common/lock.h" , # 81 "include/common/lock.h" 3 4 ((void *)0) # 81 "include/common/lock.h" , 0) < 0)) *(volatile unsigned long *) # 81 "include/common/lock.h" 3 4 ((void *)0) # 81 "include/common/lock.h" = 0xdead0000 + 81; } static inline void futex_wake(futex_t *f) { if ((sys_futex((uint32_t *)&f->raw.counter, # 87 "include/common/lock.h" 3 4 1 # 87 "include/common/lock.h" , 0x7fffffff # 87 "include/common/lock.h" , # 87 "include/common/lock.h" 3 4 ((void *)0) # 87 "include/common/lock.h" , # 87 "include/common/lock.h" 3 4 ((void *)0) # 87 "include/common/lock.h" , 0) < 0)) *(volatile unsigned long *) # 87 "include/common/lock.h" 3 4 ((void *)0) # 87 "include/common/lock.h" = 0xdead0000 + 87; } static inline void futex_abort_and_wake(futex_t *f) { ((void)sizeof(char[1 - 2 * !!(!((-1U) & (0x80000000)))])); futex_set_and_wake(f, (-1U)); } static inline void futex_dec_and_wake(futex_t *f) { atomic_dec(&f->raw); if ((sys_futex((uint32_t *)&f->raw.counter, # 101 "include/common/lock.h" 3 4 1 # 101 "include/common/lock.h" , 0x7fffffff # 101 "include/common/lock.h" , # 101 "include/common/lock.h" 3 4 ((void *)0) # 101 "include/common/lock.h" , # 101 "include/common/lock.h" 3 4 ((void *)0) # 101 "include/common/lock.h" , 0) < 0)) *(volatile unsigned long *) # 101 "include/common/lock.h" 3 4 ((void *)0) # 101 "include/common/lock.h" = 0xdead0000 + 101; } static inline void futex_inc_and_wake(futex_t *f) { atomic_inc(&f->raw); if ((sys_futex((uint32_t *)&f->raw.counter, # 108 "include/common/lock.h" 3 4 1 # 108 "include/common/lock.h" , 0x7fffffff # 108 "include/common/lock.h" , # 108 "include/common/lock.h" 3 4 ((void *)0) # 108 "include/common/lock.h" , # 108 "include/common/lock.h" 3 4 ((void *)0) # 108 "include/common/lock.h" , 0) < 0)) *(volatile unsigned long *) # 108 "include/common/lock.h" 3 4 ((void *)0) # 108 "include/common/lock.h" = 0xdead0000 + 108; } static inline void futex_inc(futex_t *f) { atomic_inc(&f->raw); } static inline void futex_dec(futex_t *f) { atomic_dec(&f->raw); } # 136 "include/common/lock.h" static inline void futex_wait_while(futex_t *f, uint32_t v) { while ((uint32_t)atomic_read(&f->raw) == v) { int ret = sys_futex((uint32_t *)&f->raw.counter, # 139 "include/common/lock.h" 3 4 0 # 139 "include/common/lock.h" , v, # 139 "include/common/lock.h" 3 4 ((void *)0) # 139 "include/common/lock.h" , # 139 "include/common/lock.h" 3 4 ((void *)0) # 139 "include/common/lock.h" , 0); if ((ret < 0 && ret != - # 140 "include/common/lock.h" 3 4 11 # 140 "include/common/lock.h" )) *(volatile unsigned long *) # 140 "include/common/lock.h" 3 4 ((void *)0) # 140 "include/common/lock.h" = 0xdead0000 + 140; } } typedef struct { atomic_t raw; } mutex_t; static inline void mutex_init(mutex_t *m) { uint32_t c = 0; atomic_set(&m->raw, (int)c); } static inline void mutex_lock(mutex_t *m) { uint32_t c; int ret; while ((c = (uint32_t)(atomic_add_return(1, &m->raw))) != 1) { ret = sys_futex((uint32_t *)&m->raw.counter, # 160 "include/common/lock.h" 3 4 0 # 160 "include/common/lock.h" , c, # 160 "include/common/lock.h" 3 4 ((void *)0) # 160 "include/common/lock.h" , # 160 "include/common/lock.h" 3 4 ((void *)0) # 160 "include/common/lock.h" , 0); if ((ret < 0 && ret != - # 161 "include/common/lock.h" 3 4 11 # 161 "include/common/lock.h" )) *(volatile unsigned long *) # 161 "include/common/lock.h" 3 4 ((void *)0) # 161 "include/common/lock.h" = 0xdead0000 + 161; } } static inline void mutex_unlock(mutex_t *m) { uint32_t c = 0; atomic_set(&m->raw, (int)c); if ((sys_futex((uint32_t *)&m->raw.counter, # 169 "include/common/lock.h" 3 4 1 # 169 "include/common/lock.h" , 1, # 169 "include/common/lock.h" 3 4 ((void *)0) # 169 "include/common/lock.h" , # 169 "include/common/lock.h" 3 4 ((void *)0) # 169 "include/common/lock.h" , 0) < 0)) *(volatile unsigned long *) # 169 "include/common/lock.h" 3 4 ((void *)0) # 169 "include/common/lock.h" = 0xdead0000 + 169; } # 10 "criu/include/files.h" 2 # 1 "include/common/list.h" 1 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 9 "include/common/list.h" 2 struct list_head { struct list_head *prev, *next; }; static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; list->prev = list; } static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { next->prev = new; new->next = next; new->prev = prev; prev->next = new; } static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } static inline void list_add_tail(struct list_head *new, struct list_head *head) { __list_add(new, head->prev, head); } static inline void __list_del(struct list_head *prev, struct list_head *next) { next->prev = prev; prev->next = next; } static inline void __list_del_entry(struct list_head *entry) { __list_del(entry->prev, entry->next); } static inline void list_del(struct list_head *entry) { __list_del(entry->prev, entry->next); entry->next = ((void *)0x00100100 + 0); entry->prev = ((void *)0x00200200 + 0); } static inline void list_replace(struct list_head *old, struct list_head *new) { new->next = old->next; new->next->prev = new; new->prev = old->prev; new->prev->next = new; } static inline void list_replace_init(struct list_head *old, struct list_head *new) { list_replace(old, new); INIT_LIST_HEAD(old); } static inline void list_del_init(struct list_head *entry) { __list_del_entry(entry); INIT_LIST_HEAD(entry); } static inline void list_move(struct list_head *list, struct list_head *head) { __list_del_entry(list); list_add(list, head); } static inline void list_move_tail(struct list_head *list, struct list_head *head) { __list_del_entry(list); list_add_tail(list, head); } static inline int list_is_last(const struct list_head *list, const struct list_head *head) { return list->next == head; } static inline int list_is_first(const struct list_head *list, const struct list_head *head) { return list->prev == head; } static inline int list_empty(const struct list_head *head) { return head->next == head; } static inline int list_empty_careful(const struct list_head *head) { struct list_head *next = head->next; return (next == head) && (next == head->prev); } static inline void list_rotate_left(struct list_head *head) { struct list_head *first; if (!list_empty(head)) { first = head->next; list_move_tail(first, head); } } static inline int list_is_singular(const struct list_head *head) { return !list_empty(head) && (head->next == head->prev); } static inline void __list_cut_position(struct list_head *list, struct list_head *head, struct list_head *entry) { struct list_head *new_first = entry->next; list->next = head->next; list->next->prev = list; list->prev = entry; entry->next = list; head->next = new_first; new_first->prev = head; } static inline void list_cut_position(struct list_head *list, struct list_head *head, struct list_head *entry) { if (list_empty(head)) return; if (list_is_singular(head) && (head->next != entry && head != entry)) return; if (entry == head) INIT_LIST_HEAD(list); else __list_cut_position(list, head, entry); } static inline void __list_splice(const struct list_head *list, struct list_head *prev, struct list_head *next) { struct list_head *first = list->next; struct list_head *last = list->prev; first->prev = prev; prev->next = first; last->next = next; next->prev = last; } static inline void list_splice(const struct list_head *list, struct list_head *head) { if (!list_empty(list)) __list_splice(list, head, head->next); } static inline void list_splice_tail(struct list_head *list, struct list_head *head) { if (!list_empty(list)) __list_splice(list, head->prev, head); } static inline void list_splice_init(struct list_head *list, struct list_head *head) { if (!list_empty(list)) { __list_splice(list, head, head->next); INIT_LIST_HEAD(list); } } static inline void list_splice_tail_init(struct list_head *list, struct list_head *head) { if (!list_empty(list)) { __list_splice(list, head->prev, head); INIT_LIST_HEAD(list); } } # 256 "include/common/list.h" struct hlist_head { struct hlist_node *first; }; struct hlist_node { struct hlist_node *next, **pprev; }; # 271 "include/common/list.h" static inline void INIT_HLIST_NODE(struct hlist_node *h) { h->next = # 273 "include/common/list.h" 3 4 ((void *)0) # 273 "include/common/list.h" ; h->pprev = # 274 "include/common/list.h" 3 4 ((void *)0) # 274 "include/common/list.h" ; } static inline int hlist_unhashed(const struct hlist_node *h) { return !h->pprev; } static inline int hlist_empty(const struct hlist_head *h) { return !h->first; } static inline void __hlist_del(struct hlist_node *n) { struct hlist_node *next = n->next; struct hlist_node **pprev = n->pprev; *pprev = next; if (next) next->pprev = pprev; } static inline void hlist_del(struct hlist_node *n) { __hlist_del(n); n->next = ((void *)0x00100100 + 0); n->pprev = ((void *)0x00200200 + 0); } static inline void hlist_del_init(struct hlist_node *n) { if (!hlist_unhashed(n)) { __hlist_del(n); INIT_HLIST_NODE(n); } } static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) { struct hlist_node *first = h->first; n->next = first; if (first) first->pprev = &n->next; h->first = n; n->pprev = &h->first; } static inline void hlist_add_before(struct hlist_node *n, struct hlist_node *next) { n->pprev = next->pprev; n->next = next; next->pprev = &n->next; *(n->pprev) = n; } static inline void hlist_add_after(struct hlist_node *n, struct hlist_node *next) { next->next = n->next; n->next = next; next->pprev = &n->next; if (next->next) next->next->pprev = &next->next; } static inline void hlist_add_fake(struct hlist_node *n) { n->pprev = &n->next; } static inline void hlist_move_list(struct hlist_head *old, struct hlist_head *new) { new->first = old->first; if (new->first) new->first->pprev = &new->first; old->first = # 355 "include/common/list.h" 3 4 ((void *)0) # 355 "include/common/list.h" ; } # 11 "criu/include/files.h" 2 # 1 "criu/include/pid.h" 1 # 1 "./compel/include/uapi/compel/task-state.h" 1 enum __compel_task_state { COMPEL_TASK_ALIVE = 0x01, COMPEL_TASK_DEAD = 0x02, COMPEL_TASK_STOPPED = 0x03, COMPEL_TASK_ZOMBIE = 0x06, COMPEL_TASK_MAX = 0x7f }; # 5 "criu/include/pid.h" 2 # 1 "criu/include/rbtree.h" 1 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 9 "criu/include/rbtree.h" 2 struct rb_node { unsigned long rb_parent_color; struct rb_node *rb_right; struct rb_node *rb_left; } __attribute__((aligned(sizeof(long)))); struct rb_root { struct rb_node *rb_node; }; # 39 "criu/include/rbtree.h" static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) { rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; } static inline void rb_set_color(struct rb_node *rb, int color) { rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; } # 60 "criu/include/rbtree.h" static inline void rb_init_node(struct rb_node *node) { *node = (struct rb_node){}; (rb_set_parent(node, node)); } extern void rb_insert_color(struct rb_node *node, struct rb_root *root); extern void rb_erase(struct rb_node *node, struct rb_root *root); extern struct rb_node *rb_first(const struct rb_root *root); extern struct rb_node *rb_last(const struct rb_root *root); extern struct rb_node *rb_next(const struct rb_node *node); extern struct rb_node *rb_prev(const struct rb_node *node); extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root); static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link) { node->rb_parent_color = (unsigned long)parent; node->rb_left = node->rb_right = # 82 "criu/include/rbtree.h" 3 4 ((void *)0) # 82 "criu/include/rbtree.h" ; *rb_link = node; } static inline void rb_link_and_balance(struct rb_root *root, struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link) { rb_link_node(node, parent, rb_link); rb_insert_color(node, root); } # 7 "criu/include/pid.h" 2 enum __criu_task_state { TASK_ALIVE = COMPEL_TASK_ALIVE, TASK_DEAD = COMPEL_TASK_DEAD, TASK_STOPPED = COMPEL_TASK_STOPPED, TASK_ZOMBIE = COMPEL_TASK_ZOMBIE, TASK_HELPER = COMPEL_TASK_MAX + 1, TASK_THREAD, TASK_UNDEF = 0xff }; struct pid { struct pstree_item *item; pid_t real; int state; int stop_signo; struct { pid_t virt; struct rb_node node; } ns[1]; }; static inline # 55 "criu/include/pid.h" 3 4 _Bool # 55 "criu/include/pid.h" pid_rst_prio(unsigned pid_a, unsigned pid_b) { return pid_a < pid_b; } static inline # 60 "criu/include/pid.h" 3 4 _Bool # 60 "criu/include/pid.h" pid_rst_prio_eq(unsigned pid_a, unsigned pid_b) { return pid_a <= pid_b; } # 12 "criu/include/files.h" 2 # 1 "criu/include/rst_info.h" 1 # 1 "criu/include/vma.h" 1 # 1 "./images/vma.pb-c.h" 1 # 1 "/usr/include/protobuf-c/protobuf-c.h" 1 3 4 # 199 "/usr/include/protobuf-c/protobuf-c.h" 3 4 # 1 "/usr/include/assert.h" 1 3 4 # 66 "/usr/include/assert.h" 3 4 # 69 "/usr/include/assert.h" 3 4 extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); # 200 "/usr/include/protobuf-c/protobuf-c.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4 # 201 "/usr/include/protobuf-c/protobuf-c.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 202 "/usr/include/protobuf-c/protobuf-c.h" 2 3 4 # 212 "/usr/include/protobuf-c/protobuf-c.h" 3 4 # 244 "/usr/include/protobuf-c/protobuf-c.h" 3 4 extern const char protobuf_c_empty_string[]; # 259 "/usr/include/protobuf-c/protobuf-c.h" 3 4 typedef enum { PROTOBUF_C_FIELD_FLAG_PACKED = (1 << 0), PROTOBUF_C_FIELD_FLAG_DEPRECATED = (1 << 1), PROTOBUF_C_FIELD_FLAG_ONEOF = (1 << 2), } ProtobufCFieldFlag; # 278 "/usr/include/protobuf-c/protobuf-c.h" 3 4 typedef enum { PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_LABEL_NONE, } ProtobufCLabel; # 310 "/usr/include/protobuf-c/protobuf-c.h" 3 4 typedef enum { PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_SINT32, PROTOBUF_C_TYPE_SFIXED32, PROTOBUF_C_TYPE_INT64, PROTOBUF_C_TYPE_SINT64, PROTOBUF_C_TYPE_SFIXED64, PROTOBUF_C_TYPE_UINT32, PROTOBUF_C_TYPE_FIXED32, PROTOBUF_C_TYPE_UINT64, PROTOBUF_C_TYPE_FIXED64, PROTOBUF_C_TYPE_FLOAT, PROTOBUF_C_TYPE_DOUBLE, PROTOBUF_C_TYPE_BOOL, PROTOBUF_C_TYPE_ENUM, PROTOBUF_C_TYPE_STRING, PROTOBUF_C_TYPE_BYTES, PROTOBUF_C_TYPE_MESSAGE, } ProtobufCType; # 338 "/usr/include/protobuf-c/protobuf-c.h" 3 4 typedef enum { PROTOBUF_C_WIRE_TYPE_VARINT = 0, PROTOBUF_C_WIRE_TYPE_64BIT = 1, PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED = 2, PROTOBUF_C_WIRE_TYPE_32BIT = 5, } ProtobufCWireType; struct ProtobufCAllocator; struct ProtobufCBinaryData; struct ProtobufCBuffer; struct ProtobufCBufferSimple; struct ProtobufCEnumDescriptor; struct ProtobufCEnumValue; struct ProtobufCEnumValueIndex; struct ProtobufCFieldDescriptor; struct ProtobufCIntRange; struct ProtobufCMessage; struct ProtobufCMessageDescriptor; struct ProtobufCMessageUnknownField; struct ProtobufCMethodDescriptor; struct ProtobufCService; struct ProtobufCServiceDescriptor; typedef struct ProtobufCAllocator ProtobufCAllocator; typedef struct ProtobufCBinaryData ProtobufCBinaryData; typedef struct ProtobufCBuffer ProtobufCBuffer; typedef struct ProtobufCBufferSimple ProtobufCBufferSimple; typedef struct ProtobufCEnumDescriptor ProtobufCEnumDescriptor; typedef struct ProtobufCEnumValue ProtobufCEnumValue; typedef struct ProtobufCEnumValueIndex ProtobufCEnumValueIndex; typedef struct ProtobufCFieldDescriptor ProtobufCFieldDescriptor; typedef struct ProtobufCIntRange ProtobufCIntRange; typedef struct ProtobufCMessage ProtobufCMessage; typedef struct ProtobufCMessageDescriptor ProtobufCMessageDescriptor; typedef struct ProtobufCMessageUnknownField ProtobufCMessageUnknownField; typedef struct ProtobufCMethodDescriptor ProtobufCMethodDescriptor; typedef struct ProtobufCService ProtobufCService; typedef struct ProtobufCServiceDescriptor ProtobufCServiceDescriptor; typedef int protobuf_c_boolean; typedef void (*ProtobufCClosure)(const ProtobufCMessage *, void *closure_data); typedef void (*ProtobufCMessageInit)(ProtobufCMessage *); typedef void (*ProtobufCServiceDestroy)(ProtobufCService *); struct ProtobufCAllocator { void *(*alloc)(void *allocator_data, size_t size); void (*free)(void *allocator_data, void *pointer); void *allocator_data; }; # 406 "/usr/include/protobuf-c/protobuf-c.h" 3 4 struct ProtobufCBinaryData { size_t len; uint8_t *data; }; # 446 "/usr/include/protobuf-c/protobuf-c.h" 3 4 struct ProtobufCBuffer { void (*append)(ProtobufCBuffer *buffer, size_t len, const uint8_t *data); }; # 481 "/usr/include/protobuf-c/protobuf-c.h" 3 4 struct ProtobufCBufferSimple { ProtobufCBuffer base; size_t alloced; size_t len; uint8_t *data; protobuf_c_boolean must_free_data; ProtobufCAllocator *allocator; }; struct ProtobufCEnumDescriptor { uint32_t magic; const char *name; const char *short_name; const char *c_name; const char *package_name; unsigned n_values; const ProtobufCEnumValue *values; unsigned n_value_names; const ProtobufCEnumValueIndex *values_by_name; unsigned n_value_ranges; const ProtobufCIntRange *value_ranges; void *reserved1; void *reserved2; void *reserved3; void *reserved4; }; struct ProtobufCEnumValue { const char *name; const char *c_name; int value; }; struct ProtobufCEnumValueIndex { const char *name; unsigned index; }; struct ProtobufCFieldDescriptor { const char *name; uint32_t id; ProtobufCLabel label; ProtobufCType type; unsigned quantifier_offset; unsigned offset; # 601 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const void *descriptor; const void *default_value; uint32_t flags; unsigned reserved_flags; void *reserved2; void *reserved3; }; # 628 "/usr/include/protobuf-c/protobuf-c.h" 3 4 struct ProtobufCIntRange { int start_value; unsigned orig_index; }; # 653 "/usr/include/protobuf-c/protobuf-c.h" 3 4 struct ProtobufCMessage { const ProtobufCMessageDescriptor *descriptor; unsigned n_unknown_fields; ProtobufCMessageUnknownField *unknown_fields; }; struct ProtobufCMessageDescriptor { uint32_t magic; const char *name; const char *short_name; const char *c_name; const char *package_name; size_t sizeof_message; unsigned n_fields; const ProtobufCFieldDescriptor *fields; const unsigned *fields_sorted_by_name; unsigned n_field_ranges; const ProtobufCIntRange *field_ranges; ProtobufCMessageInit message_init; void *reserved1; void *reserved2; void *reserved3; }; struct ProtobufCMessageUnknownField { uint32_t tag; ProtobufCWireType wire_type; size_t len; uint8_t *data; }; struct ProtobufCMethodDescriptor { const char *name; const ProtobufCMessageDescriptor *input; const ProtobufCMessageDescriptor *output; }; struct ProtobufCService { const ProtobufCServiceDescriptor *descriptor; void (*invoke)(ProtobufCService *service, unsigned method_index, const ProtobufCMessage *input, ProtobufCClosure closure, void *closure_data); void (*destroy)(ProtobufCService *service); }; struct ProtobufCServiceDescriptor { uint32_t magic; const char *name; const char *short_name; const char *c_name; const char *package; unsigned n_methods; const ProtobufCMethodDescriptor *methods; const unsigned *method_indices_by_name; }; const char * protobuf_c_version(void); # 789 "/usr/include/protobuf-c/protobuf-c.h" 3 4 uint32_t protobuf_c_version_number(void); # 824 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const ProtobufCEnumValue * protobuf_c_enum_descriptor_get_value_by_name( const ProtobufCEnumDescriptor *desc, const char *name); # 845 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const ProtobufCEnumValue * protobuf_c_enum_descriptor_get_value( const ProtobufCEnumDescriptor *desc, int value); # 864 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const ProtobufCFieldDescriptor * protobuf_c_message_descriptor_get_field_by_name( const ProtobufCMessageDescriptor *desc, const char *name); # 883 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const ProtobufCFieldDescriptor * protobuf_c_message_descriptor_get_field( const ProtobufCMessageDescriptor *desc, unsigned value); # 897 "/usr/include/protobuf-c/protobuf-c.h" 3 4 size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message); # 917 "/usr/include/protobuf-c/protobuf-c.h" 3 4 size_t protobuf_c_message_pack(const ProtobufCMessage *message, uint8_t *out); # 934 "/usr/include/protobuf-c/protobuf-c.h" 3 4 size_t protobuf_c_message_pack_to_buffer( const ProtobufCMessage *message, ProtobufCBuffer *buffer); # 957 "/usr/include/protobuf-c/protobuf-c.h" 3 4 ProtobufCMessage * protobuf_c_message_unpack( const ProtobufCMessageDescriptor *descriptor, ProtobufCAllocator *allocator, size_t len, const uint8_t *data); # 977 "/usr/include/protobuf-c/protobuf-c.h" 3 4 void protobuf_c_message_free_unpacked( ProtobufCMessage *message, ProtobufCAllocator *allocator); # 994 "/usr/include/protobuf-c/protobuf-c.h" 3 4 protobuf_c_boolean protobuf_c_message_check(const ProtobufCMessage *); # 1009 "/usr/include/protobuf-c/protobuf-c.h" 3 4 void protobuf_c_message_init( const ProtobufCMessageDescriptor *descriptor, void *message); void protobuf_c_service_destroy(ProtobufCService *service); # 1038 "/usr/include/protobuf-c/protobuf-c.h" 3 4 const ProtobufCMethodDescriptor * protobuf_c_service_descriptor_get_method_by_name( const ProtobufCServiceDescriptor *desc, const char *name); # 1083 "/usr/include/protobuf-c/protobuf-c.h" 3 4 void protobuf_c_buffer_simple_append( ProtobufCBuffer *buffer, size_t len, const unsigned char *data); void protobuf_c_service_generated_init( ProtobufCService *service, const ProtobufCServiceDescriptor *descriptor, ProtobufCServiceDestroy destroy); void protobuf_c_service_invoke_internal( ProtobufCService *service, unsigned method_index, const ProtobufCMessage *input, ProtobufCClosure closure, void *closure_data); # 8 "./images/vma.pb-c.h" 2 # 1 "./images/opts.pb-c.h" 1 # 9 "./images/opts.pb-c.h" # 1 "./images/google/protobuf/descriptor.pb-c.h" 1 # 9 "./images/google/protobuf/descriptor.pb-c.h" # 18 "./images/google/protobuf/descriptor.pb-c.h" # 18 "./images/google/protobuf/descriptor.pb-c.h" typedef struct Google__Protobuf__FileDescriptorSet Google__Protobuf__FileDescriptorSet; typedef struct Google__Protobuf__FileDescriptorProto Google__Protobuf__FileDescriptorProto; typedef struct Google__Protobuf__DescriptorProto Google__Protobuf__DescriptorProto; typedef struct Google__Protobuf__DescriptorProto__ExtensionRange Google__Protobuf__DescriptorProto__ExtensionRange; typedef struct Google__Protobuf__DescriptorProto__ReservedRange Google__Protobuf__DescriptorProto__ReservedRange; typedef struct Google__Protobuf__ExtensionRangeOptions Google__Protobuf__ExtensionRangeOptions; typedef struct Google__Protobuf__FieldDescriptorProto Google__Protobuf__FieldDescriptorProto; typedef struct Google__Protobuf__OneofDescriptorProto Google__Protobuf__OneofDescriptorProto; typedef struct Google__Protobuf__EnumDescriptorProto Google__Protobuf__EnumDescriptorProto; typedef struct Google__Protobuf__EnumDescriptorProto__EnumReservedRange Google__Protobuf__EnumDescriptorProto__EnumReservedRange; typedef struct Google__Protobuf__EnumValueDescriptorProto Google__Protobuf__EnumValueDescriptorProto; typedef struct Google__Protobuf__ServiceDescriptorProto Google__Protobuf__ServiceDescriptorProto; typedef struct Google__Protobuf__MethodDescriptorProto Google__Protobuf__MethodDescriptorProto; typedef struct Google__Protobuf__FileOptions Google__Protobuf__FileOptions; typedef struct Google__Protobuf__MessageOptions Google__Protobuf__MessageOptions; typedef struct Google__Protobuf__FieldOptions Google__Protobuf__FieldOptions; typedef struct Google__Protobuf__OneofOptions Google__Protobuf__OneofOptions; typedef struct Google__Protobuf__EnumOptions Google__Protobuf__EnumOptions; typedef struct Google__Protobuf__EnumValueOptions Google__Protobuf__EnumValueOptions; typedef struct Google__Protobuf__ServiceOptions Google__Protobuf__ServiceOptions; typedef struct Google__Protobuf__MethodOptions Google__Protobuf__MethodOptions; typedef struct Google__Protobuf__UninterpretedOption Google__Protobuf__UninterpretedOption; typedef struct Google__Protobuf__UninterpretedOption__NamePart Google__Protobuf__UninterpretedOption__NamePart; typedef struct Google__Protobuf__SourceCodeInfo Google__Protobuf__SourceCodeInfo; typedef struct Google__Protobuf__SourceCodeInfo__Location Google__Protobuf__SourceCodeInfo__Location; typedef struct Google__Protobuf__GeneratedCodeInfo Google__Protobuf__GeneratedCodeInfo; typedef struct Google__Protobuf__GeneratedCodeInfo__Annotation Google__Protobuf__GeneratedCodeInfo__Annotation; typedef enum _Google__Protobuf__FieldDescriptorProto__Type { GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_DOUBLE = 1, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_FLOAT = 2, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_INT64 = 3, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_UINT64 = 4, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_INT32 = 5, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_FIXED64 = 6, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_FIXED32 = 7, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_BOOL = 8, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_STRING = 9, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_GROUP = 10, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_MESSAGE = 11, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_BYTES = 12, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_UINT32 = 13, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_ENUM = 14, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_SFIXED32 = 15, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_SFIXED64 = 16, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_SINT32 = 17, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE__TYPE_SINT64 = 18 # 98 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__TYPE_IS_INT_SIZE = 0x7fffffff # 99 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__FieldDescriptorProto__Type; typedef enum _Google__Protobuf__FieldDescriptorProto__Label { GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__LABEL__LABEL_OPTIONAL = 1, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__LABEL__LABEL_REQUIRED = 2, GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__LABEL__LABEL_REPEATED = 3 # 107 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__FIELD_DESCRIPTOR_PROTO__LABEL_IS_INT_SIZE = 0x7fffffff # 108 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__FieldDescriptorProto__Label; typedef enum _Google__Protobuf__FileOptions__OptimizeMode { GOOGLE__PROTOBUF__FILE_OPTIONS__OPTIMIZE_MODE__SPEED = 1, GOOGLE__PROTOBUF__FILE_OPTIONS__OPTIMIZE_MODE__CODE_SIZE = 2, GOOGLE__PROTOBUF__FILE_OPTIONS__OPTIMIZE_MODE__LITE_RUNTIME = 3 # 128 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__FILE_OPTIONS__OPTIMIZE_MODE_IS_INT_SIZE = 0x7fffffff # 129 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__FileOptions__OptimizeMode; typedef enum _Google__Protobuf__FieldOptions__CType { GOOGLE__PROTOBUF__FIELD_OPTIONS__CTYPE__STRING = 0, GOOGLE__PROTOBUF__FIELD_OPTIONS__CTYPE__CORD = 1, GOOGLE__PROTOBUF__FIELD_OPTIONS__CTYPE__STRING_PIECE = 2 # 137 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__FIELD_OPTIONS__CTYPE_IS_INT_SIZE = 0x7fffffff # 138 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__FieldOptions__CType; typedef enum _Google__Protobuf__FieldOptions__JSType { GOOGLE__PROTOBUF__FIELD_OPTIONS__JSTYPE__JS_NORMAL = 0, GOOGLE__PROTOBUF__FIELD_OPTIONS__JSTYPE__JS_STRING = 1, GOOGLE__PROTOBUF__FIELD_OPTIONS__JSTYPE__JS_NUMBER = 2 # 152 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__FIELD_OPTIONS__JSTYPE_IS_INT_SIZE = 0x7fffffff # 153 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__FieldOptions__JSType; typedef enum _Google__Protobuf__MethodOptions__IdempotencyLevel { GOOGLE__PROTOBUF__METHOD_OPTIONS__IDEMPOTENCY_LEVEL__IDEMPOTENCY_UNKNOWN = 0, GOOGLE__PROTOBUF__METHOD_OPTIONS__IDEMPOTENCY_LEVEL__NO_SIDE_EFFECTS = 1, GOOGLE__PROTOBUF__METHOD_OPTIONS__IDEMPOTENCY_LEVEL__IDEMPOTENT = 2 # 169 "./images/google/protobuf/descriptor.pb-c.h" 3 4 , _GOOGLE__PROTOBUF__METHOD_OPTIONS__IDEMPOTENCY_LEVEL_IS_INT_SIZE = 0x7fffffff # 170 "./images/google/protobuf/descriptor.pb-c.h" } Google__Protobuf__MethodOptions__IdempotencyLevel; struct Google__Protobuf__FileDescriptorSet { ProtobufCMessage base; size_t n_file; Google__Protobuf__FileDescriptorProto **file; }; # 192 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__FileDescriptorProto { ProtobufCMessage base; char *name; char *package; size_t n_dependency; char **dependency; size_t n_public_dependency; int32_t *public_dependency; size_t n_weak_dependency; int32_t *weak_dependency; size_t n_message_type; Google__Protobuf__DescriptorProto **message_type; size_t n_enum_type; Google__Protobuf__EnumDescriptorProto **enum_type; size_t n_service; Google__Protobuf__ServiceDescriptorProto **service; size_t n_extension; Google__Protobuf__FieldDescriptorProto **extension; Google__Protobuf__FileOptions *options; Google__Protobuf__SourceCodeInfo *source_code_info; char *syntax; }; struct Google__Protobuf__DescriptorProto__ExtensionRange { ProtobufCMessage base; protobuf_c_boolean has_start; int32_t start; protobuf_c_boolean has_end; int32_t end; Google__Protobuf__ExtensionRangeOptions *options; }; # 274 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__DescriptorProto__ReservedRange { ProtobufCMessage base; protobuf_c_boolean has_start; int32_t start; protobuf_c_boolean has_end; int32_t end; }; # 296 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__DescriptorProto { ProtobufCMessage base; char *name; size_t n_field; Google__Protobuf__FieldDescriptorProto **field; size_t n_extension; Google__Protobuf__FieldDescriptorProto **extension; size_t n_nested_type; Google__Protobuf__DescriptorProto **nested_type; size_t n_enum_type; Google__Protobuf__EnumDescriptorProto **enum_type; size_t n_extension_range; Google__Protobuf__DescriptorProto__ExtensionRange **extension_range; size_t n_oneof_decl; Google__Protobuf__OneofDescriptorProto **oneof_decl; Google__Protobuf__MessageOptions *options; size_t n_reserved_range; Google__Protobuf__DescriptorProto__ReservedRange **reserved_range; size_t n_reserved_name; char **reserved_name; }; struct Google__Protobuf__ExtensionRangeOptions { ProtobufCMessage base; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; # 344 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__FieldDescriptorProto { ProtobufCMessage base; char *name; protobuf_c_boolean has_number; int32_t number; protobuf_c_boolean has_label; Google__Protobuf__FieldDescriptorProto__Label label; protobuf_c_boolean has_type; Google__Protobuf__FieldDescriptorProto__Type type; char *type_name; char *extendee; char *default_value; protobuf_c_boolean has_oneof_index; int32_t oneof_index; char *json_name; Google__Protobuf__FieldOptions *options; # 412 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_proto3_optional; protobuf_c_boolean proto3_optional; }; # 423 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__OneofDescriptorProto { ProtobufCMessage base; char *name; Google__Protobuf__OneofOptions *options; }; # 441 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__EnumDescriptorProto__EnumReservedRange { ProtobufCMessage base; protobuf_c_boolean has_start; int32_t start; protobuf_c_boolean has_end; int32_t end; }; # 463 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__EnumDescriptorProto { ProtobufCMessage base; char *name; size_t n_value; Google__Protobuf__EnumValueDescriptorProto **value; Google__Protobuf__EnumOptions *options; size_t n_reserved_range; Google__Protobuf__EnumDescriptorProto__EnumReservedRange **reserved_range; size_t n_reserved_name; char **reserved_name; }; # 492 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__EnumValueDescriptorProto { ProtobufCMessage base; char *name; protobuf_c_boolean has_number; int32_t number; Google__Protobuf__EnumValueOptions *options; }; # 508 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__ServiceDescriptorProto { ProtobufCMessage base; char *name; size_t n_method; Google__Protobuf__MethodDescriptorProto **method; Google__Protobuf__ServiceOptions *options; }; # 524 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__MethodDescriptorProto { ProtobufCMessage base; char *name; char *input_type; char *output_type; Google__Protobuf__MethodOptions *options; protobuf_c_boolean has_client_streaming; protobuf_c_boolean client_streaming; protobuf_c_boolean has_server_streaming; protobuf_c_boolean server_streaming; }; struct Google__Protobuf__FileOptions { ProtobufCMessage base; char *java_package; char *java_outer_classname; # 577 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_java_multiple_files; protobuf_c_boolean java_multiple_files; protobuf_c_boolean has_java_generate_equals_and_hash # 582 "./images/google/protobuf/descriptor.pb-c.h" 3 4 __attribute__((__deprecated__)) # 582 "./images/google/protobuf/descriptor.pb-c.h" ; protobuf_c_boolean java_generate_equals_and_hash # 583 "./images/google/protobuf/descriptor.pb-c.h" 3 4 __attribute__((__deprecated__)) # 583 "./images/google/protobuf/descriptor.pb-c.h" ; # 592 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_java_string_check_utf8; protobuf_c_boolean java_string_check_utf8; protobuf_c_boolean has_optimize_for; Google__Protobuf__FileOptions__OptimizeMode optimize_for; char *go_package; # 615 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_cc_generic_services; protobuf_c_boolean cc_generic_services; protobuf_c_boolean has_java_generic_services; protobuf_c_boolean java_generic_services; protobuf_c_boolean has_py_generic_services; protobuf_c_boolean py_generic_services; protobuf_c_boolean has_php_generic_services; protobuf_c_boolean php_generic_services; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; protobuf_c_boolean has_cc_enable_arenas; protobuf_c_boolean cc_enable_arenas; char *objc_class_prefix; char *csharp_namespace; char *swift_prefix; char *php_class_prefix; char *php_namespace; char *php_metadata_namespace; char *ruby_package; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__MessageOptions { ProtobufCMessage base; # 708 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_message_set_wire_format; protobuf_c_boolean message_set_wire_format; protobuf_c_boolean has_no_standard_descriptor_accessor; protobuf_c_boolean no_standard_descriptor_accessor; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; # 745 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_map_entry; protobuf_c_boolean map_entry; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__FieldOptions { ProtobufCMessage base; protobuf_c_boolean has_ctype; Google__Protobuf__FieldOptions__CType ctype; protobuf_c_boolean has_packed; protobuf_c_boolean packed; # 790 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_jstype; Google__Protobuf__FieldOptions__JSType jstype; # 822 "./images/google/protobuf/descriptor.pb-c.h" protobuf_c_boolean has_lazy; protobuf_c_boolean lazy; protobuf_c_boolean has_unverified_lazy; protobuf_c_boolean unverified_lazy; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; protobuf_c_boolean has_weak; protobuf_c_boolean weak; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__OneofOptions { ProtobufCMessage base; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__EnumOptions { ProtobufCMessage base; protobuf_c_boolean has_allow_alias; protobuf_c_boolean allow_alias; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__EnumValueOptions { ProtobufCMessage base; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__ServiceOptions { ProtobufCMessage base; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; struct Google__Protobuf__MethodOptions { ProtobufCMessage base; protobuf_c_boolean has_deprecated; protobuf_c_boolean deprecated; protobuf_c_boolean has_idempotency_level; Google__Protobuf__MethodOptions__IdempotencyLevel idempotency_level; size_t n_uninterpreted_option; Google__Protobuf__UninterpretedOption **uninterpreted_option; }; # 972 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__UninterpretedOption__NamePart { ProtobufCMessage base; char *name_part; protobuf_c_boolean is_extension; }; # 991 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__UninterpretedOption { ProtobufCMessage base; size_t n_name; Google__Protobuf__UninterpretedOption__NamePart **name; char *identifier_value; protobuf_c_boolean has_positive_int_value; uint64_t positive_int_value; protobuf_c_boolean has_negative_int_value; int64_t negative_int_value; protobuf_c_boolean has_double_value; double double_value; protobuf_c_boolean has_string_value; ProtobufCBinaryData string_value; char *aggregate_value; }; struct Google__Protobuf__SourceCodeInfo__Location { ProtobufCMessage base; # 1042 "./images/google/protobuf/descriptor.pb-c.h" size_t n_path; int32_t *path; size_t n_span; int32_t *span; # 1091 "./images/google/protobuf/descriptor.pb-c.h" char *leading_comments; char *trailing_comments; size_t n_leading_detached_comments; char **leading_detached_comments; }; # 1105 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__SourceCodeInfo { ProtobufCMessage base; # 1151 "./images/google/protobuf/descriptor.pb-c.h" size_t n_location; Google__Protobuf__SourceCodeInfo__Location **location; }; struct Google__Protobuf__GeneratedCodeInfo__Annotation { ProtobufCMessage base; size_t n_path; int32_t *path; char *source_file; protobuf_c_boolean has_begin; int32_t begin; protobuf_c_boolean has_end; int32_t end; }; # 1196 "./images/google/protobuf/descriptor.pb-c.h" struct Google__Protobuf__GeneratedCodeInfo { ProtobufCMessage base; size_t n_annotation; Google__Protobuf__GeneratedCodeInfo__Annotation **annotation; }; void google__protobuf__file_descriptor_set__init (Google__Protobuf__FileDescriptorSet *message); size_t google__protobuf__file_descriptor_set__get_packed_size (const Google__Protobuf__FileDescriptorSet *message); size_t google__protobuf__file_descriptor_set__pack (const Google__Protobuf__FileDescriptorSet *message, uint8_t *out); size_t google__protobuf__file_descriptor_set__pack_to_buffer (const Google__Protobuf__FileDescriptorSet *message, ProtobufCBuffer *buffer); Google__Protobuf__FileDescriptorSet * google__protobuf__file_descriptor_set__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__file_descriptor_set__free_unpacked (Google__Protobuf__FileDescriptorSet *message, ProtobufCAllocator *allocator); void google__protobuf__file_descriptor_proto__init (Google__Protobuf__FileDescriptorProto *message); size_t google__protobuf__file_descriptor_proto__get_packed_size (const Google__Protobuf__FileDescriptorProto *message); size_t google__protobuf__file_descriptor_proto__pack (const Google__Protobuf__FileDescriptorProto *message, uint8_t *out); size_t google__protobuf__file_descriptor_proto__pack_to_buffer (const Google__Protobuf__FileDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__FileDescriptorProto * google__protobuf__file_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__file_descriptor_proto__free_unpacked (Google__Protobuf__FileDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__descriptor_proto__extension_range__init (Google__Protobuf__DescriptorProto__ExtensionRange *message); void google__protobuf__descriptor_proto__reserved_range__init (Google__Protobuf__DescriptorProto__ReservedRange *message); void google__protobuf__descriptor_proto__init (Google__Protobuf__DescriptorProto *message); size_t google__protobuf__descriptor_proto__get_packed_size (const Google__Protobuf__DescriptorProto *message); size_t google__protobuf__descriptor_proto__pack (const Google__Protobuf__DescriptorProto *message, uint8_t *out); size_t google__protobuf__descriptor_proto__pack_to_buffer (const Google__Protobuf__DescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__DescriptorProto * google__protobuf__descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__descriptor_proto__free_unpacked (Google__Protobuf__DescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__extension_range_options__init (Google__Protobuf__ExtensionRangeOptions *message); size_t google__protobuf__extension_range_options__get_packed_size (const Google__Protobuf__ExtensionRangeOptions *message); size_t google__protobuf__extension_range_options__pack (const Google__Protobuf__ExtensionRangeOptions *message, uint8_t *out); size_t google__protobuf__extension_range_options__pack_to_buffer (const Google__Protobuf__ExtensionRangeOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__ExtensionRangeOptions * google__protobuf__extension_range_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__extension_range_options__free_unpacked (Google__Protobuf__ExtensionRangeOptions *message, ProtobufCAllocator *allocator); void google__protobuf__field_descriptor_proto__init (Google__Protobuf__FieldDescriptorProto *message); size_t google__protobuf__field_descriptor_proto__get_packed_size (const Google__Protobuf__FieldDescriptorProto *message); size_t google__protobuf__field_descriptor_proto__pack (const Google__Protobuf__FieldDescriptorProto *message, uint8_t *out); size_t google__protobuf__field_descriptor_proto__pack_to_buffer (const Google__Protobuf__FieldDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__FieldDescriptorProto * google__protobuf__field_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__field_descriptor_proto__free_unpacked (Google__Protobuf__FieldDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__oneof_descriptor_proto__init (Google__Protobuf__OneofDescriptorProto *message); size_t google__protobuf__oneof_descriptor_proto__get_packed_size (const Google__Protobuf__OneofDescriptorProto *message); size_t google__protobuf__oneof_descriptor_proto__pack (const Google__Protobuf__OneofDescriptorProto *message, uint8_t *out); size_t google__protobuf__oneof_descriptor_proto__pack_to_buffer (const Google__Protobuf__OneofDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__OneofDescriptorProto * google__protobuf__oneof_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__oneof_descriptor_proto__free_unpacked (Google__Protobuf__OneofDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__enum_descriptor_proto__enum_reserved_range__init (Google__Protobuf__EnumDescriptorProto__EnumReservedRange *message); void google__protobuf__enum_descriptor_proto__init (Google__Protobuf__EnumDescriptorProto *message); size_t google__protobuf__enum_descriptor_proto__get_packed_size (const Google__Protobuf__EnumDescriptorProto *message); size_t google__protobuf__enum_descriptor_proto__pack (const Google__Protobuf__EnumDescriptorProto *message, uint8_t *out); size_t google__protobuf__enum_descriptor_proto__pack_to_buffer (const Google__Protobuf__EnumDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__EnumDescriptorProto * google__protobuf__enum_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__enum_descriptor_proto__free_unpacked (Google__Protobuf__EnumDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__enum_value_descriptor_proto__init (Google__Protobuf__EnumValueDescriptorProto *message); size_t google__protobuf__enum_value_descriptor_proto__get_packed_size (const Google__Protobuf__EnumValueDescriptorProto *message); size_t google__protobuf__enum_value_descriptor_proto__pack (const Google__Protobuf__EnumValueDescriptorProto *message, uint8_t *out); size_t google__protobuf__enum_value_descriptor_proto__pack_to_buffer (const Google__Protobuf__EnumValueDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__EnumValueDescriptorProto * google__protobuf__enum_value_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__enum_value_descriptor_proto__free_unpacked (Google__Protobuf__EnumValueDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__service_descriptor_proto__init (Google__Protobuf__ServiceDescriptorProto *message); size_t google__protobuf__service_descriptor_proto__get_packed_size (const Google__Protobuf__ServiceDescriptorProto *message); size_t google__protobuf__service_descriptor_proto__pack (const Google__Protobuf__ServiceDescriptorProto *message, uint8_t *out); size_t google__protobuf__service_descriptor_proto__pack_to_buffer (const Google__Protobuf__ServiceDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__ServiceDescriptorProto * google__protobuf__service_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__service_descriptor_proto__free_unpacked (Google__Protobuf__ServiceDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__method_descriptor_proto__init (Google__Protobuf__MethodDescriptorProto *message); size_t google__protobuf__method_descriptor_proto__get_packed_size (const Google__Protobuf__MethodDescriptorProto *message); size_t google__protobuf__method_descriptor_proto__pack (const Google__Protobuf__MethodDescriptorProto *message, uint8_t *out); size_t google__protobuf__method_descriptor_proto__pack_to_buffer (const Google__Protobuf__MethodDescriptorProto *message, ProtobufCBuffer *buffer); Google__Protobuf__MethodDescriptorProto * google__protobuf__method_descriptor_proto__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__method_descriptor_proto__free_unpacked (Google__Protobuf__MethodDescriptorProto *message, ProtobufCAllocator *allocator); void google__protobuf__file_options__init (Google__Protobuf__FileOptions *message); size_t google__protobuf__file_options__get_packed_size (const Google__Protobuf__FileOptions *message); size_t google__protobuf__file_options__pack (const Google__Protobuf__FileOptions *message, uint8_t *out); size_t google__protobuf__file_options__pack_to_buffer (const Google__Protobuf__FileOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__FileOptions * google__protobuf__file_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__file_options__free_unpacked (Google__Protobuf__FileOptions *message, ProtobufCAllocator *allocator); void google__protobuf__message_options__init (Google__Protobuf__MessageOptions *message); size_t google__protobuf__message_options__get_packed_size (const Google__Protobuf__MessageOptions *message); size_t google__protobuf__message_options__pack (const Google__Protobuf__MessageOptions *message, uint8_t *out); size_t google__protobuf__message_options__pack_to_buffer (const Google__Protobuf__MessageOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__MessageOptions * google__protobuf__message_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__message_options__free_unpacked (Google__Protobuf__MessageOptions *message, ProtobufCAllocator *allocator); void google__protobuf__field_options__init (Google__Protobuf__FieldOptions *message); size_t google__protobuf__field_options__get_packed_size (const Google__Protobuf__FieldOptions *message); size_t google__protobuf__field_options__pack (const Google__Protobuf__FieldOptions *message, uint8_t *out); size_t google__protobuf__field_options__pack_to_buffer (const Google__Protobuf__FieldOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__FieldOptions * google__protobuf__field_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__field_options__free_unpacked (Google__Protobuf__FieldOptions *message, ProtobufCAllocator *allocator); void google__protobuf__oneof_options__init (Google__Protobuf__OneofOptions *message); size_t google__protobuf__oneof_options__get_packed_size (const Google__Protobuf__OneofOptions *message); size_t google__protobuf__oneof_options__pack (const Google__Protobuf__OneofOptions *message, uint8_t *out); size_t google__protobuf__oneof_options__pack_to_buffer (const Google__Protobuf__OneofOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__OneofOptions * google__protobuf__oneof_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__oneof_options__free_unpacked (Google__Protobuf__OneofOptions *message, ProtobufCAllocator *allocator); void google__protobuf__enum_options__init (Google__Protobuf__EnumOptions *message); size_t google__protobuf__enum_options__get_packed_size (const Google__Protobuf__EnumOptions *message); size_t google__protobuf__enum_options__pack (const Google__Protobuf__EnumOptions *message, uint8_t *out); size_t google__protobuf__enum_options__pack_to_buffer (const Google__Protobuf__EnumOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__EnumOptions * google__protobuf__enum_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__enum_options__free_unpacked (Google__Protobuf__EnumOptions *message, ProtobufCAllocator *allocator); void google__protobuf__enum_value_options__init (Google__Protobuf__EnumValueOptions *message); size_t google__protobuf__enum_value_options__get_packed_size (const Google__Protobuf__EnumValueOptions *message); size_t google__protobuf__enum_value_options__pack (const Google__Protobuf__EnumValueOptions *message, uint8_t *out); size_t google__protobuf__enum_value_options__pack_to_buffer (const Google__Protobuf__EnumValueOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__EnumValueOptions * google__protobuf__enum_value_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__enum_value_options__free_unpacked (Google__Protobuf__EnumValueOptions *message, ProtobufCAllocator *allocator); void google__protobuf__service_options__init (Google__Protobuf__ServiceOptions *message); size_t google__protobuf__service_options__get_packed_size (const Google__Protobuf__ServiceOptions *message); size_t google__protobuf__service_options__pack (const Google__Protobuf__ServiceOptions *message, uint8_t *out); size_t google__protobuf__service_options__pack_to_buffer (const Google__Protobuf__ServiceOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__ServiceOptions * google__protobuf__service_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__service_options__free_unpacked (Google__Protobuf__ServiceOptions *message, ProtobufCAllocator *allocator); void google__protobuf__method_options__init (Google__Protobuf__MethodOptions *message); size_t google__protobuf__method_options__get_packed_size (const Google__Protobuf__MethodOptions *message); size_t google__protobuf__method_options__pack (const Google__Protobuf__MethodOptions *message, uint8_t *out); size_t google__protobuf__method_options__pack_to_buffer (const Google__Protobuf__MethodOptions *message, ProtobufCBuffer *buffer); Google__Protobuf__MethodOptions * google__protobuf__method_options__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__method_options__free_unpacked (Google__Protobuf__MethodOptions *message, ProtobufCAllocator *allocator); void google__protobuf__uninterpreted_option__name_part__init (Google__Protobuf__UninterpretedOption__NamePart *message); void google__protobuf__uninterpreted_option__init (Google__Protobuf__UninterpretedOption *message); size_t google__protobuf__uninterpreted_option__get_packed_size (const Google__Protobuf__UninterpretedOption *message); size_t google__protobuf__uninterpreted_option__pack (const Google__Protobuf__UninterpretedOption *message, uint8_t *out); size_t google__protobuf__uninterpreted_option__pack_to_buffer (const Google__Protobuf__UninterpretedOption *message, ProtobufCBuffer *buffer); Google__Protobuf__UninterpretedOption * google__protobuf__uninterpreted_option__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__uninterpreted_option__free_unpacked (Google__Protobuf__UninterpretedOption *message, ProtobufCAllocator *allocator); void google__protobuf__source_code_info__location__init (Google__Protobuf__SourceCodeInfo__Location *message); void google__protobuf__source_code_info__init (Google__Protobuf__SourceCodeInfo *message); size_t google__protobuf__source_code_info__get_packed_size (const Google__Protobuf__SourceCodeInfo *message); size_t google__protobuf__source_code_info__pack (const Google__Protobuf__SourceCodeInfo *message, uint8_t *out); size_t google__protobuf__source_code_info__pack_to_buffer (const Google__Protobuf__SourceCodeInfo *message, ProtobufCBuffer *buffer); Google__Protobuf__SourceCodeInfo * google__protobuf__source_code_info__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__source_code_info__free_unpacked (Google__Protobuf__SourceCodeInfo *message, ProtobufCAllocator *allocator); void google__protobuf__generated_code_info__annotation__init (Google__Protobuf__GeneratedCodeInfo__Annotation *message); void google__protobuf__generated_code_info__init (Google__Protobuf__GeneratedCodeInfo *message); size_t google__protobuf__generated_code_info__get_packed_size (const Google__Protobuf__GeneratedCodeInfo *message); size_t google__protobuf__generated_code_info__pack (const Google__Protobuf__GeneratedCodeInfo *message, uint8_t *out); size_t google__protobuf__generated_code_info__pack_to_buffer (const Google__Protobuf__GeneratedCodeInfo *message, ProtobufCBuffer *buffer); Google__Protobuf__GeneratedCodeInfo * google__protobuf__generated_code_info__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void google__protobuf__generated_code_info__free_unpacked (Google__Protobuf__GeneratedCodeInfo *message, ProtobufCAllocator *allocator); typedef void (*Google__Protobuf__FileDescriptorSet_Closure) (const Google__Protobuf__FileDescriptorSet *message, void *closure_data); typedef void (*Google__Protobuf__FileDescriptorProto_Closure) (const Google__Protobuf__FileDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__DescriptorProto__ExtensionRange_Closure) (const Google__Protobuf__DescriptorProto__ExtensionRange *message, void *closure_data); typedef void (*Google__Protobuf__DescriptorProto__ReservedRange_Closure) (const Google__Protobuf__DescriptorProto__ReservedRange *message, void *closure_data); typedef void (*Google__Protobuf__DescriptorProto_Closure) (const Google__Protobuf__DescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__ExtensionRangeOptions_Closure) (const Google__Protobuf__ExtensionRangeOptions *message, void *closure_data); typedef void (*Google__Protobuf__FieldDescriptorProto_Closure) (const Google__Protobuf__FieldDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__OneofDescriptorProto_Closure) (const Google__Protobuf__OneofDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__EnumDescriptorProto__EnumReservedRange_Closure) (const Google__Protobuf__EnumDescriptorProto__EnumReservedRange *message, void *closure_data); typedef void (*Google__Protobuf__EnumDescriptorProto_Closure) (const Google__Protobuf__EnumDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__EnumValueDescriptorProto_Closure) (const Google__Protobuf__EnumValueDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__ServiceDescriptorProto_Closure) (const Google__Protobuf__ServiceDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__MethodDescriptorProto_Closure) (const Google__Protobuf__MethodDescriptorProto *message, void *closure_data); typedef void (*Google__Protobuf__FileOptions_Closure) (const Google__Protobuf__FileOptions *message, void *closure_data); typedef void (*Google__Protobuf__MessageOptions_Closure) (const Google__Protobuf__MessageOptions *message, void *closure_data); typedef void (*Google__Protobuf__FieldOptions_Closure) (const Google__Protobuf__FieldOptions *message, void *closure_data); typedef void (*Google__Protobuf__OneofOptions_Closure) (const Google__Protobuf__OneofOptions *message, void *closure_data); typedef void (*Google__Protobuf__EnumOptions_Closure) (const Google__Protobuf__EnumOptions *message, void *closure_data); typedef void (*Google__Protobuf__EnumValueOptions_Closure) (const Google__Protobuf__EnumValueOptions *message, void *closure_data); typedef void (*Google__Protobuf__ServiceOptions_Closure) (const Google__Protobuf__ServiceOptions *message, void *closure_data); typedef void (*Google__Protobuf__MethodOptions_Closure) (const Google__Protobuf__MethodOptions *message, void *closure_data); typedef void (*Google__Protobuf__UninterpretedOption__NamePart_Closure) (const Google__Protobuf__UninterpretedOption__NamePart *message, void *closure_data); typedef void (*Google__Protobuf__UninterpretedOption_Closure) (const Google__Protobuf__UninterpretedOption *message, void *closure_data); typedef void (*Google__Protobuf__SourceCodeInfo__Location_Closure) (const Google__Protobuf__SourceCodeInfo__Location *message, void *closure_data); typedef void (*Google__Protobuf__SourceCodeInfo_Closure) (const Google__Protobuf__SourceCodeInfo *message, void *closure_data); typedef void (*Google__Protobuf__GeneratedCodeInfo__Annotation_Closure) (const Google__Protobuf__GeneratedCodeInfo__Annotation *message, void *closure_data); typedef void (*Google__Protobuf__GeneratedCodeInfo_Closure) (const Google__Protobuf__GeneratedCodeInfo *message, void *closure_data); extern const ProtobufCMessageDescriptor google__protobuf__file_descriptor_set__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__file_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__descriptor_proto__extension_range__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__descriptor_proto__reserved_range__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__extension_range_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__field_descriptor_proto__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__field_descriptor_proto__type__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__field_descriptor_proto__label__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__oneof_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__enum_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__enum_descriptor_proto__enum_reserved_range__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__enum_value_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__service_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__method_descriptor_proto__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__file_options__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__file_options__optimize_mode__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__message_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__field_options__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__field_options__ctype__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__field_options__jstype__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__oneof_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__enum_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__enum_value_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__service_options__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__method_options__descriptor; extern const ProtobufCEnumDescriptor google__protobuf__method_options__idempotency_level__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__uninterpreted_option__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__uninterpreted_option__name_part__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__source_code_info__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__source_code_info__location__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__generated_code_info__descriptor; extern const ProtobufCMessageDescriptor google__protobuf__generated_code_info__annotation__descriptor; # 18 "./images/opts.pb-c.h" 2 typedef struct CRIUOpts CRIUOpts; struct CRIUOpts { ProtobufCMessage base; protobuf_c_boolean has_hex; protobuf_c_boolean hex; protobuf_c_boolean has_ipadd; protobuf_c_boolean ipadd; char *flags; protobuf_c_boolean has_dev; protobuf_c_boolean dev; protobuf_c_boolean has_odev; protobuf_c_boolean odev; char *dict; char *conv; }; void criu__opts__init (CRIUOpts *message); size_t criu__opts__get_packed_size (const CRIUOpts *message); size_t criu__opts__pack (const CRIUOpts *message, uint8_t *out); size_t criu__opts__pack_to_buffer (const CRIUOpts *message, ProtobufCBuffer *buffer); CRIUOpts * criu__opts__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void criu__opts__free_unpacked (CRIUOpts *message, ProtobufCAllocator *allocator); typedef void (*CRIUOpts_Closure) (const CRIUOpts *message, void *closure_data); extern const ProtobufCMessageDescriptor criu__opts__descriptor; # 18 "./images/vma.pb-c.h" 2 typedef struct VmaEntry VmaEntry; struct VmaEntry { ProtobufCMessage base; uint64_t start; uint64_t end; uint64_t pgoff; uint64_t shmid; uint32_t prot; uint32_t flags; uint32_t status; int64_t fd; protobuf_c_boolean has_madv; uint64_t madv; protobuf_c_boolean has_fdflags; uint32_t fdflags; }; void vma_entry__init (VmaEntry *message); size_t vma_entry__get_packed_size (const VmaEntry *message); size_t vma_entry__pack (const VmaEntry *message, uint8_t *out); size_t vma_entry__pack_to_buffer (const VmaEntry *message, ProtobufCBuffer *buffer); VmaEntry * vma_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void vma_entry__free_unpacked (VmaEntry *message, ProtobufCAllocator *allocator); typedef void (*VmaEntry_Closure) (const VmaEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor vma_entry__descriptor; # 8 "criu/include/vma.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h" 1 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4 # 116 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-shared.h" 1 3 4 # 51 "/usr/include/x86_64-linux-gnu/bits/mman-shared.h" 3 4 # 55 "/usr/include/x86_64-linux-gnu/bits/mman-shared.h" 3 4 int memfd_create (const char *__name, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); int pkey_alloc (unsigned int __flags, unsigned int __access_rights) __attribute__ ((__nothrow__ , __leaf__)); int pkey_set (int __key, unsigned int __access_rights) __attribute__ ((__nothrow__ , __leaf__)); int pkey_get (int __key) __attribute__ ((__nothrow__ , __leaf__)); int pkey_free (int __key) __attribute__ ((__nothrow__ , __leaf__)); int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __attribute__ ((__nothrow__ , __leaf__)); # 117 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 2 3 4 # 39 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4 # 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 57 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ , __leaf__)); # 70 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 extern void *mmap64 (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __attribute__ ((__nothrow__ , __leaf__)); extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ , __leaf__)); extern int msync (void *__addr, size_t __len, int __flags); extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__)); extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__)); extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); extern int mlockall (int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int munlockall (void) __attribute__ ((__nothrow__ , __leaf__)); extern int mincore (void *__start, size_t __len, unsigned char *__vec) __attribute__ ((__nothrow__ , __leaf__)); # 133 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...) __attribute__ ((__nothrow__ , __leaf__)); extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int shm_open (const char *__name, int __oflag, mode_t __mode); extern int shm_unlink (const char *__name); # 1 "/usr/include/x86_64-linux-gnu/bits/mman_ext.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/mman_ext.h" 3 4 struct iovec; extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov, size_t __count, int __advice, unsigned __flags) __attribute__ ((__nothrow__ , __leaf__)); extern int process_mrelease (int pidfd, unsigned int flags) __attribute__ ((__nothrow__ , __leaf__)); # 151 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 10 "criu/include/vma.h" 2 # 12 "criu/include/vma.h" struct vm_area_list { struct list_head h; unsigned nr; unsigned int nr_aios; union { unsigned long nr_priv_pages; unsigned long rst_priv_size; }; unsigned long nr_priv_pages_longest; unsigned long nr_shared_pages_longest; }; static inline void vm_area_list_init(struct vm_area_list *vml) { memset(vml, 0, sizeof(*vml)); INIT_LIST_HEAD(&vml->h); } struct file_desc; struct vma_area { struct list_head list; VmaEntry *e; union { struct { int vm_socket_id; char *aufs_rpath; char *aufs_fpath; # 48 "criu/include/vma.h" 3 4 _Bool # 48 "criu/include/vma.h" file_borrowed; struct stat *vmst; int mnt_id; }; struct { int (*vm_open)(int pid, struct vma_area *vma); struct file_desc *vmfd; struct vma_area *pvma; unsigned long *page_bitmap; unsigned long premmaped_addr; # 71 "criu/include/vma.h" }; }; }; typedef int (*dump_filemap_t)(struct vma_area *vma_area, int fd); extern struct vma_area *alloc_vma_area(void); extern int collect_mappings(pid_t pid, struct vm_area_list *vma_area_list, dump_filemap_t cb); extern void free_mappings(struct vm_area_list *vma_area_list); extern int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, dump_filemap_t cb); extern int parse_self_maps_lite(struct vm_area_list *vms); # 99 "criu/include/vma.h" static inline int in_vma_area(struct vma_area *vma, unsigned long addr) { return addr >= (unsigned long)vma->e->start && addr < (unsigned long)vma->e->end; } static inline # 104 "criu/include/vma.h" 3 4 _Bool # 104 "criu/include/vma.h" vma_entry_is_private(VmaEntry *entry, unsigned long task_size) { return ((((entry)->status & ((1 << 0))) == ((1 << 0))) && ((((entry)->status & ((1 << 9))) == ((1 << 9))) || (((entry)->status & ((1 << 6))) == ((1 << 6)))) && (entry->end <= task_size)) || (((entry)->status & ((1 << 15))) == ((1 << 15))) || (((entry)->status & ((1 << 13))) == ((1 << 13))); } static inline # 113 "criu/include/vma.h" 3 4 _Bool # 113 "criu/include/vma.h" vma_area_is_private(struct vma_area *vma, unsigned long task_size) { return vma_entry_is_private(vma->e, task_size); } static inline struct vma_area *vma_next(struct vma_area *vma) { return ({ const typeof(((struct vma_area *)0)->list) *__mptr = (vma->list.next); (struct vma_area *)((char *)__mptr - # 120 "criu/include/vma.h" 3 4 __builtin_offsetof ( # 120 "criu/include/vma.h" struct vma_area # 120 "criu/include/vma.h" 3 4 , # 120 "criu/include/vma.h" list # 120 "criu/include/vma.h" 3 4 ) # 120 "criu/include/vma.h" ); }); } static inline # 123 "criu/include/vma.h" 3 4 _Bool # 123 "criu/include/vma.h" vma_entry_can_be_lazy(VmaEntry *e) { return ((e->flags & # 125 "criu/include/vma.h" 3 4 0x20 # 125 "criu/include/vma.h" ) && (e->flags & # 125 "criu/include/vma.h" 3 4 0x02 # 125 "criu/include/vma.h" ) && !(e->flags & # 125 "criu/include/vma.h" 3 4 0x02000 # 125 "criu/include/vma.h" ) && !((((e)->status & ((1 << 3))) == ((1 << 3)))) && !((((e)->status & ((1 << 12))) == ((1 << 12)))) && !((((e)->status & ((1 << 2))) == ((1 << 2)))) && !(e->flags & # 127 "criu/include/vma.h" 3 4 0x40000 # 127 "criu/include/vma.h" )); } # 7 "criu/include/rst_info.h" 2 # 1 "criu/include/kerndat.h" 1 # 1 "criu/arch/x86/include/asm/kerndat.h" 1 extern int kdat_compatible_cr(void); extern int kdat_can_map_vdso(void); extern int kdat_x86_has_ptrace_fpu_xsave_bug(void); extern int kdat_has_shstk(void); # 8 "criu/include/kerndat.h" 2 # 1 "criu/include/util-vdso.h" 1 # 23 "criu/include/util-vdso.h" # 1 "criu/arch/x86/include/asm/vdso.h" 1 # 1 "criu/include/asm-generic/vdso.h" 1 # 6 "criu/arch/x86/include/asm/vdso.h" 2 # 24 "criu/include/util-vdso.h" 2 struct vdso_symbol { char name[32]; unsigned long offset; }; struct vdso_symtable { unsigned long vdso_size; unsigned long vvar_size; struct vdso_symbol symbols[6]; # 34 "criu/include/util-vdso.h" 3 4 _Bool # 34 "criu/include/util-vdso.h" vdso_before_vvar; }; struct vdso_maps { unsigned long vdso_start; unsigned long vvar_start; struct vdso_symtable sym; # 41 "criu/include/util-vdso.h" 3 4 _Bool # 41 "criu/include/util-vdso.h" compatible; }; static inline # 44 "criu/include/util-vdso.h" 3 4 _Bool # 44 "criu/include/util-vdso.h" vdso_is_present(struct vdso_maps *m) { return m->vdso_start != (-1ul); } # 104 "criu/include/util-vdso.h" extern int vdso_fill_symtable(uintptr_t mem, size_t size, struct vdso_symtable *t); # 9 "criu/include/kerndat.h" 2 # 1 "criu/include/hugetlb.h" 1 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 6 "criu/include/hugetlb.h" 2 enum hugepage_size { HUGETLB_16KB, HUGETLB_64KB, HUGETLB_512KB, HUGETLB_1MB, HUGETLB_2MB, HUGETLB_8MB, HUGETLB_16MB, HUGETLB_32MB, HUGETLB_256MB, HUGETLB_512MB, HUGETLB_1GB, HUGETLB_2GB, HUGETLB_16GB, HUGETLB_MAX }; # 46 "criu/include/hugetlb.h" struct htlb_info { unsigned long long size; int flag; }; extern struct htlb_info hugetlb_info[HUGETLB_MAX]; int is_hugetlb_dev(dev_t dev, int *hugetlb_size_flag); int can_dump_with_memfd_hugetlb(dev_t dev, int *hugetlb_size_flag, const char *file_path, struct vma_area *vma); unsigned long get_size_from_hugetlb_flag(int flag); # 10 "criu/include/kerndat.h" 2 # 1 "./compel/include/uapi/compel/ptrace.h" 1 # 1 "./compel/include/uapi/compel/common/compiler.h" 1 # 5 "./compel/include/uapi/compel/ptrace.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/ptrace.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/sys/ptrace.h" 3 4 # 29 "/usr/include/x86_64-linux-gnu/sys/ptrace.h" 3 4 enum __ptrace_request { PTRACE_TRACEME = 0, PTRACE_PEEKTEXT = 1, PTRACE_PEEKDATA = 2, PTRACE_PEEKUSER = 3, PTRACE_POKETEXT = 4, PTRACE_POKEDATA = 5, PTRACE_POKEUSER = 6, PTRACE_CONT = 7, PTRACE_KILL = 8, PTRACE_SINGLESTEP = 9, PTRACE_GETREGS = 12, PTRACE_SETREGS = 13, PTRACE_GETFPREGS = 14, PTRACE_SETFPREGS = 15, PTRACE_ATTACH = 16, PTRACE_DETACH = 17, PTRACE_GETFPXREGS = 18, PTRACE_SETFPXREGS = 19, PTRACE_SYSCALL = 24, PTRACE_GET_THREAD_AREA = 25, PTRACE_SET_THREAD_AREA = 26, PTRACE_ARCH_PRCTL = 30, PTRACE_SYSEMU = 31, PTRACE_SYSEMU_SINGLESTEP = 32, PTRACE_SINGLEBLOCK = 33, PTRACE_SETOPTIONS = 0x4200, PTRACE_GETEVENTMSG = 0x4201, PTRACE_GETSIGINFO = 0x4202, PTRACE_SETSIGINFO = 0x4203, PTRACE_GETREGSET = 0x4204, PTRACE_SETREGSET = 0x4205, PTRACE_SEIZE = 0x4206, PTRACE_INTERRUPT = 0x4207, PTRACE_LISTEN = 0x4208, PTRACE_PEEKSIGINFO = 0x4209, PTRACE_GETSIGMASK = 0x420a, PTRACE_SETSIGMASK = 0x420b, PTRACE_SECCOMP_GET_FILTER = 0x420c, PTRACE_SECCOMP_GET_METADATA = 0x420d, PTRACE_GET_SYSCALL_INFO = 0x420e, PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 }; # 1 "/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h" 3 4 enum __ptrace_setoptions { PTRACE_O_TRACESYSGOOD = 0x00000001, PTRACE_O_TRACEFORK = 0x00000002, PTRACE_O_TRACEVFORK = 0x00000004, PTRACE_O_TRACECLONE = 0x00000008, PTRACE_O_TRACEEXEC = 0x00000010, PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, PTRACE_O_EXITKILL = 0x00100000, PTRACE_O_SUSPEND_SECCOMP = 0x00200000, PTRACE_O_MASK = 0x003000ff }; enum __ptrace_eventcodes { PTRACE_EVENT_FORK = 1, PTRACE_EVENT_VFORK = 2, PTRACE_EVENT_CLONE = 3, PTRACE_EVENT_EXEC = 4, PTRACE_EVENT_VFORK_DONE = 5, PTRACE_EVENT_EXIT = 6, PTRACE_EVENT_SECCOMP = 7, PTRACE_EVENT_STOP = 128 }; enum __ptrace_get_syscall_info_op { PTRACE_SYSCALL_INFO_NONE = 0, PTRACE_SYSCALL_INFO_ENTRY = 1, PTRACE_SYSCALL_INFO_EXIT = 2, PTRACE_SYSCALL_INFO_SECCOMP = 3 }; struct __ptrace_peeksiginfo_args { __uint64_t off; __uint32_t flags; __int32_t nr; }; enum __ptrace_peeksiginfo_flags { PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; struct __ptrace_seccomp_metadata { __uint64_t filter_off; __uint64_t flags; }; struct __ptrace_syscall_info { __uint8_t op; __uint32_t arch __attribute__ ((__aligned__ (4))); __uint64_t instruction_pointer; __uint64_t stack_pointer; union { struct { __uint64_t nr; __uint64_t args[6]; } entry; struct { __int64_t rval; __uint8_t is_error; } exit; struct { __uint64_t nr; __uint64_t args[6]; __uint32_t ret_data; } seccomp; }; }; struct __ptrace_rseq_configuration { __uint64_t rseq_abi_pointer; __uint32_t rseq_abi_size; __uint32_t signature; __uint32_t flags; __uint32_t pad; }; struct __ptrace_sud_config { __uint64_t mode; __uint64_t selector; __uint64_t offset; __uint64_t len; }; # 152 "/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h" 3 4 extern long int ptrace (enum __ptrace_request __request, ...) __attribute__ ((__nothrow__ , __leaf__)); # 213 "/usr/include/x86_64-linux-gnu/sys/ptrace.h" 2 3 4 # 12 "./compel/include/uapi/compel/ptrace.h" 2 # 1 "./compel/include/uapi/compel/asm/breakpoints.h" 1 # 4 "./compel/include/uapi/compel/asm/breakpoints.h" extern int ptrace_set_breakpoint(pid_t pid, void *addr); extern int ptrace_flush_breakpoints(pid_t pid); # 15 "./compel/include/uapi/compel/ptrace.h" 2 # 63 "./compel/include/uapi/compel/ptrace.h" typedef struct { uint64_t filter_off; uint64_t flags; } seccomp_metadata_t; # 89 "./compel/include/uapi/compel/ptrace.h" extern int ptrace_suspend_seccomp(pid_t pid); extern int __attribute__((__warn_unused_result__)) ptrace_peek_area(pid_t pid, void *dst, void *addr, long bytes); extern int __attribute__((__warn_unused_result__)) ptrace_poke_area(pid_t pid, void *src, void *addr, long bytes); extern int __attribute__((__warn_unused_result__)) ptrace_swap_area(pid_t pid, void *dst, void *src, long bytes); # 11 "criu/include/kerndat.h" 2 struct stat; extern int kerndat_init(void); enum pagemap_func { PM_UNKNOWN, PM_DISABLED, PM_FLAGS_ONLY, PM_FULL, }; enum loginuid_func { LUID_NONE, LUID_READ, LUID_FULL, }; struct kerndat_s { u32 magic1, magic2; dev_t shmem_dev; int last_cap; u64 zero_page_pfn; # 39 "criu/include/kerndat.h" 3 4 _Bool # 39 "criu/include/kerndat.h" has_dirty_track; # 40 "criu/include/kerndat.h" 3 4 _Bool # 40 "criu/include/kerndat.h" has_memfd; # 41 "criu/include/kerndat.h" 3 4 _Bool # 41 "criu/include/kerndat.h" has_memfd_hugetlb; # 42 "criu/include/kerndat.h" 3 4 _Bool # 42 "criu/include/kerndat.h" has_fdinfo_lock; unsigned long task_size; # 44 "criu/include/kerndat.h" 3 4 _Bool # 44 "criu/include/kerndat.h" ipv6; enum loginuid_func luid; # 46 "criu/include/kerndat.h" 3 4 _Bool # 46 "criu/include/kerndat.h" compat_cr; # 47 "criu/include/kerndat.h" 3 4 _Bool # 47 "criu/include/kerndat.h" sk_ns; # 48 "criu/include/kerndat.h" 3 4 _Bool # 48 "criu/include/kerndat.h" sk_unix_file; # 49 "criu/include/kerndat.h" 3 4 _Bool # 49 "criu/include/kerndat.h" tun_ns; enum pagemap_func pmap; unsigned int has_xtlocks; unsigned long mmap_min_addr; # 53 "criu/include/kerndat.h" 3 4 _Bool # 53 "criu/include/kerndat.h" has_tcp_half_closed; # 54 "criu/include/kerndat.h" 3 4 _Bool # 54 "criu/include/kerndat.h" stack_guard_gap_hidden; int lsm; # 56 "criu/include/kerndat.h" 3 4 _Bool # 56 "criu/include/kerndat.h" apparmor_ns_dumping_enabled; # 57 "criu/include/kerndat.h" 3 4 _Bool # 57 "criu/include/kerndat.h" has_uffd; unsigned long uffd_features; # 59 "criu/include/kerndat.h" 3 4 _Bool # 59 "criu/include/kerndat.h" has_thp_disable; # 60 "criu/include/kerndat.h" 3 4 _Bool # 60 "criu/include/kerndat.h" can_map_vdso; # 61 "criu/include/kerndat.h" 3 4 _Bool # 61 "criu/include/kerndat.h" vdso_hint_reliable; struct vdso_symtable vdso_sym; # 66 "criu/include/kerndat.h" 3 4 _Bool # 66 "criu/include/kerndat.h" has_nsid; # 67 "criu/include/kerndat.h" 3 4 _Bool # 67 "criu/include/kerndat.h" has_link_nsid; unsigned int sysctl_nr_open; # 69 "criu/include/kerndat.h" 3 4 _Bool # 69 "criu/include/kerndat.h" x86_has_ptrace_fpu_xsave_bug; # 70 "criu/include/kerndat.h" 3 4 _Bool # 70 "criu/include/kerndat.h" has_inotify_setnextwd; # 71 "criu/include/kerndat.h" 3 4 _Bool # 71 "criu/include/kerndat.h" has_kcmp_epoll_tfd; # 72 "criu/include/kerndat.h" 3 4 _Bool # 72 "criu/include/kerndat.h" has_fsopen; # 73 "criu/include/kerndat.h" 3 4 _Bool # 73 "criu/include/kerndat.h" has_clone3_set_tid; # 74 "criu/include/kerndat.h" 3 4 _Bool # 74 "criu/include/kerndat.h" has_timens; # 75 "criu/include/kerndat.h" 3 4 _Bool # 75 "criu/include/kerndat.h" has_newifindex; # 76 "criu/include/kerndat.h" 3 4 _Bool # 76 "criu/include/kerndat.h" has_pidfd_open; # 77 "criu/include/kerndat.h" 3 4 _Bool # 77 "criu/include/kerndat.h" has_pidfd_getfd; # 78 "criu/include/kerndat.h" 3 4 _Bool # 78 "criu/include/kerndat.h" has_nspid; # 79 "criu/include/kerndat.h" 3 4 _Bool # 79 "criu/include/kerndat.h" has_nftables_concat; # 80 "criu/include/kerndat.h" 3 4 _Bool # 80 "criu/include/kerndat.h" has_sockopt_buf_lock; dev_t hugetlb_dev[HUGETLB_MAX]; # 82 "criu/include/kerndat.h" 3 4 _Bool # 82 "criu/include/kerndat.h" has_move_mount_set_group; # 83 "criu/include/kerndat.h" 3 4 _Bool # 83 "criu/include/kerndat.h" has_openat2; # 84 "criu/include/kerndat.h" 3 4 _Bool # 84 "criu/include/kerndat.h" has_rseq; # 85 "criu/include/kerndat.h" 3 4 _Bool # 85 "criu/include/kerndat.h" has_ptrace_get_rseq_conf; struct __ptrace_rseq_configuration libc_rseq_conf; # 87 "criu/include/kerndat.h" 3 4 _Bool # 87 "criu/include/kerndat.h" has_ipv6_freebind; # 88 "criu/include/kerndat.h" 3 4 _Bool # 88 "criu/include/kerndat.h" has_membarrier_get_registrations; # 89 "criu/include/kerndat.h" 3 4 _Bool # 89 "criu/include/kerndat.h" has_pagemap_scan; # 90 "criu/include/kerndat.h" 3 4 _Bool # 90 "criu/include/kerndat.h" has_shstk; }; extern struct kerndat_s kdat; enum { KERNDAT_FS_STAT_DEVPTS, KERNDAT_FS_STAT_DEVTMPFS, KERNDAT_FS_STAT_BINFMT_MISC, KERNDAT_FS_STAT_MAX }; extern int kerndat_fs_virtualized(unsigned int which, u32 kdev); extern int kerndat_has_nspid(void); # 8 "criu/include/rst_info.h" 2 # 1 "./images/mm.pb-c.h" 1 # 9 "./images/mm.pb-c.h" # 18 "./images/mm.pb-c.h" # 1 "./images/vma.pb-c.h" 1 # 19 "./images/mm.pb-c.h" 2 typedef struct AioRingEntry AioRingEntry; typedef struct MmEntry MmEntry; struct AioRingEntry { ProtobufCMessage base; uint64_t id; uint32_t nr_req; uint32_t ring_len; }; struct MmEntry { ProtobufCMessage base; uint64_t mm_start_code; uint64_t mm_end_code; uint64_t mm_start_data; uint64_t mm_end_data; uint64_t mm_start_stack; uint64_t mm_start_brk; uint64_t mm_brk; uint64_t mm_arg_start; uint64_t mm_arg_end; uint64_t mm_env_start; uint64_t mm_env_end; uint32_t exe_file_id; size_t n_mm_saved_auxv; uint64_t *mm_saved_auxv; size_t n_vmas; VmaEntry **vmas; protobuf_c_boolean has_dumpable; int32_t dumpable; size_t n_aios; AioRingEntry **aios; protobuf_c_boolean has_thp_disabled; protobuf_c_boolean thp_disabled; }; void aio_ring_entry__init (AioRingEntry *message); size_t aio_ring_entry__get_packed_size (const AioRingEntry *message); size_t aio_ring_entry__pack (const AioRingEntry *message, uint8_t *out); size_t aio_ring_entry__pack_to_buffer (const AioRingEntry *message, ProtobufCBuffer *buffer); AioRingEntry * aio_ring_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void aio_ring_entry__free_unpacked (AioRingEntry *message, ProtobufCAllocator *allocator); void mm_entry__init (MmEntry *message); size_t mm_entry__get_packed_size (const MmEntry *message); size_t mm_entry__pack (const MmEntry *message, uint8_t *out); size_t mm_entry__pack_to_buffer (const MmEntry *message, ProtobufCBuffer *buffer); MmEntry * mm_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void mm_entry__free_unpacked (MmEntry *message, ProtobufCAllocator *allocator); typedef void (*AioRingEntry_Closure) (const AioRingEntry *message, void *closure_data); typedef void (*MmEntry_Closure) (const MmEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor aio_ring_entry__descriptor; extern const ProtobufCMessageDescriptor mm_entry__descriptor; # 9 "criu/include/rst_info.h" 2 # 1 "./images/core.pb-c.h" 1 # 9 "./images/core.pb-c.h" # 1 "./images/core-x86.pb-c.h" 1 # 9 "./images/core-x86.pb-c.h" # 19 "./images/core-x86.pb-c.h" typedef struct UserX86RegsEntry UserX86RegsEntry; typedef struct UserX86CetEntry UserX86CetEntry; typedef struct UserX86XsaveEntry UserX86XsaveEntry; typedef struct UserX86FpregsEntry UserX86FpregsEntry; typedef struct UserDescT UserDescT; typedef struct ThreadInfoX86 ThreadInfoX86; typedef enum _UserX86RegsMode { USER_X86_REGS_MODE__NATIVE = 1, USER_X86_REGS_MODE__COMPAT = 2 # 32 "./images/core-x86.pb-c.h" 3 4 , _USER_X86_REGS_MODE_IS_INT_SIZE = 0x7fffffff # 33 "./images/core-x86.pb-c.h" } UserX86RegsMode; struct UserX86RegsEntry { ProtobufCMessage base; uint64_t r15; uint64_t r14; uint64_t r13; uint64_t r12; uint64_t bp; uint64_t bx; uint64_t r11; uint64_t r10; uint64_t r9; uint64_t r8; uint64_t ax; uint64_t cx; uint64_t dx; uint64_t si; uint64_t di; uint64_t orig_ax; uint64_t ip; uint64_t cs; uint64_t flags; uint64_t sp; uint64_t ss; uint64_t fs_base; uint64_t gs_base; uint64_t ds; uint64_t es; uint64_t fs; uint64_t gs; protobuf_c_boolean has_mode; UserX86RegsMode mode; }; struct UserX86CetEntry { ProtobufCMessage base; uint64_t cet; uint64_t ssp; }; struct UserX86XsaveEntry { ProtobufCMessage base; uint64_t xstate_bv; size_t n_ymmh_space; uint32_t *ymmh_space; size_t n_bndreg_state; uint64_t *bndreg_state; size_t n_bndcsr_state; uint64_t *bndcsr_state; size_t n_opmask_reg; uint64_t *opmask_reg; size_t n_zmm_upper; uint64_t *zmm_upper; size_t n_hi16_zmm; uint64_t *hi16_zmm; size_t n_pkru; uint32_t *pkru; UserX86CetEntry *cet; }; struct UserX86FpregsEntry { ProtobufCMessage base; uint32_t cwd; uint32_t swd; uint32_t twd; uint32_t fop; uint64_t rip; uint64_t rdp; uint32_t mxcsr; uint32_t mxcsr_mask; size_t n_st_space; uint32_t *st_space; size_t n_xmm_space; uint32_t *xmm_space; size_t n_padding; uint32_t *padding; UserX86XsaveEntry *xsave; }; struct UserDescT { ProtobufCMessage base; uint32_t entry_number; uint32_t base_addr; uint32_t limit; protobuf_c_boolean seg_32bit; protobuf_c_boolean contents_h; protobuf_c_boolean contents_l; protobuf_c_boolean read_exec_only; protobuf_c_boolean limit_in_pages; protobuf_c_boolean seg_not_present; protobuf_c_boolean usable; }; struct ThreadInfoX86 { ProtobufCMessage base; uint64_t clear_tid_addr; UserX86RegsEntry *gpregs; UserX86FpregsEntry *fpregs; size_t n_tls; UserDescT **tls; }; void user_x86_regs_entry__init (UserX86RegsEntry *message); size_t user_x86_regs_entry__get_packed_size (const UserX86RegsEntry *message); size_t user_x86_regs_entry__pack (const UserX86RegsEntry *message, uint8_t *out); size_t user_x86_regs_entry__pack_to_buffer (const UserX86RegsEntry *message, ProtobufCBuffer *buffer); UserX86RegsEntry * user_x86_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_x86_regs_entry__free_unpacked (UserX86RegsEntry *message, ProtobufCAllocator *allocator); void user_x86_cet_entry__init (UserX86CetEntry *message); size_t user_x86_cet_entry__get_packed_size (const UserX86CetEntry *message); size_t user_x86_cet_entry__pack (const UserX86CetEntry *message, uint8_t *out); size_t user_x86_cet_entry__pack_to_buffer (const UserX86CetEntry *message, ProtobufCBuffer *buffer); UserX86CetEntry * user_x86_cet_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_x86_cet_entry__free_unpacked (UserX86CetEntry *message, ProtobufCAllocator *allocator); void user_x86_xsave_entry__init (UserX86XsaveEntry *message); size_t user_x86_xsave_entry__get_packed_size (const UserX86XsaveEntry *message); size_t user_x86_xsave_entry__pack (const UserX86XsaveEntry *message, uint8_t *out); size_t user_x86_xsave_entry__pack_to_buffer (const UserX86XsaveEntry *message, ProtobufCBuffer *buffer); UserX86XsaveEntry * user_x86_xsave_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_x86_xsave_entry__free_unpacked (UserX86XsaveEntry *message, ProtobufCAllocator *allocator); void user_x86_fpregs_entry__init (UserX86FpregsEntry *message); size_t user_x86_fpregs_entry__get_packed_size (const UserX86FpregsEntry *message); size_t user_x86_fpregs_entry__pack (const UserX86FpregsEntry *message, uint8_t *out); size_t user_x86_fpregs_entry__pack_to_buffer (const UserX86FpregsEntry *message, ProtobufCBuffer *buffer); UserX86FpregsEntry * user_x86_fpregs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_x86_fpregs_entry__free_unpacked (UserX86FpregsEntry *message, ProtobufCAllocator *allocator); void user_desc_t__init (UserDescT *message); size_t user_desc_t__get_packed_size (const UserDescT *message); size_t user_desc_t__pack (const UserDescT *message, uint8_t *out); size_t user_desc_t__pack_to_buffer (const UserDescT *message, ProtobufCBuffer *buffer); UserDescT * user_desc_t__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_desc_t__free_unpacked (UserDescT *message, ProtobufCAllocator *allocator); void thread_info_x86__init (ThreadInfoX86 *message); size_t thread_info_x86__get_packed_size (const ThreadInfoX86 *message); size_t thread_info_x86__pack (const ThreadInfoX86 *message, uint8_t *out); size_t thread_info_x86__pack_to_buffer (const ThreadInfoX86 *message, ProtobufCBuffer *buffer); ThreadInfoX86 * thread_info_x86__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_x86__free_unpacked (ThreadInfoX86 *message, ProtobufCAllocator *allocator); typedef void (*UserX86RegsEntry_Closure) (const UserX86RegsEntry *message, void *closure_data); typedef void (*UserX86CetEntry_Closure) (const UserX86CetEntry *message, void *closure_data); typedef void (*UserX86XsaveEntry_Closure) (const UserX86XsaveEntry *message, void *closure_data); typedef void (*UserX86FpregsEntry_Closure) (const UserX86FpregsEntry *message, void *closure_data); typedef void (*UserDescT_Closure) (const UserDescT *message, void *closure_data); typedef void (*ThreadInfoX86_Closure) (const ThreadInfoX86 *message, void *closure_data); extern const ProtobufCEnumDescriptor user_x86_regs_mode__descriptor; extern const ProtobufCMessageDescriptor user_x86_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_x86_cet_entry__descriptor; extern const ProtobufCMessageDescriptor user_x86_xsave_entry__descriptor; extern const ProtobufCMessageDescriptor user_x86_fpregs_entry__descriptor; extern const ProtobufCMessageDescriptor user_desc_t__descriptor; extern const ProtobufCMessageDescriptor thread_info_x86__descriptor; # 18 "./images/core.pb-c.h" 2 # 1 "./images/core-arm.pb-c.h" 1 # 9 "./images/core-arm.pb-c.h" # 19 "./images/core-arm.pb-c.h" typedef struct UserArmRegsEntry UserArmRegsEntry; typedef struct UserArmVfpstateEntry UserArmVfpstateEntry; typedef struct ThreadInfoArm ThreadInfoArm; struct UserArmRegsEntry { ProtobufCMessage base; uint32_t r0; uint32_t r1; uint32_t r2; uint32_t r3; uint32_t r4; uint32_t r5; uint32_t r6; uint32_t r7; uint32_t r8; uint32_t r9; uint32_t r10; uint32_t fp; uint32_t ip; uint32_t sp; uint32_t lr; uint32_t pc; uint32_t cpsr; uint32_t orig_r0; }; struct UserArmVfpstateEntry { ProtobufCMessage base; size_t n_vfp_regs; uint64_t *vfp_regs; uint32_t fpscr; uint32_t fpexc; uint32_t fpinst; uint32_t fpinst2; }; struct ThreadInfoArm { ProtobufCMessage base; uint64_t clear_tid_addr; uint32_t tls; UserArmRegsEntry *gpregs; UserArmVfpstateEntry *fpstate; }; void user_arm_regs_entry__init (UserArmRegsEntry *message); size_t user_arm_regs_entry__get_packed_size (const UserArmRegsEntry *message); size_t user_arm_regs_entry__pack (const UserArmRegsEntry *message, uint8_t *out); size_t user_arm_regs_entry__pack_to_buffer (const UserArmRegsEntry *message, ProtobufCBuffer *buffer); UserArmRegsEntry * user_arm_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_arm_regs_entry__free_unpacked (UserArmRegsEntry *message, ProtobufCAllocator *allocator); void user_arm_vfpstate_entry__init (UserArmVfpstateEntry *message); size_t user_arm_vfpstate_entry__get_packed_size (const UserArmVfpstateEntry *message); size_t user_arm_vfpstate_entry__pack (const UserArmVfpstateEntry *message, uint8_t *out); size_t user_arm_vfpstate_entry__pack_to_buffer (const UserArmVfpstateEntry *message, ProtobufCBuffer *buffer); UserArmVfpstateEntry * user_arm_vfpstate_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_arm_vfpstate_entry__free_unpacked (UserArmVfpstateEntry *message, ProtobufCAllocator *allocator); void thread_info_arm__init (ThreadInfoArm *message); size_t thread_info_arm__get_packed_size (const ThreadInfoArm *message); size_t thread_info_arm__pack (const ThreadInfoArm *message, uint8_t *out); size_t thread_info_arm__pack_to_buffer (const ThreadInfoArm *message, ProtobufCBuffer *buffer); ThreadInfoArm * thread_info_arm__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_arm__free_unpacked (ThreadInfoArm *message, ProtobufCAllocator *allocator); typedef void (*UserArmRegsEntry_Closure) (const UserArmRegsEntry *message, void *closure_data); typedef void (*UserArmVfpstateEntry_Closure) (const UserArmVfpstateEntry *message, void *closure_data); typedef void (*ThreadInfoArm_Closure) (const ThreadInfoArm *message, void *closure_data); extern const ProtobufCMessageDescriptor user_arm_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_arm_vfpstate_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_arm__descriptor; # 19 "./images/core.pb-c.h" 2 # 1 "./images/core-aarch64.pb-c.h" 1 # 9 "./images/core-aarch64.pb-c.h" # 19 "./images/core-aarch64.pb-c.h" typedef struct UserAarch64RegsEntry UserAarch64RegsEntry; typedef struct UserAarch64FpsimdContextEntry UserAarch64FpsimdContextEntry; typedef struct ThreadInfoAarch64 ThreadInfoAarch64; struct UserAarch64RegsEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; uint64_t sp; uint64_t pc; uint64_t pstate; }; struct UserAarch64FpsimdContextEntry { ProtobufCMessage base; size_t n_vregs; uint64_t *vregs; uint32_t fpsr; uint32_t fpcr; }; struct ThreadInfoAarch64 { ProtobufCMessage base; uint64_t clear_tid_addr; uint64_t tls; UserAarch64RegsEntry *gpregs; UserAarch64FpsimdContextEntry *fpsimd; }; void user_aarch64_regs_entry__init (UserAarch64RegsEntry *message); size_t user_aarch64_regs_entry__get_packed_size (const UserAarch64RegsEntry *message); size_t user_aarch64_regs_entry__pack (const UserAarch64RegsEntry *message, uint8_t *out); size_t user_aarch64_regs_entry__pack_to_buffer (const UserAarch64RegsEntry *message, ProtobufCBuffer *buffer); UserAarch64RegsEntry * user_aarch64_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_aarch64_regs_entry__free_unpacked (UserAarch64RegsEntry *message, ProtobufCAllocator *allocator); void user_aarch64_fpsimd_context_entry__init (UserAarch64FpsimdContextEntry *message); size_t user_aarch64_fpsimd_context_entry__get_packed_size (const UserAarch64FpsimdContextEntry *message); size_t user_aarch64_fpsimd_context_entry__pack (const UserAarch64FpsimdContextEntry *message, uint8_t *out); size_t user_aarch64_fpsimd_context_entry__pack_to_buffer (const UserAarch64FpsimdContextEntry *message, ProtobufCBuffer *buffer); UserAarch64FpsimdContextEntry * user_aarch64_fpsimd_context_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_aarch64_fpsimd_context_entry__free_unpacked (UserAarch64FpsimdContextEntry *message, ProtobufCAllocator *allocator); void thread_info_aarch64__init (ThreadInfoAarch64 *message); size_t thread_info_aarch64__get_packed_size (const ThreadInfoAarch64 *message); size_t thread_info_aarch64__pack (const ThreadInfoAarch64 *message, uint8_t *out); size_t thread_info_aarch64__pack_to_buffer (const ThreadInfoAarch64 *message, ProtobufCBuffer *buffer); ThreadInfoAarch64 * thread_info_aarch64__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_aarch64__free_unpacked (ThreadInfoAarch64 *message, ProtobufCAllocator *allocator); typedef void (*UserAarch64RegsEntry_Closure) (const UserAarch64RegsEntry *message, void *closure_data); typedef void (*UserAarch64FpsimdContextEntry_Closure) (const UserAarch64FpsimdContextEntry *message, void *closure_data); typedef void (*ThreadInfoAarch64_Closure) (const ThreadInfoAarch64 *message, void *closure_data); extern const ProtobufCMessageDescriptor user_aarch64_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_aarch64_fpsimd_context_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_aarch64__descriptor; # 20 "./images/core.pb-c.h" 2 # 1 "./images/core-ppc64.pb-c.h" 1 # 9 "./images/core-ppc64.pb-c.h" # 19 "./images/core-ppc64.pb-c.h" typedef struct UserPpc64RegsEntry UserPpc64RegsEntry; typedef struct UserPpc64FpstateEntry UserPpc64FpstateEntry; typedef struct UserPpc64VrstateEntry UserPpc64VrstateEntry; typedef struct UserPpc64VsxstateEntry UserPpc64VsxstateEntry; typedef struct UserPpc64TmRegsEntry UserPpc64TmRegsEntry; typedef struct ThreadInfoPpc64 ThreadInfoPpc64; struct UserPpc64RegsEntry { ProtobufCMessage base; size_t n_gpr; uint64_t *gpr; uint64_t nip; uint64_t msr; uint64_t orig_gpr3; uint64_t ctr; uint64_t link; uint64_t xer; uint64_t ccr; uint64_t trap; protobuf_c_boolean has_texasr; uint64_t texasr; protobuf_c_boolean has_tfhar; uint64_t tfhar; protobuf_c_boolean has_tfiar; uint64_t tfiar; }; struct UserPpc64FpstateEntry { ProtobufCMessage base; size_t n_fpregs; uint64_t *fpregs; }; struct UserPpc64VrstateEntry { ProtobufCMessage base; # 91 "./images/core-ppc64.pb-c.h" size_t n_vrregs; uint64_t *vrregs; uint32_t vrsave; }; struct UserPpc64VsxstateEntry { ProtobufCMessage base; size_t n_vsxregs; uint64_t *vsxregs; }; # 121 "./images/core-ppc64.pb-c.h" struct UserPpc64TmRegsEntry { ProtobufCMessage base; UserPpc64RegsEntry *gpregs; UserPpc64FpstateEntry *fpstate; UserPpc64VrstateEntry *vrstate; UserPpc64VsxstateEntry *vsxstate; }; struct ThreadInfoPpc64 { ProtobufCMessage base; uint64_t clear_tid_addr; UserPpc64RegsEntry *gpregs; UserPpc64FpstateEntry *fpstate; UserPpc64VrstateEntry *vrstate; UserPpc64VsxstateEntry *vsxstate; UserPpc64TmRegsEntry *tmstate; }; void user_ppc64_regs_entry__init (UserPpc64RegsEntry *message); size_t user_ppc64_regs_entry__get_packed_size (const UserPpc64RegsEntry *message); size_t user_ppc64_regs_entry__pack (const UserPpc64RegsEntry *message, uint8_t *out); size_t user_ppc64_regs_entry__pack_to_buffer (const UserPpc64RegsEntry *message, ProtobufCBuffer *buffer); UserPpc64RegsEntry * user_ppc64_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_ppc64_regs_entry__free_unpacked (UserPpc64RegsEntry *message, ProtobufCAllocator *allocator); void user_ppc64_fpstate_entry__init (UserPpc64FpstateEntry *message); size_t user_ppc64_fpstate_entry__get_packed_size (const UserPpc64FpstateEntry *message); size_t user_ppc64_fpstate_entry__pack (const UserPpc64FpstateEntry *message, uint8_t *out); size_t user_ppc64_fpstate_entry__pack_to_buffer (const UserPpc64FpstateEntry *message, ProtobufCBuffer *buffer); UserPpc64FpstateEntry * user_ppc64_fpstate_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_ppc64_fpstate_entry__free_unpacked (UserPpc64FpstateEntry *message, ProtobufCAllocator *allocator); void user_ppc64_vrstate_entry__init (UserPpc64VrstateEntry *message); size_t user_ppc64_vrstate_entry__get_packed_size (const UserPpc64VrstateEntry *message); size_t user_ppc64_vrstate_entry__pack (const UserPpc64VrstateEntry *message, uint8_t *out); size_t user_ppc64_vrstate_entry__pack_to_buffer (const UserPpc64VrstateEntry *message, ProtobufCBuffer *buffer); UserPpc64VrstateEntry * user_ppc64_vrstate_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_ppc64_vrstate_entry__free_unpacked (UserPpc64VrstateEntry *message, ProtobufCAllocator *allocator); void user_ppc64_vsxstate_entry__init (UserPpc64VsxstateEntry *message); size_t user_ppc64_vsxstate_entry__get_packed_size (const UserPpc64VsxstateEntry *message); size_t user_ppc64_vsxstate_entry__pack (const UserPpc64VsxstateEntry *message, uint8_t *out); size_t user_ppc64_vsxstate_entry__pack_to_buffer (const UserPpc64VsxstateEntry *message, ProtobufCBuffer *buffer); UserPpc64VsxstateEntry * user_ppc64_vsxstate_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_ppc64_vsxstate_entry__free_unpacked (UserPpc64VsxstateEntry *message, ProtobufCAllocator *allocator); void user_ppc64_tm_regs_entry__init (UserPpc64TmRegsEntry *message); size_t user_ppc64_tm_regs_entry__get_packed_size (const UserPpc64TmRegsEntry *message); size_t user_ppc64_tm_regs_entry__pack (const UserPpc64TmRegsEntry *message, uint8_t *out); size_t user_ppc64_tm_regs_entry__pack_to_buffer (const UserPpc64TmRegsEntry *message, ProtobufCBuffer *buffer); UserPpc64TmRegsEntry * user_ppc64_tm_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_ppc64_tm_regs_entry__free_unpacked (UserPpc64TmRegsEntry *message, ProtobufCAllocator *allocator); void thread_info_ppc64__init (ThreadInfoPpc64 *message); size_t thread_info_ppc64__get_packed_size (const ThreadInfoPpc64 *message); size_t thread_info_ppc64__pack (const ThreadInfoPpc64 *message, uint8_t *out); size_t thread_info_ppc64__pack_to_buffer (const ThreadInfoPpc64 *message, ProtobufCBuffer *buffer); ThreadInfoPpc64 * thread_info_ppc64__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_ppc64__free_unpacked (ThreadInfoPpc64 *message, ProtobufCAllocator *allocator); typedef void (*UserPpc64RegsEntry_Closure) (const UserPpc64RegsEntry *message, void *closure_data); typedef void (*UserPpc64FpstateEntry_Closure) (const UserPpc64FpstateEntry *message, void *closure_data); typedef void (*UserPpc64VrstateEntry_Closure) (const UserPpc64VrstateEntry *message, void *closure_data); typedef void (*UserPpc64VsxstateEntry_Closure) (const UserPpc64VsxstateEntry *message, void *closure_data); typedef void (*UserPpc64TmRegsEntry_Closure) (const UserPpc64TmRegsEntry *message, void *closure_data); typedef void (*ThreadInfoPpc64_Closure) (const ThreadInfoPpc64 *message, void *closure_data); extern const ProtobufCMessageDescriptor user_ppc64_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_ppc64_fpstate_entry__descriptor; extern const ProtobufCMessageDescriptor user_ppc64_vrstate_entry__descriptor; extern const ProtobufCMessageDescriptor user_ppc64_vsxstate_entry__descriptor; extern const ProtobufCMessageDescriptor user_ppc64_tm_regs_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_ppc64__descriptor; # 21 "./images/core.pb-c.h" 2 # 1 "./images/core-s390.pb-c.h" 1 # 9 "./images/core-s390.pb-c.h" # 19 "./images/core-s390.pb-c.h" typedef struct UserS390RegsEntry UserS390RegsEntry; typedef struct UserS390VxrsLowEntry UserS390VxrsLowEntry; typedef struct UserS390VxrsHighEntry UserS390VxrsHighEntry; typedef struct UserS390FpregsEntry UserS390FpregsEntry; typedef struct UserS390GsCbEntry UserS390GsCbEntry; typedef struct UserS390RiEntry UserS390RiEntry; typedef struct ThreadInfoS390 ThreadInfoS390; struct UserS390RegsEntry { ProtobufCMessage base; uint64_t psw_mask; uint64_t psw_addr; size_t n_gprs; uint64_t *gprs; size_t n_acrs; uint32_t *acrs; uint64_t orig_gpr2; uint32_t system_call; }; struct UserS390VxrsLowEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; }; # 66 "./images/core-s390.pb-c.h" struct UserS390VxrsHighEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; }; struct UserS390FpregsEntry { ProtobufCMessage base; uint32_t fpc; size_t n_fprs; uint64_t *fprs; }; struct UserS390GsCbEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; }; struct UserS390RiEntry { ProtobufCMessage base; uint32_t ri_on; size_t n_regs; uint64_t *regs; }; struct ThreadInfoS390 { ProtobufCMessage base; uint64_t clear_tid_addr; UserS390RegsEntry *gpregs; UserS390FpregsEntry *fpregs; UserS390VxrsLowEntry *vxrs_low; UserS390VxrsHighEntry *vxrs_high; UserS390GsCbEntry *gs_cb; UserS390GsCbEntry *gs_bc; UserS390RiEntry *ri_cb; }; void user_s390_regs_entry__init (UserS390RegsEntry *message); size_t user_s390_regs_entry__get_packed_size (const UserS390RegsEntry *message); size_t user_s390_regs_entry__pack (const UserS390RegsEntry *message, uint8_t *out); size_t user_s390_regs_entry__pack_to_buffer (const UserS390RegsEntry *message, ProtobufCBuffer *buffer); UserS390RegsEntry * user_s390_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_regs_entry__free_unpacked (UserS390RegsEntry *message, ProtobufCAllocator *allocator); void user_s390_vxrs_low_entry__init (UserS390VxrsLowEntry *message); size_t user_s390_vxrs_low_entry__get_packed_size (const UserS390VxrsLowEntry *message); size_t user_s390_vxrs_low_entry__pack (const UserS390VxrsLowEntry *message, uint8_t *out); size_t user_s390_vxrs_low_entry__pack_to_buffer (const UserS390VxrsLowEntry *message, ProtobufCBuffer *buffer); UserS390VxrsLowEntry * user_s390_vxrs_low_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_vxrs_low_entry__free_unpacked (UserS390VxrsLowEntry *message, ProtobufCAllocator *allocator); void user_s390_vxrs_high_entry__init (UserS390VxrsHighEntry *message); size_t user_s390_vxrs_high_entry__get_packed_size (const UserS390VxrsHighEntry *message); size_t user_s390_vxrs_high_entry__pack (const UserS390VxrsHighEntry *message, uint8_t *out); size_t user_s390_vxrs_high_entry__pack_to_buffer (const UserS390VxrsHighEntry *message, ProtobufCBuffer *buffer); UserS390VxrsHighEntry * user_s390_vxrs_high_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_vxrs_high_entry__free_unpacked (UserS390VxrsHighEntry *message, ProtobufCAllocator *allocator); void user_s390_fpregs_entry__init (UserS390FpregsEntry *message); size_t user_s390_fpregs_entry__get_packed_size (const UserS390FpregsEntry *message); size_t user_s390_fpregs_entry__pack (const UserS390FpregsEntry *message, uint8_t *out); size_t user_s390_fpregs_entry__pack_to_buffer (const UserS390FpregsEntry *message, ProtobufCBuffer *buffer); UserS390FpregsEntry * user_s390_fpregs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_fpregs_entry__free_unpacked (UserS390FpregsEntry *message, ProtobufCAllocator *allocator); void user_s390_gs_cb_entry__init (UserS390GsCbEntry *message); size_t user_s390_gs_cb_entry__get_packed_size (const UserS390GsCbEntry *message); size_t user_s390_gs_cb_entry__pack (const UserS390GsCbEntry *message, uint8_t *out); size_t user_s390_gs_cb_entry__pack_to_buffer (const UserS390GsCbEntry *message, ProtobufCBuffer *buffer); UserS390GsCbEntry * user_s390_gs_cb_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_gs_cb_entry__free_unpacked (UserS390GsCbEntry *message, ProtobufCAllocator *allocator); void user_s390_ri_entry__init (UserS390RiEntry *message); size_t user_s390_ri_entry__get_packed_size (const UserS390RiEntry *message); size_t user_s390_ri_entry__pack (const UserS390RiEntry *message, uint8_t *out); size_t user_s390_ri_entry__pack_to_buffer (const UserS390RiEntry *message, ProtobufCBuffer *buffer); UserS390RiEntry * user_s390_ri_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_s390_ri_entry__free_unpacked (UserS390RiEntry *message, ProtobufCAllocator *allocator); void thread_info_s390__init (ThreadInfoS390 *message); size_t thread_info_s390__get_packed_size (const ThreadInfoS390 *message); size_t thread_info_s390__pack (const ThreadInfoS390 *message, uint8_t *out); size_t thread_info_s390__pack_to_buffer (const ThreadInfoS390 *message, ProtobufCBuffer *buffer); ThreadInfoS390 * thread_info_s390__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_s390__free_unpacked (ThreadInfoS390 *message, ProtobufCAllocator *allocator); typedef void (*UserS390RegsEntry_Closure) (const UserS390RegsEntry *message, void *closure_data); typedef void (*UserS390VxrsLowEntry_Closure) (const UserS390VxrsLowEntry *message, void *closure_data); typedef void (*UserS390VxrsHighEntry_Closure) (const UserS390VxrsHighEntry *message, void *closure_data); typedef void (*UserS390FpregsEntry_Closure) (const UserS390FpregsEntry *message, void *closure_data); typedef void (*UserS390GsCbEntry_Closure) (const UserS390GsCbEntry *message, void *closure_data); typedef void (*UserS390RiEntry_Closure) (const UserS390RiEntry *message, void *closure_data); typedef void (*ThreadInfoS390_Closure) (const ThreadInfoS390 *message, void *closure_data); extern const ProtobufCMessageDescriptor user_s390_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_s390_vxrs_low_entry__descriptor; extern const ProtobufCMessageDescriptor user_s390_vxrs_high_entry__descriptor; extern const ProtobufCMessageDescriptor user_s390_fpregs_entry__descriptor; extern const ProtobufCMessageDescriptor user_s390_gs_cb_entry__descriptor; extern const ProtobufCMessageDescriptor user_s390_ri_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_s390__descriptor; # 22 "./images/core.pb-c.h" 2 # 1 "./images/core-mips.pb-c.h" 1 # 9 "./images/core-mips.pb-c.h" # 19 "./images/core-mips.pb-c.h" typedef struct UserMipsRegsEntry UserMipsRegsEntry; typedef struct UserMipsFpregsEntry UserMipsFpregsEntry; typedef struct ThreadInfoMips ThreadInfoMips; struct UserMipsRegsEntry { ProtobufCMessage base; uint64_t r0; uint64_t r1; uint64_t r2; uint64_t r3; uint64_t r4; uint64_t r5; uint64_t r6; uint64_t r7; uint64_t r8; uint64_t r9; uint64_t r10; uint64_t r11; uint64_t r12; uint64_t r13; uint64_t r14; uint64_t r15; uint64_t r16; uint64_t r17; uint64_t r18; uint64_t r19; uint64_t r20; uint64_t r21; uint64_t r22; uint64_t r23; uint64_t r24; uint64_t r25; uint64_t r26; uint64_t r27; uint64_t r28; uint64_t r29; uint64_t r30; uint64_t r31; uint64_t lo; uint64_t hi; uint64_t cp0_epc; uint64_t cp0_badvaddr; uint64_t cp0_status; uint64_t cp0_cause; }; struct UserMipsFpregsEntry { ProtobufCMessage base; uint64_t r0; uint64_t r1; uint64_t r2; uint64_t r3; uint64_t r4; uint64_t r5; uint64_t r6; uint64_t r7; uint64_t r8; uint64_t r9; uint64_t r10; uint64_t r11; uint64_t r12; uint64_t r13; uint64_t r14; uint64_t r15; uint64_t r16; uint64_t r17; uint64_t r18; uint64_t r19; uint64_t r20; uint64_t r21; uint64_t r22; uint64_t r23; uint64_t r24; uint64_t r25; uint64_t r26; uint64_t r27; uint64_t r28; uint64_t r29; uint64_t r30; uint64_t r31; uint64_t lo; uint64_t hi; uint32_t fpu_fcr31; uint32_t fpu_id; }; struct ThreadInfoMips { ProtobufCMessage base; uint64_t clear_tid_addr; uint64_t tls; UserMipsRegsEntry *gpregs; UserMipsFpregsEntry *fpregs; }; void user_mips_regs_entry__init (UserMipsRegsEntry *message); size_t user_mips_regs_entry__get_packed_size (const UserMipsRegsEntry *message); size_t user_mips_regs_entry__pack (const UserMipsRegsEntry *message, uint8_t *out); size_t user_mips_regs_entry__pack_to_buffer (const UserMipsRegsEntry *message, ProtobufCBuffer *buffer); UserMipsRegsEntry * user_mips_regs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_mips_regs_entry__free_unpacked (UserMipsRegsEntry *message, ProtobufCAllocator *allocator); void user_mips_fpregs_entry__init (UserMipsFpregsEntry *message); size_t user_mips_fpregs_entry__get_packed_size (const UserMipsFpregsEntry *message); size_t user_mips_fpregs_entry__pack (const UserMipsFpregsEntry *message, uint8_t *out); size_t user_mips_fpregs_entry__pack_to_buffer (const UserMipsFpregsEntry *message, ProtobufCBuffer *buffer); UserMipsFpregsEntry * user_mips_fpregs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_mips_fpregs_entry__free_unpacked (UserMipsFpregsEntry *message, ProtobufCAllocator *allocator); void thread_info_mips__init (ThreadInfoMips *message); size_t thread_info_mips__get_packed_size (const ThreadInfoMips *message); size_t thread_info_mips__pack (const ThreadInfoMips *message, uint8_t *out); size_t thread_info_mips__pack_to_buffer (const ThreadInfoMips *message, ProtobufCBuffer *buffer); ThreadInfoMips * thread_info_mips__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_mips__free_unpacked (ThreadInfoMips *message, ProtobufCAllocator *allocator); typedef void (*UserMipsRegsEntry_Closure) (const UserMipsRegsEntry *message, void *closure_data); typedef void (*UserMipsFpregsEntry_Closure) (const UserMipsFpregsEntry *message, void *closure_data); typedef void (*ThreadInfoMips_Closure) (const ThreadInfoMips *message, void *closure_data); extern const ProtobufCMessageDescriptor user_mips_regs_entry__descriptor; extern const ProtobufCMessageDescriptor user_mips_fpregs_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_mips__descriptor; # 23 "./images/core.pb-c.h" 2 # 1 "./images/core-loongarch64.pb-c.h" 1 # 9 "./images/core-loongarch64.pb-c.h" # 19 "./images/core-loongarch64.pb-c.h" typedef struct UserLoongarch64GpregsEntry UserLoongarch64GpregsEntry; typedef struct UserLoongarch64FpregsEntry UserLoongarch64FpregsEntry; typedef struct ThreadInfoLoongarch64 ThreadInfoLoongarch64; struct UserLoongarch64GpregsEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; uint64_t pc; }; struct UserLoongarch64FpregsEntry { ProtobufCMessage base; size_t n_regs; uint64_t *regs; uint64_t fcc; uint32_t fcsr; }; struct ThreadInfoLoongarch64 { ProtobufCMessage base; uint64_t clear_tid_addr; uint64_t tls; UserLoongarch64GpregsEntry *gpregs; UserLoongarch64FpregsEntry *fpregs; }; void user_loongarch64_gpregs_entry__init (UserLoongarch64GpregsEntry *message); size_t user_loongarch64_gpregs_entry__get_packed_size (const UserLoongarch64GpregsEntry *message); size_t user_loongarch64_gpregs_entry__pack (const UserLoongarch64GpregsEntry *message, uint8_t *out); size_t user_loongarch64_gpregs_entry__pack_to_buffer (const UserLoongarch64GpregsEntry *message, ProtobufCBuffer *buffer); UserLoongarch64GpregsEntry * user_loongarch64_gpregs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_loongarch64_gpregs_entry__free_unpacked (UserLoongarch64GpregsEntry *message, ProtobufCAllocator *allocator); void user_loongarch64_fpregs_entry__init (UserLoongarch64FpregsEntry *message); size_t user_loongarch64_fpregs_entry__get_packed_size (const UserLoongarch64FpregsEntry *message); size_t user_loongarch64_fpregs_entry__pack (const UserLoongarch64FpregsEntry *message, uint8_t *out); size_t user_loongarch64_fpregs_entry__pack_to_buffer (const UserLoongarch64FpregsEntry *message, ProtobufCBuffer *buffer); UserLoongarch64FpregsEntry * user_loongarch64_fpregs_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void user_loongarch64_fpregs_entry__free_unpacked (UserLoongarch64FpregsEntry *message, ProtobufCAllocator *allocator); void thread_info_loongarch64__init (ThreadInfoLoongarch64 *message); size_t thread_info_loongarch64__get_packed_size (const ThreadInfoLoongarch64 *message); size_t thread_info_loongarch64__pack (const ThreadInfoLoongarch64 *message, uint8_t *out); size_t thread_info_loongarch64__pack_to_buffer (const ThreadInfoLoongarch64 *message, ProtobufCBuffer *buffer); ThreadInfoLoongarch64 * thread_info_loongarch64__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_info_loongarch64__free_unpacked (ThreadInfoLoongarch64 *message, ProtobufCAllocator *allocator); typedef void (*UserLoongarch64GpregsEntry_Closure) (const UserLoongarch64GpregsEntry *message, void *closure_data); typedef void (*UserLoongarch64FpregsEntry_Closure) (const UserLoongarch64FpregsEntry *message, void *closure_data); typedef void (*ThreadInfoLoongarch64_Closure) (const ThreadInfoLoongarch64 *message, void *closure_data); extern const ProtobufCMessageDescriptor user_loongarch64_gpregs_entry__descriptor; extern const ProtobufCMessageDescriptor user_loongarch64_fpregs_entry__descriptor; extern const ProtobufCMessageDescriptor thread_info_loongarch64__descriptor; # 24 "./images/core.pb-c.h" 2 # 1 "./images/rlimit.pb-c.h" 1 # 9 "./images/rlimit.pb-c.h" # 18 "./images/rlimit.pb-c.h" typedef struct RlimitEntry RlimitEntry; struct RlimitEntry { ProtobufCMessage base; uint64_t cur; uint64_t max; }; void rlimit_entry__init (RlimitEntry *message); size_t rlimit_entry__get_packed_size (const RlimitEntry *message); size_t rlimit_entry__pack (const RlimitEntry *message, uint8_t *out); size_t rlimit_entry__pack_to_buffer (const RlimitEntry *message, ProtobufCBuffer *buffer); RlimitEntry * rlimit_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void rlimit_entry__free_unpacked (RlimitEntry *message, ProtobufCAllocator *allocator); typedef void (*RlimitEntry_Closure) (const RlimitEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor rlimit_entry__descriptor; # 25 "./images/core.pb-c.h" 2 # 1 "./images/timer.pb-c.h" 1 # 9 "./images/timer.pb-c.h" # 18 "./images/timer.pb-c.h" typedef struct ItimerEntry ItimerEntry; typedef struct PosixTimerEntry PosixTimerEntry; typedef struct TaskTimersEntry TaskTimersEntry; struct ItimerEntry { ProtobufCMessage base; uint64_t isec; uint64_t iusec; uint64_t vsec; uint64_t vusec; }; struct PosixTimerEntry { ProtobufCMessage base; uint32_t it_id; uint32_t clock_id; uint32_t si_signo; uint32_t it_sigev_notify; uint64_t sival_ptr; uint32_t overrun; uint64_t isec; uint64_t insec; uint64_t vsec; uint64_t vnsec; protobuf_c_boolean has_notify_thread_id; int32_t notify_thread_id; }; struct TaskTimersEntry { ProtobufCMessage base; ItimerEntry *real; ItimerEntry *virt; ItimerEntry *prof; size_t n_posix; PosixTimerEntry **posix; }; void itimer_entry__init (ItimerEntry *message); size_t itimer_entry__get_packed_size (const ItimerEntry *message); size_t itimer_entry__pack (const ItimerEntry *message, uint8_t *out); size_t itimer_entry__pack_to_buffer (const ItimerEntry *message, ProtobufCBuffer *buffer); ItimerEntry * itimer_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void itimer_entry__free_unpacked (ItimerEntry *message, ProtobufCAllocator *allocator); void posix_timer_entry__init (PosixTimerEntry *message); size_t posix_timer_entry__get_packed_size (const PosixTimerEntry *message); size_t posix_timer_entry__pack (const PosixTimerEntry *message, uint8_t *out); size_t posix_timer_entry__pack_to_buffer (const PosixTimerEntry *message, ProtobufCBuffer *buffer); PosixTimerEntry * posix_timer_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void posix_timer_entry__free_unpacked (PosixTimerEntry *message, ProtobufCAllocator *allocator); void task_timers_entry__init (TaskTimersEntry *message); size_t task_timers_entry__get_packed_size (const TaskTimersEntry *message); size_t task_timers_entry__pack (const TaskTimersEntry *message, uint8_t *out); size_t task_timers_entry__pack_to_buffer (const TaskTimersEntry *message, ProtobufCBuffer *buffer); TaskTimersEntry * task_timers_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void task_timers_entry__free_unpacked (TaskTimersEntry *message, ProtobufCAllocator *allocator); typedef void (*ItimerEntry_Closure) (const ItimerEntry *message, void *closure_data); typedef void (*PosixTimerEntry_Closure) (const PosixTimerEntry *message, void *closure_data); typedef void (*TaskTimersEntry_Closure) (const TaskTimersEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor itimer_entry__descriptor; extern const ProtobufCMessageDescriptor posix_timer_entry__descriptor; extern const ProtobufCMessageDescriptor task_timers_entry__descriptor; # 26 "./images/core.pb-c.h" 2 # 1 "./images/creds.pb-c.h" 1 # 9 "./images/creds.pb-c.h" # 18 "./images/creds.pb-c.h" typedef struct CredsEntry CredsEntry; struct CredsEntry { ProtobufCMessage base; uint32_t uid; uint32_t gid; uint32_t euid; uint32_t egid; uint32_t suid; uint32_t sgid; uint32_t fsuid; uint32_t fsgid; size_t n_cap_inh; uint32_t *cap_inh; size_t n_cap_prm; uint32_t *cap_prm; size_t n_cap_eff; uint32_t *cap_eff; size_t n_cap_bnd; uint32_t *cap_bnd; uint32_t secbits; size_t n_groups; uint32_t *groups; char *lsm_profile; char *lsm_sockcreate; protobuf_c_boolean has_apparmor_data; ProtobufCBinaryData apparmor_data; protobuf_c_boolean has_no_new_privs; uint32_t no_new_privs; }; void creds_entry__init (CredsEntry *message); size_t creds_entry__get_packed_size (const CredsEntry *message); size_t creds_entry__pack (const CredsEntry *message, uint8_t *out); size_t creds_entry__pack_to_buffer (const CredsEntry *message, ProtobufCBuffer *buffer); CredsEntry * creds_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void creds_entry__free_unpacked (CredsEntry *message, ProtobufCAllocator *allocator); typedef void (*CredsEntry_Closure) (const CredsEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor creds_entry__descriptor; # 27 "./images/core.pb-c.h" 2 # 1 "./images/sa.pb-c.h" 1 # 9 "./images/sa.pb-c.h" # 19 "./images/sa.pb-c.h" typedef struct SaEntry SaEntry; struct SaEntry { ProtobufCMessage base; uint64_t sigaction; uint64_t flags; uint64_t restorer; uint64_t mask; protobuf_c_boolean has_compat_sigaction; protobuf_c_boolean compat_sigaction; protobuf_c_boolean has_mask_extended; uint64_t mask_extended; }; void sa_entry__init (SaEntry *message); size_t sa_entry__get_packed_size (const SaEntry *message); size_t sa_entry__pack (const SaEntry *message, uint8_t *out); size_t sa_entry__pack_to_buffer (const SaEntry *message, ProtobufCBuffer *buffer); SaEntry * sa_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void sa_entry__free_unpacked (SaEntry *message, ProtobufCAllocator *allocator); typedef void (*SaEntry_Closure) (const SaEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor sa_entry__descriptor; # 28 "./images/core.pb-c.h" 2 # 1 "./images/siginfo.pb-c.h" 1 # 9 "./images/siginfo.pb-c.h" # 18 "./images/siginfo.pb-c.h" typedef struct SiginfoEntry SiginfoEntry; typedef struct SignalQueueEntry SignalQueueEntry; struct SiginfoEntry { ProtobufCMessage base; ProtobufCBinaryData siginfo; }; struct SignalQueueEntry { ProtobufCMessage base; size_t n_signals; SiginfoEntry **signals; }; void siginfo_entry__init (SiginfoEntry *message); size_t siginfo_entry__get_packed_size (const SiginfoEntry *message); size_t siginfo_entry__pack (const SiginfoEntry *message, uint8_t *out); size_t siginfo_entry__pack_to_buffer (const SiginfoEntry *message, ProtobufCBuffer *buffer); SiginfoEntry * siginfo_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void siginfo_entry__free_unpacked (SiginfoEntry *message, ProtobufCAllocator *allocator); void signal_queue_entry__init (SignalQueueEntry *message); size_t signal_queue_entry__get_packed_size (const SignalQueueEntry *message); size_t signal_queue_entry__pack (const SignalQueueEntry *message, uint8_t *out); size_t signal_queue_entry__pack_to_buffer (const SignalQueueEntry *message, ProtobufCBuffer *buffer); SignalQueueEntry * signal_queue_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void signal_queue_entry__free_unpacked (SignalQueueEntry *message, ProtobufCAllocator *allocator); typedef void (*SiginfoEntry_Closure) (const SiginfoEntry *message, void *closure_data); typedef void (*SignalQueueEntry_Closure) (const SignalQueueEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor siginfo_entry__descriptor; extern const ProtobufCMessageDescriptor signal_queue_entry__descriptor; # 29 "./images/core.pb-c.h" 2 # 1 "./images/rseq.pb-c.h" 1 # 9 "./images/rseq.pb-c.h" # 18 "./images/rseq.pb-c.h" typedef struct RseqEntry RseqEntry; struct RseqEntry { ProtobufCMessage base; uint64_t rseq_abi_pointer; uint32_t rseq_abi_size; uint32_t signature; protobuf_c_boolean has_rseq_cs_pointer; uint64_t rseq_cs_pointer; }; void rseq_entry__init (RseqEntry *message); size_t rseq_entry__get_packed_size (const RseqEntry *message); size_t rseq_entry__pack (const RseqEntry *message, uint8_t *out); size_t rseq_entry__pack_to_buffer (const RseqEntry *message, ProtobufCBuffer *buffer); RseqEntry * rseq_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void rseq_entry__free_unpacked (RseqEntry *message, ProtobufCAllocator *allocator); typedef void (*RseqEntry_Closure) (const RseqEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor rseq_entry__descriptor; # 30 "./images/core.pb-c.h" 2 typedef struct TaskCoreEntry TaskCoreEntry; typedef struct TaskKobjIdsEntry TaskKobjIdsEntry; typedef struct ThreadSasEntry ThreadSasEntry; typedef struct ThreadCoreEntry ThreadCoreEntry; typedef struct TaskRlimitsEntry TaskRlimitsEntry; typedef struct CoreEntry CoreEntry; typedef enum _CoreEntry__March { CORE_ENTRY__MARCH__UNKNOWN = 0, CORE_ENTRY__MARCH__X86_64 = 1, CORE_ENTRY__MARCH__ARM = 2, CORE_ENTRY__MARCH__AARCH64 = 3, CORE_ENTRY__MARCH__PPC64 = 4, CORE_ENTRY__MARCH__S390 = 5, CORE_ENTRY__MARCH__MIPS = 6, CORE_ENTRY__MARCH__LOONGARCH64 = 7 # 51 "./images/core.pb-c.h" 3 4 , _CORE_ENTRY__MARCH_IS_INT_SIZE = 0x7fffffff # 52 "./images/core.pb-c.h" } CoreEntry__March; typedef enum _SeccompMode { SECCOMP_MODE__disabled = 0, SECCOMP_MODE__strict = 1, SECCOMP_MODE__filter = 2 # 60 "./images/core.pb-c.h" 3 4 , _SECCOMP_MODE_IS_INT_SIZE = 0x7fffffff # 61 "./images/core.pb-c.h" } SeccompMode; struct TaskCoreEntry { ProtobufCMessage base; uint32_t task_state; uint32_t exit_code; uint32_t personality; uint32_t flags; uint64_t blk_sigset; char *comm; TaskTimersEntry *timers; TaskRlimitsEntry *rlimits; protobuf_c_boolean has_cg_set; uint32_t cg_set; SignalQueueEntry *signals_s; protobuf_c_boolean has_old_seccomp_mode; SeccompMode old_seccomp_mode; protobuf_c_boolean has_old_seccomp_filter; uint32_t old_seccomp_filter; protobuf_c_boolean has_loginuid; uint32_t loginuid; protobuf_c_boolean has_oom_score_adj; int32_t oom_score_adj; size_t n_sigactions; SaEntry **sigactions; protobuf_c_boolean has_child_subreaper; protobuf_c_boolean child_subreaper; protobuf_c_boolean has_blk_sigset_extended; uint64_t blk_sigset_extended; protobuf_c_boolean has_stop_signo; uint32_t stop_signo; protobuf_c_boolean has_membarrier_registration_mask; uint32_t membarrier_registration_mask; }; struct TaskKobjIdsEntry { ProtobufCMessage base; uint32_t vm_id; uint32_t files_id; uint32_t fs_id; uint32_t sighand_id; protobuf_c_boolean has_pid_ns_id; uint32_t pid_ns_id; protobuf_c_boolean has_net_ns_id; uint32_t net_ns_id; protobuf_c_boolean has_ipc_ns_id; uint32_t ipc_ns_id; protobuf_c_boolean has_uts_ns_id; uint32_t uts_ns_id; protobuf_c_boolean has_mnt_ns_id; uint32_t mnt_ns_id; protobuf_c_boolean has_user_ns_id; uint32_t user_ns_id; protobuf_c_boolean has_cgroup_ns_id; uint32_t cgroup_ns_id; protobuf_c_boolean has_time_ns_id; uint32_t time_ns_id; }; struct ThreadSasEntry { ProtobufCMessage base; uint64_t ss_sp; uint64_t ss_size; uint32_t ss_flags; }; struct ThreadCoreEntry { ProtobufCMessage base; uint64_t futex_rla; uint32_t futex_rla_len; protobuf_c_boolean has_sched_nice; int32_t sched_nice; protobuf_c_boolean has_sched_policy; uint32_t sched_policy; protobuf_c_boolean has_sched_prio; uint32_t sched_prio; protobuf_c_boolean has_blk_sigset; uint64_t blk_sigset; ThreadSasEntry *sas; protobuf_c_boolean has_pdeath_sig; uint32_t pdeath_sig; SignalQueueEntry *signals_p; CredsEntry *creds; protobuf_c_boolean has_seccomp_mode; SeccompMode seccomp_mode; protobuf_c_boolean has_seccomp_filter; uint32_t seccomp_filter; char *comm; protobuf_c_boolean has_blk_sigset_extended; uint64_t blk_sigset_extended; RseqEntry *rseq_entry; protobuf_c_boolean has_cg_set; uint32_t cg_set; }; struct TaskRlimitsEntry { ProtobufCMessage base; size_t n_rlimits; RlimitEntry **rlimits; }; struct CoreEntry { ProtobufCMessage base; CoreEntry__March mtype; ThreadInfoX86 *thread_info; ThreadInfoArm *ti_arm; ThreadInfoAarch64 *ti_aarch64; ThreadInfoPpc64 *ti_ppc64; ThreadInfoS390 *ti_s390; ThreadInfoMips *ti_mips; ThreadInfoLoongarch64 *ti_loongarch64; TaskCoreEntry *tc; TaskKobjIdsEntry *ids; ThreadCoreEntry *thread_core; }; void task_core_entry__init (TaskCoreEntry *message); size_t task_core_entry__get_packed_size (const TaskCoreEntry *message); size_t task_core_entry__pack (const TaskCoreEntry *message, uint8_t *out); size_t task_core_entry__pack_to_buffer (const TaskCoreEntry *message, ProtobufCBuffer *buffer); TaskCoreEntry * task_core_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void task_core_entry__free_unpacked (TaskCoreEntry *message, ProtobufCAllocator *allocator); void task_kobj_ids_entry__init (TaskKobjIdsEntry *message); size_t task_kobj_ids_entry__get_packed_size (const TaskKobjIdsEntry *message); size_t task_kobj_ids_entry__pack (const TaskKobjIdsEntry *message, uint8_t *out); size_t task_kobj_ids_entry__pack_to_buffer (const TaskKobjIdsEntry *message, ProtobufCBuffer *buffer); TaskKobjIdsEntry * task_kobj_ids_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void task_kobj_ids_entry__free_unpacked (TaskKobjIdsEntry *message, ProtobufCAllocator *allocator); void thread_sas_entry__init (ThreadSasEntry *message); size_t thread_sas_entry__get_packed_size (const ThreadSasEntry *message); size_t thread_sas_entry__pack (const ThreadSasEntry *message, uint8_t *out); size_t thread_sas_entry__pack_to_buffer (const ThreadSasEntry *message, ProtobufCBuffer *buffer); ThreadSasEntry * thread_sas_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_sas_entry__free_unpacked (ThreadSasEntry *message, ProtobufCAllocator *allocator); void thread_core_entry__init (ThreadCoreEntry *message); size_t thread_core_entry__get_packed_size (const ThreadCoreEntry *message); size_t thread_core_entry__pack (const ThreadCoreEntry *message, uint8_t *out); size_t thread_core_entry__pack_to_buffer (const ThreadCoreEntry *message, ProtobufCBuffer *buffer); ThreadCoreEntry * thread_core_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void thread_core_entry__free_unpacked (ThreadCoreEntry *message, ProtobufCAllocator *allocator); void task_rlimits_entry__init (TaskRlimitsEntry *message); size_t task_rlimits_entry__get_packed_size (const TaskRlimitsEntry *message); size_t task_rlimits_entry__pack (const TaskRlimitsEntry *message, uint8_t *out); size_t task_rlimits_entry__pack_to_buffer (const TaskRlimitsEntry *message, ProtobufCBuffer *buffer); TaskRlimitsEntry * task_rlimits_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void task_rlimits_entry__free_unpacked (TaskRlimitsEntry *message, ProtobufCAllocator *allocator); void core_entry__init (CoreEntry *message); size_t core_entry__get_packed_size (const CoreEntry *message); size_t core_entry__pack (const CoreEntry *message, uint8_t *out); size_t core_entry__pack_to_buffer (const CoreEntry *message, ProtobufCBuffer *buffer); CoreEntry * core_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void core_entry__free_unpacked (CoreEntry *message, ProtobufCAllocator *allocator); typedef void (*TaskCoreEntry_Closure) (const TaskCoreEntry *message, void *closure_data); typedef void (*TaskKobjIdsEntry_Closure) (const TaskKobjIdsEntry *message, void *closure_data); typedef void (*ThreadSasEntry_Closure) (const ThreadSasEntry *message, void *closure_data); typedef void (*ThreadCoreEntry_Closure) (const ThreadCoreEntry *message, void *closure_data); typedef void (*TaskRlimitsEntry_Closure) (const TaskRlimitsEntry *message, void *closure_data); typedef void (*CoreEntry_Closure) (const CoreEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor seccomp_mode__descriptor; extern const ProtobufCMessageDescriptor task_core_entry__descriptor; extern const ProtobufCMessageDescriptor task_kobj_ids_entry__descriptor; extern const ProtobufCMessageDescriptor thread_sas_entry__descriptor; extern const ProtobufCMessageDescriptor thread_core_entry__descriptor; extern const ProtobufCMessageDescriptor task_rlimits_entry__descriptor; extern const ProtobufCMessageDescriptor core_entry__descriptor; extern const ProtobufCEnumDescriptor core_entry__march__descriptor; # 10 "criu/include/rst_info.h" 2 struct task_entries { int nr_threads, nr_tasks, nr_helpers; futex_t nr_in_progress; futex_t start; atomic_t cr_err; mutex_t userns_sync_lock; mutex_t last_pid_mutex; }; struct fdt { int nr; pid_t pid; futex_t fdt_lock; }; struct rst_rseq { uint64_t rseq_abi_pointer; uint64_t rseq_cs_pointer; }; struct rst_info { struct list_head fds; void *premmapped_addr; unsigned long premmapped_len; unsigned long clone_flags; void *munmap_restorer; int service_fd_id; struct fdt *fdt; struct vm_area_list vmas; MmEntry *mm; struct list_head vma_io; unsigned int pages_img_id; u32 cg_set; union { struct pstree_item *pgrp_leader; futex_t pgrp_set; }; struct file_desc *cwd; struct file_desc *root; # 61 "criu/include/rst_info.h" 3 4 _Bool # 61 "criu/include/rst_info.h" has_umask; u32 umask; # 69 "criu/include/rst_info.h" 3 4 _Bool # 69 "criu/include/rst_info.h" has_seccomp; # 74 "criu/include/rst_info.h" 3 4 _Bool # 74 "criu/include/rst_info.h" has_old_seccomp_filter; struct rst_rseq *rseqe; futex_t shstk_enable; futex_t shstk_unlock; void *breakpoint; }; extern struct task_entries *task_entries; static inline void lock_last_pid(void) { mutex_lock(&task_entries->last_pid_mutex); } static inline void unlock_last_pid(void) { mutex_unlock(&task_entries->last_pid_mutex); } # 13 "criu/include/files.h" 2 # 1 "./images/fdinfo.pb-c.h" 1 # 9 "./images/fdinfo.pb-c.h" # 1 "./images/regfile.pb-c.h" 1 # 9 "./images/regfile.pb-c.h" # 18 "./images/regfile.pb-c.h" # 1 "./images/fown.pb-c.h" 1 # 9 "./images/fown.pb-c.h" # 18 "./images/fown.pb-c.h" typedef struct FownEntry FownEntry; struct FownEntry { ProtobufCMessage base; uint32_t uid; uint32_t euid; uint32_t signum; uint32_t pid_type; uint32_t pid; }; void fown_entry__init (FownEntry *message); size_t fown_entry__get_packed_size (const FownEntry *message); size_t fown_entry__pack (const FownEntry *message, uint8_t *out); size_t fown_entry__pack_to_buffer (const FownEntry *message, ProtobufCBuffer *buffer); FownEntry * fown_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fown_entry__free_unpacked (FownEntry *message, ProtobufCAllocator *allocator); typedef void (*FownEntry_Closure) (const FownEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor fown_entry__descriptor; # 19 "./images/regfile.pb-c.h" 2 typedef struct RegFileEntry RegFileEntry; struct RegFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; uint64_t pos; FownEntry *fown; char *name; protobuf_c_boolean has_mnt_id; int32_t mnt_id; protobuf_c_boolean has_size; uint64_t size; protobuf_c_boolean has_ext; protobuf_c_boolean ext; protobuf_c_boolean has_mode; uint32_t mode; size_t n_build_id; uint32_t *build_id; protobuf_c_boolean has_checksum; uint32_t checksum; protobuf_c_boolean has_checksum_config; uint32_t checksum_config; protobuf_c_boolean has_checksum_parameter; uint32_t checksum_parameter; }; void reg_file_entry__init (RegFileEntry *message); size_t reg_file_entry__get_packed_size (const RegFileEntry *message); size_t reg_file_entry__pack (const RegFileEntry *message, uint8_t *out); size_t reg_file_entry__pack_to_buffer (const RegFileEntry *message, ProtobufCBuffer *buffer); RegFileEntry * reg_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void reg_file_entry__free_unpacked (RegFileEntry *message, ProtobufCAllocator *allocator); typedef void (*RegFileEntry_Closure) (const RegFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor reg_file_entry__descriptor; # 18 "./images/fdinfo.pb-c.h" 2 # 1 "./images/sk-inet.pb-c.h" 1 # 9 "./images/sk-inet.pb-c.h" # 19 "./images/sk-inet.pb-c.h" # 1 "./images/sk-opts.pb-c.h" 1 # 9 "./images/sk-opts.pb-c.h" # 18 "./images/sk-opts.pb-c.h" typedef struct SkOptsEntry SkOptsEntry; typedef enum _SkShutdown { SK_SHUTDOWN__NONE = 0, SK_SHUTDOWN__READ = 1, SK_SHUTDOWN__WRITE = 2, SK_SHUTDOWN__BOTH = 3 # 28 "./images/sk-opts.pb-c.h" 3 4 , _SK_SHUTDOWN_IS_INT_SIZE = 0x7fffffff # 29 "./images/sk-opts.pb-c.h" } SkShutdown; struct SkOptsEntry { ProtobufCMessage base; uint32_t so_sndbuf; uint32_t so_rcvbuf; uint64_t so_snd_tmo_sec; uint64_t so_snd_tmo_usec; uint64_t so_rcv_tmo_sec; uint64_t so_rcv_tmo_usec; protobuf_c_boolean has_reuseaddr; protobuf_c_boolean reuseaddr; protobuf_c_boolean has_so_priority; uint32_t so_priority; protobuf_c_boolean has_so_rcvlowat; uint32_t so_rcvlowat; protobuf_c_boolean has_so_mark; uint32_t so_mark; protobuf_c_boolean has_so_passcred; protobuf_c_boolean so_passcred; protobuf_c_boolean has_so_passsec; protobuf_c_boolean so_passsec; protobuf_c_boolean has_so_dontroute; protobuf_c_boolean so_dontroute; protobuf_c_boolean has_so_no_check; protobuf_c_boolean so_no_check; char *so_bound_dev; size_t n_so_filter; uint64_t *so_filter; protobuf_c_boolean has_so_reuseport; protobuf_c_boolean so_reuseport; protobuf_c_boolean has_so_broadcast; protobuf_c_boolean so_broadcast; protobuf_c_boolean has_so_keepalive; protobuf_c_boolean so_keepalive; protobuf_c_boolean has_tcp_keepcnt; uint32_t tcp_keepcnt; protobuf_c_boolean has_tcp_keepidle; uint32_t tcp_keepidle; protobuf_c_boolean has_tcp_keepintvl; uint32_t tcp_keepintvl; protobuf_c_boolean has_so_oobinline; uint32_t so_oobinline; protobuf_c_boolean has_so_linger; uint32_t so_linger; protobuf_c_boolean has_so_buf_lock; uint32_t so_buf_lock; }; void sk_opts_entry__init (SkOptsEntry *message); size_t sk_opts_entry__get_packed_size (const SkOptsEntry *message); size_t sk_opts_entry__pack (const SkOptsEntry *message, uint8_t *out); size_t sk_opts_entry__pack_to_buffer (const SkOptsEntry *message, ProtobufCBuffer *buffer); SkOptsEntry * sk_opts_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void sk_opts_entry__free_unpacked (SkOptsEntry *message, ProtobufCAllocator *allocator); typedef void (*SkOptsEntry_Closure) (const SkOptsEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor sk_shutdown__descriptor; extern const ProtobufCMessageDescriptor sk_opts_entry__descriptor; # 20 "./images/sk-inet.pb-c.h" 2 typedef struct IpOptsRawEntry IpOptsRawEntry; typedef struct IpOptsEntry IpOptsEntry; typedef struct InetSkEntry InetSkEntry; struct IpOptsRawEntry { ProtobufCMessage base; protobuf_c_boolean has_hdrincl; protobuf_c_boolean hdrincl; protobuf_c_boolean has_nodefrag; protobuf_c_boolean nodefrag; protobuf_c_boolean has_checksum; protobuf_c_boolean checksum; size_t n_icmpv_filter; uint32_t *icmpv_filter; }; struct IpOptsEntry { ProtobufCMessage base; protobuf_c_boolean has_freebind; protobuf_c_boolean freebind; IpOptsRawEntry *raw; protobuf_c_boolean has_pktinfo; protobuf_c_boolean pktinfo; protobuf_c_boolean has_tos; uint32_t tos; protobuf_c_boolean has_ttl; uint32_t ttl; }; struct InetSkEntry { ProtobufCMessage base; # 80 "./images/sk-inet.pb-c.h" uint32_t id; uint32_t ino; uint32_t family; uint32_t type; uint32_t proto; uint32_t state; uint32_t src_port; uint32_t dst_port; uint32_t flags; uint32_t backlog; size_t n_src_addr; uint32_t *src_addr; size_t n_dst_addr; uint32_t *dst_addr; FownEntry *fown; SkOptsEntry *opts; protobuf_c_boolean has_v6only; protobuf_c_boolean v6only; IpOptsEntry *ip_opts; char *ifname; protobuf_c_boolean has_ns_id; uint32_t ns_id; protobuf_c_boolean has_shutdown; SkShutdown shutdown; }; void ip_opts_raw_entry__init (IpOptsRawEntry *message); size_t ip_opts_raw_entry__get_packed_size (const IpOptsRawEntry *message); size_t ip_opts_raw_entry__pack (const IpOptsRawEntry *message, uint8_t *out); size_t ip_opts_raw_entry__pack_to_buffer (const IpOptsRawEntry *message, ProtobufCBuffer *buffer); IpOptsRawEntry * ip_opts_raw_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void ip_opts_raw_entry__free_unpacked (IpOptsRawEntry *message, ProtobufCAllocator *allocator); void ip_opts_entry__init (IpOptsEntry *message); size_t ip_opts_entry__get_packed_size (const IpOptsEntry *message); size_t ip_opts_entry__pack (const IpOptsEntry *message, uint8_t *out); size_t ip_opts_entry__pack_to_buffer (const IpOptsEntry *message, ProtobufCBuffer *buffer); IpOptsEntry * ip_opts_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void ip_opts_entry__free_unpacked (IpOptsEntry *message, ProtobufCAllocator *allocator); void inet_sk_entry__init (InetSkEntry *message); size_t inet_sk_entry__get_packed_size (const InetSkEntry *message); size_t inet_sk_entry__pack (const InetSkEntry *message, uint8_t *out); size_t inet_sk_entry__pack_to_buffer (const InetSkEntry *message, ProtobufCBuffer *buffer); InetSkEntry * inet_sk_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void inet_sk_entry__free_unpacked (InetSkEntry *message, ProtobufCAllocator *allocator); typedef void (*IpOptsRawEntry_Closure) (const IpOptsRawEntry *message, void *closure_data); typedef void (*IpOptsEntry_Closure) (const IpOptsEntry *message, void *closure_data); typedef void (*InetSkEntry_Closure) (const InetSkEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor ip_opts_raw_entry__descriptor; extern const ProtobufCMessageDescriptor ip_opts_entry__descriptor; extern const ProtobufCMessageDescriptor inet_sk_entry__descriptor; # 19 "./images/fdinfo.pb-c.h" 2 # 1 "./images/ns.pb-c.h" 1 # 9 "./images/ns.pb-c.h" # 18 "./images/ns.pb-c.h" typedef struct NsFileEntry NsFileEntry; struct NsFileEntry { ProtobufCMessage base; uint32_t id; uint32_t ns_id; uint32_t ns_cflag; uint32_t flags; }; void ns_file_entry__init (NsFileEntry *message); size_t ns_file_entry__get_packed_size (const NsFileEntry *message); size_t ns_file_entry__pack (const NsFileEntry *message, uint8_t *out); size_t ns_file_entry__pack_to_buffer (const NsFileEntry *message, ProtobufCBuffer *buffer); NsFileEntry * ns_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void ns_file_entry__free_unpacked (NsFileEntry *message, ProtobufCAllocator *allocator); typedef void (*NsFileEntry_Closure) (const NsFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor ns_file_entry__descriptor; # 20 "./images/fdinfo.pb-c.h" 2 # 1 "./images/packet-sock.pb-c.h" 1 # 9 "./images/packet-sock.pb-c.h" # 21 "./images/packet-sock.pb-c.h" typedef struct PacketMclist PacketMclist; typedef struct PacketRing PacketRing; typedef struct PacketSockEntry PacketSockEntry; struct PacketMclist { ProtobufCMessage base; uint32_t index; uint32_t type; ProtobufCBinaryData addr; }; struct PacketRing { ProtobufCMessage base; uint32_t block_size; uint32_t block_nr; uint32_t frame_size; uint32_t frame_nr; uint32_t retire_tmo; uint32_t sizeof_priv; uint32_t features; }; struct PacketSockEntry { ProtobufCMessage base; uint32_t id; uint32_t type; uint32_t protocol; uint32_t flags; uint32_t ifindex; FownEntry *fown; SkOptsEntry *opts; uint32_t version; uint32_t reserve; protobuf_c_boolean aux_data; protobuf_c_boolean orig_dev; protobuf_c_boolean vnet_hdr; protobuf_c_boolean loss; uint32_t timestamp; uint32_t copy_thresh; size_t n_mclist; PacketMclist **mclist; protobuf_c_boolean has_fanout; uint32_t fanout; PacketRing *rx_ring; PacketRing *tx_ring; protobuf_c_boolean has_ns_id; uint32_t ns_id; }; void packet_mclist__init (PacketMclist *message); size_t packet_mclist__get_packed_size (const PacketMclist *message); size_t packet_mclist__pack (const PacketMclist *message, uint8_t *out); size_t packet_mclist__pack_to_buffer (const PacketMclist *message, ProtobufCBuffer *buffer); PacketMclist * packet_mclist__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void packet_mclist__free_unpacked (PacketMclist *message, ProtobufCAllocator *allocator); void packet_ring__init (PacketRing *message); size_t packet_ring__get_packed_size (const PacketRing *message); size_t packet_ring__pack (const PacketRing *message, uint8_t *out); size_t packet_ring__pack_to_buffer (const PacketRing *message, ProtobufCBuffer *buffer); PacketRing * packet_ring__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void packet_ring__free_unpacked (PacketRing *message, ProtobufCAllocator *allocator); void packet_sock_entry__init (PacketSockEntry *message); size_t packet_sock_entry__get_packed_size (const PacketSockEntry *message); size_t packet_sock_entry__pack (const PacketSockEntry *message, uint8_t *out); size_t packet_sock_entry__pack_to_buffer (const PacketSockEntry *message, ProtobufCBuffer *buffer); PacketSockEntry * packet_sock_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void packet_sock_entry__free_unpacked (PacketSockEntry *message, ProtobufCAllocator *allocator); typedef void (*PacketMclist_Closure) (const PacketMclist *message, void *closure_data); typedef void (*PacketRing_Closure) (const PacketRing *message, void *closure_data); typedef void (*PacketSockEntry_Closure) (const PacketSockEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor packet_mclist__descriptor; extern const ProtobufCMessageDescriptor packet_ring__descriptor; extern const ProtobufCMessageDescriptor packet_sock_entry__descriptor; # 21 "./images/fdinfo.pb-c.h" 2 # 1 "./images/sk-netlink.pb-c.h" 1 # 9 "./images/sk-netlink.pb-c.h" # 21 "./images/sk-netlink.pb-c.h" typedef struct NetlinkSkEntry NetlinkSkEntry; struct NetlinkSkEntry { ProtobufCMessage base; uint32_t id; uint32_t ino; uint32_t protocol; uint32_t state; uint32_t flags; uint32_t portid; size_t n_groups; uint32_t *groups; uint32_t dst_portid; uint32_t dst_group; FownEntry *fown; SkOptsEntry *opts; protobuf_c_boolean has_ns_id; uint32_t ns_id; }; void netlink_sk_entry__init (NetlinkSkEntry *message); size_t netlink_sk_entry__get_packed_size (const NetlinkSkEntry *message); size_t netlink_sk_entry__pack (const NetlinkSkEntry *message, uint8_t *out); size_t netlink_sk_entry__pack_to_buffer (const NetlinkSkEntry *message, ProtobufCBuffer *buffer); NetlinkSkEntry * netlink_sk_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void netlink_sk_entry__free_unpacked (NetlinkSkEntry *message, ProtobufCAllocator *allocator); typedef void (*NetlinkSkEntry_Closure) (const NetlinkSkEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor netlink_sk_entry__descriptor; # 22 "./images/fdinfo.pb-c.h" 2 # 1 "./images/eventfd.pb-c.h" 1 # 9 "./images/eventfd.pb-c.h" # 19 "./images/eventfd.pb-c.h" typedef struct EventfdFileEntry EventfdFileEntry; struct EventfdFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; uint64_t counter; }; void eventfd_file_entry__init (EventfdFileEntry *message); size_t eventfd_file_entry__get_packed_size (const EventfdFileEntry *message); size_t eventfd_file_entry__pack (const EventfdFileEntry *message, uint8_t *out); size_t eventfd_file_entry__pack_to_buffer (const EventfdFileEntry *message, ProtobufCBuffer *buffer); EventfdFileEntry * eventfd_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void eventfd_file_entry__free_unpacked (EventfdFileEntry *message, ProtobufCAllocator *allocator); typedef void (*EventfdFileEntry_Closure) (const EventfdFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor eventfd_file_entry__descriptor; # 23 "./images/fdinfo.pb-c.h" 2 # 1 "./images/eventpoll.pb-c.h" 1 # 9 "./images/eventpoll.pb-c.h" # 19 "./images/eventpoll.pb-c.h" typedef struct EventpollTfdEntry EventpollTfdEntry; typedef struct EventpollFileEntry EventpollFileEntry; struct EventpollTfdEntry { ProtobufCMessage base; uint32_t id; uint32_t tfd; uint32_t events; uint64_t data; protobuf_c_boolean has_dev; uint32_t dev; protobuf_c_boolean has_inode; uint64_t inode; protobuf_c_boolean has_pos; uint64_t pos; }; struct EventpollFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; size_t n_tfd; EventpollTfdEntry **tfd; }; void eventpoll_tfd_entry__init (EventpollTfdEntry *message); size_t eventpoll_tfd_entry__get_packed_size (const EventpollTfdEntry *message); size_t eventpoll_tfd_entry__pack (const EventpollTfdEntry *message, uint8_t *out); size_t eventpoll_tfd_entry__pack_to_buffer (const EventpollTfdEntry *message, ProtobufCBuffer *buffer); EventpollTfdEntry * eventpoll_tfd_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void eventpoll_tfd_entry__free_unpacked (EventpollTfdEntry *message, ProtobufCAllocator *allocator); void eventpoll_file_entry__init (EventpollFileEntry *message); size_t eventpoll_file_entry__get_packed_size (const EventpollFileEntry *message); size_t eventpoll_file_entry__pack (const EventpollFileEntry *message, uint8_t *out); size_t eventpoll_file_entry__pack_to_buffer (const EventpollFileEntry *message, ProtobufCBuffer *buffer); EventpollFileEntry * eventpoll_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void eventpoll_file_entry__free_unpacked (EventpollFileEntry *message, ProtobufCAllocator *allocator); typedef void (*EventpollTfdEntry_Closure) (const EventpollTfdEntry *message, void *closure_data); typedef void (*EventpollFileEntry_Closure) (const EventpollFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor eventpoll_tfd_entry__descriptor; extern const ProtobufCMessageDescriptor eventpoll_file_entry__descriptor; # 24 "./images/fdinfo.pb-c.h" 2 # 1 "./images/signalfd.pb-c.h" 1 # 9 "./images/signalfd.pb-c.h" # 20 "./images/signalfd.pb-c.h" typedef struct SignalfdEntry SignalfdEntry; struct SignalfdEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; uint64_t sigmask; }; void signalfd_entry__init (SignalfdEntry *message); size_t signalfd_entry__get_packed_size (const SignalfdEntry *message); size_t signalfd_entry__pack (const SignalfdEntry *message, uint8_t *out); size_t signalfd_entry__pack_to_buffer (const SignalfdEntry *message, ProtobufCBuffer *buffer); SignalfdEntry * signalfd_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void signalfd_entry__free_unpacked (SignalfdEntry *message, ProtobufCAllocator *allocator); typedef void (*SignalfdEntry_Closure) (const SignalfdEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor signalfd_entry__descriptor; # 25 "./images/fdinfo.pb-c.h" 2 # 1 "./images/tun.pb-c.h" 1 # 9 "./images/tun.pb-c.h" # 19 "./images/tun.pb-c.h" typedef struct TunfileEntry TunfileEntry; typedef struct TunLinkEntry TunLinkEntry; struct TunfileEntry { ProtobufCMessage base; uint32_t id; char *netdev; protobuf_c_boolean has_detached; protobuf_c_boolean detached; protobuf_c_boolean has_ns_id; uint32_t ns_id; }; struct TunLinkEntry { ProtobufCMessage base; uint32_t flags; int32_t owner; int32_t group; uint32_t vnethdr; uint32_t sndbuf; }; void tunfile_entry__init (TunfileEntry *message); size_t tunfile_entry__get_packed_size (const TunfileEntry *message); size_t tunfile_entry__pack (const TunfileEntry *message, uint8_t *out); size_t tunfile_entry__pack_to_buffer (const TunfileEntry *message, ProtobufCBuffer *buffer); TunfileEntry * tunfile_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tunfile_entry__free_unpacked (TunfileEntry *message, ProtobufCAllocator *allocator); void tun_link_entry__init (TunLinkEntry *message); size_t tun_link_entry__get_packed_size (const TunLinkEntry *message); size_t tun_link_entry__pack (const TunLinkEntry *message, uint8_t *out); size_t tun_link_entry__pack_to_buffer (const TunLinkEntry *message, ProtobufCBuffer *buffer); TunLinkEntry * tun_link_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tun_link_entry__free_unpacked (TunLinkEntry *message, ProtobufCAllocator *allocator); typedef void (*TunfileEntry_Closure) (const TunfileEntry *message, void *closure_data); typedef void (*TunLinkEntry_Closure) (const TunLinkEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor tunfile_entry__descriptor; extern const ProtobufCMessageDescriptor tun_link_entry__descriptor; # 26 "./images/fdinfo.pb-c.h" 2 # 1 "./images/timerfd.pb-c.h" 1 # 9 "./images/timerfd.pb-c.h" # 20 "./images/timerfd.pb-c.h" typedef struct TimerfdEntry TimerfdEntry; struct TimerfdEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; uint32_t clockid; uint64_t ticks; uint32_t settime_flags; uint64_t vsec; uint64_t vnsec; uint64_t isec; uint64_t insec; }; void timerfd_entry__init (TimerfdEntry *message); size_t timerfd_entry__get_packed_size (const TimerfdEntry *message); size_t timerfd_entry__pack (const TimerfdEntry *message, uint8_t *out); size_t timerfd_entry__pack_to_buffer (const TimerfdEntry *message, ProtobufCBuffer *buffer); TimerfdEntry * timerfd_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void timerfd_entry__free_unpacked (TimerfdEntry *message, ProtobufCAllocator *allocator); typedef void (*TimerfdEntry_Closure) (const TimerfdEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor timerfd_entry__descriptor; # 27 "./images/fdinfo.pb-c.h" 2 # 1 "./images/fsnotify.pb-c.h" 1 # 9 "./images/fsnotify.pb-c.h" # 18 "./images/fsnotify.pb-c.h" # 1 "./images/fh.pb-c.h" 1 # 9 "./images/fh.pb-c.h" # 19 "./images/fh.pb-c.h" typedef struct FhEntry FhEntry; typedef struct IrmapCacheEntry IrmapCacheEntry; typedef enum _FhEntrySizes { FH_ENTRY_SIZES__min_entries = 16 # 27 "./images/fh.pb-c.h" 3 4 , _FH_ENTRY_SIZES_IS_INT_SIZE = 0x7fffffff # 28 "./images/fh.pb-c.h" } FhEntrySizes; struct FhEntry { ProtobufCMessage base; uint32_t bytes; uint32_t type; size_t n_handle; uint64_t *handle; char *path; protobuf_c_boolean has_mnt_id; uint32_t mnt_id; }; struct IrmapCacheEntry { ProtobufCMessage base; uint32_t dev; uint64_t inode; char *path; }; void fh_entry__init (FhEntry *message); size_t fh_entry__get_packed_size (const FhEntry *message); size_t fh_entry__pack (const FhEntry *message, uint8_t *out); size_t fh_entry__pack_to_buffer (const FhEntry *message, ProtobufCBuffer *buffer); FhEntry * fh_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fh_entry__free_unpacked (FhEntry *message, ProtobufCAllocator *allocator); void irmap_cache_entry__init (IrmapCacheEntry *message); size_t irmap_cache_entry__get_packed_size (const IrmapCacheEntry *message); size_t irmap_cache_entry__pack (const IrmapCacheEntry *message, uint8_t *out); size_t irmap_cache_entry__pack_to_buffer (const IrmapCacheEntry *message, ProtobufCBuffer *buffer); IrmapCacheEntry * irmap_cache_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void irmap_cache_entry__free_unpacked (IrmapCacheEntry *message, ProtobufCAllocator *allocator); typedef void (*FhEntry_Closure) (const FhEntry *message, void *closure_data); typedef void (*IrmapCacheEntry_Closure) (const IrmapCacheEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor fh_entry_sizes__descriptor; extern const ProtobufCMessageDescriptor fh_entry__descriptor; extern const ProtobufCMessageDescriptor irmap_cache_entry__descriptor; # 19 "./images/fsnotify.pb-c.h" 2 typedef struct InotifyWdEntry InotifyWdEntry; typedef struct InotifyFileEntry InotifyFileEntry; typedef struct FanotifyInodeMarkEntry FanotifyInodeMarkEntry; typedef struct FanotifyMountMarkEntry FanotifyMountMarkEntry; typedef struct FanotifyMarkEntry FanotifyMarkEntry; typedef struct FanotifyFileEntry FanotifyFileEntry; typedef enum _MarkType { MARK_TYPE__INODE = 1, MARK_TYPE__MOUNT = 2 # 34 "./images/fsnotify.pb-c.h" 3 4 , _MARK_TYPE_IS_INT_SIZE = 0x7fffffff # 35 "./images/fsnotify.pb-c.h" } MarkType; struct InotifyWdEntry { ProtobufCMessage base; uint32_t id; uint64_t i_ino; uint32_t mask; uint32_t ignored_mask; uint32_t s_dev; uint32_t wd; FhEntry *f_handle; }; struct InotifyFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; size_t n_wd; InotifyWdEntry **wd; }; struct FanotifyInodeMarkEntry { ProtobufCMessage base; uint64_t i_ino; FhEntry *f_handle; }; struct FanotifyMountMarkEntry { ProtobufCMessage base; uint32_t mnt_id; char *path; }; struct FanotifyMarkEntry { ProtobufCMessage base; uint32_t id; MarkType type; uint32_t mflags; uint32_t mask; uint32_t ignored_mask; uint32_t s_dev; FanotifyInodeMarkEntry *ie; FanotifyMountMarkEntry *me; }; struct FanotifyFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FownEntry *fown; uint32_t faflags; uint32_t evflags; size_t n_mark; FanotifyMarkEntry **mark; }; void inotify_wd_entry__init (InotifyWdEntry *message); size_t inotify_wd_entry__get_packed_size (const InotifyWdEntry *message); size_t inotify_wd_entry__pack (const InotifyWdEntry *message, uint8_t *out); size_t inotify_wd_entry__pack_to_buffer (const InotifyWdEntry *message, ProtobufCBuffer *buffer); InotifyWdEntry * inotify_wd_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void inotify_wd_entry__free_unpacked (InotifyWdEntry *message, ProtobufCAllocator *allocator); void inotify_file_entry__init (InotifyFileEntry *message); size_t inotify_file_entry__get_packed_size (const InotifyFileEntry *message); size_t inotify_file_entry__pack (const InotifyFileEntry *message, uint8_t *out); size_t inotify_file_entry__pack_to_buffer (const InotifyFileEntry *message, ProtobufCBuffer *buffer); InotifyFileEntry * inotify_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void inotify_file_entry__free_unpacked (InotifyFileEntry *message, ProtobufCAllocator *allocator); void fanotify_inode_mark_entry__init (FanotifyInodeMarkEntry *message); size_t fanotify_inode_mark_entry__get_packed_size (const FanotifyInodeMarkEntry *message); size_t fanotify_inode_mark_entry__pack (const FanotifyInodeMarkEntry *message, uint8_t *out); size_t fanotify_inode_mark_entry__pack_to_buffer (const FanotifyInodeMarkEntry *message, ProtobufCBuffer *buffer); FanotifyInodeMarkEntry * fanotify_inode_mark_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fanotify_inode_mark_entry__free_unpacked (FanotifyInodeMarkEntry *message, ProtobufCAllocator *allocator); void fanotify_mount_mark_entry__init (FanotifyMountMarkEntry *message); size_t fanotify_mount_mark_entry__get_packed_size (const FanotifyMountMarkEntry *message); size_t fanotify_mount_mark_entry__pack (const FanotifyMountMarkEntry *message, uint8_t *out); size_t fanotify_mount_mark_entry__pack_to_buffer (const FanotifyMountMarkEntry *message, ProtobufCBuffer *buffer); FanotifyMountMarkEntry * fanotify_mount_mark_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fanotify_mount_mark_entry__free_unpacked (FanotifyMountMarkEntry *message, ProtobufCAllocator *allocator); void fanotify_mark_entry__init (FanotifyMarkEntry *message); size_t fanotify_mark_entry__get_packed_size (const FanotifyMarkEntry *message); size_t fanotify_mark_entry__pack (const FanotifyMarkEntry *message, uint8_t *out); size_t fanotify_mark_entry__pack_to_buffer (const FanotifyMarkEntry *message, ProtobufCBuffer *buffer); FanotifyMarkEntry * fanotify_mark_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fanotify_mark_entry__free_unpacked (FanotifyMarkEntry *message, ProtobufCAllocator *allocator); void fanotify_file_entry__init (FanotifyFileEntry *message); size_t fanotify_file_entry__get_packed_size (const FanotifyFileEntry *message); size_t fanotify_file_entry__pack (const FanotifyFileEntry *message, uint8_t *out); size_t fanotify_file_entry__pack_to_buffer (const FanotifyFileEntry *message, ProtobufCBuffer *buffer); FanotifyFileEntry * fanotify_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fanotify_file_entry__free_unpacked (FanotifyFileEntry *message, ProtobufCAllocator *allocator); typedef void (*InotifyWdEntry_Closure) (const InotifyWdEntry *message, void *closure_data); typedef void (*InotifyFileEntry_Closure) (const InotifyFileEntry *message, void *closure_data); typedef void (*FanotifyInodeMarkEntry_Closure) (const FanotifyInodeMarkEntry *message, void *closure_data); typedef void (*FanotifyMountMarkEntry_Closure) (const FanotifyMountMarkEntry *message, void *closure_data); typedef void (*FanotifyMarkEntry_Closure) (const FanotifyMarkEntry *message, void *closure_data); typedef void (*FanotifyFileEntry_Closure) (const FanotifyFileEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor mark_type__descriptor; extern const ProtobufCMessageDescriptor inotify_wd_entry__descriptor; extern const ProtobufCMessageDescriptor inotify_file_entry__descriptor; extern const ProtobufCMessageDescriptor fanotify_inode_mark_entry__descriptor; extern const ProtobufCMessageDescriptor fanotify_mount_mark_entry__descriptor; extern const ProtobufCMessageDescriptor fanotify_mark_entry__descriptor; extern const ProtobufCMessageDescriptor fanotify_file_entry__descriptor; # 28 "./images/fdinfo.pb-c.h" 2 # 1 "./images/ext-file.pb-c.h" 1 # 9 "./images/ext-file.pb-c.h" # 19 "./images/ext-file.pb-c.h" typedef struct ExtFileEntry ExtFileEntry; struct ExtFileEntry { ProtobufCMessage base; uint32_t id; FownEntry *fown; }; void ext_file_entry__init (ExtFileEntry *message); size_t ext_file_entry__get_packed_size (const ExtFileEntry *message); size_t ext_file_entry__pack (const ExtFileEntry *message, uint8_t *out); size_t ext_file_entry__pack_to_buffer (const ExtFileEntry *message, ProtobufCBuffer *buffer); ExtFileEntry * ext_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void ext_file_entry__free_unpacked (ExtFileEntry *message, ProtobufCAllocator *allocator); typedef void (*ExtFileEntry_Closure) (const ExtFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor ext_file_entry__descriptor; # 29 "./images/fdinfo.pb-c.h" 2 # 1 "./images/sk-unix.pb-c.h" 1 # 9 "./images/sk-unix.pb-c.h" # 21 "./images/sk-unix.pb-c.h" typedef struct FilePermsEntry FilePermsEntry; typedef struct UnixSkEntry UnixSkEntry; struct FilePermsEntry { ProtobufCMessage base; uint32_t mode; uint32_t uid; uint32_t gid; }; struct UnixSkEntry { ProtobufCMessage base; # 54 "./images/sk-unix.pb-c.h" uint32_t id; uint32_t ino; uint32_t type; uint32_t state; uint32_t flags; uint32_t uflags; uint32_t backlog; uint32_t peer; FownEntry *fown; SkOptsEntry *opts; ProtobufCBinaryData name; protobuf_c_boolean has_shutdown; SkShutdown shutdown; FilePermsEntry *file_perms; char *name_dir; protobuf_c_boolean has_deleted; protobuf_c_boolean deleted; protobuf_c_boolean has_ns_id; uint32_t ns_id; protobuf_c_boolean has_mnt_id; int32_t mnt_id; }; void file_perms_entry__init (FilePermsEntry *message); size_t file_perms_entry__get_packed_size (const FilePermsEntry *message); size_t file_perms_entry__pack (const FilePermsEntry *message, uint8_t *out); size_t file_perms_entry__pack_to_buffer (const FilePermsEntry *message, ProtobufCBuffer *buffer); FilePermsEntry * file_perms_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void file_perms_entry__free_unpacked (FilePermsEntry *message, ProtobufCAllocator *allocator); void unix_sk_entry__init (UnixSkEntry *message); size_t unix_sk_entry__get_packed_size (const UnixSkEntry *message); size_t unix_sk_entry__pack (const UnixSkEntry *message, uint8_t *out); size_t unix_sk_entry__pack_to_buffer (const UnixSkEntry *message, ProtobufCBuffer *buffer); UnixSkEntry * unix_sk_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void unix_sk_entry__free_unpacked (UnixSkEntry *message, ProtobufCAllocator *allocator); typedef void (*FilePermsEntry_Closure) (const FilePermsEntry *message, void *closure_data); typedef void (*UnixSkEntry_Closure) (const UnixSkEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor file_perms_entry__descriptor; extern const ProtobufCMessageDescriptor unix_sk_entry__descriptor; # 30 "./images/fdinfo.pb-c.h" 2 # 1 "./images/fifo.pb-c.h" 1 # 9 "./images/fifo.pb-c.h" # 18 "./images/fifo.pb-c.h" typedef struct FifoEntry FifoEntry; struct FifoEntry { ProtobufCMessage base; uint32_t id; uint32_t pipe_id; protobuf_c_boolean has_regf_id; uint32_t regf_id; }; void fifo_entry__init (FifoEntry *message); size_t fifo_entry__get_packed_size (const FifoEntry *message); size_t fifo_entry__pack (const FifoEntry *message, uint8_t *out); size_t fifo_entry__pack_to_buffer (const FifoEntry *message, ProtobufCBuffer *buffer); FifoEntry * fifo_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fifo_entry__free_unpacked (FifoEntry *message, ProtobufCAllocator *allocator); typedef void (*FifoEntry_Closure) (const FifoEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor fifo_entry__descriptor; # 31 "./images/fdinfo.pb-c.h" 2 # 1 "./images/pipe.pb-c.h" 1 # 9 "./images/pipe.pb-c.h" # 20 "./images/pipe.pb-c.h" typedef struct PipeEntry PipeEntry; struct PipeEntry { ProtobufCMessage base; uint32_t id; uint32_t pipe_id; uint32_t flags; FownEntry *fown; }; void pipe_entry__init (PipeEntry *message); size_t pipe_entry__get_packed_size (const PipeEntry *message); size_t pipe_entry__pack (const PipeEntry *message, uint8_t *out); size_t pipe_entry__pack_to_buffer (const PipeEntry *message, ProtobufCBuffer *buffer); PipeEntry * pipe_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void pipe_entry__free_unpacked (PipeEntry *message, ProtobufCAllocator *allocator); typedef void (*PipeEntry_Closure) (const PipeEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor pipe_entry__descriptor; # 32 "./images/fdinfo.pb-c.h" 2 # 1 "./images/tty.pb-c.h" 1 # 9 "./images/tty.pb-c.h" # 20 "./images/tty.pb-c.h" typedef struct WinsizeEntry WinsizeEntry; typedef struct TermiosEntry TermiosEntry; typedef struct TtyPtyEntry TtyPtyEntry; typedef struct TtyDataEntry TtyDataEntry; typedef struct TtyInfoEntry TtyInfoEntry; typedef struct TtyFileEntry TtyFileEntry; typedef enum _TtyType { TTY_TYPE__UNKNOWN = 0, TTY_TYPE__PTY = 1, TTY_TYPE__CONSOLE = 2, TTY_TYPE__VT = 3, TTY_TYPE__CTTY = 4, TTY_TYPE__EXT_TTY = 5, TTY_TYPE__SERIAL = 6 # 38 "./images/tty.pb-c.h" 3 4 , _TTY_TYPE_IS_INT_SIZE = 0x7fffffff # 39 "./images/tty.pb-c.h" } TtyType; struct WinsizeEntry { ProtobufCMessage base; uint32_t ws_row; uint32_t ws_col; uint32_t ws_xpixel; uint32_t ws_ypixel; }; struct TermiosEntry { ProtobufCMessage base; uint32_t c_iflag; uint32_t c_oflag; uint32_t c_cflag; uint32_t c_lflag; uint32_t c_line; uint32_t c_ispeed; uint32_t c_ospeed; size_t n_c_cc; uint32_t *c_cc; }; struct TtyPtyEntry { ProtobufCMessage base; uint32_t index; }; struct TtyDataEntry { ProtobufCMessage base; uint32_t tty_id; ProtobufCBinaryData data; }; struct TtyInfoEntry { ProtobufCMessage base; uint32_t id; TtyType type; protobuf_c_boolean locked; protobuf_c_boolean exclusive; protobuf_c_boolean packet_mode; uint32_t sid; uint32_t pgrp; uint32_t rdev; TermiosEntry *termios; TermiosEntry *termios_locked; WinsizeEntry *winsize; TtyPtyEntry *pty; protobuf_c_boolean has_dev; uint32_t dev; protobuf_c_boolean has_uid; uint32_t uid; protobuf_c_boolean has_gid; uint32_t gid; }; struct TtyFileEntry { ProtobufCMessage base; uint32_t id; uint32_t tty_info_id; uint32_t flags; FownEntry *fown; protobuf_c_boolean has_regf_id; uint32_t regf_id; }; void winsize_entry__init (WinsizeEntry *message); size_t winsize_entry__get_packed_size (const WinsizeEntry *message); size_t winsize_entry__pack (const WinsizeEntry *message, uint8_t *out); size_t winsize_entry__pack_to_buffer (const WinsizeEntry *message, ProtobufCBuffer *buffer); WinsizeEntry * winsize_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void winsize_entry__free_unpacked (WinsizeEntry *message, ProtobufCAllocator *allocator); void termios_entry__init (TermiosEntry *message); size_t termios_entry__get_packed_size (const TermiosEntry *message); size_t termios_entry__pack (const TermiosEntry *message, uint8_t *out); size_t termios_entry__pack_to_buffer (const TermiosEntry *message, ProtobufCBuffer *buffer); TermiosEntry * termios_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void termios_entry__free_unpacked (TermiosEntry *message, ProtobufCAllocator *allocator); void tty_pty_entry__init (TtyPtyEntry *message); size_t tty_pty_entry__get_packed_size (const TtyPtyEntry *message); size_t tty_pty_entry__pack (const TtyPtyEntry *message, uint8_t *out); size_t tty_pty_entry__pack_to_buffer (const TtyPtyEntry *message, ProtobufCBuffer *buffer); TtyPtyEntry * tty_pty_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tty_pty_entry__free_unpacked (TtyPtyEntry *message, ProtobufCAllocator *allocator); void tty_data_entry__init (TtyDataEntry *message); size_t tty_data_entry__get_packed_size (const TtyDataEntry *message); size_t tty_data_entry__pack (const TtyDataEntry *message, uint8_t *out); size_t tty_data_entry__pack_to_buffer (const TtyDataEntry *message, ProtobufCBuffer *buffer); TtyDataEntry * tty_data_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tty_data_entry__free_unpacked (TtyDataEntry *message, ProtobufCAllocator *allocator); void tty_info_entry__init (TtyInfoEntry *message); size_t tty_info_entry__get_packed_size (const TtyInfoEntry *message); size_t tty_info_entry__pack (const TtyInfoEntry *message, uint8_t *out); size_t tty_info_entry__pack_to_buffer (const TtyInfoEntry *message, ProtobufCBuffer *buffer); TtyInfoEntry * tty_info_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tty_info_entry__free_unpacked (TtyInfoEntry *message, ProtobufCAllocator *allocator); void tty_file_entry__init (TtyFileEntry *message); size_t tty_file_entry__get_packed_size (const TtyFileEntry *message); size_t tty_file_entry__pack (const TtyFileEntry *message, uint8_t *out); size_t tty_file_entry__pack_to_buffer (const TtyFileEntry *message, ProtobufCBuffer *buffer); TtyFileEntry * tty_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void tty_file_entry__free_unpacked (TtyFileEntry *message, ProtobufCAllocator *allocator); typedef void (*WinsizeEntry_Closure) (const WinsizeEntry *message, void *closure_data); typedef void (*TermiosEntry_Closure) (const TermiosEntry *message, void *closure_data); typedef void (*TtyPtyEntry_Closure) (const TtyPtyEntry *message, void *closure_data); typedef void (*TtyDataEntry_Closure) (const TtyDataEntry *message, void *closure_data); typedef void (*TtyInfoEntry_Closure) (const TtyInfoEntry *message, void *closure_data); typedef void (*TtyFileEntry_Closure) (const TtyFileEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor tty_type__descriptor; extern const ProtobufCMessageDescriptor winsize_entry__descriptor; extern const ProtobufCMessageDescriptor termios_entry__descriptor; extern const ProtobufCMessageDescriptor tty_pty_entry__descriptor; extern const ProtobufCMessageDescriptor tty_data_entry__descriptor; extern const ProtobufCMessageDescriptor tty_info_entry__descriptor; extern const ProtobufCMessageDescriptor tty_file_entry__descriptor; # 33 "./images/fdinfo.pb-c.h" 2 # 1 "./images/memfd.pb-c.h" 1 # 9 "./images/memfd.pb-c.h" # 20 "./images/memfd.pb-c.h" typedef struct MemfdFileEntry MemfdFileEntry; typedef struct MemfdInodeEntry MemfdInodeEntry; struct MemfdFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; uint64_t pos; FownEntry *fown; uint32_t inode_id; }; struct MemfdInodeEntry { ProtobufCMessage base; char *name; uint32_t uid; uint32_t gid; uint64_t size; uint32_t shmid; uint32_t seals; uint64_t inode_id; protobuf_c_boolean has_hugetlb_flag; uint32_t hugetlb_flag; protobuf_c_boolean has_mode; uint32_t mode; }; void memfd_file_entry__init (MemfdFileEntry *message); size_t memfd_file_entry__get_packed_size (const MemfdFileEntry *message); size_t memfd_file_entry__pack (const MemfdFileEntry *message, uint8_t *out); size_t memfd_file_entry__pack_to_buffer (const MemfdFileEntry *message, ProtobufCBuffer *buffer); MemfdFileEntry * memfd_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void memfd_file_entry__free_unpacked (MemfdFileEntry *message, ProtobufCAllocator *allocator); void memfd_inode_entry__init (MemfdInodeEntry *message); size_t memfd_inode_entry__get_packed_size (const MemfdInodeEntry *message); size_t memfd_inode_entry__pack (const MemfdInodeEntry *message, uint8_t *out); size_t memfd_inode_entry__pack_to_buffer (const MemfdInodeEntry *message, ProtobufCBuffer *buffer); MemfdInodeEntry * memfd_inode_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void memfd_inode_entry__free_unpacked (MemfdInodeEntry *message, ProtobufCAllocator *allocator); typedef void (*MemfdFileEntry_Closure) (const MemfdFileEntry *message, void *closure_data); typedef void (*MemfdInodeEntry_Closure) (const MemfdInodeEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor memfd_file_entry__descriptor; extern const ProtobufCMessageDescriptor memfd_inode_entry__descriptor; # 34 "./images/fdinfo.pb-c.h" 2 # 1 "./images/bpfmap-file.pb-c.h" 1 # 9 "./images/bpfmap-file.pb-c.h" # 20 "./images/bpfmap-file.pb-c.h" typedef struct BpfmapFileEntry BpfmapFileEntry; struct BpfmapFileEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; uint64_t pos; FownEntry *fown; uint32_t map_type; uint32_t key_size; uint32_t value_size; uint32_t map_id; uint32_t max_entries; uint32_t map_flags; uint64_t memlock; protobuf_c_boolean frozen; char *map_name; uint32_t ifindex; protobuf_c_boolean has_mnt_id; int32_t mnt_id; protobuf_c_boolean has_map_extra; uint64_t map_extra; }; void bpfmap_file_entry__init (BpfmapFileEntry *message); size_t bpfmap_file_entry__get_packed_size (const BpfmapFileEntry *message); size_t bpfmap_file_entry__pack (const BpfmapFileEntry *message, uint8_t *out); size_t bpfmap_file_entry__pack_to_buffer (const BpfmapFileEntry *message, ProtobufCBuffer *buffer); BpfmapFileEntry * bpfmap_file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void bpfmap_file_entry__free_unpacked (BpfmapFileEntry *message, ProtobufCAllocator *allocator); typedef void (*BpfmapFileEntry_Closure) (const BpfmapFileEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor bpfmap_file_entry__descriptor; # 35 "./images/fdinfo.pb-c.h" 2 typedef struct FdinfoEntry FdinfoEntry; typedef struct FileEntry FileEntry; typedef enum _FdTypes { FD_TYPES__UND = 0, FD_TYPES__REG = 1, FD_TYPES__PIPE = 2, FD_TYPES__FIFO = 3, FD_TYPES__INETSK = 4, FD_TYPES__UNIXSK = 5, FD_TYPES__EVENTFD = 6, FD_TYPES__EVENTPOLL = 7, FD_TYPES__INOTIFY = 8, FD_TYPES__SIGNALFD = 9, FD_TYPES__PACKETSK = 10, FD_TYPES__TTY = 11, FD_TYPES__FANOTIFY = 12, FD_TYPES__NETLINKSK = 13, FD_TYPES__NS = 14, FD_TYPES__TUNF = 15, FD_TYPES__EXT = 16, FD_TYPES__TIMERFD = 17, FD_TYPES__MEMFD = 18, FD_TYPES__BPFMAP = 19, FD_TYPES__CTL_TTY = 65534, FD_TYPES__AUTOFS_PIPE = 65535 # 68 "./images/fdinfo.pb-c.h" 3 4 , _FD_TYPES_IS_INT_SIZE = 0x7fffffff # 69 "./images/fdinfo.pb-c.h" } FdTypes; struct FdinfoEntry { ProtobufCMessage base; uint32_t id; uint32_t flags; FdTypes type; uint32_t fd; char *xattr_security_selinux; }; struct FileEntry { ProtobufCMessage base; FdTypes type; uint32_t id; RegFileEntry *reg; InetSkEntry *isk; NsFileEntry *nsf; PacketSockEntry *psk; NetlinkSkEntry *nlsk; EventfdFileEntry *efd; EventpollFileEntry *epfd; SignalfdEntry *sgfd; TunfileEntry *tunf; TimerfdEntry *tfd; InotifyFileEntry *ify; FanotifyFileEntry *ffy; ExtFileEntry *ext; UnixSkEntry *usk; FifoEntry *fifo; PipeEntry *pipe; TtyFileEntry *tty; MemfdFileEntry *memfd; BpfmapFileEntry *bpf; }; void fdinfo_entry__init (FdinfoEntry *message); size_t fdinfo_entry__get_packed_size (const FdinfoEntry *message); size_t fdinfo_entry__pack (const FdinfoEntry *message, uint8_t *out); size_t fdinfo_entry__pack_to_buffer (const FdinfoEntry *message, ProtobufCBuffer *buffer); FdinfoEntry * fdinfo_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void fdinfo_entry__free_unpacked (FdinfoEntry *message, ProtobufCAllocator *allocator); void file_entry__init (FileEntry *message); size_t file_entry__get_packed_size (const FileEntry *message); size_t file_entry__pack (const FileEntry *message, uint8_t *out); size_t file_entry__pack_to_buffer (const FileEntry *message, ProtobufCBuffer *buffer); FileEntry * file_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void file_entry__free_unpacked (FileEntry *message, ProtobufCAllocator *allocator); typedef void (*FdinfoEntry_Closure) (const FdinfoEntry *message, void *closure_data); typedef void (*FileEntry_Closure) (const FileEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor fd_types__descriptor; extern const ProtobufCMessageDescriptor fdinfo_entry__descriptor; extern const ProtobufCMessageDescriptor file_entry__descriptor; # 15 "criu/include/files.h" 2 # 1 "./images/fown.pb-c.h" 1 # 16 "criu/include/files.h" 2 struct parasite_drain_fd; struct pstree_item; struct file_desc; struct cr_imgset; struct rst_info; struct parasite_ctl; struct fd_link { union { struct { char name[ # 29 "criu/include/files.h" 3 4 4096 # 29 "criu/include/files.h" ]; size_t len; }; struct { struct ns_desc *ns_d; unsigned int ns_kid; }; }; }; struct fd_parms { int fd; off_t pos; unsigned int flags; char fd_flags; struct stat stat; pid_t pid; FownEntry fown; struct fd_link *link; long fs_type; int mnt_id; struct parasite_ctl *fd_ctl; struct parasite_drain_fd *dfds; }; extern int fill_fdlink(int lfd, const struct fd_parms *p, struct fd_link *link); extern uint32_t make_gen_id(uint32_t st_dev, uint32_t st_ino, uint64_t pos); struct file_desc; enum { FLE_INITIALIZED, FLE_OPEN, FLE_RESTORED, }; struct fdinfo_list_entry { struct list_head desc_list; struct file_desc *desc; struct list_head ps_list; struct pstree_item *task; FdinfoEntry *fe; int pid; u8 received : 1; u8 stage : 3; u8 fake : 1; }; extern int inh_fd_max; static inline int fdinfo_rst_prio(struct fdinfo_list_entry *fd_a, struct fdinfo_list_entry *fd_b) { return pid_rst_prio(fd_a->pid, fd_b->pid) || ((fd_a->pid == fd_b->pid) && (fd_a->fe->fd < fd_b->fe->fd)); } struct file_desc_ops { unsigned int type; int (*open)(struct file_desc *d, int *new_fd); char *(*name)(struct file_desc *, char *b, size_t s); }; int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info, # 115 "criu/include/files.h" 3 4 _Bool # 115 "criu/include/files.h" ghost); struct fdinfo_list_entry *collect_fd_to(int pid, FdinfoEntry *e, struct rst_info *rst_info, struct file_desc *fdesc, # 117 "criu/include/files.h" 3 4 _Bool # 117 "criu/include/files.h" fake, # 117 "criu/include/files.h" 3 4 _Bool # 117 "criu/include/files.h" force_master); u32 find_unused_file_desc_id(void); unsigned int find_unused_fd(struct pstree_item *, int hint_fd); struct fdinfo_list_entry *find_used_fd(struct pstree_item *, int fd); struct file_desc { u32 id; struct hlist_node hash; struct list_head fd_info_head; struct file_desc_ops *ops; struct list_head fake_master_list; }; struct fdtype_ops { unsigned int type; int (*dump)(int lfd, u32 id, const struct fd_parms *p); int (*pre_dump)(int pid, int lfd); }; struct cr_img; extern int dump_my_file(int lfd, u32 *, int *type); extern int do_dump_gen_file(struct fd_parms *p, int lfd, const struct fdtype_ops *ops, FdinfoEntry *e); struct parasite_drain_fd; int dump_task_files_seized(struct parasite_ctl *ctl, struct pstree_item *item, struct parasite_drain_fd *dfds); int predump_task_files(int pid); extern void file_desc_init(struct file_desc *d, u32 id, struct file_desc_ops *ops); extern int file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops); extern struct fdinfo_list_entry *try_file_master(struct file_desc *d); extern struct fdinfo_list_entry *file_master(struct file_desc *d); extern struct file_desc *find_file_desc_raw(int type, u32 id); extern int setup_and_serve_out(struct fdinfo_list_entry *fle, int new_fd); extern int recv_desc_from_peer(struct file_desc *d, int *fd); extern int send_desc_to_peer(int fd, struct file_desc *d); extern int restore_fown(int fd, FownEntry *fown); extern int rst_file_params(int fd, FownEntry *fown, int flags); extern void show_saved_files(void); extern int prepare_fds(struct pstree_item *me); extern int prepare_fd_pid(struct pstree_item *me); extern int prepare_files(void); extern int restore_fs(struct pstree_item *); extern int prepare_fs_pid(struct pstree_item *); extern int set_fd_flags(int fd, int flags); extern struct collect_image_info files_cinfo; extern int close_old_fds(void); extern int shared_fdt_prepare(struct pstree_item *item); extern struct collect_image_info ext_file_cinfo; extern int dump_unsupp_fd(struct fd_parms *p, int lfd, char *more, char *info, FdinfoEntry *); extern int inherit_fd_parse(char *optarg); extern int inherit_fd_add(int fd, char *key); extern void inherit_fd_log(void); extern int inherit_fd_move_to_fdstore(void); extern int inherit_fd_lookup_id(char *id); extern # 189 "criu/include/files.h" 3 4 _Bool # 189 "criu/include/files.h" inherited_fd(struct file_desc *, int *fdp); extern FdinfoEntry *dup_fdinfo(FdinfoEntry *old, int fd, unsigned flags); int dup_fle(struct pstree_item *task, struct fdinfo_list_entry *ple, int fd, unsigned flags); extern int open_transport_socket(void); extern int set_fds_event(pid_t virt); extern void wait_fds_event(void); int find_unused_fd_pid(pid_t pid); # 8 "criu/include/namespaces.h" 2 # 1 "./images/netdev.pb-c.h" 1 # 9 "./images/netdev.pb-c.h" # 1 "./images/macvlan.pb-c.h" 1 # 9 "./images/macvlan.pb-c.h" # 18 "./images/macvlan.pb-c.h" typedef struct MacvlanLinkEntry MacvlanLinkEntry; struct MacvlanLinkEntry { ProtobufCMessage base; uint32_t mode; protobuf_c_boolean has_flags; uint32_t flags; }; void macvlan_link_entry__init (MacvlanLinkEntry *message); size_t macvlan_link_entry__get_packed_size (const MacvlanLinkEntry *message); size_t macvlan_link_entry__pack (const MacvlanLinkEntry *message, uint8_t *out); size_t macvlan_link_entry__pack_to_buffer (const MacvlanLinkEntry *message, ProtobufCBuffer *buffer); MacvlanLinkEntry * macvlan_link_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void macvlan_link_entry__free_unpacked (MacvlanLinkEntry *message, ProtobufCAllocator *allocator); typedef void (*MacvlanLinkEntry_Closure) (const MacvlanLinkEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor macvlan_link_entry__descriptor; # 18 "./images/netdev.pb-c.h" 2 # 1 "./images/sysctl.pb-c.h" 1 # 9 "./images/sysctl.pb-c.h" # 18 "./images/sysctl.pb-c.h" typedef struct SysctlEntry SysctlEntry; typedef enum _SysctlType { SYSCTL_TYPE__CTL_STR = 5, SYSCTL_TYPE__CTL_32 = 6 # 26 "./images/sysctl.pb-c.h" 3 4 , _SYSCTL_TYPE_IS_INT_SIZE = 0x7fffffff # 27 "./images/sysctl.pb-c.h" } SysctlType; struct SysctlEntry { ProtobufCMessage base; SysctlType type; protobuf_c_boolean has_iarg; int32_t iarg; char *sarg; }; void sysctl_entry__init (SysctlEntry *message); size_t sysctl_entry__get_packed_size (const SysctlEntry *message); size_t sysctl_entry__pack (const SysctlEntry *message, uint8_t *out); size_t sysctl_entry__pack_to_buffer (const SysctlEntry *message, ProtobufCBuffer *buffer); SysctlEntry * sysctl_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void sysctl_entry__free_unpacked (SysctlEntry *message, ProtobufCAllocator *allocator); typedef void (*SysctlEntry_Closure) (const SysctlEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor sysctl_type__descriptor; extern const ProtobufCMessageDescriptor sysctl_entry__descriptor; # 21 "./images/netdev.pb-c.h" 2 # 1 "./images/sit.pb-c.h" 1 # 9 "./images/sit.pb-c.h" # 19 "./images/sit.pb-c.h" typedef struct SitEntry SitEntry; struct SitEntry { ProtobufCMessage base; protobuf_c_boolean has_link; uint32_t link; size_t n_local; uint32_t *local; size_t n_remote; uint32_t *remote; protobuf_c_boolean has_ttl; uint32_t ttl; protobuf_c_boolean has_tos; uint32_t tos; protobuf_c_boolean has_pmtudisc; protobuf_c_boolean pmtudisc; protobuf_c_boolean has_proto; uint32_t proto; protobuf_c_boolean has_flags; uint32_t flags; protobuf_c_boolean has_encap_type; uint32_t encap_type; protobuf_c_boolean has_encap_flags; uint32_t encap_flags; protobuf_c_boolean has_encap_sport; uint32_t encap_sport; protobuf_c_boolean has_encap_dport; uint32_t encap_dport; protobuf_c_boolean has_rd_prefixlen; uint32_t rd_prefixlen; size_t n_rd_prefix; uint32_t *rd_prefix; protobuf_c_boolean has_relay_prefixlen; uint32_t relay_prefixlen; size_t n_relay_prefix; uint32_t *relay_prefix; }; void sit_entry__init (SitEntry *message); size_t sit_entry__get_packed_size (const SitEntry *message); size_t sit_entry__pack (const SitEntry *message, uint8_t *out); size_t sit_entry__pack_to_buffer (const SitEntry *message, ProtobufCBuffer *buffer); SitEntry * sit_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void sit_entry__free_unpacked (SitEntry *message, ProtobufCAllocator *allocator); typedef void (*SitEntry_Closure) (const SitEntry *message, void *closure_data); extern const ProtobufCMessageDescriptor sit_entry__descriptor; # 22 "./images/netdev.pb-c.h" 2 typedef struct NetDeviceEntry NetDeviceEntry; typedef struct NetnsId NetnsId; typedef struct NetnsEntry NetnsEntry; typedef enum _NdType { ND_TYPE__LOOPBACK = 1, ND_TYPE__VETH = 2, ND_TYPE__TUN = 3, ND_TYPE__EXTLINK = 4, ND_TYPE__VENET = 5, ND_TYPE__BRIDGE = 6, ND_TYPE__MACVLAN = 7, ND_TYPE__SIT = 8 # 48 "./images/netdev.pb-c.h" 3 4 , _ND_TYPE_IS_INT_SIZE = 0x7fffffff # 49 "./images/netdev.pb-c.h" } NdType; struct NetDeviceEntry { ProtobufCMessage base; NdType type; uint32_t ifindex; uint32_t mtu; uint32_t flags; char *name; TunLinkEntry *tun; protobuf_c_boolean has_address; ProtobufCBinaryData address; size_t n_conf; int32_t *conf; size_t n_conf4; SysctlEntry **conf4; size_t n_conf6; SysctlEntry **conf6; MacvlanLinkEntry *macvlan; protobuf_c_boolean has_peer_ifindex; uint32_t peer_ifindex; protobuf_c_boolean has_peer_nsid; uint32_t peer_nsid; protobuf_c_boolean has_master; uint32_t master; SitEntry *sit; }; struct NetnsId { ProtobufCMessage base; uint32_t target_ns_id; int32_t netnsid_value; }; struct NetnsEntry { ProtobufCMessage base; size_t n_def_conf; int32_t *def_conf; size_t n_all_conf; int32_t *all_conf; size_t n_def_conf4; SysctlEntry **def_conf4; size_t n_all_conf4; SysctlEntry **all_conf4; size_t n_def_conf6; SysctlEntry **def_conf6; size_t n_all_conf6; SysctlEntry **all_conf6; size_t n_nsids; NetnsId **nsids; char *ext_key; size_t n_unix_conf; SysctlEntry **unix_conf; }; void net_device_entry__init (NetDeviceEntry *message); size_t net_device_entry__get_packed_size (const NetDeviceEntry *message); size_t net_device_entry__pack (const NetDeviceEntry *message, uint8_t *out); size_t net_device_entry__pack_to_buffer (const NetDeviceEntry *message, ProtobufCBuffer *buffer); NetDeviceEntry * net_device_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void net_device_entry__free_unpacked (NetDeviceEntry *message, ProtobufCAllocator *allocator); void netns_id__init (NetnsId *message); size_t netns_id__get_packed_size (const NetnsId *message); size_t netns_id__pack (const NetnsId *message, uint8_t *out); size_t netns_id__pack_to_buffer (const NetnsId *message, ProtobufCBuffer *buffer); NetnsId * netns_id__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void netns_id__free_unpacked (NetnsId *message, ProtobufCAllocator *allocator); void netns_entry__init (NetnsEntry *message); size_t netns_entry__get_packed_size (const NetnsEntry *message); size_t netns_entry__pack (const NetnsEntry *message, uint8_t *out); size_t netns_entry__pack_to_buffer (const NetnsEntry *message, ProtobufCBuffer *buffer); NetnsEntry * netns_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void netns_entry__free_unpacked (NetnsEntry *message, ProtobufCAllocator *allocator); typedef void (*NetDeviceEntry_Closure) (const NetDeviceEntry *message, void *closure_data); typedef void (*NetnsId_Closure) (const NetnsId *message, void *closure_data); typedef void (*NetnsEntry_Closure) (const NetnsEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor nd_type__descriptor; extern const ProtobufCMessageDescriptor net_device_entry__descriptor; extern const ProtobufCMessageDescriptor netns_id__descriptor; extern const ProtobufCMessageDescriptor netns_entry__descriptor; # 10 "criu/include/namespaces.h" 2 # 52 "criu/include/namespaces.h" struct ns_desc { unsigned int cflag; char *str; size_t len; }; struct user_ns_extra { char *uid; char *gid; }; struct join_ns { struct list_head list; char *ns_file; struct ns_desc *nd; int ns_fd; union { struct user_ns_extra user_extra; char *common_extra; } extra_opts; }; enum ns_type { NS_UNKNOWN = 0, NS_CRIU, NS_ROOT, NS_OTHER, }; struct netns_id { unsigned target_ns_id; unsigned netnsid_value; struct list_head node; }; struct net_link { NetDeviceEntry *nde; # 91 "criu/include/namespaces.h" 3 4 _Bool # 91 "criu/include/namespaces.h" created; struct list_head node; }; struct ns_id { unsigned int kid; unsigned int id; pid_t ns_pid; struct ns_desc *nd; struct ns_id *next; enum ns_type type; char *ext_key; # 110 "criu/include/namespaces.h" 3 4 _Bool # 110 "criu/include/namespaces.h" ns_populated; union { struct { struct mount_info *mntinfo_list; struct mount_info *mntinfo_tree; int nsfd_id; int root_fd_id; } mnt; struct { # 131 "criu/include/namespaces.h" union { int nsfd_id; int ns_fd; }; int nlsk; int seqsk; struct list_head ids; struct list_head links; NetnsEntry *netns; } net; }; }; extern struct ns_id *ns_ids; extern # 150 "criu/include/namespaces.h" 3 4 _Bool # 150 "criu/include/namespaces.h" check_ns_proc(struct fd_link *link); extern struct ns_desc pid_ns_desc; extern struct ns_desc user_ns_desc; extern struct ns_desc time_ns_desc; extern unsigned long root_ns_mask; extern const struct fdtype_ops nsfile_dump_ops; extern struct collect_image_info nsfile_cinfo; extern int walk_namespaces(struct ns_desc *nd, int (*cb)(struct ns_id *, void *), void *oarg); extern int collect_namespaces( # 161 "criu/include/namespaces.h" 3 4 _Bool # 161 "criu/include/namespaces.h" for_dump); extern int collect_mnt_namespaces( # 162 "criu/include/namespaces.h" 3 4 _Bool # 162 "criu/include/namespaces.h" for_dump); extern int dump_mnt_namespaces(void); extern int dump_namespaces(struct pstree_item *item, unsigned int ns_flags); extern int prepare_namespace_before_tasks(void); extern int prepare_namespace(struct pstree_item *item, unsigned long clone_flags); extern int prepare_userns_creds(void); extern int switch_ns(int pid, struct ns_desc *nd, int *rst); extern int switch_mnt_ns(int pid, int *rst, int *cwd_fd); extern int switch_ns_by_fd(int nsfd, struct ns_desc *nd, int *rst); extern int restore_ns(int rst, struct ns_desc *nd); extern int restore_mnt_ns(int rst, int *cwd_fd); extern int dump_task_ns_ids(struct pstree_item *); extern int predump_task_ns_ids(struct pstree_item *); extern int rst_add_ns_id(unsigned int id, struct pstree_item *, struct ns_desc *nd); extern struct ns_id *lookup_ns_by_id(unsigned int id, struct ns_desc *nd); extern int collect_user_namespaces( # 180 "criu/include/namespaces.h" 3 4 _Bool # 180 "criu/include/namespaces.h" for_dump); extern int prepare_userns(struct pstree_item *item); extern int stop_usernsd(void); extern uid_t userns_uid(uid_t uid); extern gid_t userns_gid(gid_t gid); extern int dump_user_ns(pid_t pid, int ns_id); extern void free_userns_maps(void); extern int join_ns_add(const char *type, char *ns_file, char *extra_opts); extern int check_namespace_opts(void); extern int join_namespaces(void); typedef int (*uns_call_t)(void *arg, int fd, pid_t pid); # 219 "criu/include/namespaces.h" extern int __userns_call(const char *func_name, uns_call_t call, int flags, void *arg, size_t arg_size, int fd); extern int add_ns_shared_cb(int (*actor)(void *data), void *data); extern struct ns_id *get_socket_ns(int lfd); extern struct ns_id *lookup_ns_by_kid(unsigned int kid, struct ns_desc *nd); struct unsc_msg { struct msghdr h; struct iovec iov[3]; char c[ # 237 "criu/include/namespaces.h" 3 4 (((( # 237 "criu/include/namespaces.h" sizeof(struct ucred) # 237 "criu/include/namespaces.h" 3 4 ) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))) # 237 "criu/include/namespaces.h" + # 237 "criu/include/namespaces.h" 3 4 (((( # 237 "criu/include/namespaces.h" sizeof(int) # 237 "criu/include/namespaces.h" 3 4 ) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))) # 237 "criu/include/namespaces.h" ]; }; extern void unsc_msg_init(struct unsc_msg *m, uns_call_t *c, int *x, void *arg, size_t asize, int fd, pid_t *pid); extern void unsc_msg_pid_fd(struct unsc_msg *um, pid_t *pid, int *fd); extern int start_unix_cred_daemon(pid_t *pid, int (*daemon_func)(int sk)); # 32 "criu/net.c" 2 # 1 "criu/include/net.h" 1 # 1 "criu/include/external.h" 1 struct external { struct list_head node; char *id; void *data; }; extern int add_external(char *key); extern # 10 "criu/include/external.h" 3 4 _Bool # 10 "criu/include/external.h" external_lookup_id(char *id); extern char *external_lookup_by_key(char *id); extern void *external_lookup_data(char *id); extern int external_for_each_type(char *type, int (*cb)(struct external *, void *), void *arg); static inline char *external_val(struct external *e) { char *aux; aux = strchr(e->id, '['); if (aux) { aux = strchr(aux + 1, ']'); if (aux && aux[1] == ':') return aux + 2; } return # 26 "criu/include/external.h" 3 4 ((void *)0) # 26 "criu/include/external.h" ; } # 8 "criu/include/net.h" 2 struct cr_imgset; struct ns_id; extern int dump_net_ns(struct ns_id *ns); extern int prepare_net_namespaces(void); extern void fini_net_namespaces(void); extern int netns_keep_nsfd(void); struct pstree_item; extern int restore_task_net_ns(struct pstree_item *current); struct veth_pair { struct list_head node; char *inside; char *outside; char *bridge; }; extern int collect_net_namespaces( # 30 "criu/include/net.h" 3 4 _Bool # 30 "criu/include/net.h" for_dump); extern int network_lock(void); extern void network_unlock(void); extern int network_lock_internal(void); extern struct ns_desc net_ns_desc; extern int write_netdev_img(NetDeviceEntry *nde, struct cr_imgset *fds, struct nlattr **info); extern int read_ns_sys_file(char *path, char *buf, int len); struct net_link; extern int restore_link_parms(struct net_link *link, int nlsk); extern int veth_pair_add(char *in, char *out); extern int macvlan_ext_add(struct external *ext); extern int move_veth_to_bridge(void); extern int kerndat_has_newifindex(void); extern int kerndat_link_nsid(void); extern int net_get_nsid(int rtsk, int fd, int *nsid); extern struct ns_id *net_get_root_ns(void); extern void check_has_netns_ioc(int fd, # 53 "criu/include/net.h" 3 4 _Bool # 53 "criu/include/net.h" *kdat_val, const char *name); extern int net_set_ext(struct ns_id *ns); extern struct ns_id *get_root_netns(void); extern int read_net_ns_img(void); # 33 "criu/net.c" 2 # 1 "criu/include/libnetlink.h" 1 struct ns_id; extern int do_rtnl_req(int nl, void *req, int size, int (*receive_callback)(struct nlmsghdr *h, struct ns_id *ns, void *), int (*error_callback)(int err, struct ns_id *ns, void *), struct ns_id *ns, void *); extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, int alen); extern int32_t nla_get_s32(const struct nlattr *nla); # 34 "criu/net.c" 2 # 1 "criu/include/cr_options.h" 1 # 1 "/usr/include/sys/capability.h" 1 3 4 # 34 "/usr/include/sys/capability.h" 3 4 # 1 "/usr/include/linux/capability.h" 1 3 4 # 39 "/usr/include/linux/capability.h" 3 4 # 39 "/usr/include/linux/capability.h" 3 4 typedef struct __user_cap_header_struct { __u32 version; int pid; } *cap_user_header_t; struct __user_cap_data_struct { __u32 effective; __u32 permitted; __u32 inheritable; }; typedef struct __user_cap_data_struct *cap_user_data_t; # 73 "/usr/include/linux/capability.h" 3 4 struct vfs_cap_data { __le32 magic_etc; struct { __le32 permitted; __le32 inheritable; } data[2]; }; struct vfs_ns_cap_data { __le32 magic_etc; struct { __le32 permitted; __le32 inheritable; } data[2]; __le32 rootid; }; # 35 "/usr/include/sys/capability.h" 2 3 4 # 44 "/usr/include/sys/capability.h" 3 4 typedef struct _cap_struct *cap_t; typedef int cap_value_t; extern cap_value_t cap_max_bits(void); # 79 "/usr/include/sys/capability.h" 3 4 extern char *cap_proc_root(const char *root); typedef enum { CAP_EFFECTIVE = 0, CAP_PERMITTED = 1, CAP_INHERITABLE = 2 } cap_flag_t; typedef enum { CAP_IAB_INH = 2, CAP_IAB_AMB = 3, CAP_IAB_BOUND = 4 } cap_iab_vector_t; # 112 "/usr/include/sys/capability.h" 3 4 typedef struct cap_iab_s *cap_iab_t; typedef enum { CAP_CLEAR=0, CAP_SET=1 } cap_flag_value_t; typedef unsigned cap_mode_t; extern cap_t cap_dup(cap_t); extern int cap_free(void *); extern cap_t cap_init(void); extern cap_iab_t cap_iab_dup(cap_iab_t); extern cap_iab_t cap_iab_init(void); extern int cap_get_flag(cap_t, cap_value_t, cap_flag_t, cap_flag_value_t *); extern int cap_set_flag(cap_t, cap_flag_t, int, const cap_value_t *, cap_flag_value_t); extern int cap_clear(cap_t); extern int cap_clear_flag(cap_t, cap_flag_t); extern int cap_fill_flag(cap_t cap_d, cap_flag_t to, cap_t ref, cap_flag_t from); extern int cap_fill(cap_t, cap_flag_t, cap_flag_t); extern int cap_compare(cap_t, cap_t); extern int cap_iab_compare(cap_iab_t, cap_iab_t); extern cap_flag_value_t cap_iab_get_vector(cap_iab_t, cap_iab_vector_t, cap_value_t); extern int cap_iab_set_vector(cap_iab_t, cap_iab_vector_t, cap_value_t, cap_flag_value_t); extern int cap_iab_fill(cap_iab_t, cap_iab_vector_t, cap_t, cap_flag_t); extern cap_t cap_get_fd(int); extern cap_t cap_get_file(const char *); extern uid_t cap_get_nsowner(cap_t); extern int cap_set_fd(int, cap_t); extern int cap_set_file(const char *, cap_t); extern int cap_set_nsowner(cap_t, uid_t); extern cap_t cap_get_proc(void); extern cap_t cap_get_pid(pid_t); extern int cap_set_proc(cap_t); extern int cap_get_bound(cap_value_t); extern int cap_drop_bound(cap_value_t); extern int cap_get_ambient(cap_value_t); extern int cap_set_ambient(cap_value_t, cap_flag_value_t); extern int cap_reset_ambient(void); extern ssize_t cap_size(cap_t cap_d); extern ssize_t cap_copy_ext(void *cap_ext, cap_t cap_d, ssize_t length); extern cap_t cap_copy_int(const void *cap_ext); extern cap_t cap_copy_int_check(const void *cap_ext, ssize_t length); extern cap_t cap_from_text(const char *); extern char * cap_to_text(cap_t, ssize_t *); extern int cap_from_name(const char *, cap_value_t *); extern char * cap_to_name(cap_value_t); extern char * cap_iab_to_text(cap_iab_t iab); extern cap_iab_t cap_iab_from_text(const char *text); extern void cap_set_syscall(long int (*new_syscall)(long int, long int, long int, long int), long int (*new_syscall6)(long int, long int, long int, long int, long int, long int, long int)); extern int cap_set_mode(cap_mode_t flavor); extern cap_mode_t cap_get_mode(void); extern const char *cap_mode_name(cap_mode_t flavor); extern unsigned cap_get_secbits(void); extern int cap_set_secbits(unsigned bits); extern int cap_prctl(long int pr_cmd, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5); extern int cap_prctlw(long int pr_cmd, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5); extern int cap_setuid(uid_t uid); extern int cap_setgroups(gid_t gid, size_t ngroups, const gid_t groups[]); extern cap_iab_t cap_iab_get_proc(void); extern cap_iab_t cap_iab_get_pid(pid_t); extern int cap_iab_set_proc(cap_iab_t iab); typedef struct cap_launch_s *cap_launch_t; extern cap_launch_t cap_new_launcher(const char *arg0, const char * const *argv, const char * const *envp); extern cap_launch_t cap_func_launcher(int (callback_fn)(void *detail)); extern int cap_launcher_callback(cap_launch_t attr, int (callback_fn)(void *detail)); extern int cap_launcher_setuid(cap_launch_t attr, uid_t uid); extern int cap_launcher_setgroups(cap_launch_t attr, gid_t gid, int ngroups, const gid_t *groups); extern int cap_launcher_set_mode(cap_launch_t attr, cap_mode_t flavor); extern cap_iab_t cap_launcher_set_iab(cap_launch_t attr, cap_iab_t iab); extern int cap_launcher_set_chroot(cap_launch_t attr, const char *chroot); extern pid_t cap_launch(cap_launch_t attr, void *detail); extern int capget(cap_user_header_t header, cap_user_data_t data); extern int capset(cap_user_header_t header, const cap_user_data_t data); extern int capgetp(pid_t pid, cap_t cap_d); extern int capsetp(pid_t pid, cap_t cap_d); # 6 "criu/include/cr_options.h" 2 # 40 "criu/include/cr_options.h" # 40 "criu/include/cr_options.h" struct cg_root_opt { struct list_head node; char *controller; char *newroot; }; # 67 "criu/include/cr_options.h" enum NETWORK_LOCK_METHOD { NETWORK_LOCK_IPTABLES, NETWORK_LOCK_NFTABLES, NETWORK_LOCK_SKIP, }; # 82 "criu/include/cr_options.h" enum FILE_VALIDATION_OPTIONS { FILE_VALIDATION_FILE_SIZE, FILE_VALIDATION_BUILD_ID }; struct irmap; struct irmap_path_opt { struct list_head node; struct irmap *ir; }; enum criu_mode { CR_UNSET = 0, CR_DUMP, CR_PRE_DUMP, CR_RESTORE, CR_LAZY_PAGES, CR_CHECK, CR_PAGE_SERVER, CR_SERVICE, CR_SWRK, CR_DEDUP, CR_CPUINFO, CR_EXEC_DEPRECATED, CR_SHOW_DEPRECATED, }; struct cr_options { int final_state; int check_extra_features; int check_experimental_features; union { int restore_detach; # 131 "criu/include/cr_options.h" 3 4 _Bool # 131 "criu/include/cr_options.h" daemon_mode; }; int restore_sibling; # 134 "criu/include/cr_options.h" 3 4 _Bool # 134 "criu/include/cr_options.h" ext_unix_sk; int shell_job; int handle_file_locks; int tcp_established_ok; int tcp_close; int evasive_devices; int link_remap_ok; int log_file_per_pid; int pre_dump_mode; # 143 "criu/include/cr_options.h" 3 4 _Bool # 143 "criu/include/cr_options.h" swrk_restore; char *output; char *root; char *pidfile; char *freeze_cgroup; struct list_head ext_mounts; struct list_head inherit_fds; struct list_head external; struct list_head join_ns; char *libdir; int use_page_server; unsigned short port; char *addr; int ps_socket; int track_mem; char *img_parent; int auto_dedup; unsigned int cpu_cap; int force_irmap; char **exec_cmd; unsigned int manage_cgroups; char *new_global_cg_root; char *cgroup_props; char *cgroup_props_file; struct list_head new_cgroup_roots; char *cgroup_yard; # 169 "criu/include/cr_options.h" 3 4 _Bool # 169 "criu/include/cr_options.h" autodetect_ext_mounts; int enable_external_sharing; int enable_external_masters; # 172 "criu/include/cr_options.h" 3 4 _Bool # 172 "criu/include/cr_options.h" aufs; # 173 "criu/include/cr_options.h" 3 4 _Bool # 173 "criu/include/cr_options.h" overlayfs; int ghost_fiemap; size_t ghost_limit; struct list_head irmap_scan_paths; # 180 "criu/include/cr_options.h" 3 4 _Bool # 180 "criu/include/cr_options.h" lsm_supplied; char *lsm_profile; char *lsm_mount_context; unsigned int timeout; unsigned int empty_ns; int tcp_skip_in_flight; # 186 "criu/include/cr_options.h" 3 4 _Bool # 186 "criu/include/cr_options.h" lazy_pages; char *work_dir; int network_lock_method; int skip_file_rwx_check; int deprecated_ok; int display_stats; int weak_sysctls; int status_fd; # 201 "criu/include/cr_options.h" 3 4 _Bool # 201 "criu/include/cr_options.h" orphan_pts_master; int stream; pid_t tree_id; int log_level; char *imgs_dir; char *tls_cacert; char *tls_cacrl; char *tls_cert; char *tls_key; int tls; int tls_no_cn_verify; int file_validation_method; enum criu_mode mode; int mntns_compat_mode; char *argv_0; uid_t uid; u32 cap_eff[ # 233 "criu/include/cr_options.h" 3 4 2 # 233 "criu/include/cr_options.h" ]; int unprivileged; }; extern struct cr_options opts; extern char *rpc_cfg_file; extern int parse_options(int argc, char **argv, # 245 "criu/include/cr_options.h" 3 4 _Bool # 245 "criu/include/cr_options.h" *usage_error, # 245 "criu/include/cr_options.h" 3 4 _Bool # 245 "criu/include/cr_options.h" *has_exec_cmd, int state); extern int check_options(void); extern void init_opts(void); # 35 "criu/net.c" 2 # 1 "criu/include/sk-inet.h" 1 # 1 "criu/include/sockets.h" 1 # 1 "./images/sk-opts.pb-c.h" 1 # 9 "criu/include/sockets.h" 2 struct fdinfo_list_entry; struct sk_opts_entry; struct file_desc; struct fd_parms; struct cr_imgset; struct nlmsghdr; struct cr_img; struct socket_desc { unsigned int family; unsigned int ino; struct socket_desc *next; struct ns_id *sk_ns; int already_dumped; }; extern int dump_socket(struct fd_parms *p, int lfd, FdinfoEntry *); extern int dump_socket_opts(int sk, SkOptsEntry *soe); extern int restore_socket_opts(int sk, SkOptsEntry *soe); extern int sk_setbufs(int sk, uint32_t *bufs); extern void release_skopts(SkOptsEntry *); extern int restore_prepare_socket(int sk); extern void preload_socket_modules(void); extern # 35 "criu/include/sockets.h" 3 4 _Bool # 35 "criu/include/sockets.h" socket_test_collect_bit(unsigned int family, unsigned int proto); extern int sk_collect_one(unsigned ino, int family, struct socket_desc *d, struct ns_id *ns); struct ns_id; extern int collect_sockets(struct ns_id *); extern struct collect_image_info inet_sk_cinfo; extern struct collect_image_info unix_sk_cinfo; extern int add_fake_unix_queuers(void); extern int fix_external_unix_sockets(void); extern int prepare_scms(void); extern int unix_note_scm_rights(int id_for, uint32_t *file_ids, int *fds, int n_ids); extern struct collect_image_info netlink_sk_cinfo; extern struct socket_desc *lookup_socket_ino(unsigned int ino, int family); extern struct socket_desc *lookup_socket(unsigned int ino, int family, int proto); extern const struct fdtype_ops unix_dump_ops; extern const struct fdtype_ops inet_dump_ops; extern const struct fdtype_ops inet6_dump_ops; extern const struct fdtype_ops netlink_dump_ops; extern const struct fdtype_ops packet_dump_ops; extern int inet_collect_one(struct nlmsghdr *h, int family, int type, struct ns_id *ns); extern int unix_receive_one(struct nlmsghdr *h, struct ns_id *ns, void *); extern int netlink_receive_one(struct nlmsghdr *hdr, struct ns_id *ns, void *arg); extern int unix_sk_id_add(unsigned int ino); extern int unix_sk_ids_parse(char *optarg); extern int unix_prepare_root_shared(void); extern void init_sk_info_hash(void); extern int do_dump_opt(int sk, int level, int name, void *val, int len); extern int do_restore_opt(int sk, int level, int name, void *val, int len); # 84 "criu/include/sockets.h" static inline int sk_decode_shutdown(int val) { static const int hows[] = { -1, # 86 "criu/include/sockets.h" 3 4 SHUT_RD # 86 "criu/include/sockets.h" , # 86 "criu/include/sockets.h" 3 4 SHUT_WR # 86 "criu/include/sockets.h" , # 86 "criu/include/sockets.h" 3 4 SHUT_RDWR # 86 "criu/include/sockets.h" }; return hows[val]; } extern int set_netns(uint32_t ns_id); extern int kerndat_socket_netns(void); extern int kerndat_socket_unix_file(void); extern const char *tcp_state_name(unsigned int state, char *nm, size_t size); extern const char *socket_type_name(unsigned int type, char *nm, size_t size); extern const char *socket_family_name(unsigned int family, char *nm, size_t size); extern const char *socket_proto_name(unsigned int proto, char *nm, size_t size); # 7 "criu/include/sk-inet.h" 2 # 1 "./images/sk-inet.pb-c.h" 1 # 10 "criu/include/sk-inet.h" 2 # 31 "criu/include/sk-inet.h" struct inet_sk_desc { struct socket_desc sd; unsigned int type; unsigned int src_port; unsigned int dst_port; unsigned int state; unsigned int rqlen; unsigned int wqlen; unsigned int uwqlen; unsigned int src_addr[4]; unsigned int dst_addr[4]; unsigned short shutdown; # 43 "criu/include/sk-inet.h" 3 4 _Bool # 43 "criu/include/sk-inet.h" cork; int rfd; int cpt_reuseaddr; struct list_head rlist; void *priv; }; struct inet_port; struct inet_sk_info { InetSkEntry *ie; struct file_desc d; struct inet_port *port; struct list_head port_list; int sk_fd; struct list_head rlist; }; extern int inet_bind(int sk, struct inet_sk_info *); extern int inet_connect(int sk, struct inet_sk_info *); static inline void tcp_repair_off(int fd) { int aux = 0, ret; ret = setsockopt(fd, # 78 "criu/include/sk-inet.h" 3 4 6 # 78 "criu/include/sk-inet.h" , # 78 "criu/include/sk-inet.h" 3 4 19 # 78 "criu/include/sk-inet.h" , &aux, sizeof(aux)); if (ret < 0) print_on_level((1), "Error (%s:%d): " "Failed to turn off repair mode on socket %d" ": %s\n", "criu/include/sk-inet.h", 80, fd, strerror( # 80 "criu/include/sk-inet.h" 3 4 (*__errno_location ()) # 80 "criu/include/sk-inet.h" )); } extern void tcp_locked_conn_add(struct inet_sk_info *); extern void rst_unlock_tcp_connections(void); extern void cpt_unlock_tcp_connections(void); extern int dump_one_tcp(int sk, struct inet_sk_desc *sd, SkOptsEntry *soe); extern int restore_one_tcp(int sk, struct inet_sk_info *si); struct task_restore_args; int prepare_tcp_socks(struct task_restore_args *); struct rst_tcp_sock { int sk; # 99 "criu/include/sk-inet.h" 3 4 _Bool # 99 "criu/include/sk-inet.h" reuseaddr; }; union libsoccr_addr; int restore_sockaddr(union libsoccr_addr *sa, int family, u32 pb_port, u32 *pb_addr, u32 ifindex); # 36 "criu/net.c" 2 # 1 "criu/include/tun.h" 1 extern struct ns_id *ns; extern const struct fdtype_ops tunfile_dump_ops; extern int dump_tun_link(NetDeviceEntry *nde, struct cr_imgset *fds, struct nlattr **info); struct net_link; extern int restore_one_tun(struct ns_id *ns, struct net_link *link, int nlsk); extern struct collect_image_info tunfile_cinfo; extern int check_tun_cr(int no_tun_err); extern int check_tun_netns_cr( # 20 "criu/include/tun.h" 3 4 _Bool # 20 "criu/include/tun.h" *result); # 37 "criu/net.c" 2 # 1 "criu/include/util-pie.h" 1 # 1 "/usr/include/x86_64-linux-gnu/sys/un.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/sys/un.h" 3 4 # 29 "/usr/include/x86_64-linux-gnu/sys/un.h" 3 4 struct sockaddr_un { sa_family_t sun_family; char sun_path[108]; }; # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 38 "/usr/include/x86_64-linux-gnu/sys/un.h" 2 3 4 # 6 "criu/include/util-pie.h" 2 # 15 "criu/include/util-pie.h" # 1 "include/common/scm.h" 1 # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 # 41 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 52 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 67 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 80 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 110 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 123 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count, __off_t __offset, int ___flags) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count, __off_t __offset, int __flags) __attribute__ ((__warn_unused_result__)); # 161 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec, int __count, __off64_t __offset, int ___flags) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev, int __count, __off64_t __offset, int __flags) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 2, 3))); # 1 "/usr/include/x86_64-linux-gnu/bits/uio-ext.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/uio-ext.h" 3 4 extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __attribute__ ((__nothrow__ , __leaf__)); extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __attribute__ ((__nothrow__ , __leaf__)); # 51 "/usr/include/x86_64-linux-gnu/bits/uio-ext.h" 3 4 # 180 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 # 9 "include/common/scm.h" 2 # 20 "include/common/scm.h" # 20 "include/common/scm.h" struct scm_fdset { struct msghdr hdr; struct iovec iov; char msg_buf[(1024)]; }; extern int send_fds(int sock, struct sockaddr_un *saddr, int len, int *fds, int nr_fds, void *data, unsigned ch_size); extern int __recv_fds(int sock, int *fds, int nr_fds, void *data, unsigned ch_size, int flags); static inline int recv_fds(int sock, int *fds, int nr_fds, void *data, unsigned ch_size) { return __recv_fds(sock, fds, nr_fds, data, ch_size, 0); } static inline int send_fd(int sock, struct sockaddr_un *saddr, int saddr_len, int fd) { return send_fds(sock, saddr, saddr_len, &fd, 1, # 39 "include/common/scm.h" 3 4 ((void *)0) # 39 "include/common/scm.h" , 0); } static inline int recv_fd(int sock) { int fd, ret; ret = recv_fds(sock, &fd, 1, # 46 "include/common/scm.h" 3 4 ((void *)0) # 46 "include/common/scm.h" , 0); if (ret) return -1; return fd; } # 16 "criu/include/util-pie.h" 2 extern int open_detach_mount(char *dir); # 38 "criu/net.c" 2 # 1 "criu/include/plugin.h" 1 # 1 "criu/include/criu-plugin.h" 1 # 23 "criu/include/criu-plugin.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h" 1 3 4 # 24 "criu/include/criu-plugin.h" 2 # 41 "criu/include/criu-plugin.h" enum { CR_PLUGIN_HOOK__DUMP_UNIX_SK = 0, CR_PLUGIN_HOOK__RESTORE_UNIX_SK = 1, CR_PLUGIN_HOOK__DUMP_EXT_FILE = 2, CR_PLUGIN_HOOK__RESTORE_EXT_FILE = 3, CR_PLUGIN_HOOK__DUMP_EXT_MOUNT = 4, CR_PLUGIN_HOOK__RESTORE_EXT_MOUNT = 5, CR_PLUGIN_HOOK__DUMP_EXT_LINK = 6, CR_PLUGIN_HOOK__HANDLE_DEVICE_VMA = 7, CR_PLUGIN_HOOK__UPDATE_VMA_MAP = 8, CR_PLUGIN_HOOK__RESUME_DEVICES_LATE = 9, CR_PLUGIN_HOOK__MAX }; typedef int(CR_PLUGIN_HOOK__DUMP_UNIX_SK_t)(int fd, int id); typedef int(CR_PLUGIN_HOOK__RESTORE_UNIX_SK_t)(int id); typedef int(CR_PLUGIN_HOOK__DUMP_EXT_FILE_t)(int fd, int id); typedef int(CR_PLUGIN_HOOK__RESTORE_EXT_FILE_t)(int id); typedef int(CR_PLUGIN_HOOK__DUMP_EXT_MOUNT_t)(char *mountpoint, int id); typedef int(CR_PLUGIN_HOOK__RESTORE_EXT_MOUNT_t)(int id, char *mountpoint, char *old_root, int *is_file); typedef int(CR_PLUGIN_HOOK__DUMP_EXT_LINK_t)(int index, int type, char *kind); typedef int(CR_PLUGIN_HOOK__HANDLE_DEVICE_VMA_t)(int fd, const struct stat *stat); typedef int(CR_PLUGIN_HOOK__UPDATE_VMA_MAP_t)(const char *path, const uint64_t addr, const uint64_t old_pgoff, uint64_t *new_pgoff, int *plugin_fd) ; typedef int(CR_PLUGIN_HOOK__RESUME_DEVICES_LATE_t)(int pid); enum { CR_PLUGIN_STAGE__DUMP, CR_PLUGIN_STAGE__PRE_DUMP, CR_PLUGIN_STAGE__RESTORE, CR_PLUGIN_STAGE_MAX }; typedef struct { const char *name; int (*init)(int stage); void (*exit)(int stage, int ret); unsigned int version; unsigned int max_hooks; void *hooks[CR_PLUGIN_HOOK__MAX]; } cr_plugin_desc_t; extern cr_plugin_desc_t CR_PLUGIN_DESC; # 107 "criu/include/criu-plugin.h" static inline int cr_plugin_dummy_init(int stage) { return 0; } static inline void cr_plugin_dummy_exit(int stage, int ret) { } # 131 "criu/include/criu-plugin.h" extern int criu_get_image_dir(void); typedef int(cr_plugin_init_t)(void); typedef void(cr_plugin_fini_t)(void); typedef int(cr_plugin_dump_unix_sk_t)(int fd, int id); typedef int(cr_plugin_restore_unix_sk_t)(int id); typedef int(cr_plugin_dump_file_t)(int fd, int id); typedef int(cr_plugin_restore_file_t)(int id); typedef int(cr_plugin_dump_ext_mount_t)(char *mountpoint, int id); typedef int(cr_plugin_restore_ext_mount_t)(int id, char *mountpoint, char *old_root, int *is_file); typedef int(cr_plugin_dump_ext_link_t)(int index, int type, char *kind); typedef int(cr_plugin_handle_device_vma_t)(int fd, const struct stat *stat); typedef int(cr_plugin_update_vma_map_t)(const char *path, const uint64_t addr, const uint64_t old_pgoff, uint64_t *new_pgoff, int *plugin_fd); typedef int(cr_plugin_resume_devices_late_t)(int pid); # 5 "criu/include/plugin.h" 2 void cr_plugin_fini(int stage, int err); int cr_plugin_init(int stage); typedef struct { struct list_head head; struct list_head hook_chain[CR_PLUGIN_HOOK__MAX]; } cr_plugin_ctl_t; extern cr_plugin_ctl_t cr_plugin_ctl; typedef struct { cr_plugin_desc_t *d; struct list_head list; void *dlhandle; struct list_head link[CR_PLUGIN_HOOK__MAX]; } plugin_desc_t; # 39 "criu/net.c" 2 # 1 "criu/include/action-scripts.h" 1 enum script_actions { ACT_PRE_STREAM, ACT_PRE_DUMP, ACT_POST_DUMP, ACT_PRE_RESTORE, ACT_POST_RESTORE, ACT_NET_LOCK, ACT_NET_UNLOCK, ACT_SETUP_NS, ACT_POST_SETUP_NS, ACT_POST_RESUME, ACT_PRE_RESUME, ACT_ORPHAN_PTS_MASTER, ACT_STATUS_READY, ACT_QUERY_EXT_FILES, ACT_MAX }; extern int add_script(char *path); extern int add_rpc_notify(int sk); extern int run_scripts(enum script_actions); extern int rpc_send_fd(enum script_actions, int fd); extern int rpc_query_external_files(void); extern int exec_rpc_query_external_files(char *name, int sk); extern int send_criu_rpc_script(enum script_actions act, char *name, int sk, int fd); # 40 "criu/net.c" 2 # 1 "criu/include/sockets.h" 1 # 41 "criu/net.c" 2 # 1 "criu/include/pstree.h" 1 # 1 "criu/include/xmalloc.h" 1 # 1 "include/common/xmalloc.h" 1 # 59 "include/common/xmalloc.h" static inline void *xptr_pull_s(void **m, size_t s) { void *ret = (*m); (*m) += s; return ret; } # 3 "criu/include/xmalloc.h" 2 # 8 "criu/include/pstree.h" 2 struct pstree_item { struct pstree_item *parent; struct list_head children; struct list_head sibling; struct pid *pid; pid_t pgid; pid_t sid; pid_t born_sid; int nr_threads; struct pid *threads; CoreEntry **core; TaskKobjIdsEntry *ids; union { futex_t task_st; unsigned long task_st_le_bits; }; }; static inline pid_t vpid(const struct pstree_item *i) { return i->pid->ns[0].virt; } enum { FDS_EVENT_BIT = 0, }; extern struct pstree_item *current; struct rst_info; static inline struct rst_info *rsti(struct pstree_item *i) { return (struct rst_info *)(i + 1); } struct thread_lsm { char *profile; char *sockcreate; }; struct ns_id; struct dmp_info { struct ns_id *netns; struct page_pipe *mem_pp; struct parasite_ctl *parasite_ctl; struct parasite_thread_ctl **thread_ctls; uint64_t *thread_sp; struct criu_rseq_cs *thread_rseq_cs; struct thread_lsm **thread_lsms; }; static inline struct dmp_info *dmpi(const struct pstree_item *i) { return (struct dmp_info *)(i + 1); } static inline int shared_fdtable(struct pstree_item *item) { return (item->parent && item->ids->files_id == item->parent->ids->files_id); } static inline # 87 "criu/include/pstree.h" 3 4 _Bool # 87 "criu/include/pstree.h" is_alive_state(int state) { return (state == TASK_ALIVE) || (state == TASK_STOPPED); } static inline # 92 "criu/include/pstree.h" 3 4 _Bool # 92 "criu/include/pstree.h" task_alive(struct pstree_item *i) { return is_alive_state(i->pid->state); } extern void free_pstree(struct pstree_item *root_item); extern struct pstree_item *__alloc_pstree_item( # 98 "criu/include/pstree.h" 3 4 _Bool # 98 "criu/include/pstree.h" rst); extern int init_pstree_helper(struct pstree_item *ret); extern struct pstree_item *lookup_create_item(pid_t pid); extern void pstree_insert_pid(struct pid *pid_node); extern struct pid *pstree_pid_by_virt(pid_t pid); extern struct pstree_item *root_item; extern struct pstree_item *pstree_item_next(struct pstree_item *item); extern # 110 "criu/include/pstree.h" 3 4 _Bool # 110 "criu/include/pstree.h" restore_before_setsid(struct pstree_item *child); extern int prepare_pstree(void); extern int prepare_dummy_pstree(void); extern int dump_pstree(struct pstree_item *root_item); struct pstree_item *pstree_item_by_real(pid_t virt); struct pstree_item *pstree_item_by_virt(pid_t virt); extern int pid_to_virt(pid_t pid); struct task_entries; extern struct task_entries *task_entries; extern int prepare_task_entries(void); extern int prepare_dummy_task_state(struct pstree_item *pi); extern int get_task_ids(struct pstree_item *); extern TaskKobjIdsEntry *root_ids; extern void core_entry_free(CoreEntry *core); extern CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc); extern int pstree_alloc_cores(struct pstree_item *item); extern void pstree_free_cores(struct pstree_item *item); extern int collect_pstree_ids(void); extern int preorder_pstree_traversal(struct pstree_item *item, int (*f)(struct pstree_item *)); # 42 "criu/net.c" 2 # 1 "criu/include/string.h" 1 extern size_t __strlcpy(char *dest, const char *src, size_t size); extern size_t __strlcat(char *dest, const char *src, size_t count); # 43 "criu/net.c" 2 # 1 "criu/include/sysctl.h" 1 struct sysctl_req { char *name; void *arg; int type; int flags; }; extern int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns); enum { CTL_READ, CTL_WRITE, }; # 44 "criu/net.c" 2 # 1 "criu/include/kerndat.h" 1 # 45 "criu/net.c" 2 # 1 "criu/include/util.h" 1 # 12 "criu/include/util.h" # 1 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/statfs.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/statfs.h" 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/statfs.h" 3 4 struct statfs { __fsword_t f_type; __fsword_t f_bsize; __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; __fsblkcnt_t f_bavail; __fsfilcnt_t f_files; __fsfilcnt_t f_ffree; __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; struct statfs64 { __fsword_t f_type; __fsword_t f_bsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; # 26 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 2 3 4 extern int statfs (const char *__file, struct statfs *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); # 43 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 3 4 extern int statfs64 (const char *__file, struct statfs64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstatfs (int __fildes, struct statfs *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 61 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 3 4 extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 13 "criu/include/util.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sysmacros.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 2 3 4 # 33 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 extern unsigned int gnu_dev_major (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern unsigned int gnu_dev_minor (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (__dev_t __dev) { unsigned int __major; __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); return __major; } __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (__dev_t __dev) { unsigned int __minor; __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); return __minor; } __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) __dev_t __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { __dev_t __dev; __dev = (((__dev_t) (__major & 0x00000fffu)) << 8); __dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); __dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); __dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); return __dev; } # 14 "criu/include/util.h" 2 # 1 "/usr/include/dirent.h" 1 3 4 # 27 "/usr/include/dirent.h" 3 4 # 61 "/usr/include/dirent.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4 struct dirent { __ino_t d_ino; __off_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; }; struct dirent64 { __ino64_t d_ino; __off64_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; }; # 62 "/usr/include/dirent.h" 2 3 4 # 97 "/usr/include/dirent.h" 3 4 enum { DT_UNKNOWN = 0, DT_FIFO = 1, DT_CHR = 2, DT_DIR = 4, DT_BLK = 6, DT_REG = 8, DT_LNK = 10, DT_SOCK = 12, DT_WHT = 14 }; # 127 "/usr/include/dirent.h" 3 4 typedef struct __dirstream DIR; extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (closedir, 1))); extern DIR *fdopendir (int __fd) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (closedir, 1))); # 164 "/usr/include/dirent.h" 3 4 extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); # 175 "/usr/include/dirent.h" 3 4 extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); # 185 "/usr/include/dirent.h" 3 4 extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); # 203 "/usr/include/dirent.h" 3 4 extern int readdir64_r (DIR *__restrict __dirp, struct dirent64 *__restrict __entry, struct dirent64 **__restrict __result) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 247 "/usr/include/dirent.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h" 1 3 4 # 248 "/usr/include/dirent.h" 2 3 4 # 257 "/usr/include/dirent.h" 3 4 extern int scandir (const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __attribute__ ((__nonnull__ (1, 2))); # 280 "/usr/include/dirent.h" 3 4 extern int scandir64 (const char *__restrict __dir, struct dirent64 ***__restrict __namelist, int (*__selector) (const struct dirent64 *), int (*__cmp) (const struct dirent64 **, const struct dirent64 **)) __attribute__ ((__nonnull__ (1, 2))); # 295 "/usr/include/dirent.h" 3 4 extern int scandirat (int __dfd, const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __attribute__ ((__nonnull__ (2, 3))); # 317 "/usr/include/dirent.h" 3 4 extern int scandirat64 (int __dfd, const char *__restrict __dir, struct dirent64 ***__restrict __namelist, int (*__selector) (const struct dirent64 *), int (*__cmp) (const struct dirent64 **, const struct dirent64 **)) __attribute__ ((__nonnull__ (2, 3))); extern int alphasort (const struct dirent **__e1, const struct dirent **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 342 "/usr/include/dirent.h" 3 4 extern int alphasort64 (const struct dirent64 **__e1, const struct dirent64 **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 355 "/usr/include/dirent.h" 3 4 extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off_t *__restrict __basep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); # 372 "/usr/include/dirent.h" 3 4 extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int versionsort (const struct dirent **__e1, const struct dirent **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 398 "/usr/include/dirent.h" 3 4 extern int versionsort64 (const struct dirent64 **__e1, const struct dirent64 **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 1 "/usr/include/x86_64-linux-gnu/bits/dirent_ext.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/dirent_ext.h" 3 4 extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 407 "/usr/include/dirent.h" 2 3 4 # 15 "criu/include/util.h" 2 # 1 "/usr/include/poll.h" 1 3 4 # 16 "criu/include/util.h" 2 # 1 "criu/include/xmalloc.h" 1 # 20 "criu/include/util.h" 2 # 37 "criu/include/util.h" # 37 "criu/include/util.h" struct vma_area; struct list_head; extern int service_fd_rlim_cur; extern void pr_vma(const struct vma_area *vma_area); # 54 "criu/include/util.h" extern int move_fd_from(int *img_fd, int want_fd); extern int close_safe(int *fd); extern int reopen_fd_as_safe(char *file, int line, int new_fd, int old_fd, # 57 "criu/include/util.h" 3 4 _Bool # 57 "criu/include/util.h" allow_reuse_fd); extern void close_proc(void); extern int open_pid_proc(pid_t pid); extern int close_pid_proc(void); extern int set_proc_fd(int fd); extern pid_t sys_clone_unified(unsigned long flags, void *child_stack, void *parent_tid, void *child_tid, unsigned long newtls); # 80 "criu/include/util.h" extern int do_open_proc(pid_t pid, int flags, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 4))); # 137 "criu/include/util.h" static inline u32 kdev_major(u32 kdev) { return kdev >> 20; } static inline u32 kdev_minor(u32 kdev) { return kdev & ((1UL << 20) - 1); } static inline dev_t kdev_to_odev(u32 kdev) { unsigned major = kdev_major(kdev); unsigned minor = kdev_minor(kdev); return # 157 "criu/include/util.h" 3 4 gnu_dev_makedev ( # 157 "criu/include/util.h" major # 157 "criu/include/util.h" 3 4 , # 157 "criu/include/util.h" minor # 157 "criu/include/util.h" 3 4 ) # 157 "criu/include/util.h" ; } extern int copy_file(int fd_in, int fd_out, size_t bytes); extern int is_anon_link_type(char *link, char *type); extern int cr_system(int in, int out, int err, char *cmd, char *const argv[], unsigned flags); extern int cr_system_userns(int in, int out, int err, char *cmd, char *const argv[], unsigned flags, int userns_pid); extern pid_t fork_and_ptrace_attach(int (*child_setup)(void)); extern int cr_daemon(int nochdir, int noclose, int close_fd); extern int status_ready(void); extern int is_root_user(void); extern int set_proc_self_fd(int fd); static inline # 176 "criu/include/util.h" 3 4 _Bool # 176 "criu/include/util.h" dir_dots(const struct dirent *de) { return !strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."); } extern int is_empty_dir(int dirfd); extern int read_fd_link(int lfd, char *buf, size_t size); int vaddr_to_pfn(int fd, unsigned long vaddr, u64 *pfn); static inline # 200 "criu/include/util.h" 3 4 _Bool # 200 "criu/include/util.h" strstartswith2(const char *str, const char *sub, char *end) { while (1) { if (*sub == '\0') { if (end) { if (*(sub - 1) == '/') *end = '/'; else *end = *str; } return # 211 "criu/include/util.h" 3 4 1 # 211 "criu/include/util.h" ; } if (*str == '\0') return # 214 "criu/include/util.h" 3 4 0 # 214 "criu/include/util.h" ; if (*str != *sub) return # 216 "criu/include/util.h" 3 4 0 # 216 "criu/include/util.h" ; str++; sub++; } } static inline # 223 "criu/include/util.h" 3 4 _Bool # 223 "criu/include/util.h" strstartswith(const char *str, const char *sub) { return strstartswith2(str, sub, # 225 "criu/include/util.h" 3 4 ((void *)0) # 225 "criu/include/util.h" ); } # 239 "criu/include/util.h" static inline # 239 "criu/include/util.h" 3 4 _Bool # 239 "criu/include/util.h" issubpath(const char *path, const char *sub_path) { char end; return strstartswith2(path, sub_path, &end) && (end == '/' || end == '\0'); } extern char *get_relative_path(char *path, char *sub_path); extern # 246 "criu/include/util.h" 3 4 _Bool # 246 "criu/include/util.h" is_sub_path(char *path, char *sub_path); extern # 247 "criu/include/util.h" 3 4 _Bool # 247 "criu/include/util.h" is_same_path(char *path1, char *path2); int strip_deleted(char *path, int len); int cut_path_ending(char *path, char *sub_path); int mkdirpat(int fd, const char *path, int mode); # 262 "criu/include/util.h" 3 4 _Bool # 262 "criu/include/util.h" is_path_prefix(const char *path, const char *prefix); FILE *fopenat(int dirfd, char *path, char *cflags); void split(char *str, char token, char ***out, int *n); int cr_fchown(int fd, uid_t new_uid, gid_t new_gid); int cr_fchperm(int fd, uid_t new_uid, gid_t new_gid, mode_t new_mode); int cr_fchpermat(int dirfd, const char *path, uid_t new_uid, gid_t new_gid, mode_t new_mode, int flags); int fd_has_data(int lfd); int make_yard(char *path); static inline int sk_wait_data(int sk) { struct pollfd pfd = { sk, # 276 "criu/include/util.h" 3 4 0x001 # 276 "criu/include/util.h" , 0 }; return poll(&pfd, 1, -1); } void fd_set_nonblocking(int fd, # 280 "criu/include/util.h" 3 4 _Bool # 280 "criu/include/util.h" on); const char *ns_to_string(unsigned int ns); int xatol(const char *string, long *number); int xatoi(const char *string, int *number); char *xstrcat(char *str, const char *fmt, ...) __attribute__((__format__(__printf__, 2, 3))); char *xsprintf(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); int setup_tcp_server(char *type, char *addr, unsigned short *port); int run_tcp_server( # 291 "criu/include/util.h" 3 4 _Bool # 291 "criu/include/util.h" daemon_mode, int *ask, int cfd, int sk); int setup_tcp_client(char *hostname); int rmrf(char *path); # 327 "criu/include/util.h" # 1 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/epoll.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/epoll.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/epoll.h" 3 4 enum { EPOLL_CLOEXEC = 02000000 }; # 29 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 2 3 4 enum EPOLL_EVENTS { EPOLLIN = 0x001, EPOLLPRI = 0x002, EPOLLOUT = 0x004, EPOLLRDNORM = 0x040, EPOLLRDBAND = 0x080, EPOLLWRNORM = 0x100, EPOLLWRBAND = 0x200, EPOLLMSG = 0x400, EPOLLERR = 0x008, EPOLLHUP = 0x010, EPOLLRDHUP = 0x2000, EPOLLEXCLUSIVE = 1u << 28, EPOLLWAKEUP = 1u << 29, EPOLLONESHOT = 1u << 30, EPOLLET = 1u << 31 }; # 76 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 3 4 typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; epoll_data_t data; } __attribute__ ((__packed__)); extern int epoll_create (int __size) __attribute__ ((__nothrow__ , __leaf__)); extern int epoll_create1 (int __flags) __attribute__ ((__nothrow__ , __leaf__)); # 110 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 3 4 extern int epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event) __attribute__ ((__nothrow__ , __leaf__)); # 124 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 3 4 extern int epoll_wait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout) __attribute__ ((__access__ (__write_only__, 2, 3))) __attribute__ ((__nonnull__ (2))); extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, const __sigset_t *__ss) __attribute__ ((__access__ (__write_only__, 2, 3))) __attribute__ ((__nonnull__ (2))); extern int epoll_pwait2 (int __epfd, struct epoll_event *__events, int __maxevents, const struct timespec *__timeout, const __sigset_t *__ss) __attribute__ ((__access__ (__write_only__, 2, 3))) __attribute__ ((__nonnull__ (2))); # 161 "/usr/include/x86_64-linux-gnu/sys/epoll.h" 3 4 # 328 "criu/include/util.h" 2 # 329 "criu/include/util.h" struct epoll_rfd { int fd; int (*read_event)(struct epoll_rfd *); int (*hangup_event)(struct epoll_rfd *); }; extern int epoll_add_rfd(int epfd, struct epoll_rfd *); extern int epoll_del_rfd(int epfd, struct epoll_rfd *rfd); extern int epoll_run_rfds(int epfd, struct epoll_event *evs, int nr_fds, int tmo); extern int epoll_prepare(int nr_events, struct epoll_event **evs); extern void rlimit_unlimit_nofile(void); extern int call_in_child_process(int (*fn)(void *), void *arg); extern void print_stack_trace(pid_t pid); # 387 "criu/include/util.h" extern int mount_detached_fs(const char *fsname); extern char *get_legacy_iptables_bin( # 389 "criu/include/util.h" 3 4 _Bool # 389 "criu/include/util.h" ipv6, # 389 "criu/include/util.h" 3 4 _Bool # 389 "criu/include/util.h" restore); extern int set_opts_cap_eff(void); extern ssize_t read_all(int fd, void *buf, size_t size); extern ssize_t write_all(int fd, const void *buf, size_t size); static inline void cleanup_freep(void *p) { void **pp = (void **)p; free(*pp); } extern int run_command(char *buf, size_t buf_size, int (*child_fn)(void *), void *args); extern uint64_t criu_run_id; extern void util_init(void); extern char *resolve_mountpoint(char *path); # 46 "criu/net.c" 2 # 1 "criu/include/external.h" 1 # 47 "criu/net.c" 2 # 1 "criu/include/fdstore.h" 1 # 9 "criu/include/fdstore.h" int fdstore_init(void); int fdstore_add(int fd); int fdstore_get(int id); # 48 "criu/net.c" 2 # 1 "criu/include/netfilter.h" 1 struct inet_sk_desc; extern int iptables_lock_connection(struct inet_sk_desc *); extern int iptables_unlock_connection(struct inet_sk_desc *); struct inet_sk_info; extern int iptables_unlock_connection_info(struct inet_sk_info *); extern void preload_netfilter_modules(void); extern int nftables_init_connection_lock(void); extern int nftables_lock_connection(struct inet_sk_desc *); extern int nftables_get_table(char *table, int n); # 49 "criu/net.c" 2 # 1 "criu/include/protobuf.h" 1 # 1 "criu/include/protobuf-desc.h" 1 # 1 "/usr/include/protobuf-c/protobuf-c.h" 1 3 4 # 6 "criu/include/protobuf-desc.h" 2 enum { PB_INVENTORY, PB_STATS, PB_FDINFO, PB_CORE, PB_MM, PB_VMA, PB_ITIMER, PB_POSIX_TIMER, PB_CREDS, PB_FS, PB_UTSNS, PB_IPC_VAR, PB_IPC_SHM, PB_IPC_SEM, PB_MNT, PB_PSTREE, PB_GHOST_FILE, PB_TCP_STREAM, PB_REG_FILE, PB_EXT_FILE, PB_NS_FILE, PB_INET_SK, PB_UNIX_SK, PB_PACKET_SOCK, PB_NETLINK_SK, PB_PIPE, PB_FIFO, PB_PIPE_DATA, PB_EVENTFD_FILE, PB_EVENTPOLL_FILE, PB_EVENTPOLL_TFD, PB_SIGNALFD, PB_INOTIFY_FILE, PB_INOTIFY_WD, PB_FANOTIFY_FILE, PB_FANOTIFY_MARK, PB_TTY_FILE, PB_TTY_INFO, PB_FILE_LOCK, PB_RLIMIT, PB_PAGEMAP, PB_SIGINFO, PB_TUNFILE, PB_IRMAP_CACHE, PB_CGROUP, PB_SECCOMP, PB_TIMERFD, PB_CPUINFO, PB_USERNS, PB_NETNS, PB_BINFMT_MISC, PB_TTY_DATA, PB_AUTOFS, PB_GHOST_CHUNK, PB_FILE, PB_MEMFD_FILE, PB_MEMFD_INODE, PB_TIMENS, PB_IMG_STREAMER_REQUEST, PB_IMG_STREAMER_REPLY, PB_PIDNS, PB_BPFMAP_FILE, PB_BPFMAP_DATA, PB_APPARMOR, PB_PAGEMAP_HEAD, PB_IDS, PB_SIGACT, PB_NETDEV, PB_REMAP_FPATH, PB_SK_QUEUES, PB_IPCNS_MSG, PB_IPCNS_MSG_ENT, PB_MAX, }; typedef size_t (*pb_getpksize_t)(void *obj); typedef size_t (*pb_pack_t)(void *obj, void *where); typedef void *(*pb_unpack_t)(void *allocator, size_t size, void *from); typedef void (*pb_free_t)(void *obj, void *allocator); struct cr_pb_message_desc { pb_getpksize_t getpksize; pb_pack_t pack; pb_unpack_t unpack; pb_free_t free; const ProtobufCMessageDescriptor *pb_desc; }; extern void cr_pb_init(void); extern struct cr_pb_message_desc cr_pb_descs[PB_MAX]; # 7 "criu/include/protobuf.h" 2 # 1 "criu/include/util.h" 1 # 9 "criu/include/protobuf.h" 2 struct cr_img; extern int do_pb_read_one(struct cr_img *, void **objp, int type, # 12 "criu/include/protobuf.h" 3 4 _Bool # 12 "criu/include/protobuf.h" eof); extern int pb_write_one(struct cr_img *, void *obj, int type); # 27 "criu/include/protobuf.h" struct collect_image_info { int fd_type; int pb_type; unsigned int priv_size; int (*collect)(void *, ProtobufCMessage *, struct cr_img *); unsigned flags; }; extern int collect_image(struct collect_image_info *); extern int collect_entry(ProtobufCMessage *base, struct collect_image_info *cinfo); static inline int collect_images(struct collect_image_info **array, unsigned size) { int i; for (i = 0; i < size; i++) { if (collect_image(array[i])) return -1; } return 0; } # 51 "criu/net.c" 2 # 1 "./images/inventory.pb-c.h" 1 # 9 "./images/inventory.pb-c.h" # 1 "./images/core.pb-c.h" 1 # 18 "./images/inventory.pb-c.h" 2 typedef struct InventoryEntry InventoryEntry; typedef enum _Lsmtype { LSMTYPE__NO_LSM = 0, LSMTYPE__SELINUX = 1, LSMTYPE__APPARMOR = 2 # 28 "./images/inventory.pb-c.h" 3 4 , _LSMTYPE_IS_INT_SIZE = 0x7fffffff # 29 "./images/inventory.pb-c.h" } Lsmtype; struct InventoryEntry { ProtobufCMessage base; uint32_t img_version; protobuf_c_boolean has_fdinfo_per_id; protobuf_c_boolean fdinfo_per_id; TaskKobjIdsEntry *root_ids; protobuf_c_boolean has_ns_per_id; protobuf_c_boolean ns_per_id; protobuf_c_boolean has_root_cg_set; uint32_t root_cg_set; protobuf_c_boolean has_lsmtype; Lsmtype lsmtype; protobuf_c_boolean has_dump_uptime; uint64_t dump_uptime; protobuf_c_boolean has_pre_dump_mode; uint32_t pre_dump_mode; protobuf_c_boolean has_tcp_close; protobuf_c_boolean tcp_close; protobuf_c_boolean has_network_lock_method; uint32_t network_lock_method; }; void inventory_entry__init (InventoryEntry *message); size_t inventory_entry__get_packed_size (const InventoryEntry *message); size_t inventory_entry__pack (const InventoryEntry *message, uint8_t *out); size_t inventory_entry__pack_to_buffer (const InventoryEntry *message, ProtobufCBuffer *buffer); InventoryEntry * inventory_entry__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); void inventory_entry__free_unpacked (InventoryEntry *message, ProtobufCAllocator *allocator); typedef void (*InventoryEntry_Closure) (const InventoryEntry *message, void *closure_data); extern const ProtobufCEnumDescriptor lsmtype__descriptor; extern const ProtobufCMessageDescriptor inventory_entry__descriptor; # 53 "criu/net.c" 2 # 75 "criu/net.c" enum { IFLA_IPTUN_UNSPEC, IFLA_IPTUN_LINK, IFLA_IPTUN_LOCAL, IFLA_IPTUN_REMOTE, IFLA_IPTUN_TTL, IFLA_IPTUN_TOS, IFLA_IPTUN_ENCAP_LIMIT, IFLA_IPTUN_FLOWINFO, IFLA_IPTUN_FLAGS, IFLA_IPTUN_PROTO, IFLA_IPTUN_PMTUDISC, IFLA_IPTUN_6RD_PREFIX, IFLA_IPTUN_6RD_RELAY_PREFIX, IFLA_IPTUN_6RD_PREFIXLEN, IFLA_IPTUN_6RD_RELAY_PREFIXLEN, IFLA_IPTUN_ENCAP_TYPE, IFLA_IPTUN_ENCAP_FLAGS, IFLA_IPTUN_ENCAP_SPORT, IFLA_IPTUN_ENCAP_DPORT, __IFLA_IPTUN_MAX, }; static int ns_sysfs_fd = -1; int read_ns_sys_file(char *path, char *buf, int len) { int fd, rlen; do { if (((ns_sysfs_fd == -1))) { print_on_level((1), "Error (%s:%d): " "net: " "BUG at %s:%d\n", "criu/net.c", 105, "criu/net.c", 105); raise( # 105 "criu/net.c" 3 4 6 # 105 "criu/net.c" ); *(volatile unsigned long *) # 105 "criu/net.c" 3 4 ((void *)0) # 105 "criu/net.c" = 0xdead0000 + 105; __builtin_unreachable(); } } while (0); fd = openat(ns_sysfs_fd, path, # 107 "criu/net.c" 3 4 00 # 107 "criu/net.c" , 0); if (fd < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't open ns' %s" ": %s\n", "criu/net.c", 109, path, strerror( # 109 "criu/net.c" 3 4 (*__errno_location ()) # 109 "criu/net.c" )); return -1; } rlen = read(fd, buf, len); if (rlen == -1) print_on_level((1), "Error (%s:%d): " "net: " "Can't read ns' %s" ": %s\n", "criu/net.c", 115, path, strerror( # 115 "criu/net.c" 3 4 (*__errno_location ()) # 115 "criu/net.c" )); close(fd); if (rlen == len) { buf[0] = '\0'; print_on_level((1), "Error (%s:%d): " "net: " "Too small buffer to read ns sys file %s\n", "criu/net.c", 120, path); return -1; } if (rlen >= 0) buf[rlen] = '\0'; return rlen; } static # 130 "criu/net.c" 3 4 _Bool # 130 "criu/net.c" sysctl_entries_equal(SysctlEntry *a, SysctlEntry *b) { if (a->type != b->type) return # 133 "criu/net.c" 3 4 0 # 133 "criu/net.c" ; switch (a->type) { case SYSCTL_TYPE__CTL_32: return a->has_iarg && b->has_iarg && a->iarg == b->iarg; case SYSCTL_TYPE__CTL_STR: return a->sarg && b->sarg && !strcmp(a->sarg, b->sarg); default:; } return # 143 "criu/net.c" 3 4 0 # 143 "criu/net.c" ; } static char *devconfs4[] = { "accept_local", "accept_redirects", "accept_source_route", "arp_accept", "arp_announce", "arp_filter", "arp_ignore", "arp_notify", "bootp_relay", "disable_policy", "disable_xfrm", "force_igmp_version", "forwarding", "igmpv2_unsolicited_report_interval", "igmpv3_unsolicited_report_interval", "log_martians", "medium_id", "promote_secondaries", "proxy_arp", "proxy_arp_pvlan", "route_localnet", "rp_filter", "secure_redirects", "send_redirects", "shared_media", "src_valid_mark", "tag", "ignore_routes_with_linkdown", "drop_gratuitous_arp", "drop_unicast_in_l2_multicast", }; char *devconfs6[] = { "accept_dad", "accept_ra", "accept_ra_defrtr", "accept_ra_from_local", "accept_ra_min_hop_limit", "accept_ra_mtu", "accept_ra_pinfo", "accept_ra_rt_info_max_plen", "accept_ra_rtr_pref", "accept_redirects", "accept_source_route", "autoconf", "dad_transmits", "disable_ipv6", "drop_unicast_in_l2_multicast", "drop_unsolicited_na", "force_mld_version", "force_tllao", "forwarding", "hop_limit", "ignore_routes_with_linkdown", "keep_addr_on_down", "max_addresses", "max_desync_factor", "mldv1_unsolicited_report_interval", "mldv2_unsolicited_report_interval", "mtu", "ndisc_notify", "optimistic_dad", "proxy_ndp", "regen_max_retry", "router_probe_interval", "router_solicitation_delay", "router_solicitation_interval", "router_solicitations", "stable_secret", "suppress_frag_ndisc", "temp_prefered_lft", "temp_valid_lft", "use_oif_addrs_only", "use_optimistic", "use_tempaddr", }; static const char *unix_conf_entries[] = { "max_dgram_qlen", }; # 241 "criu/net.c" static int net_conf_op(char *tgt, SysctlEntry **conf, int n, int op, char *proto, struct sysctl_req *req, char (*path)[ # 242 "criu/net.c" 3 4 16 # 242 "criu/net.c" + 60], int size, char **devconfs, SysctlEntry **def_conf) { int i, ri, ar = -1; int ret, flags = op == CTL_READ ? 1 : 0; SysctlEntry **rconf; if (n > size) print_on_level((2), "Warn (%s:%d): " "net: " "The image contains unknown sysctl-s\n", "criu/net.c", 249); if (opts.weak_sysctls) flags = 1; rconf = ({ void *___p = malloc(sizeof(SysctlEntry *) * size); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 254, __func__, (long)(sizeof(SysctlEntry *) * size)); ___p; }); if (!rconf) return -1; for (i = 0, ri = 0; i < size; i++) { if (i >= n) { print_on_level((2), "Warn (%s:%d): " "net: " "Skip %s/%s\n", "criu/net.c", 260, tgt, devconfs[i]); continue; } if (def_conf && sysctl_entries_equal(conf[i], def_conf[i]) && strcmp(devconfs[i], "mtu")) { print_on_level((4), "net: " "Skip %s/%s, coincides with default\n", tgt, devconfs[i]); continue; } if (op == CTL_WRITE && !strcmp(devconfs[i], "accept_redirects")) { ar = i; continue; } snprintf(path[i], # 282 "criu/net.c" 3 4 16 # 282 "criu/net.c" + 60, "net/%s/conf/%s/%s", proto, tgt, devconfs[i]); req[ri].name = path[i]; req[ri].flags = flags; switch (conf[i]->type) { case SYSCTL_TYPE__CTL_32: req[ri].type = 6; if (op == CTL_WRITE && !conf[i]->has_iarg) continue; req[ri].arg = &conf[i]->iarg; break; case SYSCTL_TYPE__CTL_STR: req[ri].type = (5 | ((200) << 4)); req[ri].flags |= op == CTL_READ && !strcmp(devconfs[i], "stable_secret") ? 4 : 0; if (op == CTL_WRITE && !conf[i]->sarg) continue; req[ri].arg = conf[i]->sarg; break; default: continue; } rconf[ri] = conf[i]; ri++; } if (ar != -1 && conf[ar]->type == SYSCTL_TYPE__CTL_32 && conf[ar]->has_iarg) { snprintf(path[ar], # 314 "criu/net.c" 3 4 16 # 314 "criu/net.c" + 60, "net/%s/conf/%s/%s", proto, tgt, devconfs[ar]); req[ri].name = path[ar]; req[ri].type = 6; req[ri].arg = &conf[ar]->iarg; req[ri].flags = flags; rconf[ri] = conf[ar]; ri++; } ret = sysctl_op(req, ri, op, # 323 "criu/net.c" 3 4 0x40000000 # 323 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to %s %s/\n", "criu/net.c", 325, (op == CTL_READ) ? "read" : "write", tgt); goto err_free; } if (op == CTL_READ) { for (i = 0; i < ri; i++) if (req[i].flags & 2) { if (rconf[i]->type == SYSCTL_TYPE__CTL_32) rconf[i]->has_iarg = # 334 "criu/net.c" 3 4 1 # 334 "criu/net.c" ; } else { if (rconf[i]->type == SYSCTL_TYPE__CTL_STR) rconf[i]->sarg = # 337 "criu/net.c" 3 4 ((void *)0) # 337 "criu/net.c" ; } } err_free: free(rconf); return ret; } static int ipv4_conf_op(char *tgt, SysctlEntry **conf, int n, int op, SysctlEntry **def_conf) { struct sysctl_req req[(sizeof(devconfs4) / sizeof((devconfs4)[0]))]; char path[(sizeof(devconfs4) / sizeof((devconfs4)[0]))][ # 349 "criu/net.c" 3 4 16 # 349 "criu/net.c" + 60]; return net_conf_op(tgt, conf, n, op, "ipv4", req, path, (sizeof(devconfs4) / sizeof((devconfs4)[0])), devconfs4, def_conf); } static int ipv6_conf_op(char *tgt, SysctlEntry **conf, int n, int op, SysctlEntry **def_conf) { struct sysctl_req req[(sizeof(devconfs6) / sizeof((devconfs6)[0]))]; char path[(sizeof(devconfs6) / sizeof((devconfs6)[0]))][ # 357 "criu/net.c" 3 4 16 # 357 "criu/net.c" + 60]; return net_conf_op(tgt, conf, n, op, "ipv6", req, path, (sizeof(devconfs6) / sizeof((devconfs6)[0])), devconfs6, def_conf); } static int unix_conf_op(SysctlEntry ***rconf, size_t *n, int op) { int i, ret = -1, flags = 0; char path[(sizeof(unix_conf_entries) / sizeof((unix_conf_entries)[0]))+1][(sizeof("net/unix" "/%s") + 32 - 2)] = {}; struct sysctl_req req[(sizeof(unix_conf_entries) / sizeof((unix_conf_entries)[0]))] = {}; SysctlEntry **conf = *rconf; if (*n != (sizeof(unix_conf_entries) / sizeof((unix_conf_entries)[0]))) { print_on_level((1), "Error (%s:%d): " "net: " "unix: Unexpected entries in config (%zu %zu)\n", "criu/net.c", 370, *n, (sizeof(unix_conf_entries) / sizeof((unix_conf_entries)[0]))); return - # 371 "criu/net.c" 3 4 22 # 371 "criu/net.c" ; } if (opts.weak_sysctls || op == CTL_READ) flags = 1; for (i = 0; i < *n; i++) { snprintf(path[i], (sizeof("net/unix" "/%s") + 32 - 2), "net/unix" "/%s", unix_conf_entries[i]); req[i].name = path[i]; req[i].flags = flags; switch (conf[i]->type) { case SYSCTL_TYPE__CTL_32: req[i].type = 6; req[i].arg = &conf[i]->iarg; break; default: print_on_level((1), "Error (%s:%d): " "net: " "unix: Unknown config type %d\n", "criu/net.c", 388, conf[i]->type); return -1; } } ret = sysctl_op(req, *n, op, # 393 "criu/net.c" 3 4 0x40000000 # 393 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "unix: Failed to %s %s/\n", "criu/net.c", 395, (op == CTL_READ) ? "read" : "write", "net/unix"); return -1; } if (op == CTL_READ) { # 400 "criu/net.c" 3 4 _Bool # 400 "criu/net.c" has_entries = # 400 "criu/net.c" 3 4 0 # 400 "criu/net.c" ; for (i = 0; i < *n; i++) { if (req[i].flags & 2) { conf[i]->has_iarg = # 404 "criu/net.c" 3 4 1 # 404 "criu/net.c" ; if (!has_entries) has_entries = # 406 "criu/net.c" 3 4 1 # 406 "criu/net.c" ; } } if (!has_entries) { *n = 0; *rconf = # 416 "criu/net.c" 3 4 ((void *)0) # 416 "criu/net.c" ; } } return 0; } # 430 "criu/net.c" static int ipv4_conf_op_old(char *tgt, int *conf, int n, int op, int *def_conf) { int i, ri; int ret, flags = op == CTL_READ ? 1 : 0; struct sysctl_req req[(sizeof(devconfs4) / sizeof((devconfs4)[0]))]; char path[(sizeof(devconfs4) / sizeof((devconfs4)[0]))][ # 435 "criu/net.c" 3 4 16 # 435 "criu/net.c" + 60]; if (n > (sizeof(devconfs4) / sizeof((devconfs4)[0]))) print_on_level((2), "Warn (%s:%d): " "net: " "The image contains unknown sysctl-s\n", "criu/net.c", 438); for (i = 0, ri = 0; i < (sizeof(devconfs4) / sizeof((devconfs4)[0])); i++) { if (i >= n) { print_on_level((2), "Warn (%s:%d): " "net: " "Skip %s/%s\n", "criu/net.c", 442, tgt, devconfs4[i]); continue; } if (def_conf && conf[i] == def_conf[i]) { print_on_level((4), "net: " "DEBUG Skip %s/%s, val =%d\n", tgt, devconfs4[i], conf[i]); continue; } if (op == CTL_WRITE && conf[i] == (-1u)) continue; else if (op == CTL_READ) conf[i] = (-1u); snprintf(path[i], # 458 "criu/net.c" 3 4 16 # 458 "criu/net.c" + 60, "net/%s/conf/%s/%s", "ipv4", tgt, devconfs4[i]); req[ri].name = path[i]; req[ri].arg = &conf[i]; req[ri].type = 6; req[ri].flags = flags; ri++; } ret = sysctl_op(req, ri, op, # 466 "criu/net.c" 3 4 0x40000000 # 466 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to %s %s/\n", "criu/net.c", 468, (op == CTL_READ) ? "read" : "write", tgt); return -1; } return 0; } int write_netdev_img(NetDeviceEntry *nde, struct cr_imgset *fds, struct nlattr **info) { return pb_write_one(img_from_set(fds, CR_FD_NETDEV), nde, PB_NETDEV); } static int lookup_net_by_netid(struct ns_id *ns, int net_id) { struct netns_id *p; for (p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = ((&ns->net.ids)->next); (typeof(*p) *)((char *)__mptr - # 483 "criu/net.c" 3 4 __builtin_offsetof ( # 483 "criu/net.c" typeof(*p) # 483 "criu/net.c" 3 4 , # 483 "criu/net.c" node # 483 "criu/net.c" 3 4 ) # 483 "criu/net.c" ); }); &p->node != (&ns->net.ids); p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = (p->node.next); (typeof(*p) *)((char *)__mptr - # 483 "criu/net.c" 3 4 __builtin_offsetof ( # 483 "criu/net.c" typeof(*p) # 483 "criu/net.c" 3 4 , # 483 "criu/net.c" node # 483 "criu/net.c" 3 4 ) # 483 "criu/net.c" ); })) if (p->netnsid_value == net_id) return p->target_ns_id; return -1; } static int dump_one_netdev(int type, struct ifinfomsg *ifi, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds, int (*dump)(NetDeviceEntry *, struct cr_imgset *, struct nlattr **info)) { int ret = -1, i, peer_ifindex; NetDeviceEntry netdev = { # 494 "criu/net.c" 3 4 { # 494 "criu/net.c" &net_device_entry__descriptor # 494 "criu/net.c" 3 4 , 0, ((void *)0) } # 494 "criu/net.c" , ND_TYPE__LOOPBACK, 0, 0, 0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , 0, {0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" }, 0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , 0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , 0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" , 0, 0, 0, 0, 0, 0, # 494 "criu/net.c" 3 4 ((void *)0) # 494 "criu/net.c" }; SysctlEntry *confs4 = # 495 "criu/net.c" 3 4 ((void *)0) # 495 "criu/net.c" ; int size4 = (sizeof(devconfs4) / sizeof((devconfs4)[0])); SysctlEntry *confs6 = # 497 "criu/net.c" 3 4 ((void *)0) # 497 "criu/net.c" ; int size6 = (sizeof(devconfs6) / sizeof((devconfs6)[0])); char stable_secret[200 + 1] = {}; struct nlattr *info[ # 500 "criu/net.c" 3 4 (__IFLA_INFO_MAX - 1) # 500 "criu/net.c" + 1], **arg = # 500 "criu/net.c" 3 4 ((void *)0) # 500 "criu/net.c" ; if (!tb[IFLA_IFNAME]) { print_on_level((1), "Error (%s:%d): " "net: " "No name for link %d\n", "criu/net.c", 503, ifi->ifi_index); return -1; } netdev.type = type; netdev.ifindex = ifi->ifi_index; netdev.mtu = *(int *) # 509 "criu/net.c" 3 4 ((void*)(((char*)( # 509 "criu/net.c" tb[IFLA_MTU] # 509 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 509 "criu/net.c" ; netdev.flags = ifi->ifi_flags; netdev.name = # 511 "criu/net.c" 3 4 ((void*)(((char*)( # 511 "criu/net.c" tb[IFLA_IFNAME] # 511 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 511 "criu/net.c" ; if (kdat.has_nsid) { s32 nsid = -1; peer_ifindex = ifi->ifi_index; if (tb[IFLA_LINK]) peer_ifindex = nla_get_u32(tb[IFLA_LINK]); netdev.has_peer_ifindex = # 520 "criu/net.c" 3 4 1 # 520 "criu/net.c" ; netdev.peer_ifindex = peer_ifindex; if (tb[37]) nsid = nla_get_s32(tb[37]); print_on_level((4), "net: " "The peer link is in the %d netns with the %u index\n", nsid, netdev.peer_ifindex); if (nsid == -1) nsid = ns->id; else nsid = lookup_net_by_netid(ns, nsid); if (nsid < 0) { print_on_level((2), "Warn (%s:%d): " "net: " "The %s veth is in an external netns\n", "criu/net.c", 533, netdev.name); } else { netdev.has_peer_nsid = # 535 "criu/net.c" 3 4 1 # 535 "criu/net.c" ; netdev.peer_nsid = nsid; } } if (tb[IFLA_ADDRESS] && (type != ND_TYPE__LOOPBACK)) { netdev.has_address = # 545 "criu/net.c" 3 4 1 # 545 "criu/net.c" ; netdev.address.data = nla_data(tb[IFLA_ADDRESS]); netdev.address.len = nla_len(tb[IFLA_ADDRESS]); print_on_level((3), "net: " "Found ll addr (%02x:../%d) for %s\n", (int)netdev.address.data[0], (int)netdev.address.len, netdev.name) ; } if (tb[ # 552 "criu/net.c" 3 4 IFLA_MASTER # 552 "criu/net.c" ]) { netdev.has_master = # 553 "criu/net.c" 3 4 1 # 553 "criu/net.c" ; netdev.master = nla_get_u32(tb[ # 554 "criu/net.c" 3 4 IFLA_MASTER # 554 "criu/net.c" ]); } netdev.n_conf4 = size4; netdev.conf4 = ({ void *___p = malloc(sizeof(SysctlEntry *) * size4); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 558, __func__, (long)(sizeof(SysctlEntry *) * size4)); ___p; }); if (!netdev.conf4) goto err_free; confs4 = ({ void *___p = malloc(sizeof(SysctlEntry) * size4); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 562, __func__, (long)(sizeof(SysctlEntry) * size4)); ___p; }); if (!confs4) goto err_free; for (i = 0; i < size4; i++) { sysctl_entry__init(&confs4[i]); netdev.conf4[i] = &confs4[i]; netdev.conf4[i]->type = 6; } netdev.n_conf6 = size6; netdev.conf6 = ({ void *___p = malloc(sizeof(SysctlEntry *) * size6); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 573, __func__, (long)(sizeof(SysctlEntry *) * size6)); ___p; }); if (!netdev.conf6) goto err_free; confs6 = ({ void *___p = malloc(sizeof(SysctlEntry) * size6); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 577, __func__, (long)(sizeof(SysctlEntry) * size6)); ___p; }); if (!confs6) goto err_free; for (i = 0; i < size6; i++) { sysctl_entry__init(&confs6[i]); netdev.conf6[i] = &confs6[i]; if (strcmp(devconfs6[i], "stable_secret")) { netdev.conf6[i]->type = SYSCTL_TYPE__CTL_32; } else { netdev.conf6[i]->type = SYSCTL_TYPE__CTL_STR; netdev.conf6[i]->sarg = stable_secret; } } ret = ipv4_conf_op(netdev.name, netdev.conf4, size4, CTL_READ, # 592 "criu/net.c" 3 4 ((void *)0) # 592 "criu/net.c" ); if (ret < 0) goto err_free; ret = ipv6_conf_op(netdev.name, netdev.conf6, size6, CTL_READ, # 596 "criu/net.c" 3 4 ((void *)0) # 596 "criu/net.c" ); if (ret < 0) goto err_free; if (!dump) dump = write_netdev_img; if (tb[ # 603 "criu/net.c" 3 4 IFLA_LINKINFO # 603 "criu/net.c" ]) { ret = nla_parse_nested(info, # 604 "criu/net.c" 3 4 (__IFLA_INFO_MAX - 1) # 604 "criu/net.c" , tb[ # 604 "criu/net.c" 3 4 IFLA_LINKINFO # 604 "criu/net.c" ], # 604 "criu/net.c" 3 4 ((void *)0) # 604 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "failed to parse nested linkinfo\n", "criu/net.c", 606); return -1; } arg = info; } ret = dump(&netdev, fds, arg); err_free: free(netdev.conf4); free(confs4); free(netdev.conf6); free(confs6); return ret; } static char *link_kind(struct ifinfomsg *ifi, struct nlattr **tb) { struct nlattr *linkinfo[ # 623 "criu/net.c" 3 4 (__IFLA_INFO_MAX - 1) # 623 "criu/net.c" + 1]; if (!tb[ # 625 "criu/net.c" 3 4 IFLA_LINKINFO # 625 "criu/net.c" ]) { print_on_level((1), "Error (%s:%d): " "net: " "No linkinfo for eth link %d\n", "criu/net.c", 626, ifi->ifi_index); return # 627 "criu/net.c" 3 4 ((void *)0) # 627 "criu/net.c" ; } nla_parse_nested(linkinfo, # 630 "criu/net.c" 3 4 (__IFLA_INFO_MAX - 1) # 630 "criu/net.c" , tb[ # 630 "criu/net.c" 3 4 IFLA_LINKINFO # 630 "criu/net.c" ], # 630 "criu/net.c" 3 4 ((void *)0) # 630 "criu/net.c" ); if (!linkinfo[IFLA_INFO_KIND]) { print_on_level((1), "Error (%s:%d): " "net: " "No kind for eth link %d\n", "criu/net.c", 632, ifi->ifi_index); return # 633 "criu/net.c" 3 4 ((void *)0) # 633 "criu/net.c" ; } return nla_data(linkinfo[IFLA_INFO_KIND]); } static int dump_unknown_device(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { int ret; ret = ({ plugin_desc_t *this; int __ret = - # 644 "criu/net.c" 3 4 95 # 644 "criu/net.c" ; for (this = ({ const typeof(((typeof(*this) *)0)->link[CR_PLUGIN_HOOK__DUMP_EXT_LINK]) *__mptr = ((&cr_plugin_ctl.hook_chain[CR_PLUGIN_HOOK__DUMP_EXT_LINK])->next); (typeof(*this) *)((char *)__mptr - # 644 "criu/net.c" 3 4 __builtin_offsetof ( # 644 "criu/net.c" typeof(*this) # 644 "criu/net.c" 3 4 , # 644 "criu/net.c" link[CR_PLUGIN_HOOK__DUMP_EXT_LINK] # 644 "criu/net.c" 3 4 ) # 644 "criu/net.c" ); }); &this->link[CR_PLUGIN_HOOK__DUMP_EXT_LINK] != (&cr_plugin_ctl.hook_chain[CR_PLUGIN_HOOK__DUMP_EXT_LINK]); this = ({ const typeof(((typeof(*this) *)0)->link[CR_PLUGIN_HOOK__DUMP_EXT_LINK]) *__mptr = (this->link[CR_PLUGIN_HOOK__DUMP_EXT_LINK].next); (typeof(*this) *)((char *)__mptr - # 644 "criu/net.c" 3 4 __builtin_offsetof ( # 644 "criu/net.c" typeof(*this) # 644 "criu/net.c" 3 4 , # 644 "criu/net.c" link[CR_PLUGIN_HOOK__DUMP_EXT_LINK] # 644 "criu/net.c" 3 4 ) # 644 "criu/net.c" ); })) { print_on_level((4), "net: " "plugin: `%s' hook %u -> %p\n", this->d->name, CR_PLUGIN_HOOK__DUMP_EXT_LINK, this->d->hooks[CR_PLUGIN_HOOK__DUMP_EXT_LINK]); __ret = ((CR_PLUGIN_HOOK__DUMP_EXT_LINK_t *)this->d->hooks[CR_PLUGIN_HOOK__DUMP_EXT_LINK])( ifi->ifi_index, ifi->ifi_type, kind); if (__ret == - # 644 "criu/net.c" 3 4 95 # 644 "criu/net.c" ) continue; break; } __ret; }); if (ret == 0) return dump_one_netdev(ND_TYPE__EXTLINK, ifi, tb, ns, fds, # 646 "criu/net.c" 3 4 ((void *)0) # 646 "criu/net.c" ); if (ret == - # 648 "criu/net.c" 3 4 95 # 648 "criu/net.c" ) print_on_level((1), "Error (%s:%d): " "net: " "Unsupported link %d (type %d kind %s)\n", "criu/net.c", 649, ifi->ifi_index, ifi->ifi_type, kind); return -1; } static int dump_bridge(NetDeviceEntry *nde, struct cr_imgset *imgset, struct nlattr **info) { return write_netdev_img(nde, imgset, info); } static int dump_macvlan(NetDeviceEntry *nde, struct cr_imgset *imgset, struct nlattr **info) { MacvlanLinkEntry macvlan = { # 660 "criu/net.c" 3 4 { # 660 "criu/net.c" &macvlan_link_entry__descriptor # 660 "criu/net.c" 3 4 , 0, ((void *)0) } # 660 "criu/net.c" , 0, 0, 0 }; int ret; struct nlattr *data[2 + 1]; if (!info || !info[IFLA_INFO_DATA]) { print_on_level((1), "Error (%s:%d): " "net: " "no data for macvlan\n", "criu/net.c", 665); return -1; } ret = nla_parse_nested(data, 2, info[IFLA_INFO_DATA], # 669 "criu/net.c" 3 4 ((void *)0) # 669 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "failed to parse macvlan data\n", "criu/net.c", 671); return -1; } if (!data[IFLA_MACVLAN_MODE]) { print_on_level((1), "Error (%s:%d): " "net: " "macvlan mode required for %s\n", "criu/net.c", 676, nde->name); return -1; } macvlan.mode = *((u32 *) # 680 "criu/net.c" 3 4 ((void*)(((char*)( # 680 "criu/net.c" data[IFLA_MACVLAN_MODE] # 680 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 680 "criu/net.c" ); if (data[2]) macvlan.flags = *((u16 *) # 683 "criu/net.c" 3 4 ((void*)(((char*)( # 683 "criu/net.c" data[2] # 683 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 683 "criu/net.c" ); nde->macvlan = &macvlan; return write_netdev_img(nde, imgset, info); } static int dump_one_ethernet(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { if (!strcmp(kind, "veth")) # 701 "criu/net.c" return dump_one_netdev(ND_TYPE__VETH, ifi, tb, ns, fds, # 701 "criu/net.c" 3 4 ((void *)0) # 701 "criu/net.c" ); if (!strcmp(kind, "tun")) return dump_one_netdev(ND_TYPE__TUN, ifi, tb, ns, fds, dump_tun_link); if (!strcmp(kind, "bridge")) return dump_one_netdev(ND_TYPE__BRIDGE, ifi, tb, ns, fds, dump_bridge); if (!strcmp(kind, "gretap")) { char *name = (char *) # 707 "criu/net.c" 3 4 ((void*)(((char*)( # 707 "criu/net.c" tb[IFLA_IFNAME] # 707 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 707 "criu/net.c" ; if (!name) { print_on_level((1), "Error (%s:%d): " "net: " "gretap %d has no name\n", "criu/net.c", 710, ifi->ifi_index); return -1; } if (!strcmp(name, "gretap0")) { print_on_level((3), "net: " "found %s, ignoring\n", name); return 0; } print_on_level((2), "Warn (%s:%d): " "net: " "GRE tap device %s not supported natively\n", "criu/net.c", 719, name); } if (!strcmp(kind, "macvlan")) return dump_one_netdev(ND_TYPE__MACVLAN, ifi, tb, ns, fds, dump_macvlan); return dump_unknown_device(ifi, kind, tb, ns, fds); } static int dump_one_gendev(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { if (!strcmp(kind, "tun")) return dump_one_netdev(ND_TYPE__TUN, ifi, tb, ns, fds, dump_tun_link); return dump_unknown_device(ifi, kind, tb, ns, fds); } static int dump_one_voiddev(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { if (!strcmp(kind, "venet")) return dump_one_netdev(ND_TYPE__VENET, ifi, tb, ns, fds, # 740 "criu/net.c" 3 4 ((void *)0) # 740 "criu/net.c" ); return dump_unknown_device(ifi, kind, tb, ns, fds); } static int dump_one_gre(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { if (!strcmp(kind, "gre")) { char *name = (char *) # 748 "criu/net.c" 3 4 ((void*)(((char*)( # 748 "criu/net.c" tb[IFLA_IFNAME] # 748 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 748 "criu/net.c" ; if (!name) { print_on_level((1), "Error (%s:%d): " "net: " "gre device %d has no name\n", "criu/net.c", 750, ifi->ifi_index); return -1; } if (!strcmp(name, "gre0")) { print_on_level((3), "net: " "found %s, ignoring\n", name); return 0; } print_on_level((2), "Warn (%s:%d): " "net: " "GRE tunnel device %s not supported natively\n", "criu/net.c", 759, name); } return dump_unknown_device(ifi, kind, tb, ns, fds); } static int dump_sit(NetDeviceEntry *nde, struct cr_imgset *imgset, struct nlattr **info) { int ret; struct nlattr *data[__IFLA_IPTUN_MAX]; SitEntry se = { # 769 "criu/net.c" 3 4 { # 769 "criu/net.c" &sit_entry__descriptor # 769 "criu/net.c" 3 4 , 0, ((void *)0) } # 769 "criu/net.c" , 0, 0, 0, # 769 "criu/net.c" 3 4 ((void *)0) # 769 "criu/net.c" , 0, # 769 "criu/net.c" 3 4 ((void *)0) # 769 "criu/net.c" , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, # 769 "criu/net.c" 3 4 ((void *)0) # 769 "criu/net.c" , 0, 0, 0, # 769 "criu/net.c" 3 4 ((void *)0) # 769 "criu/net.c" }; uint32_t a_local, a_remote, rd_prefix[4], rl_prefix; if (!info || !info[IFLA_INFO_DATA]) { print_on_level((1), "Error (%s:%d): " "net: " "no data for sit\n", "criu/net.c", 774); return -1; } print_on_level((3), "net: " "Some data for SIT provided\n"); ret = nla_parse_nested(data, (__IFLA_IPTUN_MAX - 1), info[IFLA_INFO_DATA], # 779 "criu/net.c" 3 4 ((void *)0) # 779 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "failed to parse sit data\n", "criu/net.c", 781); return -1; } # 793 "criu/net.c" if (data[IFLA_IPTUN_LOCAL]) { a_local = *(u32 *)nla_data(data[IFLA_IPTUN_LOCAL]); if (a_local != 0) { se.n_local = 1; se.local = &a_local; } } if (data[IFLA_IPTUN_REMOTE]) { a_remote = *(u32 *)nla_data(data[IFLA_IPTUN_REMOTE]); if (a_remote != 0) { se.n_remote = 1; se.remote = &a_remote; } } do { if (data[IFLA_IPTUN_LINK]) { se.link = *(u32 *)nla_data(data[IFLA_IPTUN_LINK]); se.has_link = # 809 "criu/net.c" 3 4 1 # 809 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_TTL]) { se.ttl = *(u8 *)nla_data(data[IFLA_IPTUN_TTL]); se.has_ttl = # 810 "criu/net.c" 3 4 1 # 810 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_TOS]) { se.tos = *(u8 *)nla_data(data[IFLA_IPTUN_TOS]); se.has_tos = # 811 "criu/net.c" 3 4 1 # 811 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_FLAGS]) { se.flags = *(u16 *)nla_data(data[IFLA_IPTUN_FLAGS]); se.has_flags = # 812 "criu/net.c" 3 4 1 # 812 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_PROTO]) { se.proto = *(u8 *)nla_data(data[IFLA_IPTUN_PROTO]); se.has_proto = # 813 "criu/net.c" 3 4 1 # 813 "criu/net.c" ; } } while (0); if (data[IFLA_IPTUN_PMTUDISC]) { u8 v; v = *(u8 *)nla_data(data[IFLA_IPTUN_PMTUDISC]); if (v) se.pmtudisc = se.has_pmtudisc = # 820 "criu/net.c" 3 4 1 # 820 "criu/net.c" ; } do { if (data[IFLA_IPTUN_ENCAP_TYPE]) { se.encap_type = *(u16 *)nla_data(data[IFLA_IPTUN_ENCAP_TYPE]); se.has_encap_type = # 823 "criu/net.c" 3 4 1 # 823 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_ENCAP_FLAGS]) { se.encap_flags = *(u16 *)nla_data(data[IFLA_IPTUN_ENCAP_FLAGS]); se.has_encap_flags = # 824 "criu/net.c" 3 4 1 # 824 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_ENCAP_SPORT]) { se.encap_sport = *(u16 *)nla_data(data[IFLA_IPTUN_ENCAP_SPORT]); se.has_encap_sport = # 825 "criu/net.c" 3 4 1 # 825 "criu/net.c" ; } } while (0); do { if (data[IFLA_IPTUN_ENCAP_DPORT]) { se.encap_dport = *(u16 *)nla_data(data[IFLA_IPTUN_ENCAP_DPORT]); se.has_encap_dport = # 826 "criu/net.c" 3 4 1 # 826 "criu/net.c" ; } } while (0); if (data[IFLA_IPTUN_6RD_PREFIXLEN]) { se.rd_prefixlen = *(u16 *)nla_data(data[IFLA_IPTUN_6RD_PREFIXLEN]); if (!se.rd_prefixlen) goto skip; if (!data[IFLA_IPTUN_6RD_PREFIX]) { print_on_level((1), "Error (%s:%d): " "net: " "No 6rd prefix for sit device\n", "criu/net.c", 834); return -1; } se.has_rd_prefixlen = # 838 "criu/net.c" 3 4 1 # 838 "criu/net.c" ; memcpy(&rd_prefix, nla_data(data[IFLA_IPTUN_6RD_PREFIX]), sizeof(rd_prefix)); se.n_rd_prefix = 4; se.rd_prefix = rd_prefix; se.relay_prefixlen = *(u16 *)nla_data(data[IFLA_IPTUN_6RD_RELAY_PREFIXLEN]); if (!se.relay_prefixlen) goto skip; if (!data[IFLA_IPTUN_6RD_RELAY_PREFIX]) { print_on_level((1), "Error (%s:%d): " "net: " "No 6rd relay prefix for sit device\n", "criu/net.c", 848); return -1; } se.has_relay_prefixlen = # 852 "criu/net.c" 3 4 1 # 852 "criu/net.c" ; memcpy(&rl_prefix, nla_data(data[IFLA_IPTUN_6RD_RELAY_PREFIX]), sizeof(rl_prefix)); se.n_relay_prefix = 1; se.relay_prefix = &rl_prefix; skip:; } nde->sit = &se; return write_netdev_img(nde, imgset, info); } static int dump_one_sit(struct ifinfomsg *ifi, char *kind, struct nlattr **tb, struct ns_id *ns, struct cr_imgset *fds) { char *name; if (strcmp(kind, "sit")) { print_on_level((1), "Error (%s:%d): " "net: " "SIT device with %s kind\n", "criu/net.c", 870, kind); return -1; } name = (char *) # 874 "criu/net.c" 3 4 ((void*)(((char*)( # 874 "criu/net.c" tb[IFLA_IFNAME] # 874 "criu/net.c" 3 4 )) + (( ((sizeof(struct rtattr))+4U -1) & ~(4U -1) ) + (0)))) # 874 "criu/net.c" ; if (!name) { print_on_level((1), "Error (%s:%d): " "net: " "sit device %d has no name\n", "criu/net.c", 876, ifi->ifi_index); return -1; } if (!strcmp(name, "sit0")) { print_on_level((3), "net: " "found %s, ignoring\n", name); return 0; } return dump_one_netdev(ND_TYPE__SIT, ifi, tb, ns, fds, dump_sit); } static int list_one_link(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { return 0; } static int dump_one_link(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { struct cr_imgset *fds = arg; struct ifinfomsg *ifi; int ret = 0, len = hdr->nlmsg_len - # 897 "criu/net.c" 3 4 (( # 897 "criu/net.c" sizeof(*ifi) # 897 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 897 "criu/net.c" ; struct nlattr *tb[37 + 1]; char *kind; ifi = # 901 "criu/net.c" 3 4 ((void *)(((char *) # 901 "criu/net.c" hdr # 901 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))) # 901 "criu/net.c" ; if (len < 0) { print_on_level((1), "Error (%s:%d): " "net: " "No iflas for link %d\n", "criu/net.c", 904, ifi->ifi_index); return -1; } nlmsg_parse(hdr, sizeof(struct ifinfomsg), tb, 37, # 908 "criu/net.c" 3 4 ((void *)0) # 908 "criu/net.c" ); print_on_level((3), "net: " "\tLD: Got link %d, type %d\n", ifi->ifi_index, ifi->ifi_type); if (ifi->ifi_type == # 911 "criu/net.c" 3 4 772 # 911 "criu/net.c" ) return dump_one_netdev(ND_TYPE__LOOPBACK, ifi, tb, ns, fds, # 912 "criu/net.c" 3 4 ((void *)0) # 912 "criu/net.c" ); kind = link_kind(ifi, tb); if (!kind) goto unk; switch (ifi->ifi_type) { case # 919 "criu/net.c" 3 4 1 # 919 "criu/net.c" : ret = dump_one_ethernet(ifi, kind, tb, ns, fds); break; case # 922 "criu/net.c" 3 4 0xFFFE # 922 "criu/net.c" : ret = dump_one_gendev(ifi, kind, tb, ns, fds); break; case # 925 "criu/net.c" 3 4 0xFFFF # 925 "criu/net.c" : ret = dump_one_voiddev(ifi, kind, tb, ns, fds); break; case # 928 "criu/net.c" 3 4 778 # 928 "criu/net.c" : ret = dump_one_gre(ifi, kind, tb, ns, fds); break; case # 931 "criu/net.c" 3 4 776 # 931 "criu/net.c" : ret = dump_one_sit(ifi, kind, tb, ns, fds); break; default: unk: ret = dump_unknown_device(ifi, kind, tb, ns, fds); break; } return ret; } static int dump_one_nf(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { struct cr_img *img = arg; if (lazy_image(img) && open_image_lazy(img)) return -1; if (write_img_buf(img, hdr, hdr->nlmsg_len)) return -1; return 0; } static int ct_restore_callback(struct nlmsghdr *nlh) { struct nfgenmsg *msg; struct nlattr *tb[ # 959 "criu/net.c" 3 4 (__CTA_MAX - 1) # 959 "criu/net.c" + 1], *tbp[ # 959 "criu/net.c" 3 4 (__CTA_PROTOINFO_MAX - 1) # 959 "criu/net.c" + 1], *tb_tcp[ # 959 "criu/net.c" 3 4 (__CTA_PROTOINFO_TCP_MAX - 1) # 959 "criu/net.c" + 1]; int err; msg = # 962 "criu/net.c" 3 4 ((void *)(((char *) # 962 "criu/net.c" nlh # 962 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))) # 962 "criu/net.c" ; if (msg->nfgen_family != # 964 "criu/net.c" 3 4 2 # 964 "criu/net.c" && msg->nfgen_family != # 964 "criu/net.c" 3 4 10 # 964 "criu/net.c" ) return 0; err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, # 967 "criu/net.c" 3 4 (__CTA_MAX - 1) # 967 "criu/net.c" , # 967 "criu/net.c" 3 4 ((void *)0) # 967 "criu/net.c" ); if (err < 0) return -1; if (!tb[CTA_PROTOINFO]) return 0; err = nla_parse_nested(tbp, # 974 "criu/net.c" 3 4 (__CTA_PROTOINFO_MAX - 1) # 974 "criu/net.c" , tb[CTA_PROTOINFO], # 974 "criu/net.c" 3 4 ((void *)0) # 974 "criu/net.c" ); if (err < 0) return -1; if (!tbp[CTA_PROTOINFO_TCP]) return 0; err = nla_parse_nested(tb_tcp, # 981 "criu/net.c" 3 4 (__CTA_PROTOINFO_TCP_MAX - 1) # 981 "criu/net.c" , tbp[CTA_PROTOINFO_TCP], # 981 "criu/net.c" 3 4 ((void *)0) # 981 "criu/net.c" ); if (err < 0) return -1; if (tb_tcp[CTA_PROTOINFO_TCP_FLAGS_ORIGINAL]) { struct nf_ct_tcp_flags *flags; flags = nla_data(tb_tcp[CTA_PROTOINFO_TCP_FLAGS_ORIGINAL]); flags->flags |= # 989 "criu/net.c" 3 4 0x08 # 989 "criu/net.c" ; flags->mask |= # 990 "criu/net.c" 3 4 0x08 # 990 "criu/net.c" ; } if (tb_tcp[CTA_PROTOINFO_TCP_FLAGS_REPLY]) { struct nf_ct_tcp_flags *flags; flags = nla_data(tb_tcp[CTA_PROTOINFO_TCP_FLAGS_REPLY]); flags->flags |= # 997 "criu/net.c" 3 4 0x08 # 997 "criu/net.c" ; flags->mask |= # 998 "criu/net.c" 3 4 0x08 # 998 "criu/net.c" ; } return 0; } static int restore_nf_ct(int pid, int type) { struct nlmsghdr *nlh = # 1006 "criu/net.c" 3 4 ((void *)0) # 1006 "criu/net.c" ; int exit_code = -1, sk; struct cr_img *img; img = open_image_at(-1, type, ( # 1010 "criu/net.c" 3 4 00 # 1010 "criu/net.c" ), pid); if (img == # 1011 "criu/net.c" 3 4 ((void *)0) # 1011 "criu/net.c" ) return -1; if (empty_image(img)) { close_image(img); return 0; } sk = socket( # 1018 "criu/net.c" 3 4 16 # 1018 "criu/net.c" , # 1018 "criu/net.c" 3 4 SOCK_RAW # 1018 "criu/net.c" , # 1018 "criu/net.c" 3 4 12 # 1018 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't open rtnl sock for net dump" ": %s\n", "criu/net.c", 1020, strerror( # 1020 "criu/net.c" 3 4 (*__errno_location ()) # 1020 "criu/net.c" )); goto out_img; } nlh = ({ void *___p = malloc(sizeof(struct nlmsghdr)); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 1024, __func__, (long)(sizeof(struct nlmsghdr))); ___p; }); if (nlh == # 1025 "criu/net.c" 3 4 ((void *)0) # 1025 "criu/net.c" ) goto out; while (1) { struct nlmsghdr *p; int ret; ret = read_img_buf_eof(img, nlh, sizeof(struct nlmsghdr)); if (ret < 0) goto out; if (ret == 0) break; p = ({ void *___p = realloc(nlh, nlh->nlmsg_len); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 1038, __func__, (long)(nlh->nlmsg_len)); ___p; }); if (p == # 1039 "criu/net.c" 3 4 ((void *)0) # 1039 "criu/net.c" ) goto out; nlh = p; ret = read_img_buf_eof(img, nlh + 1, nlh->nlmsg_len - sizeof(struct nlmsghdr)); if (ret < 0) goto out; if (ret == 0) { print_on_level((1), "Error (%s:%d): " "net: " "The image file was truncated\n", "criu/net.c", 1047); goto out; } if (type == CR_FD_NETNF_CT) if (ct_restore_callback(nlh)) goto out; nlh->nlmsg_flags = # 1055 "criu/net.c" 3 4 0x01 # 1055 "criu/net.c" | # 1055 "criu/net.c" 3 4 0x04 # 1055 "criu/net.c" | # 1055 "criu/net.c" 3 4 0x400 # 1055 "criu/net.c" ; ret = do_rtnl_req(sk, nlh, nlh->nlmsg_len, # 1056 "criu/net.c" 3 4 ((void *)0) # 1056 "criu/net.c" , # 1056 "criu/net.c" 3 4 ((void *)0) # 1056 "criu/net.c" , # 1056 "criu/net.c" 3 4 ((void *)0) # 1056 "criu/net.c" , # 1056 "criu/net.c" 3 4 ((void *)0) # 1056 "criu/net.c" ); if (ret) goto out; } exit_code = 0; out: free(nlh); close(sk); out_img: close_image(img); return exit_code; } static int dump_nf_ct(struct cr_imgset *fds, int type) { struct cr_img *img; struct { struct nlmsghdr nlh; struct nfgenmsg g; } req; int sk, ret; print_on_level((3), "net: " "Dumping netns links\n"); ret = sk = socket( # 1081 "criu/net.c" 3 4 16 # 1081 "criu/net.c" , # 1081 "criu/net.c" 3 4 SOCK_RAW # 1081 "criu/net.c" , # 1081 "criu/net.c" 3 4 12 # 1081 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't open rtnl sock for net dump" ": %s\n", "criu/net.c", 1083, strerror( # 1083 "criu/net.c" 3 4 (*__errno_location ()) # 1083 "criu/net.c" )); goto out; } memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = sizeof(req); req.nlh.nlmsg_type = ( # 1089 "criu/net.c" 3 4 1 # 1089 "criu/net.c" << 8); if (type == CR_FD_NETNF_CT) req.nlh.nlmsg_type |= IPCTNL_MSG_CT_GET; else if (type == CR_FD_NETNF_EXP) req.nlh.nlmsg_type |= IPCTNL_MSG_EXP_GET; else do { if ((( # 1096 "criu/net.c" 3 4 1 # 1096 "criu/net.c" ))) { print_on_level((1), "Error (%s:%d): " "net: " "BUG at %s:%d\n", "criu/net.c", 1096, "criu/net.c", 1096); raise( # 1096 "criu/net.c" 3 4 6 # 1096 "criu/net.c" ); *(volatile unsigned long *) # 1096 "criu/net.c" 3 4 ((void *)0) # 1096 "criu/net.c" = 0xdead0000 + 1096; __builtin_unreachable(); } } while (0); req.nlh.nlmsg_flags = # 1098 "criu/net.c" 3 4 (0x100|0x200) # 1098 "criu/net.c" | # 1098 "criu/net.c" 3 4 0x01 # 1098 "criu/net.c" ; req.nlh.nlmsg_pid = 0; req.nlh.nlmsg_seq = 24680; req.g.nfgen_family = # 1101 "criu/net.c" 3 4 0 # 1101 "criu/net.c" ; img = img_from_set(fds, type); ret = do_rtnl_req(sk, &req, sizeof(req), dump_one_nf, # 1105 "criu/net.c" 3 4 ((void *)0) # 1105 "criu/net.c" , # 1105 "criu/net.c" 3 4 ((void *)0) # 1105 "criu/net.c" , img); close(sk); out: return ret; } # 1119 "criu/net.c" static int list_links(int rtsk, void *args) { struct { struct nlmsghdr nlh; struct rtgenmsg g; } req; print_on_level((3), "net: " "Dumping netns links\n"); memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = sizeof(req); req.nlh.nlmsg_type = # 1130 "criu/net.c" 3 4 RTM_GETLINK # 1130 "criu/net.c" ; req.nlh.nlmsg_flags = # 1131 "criu/net.c" 3 4 0x100 # 1131 "criu/net.c" | # 1131 "criu/net.c" 3 4 0x200 # 1131 "criu/net.c" | # 1131 "criu/net.c" 3 4 0x01 # 1131 "criu/net.c" ; req.nlh.nlmsg_pid = 0; req.nlh.nlmsg_seq = 24680; req.g.rtgen_family = # 1134 "criu/net.c" 3 4 17 # 1134 "criu/net.c" ; return do_rtnl_req(rtsk, &req, sizeof(req), list_one_link, # 1136 "criu/net.c" 3 4 ((void *)0) # 1136 "criu/net.c" , # 1136 "criu/net.c" 3 4 ((void *)0) # 1136 "criu/net.c" , args); } static int dump_links(int rtsk, struct ns_id *ns, struct cr_imgset *fds) { struct { struct nlmsghdr nlh; struct rtgenmsg g; } req; print_on_level((3), "net: " "Dumping netns links\n"); memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = sizeof(req); req.nlh.nlmsg_type = # 1150 "criu/net.c" 3 4 RTM_GETLINK # 1150 "criu/net.c" ; req.nlh.nlmsg_flags = # 1151 "criu/net.c" 3 4 0x100 # 1151 "criu/net.c" | # 1151 "criu/net.c" 3 4 0x200 # 1151 "criu/net.c" | # 1151 "criu/net.c" 3 4 0x01 # 1151 "criu/net.c" ; req.nlh.nlmsg_pid = 0; req.nlh.nlmsg_seq = 24680; req.g.rtgen_family = # 1154 "criu/net.c" 3 4 17 # 1154 "criu/net.c" ; return do_rtnl_req(rtsk, &req, sizeof(req), dump_one_link, # 1156 "criu/net.c" 3 4 ((void *)0) # 1156 "criu/net.c" , ns, fds); } static int restore_link_cb(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { print_on_level((3), "net: " "Got response on SETLINK.\n"); return 0; } static int restore_newlink_cb(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { print_on_level((3), "net: " "Got response on RTM_NEWLINK.\n"); return 0; } struct newlink_req { struct nlmsghdr h; struct ifinfomsg i; char buf[1024]; }; struct newlink_extras { int link; int target_netns; }; typedef int (*link_info_t)(struct ns_id *ns, struct net_link *, struct newlink_req *); static int populate_newlink_req(struct ns_id *ns, struct newlink_req *req, int msg_type, struct net_link *link, link_info_t link_info, struct newlink_extras *extras) { NetDeviceEntry *nde = link->nde; memset(req, 0, sizeof(*req)); req->h.nlmsg_len = # 1194 "criu/net.c" 3 4 (( # 1194 "criu/net.c" sizeof(struct ifinfomsg) # 1194 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 1194 "criu/net.c" ; req->h.nlmsg_flags = # 1195 "criu/net.c" 3 4 0x01 # 1195 "criu/net.c" | # 1195 "criu/net.c" 3 4 0x04 # 1195 "criu/net.c" | # 1195 "criu/net.c" 3 4 0x400 # 1195 "criu/net.c" ; req->h.nlmsg_type = msg_type; req->h.nlmsg_seq = 24680; req->i.ifi_family = # 1198 "criu/net.c" 3 4 17 # 1198 "criu/net.c" ; if (msg_type == # 1204 "criu/net.c" 3 4 RTM_NEWLINK # 1204 "criu/net.c" ) req->i.ifi_index = nde->ifindex; req->i.ifi_flags = nde->flags; if (extras) { if (extras->link >= 0) addattr_l(&req->h, sizeof(*req), IFLA_LINK, &extras->link, sizeof(extras->link)); if (extras->target_netns >= 0) addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &extras->target_netns, sizeof(extras->target_netns)); } addattr_l(&req->h, sizeof(*req), IFLA_IFNAME, nde->name, strlen(nde->name)); addattr_l(&req->h, sizeof(*req), IFLA_MTU, &nde->mtu, sizeof(nde->mtu)); if (nde->has_address) { print_on_level((4), "net: " "Restore ll addr (%02x:../%d) for device\n", (int)nde->address.data[0], (int)nde->address.len); addattr_l(&req->h, sizeof(*req), IFLA_ADDRESS, nde->address.data, nde->address.len); } if (link_info) { struct rtattr *linkinfo; int ret; linkinfo = ((struct rtattr *)(((void *)(&req->h)) + # 1229 "criu/net.c" 3 4 ( (( # 1229 "criu/net.c" (&req->h)->nlmsg_len # 1229 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1229 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), # 1230 "criu/net.c" 3 4 IFLA_LINKINFO # 1230 "criu/net.c" , # 1230 "criu/net.c" 3 4 ((void *)0) # 1230 "criu/net.c" , 0); ret = link_info(ns, link, req); if (ret < 0) return ret; linkinfo->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1236 "criu/net.c" 3 4 ( (( # 1236 "criu/net.c" (&req->h)->nlmsg_len # 1236 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1236 "criu/net.c" )) - (void *)linkinfo; } return 0; } static int kerndat_newifindex_err_cb(int err, struct ns_id *ns, void *arg) { switch (err) { case - # 1245 "criu/net.c" 3 4 19 # 1245 "criu/net.c" : kdat.has_newifindex = # 1246 "criu/net.c" 3 4 0 # 1246 "criu/net.c" ; break; case - # 1248 "criu/net.c" 3 4 34 # 1248 "criu/net.c" : kdat.has_newifindex = # 1249 "criu/net.c" 3 4 1 # 1249 "criu/net.c" ; break; default: print_on_level((1), "Error (%s:%d): " "net: " "Unexpected error: %d(%s)\n", "criu/net.c", 1252, err, strerror(-err)); break; } return 0; } int kerndat_has_newifindex(void) { struct newlink_req req = {}; int ifindex = -1; int sk, ret; kdat.has_newifindex = # 1264 "criu/net.c" 3 4 0 # 1264 "criu/net.c" ; sk = socket( # 1265 "criu/net.c" 3 4 16 # 1265 "criu/net.c" , # 1265 "criu/net.c" 3 4 SOCK_RAW # 1265 "criu/net.c" , # 1265 "criu/net.c" 3 4 0 # 1265 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create a netlink socket" ": %s\n", "criu/net.c", 1267, strerror( # 1267 "criu/net.c" 3 4 (*__errno_location ()) # 1267 "criu/net.c" )); return -1; } memset(&req, 0, sizeof(req)); req.h.nlmsg_len = # 1272 "criu/net.c" 3 4 (( # 1272 "criu/net.c" sizeof(struct ifinfomsg) # 1272 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 1272 "criu/net.c" ; req.h.nlmsg_flags = # 1273 "criu/net.c" 3 4 0x01 # 1273 "criu/net.c" | # 1273 "criu/net.c" 3 4 0x04 # 1273 "criu/net.c" | # 1273 "criu/net.c" 3 4 0x400 # 1273 "criu/net.c" ; req.h.nlmsg_type = # 1274 "criu/net.c" 3 4 RTM_SETLINK # 1274 "criu/net.c" ; req.h.nlmsg_seq = 24680; req.i.ifi_family = # 1276 "criu/net.c" 3 4 0 # 1276 "criu/net.c" ; addattr_l(&req.h, sizeof(req), 49, &ifindex, sizeof(ifindex)); addattr_l(&req.h, sizeof(req), IFLA_IFNAME, "criu-kdat", 9); ret = do_rtnl_req(sk, &req, sizeof(req), restore_link_cb, kerndat_newifindex_err_cb, # 1286 "criu/net.c" 3 4 ((void *)0) # 1286 "criu/net.c" , # 1286 "criu/net.c" 3 4 ((void *)0) # 1286 "criu/net.c" ); close(sk); return ret; } static int do_rtm_link_req(int msg_type, struct net_link *link, int nlsk, struct ns_id *ns, link_info_t link_info, struct newlink_extras *extras) { struct newlink_req req; if (populate_newlink_req(ns, &req, msg_type, link, link_info, extras) < 0) return -1; return do_rtnl_req(nlsk, &req, req.h.nlmsg_len, restore_link_cb, # 1299 "criu/net.c" 3 4 ((void *)0) # 1299 "criu/net.c" , # 1299 "criu/net.c" 3 4 ((void *)0) # 1299 "criu/net.c" , # 1299 "criu/net.c" 3 4 ((void *)0) # 1299 "criu/net.c" ); } int restore_link_parms(struct net_link *link, int nlsk) { return do_rtm_link_req( # 1304 "criu/net.c" 3 4 RTM_SETLINK # 1304 "criu/net.c" , link, nlsk, # 1304 "criu/net.c" 3 4 ((void *)0) # 1304 "criu/net.c" , # 1304 "criu/net.c" 3 4 ((void *)0) # 1304 "criu/net.c" , # 1304 "criu/net.c" 3 4 ((void *)0) # 1304 "criu/net.c" ); } static int restore_one_link(struct ns_id *ns, struct net_link *link, int nlsk, link_info_t link_info, struct newlink_extras *extras) { print_on_level((3), "net: " "Restoring netdev %s idx %d\n", link->nde->name, link->nde->ifindex); return do_rtm_link_req( # 1311 "criu/net.c" 3 4 RTM_NEWLINK # 1311 "criu/net.c" , link, nlsk, ns, link_info, extras); } struct move_req { struct newlink_req req; char ifnam[ # 1316 "criu/net.c" 3 4 16 # 1316 "criu/net.c" ]; }; static int move_veth_cb(void *arg, int fd, pid_t pid) { int fd_ns_old = -1, ret = -1; struct move_req *mvreq = arg; struct newlink_req *req = &mvreq->req; int ifindex, nlsk; if (!(root_ns_mask & # 1326 "criu/net.c" 3 4 0x10000000 # 1326 "criu/net.c" )) { int fd_ns; fd_ns = get_service_fd(NS_FD_OFF); if (switch_ns_by_fd(fd_ns, &net_ns_desc, &fd_ns_old)) return -1; } ifindex = if_nametoindex(mvreq->ifnam); if (!ifindex) goto out; req->i.ifi_index = ifindex; addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &fd, sizeof(fd)); nlsk = socket( # 1343 "criu/net.c" 3 4 16 # 1343 "criu/net.c" , # 1343 "criu/net.c" 3 4 SOCK_RAW # 1343 "criu/net.c" | # 1343 "criu/net.c" 3 4 SOCK_CLOEXEC # 1343 "criu/net.c" , # 1343 "criu/net.c" 3 4 0 # 1343 "criu/net.c" ); if (nlsk < 0) goto out; ret = do_rtnl_req(nlsk, req, req->h.nlmsg_len, restore_newlink_cb, # 1347 "criu/net.c" 3 4 ((void *)0) # 1347 "criu/net.c" , # 1347 "criu/net.c" 3 4 ((void *)0) # 1347 "criu/net.c" , # 1347 "criu/net.c" 3 4 ((void *)0) # 1347 "criu/net.c" ); close(nlsk); out: if (fd_ns_old >= 0) ret = restore_ns(fd_ns_old, &net_ns_desc); return ret; } static int move_veth(const char *netdev, struct ns_id *ns, struct net_link *link, int nlsk) { NetDeviceEntry *nde = link->nde; struct newlink_req *req; struct move_req mvreq; size_t len_val; int ret; if (!kdat.has_newifindex) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to specify ifindex in the target namespace.\n", "criu/net.c", 1366); return -1; } if (!nde->ifindex) return -1; memset(&mvreq.req, 0, sizeof(mvreq.req)); req = &mvreq.req; req->h.nlmsg_len = # 1381 "criu/net.c" 3 4 (( # 1381 "criu/net.c" sizeof(struct ifinfomsg) # 1381 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 1381 "criu/net.c" ; req->h.nlmsg_flags = # 1382 "criu/net.c" 3 4 0x01 # 1382 "criu/net.c" | # 1382 "criu/net.c" 3 4 0x04 # 1382 "criu/net.c" ; req->h.nlmsg_type = # 1383 "criu/net.c" 3 4 RTM_NEWLINK # 1383 "criu/net.c" ; req->h.nlmsg_seq = 24680; req->i.ifi_family = # 1386 "criu/net.c" 3 4 0 # 1386 "criu/net.c" ; req->i.ifi_flags = nde->flags; addattr_l(&req->h, sizeof(*req), IFLA_IFNAME, nde->name, strlen(nde->name)); addattr_l(&req->h, sizeof(*req), IFLA_MTU, &nde->mtu, sizeof(nde->mtu)); addattr_l(&req->h, sizeof(*req), 49, &nde->ifindex, sizeof(nde->ifindex)); if (nde->has_address) { print_on_level((4), "net: " "Restore ll addr (%02x:../%d) for device with target ifindex %d\n", (int)nde->address.data[0], (int)nde->address.len, nde->ifindex) ; addattr_l(&req->h, sizeof(*req), IFLA_ADDRESS, nde->address.data, nde->address.len); } len_val = strlen(netdev); if (len_val >= # 1405 "criu/net.c" 3 4 16 # 1405 "criu/net.c" ) return -1; __strlcpy(mvreq.ifnam, netdev, # 1407 "criu/net.c" 3 4 16 # 1407 "criu/net.c" ); ret = __userns_call("move_veth_cb", move_veth_cb, 0, &mvreq, sizeof(mvreq), ns->net.ns_fd); if (ret < 0) return -1; link->created = # 1413 "criu/net.c" 3 4 1 # 1413 "criu/net.c" ; return 0; } enum { VETH_INFO_UNSPEC, VETH_INFO_PEER, __VETH_INFO_MAX }; static int veth_peer_info(struct net_link *link, struct newlink_req *req, struct ns_id *ns, int ns_fd) { NetDeviceEntry *nde = link->nde; char key[100], *val; struct ns_id *peer_ns = # 1435 "criu/net.c" 3 4 ((void *)0) # 1435 "criu/net.c" ; snprintf(key, sizeof(key), "veth[%s]", nde->name); val = external_lookup_by_key(key); if (!IS_ERR_OR_NULL(val)) { char *aux; aux = strchrnul(val, '@'); addattr_l(&req->h, sizeof(*req), IFLA_IFNAME, val, aux - val); addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &ns_fd, sizeof(ns_fd)); return 0; } if (nde->has_peer_nsid) { struct net_link *plink; peer_ns = lookup_ns_by_id(nde->peer_nsid, &net_ns_desc); if (!peer_ns) goto out; for (plink = ({ const typeof(((typeof(*plink) *)0)->node) *__mptr = ((&peer_ns->net.links)->next); (typeof(*plink) *)((char *)__mptr - # 1454 "criu/net.c" 3 4 __builtin_offsetof ( # 1454 "criu/net.c" typeof(*plink) # 1454 "criu/net.c" 3 4 , # 1454 "criu/net.c" node # 1454 "criu/net.c" 3 4 ) # 1454 "criu/net.c" ); }); &plink->node != (&peer_ns->net.links); plink = ({ const typeof(((typeof(*plink) *)0)->node) *__mptr = (plink->node.next); (typeof(*plink) *)((char *)__mptr - # 1454 "criu/net.c" 3 4 __builtin_offsetof ( # 1454 "criu/net.c" typeof(*plink) # 1454 "criu/net.c" 3 4 , # 1454 "criu/net.c" node # 1454 "criu/net.c" 3 4 ) # 1454 "criu/net.c" ); })) { if (plink->nde->ifindex == nde->peer_ifindex && plink->created) { req->h.nlmsg_type = # 1456 "criu/net.c" 3 4 RTM_SETLINK # 1456 "criu/net.c" ; return 0; } } } link->created = # 1462 "criu/net.c" 3 4 1 # 1462 "criu/net.c" ; if (peer_ns) { addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &peer_ns->net.ns_fd, sizeof(int)); return 0; } out: print_on_level((1), "Error (%s:%d): " "net: " "Unknown peer net namespace\n", "criu/net.c", 1468); return -1; } static int veth_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { int ns_fd = get_service_fd(NS_FD_OFF); NetDeviceEntry *nde = link->nde; struct rtattr *veth_data, *peer_data; struct ifinfomsg ifm; addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "veth", 4); veth_data = ((struct rtattr *)(((void *)(&req->h)) + # 1481 "criu/net.c" 3 4 ( (( # 1481 "criu/net.c" (&req->h)->nlmsg_len # 1481 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1481 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_DATA, # 1482 "criu/net.c" 3 4 ((void *)0) # 1482 "criu/net.c" , 0); peer_data = ((struct rtattr *)(((void *)(&req->h)) + # 1483 "criu/net.c" 3 4 ( (( # 1483 "criu/net.c" (&req->h)->nlmsg_len # 1483 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1483 "criu/net.c" )); memset(&ifm, 0, sizeof(ifm)); # 1495 "criu/net.c" if (nde->has_peer_nsid) ifm.ifi_index = nde->peer_ifindex; addattr_l(&req->h, sizeof(*req), VETH_INFO_PEER, &ifm, sizeof(ifm)); veth_peer_info(link, req, ns, ns_fd); peer_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1500 "criu/net.c" 3 4 ( (( # 1500 "criu/net.c" (&req->h)->nlmsg_len # 1500 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1500 "criu/net.c" )) - (void *)peer_data; veth_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1501 "criu/net.c" 3 4 ( (( # 1501 "criu/net.c" (&req->h)->nlmsg_len # 1501 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1501 "criu/net.c" )) - (void *)veth_data; return 0; } static int venet_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { int ns_fd = get_service_fd(NS_FD_OFF); struct rtattr *venet_data; do { if (((ns_fd < 0))) { print_on_level((1), "Error (%s:%d): " "net: " "BUG at %s:%d\n", "criu/net.c", 1511, "criu/net.c", 1511); raise( # 1511 "criu/net.c" 3 4 6 # 1511 "criu/net.c" ); *(volatile unsigned long *) # 1511 "criu/net.c" 3 4 ((void *)0) # 1511 "criu/net.c" = 0xdead0000 + 1511; __builtin_unreachable(); } } while (0); venet_data = ((struct rtattr *)(((void *)(&req->h)) + # 1513 "criu/net.c" 3 4 ( (( # 1513 "criu/net.c" (&req->h)->nlmsg_len # 1513 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1513 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "venet", 5); addattr_l(&req->h, sizeof(*req), IFLA_INFO_DATA, # 1515 "criu/net.c" 3 4 ((void *)0) # 1515 "criu/net.c" , 0); addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &ns_fd, sizeof(ns_fd)); venet_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1517 "criu/net.c" 3 4 ( (( # 1517 "criu/net.c" (&req->h)->nlmsg_len # 1517 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1517 "criu/net.c" )) - (void *)venet_data; return 0; } static int bridge_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { struct rtattr *bridge_data; bridge_data = ((struct rtattr *)(((void *)(&req->h)) + # 1526 "criu/net.c" 3 4 ( (( # 1526 "criu/net.c" (&req->h)->nlmsg_len # 1526 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1526 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "bridge", sizeof("bridge")); bridge_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1528 "criu/net.c" 3 4 ( (( # 1528 "criu/net.c" (&req->h)->nlmsg_len # 1528 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1528 "criu/net.c" )) - (void *)bridge_data; return 0; } static int changeflags(int s, char *name, short flags) { struct ifreq ifr; __strlcpy(ifr. # 1537 "criu/net.c" 3 4 ifr_ifrn.ifrn_name # 1537 "criu/net.c" , name, # 1537 "criu/net.c" 3 4 16 # 1537 "criu/net.c" ); ifr. # 1538 "criu/net.c" 3 4 ifr_ifru.ifru_flags # 1538 "criu/net.c" = flags; if (ioctl(s, # 1540 "criu/net.c" 3 4 0x8914 # 1540 "criu/net.c" , &ifr) < 0) { print_on_level((1), "Error (%s:%d): " "net: " "couldn't set flags on %s" ": %s\n", "criu/net.c", 1541, name, strerror( # 1541 "criu/net.c" 3 4 (*__errno_location ()) # 1541 "criu/net.c" )); return -1; } return 0; } static int macvlan_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { struct rtattr *macvlan_data; NetDeviceEntry *nde = link->nde; MacvlanLinkEntry *macvlan = nde->macvlan; if (!macvlan) { print_on_level((1), "Error (%s:%d): " "net: " "Missing macvlan link entry %d\n", "criu/net.c", 1555, nde->ifindex); return -1; } addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "macvlan", 7); macvlan_data = ((struct rtattr *)(((void *)(&req->h)) + # 1561 "criu/net.c" 3 4 ( (( # 1561 "criu/net.c" (&req->h)->nlmsg_len # 1561 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1561 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_DATA, # 1562 "criu/net.c" 3 4 ((void *)0) # 1562 "criu/net.c" , 0); addattr_l(&req->h, sizeof(*req), IFLA_MACVLAN_MODE, &macvlan->mode, sizeof(macvlan->mode)); if (macvlan->has_flags) addattr_l(&req->h, sizeof(*req), 2, &macvlan->flags, sizeof(macvlan->flags)); macvlan_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1569 "criu/net.c" 3 4 ( (( # 1569 "criu/net.c" (&req->h)->nlmsg_len # 1569 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1569 "criu/net.c" )) - (void *)macvlan_data; return 0; } static int userns_restore_one_link(void *arg, int fd, pid_t pid) { int nlsk, ret; struct newlink_req *req = arg; int ns_fd = get_service_fd(NS_FD_OFF), rst = -1; if (!(root_ns_mask & # 1580 "criu/net.c" 3 4 0x10000000 # 1580 "criu/net.c" )) { if (switch_ns_by_fd(ns_fd, &net_ns_desc, &rst)) return -1; } nlsk = socket( # 1585 "criu/net.c" 3 4 16 # 1585 "criu/net.c" , # 1585 "criu/net.c" 3 4 SOCK_RAW # 1585 "criu/net.c" , # 1585 "criu/net.c" 3 4 0 # 1585 "criu/net.c" ); if (nlsk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create nlk socket" ": %s\n", "criu/net.c", 1587, strerror( # 1587 "criu/net.c" 3 4 (*__errno_location ()) # 1587 "criu/net.c" )); ret = -1; goto out; } addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &fd, sizeof(fd)); ret = do_rtnl_req(nlsk, req, req->h.nlmsg_len, restore_link_cb, # 1594 "criu/net.c" 3 4 ((void *)0) # 1594 "criu/net.c" , # 1594 "criu/net.c" 3 4 ((void *)0) # 1594 "criu/net.c" , # 1594 "criu/net.c" 3 4 ((void *)0) # 1594 "criu/net.c" ); close(nlsk); out: if (rst >= 0 && restore_ns(rst, &net_ns_desc) < 0) ret = -1; return ret; } static int restore_one_macvlan(struct ns_id *ns, struct net_link *link, int nlsk) { struct newlink_extras extras = { .link = -1, .target_netns = -1, }; char key[100], *val; int my_netns = -1, ret = -1; NetDeviceEntry *nde = link->nde; snprintf(key, sizeof(key), "macvlan[%s]", nde->name); val = external_lookup_data(key); if (IS_ERR_OR_NULL(val)) { print_on_level((1), "Error (%s:%d): " "net: " "a macvlan parent for %s is required\n", "criu/net.c", 1616, nde->name); return -1; } # 1630 "criu/net.c" extras.link = (int)(unsigned long)val; my_netns = ({ int __fd = do_open_proc(0, # 1632 "criu/net.c" 3 4 00 # 1632 "criu/net.c" , "ns/net"); if (__fd < 0 && ( # 1632 "criu/net.c" 3 4 (*__errno_location ()) # 1632 "criu/net.c" != (0))) print_on_level((1), "Error (%s:%d): " "net: " "Can't open %d/" "ns/net" " on procfs" ": %s\n", "criu/net.c", 1632,0, strerror( # 1632 "criu/net.c" 3 4 (*__errno_location ()) # 1632 "criu/net.c" )); __fd; }); if (my_netns < 0) return -1; { struct newlink_req req; if (populate_newlink_req(ns, &req, # 1639 "criu/net.c" 3 4 RTM_NEWLINK # 1639 "criu/net.c" , link, macvlan_link_info, &extras) < 0) goto out; if (__userns_call("userns_restore_one_link", userns_restore_one_link, 0, &req, sizeof(req), my_netns) < 0) { print_on_level((1), "Error (%s:%d): " "net: " "couldn't restore macvlan interface %s via usernsd\n", "criu/net.c", 1643, nde->name); goto out; } } ret = 0; out: if (my_netns >= 0) close(my_netns); return ret; } static int sit_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { NetDeviceEntry *nde = link->nde; struct rtattr *sit_data; SitEntry *se = nde->sit; if (!se) { print_on_level((1), "Error (%s:%d): " "net: " "Missing sit entry %d\n", "criu/net.c", 1662, nde->ifindex); return -1; } addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "sit", 3); sit_data = ((struct rtattr *)(((void *)(&req->h)) + # 1667 "criu/net.c" 3 4 ( (( # 1667 "criu/net.c" (&req->h)->nlmsg_len # 1667 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1667 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_DATA, # 1668 "criu/net.c" 3 4 ((void *)0) # 1668 "criu/net.c" , 0); # 1679 "criu/net.c" if (se->n_local) { if (se->n_local != 1) { print_on_level((1), "Error (%s:%d): " "net: " "Too long local addr for sit\n", "criu/net.c", 1681); return -1; } addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_LOCAL, se->local, sizeof(u32)); } if (se->n_remote) { if (se->n_remote != 1) { print_on_level((1), "Error (%s:%d): " "net: " "Too long remote addr for sit\n", "criu/net.c", 1689); return -1; } addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_REMOTE, se->remote, sizeof(u32)); } do { u32 aux; if (se->has_link) { aux = se->link; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_LINK, &aux, sizeof(u32)); } } while (0); do { u8 aux; if (se->has_ttl) { aux = se->ttl; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_TTL, &aux, sizeof(u8)); } } while (0); do { u8 aux; if (se->has_tos) { aux = se->tos; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_TOS, &aux, sizeof(u8)); } } while (0); do { u16 aux; if (se->has_flags) { aux = se->flags; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_FLAGS, &aux, sizeof(u16)); } } while (0); do { u8 aux; if (se->has_proto) { aux = se->proto; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_PROTO, &aux, sizeof(u8)); } } while (0); if (se->has_pmtudisc && se->pmtudisc) { u8 aux = 1; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_PMTUDISC, &aux, sizeof(u8)); } do { u16 aux; if (se->has_encap_type) { aux = se->encap_type; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_ENCAP_TYPE, &aux, sizeof(u16)); } } while (0); do { u16 aux; if (se->has_encap_flags) { aux = se->encap_flags; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_ENCAP_FLAGS, &aux, sizeof(u16)); } } while (0); do { u16 aux; if (se->has_encap_sport) { aux = se->encap_sport; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_ENCAP_SPORT, &aux, sizeof(u16)); } } while (0); do { u16 aux; if (se->has_encap_dport) { aux = se->encap_dport; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_ENCAP_DPORT, &aux, sizeof(u16)); } } while (0); if (se->has_rd_prefixlen) { u16 aux; if (se->n_rd_prefix != 4) { print_on_level((1), "Error (%s:%d): " "net: " "Bad 6rd prefixlen for sit\n", "criu/net.c", 1715); return -1; } aux = se->rd_prefixlen; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_6RD_PREFIXLEN, &aux, sizeof(u16)); addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_6RD_PREFIX, se->rd_prefix, 4 * sizeof(u32)); if (!se->has_relay_prefixlen) goto skip; if (se->n_relay_prefix != 1) { print_on_level((1), "Error (%s:%d): " "net: " "Bad 6rd relay prefixlen for sit\n", "criu/net.c", 1727); return -1; } aux = se->relay_prefixlen; addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_6RD_RELAY_PREFIXLEN, &aux, sizeof(u16)); addattr_l(&req->h, sizeof(*req), IFLA_IPTUN_6RD_RELAY_PREFIX, se->relay_prefix, sizeof(u32)); skip:; } sit_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 1739 "criu/net.c" 3 4 ( (( # 1739 "criu/net.c" (&req->h)->nlmsg_len # 1739 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 1739 "criu/net.c" )) - (void *)sit_data; return 0; } static int __restore_link(struct ns_id *ns, struct net_link *link, int nlsk) { NetDeviceEntry *nde = link->nde; char key[100], *val; print_on_level((3), "net: " "Restoring link %s type %d\n", nde->name, nde->type); switch (nde->type) { case ND_TYPE__LOOPBACK: case ND_TYPE__EXTLINK: return restore_link_parms(link, nlsk); case ND_TYPE__VENET: return restore_one_link(ns, link, nlsk, venet_link_info, # 1756 "criu/net.c" 3 4 ((void *)0) # 1756 "criu/net.c" ); case ND_TYPE__VETH: snprintf(key, sizeof(key), "netdev[%s]", nde->name); val = external_lookup_by_key(key); if (!IS_ERR_OR_NULL(val)) return move_veth(val, ns, link, nlsk); return restore_one_link(ns, link, nlsk, veth_link_info, # 1764 "criu/net.c" 3 4 ((void *)0) # 1764 "criu/net.c" ); case ND_TYPE__TUN: return restore_one_tun(ns, link, nlsk); case ND_TYPE__BRIDGE: return restore_one_link(ns, link, nlsk, bridge_link_info, # 1768 "criu/net.c" 3 4 ((void *)0) # 1768 "criu/net.c" ); case ND_TYPE__MACVLAN: return restore_one_macvlan(ns, link, nlsk); case ND_TYPE__SIT: return restore_one_link(ns, link, nlsk, sit_link_info, # 1772 "criu/net.c" 3 4 ((void *)0) # 1772 "criu/net.c" ); default: print_on_level((1), "Error (%s:%d): " "net: " "Unsupported link type %d\n", "criu/net.c", 1774, link->nde->type); break; } return -1; } static int read_links(struct ns_id *ns) { int ret = -1, id = ns->id; struct cr_img *img; NetDeviceEntry *nde; img = open_image_at(-1, CR_FD_NETDEV, ( # 1787 "criu/net.c" 3 4 00 # 1787 "criu/net.c" ), id); if (!img) return -1; while (1) { struct net_link *link; ret = do_pb_read_one(img, (void **)&nde, PB_NETDEV, # 1794 "criu/net.c" 3 4 1 # 1794 "criu/net.c" ); if (ret <= 0) break; link = ({ void *___p = malloc(sizeof(*link)); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 1798, __func__, (long)(sizeof(*link))); ___p; }); if (link == # 1799 "criu/net.c" 3 4 ((void *)0) # 1799 "criu/net.c" ) { ret = -1; net_device_entry__free_unpacked(nde, # 1801 "criu/net.c" 3 4 ((void *)0) # 1801 "criu/net.c" ); break; } link->nde = nde; link->created = 0; list_add(&link->node, &ns->net.links); } close_image(img); return ret; } static int restore_link(int nlsk, struct ns_id *ns, struct net_link *link) { NetDeviceEntry *nde = link->nde; NetnsEntry **def_netns = &ns->net.netns; int ret; ret = __restore_link(ns, link, nlsk); if (ret) { print_on_level((1), "Error (%s:%d): " "net: " "Can't restore link: %d\n", "criu/net.c", 1822, ret); goto exit; } if (nde->type == ND_TYPE__LOOPBACK) def_netns = # 1832 "criu/net.c" 3 4 ((void *)0) # 1832 "criu/net.c" ; if (nde->conf4) ret = ipv4_conf_op(nde->name, nde->conf4, nde->n_conf4, CTL_WRITE, def_netns ? (*def_netns)->def_conf4 : # 1836 "criu/net.c" 3 4 ((void *)0) # 1836 "criu/net.c" ); else if (nde->conf) ret = ipv4_conf_op_old(nde->name, nde->conf, nde->n_conf, CTL_WRITE, def_netns ? (*def_netns)->def_conf : # 1839 "criu/net.c" 3 4 ((void *)0) # 1839 "criu/net.c" ); if (ret) goto exit; if (nde->conf6) ret = ipv6_conf_op(nde->name, nde->conf6, nde->n_conf6, CTL_WRITE, def_netns ? (*def_netns)->def_conf6 : # 1845 "criu/net.c" 3 4 ((void *)0) # 1845 "criu/net.c" ); exit: return ret; } static int restore_master_link(int nlsk, struct ns_id *ns, struct net_link *link) { struct newlink_req req; memset(&req, 0, sizeof(req)); req.h.nlmsg_len = # 1856 "criu/net.c" 3 4 (( # 1856 "criu/net.c" sizeof(struct ifinfomsg) # 1856 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 1856 "criu/net.c" ; req.h.nlmsg_flags = # 1857 "criu/net.c" 3 4 0x01 # 1857 "criu/net.c" | # 1857 "criu/net.c" 3 4 0x04 # 1857 "criu/net.c" | # 1857 "criu/net.c" 3 4 0x400 # 1857 "criu/net.c" ; req.h.nlmsg_type = # 1858 "criu/net.c" 3 4 RTM_SETLINK # 1858 "criu/net.c" ; req.h.nlmsg_seq = 24680; req.i.ifi_family = # 1860 "criu/net.c" 3 4 17 # 1860 "criu/net.c" ; req.i.ifi_index = link->nde->ifindex; req.i.ifi_flags = link->nde->flags; addattr_l(&req.h, sizeof(req), # 1864 "criu/net.c" 3 4 IFLA_MASTER # 1864 "criu/net.c" , &link->nde->master, sizeof(link->nde->master)); return do_rtnl_req(nlsk, &req, req.h.nlmsg_len, restore_link_cb, # 1866 "criu/net.c" 3 4 ((void *)0) # 1866 "criu/net.c" , # 1866 "criu/net.c" 3 4 ((void *)0) # 1866 "criu/net.c" , # 1866 "criu/net.c" 3 4 ((void *)0) # 1866 "criu/net.c" ); } struct net_link *lookup_net_link(struct ns_id *ns, uint32_t ifindex) { struct net_link *link; for (link = ({ const typeof(((typeof(*link) *)0)->node) *__mptr = ((&ns->net.links)->next); (typeof(*link) *)((char *)__mptr - # 1873 "criu/net.c" 3 4 __builtin_offsetof ( # 1873 "criu/net.c" typeof(*link) # 1873 "criu/net.c" 3 4 , # 1873 "criu/net.c" node # 1873 "criu/net.c" 3 4 ) # 1873 "criu/net.c" ); }); &link->node != (&ns->net.links); link = ({ const typeof(((typeof(*link) *)0)->node) *__mptr = (link->node.next); (typeof(*link) *)((char *)__mptr - # 1873 "criu/net.c" 3 4 __builtin_offsetof ( # 1873 "criu/net.c" typeof(*link) # 1873 "criu/net.c" 3 4 , # 1873 "criu/net.c" node # 1873 "criu/net.c" 3 4 ) # 1873 "criu/net.c" ); })) if (link->nde->ifindex == ifindex) return link; return # 1877 "criu/net.c" 3 4 ((void *)0) # 1877 "criu/net.c" ; } static int __restore_links(struct ns_id *nsid, int *nrlinks, int *nrcreated) { struct net_link *link, *t; int ret; for (link = ({ const typeof(((typeof(*link) *)0)->node) *__mptr = ((&nsid->net.links)->next); (typeof(*link) *)((char *)__mptr - # 1885 "criu/net.c" 3 4 __builtin_offsetof ( # 1885 "criu/net.c" typeof(*link) # 1885 "criu/net.c" 3 4 , # 1885 "criu/net.c" node # 1885 "criu/net.c" 3 4 ) # 1885 "criu/net.c" ); }), t = ({ const typeof(((typeof(*link) *)0)->node) *__mptr = (link->node.next); (typeof(*link) *)((char *)__mptr - # 1885 "criu/net.c" 3 4 __builtin_offsetof ( # 1885 "criu/net.c" typeof(*link) # 1885 "criu/net.c" 3 4 , # 1885 "criu/net.c" node # 1885 "criu/net.c" 3 4 ) # 1885 "criu/net.c" ); }); &link->node != (&nsid->net.links); link = t, t = ({ const typeof(((typeof(*t) *)0)->node) *__mptr = (t->node.next); (typeof(*t) *)((char *)__mptr - # 1885 "criu/net.c" 3 4 __builtin_offsetof ( # 1885 "criu/net.c" typeof(*t) # 1885 "criu/net.c" 3 4 , # 1885 "criu/net.c" node # 1885 "criu/net.c" 3 4 ) # 1885 "criu/net.c" ); })) { struct net_link *mlink = # 1886 "criu/net.c" 3 4 ((void *)0) # 1886 "criu/net.c" ; if (link->created) continue; (*nrlinks)++; print_on_level((4), "net: " "Try to restore a link %d:%d:%s\n", nsid->id, link->nde->ifindex, link->nde->name); if (link->nde->has_master) { mlink = lookup_net_link(nsid, link->nde->master); if (mlink == # 1896 "criu/net.c" 3 4 ((void *)0) # 1896 "criu/net.c" ) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to find the %d master\n", "criu/net.c", 1897, link->nde->master); return -1; } if (!mlink->created) { print_on_level((4), "net: " "The master %d:%d:%s isn't created yet", nsid->id, mlink->nde->ifindex, mlink->nde->name) ; continue; } } ret = restore_link(nsid->net.nlsk, nsid, link); if (ret < 0) return -1; if (ret == 0) { (*nrcreated)++; link->created = # 1914 "criu/net.c" 3 4 1 # 1914 "criu/net.c" ; if (mlink && restore_master_link(nsid->net.nlsk, nsid, link)) return -1; } } return 0; } static int restore_links(void) { int nrcreated, nrlinks; struct ns_id *nsid; while ( # 1929 "criu/net.c" 3 4 1 # 1929 "criu/net.c" ) { nrcreated = 0; nrlinks = 0; for (nsid = ns_ids; nsid != # 1932 "criu/net.c" 3 4 ((void *)0) # 1932 "criu/net.c" ; nsid = nsid->next) { if (nsid->nd != &net_ns_desc) continue; if (switch_ns_by_fd(nsid->net.ns_fd, &net_ns_desc, # 1936 "criu/net.c" 3 4 ((void *)0) # 1936 "criu/net.c" )) return -1; if (__restore_links(nsid, &nrlinks, &nrcreated)) return -1; } if (nrcreated == nrlinks) break; if (nrcreated == 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to restore network links\n", "criu/net.c", 1946); return -1; } } return 0; } static int run_ip_tool(char *arg1, char *arg2, char *arg3, char *arg4, int fdin, int fdout, unsigned flags) { char *ip_tool_cmd; int ret; print_on_level((4), "net: " "\tRunning ip %s %s %s %s\n", arg1, arg2, arg3 ?: "", arg4 ?: ""); ip_tool_cmd = getenv("CR_IP_TOOL"); if (!ip_tool_cmd) ip_tool_cmd = "ip"; ret = cr_system(fdin, fdout, -1, ip_tool_cmd, (char *[]){ "ip", arg1, arg2, arg3, arg4, # 1965 "criu/net.c" 3 4 ((void *)0) # 1965 "criu/net.c" }, flags); if (ret) { if (!(flags & 0x1)) print_on_level((1), "Error (%s:%d): " "net: " "IP tool failed on %s %s %s %s\n", "criu/net.c", 1968, arg1, arg2, arg3 ?: "", arg4 ?: ""); return -1; } return 0; } static int run_iptables_tool(char *def_cmd, int fdin, int fdout) { int ret; char *cmd; cmd = getenv("CR_IPTABLES"); if (!cmd) cmd = def_cmd; print_on_level((4), "net: " "\tRunning %s for %s\n", cmd, def_cmd); ret = cr_system(fdin, fdout, -1, "sh", (char *[]){ "sh", "-c", cmd, # 1984 "criu/net.c" 3 4 ((void *)0) # 1984 "criu/net.c" }, 0); if (ret) print_on_level((1), "Error (%s:%d): " "net: " "%s failed\n", "criu/net.c", 1986, def_cmd); return ret; } static inline int dump_ifaddr(struct cr_imgset *fds) { struct cr_img *img = img_from_set(fds, CR_FD_IFADDR); return run_ip_tool("addr", "save", # 1994 "criu/net.c" 3 4 ((void *)0) # 1994 "criu/net.c" , # 1994 "criu/net.c" 3 4 ((void *)0) # 1994 "criu/net.c" , -1, img_raw_fd(img), 0); } static inline int dump_route(struct cr_imgset *fds) { struct cr_img *img; img = img_from_set(fds, CR_FD_ROUTE); if (run_ip_tool("route", "save", # 2002 "criu/net.c" 3 4 ((void *)0) # 2002 "criu/net.c" , # 2002 "criu/net.c" 3 4 ((void *)0) # 2002 "criu/net.c" , -1, img_raw_fd(img), 0)) return -1; if (!kdat.ipv6) return 0; img = img_from_set(fds, CR_FD_ROUTE6); if (run_ip_tool("-6", "route", "save", # 2010 "criu/net.c" 3 4 ((void *)0) # 2010 "criu/net.c" , -1, img_raw_fd(img), 0)) return -1; return 0; } static inline int dump_rule(struct cr_imgset *fds) { struct cr_img *img; char *path; img = img_from_set(fds, CR_FD_RULE); path = ({ void *___p = strdup(img->path); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 2022, __func__, (long)(strlen(img->path) + 1)); ___p; }); if (!path) return -1; if (run_ip_tool("rule", "save", # 2027 "criu/net.c" 3 4 ((void *)0) # 2027 "criu/net.c" , # 2027 "criu/net.c" 3 4 ((void *)0) # 2027 "criu/net.c" , -1, img_raw_fd(img), 0x1)) { print_on_level((2), "Warn (%s:%d): " "net: " "Check if \"ip rule save\" is supported!\n", "criu/net.c", 2028); unlinkat(get_service_fd(IMG_FD_OFF), path, 0); } free(path); return 0; } static inline int dump_iptables(struct cr_imgset *fds) { struct cr_img *img; char *iptables_cmd = "iptables-save"; char *ip6tables_cmd = "ip6tables-save"; # 2054 "criu/net.c" if (!iptables_cmd) { print_on_level((3), "net: " "skipping iptables dump - no legacy version present\n"); } else { img = img_from_set(fds, CR_FD_IPTABLES); if (run_iptables_tool(iptables_cmd, -1, img_raw_fd(img))) return -1; } if (!kdat.ipv6) return 0; if (!ip6tables_cmd) { print_on_level((3), "net: " "skipping ip6tables dump - no legacy version present\n"); } else { img = img_from_set(fds, CR_FD_IP6TABLES); if (run_iptables_tool(ip6tables_cmd, -1, img_raw_fd(img))) return -1; } return 0; } # 2130 "criu/net.c" static int dump_netns_conf(struct ns_id *ns, struct cr_imgset *fds) { void *buf, *o_buf; int ret = -1; int i; NetnsEntry netns = { # 2135 "criu/net.c" 3 4 { # 2135 "criu/net.c" &netns_entry__descriptor # 2135 "criu/net.c" 3 4 , 0, ((void *)0) } # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" , 0, # 2135 "criu/net.c" 3 4 ((void *)0) # 2135 "criu/net.c" }; SysctlEntry *unix_confs = # 2136 "criu/net.c" 3 4 ((void *)0) # 2136 "criu/net.c" ; size_t sizex = (sizeof(unix_conf_entries) / sizeof((unix_conf_entries)[0])); SysctlEntry *def_confs4 = # 2138 "criu/net.c" 3 4 ((void *)0) # 2138 "criu/net.c" , *all_confs4 = # 2138 "criu/net.c" 3 4 ((void *)0) # 2138 "criu/net.c" ; int size4 = (sizeof(devconfs4) / sizeof((devconfs4)[0])); SysctlEntry *def_confs6 = # 2140 "criu/net.c" 3 4 ((void *)0) # 2140 "criu/net.c" , *all_confs6 = # 2140 "criu/net.c" 3 4 ((void *)0) # 2140 "criu/net.c" ; int size6 = (sizeof(devconfs6) / sizeof((devconfs6)[0])); char def_stable_secret[200 + 1] = {}; char all_stable_secret[200 + 1] = {}; NetnsId *ids; struct netns_id *p; i = 0; for (p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = ((&ns->net.ids)->next); (typeof(*p) *)((char *)__mptr - # 2148 "criu/net.c" 3 4 __builtin_offsetof ( # 2148 "criu/net.c" typeof(*p) # 2148 "criu/net.c" 3 4 , # 2148 "criu/net.c" node # 2148 "criu/net.c" 3 4 ) # 2148 "criu/net.c" ); }); &p->node != (&ns->net.ids); p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = (p->node.next); (typeof(*p) *)((char *)__mptr - # 2148 "criu/net.c" 3 4 __builtin_offsetof ( # 2148 "criu/net.c" typeof(*p) # 2148 "criu/net.c" 3 4 , # 2148 "criu/net.c" node # 2148 "criu/net.c" 3 4 ) # 2148 "criu/net.c" ); })) i++; o_buf = buf = ({ void *___p = malloc(i * (sizeof(NetnsId *) + sizeof(NetnsId)) + size4 * (sizeof(SysctlEntry *) + sizeof(SysctlEntry)) * 2 + size6 * (sizeof(SysctlEntry *) + sizeof(SysctlEntry)) * 2 + sizex * (sizeof(SysctlEntry *) + sizeof(SysctlEntry))); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 2151, __func__, (long)(i * (sizeof(NetnsId *) + sizeof(NetnsId)) + size4 * (sizeof(SysctlEntry *) + sizeof(SysctlEntry)) * 2 + size6 * (sizeof(SysctlEntry *) + sizeof(SysctlEntry)) * 2 + sizex * (sizeof(SysctlEntry *) + sizeof(SysctlEntry)))); ___p; }) ; if (!buf) goto out; netns.nsids = xptr_pull_s(&buf, i * sizeof(NetnsId *)); ids = xptr_pull_s(&buf, i * sizeof(NetnsId)); i = 0; for (p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = ((&ns->net.ids)->next); (typeof(*p) *)((char *)__mptr - # 2161 "criu/net.c" 3 4 __builtin_offsetof ( # 2161 "criu/net.c" typeof(*p) # 2161 "criu/net.c" 3 4 , # 2161 "criu/net.c" node # 2161 "criu/net.c" 3 4 ) # 2161 "criu/net.c" ); }); &p->node != (&ns->net.ids); p = ({ const typeof(((typeof(*p) *)0)->node) *__mptr = (p->node.next); (typeof(*p) *)((char *)__mptr - # 2161 "criu/net.c" 3 4 __builtin_offsetof ( # 2161 "criu/net.c" typeof(*p) # 2161 "criu/net.c" 3 4 , # 2161 "criu/net.c" node # 2161 "criu/net.c" 3 4 ) # 2161 "criu/net.c" ); })) { netns_id__init(&ids[i]); ids[i].target_ns_id = p->target_ns_id; ids[i].netnsid_value = p->netnsid_value; netns.nsids[i] = ids + i; i++; } netns.n_nsids = i; netns.n_def_conf4 = size4; netns.n_all_conf4 = size4; netns.def_conf4 = xptr_pull_s(&buf, size4 * sizeof(SysctlEntry *)); netns.all_conf4 = xptr_pull_s(&buf, size4 * sizeof(SysctlEntry *)); def_confs4 = xptr_pull_s(&buf, size4 * sizeof(SysctlEntry)); all_confs4 = xptr_pull_s(&buf, size4 * sizeof(SysctlEntry)); for (i = 0; i < size4; i++) { sysctl_entry__init(&def_confs4[i]); sysctl_entry__init(&all_confs4[i]); netns.def_conf4[i] = &def_confs4[i]; netns.all_conf4[i] = &all_confs4[i]; netns.def_conf4[i]->type = 6; netns.all_conf4[i]->type = 6; } netns.n_def_conf6 = size6; netns.n_all_conf6 = size6; netns.def_conf6 = xptr_pull_s(&buf, size6 * sizeof(SysctlEntry *)); netns.all_conf6 = xptr_pull_s(&buf, size6 * sizeof(SysctlEntry *)); def_confs6 = xptr_pull_s(&buf, size6 * sizeof(SysctlEntry)); all_confs6 = xptr_pull_s(&buf, size6 * sizeof(SysctlEntry)); for (i = 0; i < size6; i++) { sysctl_entry__init(&def_confs6[i]); sysctl_entry__init(&all_confs6[i]); netns.def_conf6[i] = &def_confs6[i]; netns.all_conf6[i] = &all_confs6[i]; if (strcmp(devconfs6[i], "stable_secret")) { netns.def_conf6[i]->type = SYSCTL_TYPE__CTL_32; netns.all_conf6[i]->type = SYSCTL_TYPE__CTL_32; } else { netns.def_conf6[i]->type = SYSCTL_TYPE__CTL_STR; netns.all_conf6[i]->type = SYSCTL_TYPE__CTL_STR; netns.def_conf6[i]->sarg = def_stable_secret; netns.all_conf6[i]->sarg = all_stable_secret; } } netns.n_unix_conf = sizex; netns.unix_conf = xptr_pull_s(&buf, sizex * sizeof(SysctlEntry *)); unix_confs = xptr_pull_s(&buf, sizex * sizeof(SysctlEntry)); for (i = 0; i < sizex; i++) { sysctl_entry__init(&unix_confs[i]); netns.unix_conf[i] = &unix_confs[i]; netns.unix_conf[i]->type = SYSCTL_TYPE__CTL_32; } ret = ipv4_conf_op("default", netns.def_conf4, size4, CTL_READ, # 2219 "criu/net.c" 3 4 ((void *)0) # 2219 "criu/net.c" ); if (ret < 0) goto err_free; ret = ipv4_conf_op("all", netns.all_conf4, size4, CTL_READ, # 2222 "criu/net.c" 3 4 ((void *)0) # 2222 "criu/net.c" ); if (ret < 0) goto err_free; ret = ipv6_conf_op("default", netns.def_conf6, size6, CTL_READ, # 2226 "criu/net.c" 3 4 ((void *)0) # 2226 "criu/net.c" ); if (ret < 0) goto err_free; ret = ipv6_conf_op("all", netns.all_conf6, size6, CTL_READ, # 2229 "criu/net.c" 3 4 ((void *)0) # 2229 "criu/net.c" ); if (ret < 0) goto err_free; ret = unix_conf_op(&netns.unix_conf, &netns.n_unix_conf, CTL_READ); if (ret < 0) goto err_free; ret = pb_write_one(img_from_set(fds, CR_FD_NETNS), &netns, PB_NETNS); err_free: free(o_buf); out: return ret; } static int restore_ip_dump(int type, int pid, char *cmd) { int ret = -1, sockfd, n, written; FILE *tmp_file; struct cr_img *img; char buf[1024]; img = open_image_at(-1, type, ( # 2251 "criu/net.c" 3 4 00 # 2251 "criu/net.c" ), pid); if (empty_image(img)) { close_image(img); return 0; } sockfd = img_raw_fd(img); if (sockfd < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Getting raw FD failed\n", "criu/net.c", 2258); goto out_image; } tmp_file = tmpfile(); if (!tmp_file) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to open tmpfile" ": %s\n", "criu/net.c", 2263, strerror( # 2263 "criu/net.c" 3 4 (*__errno_location ()) # 2263 "criu/net.c" )); goto out_image; } while ((n = read(sockfd, buf, 1024)) > 0) { written = fwrite(buf, sizeof(char), n, tmp_file); if (written < n) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to write to tmpfile " "[written: %d; total: %d]" ": %s\n", "criu/net.c", 2270, written, n, strerror( # 2270 "criu/net.c" 3 4 (*__errno_location ()) # 2270 "criu/net.c" )) ; goto out_tmp_file; } } if (fseek(tmp_file, 0, # 2277 "criu/net.c" 3 4 0 # 2277 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to set file position to beginning of tmpfile" ": %s\n", "criu/net.c", 2278, strerror( # 2278 "criu/net.c" 3 4 (*__errno_location ()) # 2278 "criu/net.c" )); goto out_tmp_file; } if (type == CR_FD_RULE) { run_ip_tool("rule", "flush", # 2287 "criu/net.c" 3 4 ((void *)0) # 2287 "criu/net.c" , # 2287 "criu/net.c" 3 4 ((void *)0) # 2287 "criu/net.c" , -1, -1, 0); run_ip_tool("rule", "delete", "table", "local", -1, -1, 0); } ret = run_ip_tool(cmd, "restore", # 2291 "criu/net.c" 3 4 ((void *)0) # 2291 "criu/net.c" , # 2291 "criu/net.c" 3 4 ((void *)0) # 2291 "criu/net.c" , fileno(tmp_file), -1, 0); out_tmp_file: if (fclose(tmp_file)) { print_on_level((1), "Error (%s:%d): " "net: " "Failed to close tmpfile" ": %s\n", "criu/net.c", 2295, strerror( # 2295 "criu/net.c" 3 4 (*__errno_location ()) # 2295 "criu/net.c" )); } out_image: close_image(img); return ret; } static inline int restore_ifaddr(int pid) { return restore_ip_dump(CR_FD_IFADDR, pid, "addr"); } static inline int restore_route(int pid) { if (restore_ip_dump(CR_FD_ROUTE, pid, "route")) return -1; if (restore_ip_dump(CR_FD_ROUTE6, pid, "route")) return -1; return 0; } static inline int restore_rule(int pid) { return restore_ip_dump(CR_FD_RULE, pid, "rule"); } static int prepare_xtable_lock(void) { int fd; fd = open("/run/xtables.lock", # 2333 "criu/net.c" 3 4 00 # 2333 "criu/net.c" ); if (fd >= 0) { close(fd); return 0; } if (unshare( # 2343 "criu/net.c" 3 4 0x00020000 # 2343 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create a mount namespace" ": %s\n", "criu/net.c", 2344, strerror( # 2344 "criu/net.c" 3 4 (*__errno_location ()) # 2344 "criu/net.c" )); return -1; } if (mount( # 2348 "criu/net.c" 3 4 ((void *)0) # 2348 "criu/net.c" , "/", # 2348 "criu/net.c" 3 4 ((void *)0) # 2348 "criu/net.c" , # 2348 "criu/net.c" 3 4 MS_SLAVE # 2348 "criu/net.c" | # 2348 "criu/net.c" 3 4 MS_REC # 2348 "criu/net.c" , # 2348 "criu/net.c" 3 4 ((void *)0) # 2348 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to convert mounts to slave mounts" ": %s\n", "criu/net.c", 2349, strerror( # 2349 "criu/net.c" 3 4 (*__errno_location ()) # 2349 "criu/net.c" )); return -1; } if (mount("criu-xtable-lock", "/run", "tmpfs", 0, # 2359 "criu/net.c" 3 4 ((void *)0) # 2359 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to mount tmpfs into /run" ": %s\n", "criu/net.c", 2360, strerror( # 2360 "criu/net.c" 3 4 (*__errno_location ()) # 2360 "criu/net.c" )); return -1; } return 0; } static inline int restore_iptables(int pid) { char *iptables_cmd = "iptables-restore"; char *ip6tables_cmd = "ip6tables-restore"; char comm[32]; int ret = -1; struct cr_img *img; # 2382 "criu/net.c" img = open_image_at(-1, CR_FD_IPTABLES, ( # 2382 "criu/net.c" 3 4 00 # 2382 "criu/net.c" ), pid); if (img == # 2383 "criu/net.c" 3 4 ((void *)0) # 2383 "criu/net.c" ) return -1; if (empty_image(img)) { ret = 0; close_image(img); goto ipt6; } if (!iptables_cmd) { print_on_level((1), "Error (%s:%d): " "net: " "Can't restore iptables dump - no legacy version present\n", "criu/net.c", 2392); close_image(img); return -1; } if (snprintf(comm, sizeof(comm), "%s -w", iptables_cmd) >= sizeof(comm)) { print_on_level((1), "Error (%s:%d): " "net: " "Can't fit '%s -w' to buffer\n", "criu/net.c", 2398, iptables_cmd); close_image(img); return -1; } ret = run_iptables_tool(comm, img_raw_fd(img), -1); close_image(img); if (ret) return ret; ipt6: img = open_image_at(-1, CR_FD_IP6TABLES, ( # 2408 "criu/net.c" 3 4 00 # 2408 "criu/net.c" ), pid); if (img == # 2409 "criu/net.c" 3 4 ((void *)0) # 2409 "criu/net.c" ) return -1; if (empty_image(img)) goto out; if (!ip6tables_cmd) { print_on_level((1), "Error (%s:%d): " "net: " "Can't restore ip6tables dump - no legacy version present\n", "criu/net.c", 2415); close_image(img); return -1; } if (snprintf(comm, sizeof(comm), "%s -w", ip6tables_cmd) >= sizeof(comm)) { print_on_level((1), "Error (%s:%d): " "net: " "Can't fit '%s -w' to buffer\n", "criu/net.c", 2421, ip6tables_cmd); close_image(img); return -1; } ret = run_iptables_tool(comm, img_raw_fd(img), -1); out: close_image(img); return ret; } # 2486 "criu/net.c" static inline int restore_nftables(int pid) { int exit_code = -1; struct cr_img *img; img = open_image_at(-1, CR_FD_NFTABLES, ( # 2491 "criu/net.c" 3 4 00 # 2491 "criu/net.c" ), pid); if (img == # 2492 "criu/net.c" 3 4 ((void *)0) # 2492 "criu/net.c" ) return -1; if (empty_image(img)) { print_on_level((3), "net: " "Skipping nft restore, no image\n"); exit_code = 0; goto image_close_out; } print_on_level((1), "Error (%s:%d): " "net: " "Unable to restore nftables. CRIU was built without libnftables support\n", "criu/net.c", 2505); image_close_out: close_image(img); return exit_code; } int read_net_ns_img(void) { struct ns_id *ns; if (!(root_ns_mask & # 2518 "criu/net.c" 3 4 0x40000000 # 2518 "criu/net.c" )) return 0; for (ns = ns_ids; ns != # 2521 "criu/net.c" 3 4 ((void *)0) # 2521 "criu/net.c" ; ns = ns->next) { struct cr_img *img; int ret; if (ns->nd != &net_ns_desc) continue; img = open_image_at(-1, CR_FD_NETNS, ( # 2528 "criu/net.c" 3 4 00 # 2528 "criu/net.c" ), ns->id); if (!img) return -1; if (empty_image(img)) { close_image(img); continue; } ret = do_pb_read_one(img, (void **)&ns->net.netns, PB_NETNS, # 2538 "criu/net.c" 3 4 0 # 2538 "criu/net.c" ); close_image(img); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can not read netns object\n", "criu/net.c", 2541); return -1; } ns->ext_key = ns->net.netns->ext_key; } return 0; } static int restore_netns_conf(struct ns_id *ns) { NetnsEntry *netns = ns->net.netns; int ret = 0; if (ns->net.netns == # 2555 "criu/net.c" 3 4 ((void *)0) # 2555 "criu/net.c" ) goto out; if ((netns)->def_conf4) { ret = ipv4_conf_op("all", (netns)->all_conf4, (netns)->n_all_conf4, CTL_WRITE, # 2560 "criu/net.c" 3 4 ((void *)0) # 2560 "criu/net.c" ); if (ret) goto out; ret = ipv4_conf_op("default", (netns)->def_conf4, (netns)->n_def_conf4, CTL_WRITE, # 2563 "criu/net.c" 3 4 ((void *)0) # 2563 "criu/net.c" ); if (ret) goto out; } else if ((netns)->def_conf) { ret = ipv4_conf_op_old("all", (netns)->all_conf, (netns)->n_all_conf, CTL_WRITE, # 2568 "criu/net.c" 3 4 ((void *)0) # 2568 "criu/net.c" ); if (ret) goto out; ret = ipv4_conf_op_old("default", (netns)->def_conf, (netns)->n_def_conf, CTL_WRITE, # 2571 "criu/net.c" 3 4 ((void *)0) # 2571 "criu/net.c" ); if (ret) goto out; } if ((netns)->def_conf6) { ret = ipv6_conf_op("all", (netns)->all_conf6, (netns)->n_all_conf6, CTL_WRITE, # 2577 "criu/net.c" 3 4 ((void *)0) # 2577 "criu/net.c" ); if (ret) goto out; ret = ipv6_conf_op("default", (netns)->def_conf6, (netns)->n_def_conf6, CTL_WRITE, # 2580 "criu/net.c" 3 4 ((void *)0) # 2580 "criu/net.c" ); } if ((netns)->unix_conf) { ret = unix_conf_op(&(netns)->unix_conf, &(netns)->n_unix_conf, CTL_WRITE); if (ret) goto out; } ns->net.netns = netns; out: return ret; } static int mount_ns_sysfs(void) { char sys_mount[] = "crtools-sys.XXXXXX"; do { if (((ns_sysfs_fd != -1))) { print_on_level((1), "Error (%s:%d): " "net: " "BUG at %s:%d\n", "criu/net.c", 2598, "criu/net.c", 2598); raise( # 2598 "criu/net.c" 3 4 6 # 2598 "criu/net.c" ); *(volatile unsigned long *) # 2598 "criu/net.c" 3 4 ((void *)0) # 2598 "criu/net.c" = 0xdead0000 + 2598; __builtin_unreachable(); } } while (0); if (kdat.has_fsopen) { ns_sysfs_fd = mount_detached_fs("sysfs"); return ns_sysfs_fd >= 0 ? 0 : -1; } if (unshare( # 2609 "criu/net.c" 3 4 0x00020000 # 2609 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create new mount namespace" ": %s\n", "criu/net.c", 2610, strerror( # 2610 "criu/net.c" 3 4 (*__errno_location ()) # 2610 "criu/net.c" )); return -1; } if (mount( # 2614 "criu/net.c" 3 4 ((void *)0) # 2614 "criu/net.c" , "/", # 2614 "criu/net.c" 3 4 ((void *)0) # 2614 "criu/net.c" , # 2614 "criu/net.c" 3 4 MS_SLAVE # 2614 "criu/net.c" | # 2614 "criu/net.c" 3 4 MS_REC # 2614 "criu/net.c" , # 2614 "criu/net.c" 3 4 ((void *)0) # 2614 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Can't mark the root mount as private" ": %s\n", "criu/net.c", 2615, strerror( # 2615 "criu/net.c" 3 4 (*__errno_location ()) # 2615 "criu/net.c" )); return -1; } if (mkdtemp(sys_mount) == # 2619 "criu/net.c" 3 4 ((void *)0) # 2619 "criu/net.c" ) { print_on_level((1), "Error (%s:%d): " "net: " "mkdtemp failed %s" ": %s\n", "criu/net.c", 2620, sys_mount, strerror( # 2620 "criu/net.c" 3 4 (*__errno_location ()) # 2620 "criu/net.c" )); return -1; } print_on_level((3), "net: " "Mount ns' sysfs in %s\n", sys_mount); if (mount("sysfs", sys_mount, "sysfs", # 2629 "criu/net.c" 3 4 0xc0ed0000 # 2629 "criu/net.c" , # 2629 "criu/net.c" 3 4 ((void *)0) # 2629 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "mount failed" ": %s\n", "criu/net.c", 2630, strerror( # 2630 "criu/net.c" 3 4 (*__errno_location ()) # 2630 "criu/net.c" )); rmdir(sys_mount); return -1; } ns_sysfs_fd = open_detach_mount(sys_mount); return ns_sysfs_fd >= 0 ? 0 : -1; } struct net_id_arg { struct ns_id *ns; int sk; }; static int collect_netns_id(struct ns_id *ns, void *oarg) { struct net_id_arg *arg = oarg; struct netns_id *netns_id; int nsid = -1; if (net_get_nsid(arg->sk, ns->ns_pid, &nsid)) return -1; if (nsid == -1) return 0; netns_id = ({ void *___p = malloc(sizeof(*netns_id)); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 2656, __func__, (long)(sizeof(*netns_id))); ___p; }); if (!netns_id) return -1; print_on_level((4), "net: " "Found the %d id for %d in %d\n", nsid, ns->id, arg->ns->id); netns_id->target_ns_id = ns->id; netns_id->netnsid_value = nsid; list_add(&netns_id->node, &arg->ns->net.ids); return 0; } static int dump_netns_ids(int rtsk, struct ns_id *ns) { struct net_id_arg arg = { .ns = ns, .sk = rtsk, }; return walk_namespaces(&net_ns_desc, collect_netns_id, (void *)&arg); } int net_set_ext(struct ns_id *ns) { int fd, ret; fd = inherit_fd_lookup_id(ns->ext_key); if (fd < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to find an external netns: %s\n", "criu/net.c", 2684, ns->ext_key); return -1; } ret = switch_ns_by_fd(fd, &net_ns_desc, # 2688 "criu/net.c" 3 4 ((void *)0) # 2688 "criu/net.c" ); close(fd); return ret; } int dump_net_ns(struct ns_id *ns) { struct cr_imgset *fds; int ret; fds = cr_imgset_open_range(ns->id, _CR_FD_NETNS_FROM, _CR_FD_NETNS_TO, ( # 2699 "criu/net.c" 3 4 01 # 2699 "criu/net.c" | # 2699 "criu/net.c" 3 4 0100 # 2699 "criu/net.c" | # 2699 "criu/net.c" 3 4 01000 # 2699 "criu/net.c" )); if (fds == # 2700 "criu/net.c" 3 4 ((void *)0) # 2700 "criu/net.c" ) return -1; ret = mount_ns_sysfs(); if (ns->ext_key) { NetnsEntry netns = { # 2705 "criu/net.c" 3 4 { # 2705 "criu/net.c" &netns_entry__descriptor # 2705 "criu/net.c" 3 4 , 0, ((void *)0) } # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" , 0, # 2705 "criu/net.c" 3 4 ((void *)0) # 2705 "criu/net.c" }; netns.ext_key = ns->ext_key; ret = pb_write_one(img_from_set(fds, CR_FD_NETNS), &netns, PB_NETNS); if (ret) goto out; } else if (!(opts.empty_ns & # 2711 "criu/net.c" 3 4 0x40000000 # 2711 "criu/net.c" )) { int sk; sk = socket( # 2714 "criu/net.c" 3 4 16 # 2714 "criu/net.c" , # 2714 "criu/net.c" 3 4 SOCK_RAW # 2714 "criu/net.c" , # 2714 "criu/net.c" 3 4 0 # 2714 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't open rtnl sock for net dump" ": %s\n", "criu/net.c", 2716, strerror( # 2716 "criu/net.c" 3 4 (*__errno_location ()) # 2716 "criu/net.c" )); ret = -1; } # 2727 "criu/net.c" if (!ret) ret = list_links(sk, # 2728 "criu/net.c" 3 4 ((void *)0) # 2728 "criu/net.c" ); if (!ret) ret = dump_netns_ids(sk, ns); if (!ret) ret = dump_links(sk, ns, fds); close_safe(&sk); if (!ret) ret = dump_ifaddr(fds); if (!ret) ret = dump_route(fds); if (!ret) ret = dump_rule(fds); if (!ret) ret = dump_iptables(fds); if (!ret) ret = dump_netns_conf(ns, fds); } else if (ns->type != NS_ROOT) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to dump more than one netns if the --emptyns is set\n", "criu/net.c", 2751); ret = -1; } if (!ret) ret = dump_nf_ct(fds, CR_FD_NETNF_CT); if (!ret) ret = dump_nf_ct(fds, CR_FD_NETNF_EXP); out: close(ns_sysfs_fd); ns_sysfs_fd = -1; close_cr_imgset(&fds); return ret; } static int net_set_nsid(int rtsk, int fd, int nsid); static int restore_netns_ids(struct ns_id *ns) { int i, sk, exit_code = -1; if (!ns->net.netns) return 0; sk = socket( # 2775 "criu/net.c" 3 4 16 # 2775 "criu/net.c" , # 2775 "criu/net.c" 3 4 SOCK_RAW # 2775 "criu/net.c" , # 2775 "criu/net.c" 3 4 0 # 2775 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't open rtnl sock for net dump" ": %s\n", "criu/net.c", 2777, strerror( # 2777 "criu/net.c" 3 4 (*__errno_location ()) # 2777 "criu/net.c" )); return -1; } for (i = 0; i < ns->net.netns->n_nsids; i++) { struct ns_id *tg_ns; struct netns_id *id; id = ({ void *___p = malloc(sizeof(*id)); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 2785, __func__, (long)(sizeof(*id))); ___p; }); if (!id) goto out; id->target_ns_id = ns->net.netns->nsids[i]->target_ns_id; id->netnsid_value = ns->net.netns->nsids[i]->netnsid_value; list_add(&id->node, &ns->net.ids); tg_ns = lookup_ns_by_id(id->target_ns_id, &net_ns_desc); if (tg_ns == # 2793 "criu/net.c" 3 4 ((void *)0) # 2793 "criu/net.c" ) { print_on_level((1), "Error (%s:%d): " "net: " "Unknown namespace: %d\n", "criu/net.c", 2794, id->target_ns_id); goto out; } if (net_set_nsid(sk, tg_ns->net.ns_fd, id->netnsid_value)) goto out; } exit_code = 0; out: close(sk); return exit_code; } static int prepare_net_ns_first_stage(struct ns_id *ns) { int ret = 0; if (ns->ext_key || (opts.empty_ns & # 2813 "criu/net.c" 3 4 0x40000000 # 2813 "criu/net.c" )) return 0; ret = restore_netns_conf(ns); if (!ret) ret = restore_netns_ids(ns); if (!ret) ret = read_links(ns); return ret; } static int prepare_net_ns_second_stage(struct ns_id *ns) { int ret = 0, nsid = ns->id; if (!(opts.empty_ns & # 2829 "criu/net.c" 3 4 0x40000000 # 2829 "criu/net.c" ) && !ns->ext_key) { if (ns->net.netns) netns_entry__free_unpacked(ns->net.netns, # 2831 "criu/net.c" 3 4 ((void *)0) # 2831 "criu/net.c" ); if (!ret) ret = restore_ifaddr(nsid); if (!ret) ret = restore_route(nsid); if (!ret) ret = restore_rule(nsid); if (!ret) ret = restore_iptables(nsid); if (!ret) ret = restore_nftables(nsid); } if (!ret) ret = restore_nf_ct(nsid, CR_FD_NETNF_CT); if (!ret) ret = restore_nf_ct(nsid, CR_FD_NETNF_EXP); if (!ret) { int fd = ns->net.ns_fd; ns->net.nsfd_id = fdstore_add(fd); if (ns->net.nsfd_id < 0) ret = -1; close(fd); } ns->ns_populated = # 2859 "criu/net.c" 3 4 1 # 2859 "criu/net.c" ; return ret; } static int open_net_ns(struct ns_id *nsid) { int fd; fd = ({ int __fd = do_open_proc(0, # 2869 "criu/net.c" 3 4 00 # 2869 "criu/net.c" , "ns/net"); if (__fd < 0 && ( # 2869 "criu/net.c" 3 4 (*__errno_location ()) # 2869 "criu/net.c" != (0))) print_on_level((1), "Error (%s:%d): " "net: " "Can't open %d/" "ns/net" " on procfs" ": %s\n", "criu/net.c", 2869,0, strerror( # 2869 "criu/net.c" 3 4 (*__errno_location ()) # 2869 "criu/net.c" )); __fd; }); if (fd < 0) return -1; nsid->net.ns_fd = fd; return 0; } static int do_create_net_ns(struct ns_id *ns) { int ret; if (ns->ext_key) ret = net_set_ext(ns); else ret = unshare( # 2884 "criu/net.c" 3 4 0x40000000 # 2884 "criu/net.c" ); if (ret) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create a new netns" ": %s\n", "criu/net.c", 2887, strerror( # 2887 "criu/net.c" 3 4 (*__errno_location ()) # 2887 "criu/net.c" )); return -1; } if (open_net_ns(ns)) return -1; return 0; } static int __prepare_net_namespaces(void *unused) { struct ns_id *nsid; int root_ns; if (prepare_xtable_lock()) return -1; root_ns = ({ int __fd = do_open_proc(0, # 2903 "criu/net.c" 3 4 00 # 2903 "criu/net.c" , "ns/net"); if (__fd < 0 && ( # 2903 "criu/net.c" 3 4 (*__errno_location ()) # 2903 "criu/net.c" != (0))) print_on_level((1), "Error (%s:%d): " "net: " "Can't open %d/" "ns/net" " on procfs" ": %s\n", "criu/net.c", 2903,0, strerror( # 2903 "criu/net.c" 3 4 (*__errno_location ()) # 2903 "criu/net.c" )); __fd; }); if (root_ns < 0) return -1; for (nsid = ns_ids; nsid != # 2908 "criu/net.c" 3 4 ((void *)0) # 2908 "criu/net.c" ; nsid = nsid->next) { if (nsid->nd != &net_ns_desc) continue; if (nsid->type == NS_ROOT) { nsid->net.ns_fd = root_ns; } else { if (do_create_net_ns(nsid)) goto err; } } for (nsid = ns_ids; nsid != # 2920 "criu/net.c" 3 4 ((void *)0) # 2920 "criu/net.c" ; nsid = nsid->next) { if (nsid->nd != &net_ns_desc) continue; if (switch_ns_by_fd(nsid->net.ns_fd, &net_ns_desc, # 2924 "criu/net.c" 3 4 ((void *)0) # 2924 "criu/net.c" )) goto err; if (prepare_net_ns_first_stage(nsid)) goto err; nsid->net.nlsk = socket( # 2930 "criu/net.c" 3 4 16 # 2930 "criu/net.c" , # 2930 "criu/net.c" 3 4 SOCK_RAW # 2930 "criu/net.c" , # 2930 "criu/net.c" 3 4 0 # 2930 "criu/net.c" ); if (nsid->net.nlsk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create nlk socket" ": %s\n", "criu/net.c", 2932, strerror( # 2932 "criu/net.c" 3 4 (*__errno_location ()) # 2932 "criu/net.c" )); goto err; } } if (restore_links()) goto err; for (nsid = ns_ids; nsid != # 2940 "criu/net.c" 3 4 ((void *)0) # 2940 "criu/net.c" ; nsid = nsid->next) { if (nsid->nd != &net_ns_desc) continue; if (switch_ns_by_fd(nsid->net.ns_fd, &net_ns_desc, # 2944 "criu/net.c" 3 4 ((void *)0) # 2944 "criu/net.c" )) goto err; if (prepare_net_ns_second_stage(nsid)) goto err; close_safe(&nsid->net.nlsk); } close_service_fd(NS_FD_OFF); return 0; err: return -1; } int prepare_net_namespaces(void) { if (!(root_ns_mask & # 2962 "criu/net.c" 3 4 0x40000000 # 2962 "criu/net.c" )) return 0; return call_in_child_process(__prepare_net_namespaces, # 2965 "criu/net.c" 3 4 ((void *)0) # 2965 "criu/net.c" ); } static int do_restore_task_net_ns(struct ns_id *nsid, struct pstree_item *current) { int fd; if (!(root_ns_mask & # 2972 "criu/net.c" 3 4 0x40000000 # 2972 "criu/net.c" )) return 0; fd = fdstore_get(nsid->net.nsfd_id); if (fd < 0) return -1; if (setns(fd, # 2979 "criu/net.c" 3 4 0x40000000 # 2979 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Can't restore netns" ": %s\n", "criu/net.c", 2980, strerror( # 2980 "criu/net.c" 3 4 (*__errno_location ()) # 2980 "criu/net.c" )); close(fd); return -1; } close(fd); return 0; } int restore_task_net_ns(struct pstree_item *current) { if (current->ids && current->ids->has_net_ns_id) { unsigned int id = current->ids->net_ns_id; struct ns_id *nsid; nsid = lookup_ns_by_id(id, &net_ns_desc); if (nsid == # 2996 "criu/net.c" 3 4 ((void *)0) # 2996 "criu/net.c" ) { print_on_level((1), "Error (%s:%d): " "net: " "Can't find mount namespace %d\n", "criu/net.c", 2997, id); return -1; } do { if (((nsid->type == NS_CRIU))) { print_on_level((1), "Error (%s:%d): " "net: " "BUG at %s:%d\n", "criu/net.c", 3001, "criu/net.c", 3001); raise( # 3001 "criu/net.c" 3 4 6 # 3001 "criu/net.c" ); *(volatile unsigned long *) # 3001 "criu/net.c" 3 4 ((void *)0) # 3001 "criu/net.c" = 0xdead0000 + 3001; __builtin_unreachable(); } } while (0); if (do_restore_task_net_ns(nsid, current)) return -1; } return 0; } int netns_keep_nsfd(void) { int ns_fd, ret; if (!(root_ns_mask & # 3014 "criu/net.c" 3 4 0x40000000 # 3014 "criu/net.c" )) return 0; ns_fd = ({ int __fd = do_open_proc(0, # 3023 "criu/net.c" 3 4 00 # 3023 "criu/net.c" | # 3023 "criu/net.c" 3 4 02000000 # 3023 "criu/net.c" , "ns/net"); if (__fd < 0 && ( # 3023 "criu/net.c" 3 4 (*__errno_location ()) # 3023 "criu/net.c" != (0))) print_on_level((1), "Error (%s:%d): " "net: " "Can't open %d/" "ns/net" " on procfs" ": %s\n", "criu/net.c", 3023,0, strerror( # 3023 "criu/net.c" 3 4 (*__errno_location ()) # 3023 "criu/net.c" )); __fd; }); if (ns_fd < 0) return -1; ret = install_service_fd(NS_FD_OFF, ns_fd); if (ret < 0) print_on_level((1), "Error (%s:%d): " "net: " "Can't install ns net reference\n", "criu/net.c", 3029); else print_on_level((3), "net: " "Saved netns fd for links restore\n"); return ret >= 0 ? 0 : -1; } # 3043 "criu/net.c" static int iptables_restore( # 3043 "criu/net.c" 3 4 _Bool # 3043 "criu/net.c" ipv6, char *buf, int size) { int pfd[2], ret = -1; char *cmd4[] = { "iptables-restore", "-w", "--noflush", # 3046 "criu/net.c" 3 4 ((void *)0) # 3046 "criu/net.c" }; char *cmd6[] = { "ip6tables-restore", "-w", "--noflush", # 3047 "criu/net.c" 3 4 ((void *)0) # 3047 "criu/net.c" }; char **cmd = ipv6 ? cmd6 : cmd4; if (pipe(pfd) < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create pipe" ": %s\n", "criu/net.c", 3051, strerror( # 3051 "criu/net.c" 3 4 (*__errno_location ()) # 3051 "criu/net.c" )); return -1; } if (write(pfd[1], buf, size) < size) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to write iptables configugration" ": %s\n", "criu/net.c", 3056, strerror( # 3056 "criu/net.c" 3 4 (*__errno_location ()) # 3056 "criu/net.c" )); goto err; } close_safe(&pfd[1]); ret = cr_system(pfd[0], -1, -1, cmd[0], cmd, 0); err: close_safe(&pfd[1]); close_safe(&pfd[0]); return ret; } static inline int nftables_lock_network_internal(void) { # 3115 "criu/net.c" print_on_level((1), "Error (%s:%d): " "net: " "CRIU was built without libnftables support\n", "criu/net.c", 3115); return -1; } static int iptables_network_lock_internal(void) { char conf[] = "*filter\n" ":CRIU - [0:0]\n" "-I INPUT -j CRIU\n" "-I OUTPUT -j CRIU\n" "-A CRIU -m mark --mark " "0xC114" " -j ACCEPT\n" "-A CRIU -j DROP\n" "COMMIT\n"; int ret = 0; ret |= iptables_restore( # 3131 "criu/net.c" 3 4 0 # 3131 "criu/net.c" , conf, sizeof(conf) - 1); if (kdat.ipv6) ret |= iptables_restore( # 3133 "criu/net.c" 3 4 1 # 3133 "criu/net.c" , conf, sizeof(conf) - 1); if (ret) print_on_level((1), "Error (%s:%d): " "net: " "Locking network failed: iptables-restore returned %d. " "This may be connected to disabled " "CONFIG_NETFILTER_XT_MARK kernel build config " "option.\n", "criu/net.c", 3136, ret) ; return ret; } int network_lock_internal(void) { int ret = 0, nsret; if (opts.network_lock_method == NETWORK_LOCK_SKIP) return 0; if (switch_ns(root_item->pid->real, &net_ns_desc, &nsret)) return -1; if (opts.network_lock_method == NETWORK_LOCK_IPTABLES) ret = iptables_network_lock_internal(); else if (opts.network_lock_method == NETWORK_LOCK_NFTABLES) ret = nftables_lock_network_internal(); if (restore_ns(nsret, &net_ns_desc)) ret = -1; return ret; } static inline int nftables_network_unlock(void) { # 3188 "criu/net.c" print_on_level((1), "Error (%s:%d): " "net: " "CRIU was built without libnftables support\n", "criu/net.c", 3188); return -1; } static # 3193 "criu/net.c" 3 4 _Bool # 3193 "criu/net.c" iptables_has_criu_jump_target(void) { int fd, ret; char *argv[4] = { "sh", "-c", "iptables -C INPUT -j CRIU", # 3196 "criu/net.c" 3 4 ((void *)0) # 3196 "criu/net.c" }; fd = open("/dev/null", # 3198 "criu/net.c" 3 4 02 # 3198 "criu/net.c" ); if (fd < 0) { fd = -1; print_on_level((1), "Error (%s:%d): " "net: " "failed to open /dev/null, using log fd" ": %s\n", "criu/net.c", 3201, strerror( # 3201 "criu/net.c" 3 4 (*__errno_location ()) # 3201 "criu/net.c" )); } ret = cr_system(fd, fd, fd, "sh", argv, 0x1); close_safe(&fd); return !ret; } static int iptables_network_unlock_internal(void) { char delete_jump_targets[] = "*filter\n" ":CRIU - [0:0]\n" "-D INPUT -j CRIU\n" "-D OUTPUT -j CRIU\n" "COMMIT\n"; char delete_criu_chain[] = "*filter\n" ":CRIU - [0:0]\n" "-X CRIU\n" "COMMIT\n"; int ret = 0; ret |= iptables_restore( # 3224 "criu/net.c" 3 4 0 # 3224 "criu/net.c" , delete_jump_targets, sizeof(delete_jump_targets) - 1); if (kdat.ipv6) ret |= iptables_restore( # 3226 "criu/net.c" 3 4 1 # 3226 "criu/net.c" , delete_jump_targets, sizeof(delete_jump_targets) - 1); if (iptables_has_criu_jump_target()) { ret |= iptables_restore( # 3232 "criu/net.c" 3 4 0 # 3232 "criu/net.c" , delete_jump_targets, sizeof(delete_jump_targets) - 1); if (kdat.ipv6) ret |= iptables_restore( # 3234 "criu/net.c" 3 4 1 # 3234 "criu/net.c" , delete_jump_targets, sizeof(delete_jump_targets) - 1); } ret |= iptables_restore( # 3237 "criu/net.c" 3 4 0 # 3237 "criu/net.c" , delete_criu_chain, sizeof(delete_criu_chain) - 1); if (kdat.ipv6) ret |= iptables_restore( # 3239 "criu/net.c" 3 4 1 # 3239 "criu/net.c" , delete_criu_chain, sizeof(delete_criu_chain) - 1); return ret; } static int network_unlock_internal(void) { int ret = 0, nsret; if (opts.network_lock_method == NETWORK_LOCK_SKIP) return 0; if (switch_ns(root_item->pid->real, &net_ns_desc, &nsret)) return -1; if (opts.network_lock_method == NETWORK_LOCK_IPTABLES) ret = iptables_network_unlock_internal(); else if (opts.network_lock_method == NETWORK_LOCK_NFTABLES) ret = nftables_network_unlock(); if (restore_ns(nsret, &net_ns_desc)) ret = -1; return ret; } int network_lock(void) { print_on_level((3), "net: " "Lock network\n"); if (!(root_ns_mask & # 3270 "criu/net.c" 3 4 0x40000000 # 3270 "criu/net.c" )) { if (opts.network_lock_method == NETWORK_LOCK_NFTABLES) nftables_init_connection_lock(); return 0; } if (run_scripts(ACT_NET_LOCK)) return -1; return network_lock_internal(); } void network_unlock(void) { print_on_level((3), "net: " "Unlock network\n"); cpt_unlock_tcp_connections(); rst_unlock_tcp_connections(); if (root_ns_mask & # 3289 "criu/net.c" 3 4 0x40000000 # 3289 "criu/net.c" ) { run_scripts(ACT_NET_UNLOCK); network_unlock_internal(); } else if (opts.network_lock_method == NETWORK_LOCK_NFTABLES) { nftables_network_unlock(); } } int veth_pair_add(char *in, char *out) { __attribute__((cleanup(cleanup_freep))) char *e_str = # 3300 "criu/net.c" 3 4 ((void *)0) # 3300 "criu/net.c" ; e_str = ({ void *___p = malloc(200); if (!___p) print_on_level((1), "Error (%s:%d): " "net: " "%s: Can't allocate %li bytes\n", "criu/net.c", 3302, __func__, (long)(200)); ___p; }); if (!e_str) return -1; snprintf(e_str, 200, "veth[%s]:%s", in, out); return add_external(e_str); } int macvlan_ext_add(struct external *ext) { ext->data = (void *)(unsigned long)if_nametoindex(external_val(ext)); if (ext->data == 0) { print_on_level((1), "Error (%s:%d): " "net: " "can't get ifindex of %s" ": %s\n", "criu/net.c", 3313, ext->id, strerror( # 3313 "criu/net.c" 3 4 (*__errno_location ()) # 3313 "criu/net.c" )); return -1; } return 0; } # 3330 "criu/net.c" static int prep_ns_sockets(struct ns_id *ns, # 3330 "criu/net.c" 3 4 _Bool # 3330 "criu/net.c" for_dump) { int nsret = -1, ret; if (ns->type != NS_CRIU) { print_on_level((3), "net: " "Switching to %d's net for collecting sockets\n", ns->ns_pid); if (switch_ns(ns->ns_pid, &net_ns_desc, &nsret)) return -1; } if (for_dump) { ret = ns->net.nlsk = socket( # 3344 "criu/net.c" 3 4 16 # 3344 "criu/net.c" , # 3344 "criu/net.c" 3 4 SOCK_RAW # 3344 "criu/net.c" , # 3344 "criu/net.c" 3 4 4 # 3344 "criu/net.c" ); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create sock diag socket" ": %s\n", "criu/net.c", 3346, strerror( # 3346 "criu/net.c" 3 4 (*__errno_location ()) # 3346 "criu/net.c" )); goto err_nl; } } else ns->net.nlsk = -1; # 3397 "criu/net.c" ret = ns->net.seqsk = socket( # 3397 "criu/net.c" 3 4 1 # 3397 "criu/net.c" , # 3397 "criu/net.c" 3 4 SOCK_SEQPACKET # 3397 "criu/net.c" | # 3397 "criu/net.c" 3 4 SOCK_NONBLOCK # 3397 "criu/net.c" , 0); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create seqsk for parasite" ": %s\n", "criu/net.c", 3399, strerror( # 3399 "criu/net.c" 3 4 (*__errno_location ()) # 3399 "criu/net.c" )); goto err_sq; } ret = 0; # 3421 "criu/net.c" out: if (nsret >= 0 && restore_ns(nsret, &net_ns_desc) < 0) { nsret = -1; if (ret == 0) goto err_ret; } return ret; err_ret: close(ns->net.seqsk); err_sq: if (ns->net.nlsk >= 0) close(ns->net.nlsk); err_nl: goto out; } static int netns_nr; static int collect_net_ns(struct ns_id *ns, void *oarg) { # 3442 "criu/net.c" 3 4 _Bool # 3442 "criu/net.c" for_dump = (oarg == (void *)1); char id[64], *val; int ret; print_on_level((3), "net: " "Collecting netns %d/%d\n", ns->id, ns->ns_pid); snprintf(id, sizeof(id), "net[%u]", ns->kid); val = external_lookup_by_key(id); if (!IS_ERR_OR_NULL(val)) { print_on_level((4), "net: " "The %s netns is external\n", id); ns->ext_key = val; } ret = prep_ns_sockets(ns, for_dump); if (ret) return ret; netns_nr++; if (!for_dump) return 0; return collect_sockets(ns); } int collect_net_namespaces( # 3467 "criu/net.c" 3 4 _Bool # 3467 "criu/net.c" for_dump) { return walk_namespaces(&net_ns_desc, collect_net_ns, (void *)(for_dump ? 1UL : 0)); } struct ns_desc net_ns_desc = { .cflag = # 3472 "criu/net.c" 3 4 0x40000000 # 3472 "criu/net.c" , .str = "net", .len = sizeof("net") - 1, }; struct ns_id *net_get_root_ns(void) { static struct ns_id *root_netns = # 3476 "criu/net.c" 3 4 ((void *)0) # 3476 "criu/net.c" ; if (root_netns) return root_netns; if (root_item->ids == # 3481 "criu/net.c" 3 4 ((void *)0) # 3481 "criu/net.c" ) return # 3482 "criu/net.c" 3 4 ((void *)0) # 3482 "criu/net.c" ; root_netns = lookup_ns_by_id(root_item->ids->net_ns_id, &net_ns_desc); return root_netns; } struct ns_id *get_socket_ns(int lfd) { struct ns_id *ns; struct stat st; int ns_fd; ns_fd = ioctl(lfd, # 3499 "criu/net.c" 3 4 0x894C # 3499 "criu/net.c" ); if (ns_fd < 0) { if (netns_nr == 1) return net_get_root_ns(); print_on_level((1), "Error (%s:%d): " "net: " "Unable to get a socket net namespace" ": %s\n", "criu/net.c", 3505, strerror( # 3505 "criu/net.c" 3 4 (*__errno_location ()) # 3505 "criu/net.c" )); return # 3506 "criu/net.c" 3 4 ((void *)0) # 3506 "criu/net.c" ; } if (fstat(ns_fd, &st)) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to stat a network namespace" ": %s\n", "criu/net.c", 3509, strerror( # 3509 "criu/net.c" 3 4 (*__errno_location ()) # 3509 "criu/net.c" )); close(ns_fd); return # 3511 "criu/net.c" 3 4 ((void *)0) # 3511 "criu/net.c" ; } close(ns_fd); ns = lookup_ns_by_kid(st.st_ino, &net_ns_desc); if (ns == # 3516 "criu/net.c" 3 4 ((void *)0) # 3516 "criu/net.c" ) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to dump a socket from an external network namespace\n", "criu/net.c", 3517); return # 3518 "criu/net.c" 3 4 ((void *)0) # 3518 "criu/net.c" ; } return ns; } void check_has_netns_ioc(int fd, # 3524 "criu/net.c" 3 4 _Bool # 3524 "criu/net.c" *kdat_val, const char *name) { int ns_fd; ns_fd = ioctl(fd, # 3528 "criu/net.c" 3 4 0x894C # 3528 "criu/net.c" ); *kdat_val = (ns_fd >= 0); if (ns_fd < 0) print_on_level((2), "Warn (%s:%d): " "net: " "Unable to get %s network namespace\n", "criu/net.c", 3532, name); else close(ns_fd); } int kerndat_socket_netns(void) { int sk; sk = socket( # 3541 "criu/net.c" 3 4 1 # 3541 "criu/net.c" , # 3541 "criu/net.c" 3 4 SOCK_DGRAM # 3541 "criu/net.c" , 0); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create socket" ": %s\n", "criu/net.c", 3543, strerror( # 3543 "criu/net.c" 3 4 (*__errno_location ()) # 3543 "criu/net.c" )); return -1; } check_has_netns_ioc(sk, &kdat.sk_ns, "socket"); close(sk); return 0; } static int move_to_bridge(struct external *ext, void *arg) { int s = *(int *)arg; int ret; char *out, *br; struct ifreq ifr; out = external_val(ext); if (!out) return -1; br = strchr(out, '@'); if (!br) return 0; *br = '\0'; br++; { print_on_level((4), "net: " "\tMoving dev %s to bridge %s\n", out, br); if (s == -1) { s = socket( # 3574 "criu/net.c" 3 4 1 # 3574 "criu/net.c" , # 3574 "criu/net.c" 3 4 SOCK_STREAM # 3574 "criu/net.c" | # 3574 "criu/net.c" 3 4 SOCK_CLOEXEC # 3574 "criu/net.c" , 0); if (s < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't create control socket" ": %s\n", "criu/net.c", 3576, strerror( # 3576 "criu/net.c" 3 4 (*__errno_location ()) # 3576 "criu/net.c" )); return -1; } } ifr. # 3585 "criu/net.c" 3 4 ifr_ifru.ifru_ivalue # 3585 "criu/net.c" = if_nametoindex(out); if (ifr. # 3586 "criu/net.c" 3 4 ifr_ifru.ifru_ivalue # 3586 "criu/net.c" == 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't get index of %s" ": %s\n", "criu/net.c", 3587, out, strerror( # 3587 "criu/net.c" 3 4 (*__errno_location ()) # 3587 "criu/net.c" )); ret = -1; goto out; } __strlcpy(ifr. # 3591 "criu/net.c" 3 4 ifr_ifrn.ifrn_name # 3591 "criu/net.c" , br, # 3591 "criu/net.c" 3 4 16 # 3591 "criu/net.c" ); ret = ioctl(s, # 3592 "criu/net.c" 3 4 0x89a2 # 3592 "criu/net.c" , &ifr); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't add interface %s to bridge %s" ": %s\n", "criu/net.c", 3594, out, br, strerror( # 3594 "criu/net.c" 3 4 (*__errno_location ()) # 3594 "criu/net.c" )); goto out; } ifr. # 3602 "criu/net.c" 3 4 ifr_ifru.ifru_ivalue # 3602 "criu/net.c" = 0; __strlcpy(ifr. # 3603 "criu/net.c" 3 4 ifr_ifrn.ifrn_name # 3603 "criu/net.c" , out, # 3603 "criu/net.c" 3 4 16 # 3603 "criu/net.c" ); ret = ioctl(s, # 3604 "criu/net.c" 3 4 0x8913 # 3604 "criu/net.c" , &ifr); if (ret < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Can't get flags of interface %s" ": %s\n", "criu/net.c", 3606, out, strerror( # 3606 "criu/net.c" 3 4 (*__errno_location ()) # 3606 "criu/net.c" )); goto out; } ret = 0; if (ifr. # 3611 "criu/net.c" 3 4 ifr_ifru.ifru_flags # 3611 "criu/net.c" & # 3611 "criu/net.c" 3 4 IFF_UP # 3611 "criu/net.c" ) goto out; ifr. # 3614 "criu/net.c" 3 4 ifr_ifru.ifru_flags # 3614 "criu/net.c" |= # 3614 "criu/net.c" 3 4 IFF_UP # 3614 "criu/net.c" ; if (changeflags(s, out, ifr. # 3615 "criu/net.c" 3 4 ifr_ifru.ifru_flags # 3615 "criu/net.c" ) < 0) goto out; ret = 0; } out: br--; *br = '@'; *(int *)arg = s; return ret; } int move_veth_to_bridge(void) { int sk = -1, ret; ret = external_for_each_type("veth", move_to_bridge, &sk); if (sk >= 0) close(sk); return ret; } enum { NETNSA_NONE, NETNSA_NSID, NETNSA_PID, NETNSA_FD, __NETNSA_MAX, }; static struct nla_policy rtnl_net_policy[(__NETNSA_MAX - 1) + 1] = { [NETNSA_NONE] = { .type = NLA_UNSPEC }, [NETNSA_NSID] = { .type = 14 }, [NETNSA_PID] = { .type = NLA_U32 }, [NETNSA_FD] = { .type = NLA_U32 }, }; static int nsid_cb(struct nlmsghdr *msg, struct ns_id *ns, void *arg) { struct nlattr *tb[(__NETNSA_MAX - 1) + 1]; int err; err = nlmsg_parse(msg, sizeof(struct rtgenmsg), tb, (__NETNSA_MAX - 1), rtnl_net_policy); if (err < 0) return NL_STOP; if (tb[NETNSA_NSID]) *((int *)arg) = nla_get_s32(tb[NETNSA_NSID]); return 0; } static int net_set_nsid(int rtsk, int fd, int nsid) { struct { struct nlmsghdr nlh; struct rtgenmsg g; char msg[128]; } req; memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = # 3686 "criu/net.c" 3 4 (( # 3686 "criu/net.c" sizeof(struct rtgenmsg) # 3686 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 3686 "criu/net.c" ; req.nlh.nlmsg_type = # 3687 "criu/net.c" 3 4 RTM_NEWNSID # 3687 "criu/net.c" ; req.nlh.nlmsg_flags = # 3688 "criu/net.c" 3 4 0x01 # 3688 "criu/net.c" | # 3688 "criu/net.c" 3 4 0x04 # 3688 "criu/net.c" ; req.nlh.nlmsg_seq = 24680; if (addattr_l(&req.nlh, sizeof(req), NETNSA_FD, &fd, sizeof(fd))) return -1; if (addattr_l(&req.nlh, sizeof(req), NETNSA_NSID, &nsid, sizeof(nsid))) return -1; if (do_rtnl_req(rtsk, &req, req.nlh.nlmsg_len, # 3695 "criu/net.c" 3 4 ((void *)0) # 3695 "criu/net.c" , # 3695 "criu/net.c" 3 4 ((void *)0) # 3695 "criu/net.c" , # 3695 "criu/net.c" 3 4 ((void *)0) # 3695 "criu/net.c" , # 3695 "criu/net.c" 3 4 ((void *)0) # 3695 "criu/net.c" ) < 0) return -1; return 0; } int net_get_nsid(int rtsk, int pid, int *nsid) { struct { struct nlmsghdr nlh; struct rtgenmsg g; char msg[128]; } req; int32_t id = # 3708 "criu/net.c" 3 4 (-0x7fffffff - 1) # 3708 "criu/net.c" ; memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = # 3711 "criu/net.c" 3 4 (( # 3711 "criu/net.c" sizeof(struct rtgenmsg) # 3711 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 3711 "criu/net.c" ; req.nlh.nlmsg_type = # 3712 "criu/net.c" 3 4 RTM_GETNSID # 3712 "criu/net.c" ; req.nlh.nlmsg_flags = # 3713 "criu/net.c" 3 4 0x01 # 3713 "criu/net.c" | # 3713 "criu/net.c" 3 4 0x04 # 3713 "criu/net.c" ; req.nlh.nlmsg_seq = 24680; if (addattr_l(&req.nlh, sizeof(req), NETNSA_PID, &pid, sizeof(pid))) return -1; if (do_rtnl_req(rtsk, &req, req.nlh.nlmsg_len, nsid_cb, # 3718 "criu/net.c" 3 4 ((void *)0) # 3718 "criu/net.c" , # 3718 "criu/net.c" 3 4 ((void *)0) # 3718 "criu/net.c" , (void *)&id) < 0) return -1; if (id == # 3721 "criu/net.c" 3 4 (-0x7fffffff - 1) # 3721 "criu/net.c" ) return -1; *nsid = id; return 0; } static int nsid_link_info(struct ns_id *ns, struct net_link *link, struct newlink_req *req) { NetDeviceEntry *nde = link->nde; struct rtattr *veth_data, *peer_data; struct ifinfomsg ifm; addattr_l(&req->h, sizeof(*req), IFLA_INFO_KIND, "veth", 4); veth_data = ((struct rtattr *)(((void *)(&req->h)) + # 3737 "criu/net.c" 3 4 ( (( # 3737 "criu/net.c" (&req->h)->nlmsg_len # 3737 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 3737 "criu/net.c" )); addattr_l(&req->h, sizeof(*req), IFLA_INFO_DATA, # 3738 "criu/net.c" 3 4 ((void *)0) # 3738 "criu/net.c" , 0); peer_data = ((struct rtattr *)(((void *)(&req->h)) + # 3739 "criu/net.c" 3 4 ( (( # 3739 "criu/net.c" (&req->h)->nlmsg_len # 3739 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 3739 "criu/net.c" )); memset(&ifm, 0, sizeof(ifm)); ifm.ifi_index = nde->peer_ifindex; addattr_l(&req->h, sizeof(*req), VETH_INFO_PEER, &ifm, sizeof(ifm)); addattr_l(&req->h, sizeof(*req), IFLA_NET_NS_FD, &nde->peer_nsid, sizeof(int)); peer_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 3746 "criu/net.c" 3 4 ( (( # 3746 "criu/net.c" (&req->h)->nlmsg_len # 3746 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 3746 "criu/net.c" )) - (void *)peer_data; veth_data->rta_len = (void *)((struct rtattr *)(((void *)(&req->h)) + # 3747 "criu/net.c" 3 4 ( (( # 3747 "criu/net.c" (&req->h)->nlmsg_len # 3747 "criu/net.c" 3 4 )+4U -1) & ~(4U -1) ) # 3747 "criu/net.c" )) - (void *)veth_data; return 0; } static int check_one_link_nsid(struct nlmsghdr *hdr, struct ns_id *ns, void *arg) { # 3754 "criu/net.c" 3 4 _Bool # 3754 "criu/net.c" *has_link_nsid = arg; struct ifinfomsg *ifi; int len = hdr->nlmsg_len - # 3756 "criu/net.c" 3 4 (( # 3756 "criu/net.c" sizeof(*ifi) # 3756 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) ))) # 3756 "criu/net.c" ; struct nlattr *tb[37 + 1]; ifi = # 3759 "criu/net.c" 3 4 ((void *)(((char *) # 3759 "criu/net.c" hdr # 3759 "criu/net.c" 3 4 ) + ((int) ( ((sizeof(struct nlmsghdr))+4U -1) & ~(4U -1) )))) # 3759 "criu/net.c" ; if (len < 0) { print_on_level((1), "Error (%s:%d): " "net: " "No iflas for link %d\n", "criu/net.c", 3762, ifi->ifi_index); return -1; } nlmsg_parse(hdr, sizeof(struct ifinfomsg), tb, 37, # 3766 "criu/net.c" 3 4 ((void *)0) # 3766 "criu/net.c" ); print_on_level((3), "net: " "\tLD: Got link %d, type %d\n", ifi->ifi_index, ifi->ifi_type); if (tb[37]) *has_link_nsid = # 3770 "criu/net.c" 3 4 1 # 3770 "criu/net.c" ; return 0; } static int check_link_nsid(int rtsk, void *args) { struct { struct nlmsghdr nlh; struct rtgenmsg g; } req; print_on_level((3), "net: " "Dumping netns links\n"); memset(&req, 0, sizeof(req)); req.nlh.nlmsg_len = sizeof(req); req.nlh.nlmsg_type = # 3786 "criu/net.c" 3 4 RTM_GETLINK # 3786 "criu/net.c" ; req.nlh.nlmsg_flags = # 3787 "criu/net.c" 3 4 0x100 # 3787 "criu/net.c" | # 3787 "criu/net.c" 3 4 0x200 # 3787 "criu/net.c" | # 3787 "criu/net.c" 3 4 0x01 # 3787 "criu/net.c" ; req.nlh.nlmsg_pid = 0; req.nlh.nlmsg_seq = 24680; req.g.rtgen_family = # 3790 "criu/net.c" 3 4 17 # 3790 "criu/net.c" ; return do_rtnl_req(rtsk, &req, sizeof(req), check_one_link_nsid, # 3792 "criu/net.c" 3 4 ((void *)0) # 3792 "criu/net.c" , # 3792 "criu/net.c" 3 4 ((void *)0) # 3792 "criu/net.c" , args); } int kerndat_link_nsid(void) { int status; pid_t pid; pid = fork(); if (pid < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to fork a process" ": %s\n", "criu/net.c", 3802, strerror( # 3802 "criu/net.c" 3 4 (*__errno_location ()) # 3802 "criu/net.c" )); return -1; } if (pid == 0) { # 3807 "criu/net.c" 3 4 _Bool # 3807 "criu/net.c" has_link_nsid; NetDeviceEntry nde = { # 3808 "criu/net.c" 3 4 { # 3808 "criu/net.c" &net_device_entry__descriptor # 3808 "criu/net.c" 3 4 , 0, ((void *)0) } # 3808 "criu/net.c" , ND_TYPE__LOOPBACK, 0, 0, 0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , 0, {0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" }, 0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , 0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , 0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" , 0, 0, 0, 0, 0, 0, # 3808 "criu/net.c" 3 4 ((void *)0) # 3808 "criu/net.c" }; struct net_link link = { .created = # 3810 "criu/net.c" 3 4 0 # 3810 "criu/net.c" , .nde = &nde, }; int nsfd, sk, ret; if (unshare( # 3815 "criu/net.c" 3 4 0x40000000 # 3815 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Unable create a network namespace" ": %s\n", "criu/net.c", 3816, strerror( # 3816 "criu/net.c" 3 4 (*__errno_location ()) # 3816 "criu/net.c" )); exit(1); } nsfd = ({ int __fd = do_open_proc(0, # 3820 "criu/net.c" 3 4 00 # 3820 "criu/net.c" , "ns/net"); if (__fd < 0 && ( # 3820 "criu/net.c" 3 4 (*__errno_location ()) # 3820 "criu/net.c" != (0))) print_on_level((1), "Error (%s:%d): " "net: " "Can't open %d/" "ns/net" " on procfs" ": %s\n", "criu/net.c", 3820,0, strerror( # 3820 "criu/net.c" 3 4 (*__errno_location ()) # 3820 "criu/net.c" )); __fd; }); if (nsfd < 0) exit(1); if (unshare( # 3824 "criu/net.c" 3 4 0x40000000 # 3824 "criu/net.c" )) { print_on_level((1), "Error (%s:%d): " "net: " "Unable create a network namespace" ": %s\n", "criu/net.c", 3825, strerror( # 3825 "criu/net.c" 3 4 (*__errno_location ()) # 3825 "criu/net.c" )); exit(1); } sk = socket( # 3829 "criu/net.c" 3 4 16 # 3829 "criu/net.c" , # 3829 "criu/net.c" 3 4 SOCK_RAW # 3829 "criu/net.c" , # 3829 "criu/net.c" 3 4 0 # 3829 "criu/net.c" ); if (sk < 0) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create a netlink socket" ": %s\n", "criu/net.c", 3831, strerror( # 3831 "criu/net.c" 3 4 (*__errno_location ()) # 3831 "criu/net.c" )); exit(1); } nde.type = ND_TYPE__VETH; nde.name = "veth"; nde.ifindex = 10; nde.mtu = 1500; nde.peer_nsid = nsfd; nde.peer_ifindex = 11; nde.has_peer_ifindex = # 3841 "criu/net.c" 3 4 1 # 3841 "criu/net.c" ; nde.has_peer_nsid = # 3842 "criu/net.c" 3 4 1 # 3842 "criu/net.c" ; ret = restore_one_link( # 3844 "criu/net.c" 3 4 ((void *)0) # 3844 "criu/net.c" , &link, sk, nsid_link_info, # 3844 "criu/net.c" 3 4 ((void *)0) # 3844 "criu/net.c" ); if (ret) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to create a veth pair: %d\n", "criu/net.c", 3846, ret); exit(1); } has_link_nsid = # 3850 "criu/net.c" 3 4 0 # 3850 "criu/net.c" ; if (check_link_nsid(sk, &has_link_nsid)) { print_on_level((1), "Error (%s:%d): " "net: " "check_link_nsid failed\n", "criu/net.c", 3852); exit(1); } if (!has_link_nsid) { print_on_level((1), "Error (%s:%d): " "net: " "check_link_nsid succeeded but has_link_nsid is false\n", "criu/net.c", 3857); exit(5); } close(sk); exit(0); } if (waitpid(pid, &status, 0) != pid) { print_on_level((1), "Error (%s:%d): " "net: " "Unable to wait a process" ": %s\n", "criu/net.c", 3867, strerror( # 3867 "criu/net.c" 3 4 (*__errno_location ()) # 3867 "criu/net.c" )); return -1; } if (status) { print_on_level((2), "Warn (%s:%d): " "net: " "NSID isn't reported for network links\n", "criu/net.c", 3872); return 0; } kdat.has_link_nsid = # 3876 "criu/net.c" 3 4 1 # 3876 "criu/net.c" ; return 0; }