]> git.vomp.tv Git - vompserver.git/blob - mvprelay.h
15 years that line of code has been waiting to crash
[vompserver.git] / mvprelay.h
1 /*
2     Copyright 2007 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef MVPRELAY_H
22 #define MVPRELAY_H
23
24 #include <stdio.h>
25 #include <signal.h>
26
27 #include "log.h"
28 #include "dsock.h"
29 #include "thread.h"
30
31 #include "tcp.h" // temp
32
33 class MVPRelay : public Thread
34 {
35   public:
36     MVPRelay();
37     virtual ~MVPRelay();
38
39     int run();
40     int shutdown();
41
42   private:
43     void threadMethod();
44
45     DatagramSocket ds;
46 };
47
48 #endif
49
50 /*
51
52 Protocol information (from the original mvprelay.c)
53
54 0  4 bytes: sequence
55 4  4 bytes: magic number = 0xBABEFAFE
56 8  6 bytes: client MAC address
57 14 2 bytes: reserved = 0
58 16 4 bytes: client IP address
59 20 2 bytes: client port number
60 22 2 bytes: reserved = 0
61 24 4 bytes: GUI IP address
62 28 2 bytes: GUI port number
63 30 2 bytes: reserved = 0
64 32 4 bytes: Con IP address       ???
65 36 2 bytes: Con port number      ???
66 38 6 bytes: reserved = 0         ???
67 44 4 bytes: Server IP address    ???
68 48 2 bytes: Server port number   ???
69 50 2 bytes: reserved = 0         ???
70
71 Total: 52 bytes
72 */