|
@ -1,6 +1,8 @@ |
|
|
# Code has been taken from https://www.codeproject.com/Tips/460867/Python-Implementation-of-IP-Checksum |
|
|
# Code has been taken from https://www.codeproject.com/Tips/460867/Python-Implementation-of-IP-Checksum |
|
|
# Example is provided at https://www.thegeekstuff.com/2012/05/ip-header-checksum/ |
|
|
# Example is provided at https://www.thegeekstuff.com/2012/05/ip-header-checksum/ |
|
|
|
|
|
|
|
|
|
|
|
# For now, manually changing values in the header field to compute IP checksum. |
|
|
|
|
|
|
|
|
def ip_checksum(ip_header, size): |
|
|
def ip_checksum(ip_header, size): |
|
|
|
|
|
|
|
|
cksum = 0 |
|
|
cksum = 0 |
|
|