Commit Graph

265 Commits

Author SHA1 Message Date
Hugo Santos
36880dfbed make tcphdr public, it is used by several applications.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-08 13:10:45 +00:00
Hugo Santos
9534d90eb9 added IFM_AUTO to if_media and ifconfig.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-07 05:28:55 +00:00
Ingo Weinhold
81149059e2 Removed kludge that was only necessary for building the old bfs_shell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-04 07:59:47 +00:00
Hugo Santos
09b89797af added ADDMULTI/REMMULTI support to ipro1000. Also cleaned up the compat. layer a bit to reuse some of the system's definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 00:10:00 +00:00
Hugo Santos
75f1f9e04a added two more test multicast applications: multicat/multisend. sockaddr_in6/in6_addr must be visible through <netinet/in.h>, fixed that as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 16:56:58 +00:00
Hugo Santos
46527f6806 initial steps towards IPv4 Multicast Filter Delta API (RFC 3678)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 02:44:01 +00:00
Jérôme Duval
72b4b94081 use __builtin_offsetof for gcc4 and superior, it avoids a gcc4 broken build with template use of offsetof()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 18:36:37 +00:00
Hugo Santos
36883c5516 ipro1000: added ETHER_GET_LINK_STATE support
* use em_media_status to get link status
 * added IFM_1000_SX (Fiber Optic) to net/if_media.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:50:54 +00:00
Axel Dörfler
1a3ab92b81 * Rewrote ether_driver.h, removed some BONE stuff we don't support at this point;
it might also be a good idea to change the constants to better match the usual
  style.
* Added a BSD-style if_media.h.
* Added interface flags IFF_LINK, IFF_AUTO_CONFIGURED, and IFF_CONFIGURING. The
  former will be set automatically by the stack, the rest will be set by the
  net_server depending on the current state.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 14:42:07 +00:00
Axel Dörfler
2d55afcdf7 Support getting route information for a specific destination
using SIOCGETRT. Patch by Hugo Santos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-01 12:06:16 +00:00
Axel Dörfler
bdfc47dbcd * Fixed the test for equality when a known ARP reply came in - you should no longer
see the "ARP entry updated with different address" message.
* sockaddr_dl::sdl_data is now unsigned (uint8_t instead of char).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-20 22:21:36 +00:00
Ingo Weinhold
2c97a8d164 Use -I instead of -isystem for system header directories when building
with gcc 4. Fixed resulting build errors (gcc is more lenient for
headers in -isystem directories).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-14 20:36:42 +00:00
Ingo Weinhold
30589be58b Added C++ guard. I don't know, why we define the <wctype.h> protos both
there and in <wchar.h>. Any reason for not removing them in <wctype.h>? Or
maybe even nicer reverse the inclusion direction, i.e. remove the
duplicate protos in <wchar.h> and include <wctype.h> instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-04 02:31:43 +00:00
Axel Dörfler
1beeb96080 setpgrp() returns a pid_t, not an int.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 13:31:24 +00:00
François Revol
6181d22fb0 Change IPPROTO_* from enum to #defines. This fixes #992.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-25 16:37:06 +00:00
Jérôme Duval
a2758a418b replaced size_t with socklen_t where appropriate following POSIX
Axel, I hope you don't mind :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 20:57:28 +00:00
Axel Dörfler
83e805ad15 * Added a note that the flock() definitions are misplaced here.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-06 17:25:52 +00:00
Axel Dörfler
c2c739ce33 * Removed superfluous prototypes from in.h. Minor cleanup.
* Fixed in6.h header. to be able to be compiled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-18 17:12:54 +00:00
Axel Dörfler
caddb025c9 Added sys/un.h header file - AF_UNIX is still unsupported, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 16:12:17 +00:00
Axel Dörfler
a7854360ac Added vfork() as a wrapper to fork().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 14:50:14 +00:00
Axel Dörfler
0ce94a8f47 * Rewrote tcp.h header - however, I think it should only include the TCP options
that can be set via setsockopt().
* For now, the struct tcphdr and its definitions are also part of the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-28 23:02:30 +00:00
Axel Dörfler
5adca30a18 Merge of branches/team/network/new_stack - not yet complete as SVN does only support
replacing files when merging when you don't have deleted them manually (for some reason,
it only works as part of the merge operation, and we didn't copy the whole tree to
have "a fresh start" - next time we know better, at least if SVN still suffers from
that same limitation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-08 12:33:33 +00:00
Ithamar R. Adema
62b4effa0a * Fixup some more headers, following axeld's lead with stdint.h (new_stack didn't compile for me without these).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-03 03:27:04 +00:00
Jérôme Duval
4e0eae1865 patch from Olivier Coursiere for better error output in ping
change the size parameter type of several functions in sys/socket.h to match POSIX
compat libs and legacy headers keep the original R5 type (though I make a change for this)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-23 12:22:26 +00:00
Axel Dörfler
63a9a8f72a Enabling the extended stat() versions had unforeseen consequences (broke the build,
src/bin/coreutils/src/cp.c, line 542 needs stat() exported), therefore, I disabled
it for now again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 21:19:37 +00:00
Jérôme Duval
954f408f50 * PTHREAD_MUTEX_INITIALIZER inits to NULL, pthread_mutex_lock now call pthread_mutex_init to support this PTHREAD_MUTEX_INITIALIZER
* pthread_key_create and pthread_key_delete now manages correctly a list of key/destructor
* pthread_create now uses a private thread function to add a "on_exit_thread" call for destructors
* pthread_join now returns B_OK in every case, and, as a joinable thread could already be gone, wait_for_thread would not find it


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 14:07:34 +00:00
Axel Dörfler
7b3d36e5aa * BEntry::GetStat() and BNode::GetStat() used sizeof(struct stat) for the kernel
syscall, but they could not know if R5 code called them (in which case the stat
  size has a different size). We now always only return the R5 stat structure here.
  This fixes bug #420. We might want to find a different solution to this problem,
  though.
