Discussion to talk about software related topics only.
RebootExpert
Posts: 89 Joined: Fri Oct 09, 2020 2:57 pm
Post
by RebootExpert » Wed Mar 09, 2022 3:35 pm
I installed v3.3.7, and create an empty project. When I try to build the project, there are errors show that EthernetIP was not declared in tcp.cpp
Code: Select all
#include <predef.h>
#include <stdio.h>
#include <nbrtos.h>
#include <http.h>
#include <init.h>
#include <netinterface.h>
const char * AppName="project1";
void EnableOSStackProtector();
void UserMain(void * pd)
{
EnableOSStackProtector(); // TODO: Uncomment #define NBRTOS_STACKOVERFLOW and/or NBRTOS_UNDEROVERFLOWin predef.h, rebuild libraries
init();
GetInterfaceBlock()->discovery_server = "discover.netburner.com";
WaitForActiveNetwork(TICKS_PER_SECOND * 5); // Wait up to 5 seconds for active network activity
StartHttp();
iprintf("Application %s started\n",AppName );
while (1)
{
OSTimeDly(TICKS_PER_SECOND);
}
}
SeeCwriter
Posts: 630 Joined: Mon May 12, 2008 10:55 am
Post
by SeeCwriter » Thu Mar 10, 2022 10:47 am
I don't think EthernetIP is used in the v3.x tools. Looking through my 3.3.7 app, I replaced EthernetIP with either ifBlock->ip4.cur_addr or InterfaceIP(GetFirstInterface()).
TomNB
Posts: 586 Joined: Tue May 10, 2016 8:22 am
Post
by TomNB » Thu Mar 10, 2022 11:46 am
SeeCwriter is correct. The ShowInterfaces example is a good one to see how you can handle IP address information.
RebootExpert
Posts: 89 Joined: Fri Oct 09, 2020 2:57 pm
Post
by RebootExpert » Thu Mar 10, 2022 4:23 pm
since the EtherneIP are wrap inside of a SNMP macro, I reinstall the v3.3.7 without snmp feature to fix the problem. I suggest future release replace the EthernetIP if not used