49#include <discoveryservlet.h>
60#define ARP_PPP_INTERFACE (255)
100#define NB_MAC_NIC_INTERFACE (0x00)
101#define NB_MAC_NIC_SECOND_INTERFACE (0x80)
102#define NB_MAC_NIC_THIRD_INTERFACE (0x40)
103#define NB_MAC_NIC_FOURTH_INTERFACE (0xC0)
104#define NB_MAC_NIC_SECOND_INTERFACE_MASK \
105 (NB_MAC_NIC_INTERFACE | NB_MAC_NIC_SECOND_INTERFACE | NB_MAC_NIC_THIRD_INTERFACE | NB_MAC_NIC_FOURTH_INTERFACE)
106#define NB_MAC_OCTET_4 (3)
107#define NB_MAC_OCTET_5 (4)
108#define NB_MAC_OCTET_5_XOR (0x80)
140typedef void(ProcessPacketFunc)(PoolPtr poolPtr, PEFRAME ethernetFramePtr, uint16_t checksum);
160typedef void(ProcessArpFunc)(PoolPtr poolPtr, PEFRAME ethernetFramePtr);
180typedef void (*ProcessLLDPptr)(PoolPtr poolPtr);
182extern ProcessLLDPptr pProcessLLDP;
200typedef BOOL(LinkActiveFunc)(void);
211#define INTF_CSUM_IP (0x01)
212#define INTF_CSUM_ICMP (0x02)
213#define INTF_CSUM_UDP (0x04)
214#define INTF_CSUM_TCP (0x08)
215#define INTF_CSUM_IP6 (0x10)
216#define INTF_CSUM_ICMP6 (0x20)
217#define INTF_CSUM_UDP6 (0x40)
218#define INTF_CSUM_TCP6 (0x80)
220#define INTF_CSUM_ALL4 (INTF_CSUM_IP | INTF_CSUM_ICMP | INTF_CSUM_UDP | INTF_CSUM_TCP)
221#define INTF_CSUM_ALL6 (INTF_CSUM_IP6 | INTF_CSUM_ICMP6 | INTF_CSUM_UDP6 | INTF_CSUM_TCP6)
253 config_int dhcp_discover_secs{1,
"DhcpDiscoverSec"};
254 config_string discovery_server{
"discover.netburner.com/DevicePost",
"DiscoveryReportUrl"};
255 config_int discovery_interval{(15 * 60),
"DiscoveryReportInterval"};
256 config_bool obfuscate_discovery{
true,
"DiscoveryObfuscate",
"Should discovery obfuscate data"};
257 config_bool supress_default_responses{
false,
"SupressDefault",
"Supress ping and udp Echo ports"};
265 uint8_t checksumOffload;
268 discover_servlet disco_servlet{
this};
276 AutoIPClient AutoClient;
310 virtual void send_func(PoolPtr poolPtr) = 0;
311 virtual void kill_if();
388 bool ProcessIPConfigChange(uint16_t ticks_to_wait);
391 void SwapOldAndCurrentAddr();
393 virtual bool bNeedsArp() {
return true; };
394 void fdShowInterfaceValues(
int fd);
395 inline void ShowInterfaceValues() { fdShowInterfaceValues(1); };
396 void SetDefaultFlags();
412 EtherLikeInterface(
const char *name,
const char *desc = NULL) :
InterfaceBlock(name, desc)
422 EtherLikeInterface(
config_obj &owner,
const char *name,
const char *desc = NULL) :
InterfaceBlock(owner, name, desc)
432 virtual void Enable()
445int NetDoRX(PoolPtr pp, uint16_t count,
int if_num);
457extern ProcessArpFunc *pArpFunc;
474typedef void(ProcessIp6Func)(PoolPtr poolPtr);
476extern ProcessIp6Func *pIp6Func;
483extern ProcessPacketFunc *pPacketfunc;
511void TransmitBuffer(PoolPtr poolPtr,
int interface);
530inline PEFRAME GetEframe(PoolPtr pp)
532 return (PEFRAME)pp->pData;
535inline PVLEFRAME GetVLEframe(PoolPtr pp)
537 return (PVLEFRAME)pp->pData;
671BOOL InitializeNetwork(ProcessPacketFunc *processPacketFuncPtr, ProcessArpFunc *processArpFuncPtr);
689void StopNetworks(
void);
764void UnWrapVlan(PoolPtr pp,
int len);
DHCP client class.
Definition dhcpclient.h:71
Definition config_netobj.h:274
Definition config_netobj.h:352
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
Network interface configuration block class for interface control and configuration.
Definition netinterface.h:245
virtual const char * GetInterfaceName()
Returns the interface name network interface.
virtual bool LinkDuplex()=0
Returns the full or half link duplex of the network interface.
virtual void EnableMulticast(MACADR macAddress, BOOL addAddress)=0
Enable Multicast on this interface.
virtual bool LinkActive()=0
Returns the link status of the network interface.
void RegisterInterface()
Register a network interface with system.
int GetInterfaceNumber()
Returns the Interface Number of the network interface.
Definition netinterface.h:375
InterfaceBlock(const char *name, const char *desc=NULL)
Constructor with interface name and description.
bool IsRootInterface()
Returns true if this is the first interface in the interface list.
Definition netinterface.h:382
InterfaceBlock(config_obj &owner, const char *name, const char *desc=NULL)
Constructor with config_obj owner, interface name and description.
virtual int LinkSpeed()=0
Returns the link speed of the network interface.
void InterfaceLinkChange(bool link)
Change the link status of the network interface.
Used to store and manipulate MAC addresses.
Definition nettypes.h:69
Configuration Variable for MACADR object type.
Definition config_obj.h:1750
Boolean Configuration Variable.
Definition config_obj.h:932
Signed 32-bit Integer Configuration Variable.
Definition config_obj.h:649
Base class used to create configuration objects.
Definition config_obj.h:277
String Configuration Variable.
Definition config_obj.h:1055
NetBurner Network Config Header File.
Configuration object header file.
NetBurner IPv4 DHCP Client Header File.
const uint32_t fConfigHidden
Not visible to configuration web server display.
Definition config_obj.h:74
const uint32_t fConfigReadOnly
Variable is read-only.
Definition config_obj.h:72
int Removeinterface(int interface)
Remove a network interface from the system.
bool InterfaceLinkDuplex(int interface)
Returns the full or half link duplex of the specified network interface.
int32_t GetInterfaceForMyAddress4(IPADDR4 ip)
Returns the Interface Number of the specified network interface IPv4 address.
const char * InterfaceName(int interface)
Returns the interface name of the specified network interface.
int InterfaceLinkSpeed(int interface)
Returns the 10/100 link speed of the specified network interface.
int32_t GetFirstInterface(void)
Returns the Interface Number of the first registered network interface.
int32_t GetNextInterface(int lastInterface)
Returns the Interface Number of the next registered network interface.
int32_t GetInterfaceNumber(InterfaceBlock *pifb)
Returns the Interface Number of the specified network interface InterfaceBlock.
MACADR InterfaceMAC(int interface)
Returns the MAC address of the specified network interface.
void EnableMulticast(MACADR macAddress, int interface=0)
Enable Multicast on an existing interface.
bool GetInterfaceLink(int ifn)
Returns the network interface link status.
void DisableMulticast(MACADR macAddress, int interface=0)
Disable Multicast on an existing interface.
bool InterfaceLinkActive(int interface)
Returns the link status of the specified network interface.
InterfaceBlock * GetInterfaceBlock(int interface=0)
Get an InterfaceBlock control and configuration object.
IPADDR4 InterfaceDNS2(int interface)
Returns the second IPv4 DNS address of the specified network interface.
IPADDR4 InterfaceMASK(int interface)
Returns the IPv4 network mask of the specified network interface.
IPADDR4 InterfaceAutoIP(int interface)
Returns the IPv4 IP AutoIP address of the specified network interface.
IPADDR4 InterfaceDNS(int interface)
Returns the IPv4 DNS address of the specified network interface.
IPADDR4 InterfaceIP(int interface)
Returns the IPv4 IP address of the specified network interface.
IPADDR4 InterfaceGate(int interface)
Returns the IPv4 gateway address of the specified network interface.
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.