Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (74 sloc) 2.703 kB
3771a03 initial commit
Giovanni Pellerano authored
1 /*
3db7dd5 typ0 corrections
Giovanni Pellerano authored
2 * Janus, a portable, unified and lightweight interface for mitm
4c19e63 some simplifications to the project.
Giovanni Pellerano authored
3 * applications over the traffic directed to the default gateway.
3771a03 initial commit
Giovanni Pellerano authored
4 *
5 * Copyright (C) 2011 evilaliv3 <giovanni.pellerano@evilaliv3.org>
6 * vecna <vecna@delirandom.net>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #ifndef JANUS_H
23 #define JANUS_H
24
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
25 /* instead include ethernet.h */
26 #ifndef ETH_HLEN
27 #define ETH_HLEN 14
28 #endif
29
30 #ifndef ETH_ALEN
31 #define ETH_ALEN 6
32 #endif
33
34 #ifndef ETH_P_IP
35 #define ETH_P_IP 0x0800
36 #endif
37 /* --- */
38
e291947 added configuration file getopt
Giovanni Pellerano authored
39 #define CONST_JANUS_VERSION "0.3"
3771a03 initial commit
Giovanni Pellerano authored
40 #define CONST_JANUS_IFNAME "janus"
0ef0a5e @vecna Mods before the CCC - macosx porting under works!
vecna authored
41 #define CONST_JANUS_WEBSITE "http://github.com/evilaliv3/janus"
e291947 added configuration file getopt
Giovanni Pellerano authored
42 #define CONST_JANUS_CONF_FILE "/etc/janus/current-os"
0ef0a5e @vecna Mods before the CCC - macosx porting under works!
vecna authored
43 #define CONST_JANUS_LISTEN_IP "127.0.0.1"
3771a03 initial commit
Giovanni Pellerano authored
44 #define CONST_JANUS_LISTEN_PORT_IN 30201
45 #define CONST_JANUS_LISTEN_PORT_OUT 10203
a0203a8 some minor cleanup.
Giovanni Pellerano authored
46 #define CONST_JANUS_BUFSIZE 512
c6b1340 eliminated malloc/free overhead.
Giovanni Pellerano authored
47 #define CONST_JANUS_PQUEUE_LEN 32
3771a03 initial commit
Giovanni Pellerano authored
48 #define REGEXP_IPV4 "([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"
49 #define REGEXP_HOST "^"REGEXP_IPV4"$"
50
0ef0a5e @vecna Mods before the CCC - macosx porting under works!
vecna authored
51 #define JANUS_BANNER " Janus-"CONST_JANUS_VERSION" "CONST_JANUS_WEBSITE" "
52 #define CONST_JANUS_BANNER_LENGTH sizeof(JANUS_BANNER)
53
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
54 struct ethernet_header
55 {
56 uint8_t dst_ethernet[ETH_ALEN];
57 uint8_t src_ethernet[ETH_ALEN];
58 uint16_t link_type;
5ce70ef ...
Giovanni Pellerano authored
59 } __attribute__((__packed__));
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
60
3771a03 initial commit
Giovanni Pellerano authored
61 struct janus_config
62 {
e291947 added configuration file getopt
Giovanni Pellerano authored
63 char banner[CONST_JANUS_BANNER_LENGTH];
64 char file[CONST_JANUS_BUFSIZE];
65 char listen_ip[CONST_JANUS_BUFSIZE];
3771a03 initial commit
Giovanni Pellerano authored
66 uint16_t listen_port_in;
67 uint16_t listen_port_out;
c6b1340 eliminated malloc/free overhead.
Giovanni Pellerano authored
68 uint16_t pqueue_len;
3771a03 initial commit
Giovanni Pellerano authored
69 };
70
a0203a8 some minor cleanup.
Giovanni Pellerano authored
71 void JANUS_Bootstrap(void);
72 void JANUS_Init(void);
73 void JANUS_Reset(void);
74 void JANUS_Shutdown(void);
3771a03 initial commit
Giovanni Pellerano authored
75 void JANUS_EventLoop(void);
76
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
77 /* these are the exported symbol from os_cmds.c */
cccdcf5 QA and a lot of bug fixed; Janus should probably be ready for a stabl…
Giovanni Pellerano authored
78 void janus_commands_file_setup(char *);
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
79 void sysmap_command(char);
80 char *get_sysmap_str(char);
cccdcf5 QA and a lot of bug fixed; Janus should probably be ready for a stabl…
Giovanni Pellerano authored
81 uint32_t get_sysmap_int(char);
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
82 void map_external_int(char, uint32_t);
f264900 bugfixing, and QA
Giovanni Pellerano authored
83 void free_cmd_structures(void);
cd6435d @vecna Somethins goes wrong in the last commit ? anyway: NOT WORKING release
vecna authored
84
3db7dd5 typ0 corrections
Giovanni Pellerano authored
85 #endif /* JANUS_H */
Something went wrong with that request. Please try again.