diff --git a/userspace/snmpd/snmp_shmem.c b/userspace/snmpd/snmp_shmem.c index 98ff848c15205850433ac7dd19d56e5328c0b61a..4a6cf2ba3e512555c762601f7d14b301dc649f5a 100644 --- a/userspace/snmpd/snmp_shmem.c +++ b/userspace/snmpd/snmp_shmem.c @@ -1,5 +1,5 @@ #include "wrsSnmp.h" - +#include "snmp_shmem.h" struct wrs_shm_head *hal_head; struct hal_shmem_header *hal_shmem; diff --git a/userspace/snmpd/snmp_shmem.h b/userspace/snmpd/snmp_shmem.h index 2ee526751176da94f773cc100e96c200e4737ead..294f9a6481ff646591035ca8eca002ee12855e24 100644 --- a/userspace/snmpd/snmp_shmem.h +++ b/userspace/snmpd/snmp_shmem.h @@ -1,6 +1,21 @@ #ifndef WRS_SNMP_SHMEM_H #define WRS_SNMP_SHMEM_H +#include <libwr/shmem.h> +#include <libwr/hal_shmem.h> +#include <ppsi/ppsi.h> +#include <libwr/hal_shmem.h> + +/* HAL */ +extern struct wrs_shm_head *hal_head; +extern struct hal_shmem_header *hal_shmem; +extern struct hal_port_state *hal_ports; +extern int hal_nports_local; + +/* PPSI */ +extern struct wrs_shm_head *ppsi_head; +extern struct wr_servo_state_t *ppsi_servo; + void init_shm(); #endif /* WRS_SNMP_SHMEM_H */ diff --git a/userspace/snmpd/wrsPortStatusTable.c b/userspace/snmpd/wrsPortStatusTable.c index 4a55b5cf7743330a84ec3009c5bcb658f6c22b63..c635f679ff76888d71f5d3409042bda02f5d637a 100644 --- a/userspace/snmpd/wrsPortStatusTable.c +++ b/userspace/snmpd/wrsPortStatusTable.c @@ -1,4 +1,5 @@ #include "wrsSnmp.h" +#include "snmp_shmem.h" #include "wrsPortStatusTable.h" /* Our data: per-port information */ diff --git a/userspace/snmpd/wrsPtpDataTable.c b/userspace/snmpd/wrsPtpDataTable.c index 51add6f3eaf9d2b77f4d302f8cf50fcf3447bf9a..ca8129e4ed98aac3eef84f5709f05179850991aa 100644 --- a/userspace/snmpd/wrsPtpDataTable.c +++ b/userspace/snmpd/wrsPtpDataTable.c @@ -1,4 +1,5 @@ #include "wrsSnmp.h" +#include "snmp_shmem.h" #include "wrsPtpDataTable.h" struct wrsPtpDataTable_s wrsPtpDataTable_array[WRS_MAX_N_SERVO_INSTANCES]; diff --git a/userspace/snmpd/wrsSnmp.h b/userspace/snmpd/wrsSnmp.h index 8a71bd8b053fae36be036227c76e7d64cfb6f867..1467cb624254b0f6f4af4fa8e0e26491edd2dfe6 100644 --- a/userspace/snmpd/wrsSnmp.h +++ b/userspace/snmpd/wrsSnmp.h @@ -14,18 +14,6 @@ #undef INST #include <ppsi/ieee1588_types.h> /* for ClockIdentity */ -#include <libwr/shmem.h> -#include <libwr/hal_shmem.h> -#include <ppsi/ppsi.h> -#include <libwr/hal_shmem.h> - -extern struct wrs_shm_head *hal_head; -extern struct hal_shmem_header *hal_shmem; -extern struct hal_port_state *hal_ports; -extern int hal_nports_local; -extern struct wrs_shm_head *ppsi_head; -extern struct wr_servo_state_t *ppsi_servo; - /* * local hack: besides the file pointer, that is there anyways, * everything else is not actually built if WRS_WITH_SNMP_HACKISH_LOG diff --git a/userspace/snmpd/wrsTemperature.c b/userspace/snmpd/wrsTemperature.c index cd3647a83634e7a1f119d182f5f60affaf1866de..78dda1d361bbdf1a3bd2e93c0f838b14e9739035 100644 --- a/userspace/snmpd/wrsTemperature.c +++ b/userspace/snmpd/wrsTemperature.c @@ -1,4 +1,5 @@ #include "wrsSnmp.h" +#include "snmp_shmem.h" #include "wrsTemperature.h" static struct pickinfo wrsTemperature_pickinfo[] = {