-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathudp_server.h
39 lines (28 loc) · 901 Bytes
/
udp_server.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef UDP_SERVER_H_
#define UDP_SERVER_H_
#include "sys_config.h"
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h> // prerequisite typedef
#include <sys/socket.h> // struct sockaddr; system prototypes and constants
#include <netdb.h> // network info lookup prototypes and structures
#include <netinet/in.h> // struct sockaddr_in; byte ordering macros
#include <arpa/inet.h> // utility function prototypes
#include <math.h>
#include "thr_pool.h"
#include "mpi.h"
#define PACKET_SIZE 1024
typedef struct id_type {
int bid; // blade id
// slave_thread_arg starg; // including pid and tid
} id_type;
typedef struct udp_arg_type {
int pid;
int numprocs;
} udp_arg_type;
uint16 **image_buff; // input image buffer, each frame load into this memory
uint16 *image_ptr;
void mem_alloc();
void mem_free();
#endif /* udp_server.h */