/
ipv4.go
71 lines (62 loc) · 1.6 KB
/
ipv4.go
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* IPv4.go: this extension adds standard IPv4 and Ethernet properties to the Node state
*
* Author: J. Lowell Wofford <lowell@lanl.gov>
*
* This software is open source software available under the BSD-3 license.
* Copyright (c) 2018, Triad National Security, LLC
* See LICENSE file for details.
*/
//go:generate protoc -I ../../core/proto/src -I . --gogo_out=plugin=grpc:. ipv4.proto
package ipv4
import (
"github.com/kraken-hpc/kraken/core"
"github.com/kraken-hpc/kraken/lib/types"
)
const Name = "type.googleapis.com/IPv4.IPv4OverEthernet"
/////////////////////////////
// IPv4OverEthernet Object /
///////////////////////////
var _ types.Extension = (*IPv4OverEthernet)(nil)
func (i *IPv4OverEthernet) New() types.Message {
return &IPv4OverEthernet{
/*
Ifaces: []*pb.IPv4OverEthernet_ConfiguredInterface{
&pb.IPv4OverEthernet_ConfiguredInterface{
Eth: &pb.Ethernet{},
Ip: &pb.IPv4{},
},
&pb.IPv4OverEthernet_ConfiguredInterface{
Eth: &pb.Ethernet{},
Ip: &pb.IPv4{},
},
&pb.IPv4OverEthernet_ConfiguredInterface{
Eth: &pb.Ethernet{},
Ip: &pb.IPv4{},
},
&pb.IPv4OverEthernet_ConfiguredInterface{
Eth: &pb.Ethernet{},
Ip: &pb.IPv4{},
},
},
Routes: []*pb.IPv4{
&pb.IPv4{},
&pb.IPv4{},
&pb.IPv4{},
&pb.IPv4{},
},
DnsNameservers: []*pb.IPv4{
&pb.IPv4{},
&pb.IPv4{},
&pb.IPv4{},
&pb.IPv4{},
},
Hostname: &pb.DNSA{Ip: &pb.IPv4{}},
*/
}
}
func (*IPv4OverEthernet) Name() string {
return Name
}
func init() {
core.Registry.RegisterExtension(&IPv4OverEthernet{})
}