msgstruct.h
来自「使用udp的broadcast方式写的c程序」· C头文件 代码 · 共 58 行
H
58 行
#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 + =
减小字号Ctrl + -
显示快捷键?