protected void sendDiscoveryMessage(DatapathId sw,OFPort port,boolean isStandard,boolean isReverse){
  if (!isOutgoingDiscoveryAllowed(sw,port,isStandard,isReverse))   return;
  IOFSwitch iofSwitch=switchService.getSwitch(sw);
  if (iofSwitch == null)   return;
  OFPortDesc ofpPort=iofSwitch.getPort(port);
  OFPacketOut po=generateLLDPMessage(iofSwitch,port,isStandard,isReverse);
  OFPacketOut.Builder pob=po.createBuilder();
  List<OFAction> actions=getDiscoveryActions(iofSwitch,ofpPort.getPortNo());
  pob.setActions(actions);
  iofSwitch.write(pob.build());
}

protected void sendDiscoveryMessage ( DatapathId sw , OFPort port , boolean isStandard , boolean isReverse ) { if ( ! isOutgoingDiscoveryAllowed ( sw , port , isStandard , isReverse ) ) return ; IOFSwitch iofSwitch = switchService . getSwitch ( sw ) ; if ( iofSwitch == null ) return ; OFPortDesc ofpPort = iofSwitch . getPort ( port ) ; OFPacketOut po = generateLLDPMessage ( iofSwitch , port , isStandard , isReverse ) ; OFPacketOut . Builder pob = po . createBuilder ( ) ; List < OFAction > actions = getDiscoveryActions ( iofSwitch , ofpPort . getPortNo ( ) ) ; pob . setActions ( actions ) ; iofSwitch . write ( pob . build ( ) ) ; }
send link discovery message out of a given switch port . the discovery message may be a standard lldp or a modified lldp , where the dst mac address is set to : ff . todo : the modified lldp will updated in the future and may use a different eth - type .
