Skip to content

Commit

Permalink
sys/linux: add NDISC packet formats to vnet.txt
Browse files Browse the repository at this point in the history
Add the basic NDISC (RFC 4861) packet formats to sys/linux/vnet.txt.
  • Loading branch information
dlrobertson authored and dvyukov committed Feb 11, 2019
1 parent d3fd6fd commit 13f1d00
Show file tree
Hide file tree
Showing 18 changed files with 512 additions and 25 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ Shankara Pailoor
Michael Tuexen
Kamil Rytarowski
Siddharth Muralee
Dan Robertson
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Michael Tuexen
Hou Jingyi
Kamil Rytarowski
Siddharth Muralee
Dan Robertson
10 changes: 5 additions & 5 deletions executor/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "0b986c85b5edbab89b58e44657e1e9a73e2db747"
#define SYZ_REVISION "17a528ee17b82eee8d1c0419a4e519d5d90f7ed6"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -70,7 +70,7 @@

#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "0391b21ce7b59de5fdf2d83c1efe587f2c5458b7"
#define SYZ_REVISION "130eaec19469ea8d7e5c0682bd36d66dcf13551b"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -80,7 +80,7 @@

#if GOARCH_arm
#define GOARCH "arm"
#define SYZ_REVISION "5551f204a00e09d3f78b5386baecb906605e24b7"
#define SYZ_REVISION "30a2187ee89e5db682d86e1df0c01fd38e3b9453"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -90,7 +90,7 @@

#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "07762f923b682a64b4f4773195a4fb9789fc4f99"
#define SYZ_REVISION "4ba8a2783772cbbb053bcf652b39423f03bcf894"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand All @@ -100,7 +100,7 @@

#if GOARCH_ppc64le
#define GOARCH "ppc64le"
#define SYZ_REVISION "3bda989d8136fcb59fa73f0a90f6964dfbaa4297"
#define SYZ_REVISION "e45fc7d3bf1ec9a4c658fbcfd6d75365cd676f32"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
Expand Down
4 changes: 2 additions & 2 deletions pkg/build/akaros.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ bash
return fmt.Errorf("failed to write image file: %v", err)
}
for src, dst := range map[string]string{
".config": "kernel.config",
"key": "key",
".config": "kernel.config",
"key": "key",
"obj/kern/akaros-kernel": "kernel",
"obj/kern/akaros-kernel-64b": "obj/akaros-kernel-64b",
} {
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/fuchsia.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (fu fuchsia) build(targetArch, vmType, kernelDir, outputDir, compiler, user
}
for src, dst := range map[string]string{
"out/" + arch + "/obj/build/images/fvm.blk": "image",
".ssh/pkey": "key",
".ssh/pkey": "key",
"out/build-zircon/build-" + arch + "/zircon.elf": "obj/zircon.elf",
"out/build-zircon/build-" + arch + "/multiboot.bin": "kernel",
"out/" + arch + "/fuchsia.zbi": "initrd",
Expand Down
14 changes: 7 additions & 7 deletions pkg/vcs/vcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ func TestCheckRepoAddress(t *testing.T) {
"https://anonscm.debian.org/git/kernel/linux.git": true,
"git://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git": true,
"http://host.xz:123/path/to/repo.git/": true,
"": false,
"foobar": false,
"linux-next": false,
"foo://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git": false,
"git://kernel/ubuntu.git": false,
"git://kernel.com/ubuntu": false,
"gitgit://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git": false,
"": false,
"foobar": false,
"linux-next": false,
"foo://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git": false,
"git://kernel/ubuntu.git": false,
"git://kernel.com/ubuntu": false,
"gitgit://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git": false,
})
}

