OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
networkconfig.c File Reference
#include "ciptcpipinterface.h"
#include "networkconfig.h"
#include "cipcommon.h"
#include "ciperror.h"
#include "opener_api.h"
#include "trace.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <winsock2.h>
#include <windows.h>
#include <iphlpapi.h>
#include <Ws2tcpip.h>
Include dependency graph for networkconfig.c:

Go to the source code of this file.

Macros

#define MAX_TRIES   3
 
#define WIN32_LEAN_AND_MEAN
 
#define WORKING_BUFFER_SIZE   15000
 

Functions

void ConfigureDomainName (const CipUint interface_index)
 
void ConfigureHostName (const CipUint interface_index)
 
void ConfigureIpMacAddress (const CipUint interface_index)
 

Macro Definition Documentation

#define MAX_TRIES   3

Definition at line 23 of file networkconfig.c.

Referenced by ConfigureDomainName().

#define WIN32_LEAN_AND_MEAN

Definition at line 6 of file networkconfig.c.

#define WORKING_BUFFER_SIZE   15000

Definition at line 22 of file networkconfig.c.

Referenced by ConfigureDomainName().

Function Documentation

void ConfigureDomainName ( const CipUint  interface_index)

Definition at line 88 of file networkconfig.c.

References CipCalloc(), CipFree(), CipTcpIpNetworkInterfaceConfiguration::domain_name, interface_configuration_, CipString::length, MAX_TRIES, CipTcpIpNetworkInterfaceConfiguration::name_server, CipTcpIpNetworkInterfaceConfiguration::name_server_2, OPENER_TRACE_INFO, CipString::string, and WORKING_BUFFER_SIZE.

Here is the call graph for this function:

void ConfigureHostName ( const CipUint  interface_index)

Definition at line 216 of file networkconfig.c.

References CipCalloc(), CipFree(), hostname_, CipString::length, and CipString::string.

Here is the call graph for this function:

void ConfigureIpMacAddress ( const CipUint  interface_index)

Definition at line 29 of file networkconfig.c.

References CipCalloc(), CipFree(), g_ethernet_link, g_multicast_configuration, CipTcpIpNetworkInterfaceConfiguration::gateway, interface_configuration_, CipTcpIpNetworkInterfaceConfiguration::ip_address, CipTcpIpNetworkInterfaceConfiguration::network_mask, CipEthernetLinkObject::physical_address, and multicast_address_configuration::starting_multicast_address.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function: