Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ SOCKET_PORT

#define SOCKET_PORT   32000

Definition at line 14 of file socket.c.

Function Documentation

◆ socket_init()

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:

◆ socket_recv()

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:

◆ socket_send()

void socket_send ( char *  buffer,
int  len 
)

Definition at line 47 of file socket.c.

References socket_fd.

Variable Documentation

◆ socket_client

struct sockaddr_in socket_server socket_client
static

Definition at line 17 of file socket.c.

◆ socket_fd

int socket_fd
static

Definition at line 16 of file socket.c.

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