@@ -71,6 +71,15 @@ var WindowsGcsHvHostID = guid.GUID{
7171 Data4 : [8 ]uint8 {0x93 , 0xfe , 0x42 , 0x96 , 0x9a , 0xe6 , 0xd8 , 0xd1 },
7272}
7373
74+ // WindowsLoggingHvsockServiceID is the hvsock service ID that the Windows log forward service
75+ // will connect to. 172dad59-976d-45f2-8b6c-6d1b13f2ac4d
76+ var WindowsLoggingHvsockServiceID = guid.GUID {
77+ Data1 : 0x172dad59 ,
78+ Data2 : 0x976d ,
79+ Data3 : 0x45f2 ,
80+ Data4 : [8 ]uint8 {0x8b , 0x6c , 0x6d , 0x1b , 0x13 , 0xf2 , 0xac , 0x4d },
81+ }
82+
7483type AnyInString struct {
7584 Value interface {}
7685}
@@ -83,10 +92,17 @@ func (a *AnyInString) UnmarshalText(b []byte) error {
8392 return json .Unmarshal (b , & a .Value )
8493}
8594
95+ const (
96+ // Message_Category for the GCS protocol.
97+ ComputeSystem = 0x00100000
98+ ComputeService = 0x00200000
99+ )
100+
86101type RPCProc uint32
87102
88103const (
89- RPCCreate RPCProc = (iota + 1 )<< 8 | 1
104+ // Compute System RPCs
105+ RPCCreate RPCProc = ComputeSystem | (iota + 1 )<< 8 | 1
90106 RPCStart
91107 RPCShutdownGraceful
92108 RPCShutdownForced
@@ -103,6 +119,17 @@ const (
103119 RPCLifecycleNotification
104120)
105121
122+ const (
123+ // Compute Service RPCs
124+ RPCModifyServiceSettings RPCProc = ComputeService | (iota + 1 )<< 8 | 1
125+ )
126+
127+ type ServiceModifyPropertyType string
128+
129+ const (
130+ LogForwardService = ServiceModifyPropertyType ("LogForwardService" )
131+ )
132+
106133func (rpc RPCProc ) String () string {
107134 switch rpc {
108135 case RPCCreate :
@@ -135,6 +162,8 @@ func (rpc RPCProc) String() string {
135162 return "UpdateContainer"
136163 case RPCLifecycleNotification :
137164 return "LifecycleNotification"
165+ case RPCModifyServiceSettings :
166+ return "ModifyServiceSettings"
138167 default :
139168 return "0x" + strconv .FormatUint (uint64 (rpc ), 16 )
140169 }
@@ -143,10 +172,10 @@ func (rpc RPCProc) String() string {
143172type MsgType uint32
144173
145174const (
146- MsgTypeRequest MsgType = 0x10100000
147- MsgTypeResponse MsgType = 0x20100000
148- MsgTypeNotify MsgType = 0x30100000
149- MsgTypeMask MsgType = 0xfff00000
175+ MsgTypeRequest MsgType = 0x10000000
176+ MsgTypeResponse MsgType = 0x20000000
177+ MsgTypeNotify MsgType = 0x30000000
178+ MsgTypeMask MsgType = 0xf0000000
150179
151180 NotifyContainer = 1 << 8 | 1
152181)
@@ -160,7 +189,7 @@ func (typ MsgType) String() string {
160189 s = "Response("
161190 case MsgTypeNotify :
162191 s = "Notify("
163- switch typ - MsgTypeNotify {
192+ switch typ - ( ComputeSystem | MsgTypeNotify ) {
164193 case NotifyContainer :
165194 s += "Container"
166195 default :
@@ -267,6 +296,12 @@ type ContainerNotification struct {
267296 ResultInfo AnyInString `json:",omitempty"`
268297}
269298
299+ type ServiceModificationRequest struct {
300+ RequestBase
301+ PropertyType string // ServiceModifyPropertyType
302+ Settings interface {} `json:",omitempty"`
303+ }
304+
270305type ContainerExecuteProcess struct {
271306 RequestBase
272307 Settings ExecuteProcessSettings
@@ -345,13 +380,14 @@ type ContainerModifySettings struct {
345380}
346381
347382type GcsCapabilities struct {
348- SendHostCreateMessage bool
349- SendHostStartMessage bool
350- HvSocketConfigOnStartup bool
351- SendLifecycleNotifications bool
352- SupportedSchemaVersions []hcsschema.Version
353- RuntimeOsType string
354- GuestDefinedCapabilities json.RawMessage
383+ SendHostCreateMessage bool
384+ SendHostStartMessage bool
385+ HvSocketConfigOnStartup bool
386+ SendLifecycleNotifications bool
387+ ModifyServiceSettingsSupported bool
388+ SupportedSchemaVersions []hcsschema.Version
389+ RuntimeOsType string
390+ GuestDefinedCapabilities json.RawMessage
355391}
356392
357393type ContainerCreateResponse struct {
0 commit comments