2016-01-22 09:37:57 +00:00
|
|
|
package eu.faircode.netguard;
|
|
|
|
|
|
|
|
/*
|
|
|
|
This file is part of NetGuard.
|
|
|
|
|
|
|
|
NetGuard 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 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
NetGuard 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 NetGuard. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2018-12-31 16:12:49 +00:00
|
|
|
Copyright 2015-2019 by Marcel Bokhorst (M66B)
|
2016-01-22 09:37:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class Packet {
|
|
|
|
public long time;
|
|
|
|
public int version;
|
|
|
|
public int protocol;
|
|
|
|
public String flags;
|
2016-02-23 07:03:53 +00:00
|
|
|
public String saddr;
|
2016-01-22 09:37:57 +00:00
|
|
|
public int sport;
|
2016-02-23 07:03:53 +00:00
|
|
|
public String daddr;
|
2016-01-22 09:37:57 +00:00
|
|
|
public int dport;
|
2016-01-26 10:41:03 +00:00
|
|
|
public String data;
|
2016-01-22 09:37:57 +00:00
|
|
|
public int uid;
|
|
|
|
public boolean allowed;
|
|
|
|
|
|
|
|
public Packet() {
|
2016-01-27 10:59:16 +00:00
|
|
|
}
|
2016-01-22 09:37:57 +00:00
|
|
|
|
2016-01-27 10:59:16 +00:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2016-02-09 15:31:56 +00:00
|
|
|
return "uid=" + uid + " v" + version + " p" + protocol + " " + daddr + "/" + dport;
|
2016-01-22 09:37:57 +00:00
|
|
|
}
|
|
|
|
}
|