⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defines.h

📁 LINUX下的收发E-MAIL的程序
💻 H
字号:

#ifndef __DEFINES_H__
#define __DEFINES_H__


#define ERROR   		0
#define SUCCESS 		1

#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif

#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
#endif

// define IPv6 hex string length 
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif

typedef struct _Rmail Rmail;
struct _Rmail	{
	char *sender;
	char *receiver;
	char *date;
	char *subject;
	char *messageid;
	char *content;
	char *attach_file;
	Rmail *next;
};

struct RmailList{
	int total;
	Rmail *mail;
};

struct _server_
{
   char hostname[32];
   char ip[INET_ADDRSTRLEN + 1];   // IPv4 dotted decimal -> 16 chars + NULL 
   struct sockaddr_in sin;
   unsigned int port;
};
typedef struct _server_ Server;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -