MCPcopy Create free account
hub / github.com/NetSys/bess / FromString

Method FromString

core/utils/ether.cc:51–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool Address::FromString(const std::string &str) {
52 int ret = Parse(str, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", &bytes[0],
53 &bytes[1], &bytes[2], &bytes[3], &bytes[4], &bytes[5]);
54 return (ret == Address::kSize);
55}
56
57std::string Address::ToString() const {
58 return Format("%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", bytes[0], bytes[1],

Callers 3

SetPortConfMethod · 0.80
CommandAddMethod · 0.80
TESTFunction · 0.80

Calls 1

ParseFunction · 0.85

Tested by 1

TESTFunction · 0.64