port: Introduce an option to disable mutlicast service.
Some profiles forbid multicast altogther. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
b9b18268cd
commit
b1ce06206f
1
config.c
1
config.c
|
@ -218,6 +218,7 @@ struct config_item config_tab[] = {
|
|||
PORT_ITEM_INT("hybrid_e2e", 0, 0, 1),
|
||||
PORT_ITEM_INT("ignore_transport_specific", 0, 0, 1),
|
||||
PORT_ITEM_INT("ingressLatency", 0, INT_MIN, INT_MAX),
|
||||
PORT_ITEM_INT("inhibit_multicast_service", 0, 0, 1),
|
||||
GLOB_ITEM_INT("initial_delay", 0, 0, INT_MAX),
|
||||
GLOB_ITEM_INT("kernel_leap", 1, 0, 1),
|
||||
PORT_ITEM_INT("logAnnounceInterval", 1, INT8_MIN, INT8_MAX),
|
||||
|
|
|
@ -39,6 +39,7 @@ logging_level 6
|
|||
path_trace_enabled 0
|
||||
follow_up_info 0
|
||||
hybrid_e2e 0
|
||||
inhibit_multicast_service 0
|
||||
net_sync_monitor 0
|
||||
tc_spanning_tree 0
|
||||
tx_timestamp_timeout 1
|
||||
|
|
6
port.c
6
port.c
|
@ -1329,6 +1329,9 @@ int port_tx_announce(struct port *p, struct address *dst)
|
|||
struct ptp_message *msg;
|
||||
int err;
|
||||
|
||||
if (p->inhibit_multicast_service && !dst) {
|
||||
return 0;
|
||||
}
|
||||
if (!port_capable(p)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -1395,6 +1398,9 @@ int port_tx_sync(struct port *p, struct address *dst)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (p->inhibit_multicast_service && !dst) {
|
||||
return 0;
|
||||
}
|
||||
if (!port_capable(p)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,7 @@ struct port {
|
|||
struct unicast_master_table *unicast_master_table;
|
||||
/* unicast service mode */
|
||||
struct unicast_service *unicast_service;
|
||||
int inhibit_multicast_service;
|
||||
};
|
||||
|
||||
#define portnum(p) (p->portIdentity.portNumber)
|
||||
|
|
|
@ -417,6 +417,8 @@ int unicast_service_initialize(struct port *p)
|
|||
free(p->unicast_service);
|
||||
return -1;
|
||||
}
|
||||
p->inhibit_multicast_service =
|
||||
config_get_int(cfg, p->name, "inhibit_multicast_service");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue