Hello alfonso,
I tried the code that you gave. but I got some error. please help. the
codes that i used is as follows:
IInterfaceTable *inet_ift;
inet_ift = InterfaceTableAccess().get();
for (int32 i=0; i<inet_ift->getNumInterfaces(); ++i)
{
if (inet_ift->getInterface(i)->ipv4Data()!=NULL)
{
ev << "interface: "<<inet_ift->getInterface(i)->ipv4Data()-
>getIPAddress()<< endl;
}
}
but i got this error:
Description
Resource Path
Location Type
forward declaration of 'struct IPv4InterfaceData' InterfaceEntry.h /
inetmanet/src/networklayer/common line 34 C/C++ Problem
invalid use of incomplete type 'struct IPv4InterfaceData' SCTP.cc /
inetmanet/src/transport/sctp line 897 C/C++ Problem
make: *** [all] Error
2
inetmanet line 0 C/C++ Problem
make[1]: *** [../out/gcc-debug/src/transport/sctp/SCTP.o] Error 1
inetmanet line 0 C/C++ Problem
On Jul 11, 6:51 am, Alfonso Ariza Quintana <
aariza...@hotmail.com>
wrote:
> you should consult the methods of the interface tablehttp://
inet.omnetpp.org/doc/INET/doxy/class_interface_table.htmlhttp://inet.omnetpp.org/doc/INET/doxy/class_interface_entry.html
>
> if you execute in the shell the command
> grep -r InterfaceTableAccess *
>
> in the src directory, you can find the files where the InterfaceTable is used and you can see how to use the table
>
>
>
>
>
>
>
> > Date: Fri, 8 Jul 2011 11:52:48 -0700
> > Subject: [Omnetpp-l] Re: How to access the interface table and find the node ip address
> > From:
sandrasmith1...@gmail.com