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
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to