[quagga-dev 12127] RIP interface wakeup

srujan k srujan.kdas at gmail.com
Wed Apr 8 06:37:54 BST 2015


Hi Devteam,

I am going through the source code of RIP. I am not able to understand how
the function "rip_interface_wakeup" is filled with interface structure.

There is a call   ifp = THREAD_ARG (t);, after this call ifp is filled with
interface detail. I am not able to understand how THREAD_ARG is used to
fill ifp structure.


The thread structure has following details.
* Thread itself. */
struct thread
{
  thread_type type;        /* thread type */
  thread_type add_type;        /* thread type */
  struct thread *next;        /* next pointer of the thread */
  struct thread *prev;        /* previous pointer of the thread */
  struct thread_master *master;    /* pointer to the struct thread_master.
*/
  int (*func) (struct thread *); /* event function */
  void *arg;            /* event argument */
  union {
    int val;            /* second argument of the event. */
    int fd;            /* file descriptor in case of read/write. */
    struct timeval sands;    /* rest of time sands value. */
  } u;
  RUSAGE_T ru;            /* Indepth usage info.  */
  struct cpu_thread_history *hist; /* cache pointer to cpu_history */
*  char* funcname;*
};

Can some one point to me to understand the code flow to start with.

Regards,
Srujan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20150408/481e97d4/attachment-0001.html>


More information about the Quagga-dev mailing list