* Be got SYMLINK_MAX wrong - it's not the maximum number of links (that's SYMLOOP_MAX),
  but the maximum size of a symlink buffer. Added missing SYMLOOP_MAX and SYMLINK_MAX
  constants to limits.h.
* Fixes MAXSYMLINKS to use SYMLOOP_MAX, instead of SYMLINKS_MAX (which doesn't exist
  in POSIX specs, but we (intentionally) break source compatibility here).
* Reenabled the Haiku versions of stat(), fstat(), and lstat() when build for Haiku.
* Removed OpenBeOS namespace stuff from the files I touched.
* Removed superfluous StorageDefs.Private.h, whyever that ended up in a public header
  is beyond me.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 13:49:16 +00:00
Jérôme Duval
1f11178f97 added posix thread specific data functions
added a pthread_detach skeleton


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 12:27:46 +00:00
Jérôme Duval
a23efdfa79 added some pthread_* and pthread_attr_* naive functions
I mapped pthread_t to thread_id for simplicity


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 11:05:58 +00:00
Jérôme Duval
1ad334ed89 uint => unsigned int
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-15 23:39:15 +00:00
François Revol
c2be814ab5 added an Haiku-specific RLIMIT (NumOpenVnodeMONitors) (UNIMPLEMENTED yet) (we might want to renumber it),
and used that one and NOFILE to implement R5 private calls _kset_[fd|mon]_limit_()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 19:37:40 +00:00
Axel Dörfler
4ea1753e0a Since we're now using GCC on PPC as well, there is no reason not
to include GCC's header file here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 13:07:53 +00:00
Jérôme Duval
8cea73aade avoids a gcc warning on definition of INT32_MIN
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 16:06:06 +00:00
Axel Dörfler
d2a76f7406 The lround() and lroundf() functions are now also found in our math.h header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 18:14:11 +00:00
Jérôme Duval
c3725117bd wctype_t is already defined in wchar.h which is included
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-03 13:39:23 +00:00
Jérôme Duval
ad6ada0be5 removed struct _pthread* forward declarations, they're not needed
added some more posix definitions, though they might be never used in Haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-21 09:47:43 +00:00
Jérôme Duval
b7f854b819 now match pthread_private.h declarations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-20 14:47:58 +00:00
Jérôme Duval
a00ed9fa24 added some missing pthreads definitions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-20 12:58:32 +00:00
Axel Dörfler
b506c53f0a Changed useconds_t and suseconds_t to be "long" types instead of "long long".
This has a negative effect on ualarm(), but is somewhat required by the POSIX
specs ("[...] the implementation should support one or more programming environments
in which [...], and useconds_t are no greater than the width of type long."
Indeed, it also changed the size of our struct timeval which broken binary
compatibility with R5 (ie. used in gettimeofday()).
This fixes bug #490 and therefore bug #428 (firefox crashing on load) as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-16 15:16:50 +00:00
Axel Dörfler
558885f395 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-06 07:04:34 +00:00
Axel Dörfler
7ca5966a15 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 14:42:47 +00:00
Axel Dörfler
e589b33020 Should fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 14:42:04 +00:00
Jérôme Duval
a34963f388 added posix_gnu_string
added more posix definitions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 11:09:43 +00:00
Jérôme Duval
e0f9a4e815 added some wchar.h definitions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:18:32 +00:00
Jérôme Duval
641526173e fixed cpluscplus guard
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:17:32 +00:00
Axel Dörfler
579c74ceb5 * Implemented a simple version of the private function mstats() (BeIDE needs it).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:15:57 +00:00
Waldemar Kornewald
ce823541ec Removed #ifdef __cplusplus from networking headers. The check is already done in cdefs.h (__BEGIN_DECLS) which I committed yesterday.
Committed libnetwork.so. I actually wanted to port BSD's libc/net resolver, but that one uses too many unsupported functions, so I basically merged libbind.so and libsocket.so into one library.

Moved the libbind.so sources to libnetwork/dns.

Cleaned up native part of libbind.so a little bit more. Though, the ugly hack remains. We nbetter pthread/mutex support. Added TODO that we also shousctl() into the kernel and libroot.so.

Improved DEVNOTES a little bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 10:54:58 +00:00
Waldemar Kornewald
8c85eedc66 Moved the needed headers from private to posix folder. This should hopefully fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 17:42:05 +00:00
Waldemar Kornewald
f7a223fa1b Removed unneeded libbind files (were never compiled, anyway).
Moved some headers around and cleaned them up.

Fixed threading code in libbind.so. Don't know why I hadn't noticed this before. Now it is reliable, but uses an even uglier hack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:26:54 +00:00
Ingo Weinhold
ff29286ffd Ouch, those should have been gone since the activation of new build
system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 23:39:30 +00:00