from django.db import models


class Packet(models.Model):
    name = models.CharField(max_length=15, null=True)
    version = models.IntegerField(null=True)
    ip_len = models.IntegerField(null=True)
    ip_type = models.IntegerField(null=True)
    ip_all_len = models.IntegerField(null=True)
    ip_id = models.IntegerField(null=True)
    ip_flags = models.IntegerField(null=True)
    ip_ttl = models.IntegerField(null=True)
    ip_num = models.IntegerField(null=True)
    ip_crc = models.IntegerField(null=True)
    ip_src = models.CharField(max_length=15, null=True)
    ip_dst = models.CharField(max_length=15, null=True)
    ip_ofst = models.IntegerField(null=True)
    protocol = models.IntegerField(null=True)
    tcp_src = models.IntegerField(null=True)
    tcp_dst = models.IntegerField(null=True)
    tcp_num = models.IntegerField(null=True)
    tcp_ack = models.IntegerField(null=True)
    tcp_ofst = models.IntegerField(null=True)
    tcp_reserv = models.IntegerField(null=True)
    tcp_flag = models.IntegerField(null=True)
    tcp_win = models.IntegerField(null=True)
    tcp_crc = models.IntegerField(null=True)
    tcp_ptr = models.IntegerField(null=True)
    tcp_data = models.CharField(max_length=255, null=True)
    udp_src = models.IntegerField(null=True)
    udp_dst = models.IntegerField(null=True)
    udp_len = models.IntegerField(null=True)
    udp_crc = models.IntegerField(null=True)
    udp_data = models.CharField(max_length=255, null=True)
    icmp_type = models.IntegerField(null=True)
    icmp_code = models.IntegerField(null=True)
    icmp_crc = models.IntegerField(null=True)
    icmp_data = models.CharField(max_length=255, null=True)