summaryrefslogtreecommitdiffstats
path: root/src/include/port-sockets.h
Commit message (Collapse)AuthorAgeFilesLines
* Further fixes for WSA/Posix error translationKevin Wasserman2012-08-031-2/+42
| | | | | | | | | | | | | | Don't translate '0' (no error). Handle WSAEAFNOSUPPORT and WSAEINVAL. Add Posix->WSA translation. Add default translation for unrecognized errors. [ghudson@mit.edu: Merged with master and adjusted comments.] Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> ticket: 7228 (new) tags: pullup
* Correct comments in port-sockets.hGreg Hudson2012-07-121-23/+20
|
* Translate WinSock errors to Posix counterpartsKevin Wasserman2012-07-111-1/+35
| | | | | | | | | | | | | | | | | | | | | MSVC 2010 defines both Posix and WinSock error values so we can no longer simply #define the Posix error values to be their WinSock counterpart. This patch explicitly #includes <errno.h> in port-sockets.h and still conditionally defines the Posix error values for compatibility with older MSVC but also translates WinSock errors to Posix for MSVC 2010 compatibility. The downside to this approach is that there are some Posix errors we do not currently detect (e.g. EADDRINUSE) that are neither #defined nor translated. If we use one of those in the future but fail to update TranslateWSAGetLastError() we'll once again be in the situation that the windows build will compile but fail to work, possibly only when some rare error condition occurs. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> ticket: 7197 (new) tags: pullup
* Reindent include directory, reformatting prototypes as necessary.Greg Hudson2009-11-141-63/+64
| | | | | | | Exclude include/gssrpc due to its Sun origin and k5-platform.h due to macros too hairy for emacs c-mode to handle. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23180 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-2/+2
| | | | | | | | | | | | include directives sometimes using krb5/foo.h and sometimes using foo.h, and -I options always given for both directories in both source and build trees, push include/krb5/* up a level and drop the krb5 directory (except, for the moment, the change log). Updated #include directives, -I options, and dependencies accordingly, and deleted one or two bits of old, unused code that was noticed in the process. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17730 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h: On PalmOS, include autoconf.h and netdb.h, and defineKen Raeburn2005-04-281-1/+7
| | | | | | | | | socklen_t. * socket-utils.h: Include k5-platform.h. (sa2sin, sa2sin6, ss2sa, ss2sin, ss2sin6): Always use inline function form, and use "inline" instead of "__inline__". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17202 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Check for h_errno declaration in netdb.hTom Yu2004-09-151-0/+4
| | | | | | | | * port-sockets.h: Explicitly declare h_errno if it's missing. ticket: 1044 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16758 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h: Remove _XOPEN_SOURCE_EXTENDED hack for netdb.h,Tom Yu2004-09-101-9/+1
| | | | | | | | | as it can cause inconsistencies between headers. It significantly broke HP-UX 10.20 anyway. ticket: 2379 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16740 dc483132-0cff-0310-8789-dd5450dbe970
* zap remaining bits of macsock.h supportKen Raeburn2004-07-171-7/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16612 dc483132-0cff-0310-8789-dd5450dbe970
* * fake-addrinfo.h: Don't include netdb.h, since port-sockets.h already does.Ken Raeburn2004-07-161-1/+10
| | | | | | | | | | | * port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion of netdb.h if it's not defined and not Windows, as fake-addrinfo.h used to do; otherwise just include it normally. ticket: 2379 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16608 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h (inet_ntop): Cast NULL to desired return pointer typeKen Raeburn2004-07-161-2/+2
| | | | | | | ticket: 2592 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16604 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h (inet_ntop) [!_WIN32 && !HAVE_MACSOCK_H]: Define as a macro ifKen Raeburn2003-05-021-0/+15
| | | | | | | | | | not provided by the OS. ticket: 1435 target_version: 1.3 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15391 dc483132-0cff-0310-8789-dd5450dbe970
* Move socklen_t and sockaddr_storage definitions to port-sockets.hKen Raeburn2003-01-101-0/+25
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15108 dc483132-0cff-0310-8789-dd5450dbe970
* Merge more KfM krb4 thingsTom Yu2002-11-271-0/+6
| | | | | | | | | | | | | | | | | | Implement *_in_tkt_creds, mk_req_creds, and rd_req_int functions. Implement KfM krb4 kadm password changing, mostly by pulling in the client side of the kadm library into the krb4 library. Do some more header file cleanup of des.h and krb.h. Remove some ancient krb4 dead weight. Some Mac-specific functionality still needs to be merged. ticket: 1189 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15014 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h: Include sys/filio.h if availableKen Raeburn2002-09-191-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14890 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h (SG_BUF): New macroKen Raeburn2002-08-211-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14739 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h (SOCKET_WRITEV) [!_WIN32]: Use TMP after setting it, to ↵Ken Raeburn2002-07-051-1/+1
| | | | | | silence compiler warnings git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14606 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h (win_socket_initialize): Delete declarationKen Raeburn2002-06-241-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14563 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h [!_WIN32 && !HAVE_MACSOCK_H]: Include krb5/autoconf.h, to ↵Ken Raeburn2002-06-211-0/+2
| | | | | | get HAVE_SYS_UIO_H git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14552 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Check for sys/uio.h.Ken Raeburn2002-06-201-0/+3
| | | | | | | * port-sockets.h [!_WIN32 && !HAVE_MACSOCK_H]: Include sys/uio.h if available, to get struct iovec. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14548 dc483132-0cff-0310-8789-dd5450dbe970
* Client-side TCP support update for Windows.Ken Raeburn2002-06-181-0/+64
| | | | | | Some support for scatter/gather socket i/o added via macros in port-sockets.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14538 dc483132-0cff-0310-8789-dd5450dbe970
* * port-sockets.h: Use Winsock 2 headers for Win32.Danilo Almeida2002-04-111-1/+2
| | | | | | * fake-addrinfo.h: Define HAVE_GETADDRINFO for Win32. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14379 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn2001-10-061-3/+3
| | | | | | FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
* * k5-int.h: krb5_alt_method, krb5_etype_info_entry length fieldsEzra Peisach2000-10-171-1/+1
| | | | | | | | | | | | | | | | | | changed to unsigned int. KRB5_ETYPE_NO_LENGTH defined. Change prototype decode_krb5_sam_key to decode_krb5_enc_sam_key which is what the code says. krb5int_access - change timeouts, shifts, etc to unsigned ints. * krb5.hin: krb5_data, krb5_address, krb5_keyblock, krb5_checksum, krb5_authdata, and krb5_pa_data length fields changed to unsigned int. krb5_kt_get_name(), krb5_unparse_name_ext(), krb5_build_principal(), krb5_build_principal_ext(), krb5_build_principal_va() and krb5_read_password() all take or return unsigned int lengths. * port-sockets.h (SOCKET): Under unix, a socket is of type int. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12773 dc483132-0cff-0310-8789-dd5450dbe970
* Updated header files to use OT Sockets libraryAlexandra Ellwood1999-05-271-13/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11473 dc483132-0cff-0310-8789-dd5450dbe970
* Update port-socket.h to includeSam Hartman1997-02-221-1/+4
| | | | | | sys/types.h to work on NetBSD and AIX. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9943 dc483132-0cff-0310-8789-dd5450dbe970
* Define SOCKET_INITIALIZE and SOCKET_CLEANUP as no-ops under Windows sinceRichard Basch1997-02-211-2/+2
| | | | | | | the Winsock library initialization/cleanup is handled by the DLL entry/exit routines. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9938 dc483132-0cff-0310-8789-dd5450dbe970
* Windows/NT integrationRichard Basch1997-02-061-2/+2
| | | | | | | krb5.hin k5-int.h: Functionalized the crypto layer and made the crypto structures private git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9785 dc483132-0cff-0310-8789-dd5450dbe970
* this commit includes all the changes on the OV_9510_INTEGRATION andMarc Horowitz1996-07-221-0/+72
OV_MERGE branches. This includes, but is not limited to, the new openvision admin system, and major changes to gssapi to add functionality, and bring the implementation in line with rfc1964. before committing, the code was built and tested for netbsd and solaris. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8774 dc483132-0cff-0310-8789-dd5450dbe970