Blame src/w32-sock-nonce.inc.h

Packit 3c2767
## w32-sock-nonce.inc.h - Include fragment to build assuan.h.
Packit 3c2767
## Copyright (C) 2010  Free Software Foundation, Inc.
Packit 3c2767
##
Packit 3c2767
## This file is part of Assuan.
Packit 3c2767
##
Packit 3c2767
## Assuan is free software; you can redistribute it and/or modify it
Packit 3c2767
## under the terms of the GNU Lesser General Public License as
Packit 3c2767
## published by the Free Software Foundation; either version 2.1 of
Packit 3c2767
## the License, or (at your option) any later version.
Packit 3c2767
##
Packit 3c2767
## Assuan is distributed in the hope that it will be useful, but
Packit 3c2767
## WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 3c2767
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 3c2767
## Lesser General Public License for more details.
Packit 3c2767
##
Packit 3c2767
## You should have received a copy of the GNU Lesser General Public
Packit 3c2767
## License along with this program; if not, see <http://www.gnu.org/licenses/>.
Packit 3c2767
## SPDX-License-Identifier: LGPL-2.1+
Packit 3c2767
##
Packit 3c2767
##
Packit 3c2767
## This file is included by the mkheader tool.  Lines starting with
Packit 3c2767
## a double hash mark are not copied to the destination file.
Packit 3c2767
Packit 3c2767
/* Assuan features an emulation of Unix domain sockets based on local
Packit 3c2767
   TCP connections.  To implement access permissions based on file
Packit 3c2767
   permissions a nonce is used which is expected by the server as the
Packit 3c2767
   first bytes received.  This structure is used by the server to save
Packit 3c2767
   the nonce created initially by bind.  */
Packit 3c2767
struct assuan_sock_nonce_s
Packit 3c2767
{
Packit 3c2767
  size_t length;
Packit 3c2767
  char nonce[16];
Packit 3c2767
};
Packit 3c2767
typedef struct assuan_sock_nonce_s assuan_sock_nonce_t;
Packit 3c2767
Packit 3c2767
/* Define the Unix domain socket structure for Windows.  */
Packit 3c2767
#ifndef _ASSUAN_NO_SOCKET_WRAPPER
Packit 3c2767
# ifndef AF_LOCAL
Packit 3c2767
#  define AF_LOCAL AF_UNIX
Packit 3c2767
# endif
Packit 3c2767
# ifndef EADDRINUSE
Packit 3c2767
#  define EADDRINUSE WSAEADDRINUSE
Packit 3c2767
# endif
Packit 3c2767
struct sockaddr_un
Packit 3c2767
{
Packit 3c2767
  short          sun_family;
Packit 3c2767
  unsigned short sun_port;
Packit 3c2767
  struct         in_addr sun_addr;
Packit 3c2767
  char           sun_path[108-2-4];
Packit 3c2767
};
Packit 3c2767
#endif
Packit 3c2767
Packit 3c2767
##EOF##