/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2003-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* Interface to connect a simulated ethernet device to the real world
*/
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__APPLE__)
#include <sys/param.h>
#endif
#include <netinet/in.h>
}
bool
-EtherTap::recvPacket(PacketPtr &packet)
+EtherTap::recvPacket(PacketPtr packet)
{
if (dump)
dump->dump(packet);
while (data_len != 0 && buffer_offset >= data_len + sizeof(u_int32_t)) {
PacketPtr packet;
- packet = new EtherPacket;
+ packet = new PacketData;
packet->data = new uint8_t[data_len];
packet->length = data_len;
memcpy(packet->data, data, data_len);
SimObjectParam<EtherInt *> peer;
SimObjectParam<EtherDump *> packet_dump;
- Param<uint16_t> port;
- Param<uint16_t> bufsz;
+ Param<unsigned> port;
+ Param<unsigned> bufsz;
END_DECLARE_SIM_OBJECT_PARAMS(EtherTap)