Deleted Added
sdiff udiff text old ( 10905:a6ca6831e775 ) new ( 11204:7a9eeecf2b52 )
full compact
1/*
2 * Copyright (c) 2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

199 header.len, header.type, header.tag);
200 }
201 DDUMP(VIO9PData, data, size);
202#endif
203}
204
205
206VirtIO9PProxy::VirtIO9PProxy(Params *params)
207 : VirtIO9PBase(params)
208{
209}
210
211VirtIO9PProxy::~VirtIO9PProxy()
212{
213}
214
215
216void
217VirtIO9PProxy::VirtIO9PProxy::serialize(CheckpointOut &cp) const
218{
219 fatal("Can't checkpoint a system with a VirtIO 9p proxy!\n");
220}
221
222void
223VirtIO9PProxy::unserialize(CheckpointIn &cp)
224{
225 fatal("Can't checkpoint a system with a VirtIO 9p proxy!\n");
226}
227
228
229void
230VirtIO9PProxy::recvTMsg(const P9MsgHeader &header,
231 const uint8_t *data, size_t size)
232{
233 assert(header.len == sizeof(header) + size);
234 // While technically not needed, we send the packet as one
235 // contiguous segment to make some packet dissectors happy.
236 uint8_t out[header.len];
237 P9MsgHeader header_out(htop9(header));
238 memcpy(out, (uint8_t *)&header_out, sizeof(header_out));
239 memcpy(out + sizeof(header_out), data, size);
240 writeAll(out, sizeof(header_out) + size);

--- 241 unchanged lines hidden ---