Exemplo n.º 1
0
/**
 *Builds a HNA message in the outputbuffer
 *<b>NB! Not internal packetformat!</b>
 *
 *@param ifp the interface to send on
 *@return nada
 */
bool
queue_hna(struct interface * ifp)
{
#ifdef DEBUG
  OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name);
#endif

  switch (olsr_cnf->ip_version) {
  case (AF_INET):
    return serialize_hna4(ifp);
  case (AF_INET6):
    return serialize_hna6(ifp);
  }
  return false;
}
Exemplo n.º 2
0
/**
 *Builds a HNA message in the outputbuffer
 *<b>NB! Not internal packetformat!</b>
 *
 *@param ifp the interface to send on
 *@return nada
 */
bool
queue_hna(struct interface_olsr * ifp)
{
#ifdef DEBUG
  OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name);
#endif /* DEBUG */

  switch (olsr_cnf->ip_version) {
  case (AF_INET6):
    return serialize_hna6(olsr_cnf->hna_entries, ifp, false);
  case (AF_INET):
  default:
    return serialize_hna4(olsr_cnf->hna_entries, ifp, false);
  }
  return false;
}