[haiku-commits] r33739 - in haiku/trunk/src/libs/compat/freebsd_network: . compat compat/altq compat/dev/mii compat/dev/pci compat/machine compat/net compat/net80211 compat/netinet compat/security compat/security/mac compat/sys compat/vm
- From: coling@xxxxxx
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Fri, 23 Oct 2009 02:38:56 +0200 (CEST)
Author: colin
Date: 2009-10-23 02:38:56 +0200 (Fri, 23 Oct 2009)
New Revision: 33739
Changeset: http://dev.haiku-os.org/changeset/33739/haiku
Added:
haiku/trunk/src/libs/compat/freebsd_network/Condvar.cpp
haiku/trunk/src/libs/compat/freebsd_network/Unit.cpp
haiku/trunk/src/libs/compat/freebsd_network/clock.c
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/_bus.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus_dma.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/stdarg.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_types.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/route.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/_ieee80211.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_action.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_adhoc.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_ageq.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_amrr.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_crypto.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_dfs.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_haiku.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_hostap.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_ht.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_input.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_ioctl.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_mesh.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_monitor.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_node.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_phy.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_power.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_proto.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_radiotap.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_regdomain.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_rssadapt.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_scan.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_sta.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_superg.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_tdma.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_var.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/ieee80211_wds.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/opt_inet.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/opt_inet6.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/opt_ipx.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net80211/opt_wlan.h
haiku/trunk/src/libs/compat/freebsd_network/compat/netinet/in_var.h
haiku/trunk/src/libs/compat/freebsd_network/compat/security/
haiku/trunk/src/libs/compat/freebsd_network/compat/security/mac/
haiku/trunk/src/libs/compat/freebsd_network/compat/security/mac/mac_framework.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/_mutex.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/_timeval.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/_types.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/condvar.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/firmware.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/ioccom.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/libkern.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/limits.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/linker.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/linker_set.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/mount.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/namei.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/pcpu.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/priv.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/proc.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/sleepqueue.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/socket.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/time.h
haiku/trunk/src/libs/compat/freebsd_network/compat/vm/uma.h
haiku/trunk/src/libs/compat/freebsd_network/condvar.c
haiku/trunk/src/libs/compat/freebsd_network/condvar.h
haiku/trunk/src/libs/compat/freebsd_network/fbsd_mbuf2.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_time.c
haiku/trunk/src/libs/compat/freebsd_network/firmware.c
haiku/trunk/src/libs/compat/freebsd_network/libkern.c
haiku/trunk/src/libs/compat/freebsd_network/priv.c
haiku/trunk/src/libs/compat/freebsd_network/shared.h
haiku/trunk/src/libs/compat/freebsd_network/sleepqueue.c
haiku/trunk/src/libs/compat/freebsd_network/synch.c
haiku/trunk/src/libs/compat/freebsd_network/timeout.c
haiku/trunk/src/libs/compat/freebsd_network/unit.c
haiku/trunk/src/libs/compat/freebsd_network/unit.h
Modified:
haiku/trunk/src/libs/compat/freebsd_network/Jamfile
haiku/trunk/src/libs/compat/freebsd_network/bus.c
haiku/trunk/src/libs/compat/freebsd_network/callout.c
haiku/trunk/src/libs/compat/freebsd_network/compat.c
haiku/trunk/src/libs/compat/freebsd_network/compat/altq/if_altq.h
haiku/trunk/src/libs/compat/freebsd_network/compat/dev/mii/miidevs
haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcireg.h
haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcivar.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/clock.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/endian.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/in_cksum.h
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/resource.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/bpf.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/ethernet.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_arp.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_var.h
haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_vlan_var.h
haiku/trunk/src/libs/compat/freebsd_network/compat/netinet/if_ether.h
haiku/trunk/src/libs/compat/freebsd_network/compat/netinet/ip6.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/_bus_dma.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/_task.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/bus.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/bus_dma.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/callout.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/cdefs.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/endian.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/errno.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/event.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/eventhandler.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/haiku-module.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/kernel.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/ktr.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/malloc.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/mbuf.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/module.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/mutex.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/param.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/queue.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/rman.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/sockio.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/sysctl.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/systm.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/taskqueue.h
haiku/trunk/src/libs/compat/freebsd_network/compat/sys/types.h
haiku/trunk/src/libs/compat/freebsd_network/compat/vm/vm.h
haiku/trunk/src/libs/compat/freebsd_network/device.c
haiku/trunk/src/libs/compat/freebsd_network/device.h
haiku/trunk/src/libs/compat/freebsd_network/driver.c
haiku/trunk/src/libs/compat/freebsd_network/eventhandler.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_busdma_x86.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_ether.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_if_media.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_mbuf.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_mii.c
haiku/trunk/src/libs/compat/freebsd_network/fbsd_mii_physubr.c
haiku/trunk/src/libs/compat/freebsd_network/if.c
haiku/trunk/src/libs/compat/freebsd_network/mbuf.c
haiku/trunk/src/libs/compat/freebsd_network/mii.c
haiku/trunk/src/libs/compat/freebsd_network/mutex.c
haiku/trunk/src/libs/compat/freebsd_network/taskqueue.c
Log:
* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691
Added: haiku/trunk/src/libs/compat/freebsd_network/Condvar.cpp
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/Condvar.cpp
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/Condvar.cpp 2009-10-23
00:38:56 UTC (rev 33739)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2009, Colin Günther, coling@xxxxxx
+ * All Rights Reserved. Distributed under the terms of the MIT License.
+ */
+
+
+#include "condvar.h"
+
+extern "C" {
+#include <compat/sys/condvar.h>
+#include <compat/sys/kernel.h>
+}
+
+#include <condition_variable.h>
+
+#include <slab/Slab.h>
+
+#include "device.h"
+
+
+#define ticks_to_usecs(t) (1000000*(t) / hz)
+
+
+extern "C" {
+static object_cache* sConditionVariableCache;
+
+
+status_t
+init_condition_variables()
+{
+ sConditionVariableCache = create_object_cache("condition variables",
+ sizeof (ConditionVariable), 0, NULL, NULL, NULL);
+ if (sConditionVariableCache == NULL)
+ return B_NO_MEMORY;
+
+ return B_OK;
+}
+
+
+void
+uninit_condition_variables()
+{
+ delete_object_cache(sConditionVariableCache);
+}
+
+} /* extern "C" */
+
+
+void
+_cv_init(struct cv* conditionVariable, const char* description)
+{
+ conditionVariable->condVar =
+
(ConditionVariable*)object_cache_alloc(sConditionVariableCache, 0);
+ conditionVariable->condVar->Init(NULL, description);
+}
+
+
+void
+_cv_wait_unlocked(struct cv* conditionVariable)
+{
+ conditionVariable->condVar->Wait();
+}
+
+
+int
+_cv_timedwait_unlocked(struct cv* conditionVariable, int timeout)
+{
+ status_t status;
+
+ status = conditionVariable->condVar->Wait(B_ABSOLUTE_TIMEOUT,
+ ticks_to_usecs(timeout));
+
+ if (status == B_OK)
+ return ENOERR;
+ else
+ return EWOULDBLOCK;
+}
+
+
+void
+_cv_signal(struct cv* conditionVariable)
+{
+ conditionVariable->condVar->NotifyOne();
+}
Property changes on: haiku/trunk/src/libs/compat/freebsd_network/Condvar.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/Jamfile
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/Jamfile 2009-10-23 00:20:53 UTC
(rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/Jamfile 2009-10-23 00:38:56 UTC
(rev 33739)
@@ -1,6 +1,5 @@
SubDir HAIKU_TOP src libs compat freebsd_network ;
-
UseHeaders [ FDirName $(SUBDIR) ] : true ;
UseHeaders [ FDirName $(SUBDIR) compat ] : true ;
UsePrivateHeaders net ;
@@ -12,7 +11,10 @@
KernelStaticLibrary libfreebsd_network.a :
bus.c
callout.c
+ clock.c
compat.c
+ condvar.c
+ Condvar.cpp
device.c
driver.c
eventhandler.c
@@ -20,13 +22,23 @@
fbsd_ether.c
fbsd_if_media.c
fbsd_mbuf.c
+ fbsd_mbuf2.c
fbsd_mii.c
fbsd_mii_physubr.c
+ fbsd_time.c
+ firmware.c
if.c
+ libkern.c
mbuf.c
mii.c
mutex.c
+ priv.c
+ sleepqueue.c
+ synch.c
taskqueue.c
+ timeout.c
+ unit.c
+ Unit.cpp
;
rule MIIHeaderGen
@@ -46,4 +58,3 @@
}
MIIHeaderGen [ FGristFiles miidevs.h ] : miidevs : miidevs2h.awk ;
-
Added: haiku/trunk/src/libs/compat/freebsd_network/Unit.cpp
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/Unit.cpp
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/Unit.cpp 2009-10-23
00:38:56 UTC (rev 33739)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
+ * All Rights Reserved. Distributed under the terms of the MIT License.
+ *
+ */
+
+
+/*! Wrapper functions for accessing the number buffer.*/
+
+
+#include "unit.h"
+
+// TODO Update Headercomment about count of code users
+#include <util/RadixBitmap.h>
+
+
+#define ID_STORE_FULL -1
+
+
+status_t
+_new_unrhdr_buffer(struct unrhdr* idStore, uint32 maxIdCount) {
+
+ status_t status = B_OK;
+
+ idStore->idBuffer = radix_bitmap_create(maxIdCount);
+ if (idStore->idBuffer == NULL)
+ status = B_NO_MEMORY;
+
+ return status;
+}
+
+
+void
+_delete_unrhdr_buffer_locked(struct unrhdr* idStore) {
+
+ radix_bitmap_destroy(idStore->idBuffer);
+}
+
+
+int
+_alloc_unr_locked(struct unrhdr* idStore) {
+ swap_addr_t slotIndex;
+ int id = ID_STORE_FULL;
+
+ slotIndex = radix_bitmap_alloc(idStore->idBuffer, 1);
+ if (slotIndex != SWAP_SLOT_NONE) {
+ id = slotIndex + idStore->idBias;
+ }
+
+ return id;
+}
+
+
+void
+_free_unr_locked(struct unrhdr* idStore, u_int identity) {
+ uint32 slotIndex = (int32)identity - idStore->idBias;
+
+ radix_bitmap_dealloc(idStore->idBuffer, slotIndex, 1);
+}
Property changes on: haiku/trunk/src/libs/compat/freebsd_network/Unit.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/bus.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/bus.c 2009-10-23 00:20:53 UTC
(rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/bus.c 2009-10-23 00:38:56 UTC
(rev 33739)
@@ -1,10 +1,10 @@
/*
* Copyright 2007, Hugo Santos. All Rights Reserved.
* Copyright 2004, Marcus Overhagen. All Rights Reserved.
- *
* Distributed under the terms of the MIT License.
*/
+
#include "device.h"
#include <stdlib.h>
@@ -14,12 +14,15 @@
#include <compat/dev/pci/pcireg.h>
#include <compat/dev/pci/pcivar.h>
#include <compat/machine/resource.h>
+#include <compat/sys/mutex.h>
+#include <compat/machine/bus.h>
+#include <compat/sys/rman.h>
#include <compat/sys/bus.h>
-#include <compat/sys/rman.h>
// private kernel header to get B_NO_HANDLED_INFO
#include <int.h>
+
//#define DEBUG_BUS_SPACE_RW
#ifdef DEBUG_BUS_SPACE_RW
# define TRACE_BUS_SPACE_RW(x) driver_printf x
@@ -37,9 +40,6 @@
#define ROUNDUP(a, b) (((a) + ((b)-1)) & ~((b)-1))
-// TODO: x86 specific!
-#define I386_BUS_SPACE_IO 0
-#define I386_BUS_SPACE_MEM 1
struct internal_intr {
device_t dev;
@@ -54,7 +54,6 @@
int32 handling;
};
-
static int32 intr_wrapper(void *data);
@@ -457,7 +456,16 @@
BUS_SPACE_WRITE(2, uint16_t, out16)
BUS_SPACE_WRITE(4, uint32_t, out32)
+int
+bus_child_present(device_t child)
+{
+ device_t parent = device_get_parent(child);
+ if (parent == NULL)
+ return 0;
+ return bus_child_present(parent);
+}
+
// #pragma mark - PCI functions
Modified: haiku/trunk/src/libs/compat/freebsd_network/callout.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/callout.c 2009-10-23
00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/callout.c 2009-10-23
00:38:56 UTC (rev 33739)
@@ -1,8 +1,10 @@
/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
* Copyright 2007, Hugo Santos. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
+
#include "device.h"
#include <compat/sys/callout.h>
@@ -33,11 +35,7 @@
void
callout_init_mtx(struct callout *c, struct mtx *mtx, int flags)
{
- // we must manually initialize the timer, since the networking
- // stack might not be loaded yet
- c->c_timer.hook = handle_callout;
- c->c_timer.data = c;
- c->c_timer.due = 0;
+ gStack->init_timer(&c->c_timer, handle_callout, c);
c->c_arg = NULL;
c->c_func = NULL;
Added: haiku/trunk/src/libs/compat/freebsd_network/clock.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/clock.c
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/clock.c 2009-10-23 00:38:56 UTC
(rev 33739)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
+ * All rights reserved. Distributed under the terms of the MIT License.
+ */
+
+
+#include "device.h"
+
+
+int ticks;
+struct net_timer hardclockTimer;
+
+
+void hardclock(struct net_timer*, void*);
+
+
+// TODO use the hardclock function in the compat layer actually.
+status_t
+init_clock()
+{
+ gStack->init_timer(&hardclockTimer, &hardclock, NULL);
+ gStack->set_timer(&hardclockTimer, hz);
+
+ return B_OK;
+}
+
+
+void
+uninit_clock()
+{
+ gStack->cancel_timer(&hardclockTimer);
+}
+
+
+void
+hardclock(struct net_timer* timer, void* argument)
+{
+ atomic_add((vint32*)&ticks, 1);
+ gStack->set_timer(&hardclockTimer, hz);
+}
Property changes on: haiku/trunk/src/libs/compat/freebsd_network/clock.c
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/altq/if_altq.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/altq/if_altq.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/altq/if_altq.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -1,29 +1,36 @@
+/*
+ * Copyright 2007 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
#ifndef _FBSD_COMPAT_ALTQ_IF_ALTQ_H_
#define _FBSD_COMPAT_ALTQ_IF_ALTQ_H_
+
#include <sys/mbuf.h>
#include <sys/mutex.h>
+
struct ifaltq {
- struct mbuf * ifq_head;
- struct mbuf * ifq_tail;
+ struct mbuf* ifq_head;
+ struct mbuf* ifq_tail;
int ifq_len;
int ifq_maxlen;
int ifq_drops;
struct mtx ifq_mtx;
- struct mbuf * ifq_drv_head;
- struct mbuf * ifq_drv_tail;
+ struct mbuf* ifq_drv_head;
+ struct mbuf* ifq_drv_tail;
int ifq_drv_len;
int ifq_drv_maxlen;
int altq_flags;
};
+
#define ALTQF_READY 0x1
-#define ALTDQ_REMOVE 1
+#define ALTDQ_REMOVE 1
#define ALTQ_IS_ENABLED(ifq) 0
#define ALTQ_ENQUEUE(ifr, m, foo, error) \
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/dev/mii/miidevs
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/dev/mii/miidevs
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/dev/mii/miidevs
2009-10-23 00:38:56 UTC (rev 33739)
@@ -49,6 +49,7 @@
* mangled accordingly to compensate.
*/
+
oui AGERE 0x00a0bc Agere Systems
oui ALTIMA 0x0010a9 Altima Communications
oui AMD 0x00001a Advanced Micro Devices
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcireg.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcireg.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcireg.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -589,6 +589,12 @@
#define PCIM_EXP_TYPE_PCI_BRIDGE 0x0070
#define PCIM_EXP_FLAGS_SLOT 0x0100
#define PCIM_EXP_FLAGS_IRQ 0x3e00
+#define PCIR_EXPRESS_DEVICE_CTL 0x8
+#define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0
+#define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000
+#define PCIR_EXPRESS_LINK_CAP 0xc
+#define PCIM_LINK_CAP_ASPM 0x00000c00
+#define PCIR_EXPRESS_LINK_CTL 0x10
/* MSI-X definitions */
#define PCIR_MSIX_CTRL 0x2
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcivar.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcivar.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/dev/pci/pcivar.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -1,4 +1,5 @@
/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
* Copyright 2007, Hugo Santos. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
@@ -12,7 +13,13 @@
#define PCI_RF_DENSE 0x10000
// ignored on x86
+#define PCI_POWERSTATE_D0 0
+#define PCI_POWERSTATE_D1 1
+#define PCI_POWERSTATE_D2 2
+#define PCI_POWERSTATE_D3 3
+#define PCI_POWERSTATE_UNKNOWN -1
+
int pci_enable_busmaster(device_t dev);
int pci_enable_io(device_t dev, int reg);
@@ -44,10 +51,25 @@
int pci_msix_count(device_t dev);
int pci_alloc_msix(device_t dev, int *count);
+
static inline int
pci_get_vpd_ident(device_t dev, const char **identptr)
{
return -1;
}
+
+static inline int
+pci_set_powerstate(device_t dev, int state)
+{
+ return PCI_POWERSTATE_UNKNOWN;
+}
+
+
+static inline int
+pci_get_powerstate(device_t dev)
+{
+ return PCI_POWERSTATE_D0;
+}
+
#endif /* _FBSD_COMPAT_DEV_PCI_PCIVAR_H_ */
Added: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/_bus.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/_bus.h
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/_bus.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2009, Colin Günther. All Rights Reserved.
+ * Copyright 2007, Hugo Santos. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_MACHINE__BUS_H_
+#define _FBSD_COMPAT_MACHINE__BUS_H_
+
+
+typedef uint32_t bus_addr_t;
+typedef uint32_t bus_size_t;
+
+typedef int bus_space_tag_t;
+typedef unsigned int bus_space_handle_t;
+
+#endif /* _FBSD_COMPAT_MACHINE__BUS_H_ */
Property changes on:
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/_bus.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2009, Colin Günther. All Rights Reserved.
+ * Copyright 2007, Hugo Santos. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_MACHINE_BUS_H_
+#define _FBSD_COMPAT_MACHINE_BUS_H_
+
+
+#include <machine/_bus.h>
+
+
+// TODO: x86 specific!
+#define I386_BUS_SPACE_IO 0
+#define I386_BUS_SPACE_MEM 1
+
+#define BUS_SPACE_MAXADDR_32BIT 0xffffffff
+#define BUS_SPACE_MAXADDR 0xffffffff
+
+#define BUS_SPACE_MAXSIZE_32BIT 0xffffffff
+#define BUS_SPACE_MAXSIZE 0xffffffff
+
+#define BUS_SPACE_UNRESTRICTED (~0)
+
+#define BUS_SPACE_BARRIER_READ 1
+#define BUS_SPACE_BARRIER_WRITE 2
+
+
+uint8_t bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset);
+uint16_t bus_space_read_2(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset);
+uint32_t bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset);
+void bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset, uint8_t value);
+void bus_space_write_2(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset, uint16_t value);
+void bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset, uint32_t value);
+
+void bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int8_t *addr, size_t count);
+
+
+static __inline void
+bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int32_t *addr, size_t count)
+{
+
+ if (tag == I386_BUS_SPACE_IO) {
+ int _port_ = bsh + offset;
+ __asm __volatile(" \n\
+ cld \n\
+ 1: inl %w2,%%eax \n\
+ stosl \n\
+ addl $4,%2 \n\
+ loop 1b" :
+ "=D" (addr), "=c" (count), "=d" (_port_) :
+ "0" (addr), "1" (count), "2" (_port_) :
+ "%eax", "memory", "cc");
+ } else {
+ void* _port_ = (void*) (bsh + offset);
+ memcpy(addr, _port_, count);
+ }
+}
+
+
+static __inline void
+bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int8_t *addr, size_t count)
+{
+ if (tag == I386_BUS_SPACE_IO) {
+ int _port_ = bsh + offset;
+ __asm __volatile(" \n\
+ cld \n\
+ 1: lodsb \n\
+ outb %%al,%w0 \n\
+ incl %0 \n\
+ loop 1b" :
+ "=d" (_port_), "=S" (addr), "=c" (count) :
+ "0" (_port_), "1" (addr), "2" (count) :
+ "%eax", "memory", "cc");
+ } else {
+ void* _port_ = (void*) (bsh + offset);
+ memcpy(_port_, addr, count);
+ }
+}
+
+
+static inline void
+bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t handle,
+ bus_size_t offset, bus_size_t len, int flags)
+{
+ if (flags & BUS_SPACE_BARRIER_READ)
+ __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory");
+ else
+ __asm__ __volatile__ ("" : : : "memory");
+}
+
+
+#include <machine/bus_dma.h>
+
+
+#define bus_space_write_stream_4(t, h, o, v) \
+ bus_space_write_4((t), (h), (o), (v))
+
+#endif /* _FBSD_COMPAT_MACHINE_BUS_H_ */
Added: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus_dma.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus_dma.h
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus_dma.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,11 @@
+/*
+ * Copyright 2009, Colin Günther, coling@xxxxxx
+ * All Rights Reserved. Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_MACHINE_BUS_DMA_H_
+#define _FBSD_COMPAT_MACHINE_BUS_DMA_H_
+
+
+#include <sys/bus_dma.h>
+
+#endif /* _FBSD_COMPAT_MACHINE_BUS_DMA_H_ */
Property changes on:
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/bus_dma.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/clock.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/clock.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/clock.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,9 @@
+/*
+ * Copyright 2009 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_SYS_CLOCK_H_
+#define _FBSD_COMPAT_SYS_CLOCK_H_
+
+
+#endif /* _FBSD_COMPAT_SYS_CLOCK_H_ */
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/endian.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/endian.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/endian.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -1,4 +1,12 @@
+/*
+ * Copyright 2007 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
#ifndef _FBSD_COMPAT_MACHINE_ENDIAN_H_
#define _FBSD_COMPAT_MACHINE_ENDIAN_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
#endif
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/in_cksum.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/in_cksum.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/in_cksum.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -9,6 +9,9 @@
#include <stdint.h>
+#define in_cksum(m, len) in_cksum_skip(m, len, 0)
+
+
static inline u_short
in_pseudo(u_int sum, u_int b, u_int c)
{
@@ -17,7 +20,6 @@
return 0;
}
-#define in_cksum(m, len) in_cksum_skip(m, len, 0)
static inline u_short
in_cksum_skip(struct mbuf* m, int len, int skip)
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/resource.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/resource.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/resource.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -1,6 +1,11 @@
+/*
+ * Copyright 2007 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
#ifndef _FBSD_COMPAT_MACHINE_RESOURCE_H_
#define _FBSD_COMPAT_MACHINE_RESOURCE_H_
+
#define SYS_RES_IRQ 0x1
#define SYS_RES_DRQ 0x2
#define SYS_RES_MEMORY 0x3
Added: haiku/trunk/src/libs/compat/freebsd_network/compat/machine/stdarg.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/machine/stdarg.h
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/machine/stdarg.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2009 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_MACHINE_STDARG_H_
+#define _FBSD_COMPAT_MACHINE_STDARG_H_
+
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#endif /* _FBSD_COMPAT_MACHINE_STDARG_H_ */
Property changes on:
haiku/trunk/src/libs/compat/freebsd_network/compat/machine/stdarg.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/bpf.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/bpf.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/bpf.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -1,13 +1,21 @@
/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
* Copyright 2007, Hugo Santos. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FBSD_COMPAT_NET_BPF_H_
#define _FBSD_COMPAT_NET_BPF_H_
+
+struct bpf_if;
+
+
#define bpf_mtap(bpf_if, mbuf) do { } while (0)
#define BPF_MTAP(ifp, m) do { } while (0)
+#define bpf_mtap2(bpf_if, data, dlen, mbuf) do { } while (0)
+#define bpfattach2(ifnet, dlt, hdrlen, bpf_if) do { } while (0)
+
static inline int
bpf_peers_present(struct bpf_if *bpf)
{
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/ethernet.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/ethernet.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/ethernet.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -4,11 +4,9 @@
* $FreeBSD: src/sys/net/ethernet.h,v 1.32 2007/05/29 12:40:45 yar Exp $
*
*/
-
#ifndef _FBSD_COMPAT_NET_ETHERNET_H_
#define _FBSD_COMPAT_NET_ETHERNET_H_
-#include <sys/kernel.h>
/*
* Somce basic Ethernet constants.
@@ -56,6 +54,9 @@
#define ETHER_IS_VALID_LEN(foo) \
((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
+static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] =
+ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+
/*
* Structure of a 10Mb/s Ethernet header.
*/
@@ -365,7 +366,7 @@
struct ifnet;
struct mbuf;
-struct rtentry;
+struct route;
struct sockaddr;
struct bpf_if;
@@ -376,7 +377,7 @@
extern void ether_ifdetach(struct ifnet *);
extern int ether_ioctl(struct ifnet *, u_long, caddr_t);
extern int ether_output(struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *);
+ struct mbuf *, struct sockaddr *, struct route *);
extern int ether_output_frame(struct ifnet *, struct mbuf *);
extern char *ether_sprintf(const u_int8_t *);
void ether_vlan_mtap(struct bpf_if *, struct mbuf *,
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/if.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/if.h 2009-10-23
00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/if.h 2009-10-23
00:38:56 UTC (rev 33739)
@@ -6,8 +6,14 @@
#define _FBSD_COMPAT_NET_IF_H_
+// Rename the ifreq structure provided by posix/net/if.h
+// so that we can add FreeBSD based ifreq parts.
+#define ifreq ifreq_haiku_unused
#include <posix/net/if.h>
+#undef ifreq
+#include <sys/cdefs.h>
+#include <sys/queue.h>
#include <sys/time.h>
@@ -15,7 +21,6 @@
#define IF_Mbps(x) (IF_Kbps((x) * 1000))
#define IF_Gbps(x) (IF_Mbps((x) * 1000))
-
/* Capabilities that interfaces can advertise. */
#define IFCAP_RXCSUM 0x0001 /* can offload checksum on RX */
#define IFCAP_TXCSUM 0x0002 /* can offload checksum on TX */
@@ -26,25 +31,53 @@
#define IFCAP_POLLING 0x0040 /* driver supports polling */
#define IFCAP_VLAN_HWCSUM 0x0080
#define IFCAP_TSO4 0x0100 /* supports TCP
segmentation offload */
+#define IFCAP_WOL_UCAST 0x00800 /* wake on any unicast frame */
+#define IFCAP_WOL_MCAST 0x01000 /* wake on any multicast frame
*/
+#define IFCAP_WOL_MAGIC 0x02000 /* wake on any Magic Packet */
#define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan
tag */
#define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM)
+#define IFCAP_WOL (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST |
IFCAP_WOL_MAGIC)
-#define IFF_DRV_RUNNING 0x10000
-#define IFF_DRV_OACTIVE 0x20000
-#define IFF_LINK0 0x40000
-#define IFF_DEBUG 0x80000
+#define IFF_DRV_RUNNING 0x00010000
+#define IFF_DRV_OACTIVE 0x00020000
+#define IFF_LINK0 0x00040000 /* per link
layer defined bit */
+#define IFF_LINK1 0x00080000 /* per
link layer defined bit */
+#define IFF_LINK2 0x00100000 /* per
link layer defined bit */
+#define IFF_DEBUG 0x00200000
+#define IFF_MONITOR 0x00400000 /* (n)
user-requested monitor mode */
-
#define LINK_STATE_UNKNOWN 0
#define LINK_STATE_DOWN 1
#define LINK_STATE_UP 2
-
#define IFQ_MAXLEN 50
+struct ifreq {
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union {
+ struct sockaddr ifr_addr;
+ struct sockaddr ifr_dstaddr;
+ struct sockaddr ifr_broadaddr;
+ struct sockaddr ifr_mask;
+ struct ifreq_parameter ifr_parameter;
+ struct ifreq_stats ifr_stats;
+ struct route_entry ifr_route;
+ int ifr_flags;
+ int ifr_index;
+ int ifr_metric;
+ int ifr_mtu;
+ int ifr_media;
+ int ifr_type;
+ int ifr_reqcap;
+
+ // FreeBSD specific Part
+ caddr_t ifr_data;
+ };
+};
+
struct ifmediareq {
char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */
int ifm_current; /* current media options */
@@ -92,4 +125,16 @@
struct timeval ifi_lastchange; /* time of last administrative change */
};
+struct ifdrv {
+ char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ unsigned long ifd_cmd;
+ size_t ifd_len;
+ void *ifd_data;
+};
+
+#ifdef _KERNEL
+/* XXX - this should go away soon. */
+#include <net/if_var.h>
#endif
+
+#endif
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_arp.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_arp.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_arp.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -30,8 +30,8 @@
* $FreeBSD: src/sys/net/if_arp.h,v 1.22 2005/06/10 16:49:18 brooks Exp $
*/
-#ifndef _NET_IF_ARP_H_
-#define _NET_IF_ARP_H_
+#ifndef _FBSD_COMPAT_NET_IF_ARP_H_
+#define _FBSD_COMPAT_NET_IF_ARP_H_
/*
* Address Resolution Protocol.
@@ -112,4 +112,4 @@
#endif
-#endif /* !_NET_IF_ARP_H_ */
+#endif /* _FBSD_COMPAT_NET_IF_ARP_H_ */
Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
2009-10-23 00:20:53 UTC (rev 33738)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -35,8 +35,8 @@
* SUCH DAMAGE.
*/
-#ifndef _NET_IF_MEDIA_H_
-#define _NET_IF_MEDIA_H_
+#ifndef _FBSD_COMPAT_NET_IF_MEDIA_H_
+#define _FBSD_COMPAT_NET_IF_MEDIA_H_
/*
* Prototypes and definitions for BSD/OS-compatible network interface
@@ -211,6 +211,7 @@
#define IFM_IEEE80211_WDS 0x00000800 /* Operate in WDS mode
*/
#define IFM_IEEE80211_TURBO 0x00001000 /* Operate in turbo
mode */
#define IFM_IEEE80211_MONITOR 0x00002000 /* Operate in monitor
mode */
+#define IFM_IEEE80211_MBSS 0x00004000 /* Operate in MBSS mode
*/
/* operating mode for multi-mode devices */
#define IFM_IEEE80211_11A 0x00010000 /* 5Ghz, OFDM mode */
@@ -662,4 +663,4 @@
{ 0, 0, 0, \
{ NULL, NULL } } \
}
-#endif /* _NET_IF_MEDIA_H_ */
+#endif /* _FBSD_COMPAT_NET_IF_MEDIA_H_ */
Added: haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_types.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_types.h
(rev 0)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_types.h
2009-10-23 00:38:56 UTC (rev 33739)
@@ -0,0 +1,14 @@
+/*
+ * Copyright 2009, Colin Günther, coling@xxxxxxx
+ * All rights reserved. Distributed under the terms of the MIT License.
+ */
+#ifndef _FBSD_COMPAT_NET_IF_TYPES_H_
+#define _FBSD_COMPAT_NET_IF_TYPES_H_
[... truncated: 13908 lines follow ...]
Other related posts:
- » [haiku-commits] r33739 - in haiku/trunk/src/libs/compat/freebsd_network: . compat compat/altq compat/dev/mii compat/dev/pci compat/machine compat/net compat/net80211 compat/netinet compat/security compat/security/mac compat/sys compat/vm - coling