ioLibrary for Cortex M series
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
ioLibrary
ethernet
netctrl.h
Go to the documentation of this file.
1
12
#ifndef _NETCTRL_H
13
#define _NETCTRL_H
14
15
//#include "common/common.h"
16
17
22
typedef
enum
{
// 0 is not used (zero means just ignore dhcp config this time)
23
NETINFO_STATIC
= 1,
24
NETINFO_DHCP
,
25
}
dhcp_mode
;
26
31
typedef
enum
{
32
//NI_MAC_ADDR, //< Indicate MAC Address // Uncomment if needed
33
NI_IP_ADDR
,
34
NI_SN_MASK
,
35
NI_GW_ADDR
,
36
NI_DNS_ADDR
37
}
netinfo_member
;
38
43
typedef
struct
wiz_NetInfo_t
44
{
45
uint8_t
mac
[6];
46
uint8_t
ip
[4];
47
uint8_t
sn
[4];
48
uint8_t
gw
[4];
49
uint8_t
dns
[4];
50
dhcp_mode
dhcp
;
51
}
wiz_NetInfo
;
52
53
54
void
SetNetInfo
(
wiz_NetInfo
*netinfo);
55
void
ClsNetInfo
(
netinfo_member
member);
56
void
GetNetInfo
(
wiz_NetInfo
*netinfo);
57
void
GetDstInfo
(uint8_t s, uint8_t *dstip, uint16_t *dstport);
58
void
SetSocketOption
(uint8_t option_type, uint16_t option_value);
59
int8_t
GetTCPSocketStatus
(uint8_t s);
60
int8_t
GetUDPSocketStatus
(uint8_t s);
61
uint16_t
GetSocketTxFreeBufferSize
(uint8_t s);
62
uint16_t
GetSocketRxRecvBufferSize
(uint8_t s);
63
64
65
#endif //_NETCTRL_H
66
67
68
69
70
Generated on Tue Sep 3 2013 15:36:42 for ioLibrary for Cortex M series by
1.8.4