X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Fethertap.cc;h=03f2724b1d2e9bde685c2ddcb2a07cc0d84b1667;hb=e904ef37636ec7381cba003a3c9451a088a38190;hp=960d21d730329e7ce9a7b5dee6d2db6f10f0f0ca;hpb=956aff1291990639f8a59a95c6b22e0c17bb8cd8;p=gem5.git diff --git a/dev/ethertap.cc b/dev/ethertap.cc index 960d21d73..03f2724b1 100644 --- a/dev/ethertap.cc +++ b/dev/ethertap.cc @@ -1,5 +1,5 @@ /* - * 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 @@ -30,7 +30,7 @@ * Interface to connect a simulated ethernet device to the real world */ -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(__APPLE__) #include #endif #include @@ -169,7 +169,7 @@ EtherTap::detach() } bool -EtherTap::recvPacket(PacketPtr &packet) +EtherTap::recvPacket(PacketPtr packet) { if (dump) dump->dump(packet); @@ -219,7 +219,7 @@ EtherTap::process(int revent) 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); @@ -313,8 +313,8 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherTap) SimObjectParam peer; SimObjectParam packet_dump; - Param port; - Param bufsz; + Param port; + Param bufsz; END_DECLARE_SIM_OBJECT_PARAMS(EtherTap)