37 #include "simplelink.h"
48 #define NETAPP_RX_BUFFER_LENGTH_ERROR -230
53 unsigned long PacketsSent;
54 unsigned long PacketsReceived;
55 unsigned short MinRoundTime;
56 unsigned short MaxRoundTime;
57 unsigned short AvgRoundTime;
58 unsigned long TestTime;
64 unsigned long PingIntervalTime;
65 unsigned short PingSize;
66 unsigned short PingRequestTimeout;
67 unsigned long TotalNumberOfAttempts;
70 unsigned long Ip1OrPaadding;
71 unsigned long Ip2OrPaadding;
72 unsigned long Ip3OrPaadding;
78 #define MAX_INPUT_STRING 64
80 #define MAX_AUTH_NAME_LEN 20
81 #define MAX_AUTH_PASSWORD_LEN 20
82 #define MAX_AUTH_REALM_LEN 20
84 #define MAX_DEVICE_URN_LEN (15+1)
85 #define MAX_DOMAIN_NAME_LEN (24+1)
87 #define MAX_ACTION_LEN 30
88 #define MAX_TOKEN_NAME_LEN 20
89 #define MAX_TOKEN_VALUE_LEN MAX_INPUT_STRING
92 #define SL_NETAPP_HTTPGETTOKENVALUE 1
93 #define SL_NETAPP_HTTPPOSTTOKENVALUE 2
97 #define NETAPP_MAX_SERVICE_TEXT_SIZE 256
98 #define NETAPP_MAX_SERVICE_NAME_SIZE 60
99 #define NETAPP_MAX_SERVICE_HOST_NAME_SIZE 64
103 #define SL_NETAPP_RESPONSE_NONE 0
104 #define SL_NETAPP_HTTPSETTOKENVALUE 1
106 #define SL_NETAPP_FAMILY_MASK 0x80
116 unsigned char value_len;
117 unsigned char name_len;
118 unsigned char *token_value;
119 unsigned char *token_name;
148 unsigned long Response;
155 unsigned long lease_time;
156 unsigned long ipv4_addr_start;
157 unsigned long ipv4_addr_last;
166 SL_NET_APP_FULL_SERVICE_WITH_TEXT_IPV4_TYPE = 1,
167 SL_NET_APP_FULL_SERVICE_IPV4_TYPE,
168 SL_NET_APP_SHORT_SERVICE_IPV4_TYPE
170 } SlNetAppGetServiceListType_e;
174 unsigned long service_ipv4;
175 unsigned short service_port;
176 unsigned short Reserved;
183 unsigned long service_ipv4;
184 unsigned short service_port;
185 unsigned short Reserved;
186 unsigned char service_name[NETAPP_MAX_SERVICE_NAME_SIZE];
187 unsigned char service_host[NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
192 unsigned long service_ipv4;
193 unsigned short service_port;
194 unsigned short Reserved;
195 unsigned char service_name[NETAPP_MAX_SERVICE_NAME_SIZE];
196 unsigned char service_host[NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
197 unsigned char service_text[NETAPP_MAX_SERVICE_TEXT_SIZE];
219 unsigned long RetransInterval;
220 unsigned long Maxinterval;
221 unsigned long max_time;
224 #define SL_NET_APP_MASK_IPP_TYPE_OF_SERVICE 0x00000001
225 #define SL_NET_APP_MASK_DEVICE_INFO_TYPE_OF_SERVICE 0x00000002
226 #define SL_NET_APP_MASK_HTTP_TYPE_OF_SERVICE 0x00000004
227 #define SL_NET_APP_MASK_HTTPS_TYPE_OF_SERVICE 0x00000008
228 #define SL_NET_APP_MASK_WORKSATION_TYPE_OF_SERVICE 0x00000010
229 #define SL_NET_APP_MASK_GUID_TYPE_OF_SERVICE 0x00000020
230 #define SL_NET_APP_MASK_H323_TYPE_OF_SERVICE 0x00000040
231 #define SL_NET_APP_MASK_NTP_TYPE_OF_SERVICE 0x00000080
232 #define SL_NET_APP_MASK_OBJECITVE_TYPE_OF_SERVICE 0x00000100
233 #define SL_NET_APP_MASK_RDP_TYPE_OF_SERVICE 0x00000200
234 #define SL_NET_APP_MASK_REMOTE_TYPE_OF_SERVICE 0x00000400
235 #define SL_NET_APP_MASK_RTSP_TYPE_OF_SERVICE 0x00000800
236 #define SL_NET_APP_MASK_SIP_TYPE_OF_SERVICE 0x00001000
237 #define SL_NET_APP_MASK_SMB_TYPE_OF_SERVICE 0x00002000
238 #define SL_NET_APP_MASK_SOAP_TYPE_OF_SERVICE 0x00004000
239 #define SL_NET_APP_MASK_SSH_TYPE_OF_SERVICE 0x00008000
240 #define SL_NET_APP_MASK_TELNET_TYPE_OF_SERVICE 0x00010000
241 #define SL_NET_APP_MASK_TFTP_TYPE_OF_SERVICE 0x00020000
242 #define SL_NET_APP_MASK_XMPP_CLIENT_TYPE_OF_SERVICE 0x00040000
243 #define SL_NET_APP_MASK_RAOP_TYPE_OF_SERVICE 0x00080000
244 #define SL_NET_APP_MASK_ALL_TYPE_OF_SERVICE 0xFFFFFFFF
249 #define SL_NET_APP_DNS_QUERY_NO_RESPONSE (-159)
250 #define SL_NET_APP_DNS_NO_SERVER (-161)
251 #define SL_NET_APP_DNS_QUERY_FAILED (-163)
252 #define SL_NET_APP_DNS_MALFORMED_PACKET (-166)
253 #define SL_NET_APP_DNS_MISMATCHED_RESPONSE (-174)
259 #define SL_NET_APP_HTTP_SERVER_ID (1)
260 #define SL_NET_APP_DHCP_SERVER_ID (2)
261 #define SL_NET_APP_MDNS_ID (4)
262 #define SL_NET_APP_DNS_SERVER_ID (8)
263 #define SL_NET_APP_DEVICE_CONFIG_ID (16)
266 #define NETAPP_SET_DHCP_SRV_BASIC_OPT (0)
269 #define NETAPP_SET_GET_HTTP_OPT_PORT_NUMBER (0)
270 #define NETAPP_SET_GET_HTTP_OPT_AUTH_CHECK (1)
271 #define NETAPP_SET_GET_HTTP_OPT_AUTH_NAME (2)
272 #define NETAPP_SET_GET_HTTP_OPT_AUTH_PASSWORD (3)
273 #define NETAPP_SET_GET_HTTP_OPT_AUTH_REALM (4)
274 #define NETAPP_SET_GET_HTTP_OPT_ROM_PAGES_ACCESS (5)
276 #define NETAPP_SET_GET_MDNS_CONT_QUERY_OPT (1)
277 #define NETAPP_SET_GET_MDNS_QEVETN_MASK_OPT (2)
278 #define NETAPP_SET_GET_MDNS_TIMING_PARAMS_OPT (3)
281 #define NETAPP_SET_GET_DNS_OPT_DOMAIN_NAME (0)
284 #define NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN (0)
285 #define NETAPP_SET_GET_DEV_CONF_OPT_DOMAIN_NAME (1)
323 #if _SL_INCLUDE_FUNC(sl_NetAppStart)
349 #if _SL_INCLUDE_FUNC(sl_NetAppStop)
398 #if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByName)
399 int sl_NetAppDnsGetHostByName(
char * hostname,
unsigned short usNameLen,
unsigned long* out_ip_addr,
unsigned char family );
461 #if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByService)
463 unsigned char ServiceLen,
464 unsigned char Family,
465 unsigned long pAddr[],
466 unsigned long *pPort,
467 unsigned short *pTextLen,
529 #if _SL_INCLUDE_FUNC(sl_NetAppGetServiceList)
531 unsigned char MaxServiceCount,
534 unsigned long RxBufferLength
567 #if _SL_INCLUDE_FUNC(sl_NetAppMDNSUnRegisterService)
569 unsigned char ServiceNameLen);
638 #if _SL_INCLUDE_FUNC(sl_NetAppMDNSRegisterService)
640 unsigned char ServiceNameLen,
642 unsigned char TextLen,
645 unsigned long Options);
710 #if _SL_INCLUDE_FUNC(sl_NetAppPingStart)
759 #if _SL_INCLUDE_FUNC(sl_NetAppSet)
760 long sl_NetAppSet(
unsigned char AppId ,
unsigned char Option,
unsigned char OptionLen,
unsigned char *pOptionValue);
813 #if _SL_INCLUDE_FUNC(sl_NetAppGet)
814 long sl_NetAppGet(
unsigned char AppId,
unsigned char Option,
unsigned char *pOptionLen,
unsigned char *pOptionValue);
int sl_NetAppDnsGetHostByName(char *hostname, unsigned short usNameLen, unsigned long *out_ip_addr, unsigned char family)
Get host IP by name.
int sl_NetAppGetServiceList(unsigned char IndexOffest, unsigned char MaxServiceCount, unsigned char Flags, char *pBuffer, unsigned long RxBufferLength)
Get service List Insert into out pBuffer a list of peer's services that are the NWP. The list is in a form of service struct. The user should chose the type of the service struct like:
int sl_NetAppPingStart(SlPingStartCommand_t *pPingParams, unsigned char family, SlPingReport_t *pReport, const P_SL_DEV_PING_CALLBACK pPingCallback)
send ICMP ECHO_REQUEST to network hosts
int sl_NetAppStart(unsigned long AppBitMap)
Starts a network application.
long sl_NetAppSet(unsigned char AppId, unsigned char Option, unsigned char OptionLen, unsigned char *pOptionValue)
Internal function for setting network application configurations.
int sl_NetAppMDNSUnRegisterService(const char *pServiceName, unsigned char ServiceNameLen)
Unregister mDNS service This function deletes the mDNS service from the mDNS package and the database...
int sl_NetAppMDNSRegisterService(const char *pServiceName, unsigned char ServiceNameLen, const char *pText, unsigned char TextLen, unsigned short Port, unsigned long TTL, unsigned long Options)
Register a new mDNS service.
long sl_NetAppDnsGetHostByService(char *pServiceName, unsigned char ServiceLen, unsigned char Family, unsigned long pAddr[], unsigned long *pPort, unsigned short *pTextLen, char *pText)
Return service attributes like IP address, port and text according to service name.
long sl_NetAppGet(unsigned char AppId, unsigned char Option, unsigned char *pOptionLen, unsigned char *pOptionValue)
Internal function for getting network applications configurations.
int sl_NetAppStop(unsigned long AppBitMap)
Stops a network application.