Skip to content

Commit 5e257e7

Browse files
olbjohefloryd
authored andcommitted
Rename "interface" struct
To avoid problems with Microsoft compilers
1 parent 4ab4e78 commit 5e257e7

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

src/common/pf_lldp.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,9 @@ void pf_lldp_get_chassis_id (pnet_t * net, pf_lldp_chassis_id_t * p_chassis_id)
598598
pf_cmina_get_device_macaddr (net);
599599
char station_name[PNET_STATION_NAME_MAX_SIZE]; /** Terminated */
600600

601-
if (net->interface.name_of_device_mode.mode == PF_LLDP_NAME_OF_DEVICE_MODE_LEGACY)
601+
if (
602+
net->pf_interface.name_of_device_mode.mode ==
603+
PF_LLDP_NAME_OF_DEVICE_MODE_LEGACY)
602604
{
603605
/*
604606
* FIXME: Use of pf_cmina_get_station_name() is not thread-safe.
@@ -662,7 +664,9 @@ void pf_lldp_get_port_id (
662664
const pnet_ethaddr_t * device_mac_address =
663665
pf_cmina_get_device_macaddr (net);
664666

665-
if (net->interface.name_of_device_mode.mode == PF_LLDP_NAME_OF_DEVICE_MODE_LEGACY)
667+
if (
668+
net->pf_interface.name_of_device_mode.mode ==
669+
PF_LLDP_NAME_OF_DEVICE_MODE_LEGACY)
666670
{
667671
snprintf (
668672
p_port_id->string,

src/device/pf_pdport.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,10 @@ int pf_pdport_read_ind (
559559
(slot == PNET_SLOT_DAP_IDENT) &&
560560
(subslot == PNET_SUBSLOT_DAP_INTERFACE_1_IDENT))
561561
{
562-
if (net->interface.name_of_device_mode.active == true)
562+
if (net->pf_interface.name_of_device_mode.active == true)
563563
{
564564
pf_put_pd_interface_adj (
565-
net->interface.name_of_device_mode.mode,
565+
net->pf_interface.name_of_device_mode.mode,
566566
PNET_SUBSLOT_DAP_INTERFACE_1_IDENT,
567567
true,
568568
p_read_res,
@@ -1014,14 +1014,14 @@ static int pf_pdport_write_interface_adj (
10141014
pf_get_interface_adjust (
10151015
&get_info,
10161016
&pos,
1017-
&net->interface.name_of_device_mode.mode);
1018-
net->interface.name_of_device_mode.active = true;
1017+
&net->pf_interface.name_of_device_mode.mode);
1018+
net->pf_interface.name_of_device_mode.active = true;
10191019

10201020
LOG_INFO (
10211021
PNET_LOG,
10221022
"PDPORT(%d): PD interface adjust. PLC is setting LLDP mode: %s\n",
10231023
__LINE__,
1024-
net->interface.name_of_device_mode.mode ==
1024+
net->pf_interface.name_of_device_mode.mode ==
10251025
PF_LLDP_NAME_OF_DEVICE_MODE_STANDARD
10261026
? "Standard"
10271027
: "Legacy");

src/device/pf_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int pf_port_get_next (pf_port_iterator_t * p_iterator)
8989
pf_port_t * pf_port_get_state (pnet_t * net, int loc_port_num)
9090
{
9191
CC_ASSERT (loc_port_num > 0 && loc_port_num <= PNET_MAX_PORT);
92-
return &net->interface.port[loc_port_num - 1];
92+
return &net->pf_interface.port[loc_port_num - 1];
9393
}
9494

9595
const pnet_port_cfg_t * pf_port_get_config (pnet_t * net, int loc_port_num)
@@ -132,7 +132,7 @@ int pf_port_get_port_number (pnet_t * net, pnal_eth_handle_t * eth_handle)
132132

133133
for (loc_port_num = 1; loc_port_num <= PNET_MAX_PORT; loc_port_num++)
134134
{
135-
if (net->interface.port[loc_port_num - 1].eth_handle == eth_handle)
135+
if (net->pf_interface.port[loc_port_num - 1].eth_handle == eth_handle)
136136
{
137137
return loc_port_num;
138138
}

src/device/pnet_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ int pnet_init_only (pnet_t * net, const pnet_cfg_t * p_cfg)
5454
pf_dcp_exit (net); /* Prepare for re-init. */
5555
pf_dcp_init (net); /* Start DCP */
5656
pf_port_init (net);
57-
net->interface.name_of_device_mode.mode =
57+
net->pf_interface.name_of_device_mode.mode =
5858
PF_LLDP_NAME_OF_DEVICE_MODE_STANDARD;
59-
net->interface.name_of_device_mode.active = false;
59+
net->pf_interface.name_of_device_mode.active = false;
6060
pf_lldp_init (net);
6161
pf_pdport_init (net);
6262

src/pf_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ struct pnet
28172817
pf_lldp_name_of_device_mode_t mode;
28182818
} name_of_device_mode;
28192819
pf_port_t port[PNET_MAX_PORT];
2820-
} interface;
2820+
} pf_interface;
28212821
};
28222822

28232823
/**

0 commit comments

Comments
 (0)