12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- /***** (C) Copyright, Shenzhen SUNWIN Intelligent Co.,Ltd. ******source file****
- * File name : sdc_common.h
- * Author : ShengYin Li
- * Brief :
- ********************************************************************************
- * modify
- * Version Date Author Described
- * V1.00 2021/04/2 ShengYin Li Created
- *******************************************************************************/
- #pragma once
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <fcntl.h>
- #include <stdio.h>
- #include <errno.h>
- #include <iostream>
- #include <stdlib.h>
- #include <malloc.h>
- #include <sys/types.h>
- #include <sys/un.h>
- #include <sys/epoll.h>
- #include <sys/uio.h>
- #include <string.h>
- #include <unistd.h>
- // struct sdc_common_head
- // {
- // uint16_t version;
- // uint8_t url_ver;
- // #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__)
- // #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
- // uint8_t method: 7;
- // uint8_t response: 1;
- // #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
- // uint8_t response: 1;
- // uint8_t method: 7;
- // #else
- // #error "unknown __BYTE_ORDER__"
- // #endif
- // #else
- // #error "don't define __BYTE_ORDER__ or __ORDER_LITTLE_ENDIAN__ or __ORDER_BIG_ENDIAN__"
- // #endif
- // uint16_t url;
- // uint16_t code;
- // uint16_t head_length;
- // uint16_t trans_id;
- // uint32_t content_length;
- // };
- #define SDC_VERSION 0x5331
- #define SDC_URL_HARDWARE_ID 100
- #define SDC_METHOD_CREATE 1
- #define SDC_METHOD_GET 2
- #define SDC_METHOD_UPDATE 3
- #define SDC_METHOD_DELETE 4
- #define SDC_CODE_200 200
- #define SDC_CODE_400 400
- #define SDC_CODE_401 401
- #define SDC_CODE_403 403
- #define SDC_CODE_500 500
- #define SDC_URL_TPROXY_SERVER 0x00
- #define SDC_URL_TPROXY_CONNECTION 0x01
- struct sdc_tproxy_server
- {
- int32_t domain;
- int32_t type;
- char addr[128];
- char filter[0];
- };
- struct sdc_tproxy_addr
- {
- int32_t domain;
- int32_t type;
- char addr[128];
- };
- /******** (C) Copyright, Shenzhen SUNWIN Intelligent Co.,Ltd. ******** End *****/
|