1 // 2 // Copyright (c) 2010-2019 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 8 using Antmicro.Renode.Utilities.Packets; 9 10 namespace Antmicro.Renode.Extensions.Utilities.USBIP 11 { 12 public struct Header 13 { 14 [PacketField] 15 public ushort Version; 16 [PacketField] 17 public Command Command; 18 [PacketField] 19 public uint Status; 20 ToStringAntmicro.Renode.Extensions.Utilities.USBIP.Header21 public override string ToString() 22 { 23 return $"Version = 0x{Version:X}, Command = {Command} (0x{Command:X}), Status = 0x{Status:X}"; 24 } 25 } 26 27 public enum Command: ushort 28 { 29 ListDevices = 0x8005, 30 ListDevicesReply = 0x5, 31 AttachDevice = 0x8003, 32 AttachDeviceReply = 0x3, 33 } 34 } 35