blob: 5ef0a1a8466b46f4d0380effdf9f4785ce29083d (
plain)
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
|
#ifndef _APPLINK_H
#define _APPLINK_H
#include <stdint.h>
class sim_t;
struct packet;
class appserver_link_t
{
public:
appserver_link_t(int _tohost_fd, int _fromhost_fd);
void init(sim_t* _sim);
void wait_for_start();
void wait_for_tohost();
void wait_for_fromhost();
int wait_for_packet();
private:
sim_t* sim;
int tohost_fd;
int fromhost_fd;
uint16_t seqno;
void nack(uint16_t seqno);
void send_packet(packet* p);
};
#endif
|