etherint.hh (11263:8dcc6b40f164) etherint.hh (13770:ca0cf0ef7051)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 25 unchanged lines hidden (view full) ---

34 */
35
36#ifndef __DEV_NET_ETHERINT_HH__
37#define __DEV_NET_ETHERINT_HH__
38
39#include <string>
40
41#include "dev/net/etherpkt.hh"
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 25 unchanged lines hidden (view full) ---

34 */
35
36#ifndef __DEV_NET_ETHERINT_HH__
37#define __DEV_NET_ETHERINT_HH__
38
39#include <string>
40
41#include "dev/net/etherpkt.hh"
42#include "mem/port.hh"
42
43/*
44 * Class representing the actual interface between two ethernet
45 * components. These components are intended to attach to another
46 * ethernet interface on one side and whatever device on the other.
47 */
43
44/*
45 * Class representing the actual interface between two ethernet
46 * components. These components are intended to attach to another
47 * ethernet interface on one side and whatever device on the other.
48 */
48class EtherInt
49class EtherInt : public Port
49{
50 protected:
51 mutable std::string portName;
52 EtherInt *peer;
53
54 public:
50{
51 protected:
52 mutable std::string portName;
53 EtherInt *peer;
54
55 public:
55 EtherInt(const std::string &name)
56 : portName(name), peer(NULL) {}
56 EtherInt(const std::string &name, int idx=InvalidPortID)
57 : Port(name, idx), portName(name), peer(NULL) {}
57 virtual ~EtherInt() {}
58
59 /** Return port name (for DPRINTF). */
60 const std::string &name() const { return portName; }
61
62 void setPeer(EtherInt *p);
63 EtherInt* getPeer() { return peer; }
64

--- 12 unchanged lines hidden ---
58 virtual ~EtherInt() {}
59
60 /** Return port name (for DPRINTF). */
61 const std::string &name() const { return portName; }
62
63 void setPeer(EtherInt *p);
64 EtherInt* getPeer() { return peer; }
65

--- 12 unchanged lines hidden ---