parameters: (self, pkt)
docstring: Detect land attack by observing source,
          destination IP & ports.
  
          Args:
              pkt (scapy_object): Packet to dissect and observe
  
          Raises:
              None
  
          Returns:
              None
docstring_summary: Detect land attack by observing source,
          destination IP & ports.
docstring_tokens: Detect land attack by observing source destination IP & ports .
function: def detect_land_attack(self, pkt):
          """
          Detect land attack by observing source,
          destination IP & ports.
  
          Args:
              pkt (scapy_object): Packet to dissect and observe
  
          Raises:
              None
  
          Returns:
              None
          """
          if (pkt.haslayer(scapy.IP) and
              pkt.haslayer(scapy.TCP)):
  
              source_ip = pkt[scapy.IP].src
              dest_ip = pkt[scapy.IP].dst
  
              source_port = pkt[scapy.TCP].sport
              dest_port = pkt[scapy.TCP].dport
  
              if ((source_ip == dest_ip) and
                  (source_port == dest_port)):
                  self.logger.log(
                      "Possible land attack detected.",
                      logtype="warning"
                  )
function_tokens: def detect_land_attack ( self , pkt ) : if ( pkt . haslayer ( scapy . IP ) and pkt . haslayer ( scapy . TCP ) ) : source_ip = pkt [ scapy . IP ] . src dest_ip = pkt [ scapy . IP ] . dst source_port = pkt [ scapy . TCP ] . sport dest_port = pkt [ scapy . TCP ] . dport if ( ( source_ip == dest_ip ) and ( source_port == dest_port ) ) : self . logger . log ( "Possible land attack detected." , logtype = "warning" )