mirror of
https://github.com/danderson/netboot.git
synced 2025-08-19 21:51:20 +02:00
Make the debug string function public, so that the pxe package can use it.
This commit is contained in:
parent
d6ac0332dd
commit
e8fa791c89
@ -69,7 +69,8 @@ type Packet struct {
|
||||
Options Options
|
||||
}
|
||||
|
||||
func (p *Packet) testString() string {
|
||||
// DebugString prints the contents of a DHCP packet for human consumption.
|
||||
func (p *Packet) DebugString() string {
|
||||
var b bytes.Buffer
|
||||
bcast := "Unicast"
|
||||
if p.Broadcast {
|
||||
|
@ -54,7 +54,7 @@ func TestParse(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Parsing DHCP packet #%d: %s", i+1, err)
|
||||
}
|
||||
pkts.WriteString(pkt.testString())
|
||||
pkts.WriteString(pkt.DebugString())
|
||||
pkts.WriteString("======\n")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user