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

📄 msgstruct.h

📁 使用udp的broadcast方式写的c程序
💻 H
字号:
#ifndef CONST_MESSAGE#define CONST_MESSAGE "right"#endif#define NETPARAM	1#define BROADPARAM	2#define DEVICE_DVS_1#ifdef	DEVICE_DVS_1	#define	DEVICE_TYPE	"DVS"	#define DEVICE_CHANNEL	1#endif#ifdef	DEVICE_DVS_4	#define	DEVICE_TYPE	"DVS"	#define DEVICE_CHANNEL	4#endif#ifdef	DEVICE_IPCAMERA	#define DEVICE_TYPE	"IPCAMERA"	#define DEVICE_CHANNEL	1#endif/*udp port*/#ifndef UDP_PORT#define UDP_PORT 8866#endif/*broadcast port*/#ifndef BROADCAST_PORT#define BROADCAST_PORT 6789#endif/*broadcast host name*/#ifndef HOST_NAME#define HOST_NAME "224.111.111.1"#endif#ifndef _MESSAGE_STRUCT_H_#define _MESSAGE_STRUCT_H_ /*save ip etc. to this struct*/typedef struct netparam {	u_char	message[12];	u_char  msg_type;	u_char  dev_type[10];	u_char	mac_value[7];	u_char	netmask_value[30];	u_char	ip_value[30];	u_char  reserve[10];} nettype;//广播包typedef struct broadparam {	u_char message[12];	u_char  msg_type;	u_char ipaddress[30];	}broadcasttype;#endif

⌨️ 快捷键说明

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