<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1435503469174_2834"><br></div><div dir="ltr" id="yui_3_16_0_1_1435503469174_2746">I am not very clear on the purpose of different data members within the buf structure.(appended below)<br></div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2743"><br class=""></div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2744">After looking through the code, I can figure out the purpose of </div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2745"><br class=""></div><ul dir="ltr" id="yui_3_16_0_1_1435503469174_2819"><li id="yui_3_16_0_1_1435503469174_2827">pos,last (sliding window) <br></li><li id="yui_3_16_0_1_1435503469174_2826">file_pos, file_last, start, end ,(data start and end)<br></li><li id="yui_3_16_0_1_1435503469174_2825">tag, (which module owns this buf)<br></li><li id="yui_3_16_0_1_1435503469174_2824">file (name of the file if any associated with the data)<br></li><li id="yui_3_16_0_1_1435503469174_2823">memory(cannot be released by any module that processes the buf).<br></li><li id="yui_3_16_0_1_1435503469174_2822">mmap (buf is memory map)<br></li><li id="yui_3_16_0_1_1435503469174_2821">last_in_chain(last in the chain of bufs)<br></li><li id="yui_3_16_0_1_1435503469174_2820">last_buf(last in the response)<br></li><li id="yui_3_16_0_1_1435503469174_2818">For temporary: can the temporary buffer be released by any module that processes it or can it be released by only the module that owns it as indicated in the tag<br></li></ul><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2705"><br class=""></div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2628"><br class=""></div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2628">It will be good if the purpose of other data members is described also. Thanks for any inputs<br></div><div dir="ltr" class="" id="yui_3_16_0_1_1435503469174_2702"><br class=""></div><div id="yui_3_16_0_1_1435503469174_2701"><br></div><div class="" id="yui_3_16_0_1_1435503469174_2686">struct ngx_buf_s {</div><div class="" id="yui_3_16_0_1_1435503469174_2685">    u_char          *pos;</div><div class="" id="yui_3_16_0_1_1435503469174_2736">    u_char          *last;</div><div class="" id="yui_3_16_0_1_1435503469174_2737">    off_t            file_pos;</div><div class="" id="yui_3_16_0_1_1435503469174_2738">    off_t            file_last;</div><div class=""><br class=""></div><div class="">    u_char          *start;         /* start of buffer */</div><div class="" id="yui_3_16_0_1_1435503469174_2684">    u_char          *end;           /* end of buffer */</div><div class="" id="yui_3_16_0_1_1435503469174_2683">    ngx_buf_tag_t    tag;</div><div class="" id="yui_3_16_0_1_1435503469174_2583">    ngx_file_t      *file;</div><div class="" id="yui_3_16_0_1_1435503469174_2668">    ngx_buf_t       *shadow;</div><div class="" id="yui_3_16_0_1_1435503469174_2674"><br class=""></div><div class=""><br class=""></div><div class="">    /* the buf's content could be changed */</div><div class="">    unsigned         temporary:1;</div><div class=""><br class=""></div><div class="">    /*</div><div class="">     * the buf's content is in a memory cache or in a read only memory</div><div class="">     * and must not be changed</div><div class="">     */</div><div class="">    unsigned         memory:1;</div><div class="" id="yui_3_16_0_1_1435503469174_2680"><br class=""></div><div class="" id="yui_3_16_0_1_1435503469174_2681">    /* the buf's content is mmap()ed and must not be changed */</div><div class="">    unsigned         mmap:1;</div><div class=""><br class=""></div><div class="">    unsigned         recycled:1;</div><div class="">    unsigned         in_file:1;</div><div class="" id="yui_3_16_0_1_1435503469174_2725">    unsigned         flush:1;</div><div class="">    unsigned         sync:1;</div><div class="" id="yui_3_16_0_1_1435503469174_2682">    unsigned         last_buf:1;</div><div class="">    unsigned         last_in_chain:1;</div><div class=""><br class=""></div><div class="">    unsigned         last_shadow:1;</div><div class="">    unsigned         temp_file:1;</div><div class=""><br class=""></div><div class="">    /* STUB */ int   num;</div><div class="">};</div><div dir="ltr" class=""><br class=""></div><div class=""><br class=""></div></div></body></html>