-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
58 lines (53 loc) · 1.22 KB
/
TODO
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
* ReadMe.md
* show reason for IP change (kind of ARP packet)
* support more than one IPv6 address per MAC address
* rework man pages after configuration file addition
* mysql man page
.TP
.BI "-m[" database "], --mysql=[" database "]"
Write discovered ethernet/ip address pairings to MySQL
.IR database .
Default MySQL server, login information and database should be specified in
.B "~/.my.cnf"
configuration file in
.B "addrwatch"
section. Example of
.B "~/.my.cnf"
configuration file:
.nf
.in +4
[addrwatch]
.RI "host=" "localhost"
.RI "user=" "db_user"
.RI "password=" "db_password"
.RI "database=" "db_name"
.in -4
.fi
Pairings are written in a table having such schema:
.nf
.in +4
CREATE TABLE IF NOT EXISTS `addrwatch` (
.in +4
`tstamp` timestamp NOT NULL,
`hostname` varchar(256) NOT NULL,
`interface` varchar(16) NOT NULL,
`vlan_tag` int(11) NOT NULL,
`mac_address` varchar(17) NOT NULL,
`ip_address` varchar(42) NOT NULL,
`origin` varchar(8) NOT NULL,
KEY `interface` (`interface`),
KEY `vlan_tag` (`vlan_tag`),
KEY `interface_vlan_tag` (`interface`,`vlan_tag`)
.in -4
)
.in -4
.fi
Default table name is
.B addrwatch
unless option
.B "--mysql-table"
is specified.
.TP
.BI "--mysql-table=" "TBL"
Insert data to MySQL table
.IR TBL .