Home | History | Annotate | Download | only in nexus

Lines Matching refs:buffer

24 char *DhcpState::toString(int val, char *buffer, int max) {
26 strncpy(buffer, "INIT", max);
28 strncpy(buffer, "DISCOVERING", max);
30 strncpy(buffer, "REQUESTING", max);
32 strncpy(buffer, "BOUND", max);
34 strncpy(buffer, "RENEWING", max);
36 strncpy(buffer, "REBINDING", max);
38 strncpy(buffer, "REBOOT", max);
40 strncpy(buffer, "RENEW_REQUESTED", max);
42 strncpy(buffer, "INIT_IPV4LL", max);
44 strncpy(buffer, "PROBING", max);
46 strncpy(buffer, "ANNOUNCING", max);
48 strncpy(buffer, "(internal error)", max);
50 return buffer;
53 int DhcpState::parseString(const char *buffer) {
54 if (!strcasecmp(buffer, "INIT"))
56 else if (!strcasecmp(buffer, "DISCOVERING"))
58 else if (!strcasecmp(buffer, "REQUESTING"))
60 else if (!strcasecmp(buffer, "BOUND"))
62 else if (!strcasecmp(buffer, "RENEWING"))
64 else if (!strcasecmp(buffer, "REBINDING"))
66 else if (!strcasecmp(buffer, "REBOOT"))
68 else if (!strcasecmp(buffer, "RENEW_REQUESTED"))
70 else if (!strcasecmp(buffer, "INIT_IPV4LL"))
72 else if (!strcasecmp(buffer, "PROBING"))
74 else if (!strcasecmp(buffer, "ANNOUNCING"))
77 LOGW("Bad state '%s'", buffer);