File: pmacct-create-db_v4.mysql

package info (click to toggle)
pmacct 1.7.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,904 kB
  • sloc: ansic: 110,430; sh: 4,794; cpp: 4,375; python: 3,632; makefile: 525
file content (24 lines) | stat: -rwxr-xr-x 756 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
drop database if exists pmacct;
create database pmacct;

use pmacct;

drop table if exists acct_v4; 
create table acct_v4 (
    agent_id INT(4) UNSIGNED NOT NULL,
    mac_src CHAR(17) NOT NULL,
    mac_dst CHAR(17) NOT NULL,
    vlan INT(2) UNSIGNED NOT NULL,
    ip_src CHAR(45) NOT NULL,
    ip_dst CHAR(45) NOT NULL,
    src_port INT(2) UNSIGNED NOT NULL,
    dst_port INT(2) UNSIGNED NOT NULL,
    ip_proto CHAR(6) NOT NULL, 
    tos INT(4) UNSIGNED NOT NULL, 
    packets INT UNSIGNED NOT NULL,
    bytes BIGINT UNSIGNED NOT NULL,
    flows INT UNSIGNED NOT NULL,
    stamp_inserted DATETIME NOT NULL,
    stamp_updated DATETIME,
    PRIMARY KEY (agent_id, mac_src, mac_dst, vlan, ip_src, ip_dst, src_port, dst_port, ip_proto, tos, stamp_inserted)
);