public DHCPv6Packet(IPv6HeaderInformation header, UInt32 transactionId, DHCPv6PacketTypes packetType, IEnumerable <DHCPv6PacketOption> options) { Header = header; TransactionId = transactionId; PacketType = packetType; _options = new List <DHCPv6PacketOption>(options); }
private static DHCPv6Packet ConstructPacketWithHeader(DHCPv6Packet requestPacket, DHCPv6Packet innerResponse) { DHCPv6Packet response = ConstructPacket(requestPacket, innerResponse); response.Header = IPv6HeaderInformation.AsResponse(requestPacket.Header); return(response); }
public static DHCPv6Packet FromByteArray(Byte[] rawData, IPv6HeaderInformation ipv6Header) { try { var result = FromByteArray(rawData); result.Header = ipv6Header; result._byteRepresentation = rawData; return(result); } catch (Exception) { return(new DHCPV6UnparsablePacket(ipv6Header, rawData)); } }
public static DHCPv6RelayPacket AsOuterRelay( IPv6HeaderInformation header, Boolean isForward, Byte hopCount, IPv6Address linkAddress, IPv6Address peerAddress, IEnumerable <DHCPv6PacketOption> options, DHCPv6Packet innerPacket ) => new DHCPv6RelayPacket( isForward == true ? DHCPv6PacketTypes.RELAY_FORW : DHCPv6PacketTypes.RELAY_REPL, hopCount, linkAddress, peerAddress, options, innerPacket ) { Header = header };
public static DHCPv6Packet AsOuter(IPv6HeaderInformation header, UInt32 transactionId, DHCPv6PacketTypes packetType, IEnumerable <DHCPv6PacketOption> options) => new DHCPv6Packet(header, transactionId, packetType, options);
public DHCPV6UnparsablePacket(IPv6HeaderInformation ipv6Header, Byte[] data) : base(DHCPv6PacketTypes.Invalid, Array.Empty <DHCPv6PacketOption>()) { Content = data; Header = ipv6Header; }