skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

socket_accept4_u32.c (310B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/uint32.h>
      4 #include <skalibs/socket.h>
      5 
      6 int socket_accept4_internal_u32 (int s, uint32_t *ip, uint16_t *port, unsigned int options)
      7 {
      8   char pack[4] ;
      9   int fd = socket_accept4_internal(s, pack, port, options) ;
     10   if (fd >= 0) uint32_unpack_big(pack, ip) ;
     11   return fd ;
     12 }