Commit b1968dd5 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

snmp/ptp: fill grandmasterID

parent 9407bcc1
......@@ -589,7 +589,7 @@
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpPortName.<n>}{
The port on which the instance is running.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpGrandmasterID.<n>}{
Not implemented.}
ID of the PTP Grandmaster in the network.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpOwnID.<n>}{
Not implemented.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpMode.<n>}{}
......
......@@ -11,6 +11,8 @@ int hal_nports_local;
struct wrs_shm_head *ppsi_head;
static struct pp_globals *ppg;
struct pp_instance *ppsi_ppi;
parentDS_t *ppsi_parentDS;
int *ppsi_ppi_nlinks;
/* RTUd */
......@@ -128,6 +130,13 @@ static int init_shm_ppsi(void)
}
/* use pointer instead of copying */
ppsi_ppi_nlinks = &(ppg->nlinks);
ppsi_parentDS = wrs_shm_follow(ppsi_head, ppg->parentDS);
if (!ppsi_parentDS) {
snmp_log(LOG_ERR, "SNMP: " SL_ER
"Cannot follow ppsi_parentDS in shmem.\n");
return 5;
}
return 0;
}
......
......@@ -16,6 +16,7 @@ extern int hal_nports_local;
/* PPSI */
extern struct wrs_shm_head *ppsi_head;
extern struct pp_instance *ppsi_ppi;
extern parentDS_t *ppsi_parentDS;
extern int *ppsi_ppi_nlinks;
/* RTUd */
......
......@@ -132,7 +132,9 @@ time_t wrsPtpDataTable_data_fill(unsigned int *n_rows)
ppsi_i->servo);
/* wrsPtpGrandmasterID */
//TODO
memcpy(&ptp_a[si].wrsPtpGrandmasterID,
&ppsi_parentDS->grandmasterIdentity,
sizeof(ClockIdentity));
/* wrsPtpOwnID */
//TODO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment