1. 03 11月, 2019 1 次提交
    • R
      make time-related socket options overridable by arch bits files · 0bbc04c9
      Rich Felker 提交于
      SO_RCVTIMEO and SO_SNDTIMEO already were, but only in aggregate with
      SO_DEBUG and all of the other low/traditional options that varied per
      arch. SO_TIMESTAMP* are newly overridable. the two groups have to be
      done separately since mips64 and powerpc64 will override the former
      but not the latter.
      
      at some point this should be cleaned up to use bits headers more
      idiomatically.
      0bbc04c9
  2. 29 10月, 2019 1 次提交
    • R
      add time64 symbol name redirects to public headers, under arch control · 1febd21d
      Rich Felker 提交于
      a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is
      expected to define, to control redirection of symbol names for
      interfaces that involve time_t and derived types. this ensures that
      object files will only be linked to libc interfaces matching the ABI
      whose headers they were compiled against.
      
      along with time32 compat shims, which will be introduced separately,
      the redirection also makes it possible for a single libc (static or
      shared) to be used with object files produced with either the old
      (32-bit time_t) headers or the new ones after 64-bit time_t switchover
      takes place. mixing of such object files (or shared libraries) in the
      same program will also be possible, but must be done with care; ABI
      between libc and a consumer of the libc interfaces is guaranteed to
      match by the the symbol name redirection, but pairwise ABI between
      consumers of libc that define interfaces between each other in terms
      of time_t is not guaranteed to match.
      
      this change adds a dependency on an additional "GNU C" feature to the
      public headers for existing 32-bit archs, which is generally
      undesirable; however, the feature is one which glibc has depended on
      for a long time, and thus which any viable alternative compiler is
      going to need to provide. 64-bit archs are not affected, nor will
      future 32-bit archs be, regardless of whether they are "new" on the
      kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or
      xtensa port). the same applies to newly-added ABIs for existing
      machine-level archs.
      1febd21d
  3. 02 7月, 2019 1 次提交
    • S
      sys/socket.h: add SO_BINDTOIFINDEX from linux v5.1 · 5b2b682d
      Szabolcs Nagy 提交于
      SO_BINDTOIFINDEX behaves similar to SO_BINDTODEVICE, but takes a
      network interface index as argument, rather than the network
      interface name. see
      
        linux commit f5dd3d0c9638a9d9a02b5964c4ad636f06cf7e2c
        net: introduce SO_BINDTOIFINDEX sockopt
      5b2b682d
  4. 14 3月, 2019 1 次提交
  5. 10 12月, 2018 1 次提交
  6. 27 6月, 2018 1 次提交
  7. 23 2月, 2018 3 次提交
    • S
      sys/socket.h: add MSG_ZEROCOPY from linux v4.14 · 986bc217
      Szabolcs Nagy 提交于
      MSG_ZEROCOPY socket send flag avoids copy in the kernel
      new in linux commit 52267790ef52d7513879238ca9fac22c1733e0e3
      SO_ZEROCOPY socket option enables MSG_ZEROCOPY if availale
      new in linux commit 76851d1212c11365362525e1e2c0a18c97478e6b
      986bc217
    • S
      sys/socket.h: add SOL_TLS from linux v4.13 · 404097a4
      Szabolcs Nagy 提交于
      socket option for kernel TLS support
      new in linux commit 3c4d7559159bfe1e3b94df3a657b2cda3a34e218
      404097a4
    • S
      sys/socket.h: add PF_SMC from linux v4.11 · 709bbf51
      Szabolcs Nagy 提交于
      add AF_SMC and PF_SMC for the IBM shared memory communication protocol.
      new in linux commit ac7138746e14137a451f8539614cdd349153e0c0
      (linux socket.h is not in uapi so this update was missed earlier)
      709bbf51
  8. 06 11月, 2017 3 次提交
  9. 31 8月, 2016 1 次提交
  10. 04 7月, 2016 1 次提交
    • R
      make brace placement in public header struct definitions consistent · befa5866
      Rich Felker 提交于
      placing the opening brace on the same line as the struct keyword/tag
      is the style I prefer and seems to be the prevailing practice in more
      recent additions.
      
      these changes were generated by the command:
      
      find include/ arch/*/bits -name '*.h' \
      -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +
      
      and subsequently checked by hand to ensure that the regex did not pick
      up any false positives.
      befa5866
  11. 10 6月, 2016 3 次提交
    • R
      avoid padding gaps in struct sockaddr_storage · 1e6fc0b6
      Rich Felker 提交于
      compilers are free not to copy, or in some cases to clobber, padding
      bytes in a structure. while it's an aliasing violation, and thus
      undefined behavior, to copy or manipulate other sockaddr types using
      sockaddr_storage, it seems likely that traditional code attempts to do
      so, and the original intent of the sockaddr_storage structure was
      probably to allow such usage.
      
      in the interest of avoiding silent and potentially dangerous breakage,
      ensure that there are no actual padding bytes in sockaddr_storage by
      moving and adjusting the size of the __ss_padding member so that it
      fits exactly.
      
      this change also removes a silent assumption that the alignment of
      long is equal to its size.
      1e6fc0b6
    • S
      update sys/socket.h to linux v4.6 · a0bb50a1
      Szabolcs Nagy 提交于
      kernel connection multiplexor macros AF_KCM, PF_KCM, SOL_KCM were
      added in linux commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3
      
      MSG_BATCH sendmsg flag for performance optimization was added
      in linux commit f092276d85b82504e8a07498f4e9e0c51f06745c
      
      SOL_* macros are now synced with linux socket.h which is not a uapi
      header and glibc did not have the macros either, but that has changed
      http://sourceware.org/ml/libc-alpha/2016-05/msg00322.html
      a0bb50a1
    • S
      add SO_CNX_ADVICE to sys/socket.h, new in linux v4.6 · f6f4aa5d
      Szabolcs Nagy 提交于
      new socket option so application can give advice about routing
      path quality of connected udp sockets, added in linux commit
      a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314
      f6f4aa5d
  12. 23 5月, 2016 1 次提交
    • R
      fix undefined pointer arithmetic in CMSG_NXTHDR macro · 81fb75a1
      Rich Felker 提交于
      previously, the only way the stopping condition could be met with
      correct lengths in the headers invoked undefined behavior, adding
      sizeof(struct cmsghdr) beyond the end of the cmsg buffer.
      
      instead, compute and compare sizes rather than pointers.
      81fb75a1
  13. 19 3月, 2016 1 次提交
  14. 25 1月, 2016 2 次提交
  15. 22 7月, 2015 1 次提交
  16. 10 2月, 2015 1 次提交
    • S
      add new socket options SO_INCOMING_CPU, SO_ATTACH_BPF, SO_DETACH_BPF · 70572dce
      Szabolcs Nagy 提交于
      these socket options are new in linux v3.19, introduced in commit
      2c8c56e15df3d4c2af3d656e44feb18789f75837 and commit
      89aa075832b0da4402acebd698d0411dcc82d03e
      
      with SO_INCOMING_CPU the cpu can be queried on which a socket is
      managed inside the kernel and optimize polling of large number of
      sockets accordingly.
      
      SO_ATTACH_BPF lets eBPF programs (created by the bpf syscall) to
      be attached to sockets.
      70572dce
  17. 20 6月, 2014 1 次提交
    • R
      implement sendmmsg and recvmmsg · acb7e049
      Rich Felker 提交于
      these are not pure syscall wrappers because they have to work around
      kernel API bugs on 64-bit archs. the workarounds could probably be
      made somewhat more efficient, but at the cost of more complexity. this
      may be revisited later.
      acb7e049
  18. 31 5月, 2014 1 次提交
  19. 25 2月, 2014 1 次提交
  20. 09 1月, 2014 1 次提交
    • R
      fix remaining known namespace violations for netinet/in.h · acde0135
      Rich Felker 提交于
      the imr_, imsf_, ip6_, ip6m_, ipi_, ipi6_, SCM_, and SOL_ prefixes are
      not in the reserved namespace for this header. thus the constants and
      structures using them need to be protected under appropriate feature
      test macros.
      
      this also affects some headers which are permitted to include
      netinet/in.h, particularly netdb.h and arpa/inet.h.
      
      the SOL_ macros are moved to sys/socket.h where they are in the
      reserved namespace (SO*). they are still accessible via netinet/in.h
      since it includes sys/socket.h implicitly (which is permitted).
      
      the SCM_SRCRT macro is simply removed, since the definition used for
      it, IPV6_RXSRCRT is not defined anywhere. it could be re-added, this
      time in sys/socket.h, if the appropriate value can be determined;
      however, given that the erroneous definition was not caught, it is
      unlikely that any software actually attempts to use SCM_SRCRT.
      acde0135
  21. 05 12月, 2013 2 次提交
  22. 18 10月, 2013 1 次提交
  23. 15 9月, 2013 1 次提交
  24. 25 7月, 2013 2 次提交
  25. 02 4月, 2013 1 次提交
  26. 05 3月, 2013 1 次提交
  27. 13 1月, 2013 1 次提交
  28. 20 12月, 2012 1 次提交
  29. 16 11月, 2012 1 次提交
    • R
      disable SO_REUSEPORT in sys/socket.h · 91738d02
      Rich Felker 提交于
      although a number is reserved for it, this option is not implemented
      on Linux and does not work. defining it causes some applications to
      use it, and subsequently break due to its failure.
      91738d02
  30. 06 11月, 2012 1 次提交
  31. 30 9月, 2012 1 次提交