| 1865 | |
| 1866 | |
| 1867 | static void parseDebugNetStyle(const std::string& style, int& level, |
| 1868 | std::set<uint16_t>& includeTypes, |
| 1869 | std::set<uint16_t>& excludeTypes) { |
| 1870 | level = 1; |
| 1871 | includeTypes.clear(); |
| 1872 | excludeTypes.clear(); |
| 1873 | |
| 1874 | std::vector<std::string> args = TextUtils::tokenize(style, ","); |
| 1875 | for (size_t i = 0; i < args.size(); i++) { |
| 1876 | const std::string& a = args[i]; |
| 1877 | if (isdigit(a[0])) { |
| 1878 | level = atoi(a.c_str()); |
| 1879 | } |
| 1880 | else if (a.size() == 3) { |
| 1881 | const uint16_t type = (a[1] << 8) | a[2]; |
| 1882 | switch (a[0]) { |
| 1883 | case '+': { includeTypes.insert(type); break; } |
| 1884 | case '-': { excludeTypes.insert(type); break; } |
| 1885 | } |
| 1886 | } |
| 1887 | } |
| 1888 | } |
| 1889 | |
| 1890 | |
| 1891 | static void debugNetMessages(uint16_t code, uint16_t len, void* msg) { |