Commit 709fc237 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

snmp/ptp: fill OwnID OID

parent b1968dd5
......@@ -589,9 +589,9 @@
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpPortName.<n>}{
The port on which the instance is running.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpGrandmasterID.<n>}{
ID of the PTP Grandmaster in the network.}
Identity of the PTP Grandmaster in the network.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpOwnID.<n>}{
Not implemented.}
PTP clock identity.}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpMode.<n>}{}
\snmpentrye{WR-SWITCH-MIB}{wrsPtpDataTable}{wrsPtpServoState.<n>}{PTP servo
state as string}
......
......@@ -12,6 +12,7 @@ struct wrs_shm_head *ppsi_head;
static struct pp_globals *ppg;
struct pp_instance *ppsi_ppi;
parentDS_t *ppsi_parentDS;
defaultDS_t *ppsi_defaultDS;
int *ppsi_ppi_nlinks;
......@@ -137,6 +138,13 @@ static int init_shm_ppsi(void)
"Cannot follow ppsi_parentDS in shmem.\n");
return 5;
}
ppsi_defaultDS = wrs_shm_follow(ppsi_head, ppg->defaultDS);
if (!ppsi_defaultDS) {
snmp_log(LOG_ERR, "SNMP: " SL_ER
"Cannot follow ppsi_defaultDS in shmem.\n");
return 5;
}
return 0;
}
......
......@@ -16,8 +16,9 @@ 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;
extern parentDS_t *ppsi_parentDS;
extern defaultDS_t *ppsi_defaultDS;
/* RTUd */
struct wrs_shm_head *rtud_head;
......
......@@ -137,7 +137,9 @@ time_t wrsPtpDataTable_data_fill(unsigned int *n_rows)
sizeof(ClockIdentity));
/* wrsPtpOwnID */
//TODO
memcpy(&ptp_a[si].wrsPtpOwnID,
&ppsi_defaultDS->clockIdentity,
sizeof(ClockIdentity));
/* wrsPtpMode */
//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