-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathDhcpBootfileNameOption.cs
More file actions
45 lines (42 loc) · 1.35 KB
/
DhcpBootfileNameOption.cs
File metadata and controls
45 lines (42 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PcapDotNet.Packets.Dhcp.Options
{
/// <summary>
/// RFC 2132.
/// This option is used to identify a bootfile when the 'file' field in
/// the DHCP header has been used for DHCP options.
/// <pre>
/// Code Len Bootfile name
/// +-----+-----+-----+-----+-----+---
/// | 67 | n | c1 | c2 | c3 | ...
/// +-----+-----+-----+-----+-----+---
/// </pre>
/// </summary>
public class DhcpBootfileNameOption : DhcpStringOption
{
/// <summary>
/// create new DhcpBootfileNameOption.
/// </summary>
/// <param name="bootfileName">Bootfilename</param>
public DhcpBootfileNameOption(string bootfileName) : base(bootfileName, DhcpOptionCode.BootfileName)
{
}
[DhcpOptionReadRegistration(DhcpOptionCode.BootfileName)]
internal static DhcpBootfileNameOption Read(DataSegment data, ref int offset)
{
return DhcpStringOption.Read(data, ref offset, p => new DhcpBootfileNameOption(p));
}
/// <summary>
/// Bootfilename.
/// </summary>
public string BootfileName
{
get { return InternalValue; }
set { InternalValue = value; }
}
}
}