henri
40b11064e4
Use socket_strerror() for error reporting.
...
Report and patch by Gisle Vanem.
2013-08-06 20:10:49 +00:00
henri
3a8607d65c
Restore headers in nsock error.h
...
These includes seem useless and nsock and nmap happily compile w/o them but the
nsock test suite doesn't. Temporarily restore them to their pre-r36100 state
until I can clean and streamline the inclusion tree.
2013-08-06 19:39:39 +00:00
henri
3b6a09954b
Build fix [brown-paper-bag bug]
...
Space inserted between the 'i' and the 'f' in a 'if'.
Reported and fixed by Robert Snyder.
2013-08-06 17:37:16 +00:00
david
61bbe88307
Include "nbase.h" for __attribute__ define on Windows.
...
I needed this on Visual C++ 2010 on Windows XP.
2013-08-06 01:35:33 +00:00
henri
ec55767734
Removed dead code
2013-07-31 19:11:21 +00:00
henri
694a8fe825
Nsock-pcap cleanup
...
Make the API follow the general nsock style. Report errors properly using the
nsock logging facilities.
2013-07-31 19:11:16 +00:00
henri
8352b28e55
Rewrapped and rephrased comments.
2013-07-31 19:11:09 +00:00
henri
23a58a1bc8
Minor style fixes.
2013-07-31 19:01:25 +00:00
henri
76a5565519
Spacing.
2013-07-31 19:01:21 +00:00
henri
105ea877b2
Update error message.
...
Report errors to dev@nmap.org .
2013-07-31 19:01:17 +00:00
henri
5d8fdc74a6
Cleanup conditionally compiled expressions.
2013-07-31 19:01:12 +00:00
henri
098c64a1de
Removed occurences of `assert(0);'
...
Replaced them with `fatal()' so that nsock can compile w/ NDEBUG.
2013-07-31 18:46:57 +00:00
fyodor
83fb10ec56
Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements).
2013-07-28 22:05:05 +00:00
henri
c12b2e4370
Fixed indentation.
2013-06-17 19:23:41 +00:00
henri
9bfe6e46cc
Display the test name before running it.
...
This makes it easier to identify a test that hangs.
2013-06-15 12:33:31 +00:00
henri
a493296c54
Code cleanup.
...
Made get_peeraddr_string() return "peer unspecified" if peerlen <= 0.
This saves a handful duplicate lines that did the check externally.
2013-06-15 12:33:27 +00:00
henri
8b7f91cd0f
Moved gh_lists tests from nsock/src/ to nsock/tests/
2013-05-22 14:35:24 +00:00
david
b6ca01d295
Use /bin/bash in run_tests.sh.
...
I got this error:
./run_tests.sh: 42: ./run_tests.sh: Syntax error: "(" unexpected
2013-05-18 19:18:07 +00:00
henri
192cd3657d
Don't set SO_BROADCAST on SOCK_STREAM sockets.
...
This doesn't make sense and raise verbose errors, at least on Windows.
See: http://seclists.org/nmap-dev/2013/q2/313
2013-05-18 13:24:03 +00:00
henri
3534dfa3b8
Display actual error codes in the nsock messages.
...
Refactored the code a bit too.
2013-05-18 13:23:55 +00:00
henri
8e38e32df1
Run nsock tests by typing make check from nmap/ or nsock/src/
2013-05-18 13:06:10 +00:00
henri
8ab21a452d
Properly declare the proxy spec structures as extern.
2013-05-13 08:05:31 +00:00
david
6b7b428cb9
Remove COMPAT_SRCS and COMPAT_OBJS.
...
These appear not to have any effect any more. They were initially used
to conditionally compile and link some files with replacements for
standard library functions, but seem not to have been used after r828
("Moved to nbase system for compatability funcs").
2013-05-13 04:21:11 +00:00
henri
d9de4cc552
'const static' -> 'static const'
2013-05-12 21:02:29 +00:00
henri
e108771faa
Use the portable socket_errno() & socket_strerror() functions.
2013-05-12 17:48:33 +00:00
henri
28af8f519f
Consistent spacing for switch (<condition>).
2013-05-12 13:40:01 +00:00
henri
ce01e2040a
Refactored code.
...
A switch/case reads easier than a if/else if/else block
to handle multiple cases.
2013-05-12 13:39:53 +00:00
henri
81fda37f89
New function msevent_timedout().
2013-05-12 13:39:45 +00:00
henri
8475cef210
Return actual error code.
2013-05-11 16:00:11 +00:00
henri
34c407189b
s/Little/Minimal/
2013-05-11 16:00:01 +00:00
henri
e54df43edf
Readme file.
2013-05-11 10:22:44 +00:00
henri
3776852557
Added simple TCP connect test and setup ncat listeners.
...
The listeners are ncat-based echo servers:
- UDP
- TCP
- TCP + SSL
2013-05-10 08:26:48 +00:00
henri
1da1fce331
Fixed indentation.
2013-05-08 18:08:48 +00:00
henri
4862bbcbb9
Added a nsock test module for loglevels.
2013-05-08 18:08:38 +00:00
henri
b51a943a48
Added a minimal regression test suite for nsock.
2013-05-08 11:52:28 +00:00
henri
d383df2847
More style fixes.
2013-05-03 21:25:53 +00:00
henri
23dcad8ea4
Removed redundant code. Style fixes.
2013-05-03 20:41:56 +00:00
henri
677492f914
Added missing references to the MSVC project file.
...
Reported by Jaebum Shin.
Fix by Gisle Vanem.
2013-05-03 19:06:40 +00:00
henri
e623d8c9f1
Replaced strtok_r() calls by strtok().
...
The latter is more portable and can replace strtok_r in our case.
2013-05-02 17:32:15 +00:00
henri
6638f749d1
Added explicit pointer cast.
...
Reported by Jaebum Shin.
2013-05-02 16:51:46 +00:00
henri
371be36f88
Declare variables before executing any statement to follow
...
C standards.
Report and original patch by Gisle Vanem.
2013-05-02 08:36:08 +00:00
henri
cce3012ac4
Removed designated structure initializers that break
...
compilation with MSVC.
This was reported by Gisle Vanem.
2013-05-02 08:27:20 +00:00
henri
f90d107b40
Added checks to avoid including netdb.h on platforms that don't provide it.
2013-05-01 15:15:57 +00:00
henri
9b629aaec9
Express fields as uintX_t to ensure portability.
2013-04-30 18:24:50 +00:00
henri
153d3e695c
Reverted r30784.
...
The socks4_data structure is not aligned. Sending sizeof(sock4) bytes
results in invalid requests.
Noticed and reported by David: http://seclists.org/nmap-dev/2013/q2/160
2013-04-30 18:01:24 +00:00
david
3b14d188cb
Add a debug message when binding a socket.
2013-04-27 16:22:11 +00:00
david
67bc0819b4
Use get_localaddr_string in the connect bind log message.
...
This includes the port number, not just the address.
2013-04-27 16:22:09 +00:00
david
21077a93e1
Add get_localaddr_string.
2013-04-27 16:22:07 +00:00
david
d6d2a832db
Factor out the guts of get_peeraddr_string.
2013-04-27 16:22:06 +00:00
henri
a687f70af3
Removed our copy of mkstr, which has been moved to nbase.
2013-04-22 19:37:03 +00:00