EthernetIP not declared

Discussion to talk about software related topics only.
Post Reply
RebootExpert
Posts: 78
Joined: Fri Oct 09, 2020 2:57 pm

EthernetIP not declared

Post by RebootExpert »

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: 605
Joined: Mon May 12, 2008 10:55 am

Re: EthernetIP not declared

Post by SeeCwriter »

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()).
User avatar
TomNB
Posts: 538
Joined: Tue May 10, 2016 8:22 am

Re: EthernetIP not declared

Post by TomNB »

SeeCwriter is correct. The ShowInterfaces example is a good one to see how you can handle IP address information.
RebootExpert
Posts: 78
Joined: Fri Oct 09, 2020 2:57 pm

Re: EthernetIP not declared

Post by RebootExpert »

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
NicholasAttwood
Posts: 1
Joined: Fri May 13, 2022 4:46 am

Re: EthernetIP not declared

Post by NicholasAttwood »

This is a great idea. That's what I would do
Post Reply