Home
PA6488
 
Software
 
Dev Guide
 
Chinese
   
PA6488 Developer's Guide - Using T_LIST Functions
  
Overview
T_LIST related data structures and funtions are used extensively in PA6488 TCP/IP implementation. This description is to help API users to use them in more places.
T_LIST data structure is defined in pa6488\include\type.h. T_LIST works as the "base" type of all T_XXXX_LIST struct where ptNext is the first element, and the struct itself is malloced from heap.
Related ListXyyy functions are in pa6488\util\list.c and pa6488\include\util.h.
T_BUF_LIST with pa6488\util\buflist.c is the most direct example of using T_LIST functions.
  
Details
ListIterate runs every list item with F_LIST_ITERATE f function, f returns TRUE to abort iteration, the stopped list ptr is returned by ListIterate, or NULL if f always returns FALSE.
ListRemoveItem can be safely called in F_LIST_ITERATER function to remove an item.
  
More Examples
List functions are also used in pa6488\netapps\dns.c, httpd.c.