Deleted Added
sdiff udiff text old ( 11036:3de670f298b1 ) new ( 11049:dfb0aa3f0649 )
full compact
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
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;

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

179{
180 // FIXME printing
181 out << "[Switch]";
182}
183
184bool
185Switch::functionalRead(Packet *pkt)
186{
187 return false;
188}
189
190uint32_t
191Switch::functionalWrite(Packet *pkt)
192{
193 // Access the buffers in the switch for performing a functional write
194 uint32_t num_functional_writes = 0;
195 for (unsigned int i = 0; i < m_port_buffers.size(); ++i) {
196 num_functional_writes += m_port_buffers[i]->functionalWrite(pkt);
197 }
198 return num_functional_writes;
199}
200
201Switch *
202SwitchParams::create()
203{
204 return new Switch(this);
205}