Addr *string `json:"addr,omitempty"`
OnlineDeadline *uint `json:"onlinedeadline,omitempty"`
MaxOnlineTime *uint `json:"maxonlinetime,omitempty"`
+ WhenTxExists *bool `json:"when-tx-exists,omitempty"`
+ NoCK *bool `json:"nock"`
+ MCDIgnore *bool `json:"mcd-ignore"`
AutoToss *bool `json:"autotoss,omitempty"`
AutoTossDoSeen *bool `json:"autotoss-doseen,omitempty"`
Umask string `json:"umask,omitempty"`
OmitPrgrs bool `json:"noprogress,omitempty"`
+ NoHdr bool `json:"nohdr,omitempty"`
Notify *NotifyJSON `json:"notify,omitempty"`
Self *NodeOurJSON `json:"self"`
Neigh map[string]NodeJSON `json:"neigh"`
+
+ MCDRxIfis []string `json:"mcd-listen"`
+ MCDTxIfis map[string]int `json:"mcd-send"`
}
func NewNode(name string, cfg NodeJSON) (*Node, error) {
if callCfg.MaxOnlineTime != nil {
call.MaxOnlineTime = time.Duration(*callCfg.MaxOnlineTime) * time.Second
}
+ if callCfg.WhenTxExists != nil {
+ call.WhenTxExists = *callCfg.WhenTxExists
+ }
+ if callCfg.NoCK != nil {
+ call.NoCK = *callCfg.NoCK
+ }
+ if callCfg.MCDIgnore != nil {
+ call.MCDIgnore = *callCfg.MCDIgnore
+ }
if callCfg.AutoToss != nil {
call.AutoToss = *callCfg.AutoToss
}
if cfgJSON.OmitPrgrs {
showPrgrs = false
}
+ hdrUsage := true
+ if cfgJSON.NoHdr {
+ hdrUsage = false
+ }
ctx := Ctx{
Spool: spoolPath,
LogPath: logPath,
UmaskForce: umaskForce,
ShowPrgrs: showPrgrs,
+ HdrUsage: hdrUsage,
Self: self,
Neigh: make(map[NodeId]*Node, len(cfgJSON.Neigh)),
Alias: make(map[string]*NodeId),
+ MCDRxIfis: cfgJSON.MCDRxIfis,
+ MCDTxIfis: cfgJSON.MCDTxIfis,
}
if cfgJSON.Notify != nil {
if cfgJSON.Notify.File != nil {