def pack(self):
    ipv4_header = struct.pack(IPV4_HEAD_FMT, self.version_ihl, self.tos, self.length, self.identification, self.fragment_offset, self.ttl, self.protocol, self.checksum, self.source_ip, self.destination_ip)
    self.checksum = calculate_checksum(ipv4_header)
    ipv4_header = struct.pack(IPV4_HEAD_FMT, self.version_ihl, self.tos, self.length, self.identification, self.fragment_offset, self.ttl, self.protocol, self.checksum, self.source_ip, self.destination_ip)
    return ipv4_header
def pack(self):
    ipv4_header = struct.pack(IPV4_HEAD_FMT, self.version_ihl, self.tos, self.length, self.identification, self.fragment_offset, self.ttl, self.protocol, self.checksum, self.source_ip, self.destination_ip)
    self.checksum = calculate_checksum(ipv4_header)
    ipv4_header = struct.pack(IPV4_HEAD_FMT, self.version_ihl, self.tos, self.length, self.identification, self.fragment_offset, self.ttl, self.protocol, self.checksum, self.source_ip, self.destination_ip)
    return ipv4_header