port: track interface info in port
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>master
parent
9e744d9e8a
commit
7e294a4d04
2
port.c
2
port.c
|
@ -68,6 +68,7 @@ struct nrate_estimator {
|
||||||
struct port {
|
struct port {
|
||||||
LIST_ENTRY(port) list;
|
LIST_ENTRY(port) list;
|
||||||
char *name;
|
char *name;
|
||||||
|
struct interface *iface;
|
||||||
struct clock *clock;
|
struct clock *clock;
|
||||||
struct transport *trp;
|
struct transport *trp;
|
||||||
enum timestamp_type timestamping;
|
enum timestamp_type timestamping;
|
||||||
|
@ -2619,6 +2620,7 @@ struct port *port_open(int phc_index,
|
||||||
}
|
}
|
||||||
|
|
||||||
p->name = interface->name;
|
p->name = interface->name;
|
||||||
|
p->iface = interface;
|
||||||
p->asymmetry = config_get_int(cfg, p->name, "delayAsymmetry");
|
p->asymmetry = config_get_int(cfg, p->name, "delayAsymmetry");
|
||||||
p->asymmetry <<= 16;
|
p->asymmetry <<= 16;
|
||||||
p->announce_span = transport == TRANS_UDS ? 0 : ANNOUNCE_SPAN;
|
p->announce_span = transport == TRANS_UDS ? 0 : ANNOUNCE_SPAN;
|
||||||
|
|
Loading…
Reference in New Issue