1. 05 Nov, 2022 1 commit
    • ROOL's avatar
      Preemptive casts ahead of header changes · 4a204d56
      ROOL authored
      Detail:
        The iov_base will be changing from char to void pointer in future,
        preemptively insert a cast in 'kern_subr.c' to prevent compiler errors.
        Move svcdebug.h here from TCPIPLibs since its only (private) implementation
        is this component, and remove unused includes of 'ioc.h' and 'int_hndlr.h'.
      Admin:
        Submission for TCP/IP bounty.
      
      Version 5.65. Not tagged
      4a204d56
  2. 15 Sep, 2018 1 commit
    • Robert Sprowson's avatar
      Fix to SO_SNDTIMEO and SO_RCVTIMEO options being ignored · 2f20b5d4
      Robert Sprowson authored
      The TCPIPLibs library docs remind us that a socket can be modified via setsockopt() to have a non-default timeout for receive (SO_RCVTIMEO) and send (SO_SNDTIMEO) operations, however neither of these options were honoured if set. Instead, a default timeout of ~60s was given.
      This is because although the Internet module stores and propagates (via sbwait()) the timeouts correctly, the underlying tsleep() function is non compliant: it makes no distinction between returning due to a timeout and returning due to being awoken by an event. See
        https://www.freebsd.org/cgi/man.cgi?query=tsleep&sektion=9&manpath=FreeBSD+4.4-RELEASE
      
      for details.
      
      lib/unixenv.c: differentiate between timing out and being awoken, and return EWOULDBLOCK for timeouts.
      
      Aside: select() worked because when tsleep() returned with 0 for a timeout this caused a retry attempt, and the retry loop happens to include its own timer compare, causing select() to return. Now that tsleep() returns EWOULDBLOCK in a timeout situation no retry occurs and the function returns directly.
      
      Tested with a deliberately timing out receive operation, see TCPIPLibs/test/timeo.c
      Tested on RISC OS and FreeBSD 11.1-RELEASE-p4 with both an unset timeout (~60s) and 10s timeout, both behave identically in terms of return value and setting errno appropriately.
      
      Version 5.65. Tagged as 'Internet-5_65'
      2f20b5d4
  3. 28 Apr, 2018 1 commit
    • ROOL's avatar
      Strip out insecure T/TCP support · 38b1495e
      ROOL authored
      Detail:
        RFC6247 moved T/TCP to historic status due to security concerns, this change actively removes the code (where previously we disabled it through sysctl).
      
        tcp_subr.c: remove T/TCP support (per FreeBSD revision 137139).
        tcp_input.c: remove T/TCP support (per FreeBSD revision 137139).
        tcp_usrreq.c: remove T/TCP support (per FreeBSD revision 137139).
        tcp_output.c: remove T/TCP support (per FreeBSD revision 137139).
      Admin:
        Requires TCPIPLibs-5_64.
        Submission for TCP/IP bounty.
      
      Version 5.64. Tagged as 'Internet-5_64'
      38b1495e
  4. 06 Jan, 2018 1 commit
    • Jeffrey Lee's avatar
      Remove Service_PreReset handler · 1f00e299
      Jeffrey Lee authored
      Detail:
        build/cmhg/InetHdr, riscos/c/module - Internet's PreReset handler leaves the module in a dangerous state; if another module attempts to access a previously-valid socket after Internet has completed its PreReset (or even during it, since the code explicitly triggers callbacks) then it will typically result in a crash due to the mbuf session having been closed.
        Since Internet isn't a hardware driver, it shouldn't need to do anything for Service_PreReset, so let's just remove the handler and leave the NIC drivers to deal with any reset handling (which they already appear to do correctly)
        Also, change InetHdr to use service call number #defines instead of magic numbers.
      Admin:
        Tested on Iyonix, iMx6
        Fixes crashes seen on shutdown/reset when software is using sockets from callbacks (e.g. if a VNC server is running)
      
      
      Version 5.63. Tagged as 'Internet-5_63'
      1f00e299
  5. 07 Jun, 2017 1 commit
  6. 17 Jun, 2015 2 commits
  7. 04 Jan, 2015 1 commit
    • Robert Sprowson's avatar
      Fixes to InetGateway InetInfo InetDebug CLI handling · 44174a5c
      Robert Sprowson authored
      With CMHG 5.43 and later the 'help:' keyword actually does something useful, in that it is possible to distinguish between the command being run and help on that command. The Internet module made various assumptions about CMHG command numbers (not including the autogenerated header) which are no longer true as the help keyword renumbers the command numbers that the command handler receives.
      cmhg/InetHdr:
      Ammend the syntax string to match other OS commands. Remove the comment on yucky CMHG messing as that's no longer required.
      riscos/module.c:
      Use the CMHG generated header, correcting function prototypes where needed - this exposed a sin where the Internet module wrote into the user's command buffer when it should not (eg. if the command originated in a read only memory region).
      Simplify the despatch to a switch/case statement.
      Simplify all the command decoding by using OS_ReadArgs.
      Constify lookup_tag().
      Delete OLDMBUFSTATS from pre MbufManager era.
      Internationalised the strings in *InetInfo.
      Fix bug where "NoIf" was printed when no interfaces exist - should have been looked up in the messages file.
      
      Tested briefly in an OMAP4 ROM build. Requires a few more messages in the messages file.
      
      Version 5.60. Tagged as 'Internet-5_60'
      44174a5c
  8. 20 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Don't send an Acorn private option with a DHCP request · 6f36bf78
      Robert Sprowson authored
      Per RFC3942 the public range of DHCP option numbers has been extended to reassign previously private option 164.
      While renumbering into the new site specific range (224-254) was an option, it's also defined that site specific options shouldn't be baked into products, hence support for Inet$PrivateData has been removed.
      
      Version 5.59. Tagged as 'Internet-5_59'
      6f36bf78
  9. 30 Sep, 2013 1 commit
  10. 29 Sep, 2013 1 commit
    • Robert Sprowson's avatar
      Correction to swiveneers for {CONFIG}=26 · 3f6d29e6
      Robert Sprowson authored
      The LDMRet macro had an extra comma before the circumflex, but since these are also defined as macros in the APCS headers, change to using those instead.
      Tested on a Risc PC with RISC OS 4.02 in {CONFIG}=26.
      
      Version 5.58. Tagged as 'Internet-5_58'
      3f6d29e6
  11. 26 Aug, 2012 1 commit
  12. 18 May, 2012 1 commit
  13. 10 May, 2012 1 commit
  14. 14 Jan, 2012 1 commit
  15. 15 Dec, 2011 2 commits
  16. 22 Dec, 2008 1 commit
    • Ben Avison's avatar
      HALised microtime() · bad60796
      Ben Avison authored
      Detail:
        microtime(), which reads the current time into a struct timeval (seconds
        and microseconds) looked for an IOMD, and if not then dropped back to
        centisecond accuracy. This hadn't been noticed before, but upon trying the
        module on a 32-bit IOMD build, its attempt to access IOMD at its 26-bit
        address aborted. Now changed to use the HAL if possible, so all HAL machines
        now have a nice accurate microtime().
      Admin:
        Tested to the extent that it doesn't abort any more - precise checking of
        microtime() values has not been done, nor any analysis of the effect of
        the increased accuracy.
      
      Version 5.52. Tagged as 'Internet-5_52'
      bad60796
  17. 24 Feb, 2007 1 commit
  18. 18 Feb, 2005 1 commit
  19. 12 Nov, 2004 1 commit
    • Ben Avison's avatar
      BBE tidying. · 9d0c09ba
      Ben Avison authored
      Detail:
        Exports VersionNum to BBE.
      Admin:
        Tested in a Tungsten BBE build.
      
      Retagged, since this won't affect any existing builds.
      9d0c09ba
  20. 05 Aug, 2004 1 commit
  21. 22 Jul, 2004 1 commit
  22. 02 Jul, 2004 1 commit
  23. 13 Nov, 2003 1 commit
  24. 06 Sep, 2001 1 commit
    • Kevin Bracey's avatar
      Removed escape acknowledgement again. · 8908e981
      Kevin Bracey authored
      This was a bad solution to the problem - acknowledging the escape says that
      the module has dealt with it and the calling environment shouldn't take
      escape actions. The C library is broken in that when the escape condition
      is cleared/acknowledged, it still proceeds to call its SIGINT handler.
      Compare this to the correct behaviour of the BASIC run-time; the problem
      was originally noticed when calling *Debug, which you have to press Escape
      to exit, and it acknowledges that escape, but C still throws SIGINT. When
      the C library is fixed (as it shortly will be), if the Internet module
      acknowledges escapes, socket calls will return EINTR but not actually
      generate SIGINT.
      
      The change was originally made for NFS, whose central code (in common with
      most Unix code) retried calls returning EINTR. The problem was that the
      escape condition remained unacknowledged so it got stuck in an infinite
      loop. The correct fix will be to make sure that any supervisor mode code
      such as NFS making blocking socket calls takes appropriate action when EINTR
      is returned, or ensures that escape is disabled. Until it is fixed, NFS will
      show lock-up symptoms again with this module. Applications will function as
      expected, as the C run-time will call the SIGINT handler on exit from the
      socket SWI (and acknowledge the escape) - if the signal handler returns the
      foreground code can retry the call.
      
      Version 5.45. Tagged as 'Internet-5_45'
      8908e981
  25. 07 Aug, 2000 1 commit
  26. 13 Jul, 2000 1 commit
    • Andrew Hodgkinson's avatar
      Econet_InetRxDirect interface extended. · a2f1ccf7
      Andrew Hodgkinson authored
      Detail:
        Previously, the SWI didn't care about any return values. The Internet
        module would either free the MBuf passed or send it on to the socket,
        depending on the value of m_len on exit from the SWI. This still works,
        but SWI handlers can now set R1 to zero on exit to claim ownership of
        the MBuf. In this case, the item is neither freed nor passed on to the
        socket, and the new owner must be very careful to make sure that they
        do an appropriate m_free later.
      Admin:
        This change was implemented to allow UDPV to point the MPEG system
        directly to the data in the MBuf chains it was passed rather than taking
        a local copy. It has been tested with both new and old UDPV versions and
        both work as expected. Note that any module using the new interface will
        absolutely require it to be present (new UDPV modules built to use the
        interface extension will refuse to start if Internet is too old).
      
      Version 5.44. Tagged as 'Internet-5_44'
      a2f1ccf7
  27. 05 Jul, 2000 1 commit
    • Kevin Bracey's avatar
      Restored DELAY_EVENTS functionality. · 6b0444a2
      Kevin Bracey authored
      Detail:
      VideoControl was having a nasty reentrancy problem inside its event handler;
      we've been sending out events at points where a BSD Unix system wouldn't and
      exposing a number of potential problems. Fixed by restoring the delayed event
      scheme used in earlier versions of Internet 5, but with an extra event send
      inside the packet input loop which should alleviate the high load problems
      seen with the NEC video client.
      
      Seems to work fine, but we've been unable to get the NEC video client to
      work at all, let alone test it on this Internet module. Doesn't matter for
      now because we're not shipping it :)
      
      Version 5.43. Tagged as 'Internet-5_43'
      6b0444a2
  28. 27 Jun, 2000 1 commit
    • Stewart Brodie's avatar
      Escape handling improved. · 7ebbb6f2
      Stewart Brodie authored
      Detail:
        Attempts by the Internet module to return from a SWI call with an errno
          value of EINTR are now trapped and the escape condition acknowledged
          to prevent S/W that believes a return value of EINTR means "make the
          system call again" from getting stuck in infinite loops.  This fix
          also stops the Escape being returned by the next SWI to be called by
          the application/module that called the Internet SWI.
      Admin:
        Behavioural change dependent on the ACKNOWLEDGE_ESCAPE macro definition.
        This macro is defined by the Makefile in this version.
        Tested on desktop machine.
      
      Version 5.42. Tagged as 'Internet-5_42'
      7ebbb6f2
  29. 12 May, 2000 1 commit
  30. 06 Mar, 2000 1 commit
  31. 22 Feb, 2000 1 commit
  32. 11 Nov, 1999 1 commit
  33. 14 Oct, 1999 1 commit
  34. 27 Aug, 1999 1 commit
    • Kevin Bracey's avatar
      Gawd this version number's creeping up. · 1bf110f2
      Kevin Bracey authored
      Attempts to free some mbufs on receipt of MbufManagerStatus_Scavenge.
      Extracts DHCP NTP servers setting to Inet$NTPServer.
      
      Version 5.36. Tagged as 'Internet-5_36'
      1bf110f2
  35. 10 Aug, 1999 1 commit
    • Stewart Brodie's avatar
      Updated to use new linker set capability of the linker. · 24ce0ffd
      Stewart Brodie authored
      Detail:
        Earlier versions "borrowed" the C++ global constructor mechanism to
          collect linker sets together resulting in some bizarre looking
          requirements (-c++ options passed to cc and link).  These are now
          solved properly.
      Admin:
        Requires link 5.14 or later (and will refuse to link without it)
        This is contained in Library 0.28 and later (Library-0_28)
        With cc 5.14 and later (in Library 0.28 too), warnings about __link
          symbols will be automatically suppressed.
      
      Version 5.35. Tagged as 'Internet-5_35'
      24ce0ffd
  36. 28 Jul, 1999 1 commit
    • Kevin Bracey's avatar
      microtime() now returns microsecond accuracy. · 1c5d3524
      Kevin Bracey authored
      Random number generator now seeded from microtime(), machine ID and
      hardware addresses of DCI drivers.
      Some previously untested debugging code fixed to compile.
      
      Version 5.34. Tagged as 'Internet-5_34'
      1c5d3524
  37. 26 Jul, 1999 1 commit
  38. 22 Jul, 1999 1 commit
    • Kevin Bracey's avatar
      * Used to send fragmented multicasts to the wrong link-level address. This is... · bee8e04b
      Kevin Bracey authored
      * Used to send fragmented multicasts to the wrong link-level address. This is fixed by MbufManager 0.23, but a work-around has been incorporated into the Internet module.
      
      * Ability to debug using PDebug instead of TML added.
      * Various compilation hiccoughs when DEBUG defined fixed.
      
      Version 5.33. Tagged as 'Internet-5_33'
      bee8e04b