Commit graph

56 commits

Author SHA1 Message Date
Lionel Sambuc 9fab85c2de Replacing timer_t by netbsd's timer_t
* Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
2014-03-01 09:04:54 +01:00
David van Moolenbroek 94f7151729 INET: use libchardriver
Change-Id: Icf8a1a5769ce0aede1cc28da99b9daf7d328182c
2014-03-01 09:04:51 +01:00
Lionel Sambuc 744378194d Alignement on netbsd types, part 1
The following types are modified (old -> new):
 * _BSD_USECONDS_T_ int       -> unsigned int
 * __socklen_t      __int32_t -> __uint32_t
 * blksize_t        uint32_t  -> int32_t
 * rlim_t           uint32_t  -> uint64_t
On ARM:
 * _BSD_CLOCK_T_    int       -> unsigned int
On Intel:
 * _BSD_CLOCK_T_    int       -> unsigned long

bin/cat is also updated in order to fix warnings.

_BSD_TIMER_T_ has still to be aligned.

Change-Id: I2b4fda024125a19901120546c4e22e443ba5e9d7
2014-02-18 11:25:01 +01:00
Ben Gras 6e5a113837 a bit more -Werror compatability
for clang, fix warnings in drivers/, lib/, servers/, sys/, common/.
by turning off fatal warnings (takes effect if the default is on),
fixing warnings or reducing the warning level.

Change-Id: Ia1b4bc877c879ba783158081b59aa6ebb021a50f
2013-08-20 11:37:40 +02:00
Ben Gras 924eb29565 fix inet warnings
Change-Id: Ia6e761d2c649f03a49b2646387f859d6c2a646cb
2013-05-31 14:30:52 +00:00
Thomas Cort f05ad905a8 inet: silence message about exceptions
. inet: silence message about exceptions not being implemented
	  for select(UDP)

This message generates a lot of noise with openntpd. Hide it unless DEBUG is
turned on.

Change-Id: I1527a9ca2583601d6087456062b4f675c80dd711
2013-04-04 15:06:18 +02:00
Lionel Sambuc f640210005 Removing obsolete _NBSD_LIBC define
Change-Id: Ia6ce84ccdf36cf6f64540b990baaa7d85c53533d
2013-02-26 09:44:24 +00:00
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00
Ben Gras e4ac80eb60 various warning/errorwarning fixes for gcc47
. warnings (sometimes promoted to errors) in servers/ and kernel/
 . -Os for ext2 boot module to make it small enough
2012-08-27 16:19:18 +02:00
Ben Gras db242ed39d retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Thomas Veerman a65ff8a1aa INET: fix 'improved' assert 2012-02-02 11:53:52 +00:00
Thomas Veerman 224a0f6e90 INET: fix a few GCC compilation warnings 2012-02-01 13:24:28 +00:00
Thomas Veerman a87ec6840f INET: remove erroneous assert
The queue may contain established connections which have
tc_connInprogress clear.
2012-01-30 16:09:08 +00:00
Thomas Veerman a282e942bf INET: initialize timer to not-in-use 2012-01-16 11:09:46 +00:00
Thomas Veerman d4b72e81b2 Cleanup servers to make GCC/Clang a little happier 2011-09-08 13:57:03 +00:00
Gianluca Guida cc17b27a2b Build NetBSD libc library in world in ELF mode.
3 sets of libraries are built now:
  . ack: all libraries that ack can compile (/usr/lib/i386/)
  . clang+elf: all libraries with minix headers (/usr/lib/)
  . clang+elf: all libraries with netbsd headers (/usr/netbsd/)

Once everything can be compiled with netbsd libraries and headers, the
/usr/netbsd hierarchy will be obsolete and its libraries compiled with
netbsd headers will be installed in /usr/lib, and its headers
in /usr/include. (i.e. minix libc and current minix headers set
will be gone.)

To use the NetBSD libc system (libraries + headers) before
it is the default libc, see:
   http://wiki.minix3.org/en/DevelopersGuide/UsingNetBSDCode
This wiki page also documents the maintenance of the patch
files of minix-specific changes to imported NetBSD code.

Changes in this commit:
  . libsys: Add NBSD compilation and create a safe NBSD-based libc.
  . Port rest of libraries (except libddekit) to new header system.
  . Enable compilation of libddekit with new headers.
  . Enable kernel compilation with new headers.
  . Enable drivers compilation with new headers.
  . Port legacy commands to new headers and libc.
  . Port servers to new headers.
  . Add <sys/sigcontext.h> in compat library.
  . Remove dependency file in tree.
  . Enable compilation of common/lib/libc/atomic in libsys
  . Do not generate RCSID strings in libc.
  . Temporarily disable zoneinfo as they are incompatible with NetBSD format
  . obj-nbsd for .gitignore
  . Procfs: use only integer arithmetic. (Antoine Leca)
  . Increase ramdisk size to create NBSD-based images.
  . Remove INCSYMLINKS handling hack.
  . Add nbsd_include/sys/exec_elf.h
  . Enable ELF compilation with NBSD libc.
  . Add 'make nbsdsrc' in tools to download reference NetBSD sources.
  . Automate minix-port.patch creation.
  . Avoid using fstavfs() as it is *extremely* slow and unneeded.
  . Set err() as PRIVATE to avoid name clash with libc.
  . [NBSD] servers/vm: remove compilation warnings.
  . u32 is not a long in NBSD headers.
  . UPDATING info on netbsd hierarchy
  . commands fixes for netbsd libc
