Tree @master (Download .tar.gz)
- debian
- all_digitsA.c
- byteswap_nodestats.c
- die.c
- display_nbtstat.c
- dump_packet.c
- errors.c
- gen_perl.c
- hostname.c
- lookup_hostname.c
- makefile
- nbtdefs.h
- nbtscan.c
- nbtscan_common.h
- netbios_fixname.c
- netbios_name.c
- netbios_pack.c
- netbios_unpack.c
- netmasks.c
- nstrcpyA.c
- packetio.c
- parse_inaddr.c
- parse_nbtstat.c
- parse_target.c
- parse_target_cb.c
- penlib.h
- printable_NETBIOS_question_class.c
- printable_NETBIOS_question_type.c
- process_response.c
- README
- sleep_msecs.c
- stripA.c
- targets.c
- timeval_set_secs.c
- version.c
- win_sock.h
- winsock.c
errors.c @master — raw · history · blame
/*
* $Id: //devel/tools/main/nbtscan/errors.c#1 $
*
* written by : Stephen J. Friedl
* Software Consultant
* [email protected]
*
* When printing error messages, we must often do so via the UNIX
* errno and via the Win32 GetLastError() method. This unifies the
* two.
*/
#include "nbtscan_common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nbtdefs.h"
const char *unix_errorstr(int error_num)
{
return strerror(error_num);
}
#ifdef _WIN32
const char *win32_errorstr(DWORD error_num)
{
static char errorbuf[20];
sprintf(errorbuf, "#%ld", error_num);
return errorbuf;
}
#endif
|