1 2005-10-23 Andrew Lunn <andrew.lunn@ascom.ch>
3 * src/sys/kern/kern_subr.c (uiomove): Remove lvalue cast to
6 2003-12-10 Gary Thomas <gary@mlbassoc.com>
8 * include/netinet/in.h: Prototype for inet_ntoa_r()
10 2003-11-25 Manu Sharma <manu.sharma@ascom.com>
11 * src/sys/net/bridgestp.c: Code for Spanning Tree Protocol (STP).
13 * cdl/openbsd_net.cdl: Changes make provisions for STP code.
14 * doc/openbsd.sgml: Same.
15 * include/net/if.h: Same.
16 * include/net/if_bridge.h: Same.
17 * include/net/if_llc.h: Same.
18 * include/sys/sockio.h: Same.
19 * src/sys/net/if_bridge.c: Same.
21 * doc/openbsd-manpages-stp.sgml: Documentation for OpenBSD specific code
22 * doc/openbsd-manpages-netintro.sgml: Same.
23 * doc/openbsd-manpages-bridge.sgml: Same.
25 2003-09-22 Reinhard Jessich <Reinhard.Jessich@frequentis.com>
27 * include/net/if.h: Define macro IF_IS_EMPTY needed by eth_drv.c
29 2003-02-24 Jonathan Larmour <jifl@eCosCentric.com>
31 * cdl/openbsd_net.cdl: Improve doc links.
33 2003-01-30 Jonathan Larmour <jifl@eCosCentric.com>
35 * src/sys/net/if_bridge.c (bridge_input): Learn source host addr,
37 Fix pointed to by Daniel NĂ©ri.
39 2002-12-14 Nick Garnett <nickg@ecoscentric.com>
41 * src/sys/netinet/tcp_usrreq.c (tcp_usrreq): Rearranged ifndef on
42 PRU_SENSE case to keep the case in the switch and let it return a
43 sensible result. Otherwise a stat() on a socket causes a panic().
45 2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
47 * src/ecos/support.c (show_network_tables): New function used
48 to print network information (interface, routing).
50 2002-05-21 Jesper Skov <jskov@redhat.com>
52 * src/lib/recv.c: Fix warning. socket.h declarations are not
53 available to the kernel code. Added missing argument in the
56 2002-05-14 Jesper Skov <jskov@redhat.com>
58 * include/netinet6/in6.h: Fixed warnings.
60 * src/sys/kern/uipc_socket2.c (sblock): Fixed warning.
61 * src/sys/netinet/tcp_input.c: Same.
62 * src/sys/net/if_loop.c (looutput): Same.
63 * src/sys/kern/sockio.c: Same.
65 * include/sys/param.h: Include machine headers after the namespace
66 changing macros to get the desired declarations, thus fixing
69 2002-04-26 Gary Thomas <gthomas@redhat.com>
71 * src/sys/netinet/ip_input.c: Proper "extern" definition of 'ipstat'.
73 * src/sys/netinet/raw_ip.c:
74 * src/sys/netinet/ip_output.c:
75 * include/netinet/ip_var.h: Use of ramdom IP packet id is optional.
77 2002-04-22 Gary Thomas <gthomas@redhat.com>
79 * src/sys/netinet/tcp_usrreq.c:
80 * src/sys/netinet/tcp_output.c:
81 * src/sys/netinet/tcp_input.c:
82 * src/sys/netinet/tcp_debug.c:
83 * include/netinet/tcp_debug.h: Fully conditionalize on TCPDEBUG.
85 2002-03-27 Jonathan Larmour <jlarmour@redhat.com>
87 * doc/openbsd.sgml: Manpages now live in "common" BSD package.
89 2002-03-19 Gary Thomas <gthomas@redhat.com>
91 * src/sys/net/route.c (cyg_route_reinit): Renamed from route_reinit.
93 2002-03-11 Hugo Tyson <hmt@redhat.com>
97 * src/sys/netinet/in.c (in_control): SIOCSIFADDR switch entry
98 moved to before the scan for this same address being in the list
99 already, along with Add and Delete (SIOCAIFADDR,SIOCDIFADDR) arms.
100 It falls through into the same alloc-if-needed code anyway.
101 Thus repeatedly setting the same address does not leak store.
103 * src/sys/net/route.c (route_reinit): Rewrite to delete all routes
104 individually rather than en-masse (leaking store).
105 (rt_reinit_rtdelete): New function; callback for individual
107 (rtioctl): Do not pass in a "route **" to return a pointer to the
108 route removed or added; this results in an extra reference, by the
109 returned pointer, and so a storeleak.
110 (rtrequest): RTM_DELETE arm: do not free a gateway route if the
111 gateway pointer is the same as the route itself - it gets freed
112 *again* at the end of the routine if you do. Just dec the refcnt.
114 2002-03-07 Gary Thomas <gthomas@redhat.com>
116 * include/sys/param.h: Privatize route_reinit(), arc4random().
118 2002-02-28 Hugo Tyson <hmt@redhat.com>
119 2002-02-28 Martin Buck <martin.buck@ascom.ch>
121 * src/sys/net/if_ethersubr.c (ether_input): [Bugzilla 60318]
122 ether_input() schedules processing by calling schednetisr(FOO) and
123 then queues the frame afterwards. Where we cannot be preempted
124 eg. in a DSR or in the original BSD kernel, this is OK. In eCos
125 the call to schednetisr(FOO) might cause a context switch *before*
126 the frame is enqueued. This "jams" one packet in the queue,
127 delaying it until the next packet, and so on.
129 This change makes ether_input() store up the schednetisr() arg
130 until the end, and do the call then, much like it does with the
131 queue to use. Thanks Martin!
133 2002-02-22 Hugo Tyson <hmt@redhat.com>
135 * doc/openbsd.sgml: New file; separated stack-specific docs from
136 monolithic net doc, and tidied up in various ways.
138 2002-02-15 Gary Thomas <gthomas@redhat.com>
140 * cdl/openbsd_net.cdl: Slight changes in layout required by split
143 2002-02-13 Jonathan Larmour <jlarmour@redhat.com>
144 2002-02-13 Andrew Lunn <andrew.lunn@ascom.ch>
146 * include/sys/mbuf.h: Declare variables as extern in header.
147 * src/sys/kern/uipc_mbuf.c: Define mbtypes[] and init it.
149 2002-02-05 Hugo Tyson <hmt@redhat.com>
151 * cdl/openbsd_net.cdl: Place this package below CYGPKG_NET
152 ie. the common networking package. Only affects the view in the
155 2002-01-28 Gary Thomas <gthomas@redhat.com>
157 * src/sys/netinet/ip_input.c: inet_ntoa() is now common.
159 * cdl/openbsd_net.cdl: Renamed from net.cdl. This package
160 is now a proper sub-package, implementing a network stack.
162 2002-01-28 Jonathan Larmour <jlarmour@redhat.com>
164 * cdl/net.cdl: Clarify CYGPKG_NET_ROUTING description.
166 2002-01-08 Jonathan Larmour <jlarmour@redhat.com>
168 * tests/server_test.c (server_test): Correct port conversion.
170 2001-12-14 Hugo Tyson <hmt@redhat.com>
172 * src/sys/net/if_ethersubr.c (ether_output): Never ever print
173 anything! It can recurse unexpectedly if debugging over net.
175 2001-12-10 Andrew Lunn <andrew.lunn@ascom.ch>
177 * cdl/net.cdl: Add configury to eliminate network timing stats.
178 * src/include/machine/param.h: Timing statistics for things like
179 memcpy, mbuf_alloc etc now use configury to determine if the
180 statistics code should be compiled.
181 * src/ecos/support.c: Ditto.
182 * tests/nc_test_slave.c: Only print timing stats when they
184 * tests/tcp_echo.c: Ditto.
185 * tests/nc_test_master.c: Allow building with SNMP lib which has
186 its own gettimeofday(). This should be fixed better a different
187 way but will do for now.
189 2001-12-06 Hugo Tyson <hmt@redhat.com>
191 * src/lib/bootp_support.c (init_net): Just re-tabbed and checked
192 the addition to initialize DNS from DHCP info - it had already
193 snuck into the file in the previous change from Andrew. Include
194 of netdb.h added also, from the patch in Bug 57019. Also check
195 CYGINT_ISO_DNS for the setup code instead of CYGPKG_ISO_DNS.
197 2001-12-04 Jonathan Larmour <jlarmour@redhat.com>
199 * src/lib/bootp_support.c: Check CYGINT_ISO_DNS (from
200 <pkgconf/isoinfra.h>) instead of CYGPKG_ISO_DNS.
202 2001-12-03 Andrew Lunn <Andrew.Lunn@ascom.ch>
204 * src/lib/bootp_support.c: get_bootp_option(): Take the
205 max length of data we want out of the bootp record.
206 * src/lib/dhcp_prot.c: Pass the length we expect for an option.
208 2001-08-16 Anssi Pulkkinen <Anssi.Pulkkinen@ascom.ch>
210 * src/lib/dhcp_prot.c: Make sure we use the newly calculated xid.
212 2001-08-02 Anand Srivastava <Anand.Srivastava@ascom.ch>
214 * src/lib/dhcp_prot.c do_dhcp: ID calculation must be done only
215 once. moved it out the loop.
217 2001-11-21 Hugo Tyson <hmt@redhat.com>
219 * src/lib/dhcp_support.c (dhcp_mgt_entry): If we have an
220 SNMPAGENT, must recycle it whenever we reinitialize all
221 interfaces; call SnmpdShutDown() to cause this.
222 Also re-initialize all loopback interfaces here too.
224 2001-11-30 Hugo Tyson <hmt@redhat.com>
226 * src/lib/dhcp_prot.c (set_default_dhcp_tags): New routine to
227 insert all the extra woffle we need neatly each time, keeping the
228 state machine's case arms to the real work. The new thing this
229 sets is TAG_DHCP_PARM_REQ_LIST, with a list that matches the
230 default set we get from a LINUX dhcpd. This is because M$ servers
231 need explicit requests for eg. TAG_GATEWAY. Note that I have
232 included configuration to override the set of tags requested here
233 in the source, but not yet backed up by CDL - we'll see whether
235 (set_variable_tag): New routine to insert a variable pointed-to
236 data item rather than an int of 1,2 or 4 bytes.
237 (do_dhcp): Call set_default_dhcp_tags() every time we send a
238 packet, rather than ad hoc additions in each state.
240 2001-11-29 Jonathan Larmour <jlarmour@redhat.com>
242 * include/machine/ansi.h: No longer require BSD string function
243 compatibility macros (in fact they confuse things).
245 * cdl/net.cdl: Require BSD compatibility functions from <string.h>.
247 2001-11-19 Hugo Tyson <hmt@redhat.com>
249 * include/bootp.h (BP_STD_TX_MINPKTSZ): New symbol defining the
250 minimal DHCP packet size which we should send.
252 * src/lib/dhcp_prot.c (scan_dhcp_size): New routine to scan up to
253 the end of the packet, for length determination and padding.
254 (dhcp_size): Now uses scan_dhcp_size().
255 (dhcp_size_for_send): New, uses scan_dhcp_size() and pads with
256 zero up to the min packet size that we should send.
257 (do_dhcp): In every sendto() call, use dhcp_size_for_send(xmit) in
258 order to send padded, full size packets as needed. 5 instances.
260 Credit to "Anssi Pulkkinen" <Anssi.Pulkkinen@ascom.ch> for the
261 original version of this patch.
263 2001-11-08 Jesper Skov <jskov@redhat.com>
265 * tests/server_test.c (net_test): Fix compile error.
267 2001-11-02 Gary Thomas <gthomas@redhat.com>
269 * src/ecos/support.c:
270 * include/machine/ansi.h: Add C++ support [externC].
272 2001-11-11 Andrew Lunn <andrew.lunn@ascom.ch>
274 *src/lib/recv.c: Implement the recv() call.
276 2001-10-29 Hugo Tyson <hmt@redhat.com>
278 * src/sys/net/if_ethersubr.c (ether_output): [CASE 106613] Even if
279 the queue is full, and we are dropping the packet, try to start
280 the interface anyway, to give it a chance to empty the queue if
281 the device has recovered from whatever made the queue fill up in
282 the first place - being unplugged from the network for example.
283 This change is belt & braces with a similar policy in the periodic
284 tickle function in the logical ether driver in io/eth/... ; this
285 change will recover the situation immediately if the application
286 continues trying to send despite ENOBUFS.
288 2001-10-25 Hugo Tyson <hmt@redhat.com>
290 * src/sys/net/if_bridge.c (bridge_broadcast): Count if_obytes in
291 destination interfaces as well as the bridge interface; normally
292 this is done in if_ethersubr.c but here we talk directly to the
293 interface, bypassing that layer. Thanks to Andrew Lunn for
296 2001-10-18 Jonathan Larmour <jlarmour@redhat.com>
298 * src/sys/netinet/in.c (in_lifaddr_ioctl): Silence warnings about
301 2001-10-10 Hugo Tyson <hmt@redhat.com>
303 * tests/ftp_test.c (net_test): This was lacking #ifdefs for
304 CYGHWR_NET_DRIVER_ETH0 and CYGHWR_NET_DRIVER_ETH1. Ooops.
306 2001-10-05 Jonathan Larmour <jlarmour@redhat.com>
308 * cdl/net.cdl (CYGPKG_NET_CFLAGS_ADD): Define __INSIDE_NET within
309 this package to allow segregation of definitions only relevant for
310 internal consumption, and definitions allowable for external
313 * include/lib/libkern/libkern.h: Conditionalize on __INSIDE_NET.
315 2001-10-04 Jonathan Larmour <jlarmour@redhat.com>
317 * cdl/net.cdl (CYGHWR_NET_DRIVER_ETH0): Make flavor bool so it isn't
319 (CYGHWR_NET_DRIVER_ETH1): Ditto.
321 2001-10-04 Hugo Tyson <hmt@redhat.com>
323 * src/lib/dhcp_support.c: Some conditional compilation tags were
324 wrong vis a vis ETH1 versus ETH0. Thanks to "Simon"
325 <simoncc@ms46.url.com.tw> for spotting it.
327 2001-10-04 Jesper Skov <jskov@redhat.com>
329 * tests/multi_lo_select.c (cyg_user_start): Added CYG_TEST_INIT
331 * tests/ping_lo_test.c (cyg_start): Same.
332 * tests/tcp_lo_test.c (cyg_start): Same.
333 * tests/udp_lo_test.c (cyg_start): Same.
334 * tests/tcp_lo_select.c (cyg_start): Same.
336 2001-09-28 Jonathan Larmour <jlarmour@redhat.com>
338 * cdl/net.cdl: Tell isoinfra we support getproto* and getserv*
340 * include/netdb.h: Move to...
341 * include/net/netdb.h: ...here.
343 2001-09-25 Jesper Skov <jskov@redhat.com>
345 * cdl/net.cdl: Don't build tests/nc_test_master as it's a host
348 * src/lib/getserv.c: Added domain service.
350 * include/netdb.h: Moved getbyhost()/getbyaddr() declarations and
351 hostent struct definition to the DNS package.
353 * src/lib/gethost.c: Removed.
355 * cdl/net.cdl: Removed gethost.c (replaced by proper
356 implementation in CYGPKG_NS_DNS).
358 2001-09-17 Hugo Tyson <hmt@redhat.com>
359 2001-09-17 Andrew Lunn <Andrew.Lunn@ascom.ch>
361 * src/sys/net/if_bridge.c (bridge_broadcast): Fix a null pointer
362 deference. Supporting VLANs, it seems that during the net_init()
363 function, it sends a packet to the bridge with the source
364 interface being NULL. Stats counting assumed otherwise.
366 2001-09-14 Jonathan Larmour <jlarmour@redhat.com>
368 * src/sys/kern/uipc_syscalls.c: Last change to uipc_syscalls.c
369 wasn't right. The parts that were __ECOS__ should simply have
370 been completely removed.
372 2001-09-13 Hugo Tyson <hmt@redhat.com>
374 * cdl/net.cdl: Add configury to control whether we can tickle the
375 network devices if there's a lack of network traffic, and to
376 control the delay time before so doing.
378 * src/ecos/timeout.c (alarm_thread): Use a timed wait, if so
379 configured, for the flag; and if it times out, tickle all the
380 devices via the common ether driver routine for so doing.
382 2001-09-12 Jonathan Larmour <jlarmour@redhat.com>
384 * include/sys/socketvar.h: Use __ECOS, not __ECOS__.
385 * src/sys/kern/uipc_syscalls.c: Ditto.
386 * src/sys/kern/uipc_socket2.c (sblock): Ditto.
388 2001-08-02 Jonathan Larmour <jlarmour@redhat.com>
390 * tests/linux_echo.c (echo_test): Set socket options before bind.
391 * tests/nc_test_slave.c (do_tcp_test): Ditto.
392 * tests/server_test.c (server_test): Ditto.
393 * tests/tcp_echo.c (echo_test): Ditto.
394 * tests/tcp_lo_test.c (server): Ditto.
395 * tests/tcp_sink.c (sink_test): Ditto.
396 * tests/tcp_source.c (source_test): Ditto.
398 2001-07-27 Jonathan Larmour <jlarmour@redhat.com>
400 * include/sys/select.h: Renamed to....
401 * include/sys/bsdselect.h: New file.
402 * include/sys/socketvar.h: Include <sys/bsdselect.h> instead of
404 * src/lib/select.c: Include <sys/bsdselect.h>
406 2001-07-26 Jonathan Larmour <jlarmour@redhat.com>
408 * cdl/net.cdl (CYGPKG_NET_API_LOCAL): Implements select()
409 * include/sys/bsdtypes.h: No need for these select definitions.
411 2001-06-20 Grant Edwards <grante@visi.com>
412 2001-06-20 Hugo Tyson <hmt@redhat.com>
414 * src/lib/dhcp_prot.c (alarm_function): Change the lease state
415 before re-enabling the alarm so that if it somehow gets times of
416 zero (ie. right now) it quickly completes the state machine rather
417 than recursing to its doom.
418 (new_lease): Test the retcode of get_bootp_option() and use
419 obvious defaults if the T1 and T2 times are not provided - this is
420 RFC compliant! - and use "infinite lease" if the lease time is not
423 2001-06-19 Trenton D. Adams <tadams@extremeeng.com>
425 * tests/server_test.c (server_test): Null terminate read string
428 2001-06-13 Jonathan Larmour <jlarmour@redhat.com>
430 * cdl/net.cdl: Make debug output an option. Include DHCP.
432 * src/lib/dhcp_prot.c: DHCP_CHATTER -> CYGDBG_NET_DHCP_CHATTER
434 * src/ecos/support.c (cyg_kmem_init): Only print debug output if
437 * cdl/net.cdl: Make requirements on other eCos features more
440 2001-05-09 Robin Farine <acnrf@dial.eunet.ch>
441 2001-05-09 Hugo Tyson <hmt@redhat.com>
443 * src/lib/dhcp_prot.c (do_dhcp): In DHCPSTATE_INIT case, create a
444 new xid. Servers apparantly can use *only* this to distinguish
445 machines, even with different MAC addresses! Therefore we use
446 both the most sensitive randomizer available (arc4random()) which
447 in reality uses a finegrain clock, and salt the value further with
448 the MAC address itself. Thanks again Robin.
450 * src/ecos/support.c (arc4random): Make arc4random not always be a
451 multiple of 256; stir the clock into the low bits also.
453 2001-05-09 Robin Farine <acnrf@dial.eunet.ch>
454 2001-05-09 Hugo Tyson <hmt@redhat.com>
456 * src/sys/net/if_bridge.c: Patch from Robin; the route aging
457 process took twice as long to timeout because an entry requires
458 *two* executions of bridge_rtage() to actually get removed.
459 Record the timeout over 2 to fix that and also define
460 BRIDGE_RTABLE_TIMEOUT as 300s that the standard specifies as
463 2001-05-09 Hugo Tyson <hmt@redhat.com>
465 * src/lib/getserv.c (setreturned): New routine to set up a copy of
466 the service data with the port converted to network order like the
467 API demands. It's this way to make the initialization of the
469 (services[]): Added an entry for snmp.
470 (getservbyname): Use setreturned() to return adjusted info.
471 (getservbyport): Use setreturned() to return adjusted info and
472 compare with host-ordered version of the port.
474 * src/lib/tftp_client.c (tftp_get):
475 (tftp_put): Do not convert to net order from
476 the getserv structure; it's already net order.
478 * src/lib/tftp_server.c (tftpd_server): Convert the socket into
479 host order; it's network order in the getserv API.
481 * tests/ftp_test.c (ftp_test): Do not convert to net order from
482 the getserv structure; it's already net order.
484 * tests/tftp_client_test.c (PUTFILE): Changed the names of the
485 test files to be fully qualified, this makes the test work with
486 more server machines. /tftpboot/tftp_get and /tftpboot/tftp_put.
488 2001-04-24 Bart Veer <bartv@redhat.com>
491 Prevent multiple device drivers from implementing the
492 same eth0/eth1 device.
494 2001-03-30 Jonathan Larmour <jlarmour@redhat.com>
496 * cdl/net.cdl (CYGPKG_NET_SYSCTL): Comment out - currently unsupported.
498 2001-03-28 Richard Panton <rpanton@3glab.com>
500 * include/bootp.h: Define func protos with C linkage
501 * include/netdb.h: Ditto
502 * include/network.h: Ditto
503 * include/tftp_support.h: Ditto
505 * src/lib/getserv.c: getservbynumber() -> getservbyport()
507 2001-03-12 Gary Thomas <gthomas@redhat.com>
509 * src/lib/network_support.c (init_all_network_interfaces):
510 FIx slightly broken previous attempt in abort code.
512 2001-03-11 Gary Thomas <gthomas@redhat.com>
514 * src/lib/network_support.c (init_all_network_interfaces):
515 Let initialization of PCMCIA devices abort after ~5 seconds.
517 2001-02-23 Jonathan Larmour <jlarmour@redhat.com>
519 * src/lib/tftp_server.c (STACK_SIZE): Align
521 2001-02-20 Jonathan Larmour <jlarmour@redhat.com>
523 * cdl/net.cdl: Avoid puts to the CDL header when a CDL
525 Rename CYGPKG_NET_BRIDGE_CODE -> CYGPKG_NET_BRIDGE
526 Rename CYGPKG_NET_NBRIDGE -> CYGNUM_NET_BRIDGES
527 Rename CYGPKG_NET_BRIDGE_HANDLER -> CYGINT_NET_BRIDGE_HANDLER
528 Make if_bridge.c compilation conditional on CYGPKG_NET_BRIDGE
530 * src/sys/net/if_bridge.c: Reflect above renames.
532 2001-02-20 Hugo Tyson <hmt@redhat.com>
533 2001-02-15 Martin Buck <martin.buck@ascom.ch>
535 * cdl/net.cdl: Split up CYGPKG_NET_NBRIDGE into 2 parts:
536 CYGPKG_NET_NBRIDGE and CYGPKG_NET_BRIDGE_HANDLER. If
537 CYGPKG_NET_BRIDGE_HANDLER is nonzero, calls to an Ethernet
538 bridge are inserted into the stack's data path. If
539 CYGPKG_NET_NBRIDGE is nonzero, the standard OpenBSD bridge
540 code is added. This setup allows you to implement your own
541 bridge as a separate package which then implements
542 CYGPKG_NET_BRIDGE_HANDLER so it gets called by the stack.
543 NBRIDGE now is the same as CYGPKG_NET_BRIDGE_HANDLER instead
544 of CYGPKG_NET_NBRIDGE. This means it's nonzero if the bridge
545 is wanted, but it no longer contains the number of bridge
546 buffers requested. This shouldn't be a problem, because the
547 only place where the actual number of buffers is required is
548 in if_bridge.c, which now uses CYGPKG_NET_NBRIDGE instead
551 * src/sys/net/if_bridge.c: Use CYGPKG_NET_NBRIDGE instead of
552 NBRIDGE, because the latter one now only means that there is
553 a bridge, not that we should implement it.
555 2001-01-07 Gary Thomas <gthomas@redhat.com>
557 * src/ecos/support.c:
558 * cdl/net.cdl: Add interface 'CYGPKG_NET_DRIVER_FRAMEWORK'
559 to describe interdependencies between network stack and driver
563 2001-01-03 Hugo Tyson <hmt@redhat.com>
565 * tests/linux_echo.c: New file to test for network bandwidth
566 limitations in host side. Builds to a linux version of the
569 * tests/make.linux (all): Build linux_echo.
571 2001-01-03 Hugo Tyson <hmt@redhat.com>
573 * include/dhcp.h (struct dhcp_lease): Define the semaphore pointer
574 field in each lease structure.
576 * src/lib/dhcp_support.c: Initialize the dhcp_lease structs to
577 point to the semaphore "dhcp_needs_attention".
579 * src/lib/dhcp_prot.c (alarm_function): Post to the semaphore
580 pointed to in the lease structure, rather than one hard-coded.
581 This is much cleaner, in that dhcp_prot.c now uses no external
582 variables, all state goes through the API.
584 2000-11-15 Hugo Tyson <hmt@redhat.com>
586 * src/lib/bootp_support.c (init_net): Do a SIOCSIFADDR a 2nd time
587 after setting the netmask (SIOCSIFNETMASK) in order for the newly
588 set netmask to "take" - otherwise a bogus route based on the
589 default netmask lurks within the system.
591 2000-11-10 Hugo Tyson <hmt@redhat.com>
593 * src/ecos/support.c (cyg_net_get_mem_stats): New API for getting
594 info on the various mem pools the stack uses to enable tests to
597 * include/network.h (cyg_net_get_mem_stats): Export this API for
598 automated network testing.
600 2000-10-24 Hugo Tyson <hmt@redhat.com>
602 * src/lib/tftp_server.c (tftpd_server): Cut down the chatter to
603 nothing (unless there's an error) if running automated testing.
605 2000-10-17 Hugo Tyson <hmt@redhat.com>
606 2000-10-10 Andrew Lunn <Andrew.Lunn@ascom.ch>
608 * src/ecos/support.c (setsoftnet,cyg_panic): Less chatter,
609 particularly not when we're out of MBUFs.
611 2000-10-17 Hugo Tyson <hmt@redhat.com>
612 2000-10-10 Andrew Lunn <Andrew.Lunn@ascom.ch>
614 * src/sys/net/if_bridge.c: Intergrated a more up to date version
615 from the OpenBSD sources. This fixes a few bugs.
617 2000-10-17 Hugo Tyson <hmt@redhat.com>
619 * src/ecos/support.c (cyg_ktime_init): Start time at 1 Second so
620 that all visible time values are valid; offset time by 1 Second
621 subsequently, for ever.
623 * src/sys/netinet/if_ether.c (arpresolve): Undo the change below;
624 instead make "kernel time" be valid ie. more than 1 second into
625 its life. Dumb stack assumes it takes UNIX-like time to start.
627 2000-10-16 Hugo Tyson <hmt@redhat.com>
629 * src/sys/netinet/if_ether.c (arpresolve): Deal with the initial
630 case when the route timeout is zero (as initialized). Otherwise
631 it never actually sent out the initial ARP request packet. This
632 caused connect() not to work, and thus ftp_test, for example.
634 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Also
635 initialize the dhcp semaphore here. The other place it is init'd
636 [correctly] didn't fire if we use the standard support. Fixed
637 some absent return value warnings.
639 2000-10-10 Hugo Tyson <hmt@redhat.com>
641 * src/lib/tftp_server.c (tftpd_server): Modify the server to
642 support multiple sessions - ie. starting N servers at once.
643 Mainly this means closing the initial socket whilst servicing a
644 request, so that another server can then bind to it; tell another
645 server to retry that bind via a semaphore, that it waited on when
646 the bind failed initially, rather than just returning.
648 * src/lib/tftp_dummy_file.c (dummy_open): Trivial bugfix: scan the
649 list of files as well as incrementing the counter.
651 2000-10-05 Andrew Lunn <andrew.lunn@ascom.ch>
653 * src/ecos/support.c (cyg_ktime_func,cyg_ktime_init,cyg_net_init):
654 Make 'ktime' value valid.
656 2000-10-05 Hugo Tyson <hmt@redhat.com>
658 * src/lib/tftp_server.c (tftpd_write_file): Restructure this
659 function to match the loop layout of the tftpd_read_file; so that
660 it retries sensibly, and so that a delayed/duplicated packet does
661 not cause a doubling of all traffic with a less smart host.
663 2000-10-05 Hugo Tyson <hmt@redhat.com>
665 * include/tftp_support.h (TFTP_TIMEOUT_MAX): Change this to 50; it
666 refers to total timeouts for a whole session, so it should be
667 greater than the retry count for each packet.
669 2000-10-05 Hugo Tyson <hmt@redhat.com>
671 * src/lib/tftp_dummy_file.c: Make the fake file slots be a Mb
672 instead of 10k so that you can do meaningful timing tests with it.
673 (dummy_open): Allow re-write of an existing file so that you can
674 do repeated put tests without running out of slots.
676 2000-10-05 Hugo Tyson <hmt@redhat.com>
678 * src/lib/select.c (_cyg_select): Unlock the scheduler in a couple
679 of other places I missed. Doh.
681 2000-09-28 Hugo Tyson <hmt@redhat.com>
683 * src/lib/select.c (_cyg_select): Elect to wait for the flags
684 atomically wrt sockets possibly becoming ready - this was a race
685 condition that would apparently delay a packet until another
686 arrived, eg. a tftp retry. Then two came along all at once.
688 2000-09-28 Hugo Tyson <hmt@redhat.com>
690 * src/lib/tftp_server.c: Add lots of instrumentation for
691 debugging. It's switched off, and doesn't have a real config opt,
692 though it easily could have.
694 2000-09-26 Hugo Tyson <hmt@redhat.com>
696 * src/lib/tftp_server.c (tftpd_read_file): Doh! TFTP_TIMEOUT is an
697 internal API thing, not an error we can send in an ERROR packet.
699 * include/tftp_support.h: Comment to this effect.
701 2000-09-26 Hugo Tyson <hmt@redhat.com>
702 2000-09-25 Andrew Lunn <Andrew.Lunn@ascom.ch>
704 * src/lib/tftp_server.c: Send an ERROR packet when giving up after
705 too many timeouts. This should cause the client to give up as
706 well. Also moved all the replicated code to send an ERROR packet
709 [Huge] I collected another point where we can use the common
710 function also, and used ETIMEOUT instead of EBADOP for the new
711 error packet returns. Thanks Andrew!
713 2000-09-14 Hugo Tyson <hmt@redhat.com>
715 * cdl/net.cdl (CYGOPT_NET_DHCP_DHCP_THREAD_PARAM): Set default to
716 1 so that the DHCP management thread loops forever. This allows
717 it to recover from a DHCP renewal failure.
719 * src/lib/dhcp_prot.c (next_timeout): Harden the DHCP protocol
720 machine against [simulated] failures - otherwise the tests with
721 simulated failures tend just to close down all the interfaces when
722 DHCP packets are lost.
724 2000-09-11 Gary Thomas <gthomas@redhat.com>
726 * src/lib/bootp_support.c (init_net): Set default route correctly.
728 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
730 * src/ecos/support.c (cyg_net_init): You can't print things while
731 initializing the network! Well, not if connected to GDB over the
732 network anyway. The printf("Init device '%s'...); removed.
734 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
736 * OVERVIEW: This is part of the change to the network stack to
737 greatly reduce latencies both of (other) DSRs and of thread
738 scheduling. All the work that the network stack *and* individual
739 ether drivers used to do in DSRs (including alarm callbacks and
740 data copies to/from the device memory) is moved into a "fast
741 network thread" instead. It calls a device's "deliver" function
742 to do the work that was previously in the DSR. This is a separate
743 thread so that it can be set higher priority than application
744 threads in order to minimize packet loss (depending on the
745 driver), if required (the application threads presumed to be
746 higher priority in turn than the network thread). A crucial
747 consequence of this is that we are no longer locking against DSRs,
748 so a plain mutex can be used rather than the global scheduler
749 lock, thus simplifying all the splfoo/splx() style functions.
751 * src/ecos/timeout.c (alarm_thread): Addition of the "fast network
752 thread" which runs DSR-like activities.
753 (do_timeout): Timeout function morphed for calling from that.
754 (do_alarm, ecos_synch_eth_drv_dsr): new DSR functions to signal to
756 (timeout): Race condition fixed. splinternal() used for locking
757 instead of scheduler.
759 * src/ecos/support.c (cyg_net_init): Splfoo/splx() functions,
760 together with tsleep/wakeup functions, all removed to separate
761 them from the mixed bag of utilities in this file. What remains
762 is mbuf wrapper routines and the like, plus the network "netisr"
763 thread itself, the caller into the stack that does the slower
766 * src/ecos/synch.c: New file; implemtation of new splfoo/splx()
767 functions, together with tsleep/wakeup functions, since they are
770 * cdl/net.cdl: Compile new file synch.c; two new options, one for
771 "fast thread" priority, and one for DHCP manager thread priority,
772 as I was adding prio configury. CYGPKG_NET_FAST_THREAD_PRIORITY
773 and CYGPKG_NET_DHCP_THREAD_PRIORITY resp, with suitable default
774 values relative to the CYGPKG_NET_THREAD_PRIORITY.
776 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Use the
777 configured priority rather than just "net thread - 1"
779 2000-08-31 Hugo Tyson <hmt@cygnus.co.uk>
781 * tests/tcp_echo.c: Change the priorities of the main and loading
782 threads to accommodate the network having helper threads around at
783 adjacent priorities to its main thread prio.
785 2000-08-24 Hugo Tyson <hmt@cygnus.co.uk>
787 * src/sys/net/if.c (ifioctl): Support the two new ioctl() keys; at
788 this level, the struct ifreq at the head of the data area must be
789 filled to select an interface.
791 * include/sys/sockio.h (SIOCGIFSTATSUD): Add two new eCos-only
792 ioctl() keys, SIOCGIFSTATSUD and SIOCGIFSTATS, for reading
793 statistical information out of ethernet devices, for SNMP. This
794 should allow SNMP (a) to not explode, (b) to get useful info out
795 of other device implementations than this one.
797 2000-08-17 Hugo Tyson <hmt@cygnus.co.uk>
799 * src/ecos/timeout.c (timeout): Rework the timeout system to
800 record last-time-we-set-the-alarm and whence values, so that new
801 timeouts being added can be set up relative to the correct
802 absolute time. Otherwise adding a new timeout sets them *all*
803 into the future by the expired portion of the previous minimum
804 pending timeout. Also deal better with recursion ie. timeout
805 handlers themselves setting new timeouts as is only natural.
808 * src/ecos/support.c (cyg_splsoftnet): Use the new kernel facility
809 to lock mutex &c atomically, with the scheduler locked already.
810 (cyg_tsleep): Similarly, and reclaim the mutex likewise.
811 Also added lots of asserts to both calls the better to document
814 2000-08-17 Hugo Tyson <hmt@cygnus.co.uk>
816 * src/lib/tftp_server.c: Fix contributors field.
818 2000-08-16 Hugo Tyson <hmt@cygnus.co.uk>
820 * src/lib/tftp_server.c: Improvements to server wrt better error
821 messages and detection of filesystem errors eg. on close-file.
822 Contrib from ASCOM. I tidied up some comments and indent to
823 minimize the diff. [CASE 104354]
825 2000-08-15 Hugo Tyson <hmt@cygnus.co.uk>
827 * doc/bridge.html: New file...
828 * doc/bridge.doc: New file...
829 provided by ASCOM from the OpenBSD version.
831 2000-08-15 Hugo Tyson <hmt@cygnus.co.uk>
833 * src/sys/net/if_bridge.c (bridge_ioctl): SIOCBRDGSTO takes
834 argument in seconds not in ticks. So move around some mul/div by
835 hz ops to get this right.
837 2000-08-14 Gary Thomas <gthomas@redhat.com>
839 * src/ecos/support.c: Use new table definition mechanism.
841 2000-07-27 Hugo Tyson <hmt@cygnus.co.uk>
843 * src/lib/dhcp_prot.c (do_dhcp): Use xmit->bp_htype =
844 HTYPE_ETHERNET rather than ifr.ifr_hwaddr.sa_family; sa_family is
845 in a different namespace, despite appearances.
847 * src/lib/bootp_support.c (do_bootp): Use bp_htype =
848 HTYPE_ETHERNET rather than ifr.ifr_hwaddr.sa_family; sa_family is
849 in a different namespace, despite appearances.
851 2000-07-27 Nick Garnett <nickg@cygnus.co.uk>
853 * cdl/net.cdl: Require the C library STDIO package to be present
854 if there is more than one loopback interface. This is because it
855 needs sprintf() to form the interface names.
857 * src/sys/net/if_loop.c (loopattach):
858 Only use sprintf() to form the loopback interface names when there
859 is more than one. The CDL ensures that this will work.
861 * src/lib/network_support.c:
862 Added diag_printf() version of perror() for when STDIO package is
864 Only use sprintf() to form the loopback interface names when there
865 is more than one. The CDL ensures that this will work.
867 * tests/multi_lo_select.c:
868 * tests/ping_lo_test.c:
869 * tests/tcp_lo_test.c:
870 Removed dependence on C library by adding a substitute perror()
871 based on diag_printf() that is enabled when the STDIO package is
874 2000-07-26 Hugo Tyson <hmt@cygnus.co.uk>
876 * src/lib/dhcp_prot.c (do_dhcp): Set the broadcast flag where
877 necessary, and the client address too. This makes it talk to a
878 greater range of servers OK.
880 2000-07-25 Nick Garnett <nickg@cygnus.co.uk>
882 * tests/multi_lo_select.c: Changed definition of NLISTENERS to
883 work correctly with FILEIO package.
885 * src/sys/net/if_loop.c (loopattach): Changed initialization of
888 * src/ecos/support.c (cyg_net_init): Removed redundant code to
889 initialize loop-back interface.
891 2000-07-25 Hugo Tyson <hmt@cygnus.co.uk>
893 * src/lib/getserv.c: Add a list terminator record with NULLs in it
894 so that the search finishes (without throwing asserts about bad
897 2000-07-21 Hugo Tyson <hmt@cygnus.co.uk>
899 * src/sys/net/if_bridge.c: Move the include of stdio.h lower,
900 apparently it confuses local x86 compilers if their host tree is
901 malformed. Or something.
903 2000-07-21 Hugo Tyson <hmt@cygnus.co.uk>
905 * cdl/net.cdl: Add a lot of description about the way the various
906 fields are used in interface initialization: specifically that
907 "server" so-called is just "someone to talk to" in the absence of
908 bootp - and our tests depend on it!
910 * src/lib/bootp_support.c (init_net): Only set up a route if the
911 route address is nonzero - or all manner of confusion occurs with
912 multiple interfaces and route that sends to 0.0.0.0...
913 For setting up the default route, use
914 (SIOCADDRT, 0, 0, TAG_GATEWAY)
915 rather than the bogus
916 (SIOCADDRT, yiaddr & netmask, netmask, TAG_GATEWAY)
919 * tests/ftp_test.c (ftp_test): Try it with eth1 if available also.
921 * tests/ping_test.c (ping_host): If a ping fails, reset the packet
922 size to small just in case the huge packet size is what's causing
923 confusion - helps it as a debug tool.
925 * tests/dhcp_test.c (net_test): It didn't compile if DHCP is
926 disabled! Doh. Same change as ping_test also.
928 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
930 * src/lib/tftp_server.c (tftpd_read_file): Deal with a) [assumed]
931 timeouts on the select, and b) ACKs for old packets.
932 [CASE 104052 and CASE 104055]
934 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
936 * src/lib/select.c (_cyg_select): Return 0 and do not perturb
937 errno when the timeout occurs. That matches the man page!
940 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
942 * include/machine/param.h: Be more defensive against warnings from
943 external defines such as __linux__/__bsdi__/__FreeBSD__/...
946 2000-07-19 Hugo Tyson <hmt@cygnus.co.uk>
948 * tests/multi_lo_select.c: New test program to test for proper
949 broadcast behaviour of select() implementation. Took some
950 fiddling to get it to work, but it really did fail before the
953 * cdl/net.cdl: Build the new test.
955 * src/lib/select.c (_cyg_select): Don't use the CLR flag in the
956 flag wait because that gives unicast semantics. Flags have
957 producer-does-all-the-work behaviour, so setting a value then
958 clearing it right afterwards does the right thing, with broadcast
959 semantics so long as no waiter has set the CLR part.
962 2000-07-18 Hugo Tyson <hmt@cygnus.co.uk>
964 All part of the bridge contribution from Andrew Lunn/ASCOM
965 (andrew.lunn@ascom.ch). Bridginess is controlled by NBRIDGE which
966 is itself controlled by CDL option CYGPKG_NET_NBRIDGE aka "Number
969 * include/machine/param.h: Add proper definition of untimeout().
971 * include/sys/sockio.h (SIOCBRDGFRL): Add this and the other 2
972 bridge ioctl() call definitions.
974 * include/sys/param.h (splhigh): Added.
976 * src/ecos/timeout.c (untimeout): Implement this properly, it was
979 * src/ecos/support.c: implement cyg_splhigh(), call bridgeintr()
980 when it is scheduled and bridgeattach() if configured.
982 * tests/bridge.c: New "test" file - implements an ethernet bridge.
983 Contributed by Andrew Lunn/ASCOM, from the usual OpenBSD external
986 * include/net/if_bridge.h: New file, contributed by Andrew Lunn/
987 ASCOM, from OpenBSD original. (Actually did exist in eCos source
988 tree but was not released)
990 * src/sys/net/if_bridge.c: New file, contributed by Andrew Lunn/
991 ASCOM, from OpenBSD original.
993 * cdl/net.cdl: Build the new files.
995 2000-07-18 Gary Thomas <gthomas@redhat.com>
997 * src/lib/tftp_client.c (tftp_get): Fix edge condition when
998 penultimate block is full and end of file which implies that
999 the last block has zero data bytes.
1001 2000-07-18 Hugo Tyson <hmt@cygnus.co.uk>
1003 * src/lib/dhcp_prot.c: Ignore NAK messages from the wrong server -
1004 we get these because the REQUEST for our chosen IP is broadcast,
1005 so other servers think we've asked to use the wrong IP.
1007 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1009 * include/bootp.h: export init_loopback_interface();
1011 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1013 * cdl/net.cdl: Add option controlling whether to have a separate
1014 DHCP lease management thread, and what its parameter is to be -
1015 which controls whether it loops or quits if a lease fails.
1017 * src/lib/dhcp_support.c (dhcp_start_dhcp_mgt_thread): Provide the
1018 DHCP management thread function and code to instantiate and start
1019 the thread if so configured.
1021 * src/lib/network_support.c (init_all_network_interfaces): Call
1022 the function that starts the DHCP management thread function.
1024 * include/dhcp.h: Declare the DHCP management thread function &c
1027 * tests/dhcp_test.c (net_test): Only poll for need to rebind DHCP
1028 leases if there is no service thread to do the same.
1030 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1032 * include/bootp.h (build_bootp_record): Export this, no harm in
1033 it, and some folk want to use this rather than configured
1034 initialization or bootp/dhcp.
1035 Also commented the other APIs somewhat better.
1037 * src/lib/network_support.c (build_bootp_record): Unconditionally
1038 provide this; selective linking will look after it if unused.
1040 2000-07-14 Hugo Tyson <hmt@cygnus.co.uk>
1042 * src/lib/network_support.c (build_bootp_record): [Static
1043 configuration of interface parameters] Add the gateway into the
1044 options section with TAG_GATEWAY so that init_net() will pick it
1045 up and set up a route accordingly.
1047 2000-07-13 Hugo Tyson <hmt@cygnus.co.uk>
1049 * tests/dhcp_test.c:
1052 * tests/nc_test_master.c:
1053 * tests/nc_test_slave.c:
1054 * tests/ping_lo_test.c:
1055 * tests/ping_test.c:
1056 * tests/server_test.c:
1057 * tests/set_mac_address.c:
1059 * tests/tftp_client_test.c:
1060 * tests/tftp_server_test.c:
1061 Up the stack size to cope with full DHCP initialization in
1062 init_all_network_interfaces().
1064 2000-07-13 Hugo Tyson <hmt@cygnus.co.uk>
1066 * cdl/net.cdl: Add DHCP enable and interface-specific controls.
1068 * include/dhcp.h: New file: describe the DHCP APIs and behaviour,
1069 as well as some internal APIs that are also available.
1071 * src/lib/dhcp_support.c: New file: the surrounding management
1072 routines, a bit like network_support.c, which know about multiple
1073 interfaces and so on.
1075 * src/lib/dhcp_prot.c: New file: the interface-independent DHCP
1076 protocol machine, which is called from dhcp_support.c routines and
1077 init_all_network_interfaces() in network_support.c
1079 * include/bootp.h (struct bootp): Make the packet bigger if DHCP
1080 so that a mininal DHCP packet will fit.
1082 * src/lib/bootp_support.c (do_bootp): If no reply, fail gracefully
1083 and tidy up so that other interfaces can be upbrung.
1084 (show_bootp): Tell us a lot more about DHCP-specific info in the
1086 (get_bootp_option): be aware of DHCP extensions to re-use file and
1087 sname fields for options.
1089 * src/lib/network_support.c (init_all_network_interfaces): Call
1090 do_dhcp() rather than do_bootp() if so configured, and initialize
1091 the per-interface DHCP state variables accordingly.
1093 * tests/dhcp_test.c (net_test): New test file that diddles the
1094 DHCP machine while doing a ping test.
1096 2000-07-11 Gary Thomas <gthomas@redhat.com>
1098 * include/netdev.h: Add single-inclusion fences.
1100 * include/sys/param.h: Add traced versions of splx() routines,
1101 selectable by a configuration option.
1103 * src/ecos/support.c: Rework splx() emulation routines to
1104 be more robust and realtime friendly.
1106 * src/lib/network_support.c (init_all_network_interfaces):
1107 Add minimal support for PCMCIA based devices.
1109 2000-07-04 Hugo Tyson <hmt@cygnus.co.uk>
1111 * include/bootp.h: Fix namespace pollution from "#define int32
1112 int" - it fights against application code too much.
1114 2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
1116 * cdl/net.cdl: Package requires CYGPKG_MEMALLOC
1118 2000-06-26 Hugo Tyson <hmt@cygnus.co.uk>
1120 * tests/ping_test.c (net_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); also use larger ping
1123 packets now that that is working also.
1125 * tests/tcp_echo.c (echo_test): Added use of the
1126 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS stuff now that the test
1127 passes (consequent on the change below).
1129 2000-06-26 Hugo Tyson <hmt@cygnus.co.uk>
1131 * src/ecos/support.c (cyg_splnet): Use the scheduler lock and a
1132 mutex instead of disable-interrupts for SPLX type processing. A
1133 mutex is used at splsoftnet because that is client threads - we do
1134 not want them to pre-empt the rest of the app. This enables the
1135 real-time response testing for the EBSA285 to succeed (interrupts
1136 every 1mS, DSRs delayed by at most 2mS).
1138 2000-06-23 Hugo Tyson <hmt@cygnus.co.uk>
1140 * src/ecos/support.c (cyg_net_mbuf_alloc, cyg_kmem_init): Align
1141 the mbuf pool to MSIZE [128] bytes. That way dtom() works, nasty
1142 though it is. That's needed for ip reassembly in ip_input.c, when
1143 dealing with large icmp-layer packets eg. ping -s 2000 ...
1145 2000-06-21 Hugo Tyson <hmt@cygnus.co.uk>
1147 * include/lib/libkern/libkern.h: Do not define assert multiple
1148 times; guarded by __ECOS.
1150 * include/sys/param.h (MAX,MIN): Only define if undef.
1152 2000-06-21 Hugo Tyson <hmt@cygnus.co.uk>
1154 * cdl/net.cdl: Build the new tests; in fact build them
1157 * src/lib/network_support.c (init_all_network_interfaces):
1158 Initialize loopback device[s] using init_loopback_interface(),
1159 providing a sensible default route et al. Multiple devs: lo1 will
1160 be 127.0.*1*.1, and so on; class C netmasks will be used.
1162 init_all_network_interfaces() is also made thread-safe as well as
1163 idempotent, so other threads (or daemons) can call it to make sure
1166 * src/ecos/support.c (cyg_net_init): Add a call to loopattach() if
1167 there are indeed loopback dev(s) configured. This does the
1168 equivalent of the init of a device from the table, but simpler.
1170 * tests/udp_lo_test.c (udp_server): New testcase...
1171 * tests/tcp_lo_select.c (tcp_server): New testcase...
1172 * tests/tcp_lo_test.c (tcp_client): New testcase...
1173 * tests/ping_lo_test.c (net_test): New testcase, unconditionally
1174 built loopback device test. Will run on platforms with no network
1177 2000-06-19 Nick Garnett <nickg@cygnus.co.uk>
1179 * src/ecos/support.c:
1181 Converted to use of new table construction mechanism.
1183 2000-06-16 Jonathan Larmour <jlarmour@redhat.co.uk>
1185 * include/bootp.h: Remove RCS id tag
1186 * include/netinet/ip_auth.h: Ditto
1187 * include/netinet/ip_fil.h: Ditto
1188 * include/netinet/ip_fil_compat.h: Ditto
1189 * include/netinet/ip_frag.h: Ditto
1190 * include/netinet/ip_nat.h: Ditto
1191 * include/netinet/ip_proxy.h: Ditto
1192 * include/netinet/ip_state.h: Ditto
1194 2000-06-15 Nick Garnett <nickg@cygnus.co.uk>
1196 * src/sys/kern/sockio.c: Added cyg_selinit() calls to bad_socket()
1197 and bsd_accept() functions.
1199 * src/ecos/support.c (cyg_tsleep): Changed tests on wakeup from
1200 semaphore waits to enable return of EINTR results.
1202 2000-06-09 Nick Garnett <nickg@cygnus.co.uk>
1204 * src/sys/net/if_loop.c: Substituted sprintf() for a straight
1205 strcpy() when initalizing if name. This currently only works for
1206 one loopback interface. However, there seems little need to have
1209 * src/sys/kern/sockio.c (bsd_select): Added select support.
1211 * include/sys/time.h: Moved timeval structure definition to
1212 isoinfra time.h header since it is needed by the select() API.
1214 * include/sys/select.h: Added option to use fileio select
1215 mechanism if it is present.
1217 * src/ecos/support.c (cyg_net_init):
1218 Added code to bring up the loopback interface. This is to help
1219 with testing on platforms without network hardware.
1221 2000-06-08 Hugo Tyson <hmt@cygnus.co.uk>
1223 * include/netinet/ip_var.h: Export ipforwarding as well as
1224 ip_defttl for monitoring applications.
1226 2000-06-07 Nick Garnett <nickg@cygnus.co.uk>
1229 * tests/socket_test.c:
1230 * tests/server_test.c:
1231 * tests/ping_test.c:
1232 * tests/nc_test_master.c:
1233 * tests/nc_test_slave.c:
1235 Removed dependence of these programs on STDIO. For most this
1236 simply required the use of a diag_printf() based perror() clone is
1237 CYGPKG_LIBC_STDIO is not defined. For server_test is also required
1238 the substitution of sprintf() with some more primitive string
1241 * src/sys/netinet/ip_input.c: Rewrote inet_ntoa() to not use
1242 sprintf(). This was the only place in the TCP/IP stack that was
1243 dependent on a STDIO function. We really should avoid building
1244 this kind of casual dependency into the code.
1246 * src/sys/kern/sockio.c: This new file contain code to support the
1247 fileio package. So far only a few of these functions have actually
1250 * include/sys/kernel.h (time): The time variable clashes with the
1251 C library time() function. To prevent this it is renamed ktime,
1252 and a #define allows "kernel" code to continue accessing it as
1255 * src/ecos/support.c: Added definition for ktime variable, as
1256 described above. I could not find any definition for struct
1257 timeval time. I have a nasty suspicion that it was using the
1258 time() function - let's hope that no code that actually uses this
1261 * src/lib/bootp_support.c: Another substitution of a diag_printf()
1262 based perror() clone when STDIO is absent.
1264 * include/sys/bsdtypes.h: This is the original
1265 include/sys/types.h. Renamed to avoid clashing with <sys/types.h>
1266 defined by the isoinfra package.
1268 * include/sys/types.h: Renamed to bsdtypes.h.
1270 * include/machine/limits.h:
1271 Various changes to make these headers play nicely with those
1272 defined in isoinfra package.
1274 * include/network.h: Added include of <pkgconf/system.h>. Fixed
1275 prototypes of functions here to match POSIX specifications.
1278 Split list of files to compile into the common set plus those
1279 needed when the fileio package is present and those that are
1280 needed when it is absent.
1281 Added CDL to export our definitions to <sys/types.h>.
1284 2000-05-31 Hugo Tyson <hmt@cygnus.co.uk>
1286 * src/lib/network_support.c (init_all_network_interfaces): Make
1287 this call idempotent - this is useful for reliable initialization
1288 of dependent subsystems.
1290 * include/lib/libkern/libkern.h: remove protos of random() and
1291 srandom() for they are not in fact provided.
1293 * cdl/net.cdl: Turn off CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS by
1294 default - since not all tests currently pass.
1296 2000-05-12 Hugo Tyson <hmt@cygnus.co.uk>
1298 * cdl/net.cdl (CYGPKG_NET_TFTPD_THREAD_PRIORITY): New option,
1299 control the TFTPD thread priority. These options are *all*
1300 CYGPKG_NET. Yuk, sort 'em out later.
1302 * tests/tftp_server_test.c (tftp_test): Added use of the
1303 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS stuff, same as for the flood
1304 ping test. This one passes (with the next change), so committed.
1306 * src/lib/tftp_server.c (tftpd_server): Cancelled some of the
1307 printouts as connections come and go *iff* the tests are set up to
1308 use the realtime-ness test harness. This needs generalizing into
1309 proper control of the network's chattiness overall.
1310 (tftpd_start): Also added configury of the TFTPD thread priority.
1312 2000-05-12 Hugo Tyson <hmt@cygnus.co.uk>
1314 * cdl/net.cdl: Add flood test below. Also add option
1315 CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS to decide whether to
1316 "Use real-time response test harness (if available)".
1317 Consequently moved the test build stuff forward out of the build
1320 * tests/flood.c (net_test): New file; performs a flood-ping (well,
1321 as fast as we can go) of the server(s) on the two interfaces.
1322 Also uses the real-time interrupt response verification stuff from
1323 the EBSA285 driver component.
1325 2000-05-11 Hugo Tyson <hmt@cygnus.co.uk>
1327 * cdl/net.cdl: Add new utility (and harmless-by-default test)
1328 tests/set_mac_address. You have to edit it to get anything
1331 * tests/set_mac_address.c: New file added. It uses SIOCSIFHWADDR
1332 to set the MAC address of any interfaces it has been told to.
1334 2000-05-08 Gary Thomas <gthomas@redhat.com>
1336 * include/machine/cpu.h:
1337 * include/machine/cdefs.h: Add copyright boilerplate.
1339 2000-05-05 Hugo Tyson <hmt@cygnus.co.uk>
1341 * include/arpa/tftp.h: Aargh. Turns out that removing the align
1342 driective and retaining only the packed directive makes the
1343 original version work. So, reverted. Apologies for the wasted
1346 * src/lib/tftp_server.c (tftpd_read_file): Coupla warnings
1347 reduced, and reverted to match original tftp.h
1349 * src/lib/tftp_dummy_file.c (dummy_open): Removed use of
1350 undeclared malloc().
1352 2000-05-04 Gary Thomas <gthomas@redhat.com>
1354 * src/lib/tftp_server.c:
1355 * src/lib/tftp_client.c: Adjust for changes in header structure.
1357 * include/arpa/tftp.h: Continuing problems with alignment on ARM.
1358 Recourse is very bastardized structure, but it _does_ work.
1360 2000-05-04 Hugo Tyson <hmt@cygnus.co.uk>
1362 * tests/tftp_client_test.c (tftp_test): Print out a coupla more
1363 things and test both interfaces if they exist - which does the
1364 same thing twice if the same server bootp'd both. Changed the
1365 filenames to something more obvious.
1367 * cdl/net.cdl (CYGPKG_NET_TESTS): Build the tftp tests
1368 tests/tftp_client_test tests/tftp_server_test
1370 * src/ecos/support.c (cyg_kmem_print_stats): New function; prints
1371 info about memory usage for some tests to come.
1373 2000-05-04 Gary Thomas <gthomas@redhat.com>
1375 * include/arpa/tftp.h: Force packed alignment - required on some
1378 2000-05-01 Gary Thomas <gthomas@redhat.com>
1380 * src/lib/tftp_dummy_file.c: Adding very simple routines - just
1381 enough to test TFTP server. This support will come from elsewhere
1382 in actual application environments (e.g. a real file system).
1384 * tests/tftp_server_test.c:
1385 * src/lib/tftp_server.c:
1386 * include/tftp_support.h: Flesh out TFTP server support.
1388 2000-04-13 Hugo Tyson <hmt@cygnus.co.uk>
1390 * tests/tcp_echo.c (calibrate_load): Import better background
1391 thread loading algorithm with bugfix; if the initial HIGH limit
1392 was not large enough, it never got loaded enough.
1394 * tests/nc_test_slave.c (calibrate_load): Import the fixed version
1395 from above back in here.
1397 2000-04-12 Gary Thomas <gthomas@redhat.com>
1399 * src/ecos/support.c (cyg_tsleep): Use 'cyg_scheduler_safe_lock()' so
1400 this function can be called with the scheduler locked.
1402 * src/sys/kern/uipc_socket2.c:
1403 * include/sys/socketvar.h: Update sblock()/sbunlock() to be eCos safe.
1405 2000-04-12 Hugo Tyson <hmt@cygnus.co.uk>
1407 * tests/tcp_echo.c: Include <lib/libkern/libkern.h> so that it
1408 links - otherwise max() is not around.
1410 2000-04-11 Gary Thomas <gthomas@redhat.com>
1412 * include/lib/libkern/libkern.h:
1413 * include/network.h (NO_LIBKERN_INLINE): Disable kernel inline
1416 2000-04-11 Gary Thomas <gthomas@redhat.com>
1418 * src/lib/getserv.c: Add TFTP protocol.
1420 * cdl/net.cdl: Add TFTP library functions.
1422 * include/tftp_support.h:
1423 * src/lib/tftp_dummy_file.c:
1424 * src/lib/tftp_server.c:
1425 * src/lib/tftp_client.c: New file(s). Basic TFTP support functions.
1427 2000-04-10 Hugo Tyson <hmt@cygnus.co.uk>
1429 * tests/tcp_echo.c (echo_test):
1430 * tests/tcp_source.c:
1432 Merge in changes from Grant Edwards <grante@visi.com> presented on
1433 ecos-discuss "Mon, 10 Apr 2000 11:01:54 -0500" - fix some
1434 warnings, and use ntohl() on the control data that travels netly
1435 so that the host tools will work on otherendian machines.
1437 2000-04-07 Gary Thomas <gthomas@redhat.com>
1439 * tests/nc_test_slave.c: Update background thread loading
1440 calibration to use a binary search (better) algorithm.
1442 2000-03-29 Hugo Tyson <hmt@cygnus.co.uk>
1444 * tests/ftp_test.c (cyg_test_exit):
1445 * tests/mbuf_test.c (cyg_start):
1446 * tests/nc_test_master.c (cyg_test_exit):
1447 * tests/nc_test_slave.c (show_net_times):
1448 * tests/ping_test.c (cyg_test_exit):
1449 * tests/server_test.c (cyg_test_exit):
1450 * tests/socket_test.c (cyg_test_exit):
1451 * tests/tcp_echo.c (cyg_test_exit):
1452 Some eCos infrastructure changes caused, in some configurations,
1453 cyg_test_exit() from the infrastructure to be brought in (in
1454 tcdiag.o) even when the Test Case system was not explicitly being
1455 invoked. That fought with the convenience copy of cyg_test_exit()
1456 in these tests. The neatest fix is to use that provided centrally
1457 where relevent, so that is what this change does.
1459 * tests/tcp_echo.c: Also now use granularity of 5% by default,
1460 calibrate the load at 50%, and check and report the load that was
1461 actually achieved after the test.
1463 2000-03-29 John Dallaway <jld@cygnus.co.uk>
1465 * doc/ecos_tcpip.html:
1467 Remove error-prone cross-reference to another eCos package.
1471 Synchronize index page title with web site.
1473 2000-03-28 Gary Thomas <gthomas@redhat.com>
1475 * src/lib/bootp_support.c (init_net): Need to start interface,
1476 especially for manual/static IP configurations.
1478 * tests/nc_test_slave.c (calibrate_load): Better calibration for
1481 2000-03-18 Gary Thomas <gthomas@redhat.com>
1483 * src/sys/kern/sys_socket.c:
1484 * src/sys/kern/sys_generic.c:
1485 * include/sys/sockio.h: Add FIONBIO, FIOASYNC, FIONREAD functions.
1487 * include/machine/types.h: Make definitions safe for use with libc.
1489 2000-03-08 Gary Thomas <gthomas@redhat.com>
1491 * src/ecos/support.c: Remove some debug messages.
1492 Update timed sleep functions (tsleep) to use scheduler lock
1493 instead of brute-force interrupt locks.
1495 2000-03-08 Hugo Tyson <hmt@cygnus.co.uk>
1497 * tests/tcp_echo.c (echo_test): Also enable, log and print out the
1498 idle-thread activity during the test - this reassures us that
1499 there is no [significant] spare time being wasted idling during
1500 the test. This change has no effect on the results at all.
1502 2000-03-07 Hugo Tyson <hmt@cygnus.co.uk>
1504 * tests/tcp_echo.c (calibrate_load): Improve the accuracy of the
1505 calibration with some post-scaling. Change load to an array
1506 accessor instead of register-based floating point - this is less
1507 load, so more loops are needed, so the initial load level is upped
1508 also. More loops means better accuracy anyway, a good thing.
1510 2000-03-06 Hugo Tyson <hmt@cygnus.co.uk>
1512 * tests/tcp_source.c (show_results): Print results in Mbit/S also.
1513 (source_test): Warnings reduction; add some casts to sending and
1514 receiving the control packets.
1515 (NUM_BUF): becomes 1024; send more data to get thro'put result.
1517 * tests/tcp_sink.c (show_results): Print results in Mbit/S also.
1518 (sink_test): Warnings reduction; add some casts to sending and
1519 receiving the control packets.
1521 * tests/nc_test_master.c (show_results): Reinstate tot_bytes
1522 variable for host testing tool version. Print results in Mbit/S
1525 * tests/nc_test_slave.c (net_test): Comment out starting multiple
1526 threads; they fight over a wide-open socket. One thread is
1529 2000-03-06 Gary Thomas <gthomas@redhat.com>
1531 * include/netdev.h: Update structure for improved API description.
1533 2000-03-05 Gary Thomas <gthomas@redhat.com>
1535 * include/network.h:
1536 * include/sys/syscallargs.h:
1538 * src/lib/bootp_support.c:
1540 * src/lib/getpeername.c:
1541 * src/lib/getsockname.c:
1542 * src/lib/recvfrom.c:
1544 * tests/nc_test_framework.h:
1545 * tests/nc_test_master.c:
1546 * tests/nc_test_slave.c:
1547 * tests/ping_test.c:
1548 * tests/server_test.c:
1549 * tests/socket_test.c:
1551 Cleanup to remove compiler warnings.
1553 2000-03-04 Gary Thomas <gthomas@redhat.com>
1555 * include/machine/param.h:
1556 * include/sys/socketvar.h:
1557 * src/ecos/timeout.c:
1558 * src/sys/kern/kern_subr.c:
1559 * src/sys/kern/sys_generic.c:
1560 * src/sys/kern/sys_socket.c:
1561 * src/sys/kern/uipc_mbuf.c:
1562 * src/sys/kern/uipc_socket2.c:
1563 * src/sys/kern/uipc_syscalls.c:
1564 * src/sys/net/if_ethersubr.c:
1565 * src/sys/net/if_loop.c:
1566 * src/sys/net/route.c:
1567 * src/sys/net/rtsock.c:
1568 * src/sys/netinet/in_cksum.c:
1569 * src/sys/netinet/in_pcb.c:
1570 * src/sys/netinet/ip_input.c:
1571 * src/sys/netinet/tcp_input.c:
1572 * src/sys/netinet/tcp_output.c:
1573 * src/sys/netinet/tcp_subr.c:
1574 * src/sys/netinet/udp_usrreq.c:
1575 Cleanup to remove compiler warnings.
1577 2000-03-01 Gary Thomas <gthomas@cygnus.co.uk>
1579 * tests/ping_test.c: Reorganize test, display error info.
1581 * src/lib/bootp_support.c: Add support for DNS options.
1583 2000-02-29 Gary Thomas <gthomas@cygnus.co.uk>
1585 * include/sys/sockio.h (SIOCSIFHWADDR): Add function to
1586 set hardware (MAC) address via ioctl.
1588 2000-02-28 John Dallaway <jld@cygnus.co.uk>
1592 Reparent cdl_interface CYGHWR_NET_DRIVER_ETH0_SETUP under
1593 cdl_component CYGHWR_NET_DRIVER_ETH0_SETUP_OPTIONS to
1594 avoid a spurious conflict report when the latter is
1597 2000-02-25 John Dallaway <jld@cygnus.co.uk>
1601 Reparent cdl_interface CYGHWR_NET_DRIVER_ETH1_SETUP under
1602 cdl_component CYGHWR_NET_DRIVER_ETH1_SETUP_OPTIONS to
1603 avoid a spurious conflict report when the latter is
1606 2000-02-22 Gary Thomas <gthomas@cygnus.co.uk>
1608 * include/netinet/if_ether.h:
1609 * include/netinet/ip.h:
1610 * include/netinet/ip_icmp.h:
1611 * include/netinet/tcp.h:
1612 * include/netinet/udp.h: More structure alignement fixes.
1614 2000-02-21 Gary Thomas <gthomas@cygnus.co.uk>
1616 * include/netinet/tcpip.h:
1617 * include/netinet/udp_var.h: Force structure alignment.
1619 2000-02-18 Gary Thomas <gthomas@cygnus.co.uk>
1621 * tests/server_test.c: Target [client] address was wrong.
1623 * tests/tcp_source.c:
1625 * tests/tcp_echo.c: New test suite.
1627 2000-02-17 Gary Thomas <gthomas@cygnus.co.uk>
1629 * tests/ping_test.c: Fix typo in startup message.
1631 * src/sys/net/route.c (route_reinit): New function - only here
1632 until BOOTP problems can be found/fixed.
1634 * src/lib/bootp_support.c (do_bootp): Force any existing routes
1635 to be reset since this causes a problem if BOOTP has been previously
1636 run. Also, the BOOTP request must be zeroed or the server will
1639 * src/lib/network_support.c (init_all_network_interfaces):
1640 Rearrange initialization so that all BOOTP activity takes place
1641 before any permanent setups are in place.
1643 2000-02-16 Gary Thomas <gthomas@cygnus.co.uk>
1645 * src/sys/net/route.c (rtioctl): Add support for deleting routes.
1647 * src/lib/network_support.c (init_all_network_interfaces):
1648 Support predefined IP configurations, as well as BOOTP.
1650 * tests/ping_test.c: Renamed from 'bootp_test.c'
1652 * src/lib/inet_addr.c:
1653 * include/arpa/ftp.h:
1654 * include/arpa/nameser.h:
1655 * include/arpa/telnet.h:
1656 * include/arpa/inet.h:
1657 * include/arpa/tftp.h: New file(s).
1659 2000-02-15 Gary Thomas <gthomas@cygnus.co.uk>
1661 * src/lib/select.c: Add 'cyg_select_with_abort()' interface which
1662 will allow 'select()' function to be abnormally terminated. Add
1663 new function 'cyg_select_abort()' which does this.
1665 2000-02-15 Hugo Tyson <hmt@cygnus.co.uk>
1667 * cdl/net.cdl: Fix typo; cdl_interface CYGHWR_NET_DRIVER_ETH1 was
1668 missing, so EBSA build was conflictual.
1670 2000-02-14 Gary Thomas <gthomas@cygnus.co.uk>
1672 * tests/bootp_test.c:
1674 * tests/nc_test_framework.h:
1675 * tests/nc_test_master.c:
1676 * tests/nc_test_slave.c:
1677 * tests/server_test.c: Rework with automatic network initialization.
1678 Includes support for multiple interfaces.
1680 * src/lib/network_support.c:
1681 * include/network.h: New file(s).
1683 * cdl/net.cdl: New CDL to support multiple interfaces and their
1684 configuration. (Not complete yet).
1686 2000-02-11 Gary Thomas <gthomas@cygnus.co.uk>
1688 * src/lib/select.c (select): Add a way to abort selects (EINTR).
1690 2000-02-10 Gary Thomas <gthomas@cygnus.co.uk>
1692 * tests/nc_test_slave.c (calibrate_load): Slightly different algorithm,
1693 which should work better on all platforms.
1695 2000-02-09 Gary Thomas <gthomas@cygnus.co.uk>
1697 * cdl/net.cdl: Add CYGPKG_NET_THREAD_PRIORITY to allow user more
1698 control over how networking [anonymous] threads behave.
1700 * tests/nc_test_framework.h:
1701 * tests/nc_test_slave.c:
1702 * tests/nc_test_master.c: Support test mode with target CPU under
1705 2000-02-09 Hugo Tyson <hmt@cygnus.co.uk>
1707 * src/ecos/support.c (bcmp): Fix bug. Missing pointer increments
1708 meant that the zeroth byte only was compared. Caused stack to
1709 reject ARP packets - depending on MAC address order for particular
1712 2000-02-09 Hugo Tyson <hmt@cygnus.co.uk>
1714 * tests/bootp_test.c:
1716 * tests/nc_test_master.c:
1717 * tests/server_test.c:
1718 * tests/socket_test.c:
1719 Change stacksize of test thread to TYPICAL not MINIMAL - some
1720 drivers eat more stack than others. Generally:
1721 -#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_MINIMUM
1722 +#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
1724 2000-02-08 John Dallaway <jld@cygnus.co.uk>
1728 Tidy display strings.
1730 #####ECOSPDCOPYRIGHTBEGIN####
1732 # Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
1733 # All Rights Reserved.
1735 # Permission is granted to use, copy, modify and redistribute this
1738 #####ECOSPDCOPYRIGHTEND####