This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvprelay.h
72 lines (55 loc) · 1.67 KB
/
mvprelay.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
Copyright 2007 Chris Tallon
This file is part of VOMP.
VOMP is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
VOMP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with VOMP; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef MVPRELAY_H
#define MVPRELAY_H
#include <stdio.h>
#include <signal.h>
#include "log.h"
#include "dsock.h"
#include "thread.h"
#include "tcp.h" // temp
class MVPRelay : public Thread
{
public:
MVPRelay();
virtual ~MVPRelay();
int run();
int shutdown();
private:
void threadMethod();
DatagramSocket ds;
};
#endif
/*
Protocol information (from the original mvprelay.c)
0 4 bytes: sequence
4 4 bytes: magic number = 0xBABEFAFE
8 6 bytes: client MAC address
14 2 bytes: reserved = 0
16 4 bytes: client IP address
20 2 bytes: client port number
22 2 bytes: reserved = 0
24 4 bytes: GUI IP address
28 2 bytes: GUI port number
30 2 bytes: reserved = 0
32 4 bytes: Con IP address ???
36 2 bytes: Con port number ???
38 6 bytes: reserved = 0 ???
44 4 bytes: Server IP address ???
48 2 bytes: Server port number ???
50 2 bytes: reserved = 0 ???
Total: 52 bytes
*/