YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/* Get the length of next field. Change parameter to point at fieldstart */
ulong net_field_length(uchar **packet)
{
reg1 uchar *pos= (uchar *)*packet; if (*pos < 251)
{
(*packet)++; return (ulong) *pos;
} if (*pos == 251)
{
(*packet)++; return NULL_LENGTH;
} if (*pos == 252)
{
(*packet)+=3; return (ulong) uint2korr(pos+1);
} if (*pos == 253)
{
(*packet)+=4; return (ulong) uint3korr(pos+1);
}
(*packet)+=9; /* Must be 254 when here */ return (ulong) uint4korr(pos+1);
}
/* The same as above but returns longlong */
my_ulonglong net_field_length_ll(uchar **packet)
{
uchar *pos= *packet; if (*pos < 251)
{
(*packet)++; return (my_ulonglong) *pos;
} if (*pos == 251)
{
(*packet)++; return (my_ulonglong) NULL_LENGTH;
} if (*pos == 252)
{
(*packet)+=3; return (my_ulonglong) uint2korr(pos+1);
} if (*pos == 253)
{
(*packet)+=4; return (my_ulonglong) uint3korr(pos+1);
}
DBUG_ASSERT(*pos == 254);
(*packet)+=9; /* Must be 254 when here */ return (my_ulonglong) uint8korr(pos+1);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.