dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_tcp_priv.h
Go to the documentation of this file.
1 
11 /*
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  * for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, see <http://www.gnu.org/licenses/>
24  *
25  * Additional note on redistribution: The copyright and license notices above
26  * must be maintained in each individual source file that is a derivative work
27  * of this source file; otherwise redistribution is prohibited.
28  */
29 
30 #ifndef PIOS_TCP_PRIV_H
31 #define PIOS_TCP_PRIV_H
32 
33 #include <pios.h>
34 #include <stdio.h>
35 #include <pthread.h>
36 
37 #if !(defined(_WIN32) || defined(WIN32) || defined(__MINGW32__))
38 #include <sys/socket.h>
39 #include <arpa/inet.h>
40 #include <netinet/in.h>
41 #include <netinet/tcp.h>
42 #else
43 #include <ws2tcpip.h>
44 #endif
45 
46 #include <stdlib.h>
47 #include <string.h>
48 #include <unistd.h>
49 #include <fcntl.h>
50 
51 struct pios_tcp_cfg {
52  const char *ip;
53  uint16_t port;
54 };
55 
56 extern const struct pios_com_driver pios_tcp_com_driver;
57 
58 extern int32_t PIOS_TCP_Init(uintptr_t *tcp_id, const struct pios_tcp_cfg *cfg);
59 
60 #endif /* PIOS_TCP_PRIV_H */
Main PiOS header to include all the compiled in PiOS options.
uint16_t port
Definition: pios_tcp_priv.h:53
static struct flyingpicmd_cfg_fa cfg
Definition: main.c:49
int32_t PIOS_TCP_Init(uintptr_t *tcp_id, const struct pios_tcp_cfg *cfg)
const char * ip
Definition: pios_tcp_priv.h:52
const struct pios_com_driver pios_tcp_com_driver