Changeset View
Changeset View
Standalone View
Standalone View
b/g10/build-packet.c
Context not available. | |||||
/**************** | /**************** | ||||
* calculate the length of a header | * calculate the length of a header. | ||||
* | |||||
* LEN is the length of the packet's body. NEW_CTB is whether we are | |||||
* using a new or old format packet. | |||||
* | |||||
* If LEN is 0 and NEW_CTB is 0, then we return a length that is | |||||
* appropriate for a body of indeterminate length. | |||||
* | |||||
* Note: it is not possible to compute the length of the header for | |||||
* packets whose body's length is 0 (this is not illegal, this is | |||||
* simply a limitation of the implementation). | |||||
* | |||||
* Note: if LEN is 0 and NEW_CTB is 1, this function will return 1, | |||||
* however, this is incorrect! Thus, do not call this function with | |||||
* these parameters. (Currently, no caller does this. So, if you | |||||
* need this functionality, first fix this implementation.) | |||||
*/ | */ | ||||
static int | static int | ||||
calc_header_length( u32 len, int new_ctb ) | calc_header_length( u32 len, int new_ctb ) | ||||
Context not available. |