Expand Down
10 changes: 5 additions & 5 deletions prog/prog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ func TestEscapingPaths(t *testing.T) {
"file/../../file": true,
"../file": true,
"./file/../../file/file": true,
"": false,
".": false,
"file": false,
"./file": false,
"./file/..": false,
"": false,
".": false,
"file": false,
"./file": false,
"./file/..": false,
}
for path, want := range paths {
got := escapingFilename(path)
Expand Down
70 changes: 69 additions & 1 deletion sys/linux/gen/386.go
Original file line number Diff line number Diff line change
Expand Up @@ -6166,6 +6166,54 @@ var structDescs_386 = []*KeyedStruct{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "unused", TypeSize: 2}}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_neigh_advert_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_neigh_advert_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 136},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
&CsumType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "csum", FldName: "csum", TypeSize: 2}, ArgFormat: 1}, Kind: 1, Buf: "parent", Protocol: 58},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "neighbor_flags", TypeSize: 1}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "unused", TypeSize: 3}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 3, RangeEnd: 3},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "target_addr"},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "options", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "icmpv6_ndisc_option"}}},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_neigh_solicit_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_neigh_solicit_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 135},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
&CsumType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "csum", FldName: "csum", TypeSize: 2}, ArgFormat: 1}, Kind: 1, Buf: "parent", Protocol: 58},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "target_addr"},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "options", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "icmpv6_ndisc_option"}}},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_option", IsVarlen: true}, Fields: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_option_types", FldName: "option_type", TypeSize: 1}}, Vals: []uint64{1, 2, 3, 4, 5, 14, 24, 25, 31, 34}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize8", FldName: "length", TypeSize: 1}}, BitSize: 64, Buf: "parent"},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_redir_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_redir_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 137},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
&CsumType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "csum", FldName: "csum", TypeSize: 2}, ArgFormat: 1}, Kind: 1, Buf: "parent", Protocol: 58},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "unused", TypeSize: 4}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 4, RangeEnd: 4},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "target_addr"},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "dst_addr"},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "options", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "icmpv6_ndisc_option"}}},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_router_advert_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_router_advert_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 134},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
&CsumType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "csum", FldName: "csum", TypeSize: 2}, ArgFormat: 1}, Kind: 1, Buf: "parent", Protocol: 58},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "cur_hop_limit", TypeSize: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "router_flags", TypeSize: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "router_lifetime", TypeSize: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "reachable_time", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "retrans_time", TypeSize: 4}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "options", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "icmpv6_ndisc_option"}}},
}}},
{Key: StructKey{Name: "icmpv6_ndisc_router_solicit_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ndisc_router_solicit_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 133},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
&CsumType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "csum", FldName: "csum", TypeSize: 2}, ArgFormat: 1}, Kind: 1, Buf: "parent", Protocol: 58},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "unused", TypeSize: 4}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 4, RangeEnd: 4},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "options", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "icmpv6_ndisc_option"}}},
}}},
{Key: StructKey{Name: "icmpv6_ni_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_ni_packet", IsVarlen: true}, Fields: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "icmpv6_ni_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{139, 140}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}},
Expand All @@ -6184,6 +6232,11 @@ var structDescs_386 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "icmpv6_echo_reply_packet"}, FldName: "echo_reply"},
&StructType{Key: StructKey{Name: "icmpv6_mld_packet"}, FldName: "mld"},
&StructType{Key: StructKey{Name: "icmpv6_ni_packet"}, FldName: "ni"},
&StructType{Key: StructKey{Name: "icmpv6_ndisc_router_solicit_packet"}, FldName: "ndisc_rs"},
&StructType{Key: StructKey{Name: "icmpv6_ndisc_router_advert_packet"}, FldName: "ndisc_ra"},
&StructType{Key: StructKey{Name: "icmpv6_ndisc_neigh_advert_packet"}, FldName: "ndisc_na"},
&StructType{Key: StructKey{Name: "icmpv6_ndisc_neigh_solicit_packet"}, FldName: "ndisc_ns"},
&StructType{Key: StructKey{Name: "icmpv6_ndisc_redir_packet"}, FldName: "ndisc_redir"},
}}},
{Key: StructKey{Name: "icmpv6_param_prob_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "icmpv6_param_prob_packet", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 4},
Expand Down Expand Up @@ -43323,6 +43376,11 @@ var consts_386 = []ConstValue{
{Name: "NDA_SRC_VNI", Value: 11},
{Name: "NDA_VLAN", Value: 5},
{Name: "NDA_VNI", Value: 7},
{Name: "NDISC_NEIGHBOUR_ADVERTISEMENT", Value: 136},
{Name: "NDISC_NEIGHBOUR_SOLICITATION", Value: 135},
{Name: "NDISC_REDIRECT", Value: 137},
{Name: "NDISC_ROUTER_ADVERTISEMENT", Value: 134},
{Name: "NDISC_ROUTER_SOLICITATION", Value: 133},
{Name: "NDTA_GC_INTERVAL", Value: 8},
{Name: "NDTA_NAME", Value: 1},
{Name: "NDTA_PARMS", Value: 6},
Expand All @@ -43343,6 +43401,16 @@ var consts_386 = []ConstValue{
{Name: "NDTPA_QUEUE_LEN", Value: 8},
{Name: "NDTPA_RETRANS_TIME", Value: 5},
{Name: "NDTPA_UCAST_PROBES", Value: 10},
{Name: "ND_OPT_6CO", Value: 34},
{Name: "ND_OPT_DNSSL", Value: 31},
{Name: "ND_OPT_MTU", Value: 5},
{Name: "ND_OPT_NONCE", Value: 14},
{Name: "ND_OPT_PREFIX_INFO", Value: 3},
{Name: "ND_OPT_RDNSS", Value: 25},
{Name: "ND_OPT_REDIRECT_HDR", Value: 4},
{Name: "ND_OPT_ROUTE_INFO", Value: 24},
{Name: "ND_OPT_SOURCE_LL_ADDR", Value: 1},
{Name: "ND_OPT_TARGET_LL_ADDR", Value: 2},
{Name: "NETCONFA_FORWARDING", Value: 2},
{Name: "NETCONFA_IFINDEX", Value: 1},
{Name: "NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN", Value: 6},
Expand Down Expand Up @@ -47505,4 +47573,4 @@ var consts_386 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_386 = "0b986c85b5edbab89b58e44657e1e9a73e2db747"
const revision_386 = "17a528ee17b82eee8d1c0419a4e519d5d90f7ed6"
Loading

0 comments on commit 13f1d00

Please sign in to comment.