-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathchanges
3283 lines (2406 loc) · 137 KB
/
changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CHANGES (formerly readme.2nd)
If you are programming with the Waterloo TCP library, the following notes
may prove helpful. Latest changes are added at the top.
- - -
******************* Changes version 2.2 dev.rel.10 ******************
* makefile.all change: Added support for Borland on Win32 (preliminary, not
fully working. Only static library at the moment).
* ./util/mkmake.c changes for S-Lang 2.x; the preprocessor API was changed
in version 2.0.
* Added Pelles-C support (__POCC__) for Win32 targets.
Ref: http://www.smorgasbordet.com/pellesc/
* src/iconv/*.* change: Ran these sources through GNU `ident'.
* pcrecv.c change: For UDP sockets, drop packets looped back by NDIS3PKT
or SwsVpkt drivers under Windows.
* inc/sys/wtypes.h change: Include <stdint.h> for OpenWatcom 1.3 or later.
* ufortify.h change: Add `FORTIFY_GLOBAL_REPLACE' to debug `GlobalAllocPtr()'
and `GlobalFreePtr()'. Used by packet32.c.
* tcp_fsm.c changes: Carey Evans <[email protected]> rewrote the
TCP reassembly code in `tcp_process_data()'. Added functions
`append_out_of_order()', `prepend_out_of_order()' and `copy_in_order()'.
* cpumodel.* changes: Integrated some changes from Carey Evans
* getnet.c fix: forgot to set `n2->n_addrtype = n->n_addrtype' in
`ReadNetworksFile()'.
* netaddr.* change: Renamed `inet_atoeth()' to `_inet_atoeth()'.
* Added ./bin/hx-dos.mak for making Watcom + HX-DOS sample programs.
* wdpmi.c change: Added detection of HX-DOS extended programs;
`dpmi_is_hxdos()'.
* sys/wtime.h change: Don't include <sys/times.h> for MingW. It's no
longer part of MingW.
* pcdhcp.c change: Call `setdomainname()' with `len+1'. Noted by
* pctcp.h, <tcp.h> change: Renamed "mtu" and "mss" to "_mtu"/"_mss".
Due to clashes with OpenSSL etc.
* sys/ioctl.h change: Provide prototype for `ioctl()'.
* Added several typecasts to silence build with gcc 4.0.
* ioctl.c fixes: Carey Evans fixed setting and getting netmask;
case SIOCGIFNETMASK, SIOCSIFNETMASK and SIOCGIFCONF.
* config.h / packet32.* / winpcap.c change: Win32 only. Added USE_DYN_PACKET
to load packet.dll dynamically. Thus allowing Watt-32 to work with Win32
programs on Win-9x/ME.
* winpcap.c change: Replace `printf' with `(*_printf)' in `show_link_details()'.
* transmit.c change: `errno' changed from ENOTCONN to EPIPE if tcp-state
is wrong or `tcp_tick()' fails.
* receive.c change: `errno' changed from ENOTCONN to EPIPE if `tcp_tick()'
fails.
* makefile.all change: Use `ml' to assemble under Visual-C and Windows
(not `tasm').
* tcp_fsm.c bug fix: The detection of keepalive in `tcp_process_ack()'
was wrong; should be "SEQ = RCV.NXT". Moved that to `tcp_estab_state()'
and reply with an ACK if we didn't sent anything else.
* gethost.c, gethost6.c, getserv.c, getprot.c, getnet.c changes: Plug the
memory-leak in `endXent()' functions; only return if `_watt_fatal_error'
is set (possible on DOS only). Otherwise free the linked lists.
* pcsed.c change: `_eth_join_mcast_group()' tries to set RXMODE_MULTICAST1
if not already set. If `_pkt_rxmode' is multicast-2 or promiscous, there
is no need to set mcast-1 or retrieve the multicast list.
* pcpkt.c fix: Changed the `POKEL()' arguments for X32VM and POWERPAK
targets.
* makefile.all change: No need to use `%WATT_ROOT' for Watcom targets.
Output rule `$(LINKARG)' only for Win32 target.
* ioctl.c change: Handle `SIOCSIFFLAGS' command, but only for SOCK_PACKET
type sockets.
* select.c change: New function `handle_ready()' called from `read_select()'.
But for DOS only.
* misc.c change: In `watt_kbhit()', don't test the unget character (`_cbyte'
or `ungetchar'). That caused the function to produce fake kbhits after
`getch()' is called.
* Added test program: src\tests\packet.c for AF_PACKET testing.
* socket.c change: Redesigned Rx-pool logic for AF_PACKET sockets. It
now uses a `pkt_ringbuf' buffer of `MAX_PACKET_BUFS' (10) receive-
buffers. To-do: make the number configurable?.
* winmisc.c change: Added `WSAStartup()' for Winsock compatability.
* x32vm.c change: Save and restore ESI, EDI and EBX registers in some
places.
* tcp_fsm.c change: Limit the Tx buffer size to 6*MSS if using NDIS3PKT
driver. This is to bypass the limitated buffer count allocated for a
DOS-box.
* pcpkt.c change: Added config keyword "PKT.TXWAIT" (pkt_txwait).
This specifies how many msec to wait between retries if Tx fails.
If using NDIS3PKT, this value is at least 1.
******************* Changes version 2.2 dev.rel.9 *******************
* accept.c change: Added `_sock_sig_pending()' to be able to get out of
a stuck loop. Changed condition for connected slot; state >= ESTAB and
state < CLOSED.
* poll.c change: Adapted to handle `MAX_SOCKETS' file/socket handles.
Does not use djgpp's select(). Added `SOCK_DEBUGF()'.
* poll.h change: Moved this header to ".\inc\sys" since no targets have
it.
* select.c change: `read_select()' and `write_select()' now uses djgpp's
own select() when checking standard handles (0-2). This allow testing
if redirected handles are ready.
* udp_dom.c change: Host-names with a trailing '.' shall not cause resolve()
to do a recursive DNS lookup. E.g. resolve("foo.") should simply ask for
address of "foo" and not "foo.domain" etc.
* makefile.all change: Added support for LCC-Win32 compiler (experimental).
CFLAGS for Digital Mars changed; does not use options `-NS' and `-C'.
* pcpkt*.* change: Adapted for `USE_FAST_PKT' with Pharlap, PowerPak
and X32VM extenders. This is now default for all 32-bit targets
except Win32.
* netaddr.c change: `_inet_ntoa()' uses 2 buffers in round-robin if `s'
is NULL.
* bsdname.c change: Changed initial if-test; check that `s->tcp.hisaddr'
and `s->tcp.hisport' are non-zero.
* accept.c change: Protect accept-loop with `_sock_crit_start()' and
`_sock_crit_stop()'.
* socket.h change: `MAX_SOCKETS' increased to 5000. Not really effective
for djgpp since it is limited by max # of DOS handles that can be
created.
* config.h / socket.[ch] change: Removed `#define USE_SOCK_PACKET'. Code
inside it is now default for `USE_BSD_API' code.
* pcdhcp.c change: `set_gateway()' deletes any previous configured gate-
way if value in W32DHCP.TMP is non-zero.
* watt-32.rc change: Added BUILDER (compiler) to product-version field.
Removed watt-32.ico statement.
* winpcap.c change: Test if running Win-NT4 or later; winpcap.c doesn't
work for Win-9x/ME/CE.
* sock_ini.c change: Watcom can use register calls for Win32 targets;
I.e. don't generate an "#error" message. But a Watcom register-call
based watt-32.dll will not work with MSVC or MingW programs.
* misc.h change: Watcom uses 'i64' suffix for 64-bit values.
******************* Changes version 2.2 dev.rel.8 *******************
* pcmulti.c change: Fixed input length calculation. Protect against
multicast-reports looped back by driver (NDIS under Windows).
* sockopt.c change: Set `_multicast_on' if any multicast options are set
or queried. Added handling of `IP_MULTICAST_TTL' and `IP_MULTICAST_LOOP'
(allthough alway 0).
* bsddbug.c change: Change to enable use of `OutputDebugString()' under
Windows. Enabled by "SK_DEBUG.DEVICE = $ODS" in wattcp.cfg.
* pcdbug.c change: Added decoding of T_TXT records in `dns_resource()'.
* pcarp.c change: In `_arp_handler()', print an address conflict warning
if a duplicate IP is found on the network.
* pctcp.c change: Protect against nmap NULL scans. If we receive a TCP
segment to a closed port with all flags off, just drop it (don't answer
with a RST).
* pcdhcp.c change: Call `dhcp_open()' in `DHCP_read_config()' to allocate
a socket. This is needed by DHCP state functions BOUND and RENEWING
called in `eval_timers()'.
* pcsed.c change: Changed `_eth_arrived()' to allow being called with
"type == NULL".
* misc.h change: This file was becoming too big. Moved the timer.c
prototypes and macros to timer.h.
* packet32.* / winpcap.* changes: No need to have the WinPcap SDK installed.
Copied <NTDdNdis.h> WinPcap and added BPF structures to Packet.h.
`pkt_get_stats()' updated to return total statistics.
Added profiling code in `PacketRequest()'.
* misc.c change: New function `fopen_excl()' that on Windows opens a file
in share-mode but denying write by other processes. Uses `fdopen() on
file-descriptor.
* pcdbug.c change: Refined `is_looped()' to consider the case of Winsock
sending (with a different source IP-address). Don't consider that a
looped packet.
* poll.c change: `except' is a pseudo-reserved keyword in Digital-Mars on
Win32. Undefine it before use.
* pcstat.c change: `tcps_connattempt' is connection attemptes on *output*.
`tcps_accepts' is connection accepted on *input*. No counter AFAICS for
attempts to a closed socket (SYN scans).
******************* Changes version 2.2 dev.rel.7 *******************
* pcsed.c change: In `_eth_send()' change how IP loopback-addresses
should be handled; If "(loopback_mode & LBACK_MODE_WINSOCK)", send
to WinPcap driver and the packet is sent on the wire. A later vesion
will try to send to the Winsock loopback provider (a TDI?). The config
keyword "IP.LOOPBACK" thus changed to a bit-mask.
* ports.c change: Allocate `lport_inuse' from heap. Free in rundown
function `exit_localport()'.
* bsddebug.[ch] change: `_sock_enter_scope()', `_sock_leave_scope()' and
`_sock_dbug_flush()' are now macros.
Whole file only built if "USE_DEBUG" and "USE_BSD_API" are defined.
* udp_dom.c change: Optionally try querying the Windows DNS cache before
sending a query to the DNS server(s). Enabled by "DOMAIN.WINDNS = 1".
WIN32 only.
* New file winmisc.c for WIN32 stuff only. New functions `WinDnsQuery*()'
for querying the Windows global DNS cache for A and PTR records.
Controlled by `WINDNS_x' bits in `dns_windns'.
* misc.c change: Added `memdbg_init()' for controlled reporting of runtime
asserts from MSVC's CrtDbg (WIN) and Fortify's reporter. `crtdbg_report()'
traces to `stderr' and causes a breakpoint on assert failures. Hence the
debugger attaches to process and gives a stack backtrace. Later a stack-
walker will be added for finer details.
* misc.[ch] change: Renamed `errno_s' to `_w32_errno'. Increased # of
`exit_list[]' elements to 40.
* Renamed "WATT32_DLL" to "WATT32_DOS_DLL" to not confuse it with generation
of a Win32-DLL version. Renamed "USE_BSD_FUNC" to "USE_BSD_API".
* config.h change: Removed "USE_BSD_FORTIFY". Added "USE_CRTDBG" if MSVC
debug-mode is used. Include <crtdbg.h> in "wattcp.h" only.
Initialise malloc debugging in `memdbg_init()'. Due to data-segment
overflow in most program, USE_BSD_FUNC, USE_DHCP etc. are removed for
all large-models.
* wattcp.h change: Renamed "_DLL" to "WATT32_DLL" due to clash with Visual-C.
* pcpkt.c change: Added asynchronous transmit feature. If this fails in
`pkt_send()', revert back to normal sync transmit. Enabled by
"pkt.txmode = async,timeout" in WATTCP.CFG.
* gettod.c change: Test for `user_tick_active' set by `init_timer_isr()'
and return local-time.
* time.c change: (djgpp) Restore previous SIGALRM handler and interval
timer value in `exit_timer_isr()'.
* winpcap.c changes: Configuration keywords for Windows only:
"PCAP.DEVICE" -> NPF.SYS device-name to use. Default is none which
will selects the 1st suitable device found.
"PCAP.DUMPFILE" -> Filename for dumping WinPcap details.
"PCAP.TXRETRIES" -> # of transmit retries.
"PCAP.TXMODE" -> Select overlapping transmit mode (not yet).
"PCAP.RXMODE" -> Startup receive mode.
"PCAP.RXBUFS" -> Number of kernel buffers for NPF.SYS.
"PCAP.HIGHPRIO" -> Select real-time priority for the capture thread.
* New files packet32.[ch]: Heavily modified, simplified and ANSI-fied from
the WinPcap version. With this addition, Watt-32 on Windows actually works
very well !
* New files winpcap.[ch]: Added Windows and WinPcap support. WinPcap driver
and SDK is available from http://winpcap.polito.it/.
* configur.bat changes: "depend.wat" renamed to "watt32.dep".
* misc.c etc: Dropped use of `BIG_ENDIAN_MACHINE' define. Test only using
`USE_BIGENDIAN'.
* pcconfig.c / timer.c change: Splitted "PROFILE" into "PROFILE.ENABLE" and
"PROFILE.FILE". `profile_init()' now called from `tcp_post_init()'.
* pcdbug.c bug fix: DNS over TCP has a 2-byte length prefix. So call
`dns_dump()' on `data+2' in `tcp_dump()'.
* pcdbug.c change: Decode `T_MX' resource records in `dns_resource()'.
* gethost?.c change: `h->h_name' is now correctly replaced with CNAME if
present in udp_dom.c reply. The original query name is then placed in
`h->h_aliases[0]' (only supports 1 alias per node).
* gethost?.c / udp_dom.c change: Extract alternate list of addresses from
DNS reply; main address is taken from 1st Resource Record and the remaining
A-records is put in alternate list `dom_a4list[]' or `dom_a6list[]'. Used
by `getXbyY()' functions to build the `h->h_addr_list[]' in `fill_hostent()'.
* pcdbug.c change: Added dumping of WINS/WINS-R records in `dns_resource()'.
* connect.c change: Fixed timeout detection in `nblk_connect()'.
I.e. if there is no "ARP response", use a new `sock->nb_timer' to detect
this situation. `tcp_no_arp()' already have set the `sock->so_error'.
* New files dynip.[ch], implements a simple dynamic IP update client.
See ".\bin\dynip.cfg" for configuration. This file could be included from
"wattcp.cfg".
* sockopt.c change: setting TCP_MAXSEG never fails; asserts the value is
between MSS_MIN and MSS_MAX. Handle getting/setting SO_DONTLINGER.
* tcp.h change: Set `*statusptr' = -1 on `tcp_tick()' fail.
To be consistent with other `sock_wait_x' macros.
* tcp_fsm.c change: handle TCP options below. Doesn't do anything with them
though.
* pcdbug.c change: Print "Alternate Checksum Request/Data" TCP options.
TCPOPT_CHKSUM_REQ (14) and TCPOPT_CHKSUM_DAT (15) from RFC-1146.
* pcdhcp.c change: Make the default "W32DHCP.TMP" in %TEMP% directory (unless
overridden by DHCP.CONFIG). Fix for `DHCP_read_config()' returning when it
shouldn't. Reported by Doug Kaufman.
Renamed `_dodhcp' to `DHCP_do_boot'.
* strings.c fix: `strreplace()' didn't advance string in the while-loop.
Reported by Doug Kaufman.
* pcdbug.c change: Print MD5-signature TCP option.
* pctcp.c change: Added insertion and checking of TCP MD5-signature option
from RFC-2385.
* New file tcp_md5.c: Based on RFC-2385 and tcpdump sources, I made this
little extension. A single API function `tcp_md5_Secret()' is used to
calculate the MD5 fingr-print. No function for exchanging secrets with
other peers.
* shutdown.c change: Sets `socket->so_error = ESHUTDOWN'.
* pcpkt.c change: `release_real_mem()' didn't free DOS memory in the rare
case when `_pkt_inf->rm_mem.pm_offset' was 0 (Win9x/ME). Now tests that
`_pkt_inf->rm_mem.rm_offset' is zero before calling DPMI function 101h.
Reported by Doug Kaufman.
* get_ai.c change: Rewritten to plug a memory leak (`aplist' and `apbuf'
wasn't freed).
* New files iconv\*.h, idna.* and punycode.* to support internal characters
in domain-names. Function `IDNA_convert_to_ACE()' called from udp_dom.c
to convert a domain-name to ACE format. Function `IDNA_convert_from_ACE()'
called from udp_rev.c to convert result to native charset. Set WATTCP.CFG
keyword "domain.idna = 0" to disable.
* socket.c etc. change: Removed `USE_LIBPCAP' and added support for
`SOCK_PACKET' sockets (raw link-layer). Added header <net/if_packet.h>
from Linux 2.x. Effective only if "USE_SOCK_PACKET" is defined (default
for all 32-bit targets).
* pcicmp.c change: In `icmp_send_unreach()' limit sending to 20 messages
per second. Ref. RFC-1812.
* pctcp.c change: In `tcp_opt_timestamp()' send `TSval' as # msec since
`watt_sock_init()' was called (relative `start_time').
* pctcp.c change: If socket is listening (LF_IS_SERVER), `tcp_sockreset()'
resets various socket params and goes back to listening.
* pctcp.c fix: `sock_mode()' called with neither TCP_MODE_NAGLE nor
TCP_MODE_NONAGLE bits set was turning Nagle off.
* pcstat.c change: Added counter for `tcpstats.tcps_closed' when sending
FIN or RST.
* pctcp.c change: Fixed config keyword "TCP.TIMER.RESET_TO = 0" to mean
always send a reset for a connection to a closed port. Otherwise, send
RST maximum once per "TCP.TIMER.RESET_TO" time (default 100 msec).
* makefile.all change: Since some make program have problems with sources
in multiple directories I moved .c-sources from zlib/ to src/ and prefixed
with `zl_'.
* config.h change: Added options for zlib `Z_PREFIX' and `FASTEST'.
* pcconfig.* change: `ARG_ATON' renamed to `ARG_ATOIP'.
******************* Changes version 2.2 dev.rel.6 *******************
* pcintr.c change: Save and chain to previous SIGALRM handler (djgpp only).
* misc.h change: Printing a `double' does *not* use "lf" for small/large
models. Uses "f" as all others.
* timer.c change: Bernd Omenitch <[email protected]> contributed code
for timer ISRs; init_timer_isr(), exit_timer_isr() and new_int_8().
Adapted for djgpp, Pharlap and PowerPak also.
* pcconfig.c change: Renamed some "DOMAIN" keywords:
"domain_list" -> "domain.suffix" (to agree what Windows et.al calls it).
"domain_to" -> "domain.timeout"
"domain_recurse" -> "domain.recurse"
Supports old keywords too, but with a deprecated warning (deprecated_key()).
New experimental keywords:
"domain.do_ipv6" and "domain.idna" : See wattcp.cfg.
* pctcp.c change: `_udp_cancel()' and `_tcp_cancel()' calls new function
`sock_reduce_mss()' to reduce MSS in case of an `ICMP_UNREACH_NEEDFRAG'
code. Has no effect on UDP sockets at the moment (not sure it should have).
* pcicmp.c change: Added test for `ICMP_UNREACH_NEEDFRAG' code. Get `next MTU'
from ICMP-packet (this is 0 if router doesn't support RFC-1191) and call
`_*_cancel()'.
* udp_dom.c / udp_rev.c change: Support national characters in DNS name
(forward and reverse) lookups. Only if compiled with `USE_IDNA' (ref.
config.h). This is experimental and may not be able to convert every
charsets to UTF-8 codepoints.
* res_send.c bugfix: Forgot to call `sock_close()' for UDP resolver socket.
This caused `udp_close()' in a new `udp_open()' to crash since socket
was free'd but memory was invalid (the wonders of paging under Windows).
* signal.c change: Rewritten to *not* use `setjmp()' and `longjmp()' as
this is safest when the application also traps SIGINT or ignores SIGINT
completely (`signal(SIGINT,SIG_IGN)'). Now does *not* trap SIGALRM since
we really only need to issue EINTR errors for SIGINT.
* select.c change: Now sets `errno' to `EINTR' if a signal was caught and
return -1. I.e. `_sock_sig_pending()' is non-zero.
* socket.c bugfix: `_TCP_open()' did set "->flags |= LF_NOCLOSE" on non-
blocking connections causing ECN/CWR flags to be sent in TCP-header.
Now AND with `tcp_flagMASK'. Should be "->locflags |= LF_NOCLOSE".
* ip4_out.c change: Added a `_ip4_dont_frag' flag (default FALSE) to control
default DF bit in IP-header. Changed from config via "IP.DONT_FRAG = 0/1".
* pcarp.c change: Make `arp_rexmit_to' configurable; "ARP.RETRANS_TO" in
WATTCP.CFG. Default is 250 msec.
* socket.c change: Refined `icmp_callback()' to set socket error to ENETUNREACH
if receiving "ICMP Network Unreachable". Otherwise EHOSTUNREACH on other
"ICMP Unreachable" codes or ECONNREFUSED on "ICMP Parameter Problem".
* pcdbug.c change: Decode SOA records in DNS debugger.
* pcdbug.c bug-fix: `struct DNS_Hdr' bit-fields was in wrong endian order.
Added printing of `s->recv_next' ("RCV.NXT") and `s->send-next' ("SND.NXT").
* fcntl.c/ioctl.c change: Non-blocking sockets should have infinite connect
timeout (or be controlled by calling application). Therefore reset the
timers `sock->timeout' and `sock->tcp_sock->timeout' when setting SS_NBIO
flag on socket.
* udp_dom.c change: Don't quit `lookup_domain()' on receiving the wrong
ID. That could be caused by two rapid requests and crossing responses.
E.g. called from `getaddrinfo()'.
* udp_rev.c change: `query_init_ip6()' now uses the "ip6.arpa" domain for
reverse lookup of IPv6 addresses.
* pcdbug.c changes:
- Prints some of transport layer header in `ip4_orig_dump()'.
- Prints "RTT-diff" in msec.
- Rewritten IP4-fragment printing.
- `write_pcap_packet()' now uses CPU-timestamp from `struct _eth_last'.
* udp_dom.c change: Rewritten `unpack_domain()' to safe-guard against
trashed DNS-server responses.
* gethost.c fix: Calling `netdb_init()' from `endhostent()' could cause
recursion problems if `sock_exit()' was called before `endhostent()'.
It now only checks file and filename. Return if either is NULL.
* tcp_fsm.c / pctcp.c change: Added `tcp_reasm' config-variable to work
around a bug (?) in TCP reassembly logic. Setting "tcp.reasm = 0"
(default) prevents inserting a possibly overlapping fragment into the
receive buffer. Ref. `tcp_ProcessData()'.
* pctcp.c change: In `tcp_options()'; don't send a Timestamp option in a
FIN segment.
* pcpkt.c change: Fixed the `loadds' pragma for Watcom in `pkt_release()'.
Previously it had no effect. Now it loads the default DS register.
* chksum.h change: `inchksum()' renamed to `in_checksum()' and
`inchksum_fast()' renamed to `in_checksum_fast()'. Renamed `*_chksum()'
to `*_hecksum()' everywhere.
* receive.c change: Added function `recvmsg()' for Linux compatibility.
* tranmsit.c change: Added function `sendmsg()' for Linux compatibility.
* misc.c change: Added function `rundown_add()' and `rundown_run()' for
controlled calling of "atexit" functions. There is now only one `atexit()'
function (`sock_exit()') which in normal exits calls `rundown_run()' to
call all registered rundown functions. Exceptions and signals are
handled a bit differently.
* misc.c change: Rewrote the `WATT_ASSERT()' macro to call new function
`assert_fail()'. Which stores assert cause in a buffer which is also
printed to debug-file at exit.
* pc_cbrk.* change: Renamed `watcbroke' to `_watt_cbroke' and
`wathndlcbrk' to `_watt_handle_cbreak'. Added compatibility macros to
<tcp.h>. Ignore BREAK checking for djgpp-version under Windows (i.e.
for DOS-versions 7.0+ (Win-9x/ME) or 5.5 (Win-NT+). This seems to trap
SIGINT generation more reliably. If BREAK checking was on, NTVDM is
very quick to terminate running program without SIGINT beeing caught.
* signal.c fix: SIGALRM (for djgpp) should be blocked while we're in loops
in `recv()', `connect()' etc. Use `_sock_sigalrm_pending()' to check if
SIGALRM was generated and pending and return -1 with `EINTR' set.
* misc.c change: Detect true DOS-version (store to `_watt_os_ver').
* pcicmp.* change: Renamed some structures to make it possible to include
both "pcicmp.h" and <netinet/ip_icmp.h> in same file (tftp.c).
* socket.* change: `SK_FIRST' is now 3 for all targets to avoid confusing
socket with standard handles.
* select.c change: It's now possible to call `select_s()' on stdin, stdout
and stderr (redirected handles not handled, should test with `isatty()'?).
* transmit.c fix: SOCK_DGRAM sockets couldn't be used in `write_s()' and
`writev_s()'. Now takes `to' address from `socket->remote_addr'.
* pctcp.* change: Removed `_tcp_syn_hook' etc. Added BSD-socket operations
(BSO_xx) called via `_bsd_socket_hook' instead.
* wattcp.h change: Renamed `sol_callb' to `icmp_callb' since this callback
is only used for ICMP events.
* gethost6.c change: Added functions `ReverseHosts6List()' and
`DumpHosts6Cache()' which is called from `_sock_dbug_exit()' at program
exit (Only if `USE_DEBUG' is defined).
* gethost.c change: Added functions `ReverseHostsList()' and
`DumpHostsCache()' which is called from `_sock_dbug_exit()' at program
exit (Only if `USE_DEBUG' is defined).
* pcdhcp.c fixes: `BROADCAST_FLAG' was set in wrong (host) endian format.
Added flag `dhcp_did_gratuitous_arp' checked from `_arp_check_gateways()'.
`setdomainname()' was truncating the last character. I.e. use `len+1'
since DHCP uses Pascal style strings and `setdomainname()' expects max
`len' to make room for 0-terminator. Same applies to `DHCP_TFTP_SERVER'
and `DHCP_BOOT_FILENAME' tags.
* sock_ini.c change: Don't call `_get_machine_name()' unless hostname
is the default ("random-pc").
* pcsed.c change: Added `_eth_mac_len' which is true length of an MAC-
address (6 for Ethernet, 7 for AX25 etc).
* Added ".\inc\err.h" file for Net/FreeBSD compatibility. Simply includes
<sys/werrno.h>.
* inc\netinet\in.h change: Added `ss_len' to `struct sockaddr_storage'.
Not used in Watt-32 library, but some Net/FreeBSD programs requires it.
* pcconfig.c change: Default value for `sock_data_timeout' (DATATIMEOUT
in WATTCP.CFG) set to zero. Too much confusion caused by the old
default value of 120 sec.
* strings.h change: Added printf argument check on `_printf'. Needs
gcc 3.x I think.
* pcstat.c change: New counter for Window update ACKs (tcps_sndwinup).
* tcp_fsm.c change: Fix for closed TCP-window (on our receiving side).
Added `s->locflag' LF_WINUPDATE. Tested in `tcp_Retransmitter()'.
* pcicmp.c change: Assert there's enough TCP-header data in `orig_ip'
before calling `tcp_cancel()' for an ICMP_UNREACH message.
* src\tftp.c, bin\tftp\tftp.c and \inc\arpa\tftp.h changes: Fixes for
receiving > 32 MByte files. Thanks to Alexander Starostin <[email protected]>
for a patch.
* Fixes from Doug Kaufman:
- Move the `priorityname[]' and `facilityname[]' out of <sys/syslog.h>
and into src\syslog.c.
- Fixed some gcc warning in <sys/cdefs.h>, src\pcdbug.c, src\transmit.c.
- Fixed name clashes with <sys/syslog.h> in bin\talk program.
- Various long-file names fixes in some djgpp makefiles and mtr/bping.
* pctcp.c change: Fixed yet again the detection of a reset connection.
The RST is accepted if SEQ >= RCV.NXT and SEQ <= RCV.NXT-RCV.RWIN+1.
Note: The RST is checked again in `tcp_estab_state()'
* pctcp.h change: New hook pointer `_bsd_socket_hook' replaces `_ip4_raw_hook',
`_ip6_raw_hook', `_tcp_syn_hook' and `_tcp_find_hook'.
* socket.c change: New function `socket_op_demux' set in `socket()'.
Calls various functions for each operation `op'.
* udp_rev.c change: `reverse_resolve*()' now takes an extra parameter
`size'.
* udp_dom.* change: Rewritten to avoid module-global variables. Renamed
some structures. Moved udp_rev.h into udp_dom.h. Fixed `extract_cname()'.
* pcconfig.c change: Added `dns_do_ipv6' to config-table.
* misc.c change: Rewrote `intel16()' and `intel()' without the `SWAP*()'
macros (to prevent gcc 3.3.x warnings).
* udp_dom.c change: Added `dns_do_ipv6' to optionally disable use of
AAAA records. Handy for programs using `getaddrinfo()' with unspecified
hints. This causes slowdown because AAAA records are sent before A
records. Very few host's have an IPv6 address at time beeing.
* udp_rev.c change: Return length of request from `qinit_ip?()' and
use that in `sock_write()'. Bug fix in `qinit_ip6()'.
* config.h change: Removed USE_ETHERS and merged in USE_BSD_FUNC.
* bsdbug.c change: Compile file with "USE_BSD_FUNC || USE_DEBUG"
Reported by Nagy Daniel.
* get_xby.h change: Put internal functions in "_w32_" namespace.
******************* Changes version 2.2 dev.rel.5 *******************
* File name changes: Moved all network address functions from udp_nds.c
and pcbsd.c into netaddr.c. Moved rest of pcbsd.c to gethost.c.
Renamed udp_nds.h to netaddr.h.
Renamed pcbsd.h to get_xby.h.
Renamed gxby_r.c to get_xbyr.c.
* wdpmi.c change: Disabled use of `dpmi_except_handler()'. It's supposed
to work only wih Causeway DOSX, but doesn't. Due to lack of a good
Watcom debugger, I've failed to find of why. Any takers?
* getprot.c / getserv.c changes: Sets `h_errno = NETDB_SUCCESS' on success
and `h_errno = NO_DATA' on fail.
* makefile.all change: Add option `-zc' for Watcom small/large models.
This puts constants in the code segment to free up the DGROUP for other
data.
* pcdbug.c change: Experimental support for gzip'ed pcap capture files.
* pctcp.c change: `tcp_write()' speedup; call `tcp_send()' immediately if
Tx-queue length is above minimum of socket max_seg or MSS. Should ideally
be the real Path MTU - 40.
* pcdhcp.c change: In `make_boot_header()': Only set `dh_ciaddr' to non-
zero in BOUND, RENEWING or REBINDING states.
* netaddr.c change: `inet_aton()' no longer checks for non-NULL `adr'
argument. Return value changed to `int'. Return 1 on success.
* pcarp.c change: Send a gratiotous ARP on startup (in _arp_check_gateways()).
Controlled by "ARP.GRATIOTOUS = 1" (default is 0).
* receive.c change: Added function `readv_s()'; reads into a iovec
structure.
* pcsed.c change: Send to loopback only if destination is 127.x.x.x.
* pcsed.c/pcpkt.c change: Added preliminary support for class 17
(Token-Ring with expanded RIF).
* ip4_in.c change: New function `_ip4_is_loopback_addr()'.
* udp_rev.c change: Some checks for malformed replies in `getresult()'.
Assure we don't parse beyond the received packet.
* gethost.c change: Add `dom_cname' as first alias in `gethostbyname()'.
* udp_dom.c change: Extract canonical host name (CNAME) from reply if found
and store to global `dom_cname[]'.
* get*.c change: All <netdb.h> functions rewritten to return an array of
NULLs in `*_aliases' fields. E.g. `gethostbyname()' return with
`h_aliases[0] = NULL' when there's no aliases for host-name (and not
`h_aliases = NULL' as previously). And `get*ent()' functions never
allocates any memory, but returns names and aliases in static buffers.
* misc.c change: Function `setup_dos_xfer_buf()' for Pharlap/X32VM changed
to allocate a DOS-buffer if `_dx_rmlink_get()' returns a too small DOS
transfer buffer size (i.e. `_watt_dosTbSize' < 1024). New function
`free_selector()' called from from atexit-chain and `sock_sig_exit()'.
* pcpkt.c change: `pkt_eth_init()' now returns 0 if okay, else error-code
from sock_ini.h. Size of `PKT_TMP()' is increased to 64 (for setting
large multicast lists).
* sock_ini.c change: Moved the booting (BOOTP, DHCP and RARP) to new
function `tcp_do_boot()'. Only called if at least one `_*on' variable
is set. Don't exit if a boot-method isn't enabled (just print a warning).
New function `sock_init_err()' return textual result of `sock_init()'.
Variables `survive*' renamed to `survive_*'.
* pcbootp.c change: Set exchange ID `xid' to random value from timer.
* pcdbug.c change: `filter' values defaults to zero. In case WATTCP.CFG
isn't found we want to see all traffic (broadcast boot messages).
* config.h change: Removed `USE_BSD_*' and `USE_FRAGMENTS' for large
memory models. Added `USE_DHCP' (since DHCP is more useful than IP
fragments).
* poll.c change: For djgpp use `select()' to allow `poll()' to work on
DOS file-handles as well as sockets.
* gethost.c bug fix: `gethostbyaddr()' called `inet_ntoa()' with `addr'
and not `&addr'.
* tcp_fsm.c / pcpkt.c change: Removed use of `__FUNCTION__'. It's not
supported by all compilers.
* pcdbug.c change: Added feature "DEBUG.PCAP = 1" allows writing Rx/Tx
network traffic to be written in libpcap format.
* pcpkt.c change: Accept PKTDRVR vector to be in range 0x20 - 0xFF if
specified by "PKT.VECTOR = 0xNN". This is to support 1.11+ drivers.
* misc.c change: Include "ioport.h" for __EMX__ so that "extern __inline__"
functions are included for 'gcc -O0'. But I doubt emx is a possible
target for Watt-32.
* pcsed.c change: `dpmi_init()' moved to top of `watt_sock_init()'.
Call `do_exit()' if illegal DOS-extender found. E.g. stubbed to Pharlap,
but library was compiled for Watcom/DOS4GW.
* wdpmi.c change: `dpmi_init()' now implemented for all Watcom 32-bit
targets. Assert that run-time `_Extender' value matches compile-time
DOSX value.
* tcp_fsm.c change: changed the criteria for doing Fast-ACK in
`tcp_estab_state()'; If we advertised a small window (lss than MSS)
in last segment, send ACK immediately. Not sure it's a good idea to
send a dup-ACK if we have missed a segment (s->missed_seg[0]) as this
will cause excessive ACK-ing.
* wattcp.h change: Added `adv_win' to `_tcp_Socket'. This holds the last
value of our receive-window sent to peer (in _tcp_send).
* pcdhcp.c change: Added `dhcp_set_config_func()' to allow application
to handle operations on the transient DHCP configuration; read, write
or erase. See `struct DHCP_config' and `enum DHCP_config_op' in <tcp.h>.
Contributed by Riccardo De Agostini.
* pcconfig.c change: New function `tcp_inject_config()' callable from
application hook (_watt_user_config_fn). Rewritten `tcp_parse_file()'
to be more robust; stops if ^Z is read, handles VB-style quoted strings,
etc. Contributed by Riccardo De Agostini.
* sock_ini.c change: Added func-ptr `_watt_user_config_fn'. Handy for
diskless operation when `_watt_no_config' is set. Contributed by
Riccardo De Agostini.
* wattcp.h / pctcp.c change: Rearranged `sockmode' bits; The values in
<tcp.h> in now mapped to `SOCK_MODE*' bits in `sock_setmode()' so that
e.g. `sock_setmode (TCP_MODE_NONAGLE)' will not inadvertatly turn off
ASCII mode if that was on.
* strings.c change: Added functions `strrtrim()' (strips trailing blanks
from a string) and `strntrimcpy()' (strips leading and trailing blanks
before copying to destination). Contributed by Riccardo De Agostini.
Renamed `strlcpy()' to `StrLcpy()' in case Watt-32 was compiled with
djgpp 2.03, but linked with 2.04 (which already has strlcpy). And vice-
versa.
* pcpkt.c change: The `pkt_receiver_pm()' changed to cdecl. It crashed
when compiled as register call (Watcom with PharLap).
* makefile.all change: Added option `-W' for gcc. Increased warning to
`-w4' for HighC. This resulted in a lot of signed/unsigned warnings
that are now fixed.
* pcbuf.* change: Return value and length arguments changed to `size_t'.
Argument to `sockstate()' changed to `sock_type *'.
* pcrecv.* change: First argument changed from `_udp_Socket *' to
`sock_type *'. Because those functions can be used for TCP too.
* sock_ini.c change: In `sock_sig_exit()' call `_exit()' for Watcom too
(in addition to djgpp and High-C). This prevent a mysterious crash
in DOS4GW that sometime happens when pressing ^Break. I suspect this
has to do with nested use of `longjmp()' ??
* pctcp.h change: `DEF_RETRAN_TIME' reduced to 10 (msec). Gives better
receive-speed on high-speed links with long Round-Trip Times.
* pctcp.c change: In `tcp_abort()' only send RST in states SYNSENT -
LASTACK. Corrected ACK number check when RST is received; Accept
ACK if it is "SND.NXT - (SND.NXT - SND.UNA + 1)".
* sockopt.c change: Handle set/get of `SO_KEEPALIVE' option.
* bsdname.c change: `_get_machine_name()' didn't setup the DS:EDX correctly
for DOS4GW and PowerPak targets.
* pctcp.c change: Flush Tx-buffer before sending RST in `tcp_abort()'.
Refined RST checking in tcp_handler(); The ACK is allowed to be
SND.NXT - (SND.NXT - SND.UNA).
In `tcp_Retransmitter()' reduce the congestion window (s->cwindow) by
1 if there is data in the Tx-buffer. Thus relaxing sending multiple
segments in `_tcp_send()' (the peer may have closed without we hearing
it).
* pctcp.c change: `sock_keepalive()' changed to send 1 byte (only when
connection is idle). BSD 4.2 will not react on zero-sized keepalive
probes.
* pcmulti changes: Make sure `check_mcast_reports()' daemon is only added
once. In `igmp_handler()' return if version is not 1. Renamed `IGMP_QUERY'
to `IGMPv1_QUERY' and `IGMP_REPORT' to `IGMPv1_REPORT'.
* pctcp.c change: Added `MTU' to RTT-cache. Meant to be used in "Path-MTU
discovery" when that's finished. Hence use this MTU for next connection
to the same destination.
* ports.c change: Made the "RAND_LPORT" config-value default to 1;
(use_rand_lport = TRUE).
* tcp_fsm.c/pcstat.c change: Added counters for received TCP duplicate
ACKs and bytes. (tcpstats.tcps_rcvduppack and tcpstats.tcps_rcvdupbyte).
Incremented in `tcp_ProcessData()' when `ldiff < 0'.
* target.h change: Removed "#define read _read" etc. macros for djgpp.
* powerpak.c change: Forgot to save/restore ESI, EDI and EBX in some places.
* tcp_fsm.c change: in `tcp_ProcessAck()', stop RTT-timer (s->rtt_time = 0)
when all sent data have been ACK'ed (s->send_una == 0).
* pcdbug.c change: Changed printing of SACK blocks. Values are now relative
to ACK value in TCP-header (as tcpdump does).
* pcpkt.c change: Don't call `parse_config_pass1()' if `_watt_no_config'
is set.
* ioctl.c change: Allow setting non-blocking `SS_NBIO' state for all
socket types.
******************* Changes version 2.2 dev.rel.4 *******************
* sock_ini.* / tcp.h change: sock_init() is now a macro to ensure that
size of tcp_Socket / udp_Socket structures in <tcp.h> are large enough.
* timer.c change: Set `use_rdtsc' to FALSE if for some weird reason we
failed to estimate the CPU speed.
* pcbuf.c change: `sockerr()' now takes a `const sock_type *' argument.
* wattcp.h change: Added `err_buf' to UDP_TCP_COMMON. Used in those places
where the error string isn't a CONST string. E.g. in udp_open() when
ARP fails.
* wattcp.h change: `MAX_WINDOW' increased to 64 kB for 32-bit targets.
* tcp_fsm.c / wattcp.h change: Added `tx_data' pointer normally pointing
to `tx_buf[0]'. Then in tcp_fsm.c when setting the peer-window the 1st
time, a tx-buffer is allocated from heap. This speeds up transmissions
since we're not limited by the 2kByte Tx-buffer, but by peer's receive
window. Tx-buffer is freed in `_tcp_unthread()'.
* transmit.c change: Some more checks in `writev_s()'; check that total
bytes to be sent is below `SSIZE_MAX' and number of vectors is within
[1..IOV_MAX].
* socket.c change: TCP receive window now configurable with keyword
"tcp.recv_win". Default value is 16 kByte (DEF_RECV_WIN in pctcp.h).
* pcbuf.c change: Added marker signatures at front and end of recv-
buffer. Thus reducing the window by 8. Signatures checked in new
funtion `sock_chkbuf()' called from `tcp_tick()'.
* pctcp.c change: Added a check to test if `tcp_tick()' was reentered
(e.g. from a daemon). If reentered, this could destroy the current
input receive buffer (if using USE_FAST_PKT then there's only one
buffer in pcpkt2.c).
* tcp_fsm.c change: Fixed some bugs in `tcp_ProcessData()'. When a
segment was dropped, the old logic would in some cases overwrite
previously received data or put trash in the socket receive buffer.
* target.h etc. changes: Preliminary support for LADsoft's cc386 2.31+
compiler.
* misc.h change: New macros `WATT_ASSERT()', `RECV_PROFILE()', `DBL_FMT'
and `GEN_INTERRUPT()'.
* wattcp.h change: Renamed `_tcp_Socket' element `acknum' to `recv_next',
`seqnum' to `send_next' and `unacked' to `send_una'. That's more
understandable and in line with BSD's `rcv_nxt', `snd_nxt' and `snd_una'.
* pcarp.c change: Check if it's an ARP-reply before adding/updating the
ARP cache. Prevent anti-sniffers detecting us if we're in Rx-mode 4 or
above.
* timer.c change: Make sure `set_timeout()' never returns 0. It will
only confuse `chk_timeout()'.
* pcrecv.c change: `len' argument changed from `int' to `unsigned' (to
allow 16-bit code to send >32 kBytes).
* sock_ini.c change: New function `sock_sig_exit()' called for unhandled
signals (SIGINT, SIGBREAK, SIGPIPE etc.).
* pcpkt.c change: The real-mode callback was working rather flimsy under
Windows-XP so it was rewritten to use a real-mode stub. For 32-bit
targets, the stub-code gets copied to DOS-memory at runtime. For 16-
bit targets the code is run in-place.
* bsdname.c change: Support UDP scokets also in `_getsockname()' and
`_getpeername()'. Allthough a peer is a misnomer for UDP, it's handy
to be able to return his address and port.
* select.c change: Don't call `SOCK_YIELD()' on small (less than 1 sec)
timeouts. `os_yield()' will sometimes block for 250 msec under Win-XP.
* pcpkt.c change: call new function `pkt_reset_handle()' when releasing
the PKTDRVR handle (in case the application crashed in the receiver
upcall handler). Only called if "PKT.RESET" is enabled. Protect
`get_rmode_data()' with DISABLE() and ENABLE() in some places since
the packet-driver spec doesn't guarantee the data won't change.
* sock_io.c change: Merged the data-buffer and "\r\n" into one sock_write().
This avoids 2 UDP packets to be sent in ASCII socket-mode.
* util\mkdep.c change: Installation fix for djgpp version under Win (9x/XP)
DOS-boxes. If user unzipped source files under plain DOS or used a
non-file-case aware tool under Windows (e.g. PkUnzip or an old Info-ZIP)
all files would be in upper-case and mkdep.exe would also produce
dependencies in upper-case. This would confuse e.g. GNU make compiled
with MingWin (djgpp's gcc and make doesn't seem to mind). mkdep.exe now
always produces output in lower-case. Only include ".c" and ".h" files
in dependency output.
* pcdbug.c change: Rewritten using fopen() API. New function `db_filter()'
examines packet before printing it.
* bsddbug.c / timer.c changes: use `setvbuf()' to set output file to
line-buffered. Use a static file-buffer to avoid malloc crashing in
exception handler.
* pcpkt.c change: Provision for using near-ptr access if enabled by app.
Watt-32 doesn't enable it (except for DJ_BUG code). It's kinda dangerous
as it reduces protection.
* pcpkt.c change: PUSHF/CLI on entry to real-mode callbacks. POPF on exit.
djgpp version saves/restores FS/GS register as that isn't done in the
stub-code. (NDIS3PKT under Win-XP assumes FS/GS are unchanged by
upcall receiver). Print more debug if DJ_BUG is defined.
* bin\common.mak change: Default DOS-extender for wcc386 changed to DOS32A.EXE.
Ref. http://dos32a.sourceforge.net/
This extender (included) is superior to DOS4GW. Requires Watcom's
stub loader %WATCOM%\BINW\STUB32A.EXE. I don't recommend using
PMODEW.EXE since it has some severe bugs (e.g. it truncates file
opened for append, or fails to seek to end-of-file). CauseWay is also
very good.
* pcbug.c change: Detect looped packets in `db_dump()'. When running
NDIS3PKT in promiscous mode (6), all non-broadcast packets sent will
be received approx 100 msec later. This is how NDIS3 is supposed to
work.
* makefile.all change: Watcom targets no longer needs `-ms' wmake option.
* strings.h change: Added macro `strlcpy()'. Replaced `strncpy()' with
`strlcpy()' in some places.