📄 sockutil.h
字号:
#ifndef __SOCK_UTIL__
#define __SOCK_UTIL__
/*
###############################################################################
File Name : sockutil.h
Version : 1.0
Programmer(s) : Kim Woo Youl
Created : 2002/10/20 ~
Description : useful function of W3100A
###############################################################################
*/
/*
###############################################################################
Include Part
###############################################################################
*/
#include "type.h"
/*
###############################################################################
Define Part
###############################################################################
*/
#define __UNUSED_SOCK_UTIL__
/*
###############################################################################
Grobal Variable Declaration Part
###############################################################################
*/
/*
###############################################################################
Function Prototype Declaration Part
###############################################################################
*/
void inet_ntoa(u_char* addr,char* addr_str); /* Convert 32bit Address into Dotted Decimal Format */
void GetIPAddress(u_char* addr); /* Get Source IP Address of W3100A. */
void GetGWAddress(u_char* addr); /* Get Source IP Address of W3100A. */
void GetSubMask(u_char* addr); /* Get Source Subnet mask of W3100A. */
char GetDotNotationAddr(u_char* addr, u_int base, u_int len); /* To be input Dotted Notation string from RS232C and convert 32-bit or 48bit Decimal Address */
void GetNetConfig(); /* Read established network information(G/W, IP, S/N, Mac) of W3100A and Output that through Serial.*/
char* GetDestAddr(SOCKET s,u_char* addr); /* Output destination IP address of appropriate channel */
u_long inet_addr(u_char* addr); /* Converts a string containing an (Ipv4) Internet Protocol decimal dotted address into a 32bit address */
SOCKET getSocket(u_char status, SOCKET start); /* Get handle of socket which status is same to 'status' */
#ifndef __UNUSED_SOCK_UTIL__
u_int checksum(u_char * src, u_int len); /* Calculate checksum of a stream */
char VerifyIPAddress(char* src); /* Verify decimal dotted notation IP address string */
#endif // __UNUSED_SOCK_UTIL__
#endif // __SOCK_UTIL__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -