Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
socket.c File Reference
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "socket.h"
+ Include dependency graph for socket.c:

Go to the source code of this file.

Macros

#define SOCKET_PORT   32000
 

Functions

void socket_init (int is_server)
 
int socket_recv (char *buffer, int len)
 
void socket_send (char *buffer, int len)
 

Variables

static int socket_fd
 
static struct sockaddr_in
socket_server 
socket_client
 

Macro Definition Documentation

#define SOCKET_PORT   32000

Definition at line 14 of file socket.c.

Referenced by socket_init().

Function Documentation

void socket_init ( int  is_server)

Definition at line 19 of file socket.c.

References socket_fd, and SOCKET_PORT.

Referenced by main().

+ Here is the caller graph for this function:

int socket_recv ( char *  buffer,
int  len 
)

Definition at line 41 of file socket.c.

References socket_fd.

Referenced by main().

+ Here is the caller graph for this function:

void socket_send ( char *  buffer,
int  len 
)

Definition at line 47 of file socket.c.

References socket_fd.

Variable Documentation

struct sockaddr_in socket_server socket_client
static

Definition at line 17 of file socket.c.

int socket_fd
static

Definition at line 16 of file socket.c.

Referenced by socket_init(), socket_recv(), and socket_send().