Implement IPPROTO_IP control messages decoding

* net.c: Include "xlat/ip_cmsg_types.h".
(print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos,
print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_checksum,
print_cmsg_ip_origdstaddr): New functions.
(print_cmsg_type_data): Add generic SOL_IP level decoding.
Use these functions for decoding of IP_PKTINFO, IP_TTL, IP_TOS,
IP_RECVOPTS, IP_RETOPTS, IP_RECVERR, IP_ORIGDSTADDR, IP_CHECKSUM,
and SCM_SECURITY type messages.
* xlat/ip_cmsg_types.in: New file.
* xlat/sockipoptions.in: Move IP_RETOPTS before IP_RECVRETOPTS.
* tests/inet-cmsg.c: New file.
* tests/inet-cmsg.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add inet-cmsg.
(TESTS): Add inet-cmsg.test.
* tests/.gitignore: Add inet-cmsg.

Suggested-by: Orion Poplawski <orion@cora.nwra.com>
7 files changed
tree: 6e5ae642c81a3f0073d8d09366f85e8a086058a5
  1. debian/
  2. linux/
  3. m4/
  4. maint/
  5. qemu_multiarch_testing/
  6. test/
  7. tests/
  8. xlat/
  9. .gitignore
  10. .mailmap
  11. access.c
  12. affinity.c
  13. aio.c
  14. AUTHORS
  15. bjm.c
  16. block.c
  17. bootstrap
  18. bpf.c
  19. build_static_example.sh
  20. cacheflush.c
  21. capability.c
  22. caps0.h
  23. caps1.h
  24. ChangeLog-CVS
  25. chdir.c
  26. chmod.c
  27. clone.c
  28. configure.ac
  29. COPYING
  30. count.c
  31. CREDITS.in
  32. defs.h
  33. desc.c
  34. dirent.c
  35. dirent64.c
  36. empty.h
  37. epoll.c
  38. errnoent.sh
  39. evdev.c
  40. eventfd.c
  41. execve.c
  42. exit.c
  43. fadvise.c
  44. fallocate.c
  45. fanotify.c
  46. fchownat.c
  47. fcntl.c
  48. fetch_seccomp_fprog.c
  49. file.c
  50. flock.c
  51. futex.c
  52. generate_mpers_am.sh
  53. generate_sen.sh
  54. generate_xlat_in.sh
  55. get_robust_list.c
  56. getcpu.c
  57. getcwd.c
  58. getrandom.c
  59. git-set-file-times
  60. git-version-gen
  61. gitlog-to-changelog
  62. HACKING-scripts
  63. hostname.c
  64. inotify.c
  65. INSTALL
  66. io.c
  67. ioctl.c
  68. ioctlsort.c
  69. ioprio.c
  70. ipc_defs.h
  71. ipc_msg.c
  72. ipc_msgctl.c
  73. ipc_sem.c
  74. ipc_shm.c
  75. ipc_shmctl.c
  76. kexec.c
  77. keyctl.c
  78. ldt.c
  79. link.c
  80. loop.c
  81. lseek.c
  82. make-dist
  83. Makefile.am
  84. mem.c
  85. membarrier.c
  86. memfd_create.c
  87. mknod.c
  88. mount.c
  89. mpers.awk
  90. mpers.sh
  91. mpers_test.sh
  92. mpers_type.h
  93. mq.c
  94. mtd.c
  95. native_defs.h
  96. net.c
  97. NEWS
  98. open.c
  99. or1k_atomic.c
  100. pathtrace.c
  101. perf.c
  102. personality.c
  103. poll.c
  104. prctl.c
  105. print_mq_attr.c
  106. print_msgbuf.c
  107. print_sigevent.c
  108. print_time.c
  109. print_timex.c
  110. printmode.c
  111. printrusage.c
  112. printsiginfo.c
  113. printsiginfo.h
  114. printstat.h
  115. process.c
  116. process_vm.c
  117. ptp.c
  118. ptrace.h
  119. quota.c
  120. readahead.c
  121. readlink.c
  122. README
  123. README-hacking
  124. README-linux-ptrace
  125. README-mpers
  126. reboot.c
  127. regs.h
  128. renameat.c
  129. resource.c
  130. rtc.c
  131. sched.c
  132. scsi.c
  133. seccomp.c
  134. seccomp_fprog.h
  135. sendfile.c
  136. sigaltstack.c
  137. signal.c
  138. signalent.sh
  139. signalfd.c
  140. sigreturn.c
  141. sock.c
  142. socketutils.c
  143. sram_alloc.c
  144. statfs.c
  145. strace-graph
  146. strace-log-merge
  147. strace.1
  148. strace.c
  149. strace.spec
  150. stream.c
  151. swapon.c
  152. sync_file_range.c
  153. syscall.c
  154. syscallent.sh
  155. sysctl.c
  156. sysinfo.c
  157. syslog.c
  158. sysmips.c
  159. term.c
  160. time.c
  161. times.c
  162. truncate.c
  163. uid.c
  164. uid16.c
  165. umask.c
  166. umount.c
  167. uname.c
  168. unwind.c
  169. userfaultfd.c
  170. util.c
  171. utime.c
  172. utimes.c
  173. v4l2.c
  174. vsprintf.c
  175. wait.c
  176. xattr.c
  177. xlate.el
  178. xmalloc.c