1 2003-12-10 Gary Thomas <gary@mlbassoc.com>
3 * include/netinet/in.h: Prototype for inet_ntoa_r()
5 2003-11-25 Manu Sharma <manu.sharma@ascom.com>
6 * src/sys/net/bridgestp.c: Code for Spanning Tree Protocol (STP).
8 * cdl/openbsd_net.cdl: Changes make provisions for STP code.
9 * doc/openbsd.sgml: Same.
10 * include/net/if.h: Same.
11 * include/net/if_bridge.h: Same.
12 * include/net/if_llc.h: Same.
13 * include/sys/sockio.h: Same.
14 * src/sys/net/if_bridge.c: Same.
16 * doc/openbsd-manpages-stp.sgml: Documentation for OpenBSD specific code
17 * doc/openbsd-manpages-netintro.sgml: Same.
18 * doc/openbsd-manpages-bridge.sgml: Same.
20 2003-09-22 Reinhard Jessich <Reinhard.Jessich@frequentis.com>
22 * include/net/if.h: Define macro IF_IS_EMPTY needed by eth_drv.c
24 2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
26 * cdl/openbsd_net.cdl: Improve doc links.
28 2003-01-30 Jonathan Larmour <jifl@eCosCentric.com>
30 * src/sys/net/if_bridge.c (bridge_input): Learn source host addr,
32 Fix pointed to by Daniel NĂ©ri.
34 2002-12-14 Nick Garnett <nickg@ecoscentric.com>
36 * src/sys/netinet/tcp_usrreq.c (tcp_usrreq): Rearranged ifndef on
37 PRU_SENSE case to keep the case in the switch and let it return a
38 sensible result. Otherwise a stat() on a socket causes a panic().
40 2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
42 * src/ecos/support.c (show_network_tables): New function used
43 to print network information (interface, routing).
45 2002-05-21 Jesper Skov <jskov@redhat.com>
47 * src/lib/recv.c: Fix warning. socket.h declarations are not
48 available to the kernel code. Added missing argument in the
51 2002-05-14 Jesper Skov <jskov@redhat.com>
53 * include/netinet6/in6.h: Fixed warnings.
55 * src/sys/kern/uipc_socket2.c (sblock): Fixed warning.
56 * src/sys/netinet/tcp_input.c: Same.
57 * src/sys/net/if_loop.c (looutput): Same.
58 * src/sys/kern/sockio.c: Same.
60 * include/sys/param.h: Include machine headers after the namespace
61 changing macros to get the desired declarations, thus fixing
64 2002-04-26 Gary Thomas <gthomas@redhat.com>
66 * src/sys/netinet/ip_input.c: Proper "extern" definition of 'ipstat'.
68 * src/sys/netinet/raw_ip.c:
69 * src/sys/netinet/ip_output.c:
70 * include/netinet/ip_var.h: Use of ramdom IP packet id is optional.
72 2002-04-22 Gary Thomas <gthomas@redhat.com>
74 * src/sys/netinet/tcp_usrreq.c:
75 * src/sys/netinet/tcp_output.c:
76 * src/sys/netinet/tcp_input.c:
77 * src/sys/netinet/tcp_debug.c:
78 * include/netinet/tcp_debug.h: Fully conditionalize on TCPDEBUG.
80 2002-03-27 Jonathan Larmour <jlarmour@redhat.com>
82 * doc/openbsd.sgml: Manpages now live in "common" BSD package.
84 2002-03-19 Gary Thomas <gthomas@redhat.com>
86 * src/sys/net/route.c (cyg_route_reinit): Renamed from route_reinit.
88 2002-03-11 Hugo Tyson <hmt@redhat.com>
92 * src/sys/netinet/in.c (in_control): SIOCSIFADDR switch entry
93 moved to before the scan for this same address being in the list
94 already, along with Add and Delete (SIOCAIFADDR,SIOCDIFADDR) arms.
95 It falls through into the same alloc-if-needed code anyway.
96 Thus repeatedly setting the same address does not leak store.
98 * src/sys/net/route.c (route_reinit): Rewrite to delete all routes
99 individually rather than en-masse (leaking store).
100 (rt_reinit_rtdelete): New function; callback for individual
102 (rtioctl): Do not pass in a "route **" to return a pointer to the
103 route removed or added; this results in an extra reference, by the
104 returned pointer, and so a storeleak.
105 (rtrequest): RTM_DELETE arm: do not free a gateway route if the
106 gateway pointer is the same as the route itself - it gets freed
107 *again* at the end of the routine if you do. Just dec the refcnt.
109 2002-03-07 Gary Thomas <gthomas@redhat.com>
111 * include/sys/param.h: Privatize route_reinit(), arc4random().
113 2002-02-28 Hugo Tyson <hmt@redhat.com>
114 2002-02-28 Martin Buck <martin.buck@ascom.ch>
116 * src/sys/net/if_ethersubr.c (ether_input): [Bugzilla 60318]
117 ether_input() schedules processing by calling schednetisr(FOO) and
118 then queues the frame afterwards. Where we cannot be preempted
119 eg. in a DSR or in the original BSD kernel, this is OK. In eCos
120 the call to schednetisr(FOO) might cause a context switch *before*
121 the frame is enqueued. This "jams" one packet in the queue,
122 delaying it until the next packet, and so on.
124 This change makes ether_input() store up the schednetisr() arg
125 until the end, and do the call then, much like it does with the
126 queue to use. Thanks Martin!
128 2002-02-22 Hugo Tyson <hmt@redhat.com>
130 * doc/openbsd.sgml: New file; separated stack-specific docs from
131 monolithic net doc, and tidied up in various ways.
133 2002-02-15 Gary Thomas <gthomas@redhat.com>
135 * cdl/openbsd_net.cdl: Slight changes in layout required by split
138 2002-02-13 Jonathan Larmour <jlarmour@redhat.com>
139 2002-02-13 Andrew Lunn <andrew.lunn@ascom.ch>
141 * include/sys/mbuf.h: Declare variables as extern in header.
142 * src/sys/kern/uipc_mbuf.c: Define mbtypes[] and init it.
144 2002-02-05 Hugo Tyson <hmt@redhat.com>
146 * cdl/openbsd_net.cdl: Place this package below CYGPKG_NET
147 ie. the common networking package. Only affects the view in the
150 2002-01-28 Gary Thomas <gthomas@redhat.com>
152 * src/sys/netinet/ip_input.c: inet_ntoa() is now common.
154 * cdl/openbsd_net.cdl: Renamed from net.cdl. This package
155 is now a proper sub-package, implementing a network stack.
157 2002-01-28 Jonathan Larmour <jlarmour@redhat.com>
159 * cdl/net.cdl: Clarify CYGPKG_NET_ROUTING description.
161 2002-01-08 Jonathan Larmour <jlarmour@redhat.com>
163 * tests/server_test.c (server_test): Correct port conversion.
165 2001-12-14 Hugo Tyson <hmt@redhat.com>
167 * src/sys/net/if_ethersubr.c (ether_output): Never ever print
168 anything! It can recurse unexpectedly if debugging over net.
170 2001-12-10 Andrew Lunn <andrew.lunn@ascom.ch>
172 * cdl/net.cdl: Add configury to eliminate network timing stats.
173 * src/include/machine/param.h: Timing statistics for things like
174 memcpy, mbuf_alloc etc now use configury to determine if the
175 statistics code should be compiled.
176 * src/ecos/support.c: Ditto.
177 * tests/nc_test_slave.c: Only print timing stats when they
179 * tests/tcp_echo.c: Ditto.
180 * tests/nc_test_master.c: Allow building with SNMP lib which has
181 its own gettimeofday(). This should be fixed better a different
182 way but will do for now.
184 2001-12-06 Hugo Tyson <hmt@redhat.com>
186 * src/lib/bootp_support.c (init_net): Just re-tabbed and checked
187 the addition to initialize DNS from DHCP info - it had already
188 snuck into the file in the previous change from Andrew. Include
189 of netdb.h added also, from the patch in Bug 57019. Also check
190 CYGINT_ISO_DNS for the setup code instead of CYGPKG_ISO_DNS.
192 2001-12-04 Jonathan Larmour <jlarmour@redhat.com>
194 * src/lib/bootp_support.c: Check CYGINT_ISO_DNS (from
195 <pkgconf/isoinfra.h>) instead of CYGPKG_ISO_DNS.
197 2001-12-03 Andrew Lunn <Andrew.Lunn@ascom.ch>
199 * src/lib/bootp_support.c: get_bootp_option(): Take the
200 max length of data we want out of the bootp record.
201 * src/lib/dhcp_prot.c: Pass the length we expect for an option.
203 2001-08-16 Anssi Pulkkinen <Anssi.Pulkkinen@ascom.ch>
205 * src/lib/dhcp_prot.c: Make sure we use the newly calculated xid.
207 2001-08-02 Anand Srivastava <Anand.Srivastava@ascom.ch>
209 * src/lib/dhcp_prot.c do_dhcp: ID calculation must be done only
210 once. moved it out the loop.
212 2001-11-21 Hugo Tyson <hmt@redhat.com>
214 * src/lib/dhcp_support.c (dhcp_mgt_entry): If we have an
215 SNMPAGENT, must recycle it whenever we reinitialize all
216 interfaces; call SnmpdShutDown() to cause this.
217 Also re-initialize all loopback interfaces here too.
219 2001-11-30 Hugo Tyson <hmt@redhat.com>
221 * src/lib/dhcp_prot.c (set_default_dhcp_tags): New routine to
222 insert all the extra woffle we need neatly each time, keeping the
223 state machine's case arms to the real work. The new thing this
224 sets is TAG_DHCP_PARM_REQ_LIST, with a list that matches the
225 default set we get from a LINUX dhcpd. This is because M$ servers
226 need explicit requests for eg. TAG_GATEWAY. Note that I have
227 included configuration to override the set of tags requested here
228 in the source, but not yet backed up by CDL - we'll see whether
230 (set_variable_tag): New routine to insert a variable pointed-to
231 data item rather than an int of 1,2 or 4 bytes.
232 (do_dhcp): Call set_default_dhcp_tags() every time we send a
233 packet, rather than ad hoc additions in each state.
235 2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
237 * include/machine/ansi.h: No longer require BSD string function
238 compatibility macros (in fact they confuse things).
240 * cdl/net.cdl: Require BSD compatibility functions from <string.h>.
242 2001-11-19 Hugo Tyson <hmt@redhat.com>
244 * include/bootp.h (BP_STD_TX_MINPKTSZ): New symbol defining the
245 minimal DHCP packet size which we should send.
247 * src/lib/dhcp_prot.c (scan_dhcp_size): New routine to scan up to
248 the end of the packet, for length determination and padding.
249 (dhcp_size): Now uses scan_dhcp_size().
250 (dhcp_size_for_send): New, uses scan_dhcp_size() and pads with
251 zero up to the min packet size that we should send.
252 (do_dhcp): In every sendto() call, use dhcp_size_for_send(xmit) in
253 order to send padded, full size packets as needed. 5 instances.
255 Credit to "Anssi Pulkkinen" <Anssi.Pulkkinen@ascom.ch> for the
256 original version of this patch.
258 2001-11-08 Jesper Skov <jskov@redhat.com>
260 * tests/server_test.c (net_test): Fix compile error.
262 2001-11-02 Gary Thomas <gthomas@redhat.com>
264 * src/ecos/support.c:
265 * include/machine/ansi.h: Add C++ support [externC].
267 2001-11-11 Andrew Lunn <andrew.lunn@ascom.ch>
269 *src/lib/recv.c: Implement the recv() call.
271 2001-10-29 Hugo Tyson <hmt@redhat.com>
273 * src/sys/net/if_ethersubr.c (ether_output): [CASE 106613] Even if
274 the queue is full, and we are dropping the packet, try to start
275 the interface anyway, to give it a chance to empty the queue if
276 the device has recovered from whatever made the queue fill up in
277 the first place - being unplugged from the network for example.
278 This change is belt & braces with a similar policy in the periodic
279 tickle function in the logical ether driver in io/eth/... ; this
280 change will recover the situation immediately if the application
281 continues trying to send despite ENOBUFS.
283 2001-10-25 Hugo Tyson <hmt@redhat.com>
285 * src/sys/net/if_bridge.c (bridge_broadcast): Count if_obytes in
286 destination interfaces as well as the bridge interface; normally
287 this is done in if_ethersubr.c but here we talk directly to the
288 interface, bypassing that layer. Thanks to Andrew Lunn for
291 2001-10-18 Jonathan Larmour <jlarmour@redhat.com>
293 * src/sys/netinet/in.c (in_lifaddr_ioctl): Silence warnings about
296 2001-10-10 Hugo Tyson <hmt@redhat.com>
298 * tests/ftp_test.c (net_test): This was lacking #ifdefs for
299 CYGHWR_NET_DRIVER_ETH0 and CYGHWR_NET_DRIVER_ETH1. Ooops.
301 2001-10-05 Jonathan Larmour <jlarmour@redhat.com>
303 * cdl/net.cdl (CYGPKG_NET_CFLAGS_ADD): Define __INSIDE_NET within
304 this package to allow segregation of definitions only relevant for
305 internal consumption, and definitions allowable for external
308 * include/lib/libkern/libkern.h: Conditionalize on __INSIDE_NET.
310 2001-10-04 Jonathan Larmour <jlarmour@redhat.com>
312 * cdl/net.cdl (CYGHWR_NET_DRIVER_ETH0): Make flavor bool so it isn't
314 (CYGHWR_NET_DRIVER_ETH1): Ditto.
316 2001-10-04 Hugo Tyson <hmt@redhat.com>
318 * src/lib/dhcp_support.c: Some conditional compilation tags were
319 wrong vis a vis ETH1 versus ETH0. Thanks to "Simon"
320 <simoncc@ms46.url.com.tw> for spotting it.
322 2001-10-04 Jesper Skov <jskov@redhat.com>
324 * tests/multi_lo_select.c (cyg_user_start): Added CYG_TEST_INIT
326 * tests/ping_lo_test.c (cyg_start): Same.
327 * tests/tcp_lo_test.c (cyg_start): Same.
328 * tests/udp_lo_test.c (cyg_start): Same.
329 * tests/tcp_lo_select.c (cyg_start): Same.
331 2001-09-28 Jonathan Larmour <jlarmour@redhat.com>
333 * cdl/net.cdl: Tell isoinfra we support getproto* and getserv*
335 * include/netdb.h: Move to...
336 * include/net/netdb.h: ...here.
338 2001-09-25 Jesper Skov <jskov@redhat.com>
340 * cdl/net.cdl: Don't build tests/nc_test_master as it's a host
343 * src/lib/getserv.c: Added domain service.
345 * include/netdb.h: Moved getbyhost()/getbyaddr() declarations and
346 hostent struct definition to the DNS package.
348 * src/lib/gethost.c: Removed.
350 * cdl/net.cdl: Removed gethost.c (replaced by proper
351 implementation in CYGPKG_NS_DNS).
353 2001-09-17 Hugo Tyson <hmt@redhat.com>
354 2001-09-17 Andrew Lunn <Andrew.Lunn@ascom.ch>
356 * src/sys/net/if_bridge.c (bridge_broadcast): Fix a null pointer
357 deference. Supporting VLANs, it seems that during the net_init()
358 function, it sends a packet to the bridge with the source
359 interface being NULL. Stats counting assumed otherwise.
361 2001-09-14 Jonathan Larmour <jlarmour@redhat.com>
363 * src/sys/kern/uipc_syscalls.c: Last change to uipc_syscalls.c
364 wasn't right. The parts that were __ECOS__ should simply have
365 been completely removed.
367 2001-09-13 Hugo Tyson <hmt@redhat.com>
369 * cdl/net.cdl: Add configury to control whether we can tickle the
370 network devices if there's a lack of network traffic, and to
371 control the delay time before so doing.
373 * src/ecos/timeout.c (alarm_thread): Use a timed wait, if so
374 configured, for the flag; and if it times out, tickle all the
375 devices via the common ether driver routine for so doing.
377 2001-09-12 Jonathan Larmour <jlarmour@redhat.com>
379 * include/sys/socketvar.h: Use __ECOS, not __ECOS__.
380 * src/sys/kern/uipc_syscalls.c: Ditto.
381 * src/sys/kern/uipc_socket2.c (sblock): Ditto.
383 2001-08-02 Jonathan Larmour <jlarmour@redhat.com>
385 * tests/linux_echo.c (echo_test): Set socket options before bind.
386 * tests/nc_test_slave.c (do_tcp_test): Ditto.
387 * tests/server_test.c (server_test): Ditto.
388 * tests/tcp_echo.c (echo_test): Ditto.
389 * tests/tcp_lo_test.c (server): Ditto.
390 * tests/tcp_sink.c (sink_test): Ditto.
391 * tests/tcp_source.c (source_test): Ditto.
393 2001-07-27 Jonathan Larmour <jlarmour@redhat.com>
395 * include/sys/select.h: Renamed to....
396 * include/sys/bsdselect.h: New file.
397 * include/sys/socketvar.h: Include <sys/bsdselect.h> instead of
399 * src/lib/select.c: Include <sys/bsdselect.h>
401 2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
403 * cdl/net.cdl (CYGPKG_NET_API_LOCAL): Implements select()
404 * include/sys/bsdtypes.h: No need for these select definitions.
406 2001-06-20 Grant Edwards <grante@visi.com>
407 2001-06-20 Hugo Tyson <hmt@redhat.com>
409 * src/lib/dhcp_prot.c (alarm_function): Change the lease state
410 before re-enabling the alarm so that if it somehow gets times of
411 zero (ie. right now) it quickly completes the state machine rather
412 than recursing to its doom.
413 (new_lease): Test the retcode of get_bootp_option() and use
414 obvious defaults if the T1 and T2 times are not provided - this is
415 RFC compliant! - and use "infinite lease" if the lease time is not
418 2001-06-19 Trenton D. Adams <tadams@extremeeng.com>
420 * tests/server_test.c (server_test): Null terminate read string
423 2001-06-13 Jonathan Larmour <jlarmour@redhat.com>
425 * cdl/net.cdl: Make debug output an option. Include DHCP.
427 * src/lib/dhcp_prot.c: DHCP_CHATTER -> CYGDBG_NET_DHCP_CHATTER
429 * src/ecos/support.c (cyg_kmem_init): Only print debug output if
432 * cdl/net.cdl: Make requirements on other eCos features more
435 2001-05-09 Robin Farine <acnrf@dial.eunet.ch>
436 2001-05-09 Hugo Tyson <hmt@redhat.com>
438 * src/lib/dhcp_prot.c (do_dhcp): In DHCPSTATE_INIT case, create a
439 new xid. Servers apparantly can use *only* this to distinguish
440 machines, even with different MAC addresses! Therefore we use
441 both the most sensitive randomizer available (arc4random()) which
442 in reality uses a finegrain clock, and salt the value further with
443 the MAC address itself. Thanks again Robin.
445 * src/ecos/support.c (arc4random): Make arc4random not always be a
446 multiple of 256; stir the clock into the low bits also.
448 2001-05-09 Robin Farine <acnrf@dial.eunet.ch>
449 2001-05-09 Hugo Tyson <hmt@redhat.com>
451 * src/sys/net/if_bridge.c: Patch from Robin; the route aging
452 process took twice as long to timeout because an entry requires
453 *two* executions of bridge_rtage() to actually get removed.
454 Record the timeout over 2 to fix that and also define
455 BRIDGE_RTABLE_TIMEOUT as 300s that the standard specifies as
458 2001-05-09 Hugo Tyson <hmt@redhat.com>
460 * src/lib/getserv.c (setreturned): New routine to set up a copy of
461 the service data with the port converted to network order like the
462 API demands. It's this way to make the initialization of the
464 (services[]): Added an entry for snmp.
465 (getservbyname): Use setreturned() to return adjusted info.
466 (getservbyport): Use setreturned() to return adjusted info and
467 compare with host-ordered version of the port.
469 * src/lib/tftp_client.c (tftp_get):
470 (tftp_put): Do not convert to net order from
471 the getserv structure; it's already net order.
473 * src/lib/tftp_server.c (tftpd_server): Convert the socket into
474 host order; it's network order in the getserv API.
476 * tests/ftp_test.c (ftp_test): Do not convert to net order from
477 the getserv structure; it's already net order.
479 * tests/tftp_client_test.c (PUTFILE): Changed the names of the
480 test files to be fully qualified, this makes the test work with
481 more server machines. /tftpboot/tftp_get and /tftpboot/tftp_put.
483 2001-04-24 Bart Veer <bartv@redhat.com>
486 Prevent multiple device drivers from implementing the
487 same eth0/eth1 device.
489 2001-03-30 Jonathan Larmour <jlarmour@redhat.com>
491 * cdl/net.cdl (CYGPKG_NET_SYSCTL): Comment out - currently unsupported.
493 2001-03-28 Richard Panton <rpanton@3glab.com>
495 * include/bootp.h: Define func protos with C linkage
496 * include/netdb.h: Ditto
497 * include/network.h: Ditto
498 * include/tftp_support.h: Ditto
500 * src/lib/getserv.c: getservbynumber() -> getservbyport()
502 2001-03-12 Gary Thomas <gthomas@redhat.com>
504 * src/lib/network_support.c (init_all_network_interfaces):
505 FIx slightly broken previous attempt in abort code.
507 2001-03-11 Gary Thomas <gthomas@redhat.com>
509 * src/lib/network_support.c (init_all_network_interfaces):
510 Let initialization of PCMCIA devices abort after ~5 seconds.
512 2001-02-23 Jonathan Larmour <jlarmour@redhat.com>
514 * src/lib/tftp_server.c (STACK_SIZE): Align
516 2001-02-20 Jonathan Larmour <jlarmour@redhat.com>
518 * cdl/net.cdl: Avoid puts to the CDL header when a CDL
520 Rename CYGPKG_NET_BRIDGE_CODE -> CYGPKG_NET_BRIDGE
521 Rename CYGPKG_NET_NBRIDGE -> CYGNUM_NET_BRIDGES
522 Rename CYGPKG_NET_BRIDGE_HANDLER -> CYGINT_NET_BRIDGE_HANDLER
523 Make if_bridge.c compilation conditional on CYGPKG_NET_BRIDGE
525 * src/sys/net/if_bridge.c: Reflect above renames.
527 2001-02-20 Hugo Tyson <hmt@redhat.com>
528 2001-02-15 Martin Buck <martin.buck@ascom.ch>
530 * cdl/net.cdl: Split up CYGPKG_NET_NBRIDGE into 2 parts:
531 CYGPKG_NET_NBRIDGE and CYGPKG_NET_BRIDGE_HANDLER. If
532 CYGPKG_NET_BRIDGE_HANDLER is nonzero, calls to an Ethernet
533 bridge are inserted into the stack's data path. If
534 CYGPKG_NET_NBRIDGE is nonzero, the standard OpenBSD bridge
535 code is added. This setup allows you to implement your own
536 bridge as a separate package which then implements
537 CYGPKG_NET_BRIDGE_HANDLER so it gets called by the stack.
538 NBRIDGE now is the same as CYGPKG_NET_BRIDGE_HANDLER instead
539 of CYGPKG_NET_NBRIDGE. This means it's nonzero if the bridge
540 is wanted, but it no longer contains the number of bridge
541 buffers requested. This shouldn't be a problem, because the
542 only place where the actual number of buffers is required is
543 in if_bridge.c, which now uses CYGPKG_NET_NBRIDGE instead
546 * src/sys/net/if_bridge.c: Use CYGPKG_NET_NBRIDGE instead of
547 NBRIDGE, because the latter one now only means that there is
548 a bridge, not that we should implement it.
550 2001-01-07 Gary Thomas <gthomas@redhat.com>
552 * src/ecos/support.c:
553 * cdl/net.cdl: Add interface 'CYGPKG_NET_DRIVER_FRAMEWORK'
554 to describe interdependencies between network stack and driver
558 2001-01-03 Hugo Tyson <hmt@redhat.com>
560 * tests/linux_echo.c: New file to test for network bandwidth
561 limitations in host side. Builds to a linux version of the
564 * tests/make.linux (all): Build linux_echo.
566 2001-01-03 Hugo Tyson <hmt@redhat.com>
568 * include/dhcp.h (struct dhcp_lease): Define the semaphore pointer
569 field in each lease structure.
571 * src/lib/dhcp_support.c: Initialize the dhcp_lease structs to
572 point to the semaphore "dhcp_needs_attention".
574 * src/lib/dhcp_prot.c (alarm_function): Post to the semaphore
575 pointed to in the lease structure, rather than one hard-coded.
576 This is much cleaner, in that dhcp_prot.c now uses no external
577 variables, all state goes through the API.
579 2000-11-15 Hugo Tyson <hmt@redhat.com>
581 * src/lib/bootp_support.c (init_net): Do a SIOCSIFADDR a 2nd time
582 after setting the netmask (SIOCSIFNETMASK) in order for the newly
583 set netmask to "take" - otherwise a bogus route based on the
584 default netmask lurks within the system.
586 2000-11-10 Hugo Tyson <hmt@redhat.com>
588 * src/ecos/support.c (cyg_net_get_mem_stats): New API for getting
589 info on the various mem pools the stack uses to enable tests to
592 * include/network.h (cyg_net_get_mem_stats): Export this API for
593 automated network testing.
595 2000-10-24 Hugo Tyson <hmt@redhat.com>
597 * src/lib/tftp_server.c (tftpd_server): Cut down the chatter to
598 nothing (unless there's an error) if running automated testing.
600 2000-10-17 Hugo Tyson <hmt@redhat.com>
601 2000-10-10 Andrew Lunn <Andrew.Lunn@ascom.ch>
603 * src/ecos/support.c (setsoftnet,cyg_panic): Less chatter,
604 particularly not when we're out of MBUFs.
606 2000-10-17 Hugo Tyson <hmt@redhat.com>
607 2000-10-10 Andrew Lunn <Andrew.Lunn@ascom.ch>
609 * src/sys/net/if_bridge.c: Intergrated a more up to date version
610 from the OpenBSD sources. This fixes a few bugs.
612 2000-10-17 Hugo Tyson <hmt@redhat.com>
614 * src/ecos/support.c (cyg_ktime_init): Start time at 1 Second so
615 that all visible time values are valid; offset time by 1 Second
616 subsequently, for ever.
618 * src/sys/netinet/if_ether.c (arpresolve): Undo the change below;
619 instead make "kernel time" be valid ie. more than 1 second into
620 its life. Dumb stack assumes it takes UNIX-like time to start.
622 2000-10-16 Hugo Tyson <hmt@redhat.com>
624 * src/sys/netinet/if_ether.c (arpresolve): Deal with the initial
625 case when the route timeout is zero (as initialized). Otherwise
626 it never actually sent out the initial ARP request packet. This
627 caused connect() not to work, and thus ftp_test, for example.
629 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Also
630 initialize the dhcp semaphore here. The other place it is init'd
631 [correctly] didn't fire if we use the standard support. Fixed
632 some absent return value warnings.
634 2000-10-10 Hugo Tyson <hmt@redhat.com>
636 * src/lib/tftp_server.c (tftpd_server): Modify the server to
637 support multiple sessions - ie. starting N servers at once.
638 Mainly this means closing the initial socket whilst servicing a
639 request, so that another server can then bind to it; tell another
640 server to retry that bind via a semaphore, that it waited on when
641 the bind failed initially, rather than just returning.
643 * src/lib/tftp_dummy_file.c (dummy_open): Trivial bugfix: scan the
644 list of files as well as incrementing the counter.
646 2000-10-05 Andrew Lunn <andrew.lunn@ascom.ch>
648 * src/ecos/support.c (cyg_ktime_func,cyg_ktime_init,cyg_net_init):
649 Make 'ktime' value valid.
651 2000-10-05 Hugo Tyson <hmt@redhat.com>
653 * src/lib/tftp_server.c (tftpd_write_file): Restructure this
654 function to match the loop layout of the tftpd_read_file; so that
655 it retries sensibly, and so that a delayed/duplicated packet does
656 not cause a doubling of all traffic with a less smart host.
658 2000-10-05 Hugo Tyson <hmt@redhat.com>
660 * include/tftp_support.h (TFTP_TIMEOUT_MAX): Change this to 50; it
661 refers to total timeouts for a whole session, so it should be
662 greater than the retry count for each packet.
664 2000-10-05 Hugo Tyson <hmt@redhat.com>
666 * src/lib/tftp_dummy_file.c: Make the fake file slots be a Mb
667 instead of 10k so that you can do meaningful timing tests with it.
668 (dummy_open): Allow re-write of an existing file so that you can
669 do repeated put tests without running out of slots.
671 2000-10-05 Hugo Tyson <hmt@redhat.com>
673 * src/lib/select.c (_cyg_select): Unlock the scheduler in a couple
674 of other places I missed. Doh.
676 2000-09-28 Hugo Tyson <hmt@redhat.com>
678 * src/lib/select.c (_cyg_select): Elect to wait for the flags
679 atomically wrt sockets possibly becoming ready - this was a race
680 condition that would apparently delay a packet until another
681 arrived, eg. a tftp retry. Then two came along all at once.
683 2000-09-28 Hugo Tyson <hmt@redhat.com>
685 * src/lib/tftp_server.c: Add lots of instrumentation for
686 debugging. It's switched off, and doesn't have a real config opt,
687 though it easily could have.
689 2000-09-26 Hugo Tyson <hmt@redhat.com>
691 * src/lib/tftp_server.c (tftpd_read_file): Doh! TFTP_TIMEOUT is an
692 internal API thing, not an error we can send in an ERROR packet.
694 * include/tftp_support.h: Comment to this effect.
696 2000-09-26 Hugo Tyson <hmt@redhat.com>
697 2000-09-25 Andrew Lunn <Andrew.Lunn@ascom.ch>
699 * src/lib/tftp_server.c: Send an ERROR packet when giving up after
700 too many timeouts. This should cause the client to give up as
701 well. Also moved all the replicated code to send an ERROR packet
704 [Huge] I collected another point where we can use the common
705 function also, and used ETIMEOUT instead of EBADOP for the new
706 error packet returns. Thanks Andrew!
708 2000-09-14 Hugo Tyson <hmt@redhat.com>
710 * cdl/net.cdl (CYGOPT_NET_DHCP_DHCP_THREAD_PARAM): Set default to
711 1 so that the DHCP management thread loops forever. This allows
712 it to recover from a DHCP renewal failure.
714 * src/lib/dhcp_prot.c (next_timeout): Harden the DHCP protocol
715 machine against [simulated] failures - otherwise the tests with
716 simulated failures tend just to close down all the interfaces when
717 DHCP packets are lost.
719 2000-09-11 Gary Thomas <gthomas@redhat.com>
721 * src/lib/bootp_support.c (init_net): Set default route correctly.
723 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
725 * src/ecos/support.c (cyg_net_init): You can't print things while
726 initializing the network! Well, not if connected to GDB over the
727 network anyway. The printf("Init device '%s'...); removed.
729 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
731 * OVERVIEW: This is part of the change to the network stack to
732 greatly reduce latencies both of (other) DSRs and of thread
733 scheduling. All the work that the network stack *and* individual
734 ether drivers used to do in DSRs (including alarm callbacks and
735 data copies to/from the device memory) is moved into a "fast
736 network thread" instead. It calls a device's "deliver" function
737 to do the work that was previously in the DSR. This is a separate
738 thread so that it can be set higher priority than application
739 threads in order to minimize packet loss (depending on the
740 driver), if required (the application threads presumed to be
741 higher priority in turn than the network thread). A crucial
742 consequence of this is that we are no longer locking against DSRs,
743 so a plain mutex can be used rather than the global scheduler
744 lock, thus simplifying all the splfoo/splx() style functions.
746 * src/ecos/timeout.c (alarm_thread): Addition of the "fast network
747 thread" which runs DSR-like activities.
748 (do_timeout): Timeout function morphed for calling from that.
749 (do_alarm, ecos_synch_eth_drv_dsr): new DSR functions to signal to
751 (timeout): Race condition fixed. splinternal() used for locking
752 instead of scheduler.
754 * src/ecos/support.c (cyg_net_init): Splfoo/splx() functions,
755 together with tsleep/wakeup functions, all removed to separate
756 them from the mixed bag of utilities in this file. What remains
757 is mbuf wrapper routines and the like, plus the network "netisr"
758 thread itself, the caller into the stack that does the slower
761 * src/ecos/synch.c: New file; implemtation of new splfoo/splx()
762 functions, together with tsleep/wakeup functions, since they are
765 * cdl/net.cdl: Compile new file synch.c; two new options, one for
766 "fast thread" priority, and one for DHCP manager thread priority,
767 as I was adding prio configury. CYGPKG_NET_FAST_THREAD_PRIORITY
768 and CYGPKG_NET_DHCP_THREAD_PRIORITY resp, with suitable default
769 values relative to the CYGPKG_NET_THREAD_PRIORITY.
771 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Use the
772 configured priority rather than just "net thread - 1"
774 2000-08-31 Hugo Tyson <hmt@cygnus.co.uk>
776 * tests/tcp_echo.c: Change the priorities of the main and loading
777 threads to accommodate the network having helper threads around at
778 adjacent priorities to its main thread prio.
780 2000-08-24 Hugo Tyson <hmt@cygnus.co.uk>
782 * src/sys/net/if.c (ifioctl): Support the two new ioctl() keys; at
783 this level, the struct ifreq at the head of the data area must be
784 filled to select an interface.
786 * include/sys/sockio.h (SIOCGIFSTATSUD): Add two new eCos-only
787 ioctl() keys, SIOCGIFSTATSUD and SIOCGIFSTATS, for reading
788 statistical information out of ethernet devices, for SNMP. This
789 should allow SNMP (a) to not explode, (b) to get useful info out
790 of other device implementations than this one.
792 2000-08-17 Hugo Tyson <hmt@cygnus.co.uk>
794 * src/ecos/timeout.c (timeout): Rework the timeout system to
795 record last-time-we-set-the-alarm and whence values, so that new
796 timeouts being added can be set up relative to the correct
797 absolute time. Otherwise adding a new timeout sets them *all*
798 into the future by the expired portion of the previous minimum
799 pending timeout. Also deal better with recursion ie. timeout
800 handlers themselves setting new timeouts as is only natural.
803 * src/ecos/support.c (cyg_splsoftnet): Use the new kernel facility
804 to lock mutex &c atomically, with the scheduler locked already.
805 (cyg_tsleep): Similarly, and reclaim the mutex likewise.
806 Also added lots of asserts to both calls the better to document
809 2000-08-17 Hugo Tyson <hmt@cygnus.co.uk>
811 * src/lib/tftp_server.c: Fix contributors field.
813 2000-08-16 Hugo Tyson <hmt@cygnus.co.uk>
815 * src/lib/tftp_server.c: Improvements to server wrt better error
816 messages and detection of filesystem errors eg. on close-file.
817 Contrib from ASCOM. I tidied up some comments and indent to
818 minimize the diff. [CASE 104354]
820 2000-08-15 Hugo Tyson <hmt@cygnus.co.uk>
822 * doc/bridge.html: New file...
823 * doc/bridge.doc: New file...
824 provided by ASCOM from the OpenBSD version.
826 2000-08-15 Hugo Tyson <hmt@cygnus.co.uk>
828 * src/sys/net/if_bridge.c (bridge_ioctl): SIOCBRDGSTO takes
829 argument in seconds not in ticks. So move around some mul/div by
830 hz ops to get this right.
832 2000-08-14 Gary Thomas <gthomas@redhat.com>
834 * src/ecos/support.c: Use new table definition mechanism.
836 2000-07-27 Hugo Tyson <hmt@cygnus.co.uk>
838 * src/lib/dhcp_prot.c (do_dhcp): Use xmit->bp_htype =
839 HTYPE_ETHERNET rather than ifr.ifr_hwaddr.sa_family; sa_family is
840 in a different namespace, despite appearances.
842 * src/lib/bootp_support.c (do_bootp): Use bp_htype =
843 HTYPE_ETHERNET rather than ifr.ifr_hwaddr.sa_family; sa_family is
844 in a different namespace, despite appearances.
846 2000-07-27 Nick Garnett <nickg@cygnus.co.uk>
848 * cdl/net.cdl: Require the C library STDIO package to be present
849 if there is more than one loopback interface. This is because it
850 needs sprintf() to form the interface names.
852 * src/sys/net/if_loop.c (loopattach):
853 Only use sprintf() to form the loopback interface names when there
854 is more than one. The CDL ensures that this will work.
856 * src/lib/network_support.c:
857 Added diag_printf() version of perror() for when STDIO package is
859 Only use sprintf() to form the loopback interface names when there
860 is more than one. The CDL ensures that this will work.
862 * tests/multi_lo_select.c:
863 * tests/ping_lo_test.c:
864 * tests/tcp_lo_test.c:
865 Removed dependence on C library by adding a substitute perror()
866 based on diag_printf() that is enabled when the STDIO package is
869 2000-07-26 Hugo Tyson <hmt@cygnus.co.uk>
871 * src/lib/dhcp_prot.c (do_dhcp): Set the broadcast flag where
872 necessary, and the client address too. This makes it talk to a
873 greater range of servers OK.
875 2000-07-25 Nick Garnett <nickg@cygnus.co.uk>
877 * tests/multi_lo_select.c: Changed definition of NLISTENERS to
878 work correctly with FILEIO package.
880 * src/sys/net/if_loop.c (loopattach): Changed initialization of
883 * src/ecos/support.c (cyg_net_init): Removed redundant code to
884 initialize loop-back interface.
886 2000-07-25 Hugo Tyson <hmt@cygnus.co.uk>
888 * src/lib/getserv.c: Add a list terminator record with NULLs in it
889 so that the search finishes (without throwing asserts about bad
892 2000-07-21 Hugo Tyson <hmt@cygnus.co.uk>
894 * src/sys/net/if_bridge.c: Move the include of stdio.h lower,
895 apparently it confuses local x86 compilers if their host tree is
896 malformed. Or something.
898 2000-07-21 Hugo Tyson <hmt@cygnus.co.uk>
900 * cdl/net.cdl: Add a lot of description about the way the various
901 fields are used in interface initialization: specifically that
902 "server" so-called is just "someone to talk to" in the absence of
903 bootp - and our tests depend on it!
905 * src/lib/bootp_support.c (init_net): Only set up a route if the
906 route address is nonzero - or all manner of confusion occurs with
907 multiple interfaces and route that sends to 0.0.0.0...
908 For setting up the default route, use
909 (SIOCADDRT, 0, 0, TAG_GATEWAY)
910 rather than the bogus
911 (SIOCADDRT, yiaddr & netmask, netmask, TAG_GATEWAY)
914 * tests/ftp_test.c (ftp_test): Try it with eth1 if available also.
916 * tests/ping_test.c (ping_host): If a ping fails, reset the packet
917 size to small just in case the huge packet size is what's causing
918 confusion - helps it as a debug tool.
920 * tests/dhcp_test.c (net_test): It didn't compile if DHCP is
921 disabled! Doh. Same change as ping_test also.
923 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
925 * src/lib/tftp_server.c (tftpd_read_file): Deal with a) [assumed]
926 timeouts on the select, and b) ACKs for old packets.
927 [CASE 104052 and CASE 104055]
929 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
931 * src/lib/select.c (_cyg_select): Return 0 and do not perturb
932 errno when the timeout occurs. That matches the man page!
935 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
937 * include/machine/param.h: Be more defensive against warnings from
938 external defines such as __linux__/__bsdi__/__FreeBSD__/...
941 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
943 * tests/multi_lo_select.c: New test program to test for proper
944 broadcast behaviour of select() implementation. Took some
945 fiddling to get it to work, but it really did fail before the
948 * cdl/net.cdl: Build the new test.
950 * src/lib/select.c (_cyg_select): Don't use the CLR flag in the
951 flag wait because that gives unicast semantics. Flags have
952 producer-does-all-the-work behaviour, so setting a value then
953 clearing it right afterwards does the right thing, with broadcast
954 semantics so long as no waiter has set the CLR part.
957 2000-07-18 Hugo Tyson <hmt@cygnus.co.uk>
959 All part of the bridge contribution from Andrew Lunn/ASCOM
960 (andrew.lunn@ascom.ch). Bridginess is controlled by NBRIDGE which
961 is itself controlled by CDL option CYGPKG_NET_NBRIDGE aka "Number
964 * include/machine/param.h: Add proper definition of untimeout().
966 * include/sys/sockio.h (SIOCBRDGFRL): Add this and the other 2
967 bridge ioctl() call definitions.
969 * include/sys/param.h (splhigh): Added.
971 * src/ecos/timeout.c (untimeout): Implement this properly, it was
974 * src/ecos/support.c: implement cyg_splhigh(), call bridgeintr()
975 when it is scheduled and bridgeattach() if configured.
977 * tests/bridge.c: New "test" file - implements an ethernet bridge.
978 Contributed by Andrew Lunn/ASCOM, from the usual OpenBSD external
981 * include/net/if_bridge.h: New file, contributed by Andrew Lunn/
982 ASCOM, from OpenBSD original. (Actually did exist in eCos source
983 tree but was not released)
985 * src/sys/net/if_bridge.c: New file, contributed by Andrew Lunn/
986 ASCOM, from OpenBSD original.
988 * cdl/net.cdl: Build the new files.
990 2000-07-18 Gary Thomas <gthomas@redhat.com>
992 * src/lib/tftp_client.c (tftp_get): Fix edge condition when
993 penultimate block is full and end of file which implies that
994 the last block has zero data bytes.
996 2000-07-18 Hugo Tyson <hmt@cygnus.co.uk>
998 * src/lib/dhcp_prot.c: Ignore NAK messages from the wrong server -
999 we get these because the REQUEST for our chosen IP is broadcast,
1000 so other servers think we've asked to use the wrong IP.
1002 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1004 * include/bootp.h: export init_loopback_interface();
1006 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1008 * cdl/net.cdl: Add option controlling whether to have a separate
1009 DHCP lease management thread, and what its parameter is to be -
1010 which controls whether it loops or quits if a lease fails.
1012 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Provide the
1013 DHCP management thread function and code to instantiate and start
1014 the thread if so configured.
1016 * src/lib/network_support.c (init_all_network_interfaces): Call
1017 the function that starts the DHCP management thread function.
1019 * include/dhcp.h: Declare the DHCP management thread function &c
1022 * tests/dhcp_test.c (net_test): Only poll for need to rebind DHCP
1023 leases if there is no service thread to do the same.
1025 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1027 * include/bootp.h (build_bootp_record): Export this, no harm in
1028 it, and some folk want to use this rather than configured
1029 initialization or bootp/dhcp.
1030 Also commented the other APIs somewhat better.
1032 * src/lib/network_support.c (build_bootp_record): Unconditionally
1033 provide this; selective linking will look after it if unused.
1035 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1037 * src/lib/network_support.c (build_bootp_record): [Static
1038 configuration of interface parameters] Add the gateway into the
1039 options section with TAG_GATEWAY so that init_net() will pick it
1040 up and set up a route accordingly.
1042 2000-07-13 Hugo Tyson <hmt@cygnus.co.uk>
1044 * tests/dhcp_test.c:
1047 * tests/nc_test_master.c:
1048 * tests/nc_test_slave.c:
1049 * tests/ping_lo_test.c:
1050 * tests/ping_test.c:
1051 * tests/server_test.c:
1052 * tests/set_mac_address.c:
1054 * tests/tftp_client_test.c:
1055 * tests/tftp_server_test.c:
1056 Up the stack size to cope with full DHCP initialization in
1057 init_all_network_interfaces().
1059 2000-07-13 Hugo Tyson <hmt@cygnus.co.uk>
1061 * cdl/net.cdl: Add DHCP enable and interface-specific controls.
1063 * include/dhcp.h: New file: describe the DHCP APIs and behaviour,
1064 as well as some internal APIs that are also available.
1066 * src/lib/dhcp_support.c: New file: the surrounding management
1067 routines, a bit like network_support.c, which know about multiple
1068 interfaces and so on.
1070 * src/lib/dhcp_prot.c: New file: the interface-independent DHCP
1071 protocol machine, which is called from dhcp_support.c routines and
1072 init_all_network_interfaces() in network_support.c
1074 * include/bootp.h (struct bootp): Make the packet bigger if DHCP
1075 so that a mininal DHCP packet will fit.
1077 * src/lib/bootp_support.c (do_bootp): If no reply, fail gracefully
1078 and tidy up so that other interfaces can be upbrung.
1079 (show_bootp): Tell us a lot more about DHCP-specific info in the
1081 (get_bootp_option): be aware of DHCP extensions to re-use file and
1082 sname fields for options.
1084 * src/lib/network_support.c (init_all_network_interfaces): Call
1085 do_dhcp() rather than do_bootp() if so configured, and initialize
1086 the per-interface DHCP state variables accordingly.
1088 * tests/dhcp_test.c (net_test): New test file that diddles the
1089 DHCP machine while doing a ping test.
1091 2000-07-11 Gary Thomas <gthomas@redhat.com>
1093 * include/netdev.h: Add single-inclusion fences.
1095 * include/sys/param.h: Add traced versions of splx() routines,
1096 selectable by a configuration option.
1098 * src/ecos/support.c: Rework splx() emulation routines to
1099 be more robust and realtime friendly.
1101 * src/lib/network_support.c (init_all_network_interfaces):
1102 Add minimal support for PCMCIA based devices.
1104 2000-07-04 Hugo Tyson <hmt@cygnus.co.uk>
1106 * include/bootp.h: Fix namespace pollution from "#define int32
1107 int" - it fights against application code too much.
1109 2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
1111 * cdl/net.cdl: Package requires CYGPKG_MEMALLOC
1113 2000-06-26 Hugo Tyson <hmt@cygnus.co.uk>
1115 * tests/ping_test.c (net_test): Added use of the
1116 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS stuff now that the test
1117 passes (consequent on the change below); also use larger ping
1118 packets now that that is working also.
1120 * tests/tcp_echo.c (echo_test): Added use of the
1121 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS stuff now that the test
1122 passes (consequent on the change below).
1124 2000-06-26 Hugo Tyson <hmt@cygnus.co.uk>
1126 * src/ecos/support.c (cyg_splnet): Use the scheduler lock and a
1127 mutex instead of disable-interrupts for SPLX type processing. A
1128 mutex is used at splsoftnet because that is client threads - we do
1129 not want them to pre-empt the rest of the app. This enables the
1130 real-time response testing for the EBSA285 to succeed (interrupts
1131 every 1mS, DSRs delayed by at most 2mS).
1133 2000-06-23 Hugo Tyson <hmt@cygnus.co.uk>
1135 * src/ecos/support.c (cyg_net_mbuf_alloc, cyg_kmem_init): Align
1136 the mbuf pool to MSIZE [128] bytes. That way dtom() works, nasty
1137 though it is. That's needed for ip reassembly in ip_input.c, when
1138 dealing with large icmp-layer packets eg. ping -s 2000 ...
1140 2000-06-21 Hugo Tyson <hmt@cygnus.co.uk>
1142 * include/lib/libkern/libkern.h: Do not define assert multiple
1143 times; guarded by __ECOS.
1145 * include/sys/param.h (MAX,MIN): Only define if undef.
1147 2000-06-21 Hugo Tyson <hmt@cygnus.co.uk>
1149 * cdl/net.cdl: Build the new tests; in fact build them
1152 * src/lib/network_support.c (init_all_network_interfaces):
1153 Initialize loopback device[s] using init_loopback_interface(),
1154 providing a sensible default route et al. Multiple devs: lo1 will
1155 be 127.0.*1*.1, and so on; class C netmasks will be used.
1157 init_all_network_interfaces() is also made thread-safe as well as
1158 idempotent, so other threads (or daemons) can call it to make sure
1161 * src/ecos/support.c (cyg_net_init): Add a call to loopattach() if
1162 there are indeed loopback dev(s) configured. This does the
1163 equivalent of the init of a device from the table, but simpler.
1165 * tests/udp_lo_test.c (udp_server): New testcase...
1166 * tests/tcp_lo_select.c (tcp_server): New testcase...
1167 * tests/tcp_lo_test.c (tcp_client): New testcase...
1168 * tests/ping_lo_test.c (net_test): New testcase, unconditionally
1169 built loopback device test. Will run on platforms with no network
1172 2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
1174 * src/ecos/support.c:
1176 Converted to use of new table construction mechanism.
1178 2000-06-16 Jonathan Larmour <jlarmour@redhat.co.uk>
1180 * include/bootp.h: Remove RCS id tag
1181 * include/netinet/ip_auth.h: Ditto
1182 * include/netinet/ip_fil.h: Ditto
1183 * include/netinet/ip_fil_compat.h: Ditto
1184 * include/netinet/ip_frag.h: Ditto
1185 * include/netinet/ip_nat.h: Ditto
1186 * include/netinet/ip_proxy.h: Ditto
1187 * include/netinet/ip_state.h: Ditto
1189 2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
1191 * src/sys/kern/sockio.c: Added cyg_selinit() calls to bad_socket()
1192 and bsd_accept() functions.
1194 * src/ecos/support.c (cyg_tsleep): Changed tests on wakeup from
1195 semaphore waits to enable return of EINTR results.
1197 2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
1199 * src/sys/net/if_loop.c: Substituted sprintf() for a straight
1200 strcpy() when initalizing if name. This currently only works for
1201 one loopback interface. However, there seems little need to have
1204 * src/sys/kern/sockio.c (bsd_select): Added select support.
1206 * include/sys/time.h: Moved timeval structure definition to
1207 isoinfra time.h header since it is needed by the select() API.
1209 * include/sys/select.h: Added option to use fileio select
1210 mechanism if it is present.
1212 * src/ecos/support.c (cyg_net_init):
1213 Added code to bring up the loopback interface. This is to help
1214 with testing on platforms without network hardware.
1216 2000-06-08 Hugo Tyson <hmt@cygnus.co.uk>
1218 * include/netinet/ip_var.h: Export ipforwarding as well as
1219 ip_defttl for monitoring applications.
1221 2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
1224 * tests/socket_test.c:
1225 * tests/server_test.c:
1226 * tests/ping_test.c:
1227 * tests/nc_test_master.c:
1228 * tests/nc_test_slave.c:
1230 Removed dependence of these programs on STDIO. For most this
1231 simply required the use of a diag_printf() based perror() clone is
1232 CYGPKG_LIBC_STDIO is not defined. For server_test is also required
1233 the substitution of sprintf() with some more primitive string
1236 * src/sys/netinet/ip_input.c: Rewrote inet_ntoa() to not use
1237 sprintf(). This was the only place in the TCP/IP stack that was
1238 dependent on a STDIO function. We really should avoid building
1239 this kind of casual dependency into the code.
1241 * src/sys/kern/sockio.c: This new file contain code to support the
1242 fileio package. So far only a few of these functions have actually
1245 * include/sys/kernel.h (time): The time variable clashes with the
1246 C library time() function. To prevent this it is renamed ktime,
1247 and a #define allows "kernel" code to continue accessing it as
1250 * src/ecos/support.c: Added definition for ktime variable, as
1251 described above. I could not find any definition for struct
1252 timeval time. I have a nasty suspicion that it was using the
1253 time() function - let's hope that no code that actually uses this
1256 * src/lib/bootp_support.c: Another substitution of a diag_printf()
1257 based perror() clone when STDIO is absent.
1259 * include/sys/bsdtypes.h: This is the original
1260 include/sys/types.h. Renamed to avoid clashing with <sys/types.h>
1261 defined by the isoinfra package.
1263 * include/sys/types.h: Renamed to bsdtypes.h.
1265 * include/machine/limits.h:
1266 Various changes to make these headers play nicely with those
1267 defined in isoinfra package.
1269 * include/network.h: Added include of <pkgconf/system.h>. Fixed
1270 prototypes of functions here to match POSIX specifications.
1273 Split list of files to compile into the common set plus those
1274 needed when the fileio package is present and those that are
1275 needed when it is absent.
1276 Added CDL to export our definitions to <sys/types.h>.
1279 2000-05-31 Hugo Tyson <hmt@cygnus.co.uk>
1281 * src/lib/network_support.c (init_all_network_interfaces): Make
1282 this call idempotent - this is useful for reliable initialization
1283 of dependent subsystems.
1285 * include/lib/libkern/libkern.h: remove protos of random() and
1286 srandom() for they are not in fact provided.
1288 * cdl/net.cdl: Turn off CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS by
1289 default - since not all tests currently pass.
1291 2000-05-12 Hugo Tyson <hmt@cygnus.co.uk>
1293 * cdl/net.cdl (CYGPKG_NET_TFTPD_THREAD_PRIORITY): New option,
1294 control the TFTPD thread priority. These options are *all*
1295 CYGPKG_NET. Yuk, sort 'em out later.
1297 * tests/tftp_server_test.c (tftp_test): Added use of the
1298 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS stuff, same as for the flood
1299 ping test. This one passes (with the next change), so committed.
1301 * src/lib/tftp_server.c (tftpd_server): Cancelled some of the
1302 printouts as connections come and go *iff* the tests are set up to
1303 use the realtime-ness test harness. This needs generalizing into
1304 proper control of the network's chattiness overall.
1305 (tftpd_start): Also added configury of the TFTPD thread priority.
1307 2000-05-12 Hugo Tyson <hmt@cygnus.co.uk>
1309 * cdl/net.cdl: Add flood test below. Also add option
1310 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS to decide whether to
1311 "Use real-time response test harness (if available)".
1312 Consequently moved the test build stuff forward out of the build
1315 * tests/flood.c (net_test): New file; performs a flood-ping (well,
1316 as fast as we can go) of the server(s) on the two interfaces.
1317 Also uses the real-time interrupt response verification stuff from
1318 the EBSA285 driver component.
1320 2000-05-11 Hugo Tyson <hmt@cygnus.co.uk>
1322 * cdl/net.cdl: Add new utility (and harmless-by-default test)
1323 tests/set_mac_address. You have to edit it to get anything
1326 * tests/set_mac_address.c: New file added. It uses SIOCSIFHWADDR
1327 to set the MAC address of any interfaces it has been told to.
1329 2000-05-08 Gary Thomas <gthomas@redhat.com>
1331 * include/machine/cpu.h:
1332 * include/machine/cdefs.h: Add copyright boilerplate.
1334 2000-05-05 Hugo Tyson <hmt@cygnus.co.uk>
1336 * include/arpa/tftp.h: Aargh. Turns out that removing the align
1337 driective and retaining only the packed directive makes the
1338 original version work. So, reverted. Apologies for the wasted
1341 * src/lib/tftp_server.c (tftpd_read_file): Coupla warnings
1342 reduced, and reverted to match original tftp.h
1344 * src/lib/tftp_dummy_file.c (dummy_open): Removed use of
1345 undeclared malloc().
1347 2000-05-04 Gary Thomas <gthomas@redhat.com>
1349 * src/lib/tftp_server.c:
1350 * src/lib/tftp_client.c: Adjust for changes in header structure.
1352 * include/arpa/tftp.h: Continuing problems with alignment on ARM.
1353 Recourse is very bastardized structure, but it _does_ work.
1355 2000-05-04 Hugo Tyson <hmt@cygnus.co.uk>
1357 * tests/tftp_client_test.c (tftp_test): Print out a coupla more
1358 things and test both interfaces if they exist - which does the
1359 same thing twice if the same server bootp'd both. Changed the
1360 filenames to something more obvious.
1362 * cdl/net.cdl (CYGPKG_NET_TESTS): Build the tftp tests
1363 tests/tftp_client_test tests/tftp_server_test
1365 * src/ecos/support.c (cyg_kmem_print_stats): New function; prints
1366 info about memory usage for some tests to come.
1368 2000-05-04 Gary Thomas <gthomas@redhat.com>
1370 * include/arpa/tftp.h: Force packed alignment - required on some
1373 2000-05-01 Gary Thomas <gthomas@redhat.com>
1375 * src/lib/tftp_dummy_file.c: Adding very simple routines - just
1376 enough to test TFTP server. This support will come from elsewhere
1377 in actual application environments (e.g. a real file system).
1379 * tests/tftp_server_test.c:
1380 * src/lib/tftp_server.c:
1381 * include/tftp_support.h: Flesh out TFTP server support.
1383 2000-04-13 Hugo Tyson <hmt@cygnus.co.uk>
1385 * tests/tcp_echo.c (calibrate_load): Import better background
1386 thread loading algorithm with bugfix; if the initial HIGH limit
1387 was not large enough, it never got loaded enough.
1389 * tests/nc_test_slave.c (calibrate_load): Import the fixed version
1390 from above back in here.
1392 2000-04-12 Gary Thomas <gthomas@redhat.com>
1394 * src/ecos/support.c (cyg_tsleep): Use 'cyg_scheduler_safe_lock()' so
1395 this function can be called with the scheduler locked.
1397 * src/sys/kern/uipc_socket2.c:
1398 * include/sys/socketvar.h: Update sblock()/sbunlock() to be eCos safe.
1400 2000-04-12 Hugo Tyson <hmt@cygnus.co.uk>
1402 * tests/tcp_echo.c: Include <lib/libkern/libkern.h> so that it
1403 links - otherwise max() is not around.
1405 2000-04-11 Gary Thomas <gthomas@redhat.com>
1407 * include/lib/libkern/libkern.h:
1408 * include/network.h (NO_LIBKERN_INLINE): Disable kernel inline
1411 2000-04-11 Gary Thomas <gthomas@redhat.com>
1413 * src/lib/getserv.c: Add TFTP protocol.
1415 * cdl/net.cdl: Add TFTP library functions.
1417 * include/tftp_support.h:
1418 * src/lib/tftp_dummy_file.c:
1419 * src/lib/tftp_server.c:
1420 * src/lib/tftp_client.c: New file(s). Basic TFTP support functions.
1422 2000-04-10 Hugo Tyson <hmt@cygnus.co.uk>
1424 * tests/tcp_echo.c (echo_test):
1425 * tests/tcp_source.c:
1427 Merge in changes from Grant Edwards <grante@visi.com> presented on
1428 ecos-discuss "Mon, 10 Apr 2000 11:01:54 -0500" - fix some
1429 warnings, and use ntohl() on the control data that travels netly
1430 so that the host tools will work on otherendian machines.
1432 2000-04-07 Gary Thomas <gthomas@redhat.com>
1434 * tests/nc_test_slave.c: Update background thread loading
1435 calibration to use a binary search (better) algorithm.
1437 2000-03-29 Hugo Tyson <hmt@cygnus.co.uk>
1439 * tests/ftp_test.c (cyg_test_exit):
1440 * tests/mbuf_test.c (cyg_start):
1441 * tests/nc_test_master.c (cyg_test_exit):
1442 * tests/nc_test_slave.c (show_net_times):
1443 * tests/ping_test.c (cyg_test_exit):
1444 * tests/server_test.c (cyg_test_exit):
1445 * tests/socket_test.c (cyg_test_exit):
1446 * tests/tcp_echo.c (cyg_test_exit):
1447 Some eCos infrastructure changes caused, in some configurations,
1448 cyg_test_exit() from the infrastructure to be brought in (in
1449 tcdiag.o) even when the Test Case system was not explicitly being
1450 invoked. That fought with the convenience copy of cyg_test_exit()
1451 in these tests. The neatest fix is to use that provided centrally
1452 where relevent, so that is what this change does.
1454 * tests/tcp_echo.c: Also now use granularity of 5% by default,
1455 calibrate the load at 50%, and check and report the load that was
1456 actually achieved after the test.
1458 2000-03-29 John Dallaway <jld@cygnus.co.uk>
1460 * doc/ecos_tcpip.html:
1462 Remove error-prone cross-reference to another eCos package.
1466 Synchronize index page title with web site.
1468 2000-03-28 Gary Thomas <gthomas@redhat.com>
1470 * src/lib/bootp_support.c (init_net): Need to start interface,
1471 especially for manual/static IP configurations.
1473 * tests/nc_test_slave.c (calibrate_load): Better calibration for
1476 2000-03-18 Gary Thomas <gthomas@redhat.com>
1478 * src/sys/kern/sys_socket.c:
1479 * src/sys/kern/sys_generic.c:
1480 * include/sys/sockio.h: Add FIONBIO, FIOASYNC, FIONREAD functions.
1482 * include/machine/types.h: Make definitions safe for use with libc.
1484 2000-03-08 Gary Thomas <gthomas@redhat.com>
1486 * src/ecos/support.c: Remove some debug messages.
1487 Update timed sleep functions (tsleep) to use scheduler lock
1488 instead of brute-force interrupt locks.
1490 2000-03-08 Hugo Tyson <hmt@cygnus.co.uk>
1492 * tests/tcp_echo.c (echo_test): Also enable, log and print out the
1493 idle-thread activity during the test - this reassures us that
1494 there is no [significant] spare time being wasted idling during
1495 the test. This change has no effect on the results at all.
1497 2000-03-07 Hugo Tyson <hmt@cygnus.co.uk>
1499 * tests/tcp_echo.c (calibrate_load): Improve the accuracy of the
1500 calibration with some post-scaling. Change load to an array
1501 accessor instead of register-based floating point - this is less
1502 load, so more loops are needed, so the initial load level is upped
1503 also. More loops means better accuracy anyway, a good thing.
1505 2000-03-06 Hugo Tyson <hmt@cygnus.co.uk>
1507 * tests/tcp_source.c (show_results): Print results in Mbit/S also.
1508 (source_test): Warnings reduction; add some casts to sending and
1509 receiving the control packets.
1510 (NUM_BUF): becomes 1024; send more data to get thro'put result.
1512 * tests/tcp_sink.c (show_results): Print results in Mbit/S also.
1513 (sink_test): Warnings reduction; add some casts to sending and
1514 receiving the control packets.
1516 * tests/nc_test_master.c (show_results): Reinstate tot_bytes
1517 variable for host testing tool version. Print results in Mbit/S
1520 * tests/nc_test_slave.c (net_test): Comment out starting multiple
1521 threads; they fight over a wide-open socket. One thread is
1524 2000-03-06 Gary Thomas <gthomas@redhat.com>
1526 * include/netdev.h: Update structure for improved API description.
1528 2000-03-05 Gary Thomas <gthomas@redhat.com>
1530 * include/network.h:
1531 * include/sys/syscallargs.h:
1533 * src/lib/bootp_support.c:
1535 * src/lib/getpeername.c:
1536 * src/lib/getsockname.c:
1537 * src/lib/recvfrom.c:
1539 * tests/nc_test_framework.h:
1540 * tests/nc_test_master.c:
1541 * tests/nc_test_slave.c:
1542 * tests/ping_test.c:
1543 * tests/server_test.c:
1544 * tests/socket_test.c:
1546 Cleanup to remove compiler warnings.
1548 2000-03-04 Gary Thomas <gthomas@redhat.com>
1550 * include/machine/param.h:
1551 * include/sys/socketvar.h:
1552 * src/ecos/timeout.c:
1553 * src/sys/kern/kern_subr.c:
1554 * src/sys/kern/sys_generic.c:
1555 * src/sys/kern/sys_socket.c:
1556 * src/sys/kern/uipc_mbuf.c:
1557 * src/sys/kern/uipc_socket2.c:
1558 * src/sys/kern/uipc_syscalls.c:
1559 * src/sys/net/if_ethersubr.c:
1560 * src/sys/net/if_loop.c:
1561 * src/sys/net/route.c:
1562 * src/sys/net/rtsock.c:
1563 * src/sys/netinet/in_cksum.c:
1564 * src/sys/netinet/in_pcb.c:
1565 * src/sys/netinet/ip_input.c:
1566 * src/sys/netinet/tcp_input.c:
1567 * src/sys/netinet/tcp_output.c:
1568 * src/sys/netinet/tcp_subr.c:
1569 * src/sys/netinet/udp_usrreq.c:
1570 Cleanup to remove compiler warnings.
1572 2000-03-01 Gary Thomas <gthomas@cygnus.co.uk>
1574 * tests/ping_test.c: Reorganize test, display error info.
1576 * src/lib/bootp_support.c: Add support for DNS options.
1578 2000-02-29 Gary Thomas <gthomas@cygnus.co.uk>
1580 * include/sys/sockio.h (SIOCSIFHWADDR): Add function to
1581 set hardware (MAC) address via ioctl.
1583 2000-02-28 John Dallaway <jld@cygnus.co.uk>
1587 Reparent cdl_interface CYGHWR_NET_DRIVER_ETH0_SETUP under
1588 cdl_component CYGHWR_NET_DRIVER_ETH0_SETUP_OPTIONS to
1589 avoid a spurious conflict report when the latter is
1592 2000-02-25 John Dallaway <jld@cygnus.co.uk>
1596 Reparent cdl_interface CYGHWR_NET_DRIVER_ETH1_SETUP under
1597 cdl_component CYGHWR_NET_DRIVER_ETH1_SETUP_OPTIONS to
1598 avoid a spurious conflict report when the latter is
1601 2000-02-22 Gary Thomas <gthomas@cygnus.co.uk>
1603 * include/netinet/if_ether.h:
1604 * include/netinet/ip.h:
1605 * include/netinet/ip_icmp.h:
1606 * include/netinet/tcp.h:
1607 * include/netinet/udp.h: More structure alignement fixes.
1609 2000-02-21 Gary Thomas <gthomas@cygnus.co.uk>
1611 * include/netinet/tcpip.h:
1612 * include/netinet/udp_var.h: Force structure alignment.
1614 2000-02-18 Gary Thomas <gthomas@cygnus.co.uk>
1616 * tests/server_test.c: Target [client] address was wrong.
1618 * tests/tcp_source.c:
1620 * tests/tcp_echo.c: New test suite.
1622 2000-02-17 Gary Thomas <gthomas@cygnus.co.uk>
1624 * tests/ping_test.c: Fix typo in startup message.
1626 * src/sys/net/route.c (route_reinit): New function - only here
1627 until BOOTP problems can be found/fixed.
1629 * src/lib/bootp_support.c (do_bootp): Force any existing routes
1630 to be reset since this causes a problem if BOOTP has been previously
1631 run. Also, the BOOTP request must be zeroed or the server will
1634 * src/lib/network_support.c (init_all_network_interfaces):
1635 Rearrange initialization so that all BOOTP activity takes place
1636 before any permanent setups are in place.
1638 2000-02-16 Gary Thomas <gthomas@cygnus.co.uk>
1640 * src/sys/net/route.c (rtioctl): Add support for deleting routes.
1642 * src/lib/network_support.c (init_all_network_interfaces):
1643 Support predefined IP configurations, as well as BOOTP.
1645 * tests/ping_test.c: Renamed from 'bootp_test.c'
1647 * src/lib/inet_addr.c:
1648 * include/arpa/ftp.h:
1649 * include/arpa/nameser.h:
1650 * include/arpa/telnet.h:
1651 * include/arpa/inet.h:
1652 * include/arpa/tftp.h: New file(s).
1654 2000-02-15 Gary Thomas <gthomas@cygnus.co.uk>
1656 * src/lib/select.c: Add 'cyg_select_with_abort()' interface which
1657 will allow 'select()' function to be abnormally terminated. Add
1658 new function 'cyg_select_abort()' which does this.
1660 2000-02-15 Hugo Tyson <hmt@cygnus.co.uk>
1662 * cdl/net.cdl: Fix typo; cdl_interface CYGHWR_NET_DRIVER_ETH1 was
1663 missing, so EBSA build was conflictual.
1665 2000-02-14 Gary Thomas <gthomas@cygnus.co.uk>
1667 * tests/bootp_test.c:
1669 * tests/nc_test_framework.h:
1670 * tests/nc_test_master.c:
1671 * tests/nc_test_slave.c:
1672 * tests/server_test.c: Rework with automatic network initialization.
1673 Includes support for multiple interfaces.
1675 * src/lib/network_support.c:
1676 * include/network.h: New file(s).
1678 * cdl/net.cdl: New CDL to support multiple interfaces and their
1679 configuration. (Not complete yet).
1681 2000-02-11 Gary Thomas <gthomas@cygnus.co.uk>
1683 * src/lib/select.c (select): Add a way to abort selects (EINTR).
1685 2000-02-10 Gary Thomas <gthomas@cygnus.co.uk>
1687 * tests/nc_test_slave.c (calibrate_load): Slightly different algorithm,
1688 which should work better on all platforms.
1690 2000-02-09 Gary Thomas <gthomas@cygnus.co.uk>
1692 * cdl/net.cdl: Add CYGPKG_NET_THREAD_PRIORITY to allow user more
1693 control over how networking [anonymous] threads behave.
1695 * tests/nc_test_framework.h:
1696 * tests/nc_test_slave.c:
1697 * tests/nc_test_master.c: Support test mode with target CPU under
1700 2000-02-09 Hugo Tyson <hmt@cygnus.co.uk>
1702 * src/ecos/support.c (bcmp): Fix bug. Missing pointer increments
1703 meant that the zeroth byte only was compared. Caused stack to
1704 reject ARP packets - depending on MAC address order for particular
1707 2000-02-09 Hugo Tyson <hmt@cygnus.co.uk>
1709 * tests/bootp_test.c:
1711 * tests/nc_test_master.c:
1712 * tests/server_test.c:
1713 * tests/socket_test.c:
1714 Change stacksize of test thread to TYPICAL not MINIMAL - some
1715 drivers eat more stack than others. Generally:
1716 -#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
1717 +#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
1719 2000-02-08 John Dallaway <jld@cygnus.co.uk>
1723 Tidy display strings.
1725 #####ECOSPDCOPYRIGHTBEGIN####
1727 # Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
1728 # All Rights Reserved.
1730 # Permission is granted to use, copy, modify and redistribute this
1733 #####ECOSPDCOPYRIGHTEND####