2011-06-24 11:46:30 +02:00
Arun Thomas 8173242e01 Remove redundant sha2 code from inet 2010-11-15 11:10:02 +00:00
Thomas Veerman 34a2864e27 Fix a few compile time warnings 2010-07-02 12:41:19 +00:00
David van Moolenbroek 9ba65d2ea8 This patch switches the MINIX3 ethernet driver stack from a port-based
model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.
2010-05-17 22:22:53 +00:00
Kees van Reeuwijk 86a23c1fbd Remove U16_t and most other similar types. Rewrite functions to ansi-style
declaration if necessary.
2010-04-21 11:05:22 +00:00
Kees van Reeuwijk e85f78a20b Add some support for wchar_t. 2010-04-19 15:20:24 +00:00
Kees van Reeuwijk c33102ea6b Miscellaneous code cleanup. 2010-03-22 20:43:06 +00:00
Kees van Reeuwijk 1ce69592d2 Fixed an array bounds violation.
Let include guards comform to the Minix standard.
2010-02-24 10:39:58 +00:00
Kees van Reeuwijk 1597e701a0 Remove useless variables and the computations on them. 2010-02-19 10:00:32 +00:00
Ben Gras 157e82e76a philip's inet tcp fix. 2010-02-04 22:06:10 +00:00
Kees van Reeuwijk 2ba237cd4e Fixed a number of uses of uninitialized variables by adding assertions
or other sanity checks, code reshuffling, or fixing broken behavior.
2010-01-27 10:23:58 +00:00
Kees van Reeuwijk a7cee5bec4 Removed unused symbols.
Minor cleanups.
2010-01-22 22:01:08 +00:00
Kees van Reeuwijk 24964aa706 Removed unused variable ip_port from icmp_router_advertisment(). 2010-01-20 22:02:25 +00:00
Kees van Reeuwijk 5459f3a607 Removed a whole herd of unused variables.
Some other cleanup.
2010-01-14 13:53:12 +00:00
David van Moolenbroek c6cce1823d Portability: POSIXize some of inet's error codes 2009-11-28 13:18:33 +00:00
David van Moolenbroek 045f1cdb10 inet: fix TCP connection corruption bug (causing test40 to fail sometimes) 2009-10-06 20:32:58 +00:00
Ben Gras c078ec0331 Basic VM and other minor improvements.
Not complete, probably not fully debugged or optimized.
2008-11-19 12:26:10 +00:00
Philip Homburg 4696d74480 Select support for eth by Erik van der Kouwe. 2008-03-12 14:10:21 +00:00
Philip Homburg 0bd4c5ee7d Initial convertion to asynchronous sends for communicating with ethernet
drivers.
2007-04-23 14:49:20 +00:00
Philip Homburg 9939089dea Safecopy support for INET. 2006-07-10 12:55:33 +00:00
Philip Homburg 6e0bf57f82 Fixed bug in tcp select, added NWIOTCPGERROR. 2006-03-24 14:06:03 +00:00
Philip Homburg 1d78f4a203 Fixed bug in canceling TCP ioctls before INET got an IP address. 2006-02-20 14:35:01 +00:00
Philip Homburg c367670fa8 improved tcp_acceptto. 2006-02-17 13:47:31 +00:00
Philip Homburg df92754d67 Fixed two memory leaks. 2006-02-16 14:13:36 +00:00
Philip Homburg ce7b2f64c5 Fixed bug in VLAN support. 2006-01-12 14:31:06 +00:00
Philip Homburg 9d8b27a2b1 Support for starting ethernet driver after inet has been started 2005-12-09 13:25:30 +00:00
Philip Homburg f6bc0beb6f Less debug output 2005-11-10 15:40:36 +00:00
Philip Homburg ad1f30a63f Deal with crashing ethernet drivers 2005-10-21 16:51:21 +00:00
Philip Homburg 5f7b803dcd Asynchronous connect (for non-blocking socket connect emulation) 2005-09-30 12:44:39 +00:00
Philip Homburg 4d3e666043 Less debug output 2005-08-31 14:20:49 +00:00
Philip Homburg 547bf3ac36 Implemented some boundary cases for LISTENQ. 2005-08-03 11:15:39 +00:00
Philip Homburg dd7220f234 Listen/accept. Read select for UDP. 2005-07-27 12:07:12 +00:00
Ben Gras d5d9764dbb Uninitialised field at init 2005-07-20 14:04:19 +00:00
Philip Homburg c60f3ff846 Select patches for TCP read and write. TCP support for FIONREAD. 2005-07-11 13:02:59 +00:00