[olsr-dev] question about creating new plugin

Daniel Jaskiewicz (spam-protected)
Thu Dec 30 13:26:34 CET 2004


Andreas your email was very helpful, but the more I understand it the more 
questions I have.
In order to listen to a new socket passing gps data(lat, long) I must 
register a new socket
with the socket parser in the ipc_init function and then listen for data in 
the ipc_action
function(is that reasonable). Then I must retrieve the gps info and fill my 
msg struct with that data
just like in the get_powerstatus function in the powerinfo plugin example or 
should this be done directly in the ipc_action function?
This powerinfo example floods(broadcasts) the messages so I do not have a 
modify anything if I re-use
the code, is that right?
Also how do I allow for the message which originated from the local node to 
be parsed and forwarded?
Will commenting out the following lines do the trick:

/* Check if message originated from this node */
  if(memcmp(&originator, main_addr, ipsize) == 0)
    /* If so - back off */
    return;

  /* Check that the neighbor this message was received
     from is symmetric */
  if(check_neighbor_link(in_addr) != SYM_LINK)
    {
      /* If not symmetric - back off */
      olsr_printf(3, "Received POWER from NON SYM neighbor %s\n", 
olsr_ip_to_string(in_addr));
      return;
    }

Again thanks and happy new year!
Daniel





More information about the Olsr-dev mailing list