Lines Matching full:buffer
24 char *DhcpEvent::toString(int val, char *buffer, int max) {
26 strncpy(buffer, "UNKNOWN", max);
28 strncpy(buffer, "STOP", max);
30 strncpy(buffer, "RENEW", max);
32 strncpy(buffer, "RELEASE", max);
34 strncpy(buffer, "TIMEOUT", max);
36 strncpy(buffer, "(internal error)", max);
38 return buffer;
41 int DhcpEvent::parseString(const char *buffer) {
42 if (!strcasecmp(buffer, "UNKNOWN"))
44 else if (!strcasecmp(buffer, "STOP"))
46 else if (!strcasecmp(buffer, "RENEW"))
48 else if (!strcasecmp(buffer, "RELEASE"))
50 else if (!strcasecmp(buffer, "TIMEOUT"))
53 LOGW("Bad event '%s'", buffer);