This file is indexed.

/usr/share/gtk-doc/html/libnm/libnm-nm-utils.html is in libnm-dev 1.10.6-2ubuntu1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>nm-utils: libnm Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libnm Reference Manual">
<link rel="up" href="ch05.html" title="Utility API Reference">
<link rel="prev" href="ch05.html" title="Utility API Reference">
<link rel="next" href="libnm-nm-version.html" title="nm-version">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libnm-nm-utils.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#libnm-nm-utils.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libnm-nm-version.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libnm-nm-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libnm-nm-utils.top_of_page"></a>nm-utils</span></h2>
<p>nm-utils — Utility functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libnm-nm-utils.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-is-empty-ssid" title="nm_utils_is_empty_ssid ()">nm_utils_is_empty_ssid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-escape-ssid" title="nm_utils_escape_ssid ()">nm_utils_escape_ssid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-same-ssid" title="nm_utils_same_ssid ()">nm_utils_same_ssid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ssid-to-utf8" title="nm_utils_ssid_to_utf8 ()">nm_utils_ssid_to_utf8</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()">nm_utils_security_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()">nm_utils_ap_mode_security_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wep-key-valid" title="nm_utils_wep_key_valid ()">nm_utils_wep_key_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wpa-psk-valid" title="nm_utils_wpa_psk_valid ()">nm_utils_wpa_psk_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-is-json-object" title="nm_utils_is_json_object ()">nm_utils_is_json_object</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-to-variant" title="nm_utils_ip4_dns_to_variant ()">nm_utils_ip4_dns_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> **
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-from-variant" title="nm_utils_ip4_dns_from_variant ()">nm_utils_ip4_dns_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-to-variant" title="nm_utils_ip4_addresses_to_variant ()">nm_utils_ip4_addresses_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-from-variant" title="nm_utils_ip4_addresses_from_variant ()">nm_utils_ip4_addresses_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-to-variant" title="nm_utils_ip4_routes_to_variant ()">nm_utils_ip4_routes_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-from-variant" title="nm_utils_ip4_routes_from_variant ()">nm_utils_ip4_routes_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-netmask-to-prefix" title="nm_utils_ip4_netmask_to_prefix ()">nm_utils_ip4_netmask_to_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-prefix-to-netmask" title="nm_utils_ip4_prefix_to_netmask ()">nm_utils_ip4_prefix_to_netmask</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-get-default-prefix" title="nm_utils_ip4_get_default_prefix ()">nm_utils_ip4_get_default_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-to-variant" title="nm_utils_ip6_dns_to_variant ()">nm_utils_ip6_dns_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> **
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-from-variant" title="nm_utils_ip6_dns_from_variant ()">nm_utils_ip6_dns_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-to-variant" title="nm_utils_ip6_addresses_to_variant ()">nm_utils_ip6_addresses_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-from-variant" title="nm_utils_ip6_addresses_from_variant ()">nm_utils_ip6_addresses_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-to-variant" title="nm_utils_ip6_routes_to_variant ()">nm_utils_ip6_routes_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-from-variant" title="nm_utils_ip6_routes_from_variant ()">nm_utils_ip6_routes_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()">nm_utils_ip_addresses_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-from-variant" title="nm_utils_ip_addresses_from_variant ()">nm_utils_ip_addresses_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-to-variant" title="nm_utils_ip_routes_to_variant ()">nm_utils_ip_routes_to_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-from-variant" title="nm_utils_ip_routes_from_variant ()">nm_utils_ip_routes_from_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-uuid-generate" title="nm_utils_uuid_generate ()">nm_utils_uuid_generate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-certificate" title="nm_utils_file_is_certificate ()">nm_utils_file_is_certificate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-private-key" title="nm_utils_file_is_private_key ()">nm_utils_file_is_private_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-pkcs12" title="nm_utils_file_is_pkcs12 ()">nm_utils_file_is_pkcs12</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()">*NMUtilsFileSearchInPathsPredicate</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libnm-nm-utils.html#NMUtilsCheckFilePredicate" title="NMUtilsCheckFilePredicate ()">*NMUtilsCheckFilePredicate</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-file-search-in-paths" title="nm_utils_file_search_in_paths ()">nm_utils_file_search_in_paths</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-freq-to-channel" title="nm_utils_wifi_freq_to_channel ()">nm_utils_wifi_freq_to_channel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-channel-to-freq" title="nm_utils_wifi_channel_to_freq ()">nm_utils_wifi_channel_to_freq</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-find-next-channel" title="nm_utils_wifi_find_next_channel ()">nm_utils_wifi_find_next_channel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-is-channel-valid" title="nm_utils_wifi_is_channel_valid ()">nm_utils_wifi_is_channel_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-2ghz-freqs" title="nm_utils_wifi_2ghz_freqs ()">nm_utils_wifi_2ghz_freqs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-5ghz-freqs" title="nm_utils_wifi_5ghz_freqs ()">nm_utils_wifi_5ghz_freqs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-strength-bars" title="nm_utils_wifi_strength_bars ()">nm_utils_wifi_strength_bars</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()">nm_utils_hwaddr_len</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-ntoa" title="nm_utils_hwaddr_ntoa ()">nm_utils_hwaddr_ntoa</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()">nm_utils_hwaddr_atoba</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()">nm_utils_hwaddr_aton</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-valid" title="nm_utils_hwaddr_valid ()">nm_utils_hwaddr_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-canonical" title="nm_utils_hwaddr_canonical ()">nm_utils_hwaddr_canonical</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-matches" title="nm_utils_hwaddr_matches ()">nm_utils_hwaddr_matches</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-bin2hexstr" title="nm_utils_bin2hexstr ()">nm_utils_bin2hexstr</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-hexstr2bin" title="nm_utils_hexstr2bin ()">nm_utils_hexstr2bin</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-iface-valid-name" title="nm_utils_iface_valid_name ()">nm_utils_iface_valid_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-is-valid-iface-name" title="nm_utils_is_valid_iface_name ()">nm_utils_is_valid_iface_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-is-uuid" title="nm_utils_is_uuid ()">nm_utils_is_uuid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()">nm_utils_inet4_ntop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()">nm_utils_inet6_ntop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-ipaddr-valid" title="nm_utils_ipaddr_valid ()">nm_utils_ipaddr_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-check-virtual-device-compatibility" title="nm_utils_check_virtual_device_compatibility ()">nm_utils_check_virtual_device_compatibility</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-bond-mode-string-to-int" title="nm_utils_bond_mode_string_to_int ()">nm_utils_bond_mode_string_to_int</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-bond-mode-int-to-string" title="nm_utils_bond_mode_int_to_string ()">nm_utils_bond_mode_int_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-enum-to-str" title="nm_utils_enum_to_str ()">nm_utils_enum_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-enum-from-str" title="nm_utils_enum_from_str ()">nm_utils_enum_from_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> **
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-enum-get-values" title="nm_utils_enum_get_values ()">nm_utils_enum_get_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-version" title="nm_utils_version ()">nm_utils_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-parse-variant-attributes" title="nm_utils_parse_variant_attributes ()">nm_utils_parse_variant_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-format-variant-attributes" title="nm_utils_format_variant_attributes ()">nm_utils_format_variant_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">NMTCQdisc</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-qdisc-from-str" title="nm_utils_tc_qdisc_from_str ()">nm_utils_tc_qdisc_from_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-qdisc-to-str" title="nm_utils_tc_qdisc_to_str ()">nm_utils_tc_qdisc_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">NMTCAction</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-action-from-str" title="nm_utils_tc_action_from_str ()">nm_utils_tc_action_from_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-action-to-str" title="nm_utils_tc_action_to_str ()">nm_utils_tc_action_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">NMTCTfilter</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-tfilter-from-str" title="nm_utils_tc_tfilter_from_str ()">nm_utils_tc_tfilter_from_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnm-nm-utils.html#nm-utils-tc-tfilter-to-str" title="nm_utils_tc_tfilter_to_str ()">nm_utils_tc_tfilter_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnm-nm-utils.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX">NM_UTILS_HWADDR_LEN_MAX</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN">NM_UTILS_INET_ADDRSTRLEN</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libnm-nm-utils.html#NMVariantAttributeSpec" title="NMVariantAttributeSpec">NMVariantAttributeSpec</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libnm-nm-utils.html#stat" title="struct stat">stat</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnm-nm-utils.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
    <span class="lineart">╰──</span> NMUtilsSecurityType
</pre>
</div>
<div class="refsect1">
<a name="libnm-nm-utils.description"></a><h2>Description</h2>
<p>A collection of utility functions for working with SSIDs, IP addresses, Wi-Fi
access points and devices, among other things.</p>
</div>
<div class="refsect1">
<a name="libnm-nm-utils.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="nm-utils-is-empty-ssid"></a><h3>nm_utils_is_empty_ssid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_is_empty_ssid (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>,
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
<p>Different manufacturers use different mechanisms for not broadcasting the
AP's SSID.  This function attempts to detect blank/empty SSIDs using a
number of known SSID-cloaking methods.</p>
<div class="refsect3">
<a name="nm-utils-is-empty-ssid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ssid</p></td>
<td class="parameter_description"><p>pointer to a buffer containing the SSID data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-is-empty-ssid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the SSID is "empty", <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-escape-ssid"></a><h3>nm_utils_escape_ssid ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_escape_ssid (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
<p>This function does a quick printable character conversion of the SSID, simply
replacing embedded NULLs and non-printable characters with the hexadecimal
representation of that character.  Intended for debugging only, should not
be used for display of SSIDs.</p>
<div class="refsect3">
<a name="nm-utils-escape-ssid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ssid</p></td>
<td class="parameter_description"><p>pointer to a buffer containing the SSID data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-escape-ssid.returns"></a><h4>Returns</h4>
<p> pointer to the escaped SSID, which uses an internal static buffer
and will be overwritten by subsequent calls to this function</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-same-ssid"></a><h3>nm_utils_same_ssid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_same_ssid (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid1</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len1</code></em>,
                    <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid2</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len2</code></em>,
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_trailing_null</code></em>);</pre>
<p>Earlier versions of the Linux kernel added a NULL byte to the end of the
SSID to enable easy printing of the SSID on the console or in a terminal,
but this behavior was problematic (SSIDs are simply byte arrays, not strings)
and thus was changed.  This function compensates for that behavior at the
cost of some compatibility with odd SSIDs that may legitimately have trailing
NULLs, even though that is functionally pointless.</p>
<div class="refsect3">
<a name="nm-utils-same-ssid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ssid1</p></td>
<td class="parameter_description"><p>the first SSID to compare. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len1]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len1</p></td>
<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid1</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ssid2</p></td>
<td class="parameter_description"><p>the second SSID to compare. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len2]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len2</p></td>
<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid2</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ignore_trailing_null</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to ignore one trailing NULL byte</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-same-ssid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the SSIDs are the same, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ssid-to-utf8"></a><h3>nm_utils_ssid_to_utf8 ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_ssid_to_utf8 (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
<p>Wi-Fi SSIDs are byte arrays, they are _not_ strings.  Thus, an SSID may
contain embedded NULLs and other unprintable characters.  Often it is
useful to print the SSID out for debugging purposes, but that should be the
_only_ use of this function.  Do not use this function for any persistent
storage of the SSID, since the printable SSID returned from this function
cannot be converted back into the real SSID of the access point.</p>
<p>This function does almost everything humanly possible to convert the input
into a printable UTF-8 string, using roughly the following procedure:</p>
<p>1) if the input data is already UTF-8 safe, no conversion is performed
2) attempts to get the current system language from the LANG environment
   variable, and depending on the language, uses a table of alternative
   encodings to try.  For example, if LANG=hu_HU, the table may first try
   the ISO-8859-2 encoding, and if that fails, try the Windows-1250 encoding.
   If all fallback encodings fail, replaces non-UTF-8 characters with '?'.
3) If the system language was unable to be determined, falls back to the
   ISO-8859-1 encoding, then to the Windows-1251 encoding.
4) If step 3 fails, replaces non-UTF-8 characters with '?'.</p>
<p>Again, this function should be used for debugging and display purposes
_only_.</p>
<div class="refsect3">
<a name="nm-utils-ssid-to-utf8.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ssid</p></td>
<td class="parameter_description"><p>pointer to a buffer containing the SSID data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ssid-to-utf8.returns"></a><h4>Returns</h4>
<p>an allocated string containing a UTF-8
representation of the SSID, which must be freed by the caller using <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
Returns <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on errors. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-security-valid"></a><h3>nm_utils_security_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
                         <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities" title="enum NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> have_ap</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> adhoc</code></em>,
                         <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApFlags" title="enum NM80211ApFlags"><span class="type">NM80211ApFlags</span></a> ap_flags</code></em>,
                         <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags" title="enum NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_wpa</code></em>,
                         <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags" title="enum NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_rsn</code></em>);</pre>
<p>Given a set of device capabilities, and a desired security type to check
against, determines whether the combination of device, desired security
type, and AP capabilities intersect.</p>
<p>NOTE: this function cannot handle checking security for AP/Hotspot mode;
use <a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()"><code class="function">nm_utils_ap_mode_security_valid()</code></a> instead.</p>
<div class="refsect3">
<a name="nm-utils-security-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the security type to check AP flags and device capabilties against,
e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>wifi_caps</p></td>
<td class="parameter_description"><p>bitfield of the capabilities of the specific Wi-Fi device, e.g.
<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>have_ap</p></td>
<td class="parameter_description"><p>whether the <em class="parameter"><code>ap_flags</code></em>
, <em class="parameter"><code>ap_wpa</code></em>
, and <em class="parameter"><code>ap_rsn</code></em>
arguments are valid</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>adhoc</p></td>
<td class="parameter_description"><p>whether the capabilities being tested are from an Ad-Hoc AP (IBSS)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ap_flags</p></td>
<td class="parameter_description"><p>bitfield of AP capabilities, e.g. <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-FLAGS-PRIVACY:CAPS"><span class="type">NM_802_11_AP_FLAGS_PRIVACY</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ap_wpa</p></td>
<td class="parameter_description"><p>bitfield of AP capabilties derived from the AP's WPA beacon,
e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-KEY-MGMT-PSK:CAPS"><span class="type">NM_802_11_AP_SEC_KEY_MGMT_PSK</span></a>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ap_rsn</p></td>
<td class="parameter_description"><p>bitfield of AP capabilties derived from the AP's RSN/WPA2 beacon,
e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-CCMP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_CCMP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-security-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the device capabilities and AP capabilties intersect and are
compatible with the desired <em class="parameter"><code>type</code></em>
, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ap-mode-security-valid"></a><h3>nm_utils_ap_mode_security_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_ap_mode_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>,
                                 <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities" title="enum NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>);</pre>
<p>Given a set of device capabilities, and a desired security type to check
against, determines whether the combination of device capabilities and
desired security type are valid for AP/Hotspot connections.</p>
<div class="refsect3">
<a name="nm-utils-ap-mode-security-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the security type to check device capabilties against,
e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>wifi_caps</p></td>
<td class="parameter_description"><p>bitfield of the capabilities of the specific Wi-Fi device, e.g.
<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ap-mode-security-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the device capabilities are compatible with the desired
<em class="parameter"><code>type</code></em>
, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wep-key-valid"></a><h3>nm_utils_wep_key_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_wep_key_valid (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                        <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>);</pre>
<p>Checks if <em class="parameter"><code>key</code></em>
 is a valid WEP key</p>
<div class="refsect3">
<a name="nm-utils-wep-key-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a string that might be a WEP key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>wep_type</p></td>
<td class="parameter_description"><p>the <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="type">NMWepKeyType</span></a> type of the WEP key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wep-key-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>key</code></em>
is a WEP key, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wpa-psk-valid"></a><h3>nm_utils_wpa_psk_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_wpa_psk_valid (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>);</pre>
<p>Checks if <em class="parameter"><code>psk</code></em>
 is a valid WPA PSK</p>
<div class="refsect3">
<a name="nm-utils-wpa-psk-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>psk</p></td>
<td class="parameter_description"><p>a string that might be a WPA PSK</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wpa-psk-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>psk</code></em>
is a WPA PSK, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-is-json-object"></a><h3>nm_utils_is_json_object ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_is_json_object (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<div class="refsect3">
<a name="nm-utils-is-json-object.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the JSON string to test</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>optional error reason</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-is-json-object.returns"></a><h4>Returns</h4>
<p> whether the passed string is valid JSON.
If libnm is not compiled with libjansson support, this check will
also return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for possibly invalid inputs. If that is a problem
for you, you must validate the JSON yourself.</p>
</div>
<p class="since">Since: 1.6</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-dns-to-variant"></a><h3>nm_utils_ip4_dns_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip4_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre>
<p>Utility function to convert an array of IP address strings int a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of
type 'au' representing an array of IPv4 addresses.</p>
<div class="refsect3">
<a name="nm-utils-ip4-dns-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dns</p></td>
<td class="parameter_description"><p>an array of IP address strings. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-dns-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-dns-from-variant"></a><h3>nm_utils_ip4_dns_from_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> **
nm_utils_ip4_dns_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'au' representing a list of
IPv4 addresses into an array of IP address strings.</p>
<div class="refsect3">
<a name="nm-utils-ip4-dns-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'au'</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-dns-from-variant.returns"></a><h4>Returns</h4>
<p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-addresses-to-variant"></a><h3>nm_utils_ip4_addresses_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip4_addresses_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>,
                                   <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing
IPv4 addresses into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array of
NetworkManager IPv4 addresses (which are tuples of address, prefix, and
gateway). The "gateway" field of the first address will get the value of
<em class="parameter"><code>gateway</code></em>
 (if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). In all of the other addresses, that field will be 0.</p>
<div class="refsect3">
<a name="nm-utils-ip4-addresses-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>addresses</p></td>
<td class="parameter_description"><p>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>gateway</p></td>
<td class="parameter_description"><p>the gateway IP address. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-addresses-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-addresses-from-variant"></a><h3>nm_utils_ip4_addresses_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip4_addresses_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                     <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing a list of
NetworkManager IPv4 addresses (which are tuples of address, prefix, and
gateway) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field of
the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em>
; the "gateway" fields
of the other addresses are ignored.</p>
<div class="refsect3">
<a name="nm-utils-ip4-addresses-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau'</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_gateway</p></td>
<td class="parameter_description"><p>on return, will contain the IP gateway. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-addresses-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-routes-to-variant"></a><h3>nm_utils_ip4_routes_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip4_routes_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing
IPv4 routes into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array of
NetworkManager IPv4 routes (which are tuples of route, prefix, next hop, and
metric).</p>
<div class="refsect3">
<a name="nm-utils-ip4-routes-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>routes</p></td>
<td class="parameter_description"><p>an array of <span class="type">NMIP4Route</span> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-routes-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-routes-from-variant"></a><h3>nm_utils_ip4_routes_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip4_routes_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array
of NetworkManager IPv4 routes (which are tuples of route, prefix, next hop,
and metric) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p>
<div class="refsect3">
<a name="nm-utils-ip4-routes-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau'</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-routes-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-netmask-to-prefix"></a><h3>nm_utils_ip4_netmask_to_prefix ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_ip4_netmask_to_prefix (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> netmask</code></em>);</pre>
<div class="refsect3">
<a name="nm-utils-ip4-netmask-to-prefix.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>netmask</p></td>
<td class="parameter_description"><p>an IPv4 netmask in network byte order</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-netmask-to-prefix.returns"></a><h4>Returns</h4>
<p> the CIDR prefix represented by the netmask</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-prefix-to-netmask"></a><h3>nm_utils_ip4_prefix_to_netmask ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_ip4_prefix_to_netmask (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> prefix</code></em>);</pre>
<div class="refsect3">
<a name="nm-utils-ip4-prefix-to-netmask.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>a CIDR prefix</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-prefix-to-netmask.returns"></a><h4>Returns</h4>
<p> the netmask represented by the prefix, in network byte order</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip4-get-default-prefix"></a><h3>nm_utils_ip4_get_default_prefix ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_ip4_get_default_prefix (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> ip</code></em>);</pre>
<p>When the Internet was originally set up, various ranges of IP addresses were
segmented into three network classes: A, B, and C.  This function will return
a prefix that is associated with the IP address specified defining where it
falls in the predefined classes.</p>
<div class="refsect3">
<a name="nm-utils-ip4-get-default-prefix.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>ip</p></td>
<td class="parameter_description"><p>an IPv4 address (in network byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip4-get-default-prefix.returns"></a><h4>Returns</h4>
<p> the default class prefix for the given IP</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-dns-to-variant"></a><h3>nm_utils_ip6_dns_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip6_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre>
<p>Utility function to convert an array of IP address strings int a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of
type 'aay' representing an array of IPv6 addresses.</p>
<div class="refsect3">
<a name="nm-utils-ip6-dns-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dns</p></td>
<td class="parameter_description"><p>an array of IP address strings. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-dns-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-dns-from-variant"></a><h3>nm_utils_ip6_dns_from_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> **
nm_utils_ip6_dns_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aay' representing a list of
IPv6 addresses into an array of IP address strings.</p>
<div class="refsect3">
<a name="nm-utils-ip6-dns-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aay'</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-dns-from-variant.returns"></a><h4>Returns</h4>
<p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-addresses-to-variant"></a><h3>nm_utils_ip6_addresses_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip6_addresses_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>,
                                   <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing
IPv6 addresses into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)' representing an array of
NetworkManager IPv6 addresses (which are tuples of address, prefix, and
gateway).  The "gateway" field of the first address will get the value of
<em class="parameter"><code>gateway</code></em>
 (if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). In all of the other addresses, that field will be
all 0s.</p>
<div class="refsect3">
<a name="nm-utils-ip6-addresses-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>addresses</p></td>
<td class="parameter_description"><p>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>gateway</p></td>
<td class="parameter_description"><p>the gateway IP address. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-addresses-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-addresses-from-variant"></a><h3>nm_utils_ip6_addresses_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip6_addresses_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                     <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)' representing a
list of NetworkManager IPv6 addresses (which are tuples of address, prefix,
and gateway) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field
of the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em>
; the "gateway"
fields of the other addresses are ignored.</p>
<div class="refsect3">
<a name="nm-utils-ip6-addresses-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)'</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_gateway</p></td>
<td class="parameter_description"><p>on return, will contain the IP gateway. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-addresses-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-routes-to-variant"></a><h3>nm_utils_ip6_routes_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip6_routes_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing
IPv6 routes into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)' representing an array of
NetworkManager IPv6 routes (which are tuples of route, prefix, next hop, and
metric).</p>
<div class="refsect3">
<a name="nm-utils-ip6-routes-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>routes</p></td>
<td class="parameter_description"><p>an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-routes-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip6-routes-from-variant"></a><h3>nm_utils_ip6_routes_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip6_routes_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)' representing an
array of NetworkManager IPv6 routes (which are tuples of route, prefix, next
hop, and metric) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p>
<div class="refsect3">
<a name="nm-utils-ip6-routes-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)'</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip6-routes-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip-addresses-to-variant"></a><h3>nm_utils_ip_addresses_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip_addresses_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing
IPv4 or IPv6 addresses into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}' representing an
array of new-style NetworkManager IP addresses. All addresses will include
"address" (an IP address string), and "prefix" (a uint). Some addresses may
include additional attributes.</p>
<div class="refsect3">
<a name="nm-utils-ip-addresses-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>addresses</p></td>
<td class="parameter_description"><p>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip-addresses-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip-addresses-from-variant"></a><h3>nm_utils_ip_addresses_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip_addresses_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                    <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing a list of new-style
NetworkManager IPv4 or IPv6 addresses (as described in the documentation for
<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()"><code class="function">nm_utils_ip_addresses_to_variant()</code></a>) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a>
objects.</p>
<div class="refsect3">
<a name="nm-utils-ip-addresses-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}'</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>family</p></td>
<td class="parameter_description"><p>an IP address family</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip-addresses-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip-routes-to-variant"></a><h3>nm_utils_ip_routes_to_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
nm_utils_ip_routes_to_variant (<em class="parameter"><code><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing
IPv4 or IPv6 routes into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}' representing an array
of new-style NetworkManager IP routes (which are tuples of destination,
prefix, next hop, metric, and additional attributes).</p>
<div class="refsect3">
<a name="nm-utils-ip-routes-to-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>routes</p></td>
<td class="parameter_description"><p>an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip-routes-to-variant.returns"></a><h4>Returns</h4>
<p>a new floating <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ip-routes-from-variant"></a><h3>nm_utils_ip_routes_from_variant ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
nm_utils_ip_routes_from_variant (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
                                 <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre>
<p>Utility function to convert a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing a list of new-style
NetworkManager IPv4 or IPv6 addresses (which are tuples of destination,
prefix, next hop, metric, and additional attributes) into a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of
<a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p>
<div class="refsect3">
<a name="nm-utils-ip-routes-from-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}'</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>family</p></td>
<td class="parameter_description"><p>an IP address family</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ip-routes-from-variant.returns"></a><h4>Returns</h4>
<p>a newly allocated
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-uuid-generate"></a><h3>nm_utils_uuid_generate ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_uuid_generate (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="refsect3">
<a name="nm-utils-uuid-generate.returns"></a><h4>Returns</h4>
<p> a newly allocated UUID suitable for use as the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a>
object's <a class="link" href="NMSettingConnection.html#NMSettingConnection--id" title="The “id” property"><span class="type">“id”</span></a>: property.  Should be freed with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-file-is-certificate"></a><h3>nm_utils_file_is_certificate ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_file_is_certificate (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
<p>Tests if <em class="parameter"><code>filename</code></em>
 has a valid extension for an X.509 certificate file
(".cer", ".crt", ".der", or ".pem"), and contains a certificate in a format
recognized by NetworkManager.</p>
<div class="refsect3">
<a name="nm-utils-file-is-certificate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>name of the file to test</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-file-is-certificate.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a certificate, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-file-is-private-key"></a><h3>nm_utils_file_is_private_key ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_file_is_private_key (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_encrypted</code></em>);</pre>
<p>Tests if <em class="parameter"><code>filename</code></em>
 has a valid extension for an X.509 private key file
(".der", ".key", ".pem", or ".p12"), and contains a private key in a format
recognized by NetworkManager.</p>
<div class="refsect3">
<a name="nm-utils-file-is-private-key.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>name of the file to test</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_encrypted</p></td>
<td class="parameter_description"><p>on return, whether the file is encrypted. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-file-is-private-key.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a private key, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-file-is-pkcs12"></a><h3>nm_utils_file_is_pkcs12 ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_file_is_pkcs12 (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
<p>Tests if <em class="parameter"><code>filename</code></em>
 is a PKCS#12 file.</p>
<div class="refsect3">
<a name="nm-utils-file-is-pkcs12.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>name of the file to test</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-file-is-pkcs12.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is PKCS#12, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="NMUtilsFileSearchInPathsPredicate"></a><h3>NMUtilsFileSearchInPathsPredicate ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*NMUtilsFileSearchInPathsPredicate<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="NMUtilsCheckFilePredicate"></a><h3>NMUtilsCheckFilePredicate ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*NMUtilsCheckFilePredicate<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                              <em class="parameter"><code>const <span class="type">struct stat</span> *stat</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-file-search-in-paths"></a><h3>nm_utils_file_search_in_paths ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_file_search_in_paths (<em class="parameter"><code>const <span class="type">char</span> *progname</code></em>,
                               <em class="parameter"><code>const <span class="type">char</span> *try_first</code></em>,
                               <em class="parameter"><code>const <span class="type">char</span> *const *paths</code></em>,
                               <em class="parameter"><code><a href="../glib/glib-File-Utilities.html#GFileTest"><span class="type">GFileTest</span></a> file_test_flags</code></em>,
                               <em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()"><span class="type">NMUtilsFileSearchInPathsPredicate</span></a> predicate</code></em>,
                               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Searches for a <em class="parameter"><code>progname</code></em>
 file in a list of search <em class="parameter"><code>paths</code></em>
.</p>
<div class="refsect3">
<a name="nm-utils-file-search-in-paths.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>progname</p></td>
<td class="parameter_description"><p>the helper program name, like "iptables"
Must be a non-empty string, without path separator (/).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>try_first</p></td>
<td class="parameter_description"><p>a custom path to try first before searching.
It is silently ignored if it is empty or not an absolute path. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>paths</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of search paths.
Can be empty or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case only <em class="parameter"><code>try_first</code></em>
is checked. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>file_test_flags</p></td>
<td class="parameter_description"><p>the flags passed to <a href="../glib/glib-File-Utilities.html#g-file-test"><code class="function">g_file_test()</code></a> when searching
for <em class="parameter"><code>progname</code></em>
. Set it to 0 to skip the <a href="../glib/glib-File-Utilities.html#g-file-test"><code class="function">g_file_test()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>predicate</p></td>
<td class="parameter_description"><p>if given, pass the file name to this function
for additional checks. This check is performed after the check for
<em class="parameter"><code>file_test_flags</code></em>
. You cannot omit both <em class="parameter"><code>file_test_flags</code></em>
and <em class="parameter"><code>predicate</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>(allow-none): user data for <em class="parameter"><code>predicate</code></em>
function. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>on failure, set a "not found" error <a href="../gio/gio-GIOError.html#G-IO-ERROR:CAPS"><code class="literal">G_IO_ERROR</code></a> <a href="../gio/gio-GIOError.html#G-IO-ERROR-NOT-FOUND:CAPS"><code class="literal">G_IO_ERROR_NOT_FOUND</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-file-search-in-paths.returns"></a><h4>Returns</h4>
<p>the full path to the helper, if found, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.
The returned string is not owned by the caller, but later
invocations of the function might overwrite it. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-freq-to-channel"></a><h3>nm_utils_wifi_freq_to_channel ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_wifi_freq_to_channel (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> freq</code></em>);</pre>
<p>Utility function to translate a Wi-Fi frequency to its corresponding channel.</p>
<div class="refsect3">
<a name="nm-utils-wifi-freq-to-channel.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>freq</p></td>
<td class="parameter_description"><p>frequency</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wifi-freq-to-channel.returns"></a><h4>Returns</h4>
<p> the channel represented by the frequency or 0</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-channel-to-freq"></a><h3>nm_utils_wifi_channel_to_freq ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_wifi_channel_to_freq (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>,
                               <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre>
<p>Utility function to translate a Wi-Fi channel to its corresponding frequency.</p>
<div class="refsect3">
<a name="nm-utils-wifi-channel-to-freq.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>channel</p></td>
<td class="parameter_description"><p>channel</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>band</p></td>
<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wifi-channel-to-freq.returns"></a><h4>Returns</h4>
<p> the frequency represented by the channel of the band,
or -1 when the freq is invalid, or 0 when the band
is invalid</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-find-next-channel"></a><h3>nm_utils_wifi_find_next_channel ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
nm_utils_wifi_find_next_channel (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>,
                                 <em class="parameter"><code><span class="type">int</span> direction</code></em>,
                                 <em class="parameter"><code><span class="type">char</span> *band</code></em>);</pre>
<p>Utility function to find out next/previous Wi-Fi channel for a channel.</p>
<div class="refsect3">
<a name="nm-utils-wifi-find-next-channel.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>channel</p></td>
<td class="parameter_description"><p>current channel</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>direction</p></td>
<td class="parameter_description"><p>whether going downward (0 or less) or upward (1 or more)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>band</p></td>
<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wifi-find-next-channel.returns"></a><h4>Returns</h4>
<p> the next channel in the specified direction or 0</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-is-channel-valid"></a><h3>nm_utils_wifi_is_channel_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_wifi_is_channel_valid (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre>
<p>Utility function to verify Wi-Fi channel validity.</p>
<div class="refsect3">
<a name="nm-utils-wifi-is-channel-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>channel</p></td>
<td class="parameter_description"><p>channel</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>band</p></td>
<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wifi-is-channel-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-2ghz-freqs"></a><h3>nm_utils_wifi_2ghz_freqs ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
nm_utils_wifi_2ghz_freqs (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Utility function to return 2.4 GHz Wi-Fi frequencies (802.11bg band).</p>
<div class="refsect3">
<a name="nm-utils-wifi-2ghz-freqs.returns"></a><h4>Returns</h4>
<p> zero-terminated array of frequencies numbers (in MHz)</p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-5ghz-freqs"></a><h3>nm_utils_wifi_5ghz_freqs ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
nm_utils_wifi_5ghz_freqs (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Utility function to return 5 GHz Wi-Fi frequencies (802.11a band).</p>
<div class="refsect3">
<a name="nm-utils-wifi-5ghz-freqs.returns"></a><h4>Returns</h4>
<p> zero-terminated array of frequencies numbers (in MHz)</p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-wifi-strength-bars"></a><h3>nm_utils_wifi_strength_bars ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_wifi_strength_bars (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> strength</code></em>);</pre>
<p>Converts <em class="parameter"><code>strength</code></em>
 into a 4-character-wide graphical representation of
strength suitable for printing to stdout. If the current locale and terminal
support it, this will use unicode graphics characters to represent
"bars". Otherwise it will use 0 to 4 asterisks.</p>
<div class="refsect3">
<a name="nm-utils-wifi-strength-bars.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>strength</p></td>
<td class="parameter_description"><p>the access point strength, from 0 to 100</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-wifi-strength-bars.returns"></a><h4>Returns</h4>
<p> the graphical representation of the access point strength</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-len"></a><h3>nm_utils_hwaddr_len ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>
nm_utils_hwaddr_len (<em class="parameter"><code><span class="type">int</span> type</code></em>);</pre>
<p>Returns the length in octets of a hardware address of type <em class="parameter"><code>type</code></em>
.</p>
<p>It is an error to call this function with any value other than
<code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>.</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-len.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the type of address; either <code class="literal">ARPHRD_ETHER</code> or
<code class="literal">ARPHRD_INFINIBAND</code></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-len.returns"></a><h4>Returns</h4>
<p> the length.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-ntoa"></a><h3>nm_utils_hwaddr_ntoa ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_hwaddr_ntoa (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Converts <em class="parameter"><code>addr</code></em>
 to textual form.</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-ntoa.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>a binary hardware address. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>addr</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-ntoa.returns"></a><h4>Returns</h4>
<p>the textual form of <em class="parameter"><code>addr</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-atoba"></a><h3>nm_utils_hwaddr_atoba ()</h3>
<pre class="programlisting"><a href="../glib/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> *
nm_utils_hwaddr_atoba (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Parses <em class="parameter"><code>asc</code></em>
 and converts it to binary form in a <a href="../glib/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>. See
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a> if you don't want a <a href="../glib/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>.</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-atoba.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>asc</p></td>
<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the expected length in bytes of the result</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-atoba.returns"></a><h4>Returns</h4>
<p>a new <a href="../glib/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em>
couldn't
be parsed. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-aton"></a><h3>nm_utils_hwaddr_aton ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *
nm_utils_hwaddr_aton (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Parses <em class="parameter"><code>asc</code></em>
 and converts it to binary form in <em class="parameter"><code>buffer</code></em>
.
Bytes in <em class="parameter"><code>asc</code></em>
 can be sepatared by colons (:), or hyphens (-), but not mixed.</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-aton.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>asc</p></td>
<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer to store the result into</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the expected length in bytes of the result and
the size of the buffer in bytes.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-aton.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>buffer</code></em>
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em>
couldn't be parsed
or would be shorter or longer than <em class="parameter"><code>length</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-valid"></a><h3>nm_utils_hwaddr_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_hwaddr_valid (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>);</pre>
<p>Parses <em class="parameter"><code>asc</code></em>
 to see if it is a valid hardware address of the given
length.</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>asc</p></td>
<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of address that <em class="parameter"><code>asc</code></em>
is expected to convert to
(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>asc</code></em>
appears to be a valid hardware address
of the indicated length, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-canonical"></a><h3>nm_utils_hwaddr_canonical ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_hwaddr_canonical (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>);</pre>
<p>Parses <em class="parameter"><code>asc</code></em>
 to see if it is a valid hardware address of the given
length, and if so, returns it in canonical form (uppercase, with
leading 0s as needed, and with colons rather than hyphens).</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-canonical.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>asc</p></td>
<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of address that <em class="parameter"><code>asc</code></em>
is expected to convert to
(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-canonical.returns"></a><h4>Returns</h4>
<p>the canonicalized address if <em class="parameter"><code>asc</code></em>
appears to
be a valid hardware address of the indicated length, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hwaddr-matches"></a><h3>nm_utils_hwaddr_matches ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_hwaddr_matches (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr1</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr1_len</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr2</code></em>,
                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr2_len</code></em>);</pre>
<p>Generalized hardware address comparison function. Tests if <em class="parameter"><code>hwaddr1</code></em>
 and
<em class="parameter"><code>hwaddr2</code></em>
 "equal" (or more precisely, "equivalent"), with several advantages
over a simple <code class="function">memcmp()</code>:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p>If <em class="parameter"><code>hwaddr1_len</code></em>
 or <em class="parameter"><code>hwaddr2_len</code></em>
 is -1, then the corresponding address is
 assumed to be ASCII rather than binary, and will be converted to binary
 before being compared.</p></li>
<li class="listitem"><p>If <em class="parameter"><code>hwaddr1</code></em>
 or <em class="parameter"><code>hwaddr2</code></em>
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it is treated instead as though it was
 a zero-filled buffer <em class="parameter"><code>hwaddr1_len</code></em>
 or <em class="parameter"><code>hwaddr2_len</code></em>
 bytes long.</p></li>
<li class="listitem"><p>If <em class="parameter"><code>hwaddr1</code></em>
 and <em class="parameter"><code>hwaddr2</code></em>
 are InfiniBand hardware addresses (that is, if
 they are <code class="literal">INFINIBAND_ALEN</code> bytes long in binary form)
 then only the last 8 bytes are compared, since those are the only bytes
 that actually identify the hardware. (The other 12 bytes will change
 depending on the configuration of the InfiniBand fabric that the device
 is connected to.)</p></li>
</ol></div>
<p>If a passed-in ASCII hardware address cannot be parsed, or would parse to an
address larger than <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>, then it will silently fail to
match. (This means that externally-provided address strings do not need to be
sanity-checked before comparing them against known good addresses; they are
guaranteed to not match if they are invalid.)</p>
<div class="refsect3">
<a name="nm-utils-hwaddr-matches.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>hwaddr1</p></td>
<td class="parameter_description"><p>pointer to a binary or ASCII hardware address, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hwaddr1_len</p></td>
<td class="parameter_description"><p>size of <em class="parameter"><code>hwaddr1</code></em>
, or -1 if <em class="parameter"><code>hwaddr1</code></em>
is ASCII</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hwaddr2</p></td>
<td class="parameter_description"><p>pointer to a binary or ASCII hardware address, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hwaddr2_len</p></td>
<td class="parameter_description"><p>size of <em class="parameter"><code>hwaddr2</code></em>
, or -1 if <em class="parameter"><code>hwaddr2</code></em>
is ASCII</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hwaddr-matches.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>hwaddr1</code></em>
and <em class="parameter"><code>hwaddr2</code></em>
are equivalent, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are
different (or either of them is invalid).</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-bin2hexstr"></a><h3>nm_utils_bin2hexstr ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_bin2hexstr (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                     <em class="parameter"><code><span class="type">int</span> final_len</code></em>);</pre>
<p>Converts the byte array <em class="parameter"><code>src</code></em>
 into a hexadecimal string. If <em class="parameter"><code>final_len</code></em>
 is
greater than -1, the returned string is terminated at that index
(returned_string[final_len] == '\0'),</p>
<div class="refsect3">
<a name="nm-utils-bin2hexstr.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>an array of bytes. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>the length of the <em class="parameter"><code>src</code></em>
array</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>final_len</p></td>
<td class="parameter_description"><p>an index where to cut off the returned string, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-bin2hexstr.returns"></a><h4>Returns</h4>
<p>the textual form of <em class="parameter"><code>bytes</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-hexstr2bin"></a><h3>nm_utils_hexstr2bin ()</h3>
<pre class="programlisting"><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
nm_utils_hexstr2bin (<em class="parameter"><code>const <span class="type">char</span> *hex</code></em>);</pre>
<p>Converts a hexadecimal string <em class="parameter"><code>hex</code></em>
 into an array of bytes.  The optional
separator ':' may be used between single or pairs of hexadecimal characters,
eg "00:11" or "0:1".  Any "0x" at the beginning of <em class="parameter"><code>hex</code></em>
 is ignored.  <em class="parameter"><code>hex</code></em>

may not start or end with ':'.</p>
<div class="refsect3">
<a name="nm-utils-hexstr2bin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>hex</p></td>
<td class="parameter_description"><p>a string of hexadecimal characters with optional ':' separators</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-hexstr2bin.returns"></a><h4>Returns</h4>
<p>the converted bytes, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-iface-valid-name"></a><h3>nm_utils_iface_valid_name ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_iface_valid_name (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<div class="warning">
<p><code class="literal">nm_utils_iface_valid_name</code> has been deprecated since version 1.6 and should not be used in newly-written code.</p>
<p>use <a class="link" href="libnm-nm-utils.html#nm-utils-is-valid-iface-name" title="nm_utils_is_valid_iface_name ()"><code class="function">nm_utils_is_valid_iface_name()</code></a> instead, with better error reporting.</p>
</div>
<p>Validate the network interface name.</p>
<div class="refsect3">
<a name="nm-utils-iface-valid-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Name of interface</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-iface-valid-name.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if interface name is valid, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-is-valid-iface-name"></a><h3>nm_utils_is_valid_iface_name ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_is_valid_iface_name (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Validate the network interface name.</p>
<p>This function is a 1:1 copy of the kernel's interface validation
function in net/core/dev.c.</p>
<div class="refsect3">
<a name="nm-utils-is-valid-iface-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Name of interface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error occurring, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-is-valid-iface-name.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if interface name is valid, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-is-uuid"></a><h3>nm_utils_is_uuid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_is_uuid (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre>
<p>Checks if <em class="parameter"><code>str</code></em>
 is a UUID</p>
<div class="refsect3">
<a name="nm-utils-is-uuid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string that might be a UUID</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-is-uuid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em>
is a UUID, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-inet4-ntop"></a><h3>nm_utils_inet4_ntop ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_inet4_ntop (<em class="parameter"><code><span class="type">in_addr_t</span> inaddr</code></em>,
                     <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre>
<p>Wrapper for inet_ntop.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="nm-utils-inet4-ntop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>inaddr</p></td>
<td class="parameter_description"><p>the address that should be converted to string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst</p></td>
<td class="parameter_description"><p>the destination buffer, it must contain at least
<code class="literal">INET_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a>
characters. If set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will return a pointer to an internal, static
buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>).  Beware, that the internal
buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or
<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em>
buffer. Also,
using the internal buffer is not thread safe. When in doubt, pass your own
<em class="parameter"><code>dst</code></em>
buffer to avoid these issues.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-inet4-ntop.returns"></a><h4>Returns</h4>
<p> the input buffer <em class="parameter"><code>dst</code></em>
, or a pointer to an
internal, static buffer. This function cannot fail.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-inet6-ntop"></a><h3>nm_utils_inet6_ntop ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_inet6_ntop (<em class="parameter"><code>const <span class="type">struct in6_addr</span> *in6addr</code></em>,
                     <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre>
<p>Wrapper for inet_ntop.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="nm-utils-inet6-ntop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in6addr</p></td>
<td class="parameter_description"><p>the address that should be converted to string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst</p></td>
<td class="parameter_description"><p>the destination buffer, it must contain at least
<code class="literal">INET6_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a>
characters. If set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will return a pointer to an internal, static
buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a>).  Beware, that the internal
buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or
<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em>
buffer. Also,
using the internal buffer is not thread safe. When in doubt, pass your own
<em class="parameter"><code>dst</code></em>
buffer to avoid these issues.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-inet6-ntop.returns"></a><h4>Returns</h4>
<p> the input buffer <em class="parameter"><code>dst</code></em>
, or a pointer to an
internal, static buffer. <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is not allowed as <em class="parameter"><code>in6addr</code></em>
,
otherwise, this function cannot fail.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-ipaddr-valid"></a><h3>nm_utils_ipaddr_valid ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_ipaddr_valid (<em class="parameter"><code><span class="type">int</span> family</code></em>,
                       <em class="parameter"><code>const <span class="type">char</span> *ip</code></em>);</pre>
<p>Checks if <em class="parameter"><code>ip</code></em>
 contains a valid IP address of the given family.</p>
<div class="refsect3">
<a name="nm-utils-ipaddr-valid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>family</p></td>
<td class="parameter_description"><p><code class="literal">AF_INET</code> or <code class="literal">AF_INET6</code>, or
<code class="literal">AF_UNSPEC</code> to accept either</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ip</p></td>
<td class="parameter_description"><p>an IP address</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-ipaddr-valid.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-check-virtual-device-compatibility"></a><h3>nm_utils_check_virtual_device_compatibility ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_check_virtual_device_compatibility
                               (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> virtual_type</code></em>,
                                <em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> other_type</code></em>);</pre>
<p>Determines if a connection of type <em class="parameter"><code>virtual_type</code></em>
 can (in the
general case) work with connections of type <em class="parameter"><code>other_type</code></em>
.</p>
<p>If <em class="parameter"><code>virtual_type</code></em>
 is <code class="literal">NM_TYPE_SETTING_VLAN</code>, then this checks if
<em class="parameter"><code>other_type</code></em>
 is a valid type for the parent of a VLAN.</p>
<p>If <em class="parameter"><code>virtual_type</code></em>
 is a "master" type (eg, <code class="literal">NM_TYPE_SETTING_BRIDGE</code>),
then this checks if <em class="parameter"><code>other_type</code></em>
 is a valid type for a slave of that
master.</p>
<p>Note that even if this returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> it is not guaranteed that
<span class="emphasis"><em>every</em></span> connection of type <em class="parameter"><code>other_type</code></em>
 is
compatible with <em class="parameter"><code>virtual_type</code></em>
; it may depend on the exact
configuration of the two connections, or on the capabilities of an
underlying device driver.</p>
<div class="refsect3">
<a name="nm-utils-check-virtual-device-compatibility.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>virtual_type</p></td>
<td class="parameter_description"><p>a virtual connection type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>other_type</p></td>
<td class="parameter_description"><p>a connection type to test against <em class="parameter"><code>virtual_type</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-check-virtual-device-compatibility.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-bond-mode-string-to-int"></a><h3>nm_utils_bond_mode_string_to_int ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
nm_utils_bond_mode_string_to_int (<em class="parameter"><code>const <span class="type">char</span> *mode</code></em>);</pre>
<p>Convert bonding mode from string representation to numeric value.
See https://www.kernel.org/doc/Documentation/networking/bonding.txt for
available modes.
The <em class="parameter"><code>mode</code></em>
 string can be either a descriptive name or a number (as string).</p>
<div class="refsect3">
<a name="nm-utils-bond-mode-string-to-int.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>bonding mode as string</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-bond-mode-string-to-int.returns"></a><h4>Returns</h4>
<p> numeric bond mode, or -1 on error</p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-bond-mode-int-to-string"></a><h3>nm_utils_bond_mode_int_to_string ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
nm_utils_bond_mode_int_to_string (<em class="parameter"><code><span class="type">int</span> mode</code></em>);</pre>
<p>Convert bonding mode from integer value to descriptive name.
See https://www.kernel.org/doc/Documentation/networking/bonding.txt for
available modes.</p>
<div class="refsect3">
<a name="nm-utils-bond-mode-int-to-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>bonding mode as a numeric value</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-bond-mode-int-to-string.returns"></a><h4>Returns</h4>
<p> bonding mode string, or NULL on error</p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-enum-to-str"></a><h3>nm_utils_enum_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_enum_to_str (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                      <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
<p>Converts an enum value to its string representation. If the enum is a
<a href="../gobject/gobject-Type-Information.html#G-TYPE-FLAGS:CAPS"><code class="literal">G_TYPE_FLAGS</code></a> the function returns a comma-separated list of matching values.
If the value has no corresponding string representation, it is converted
to a number. For enums it is converted to a decimal number, for flags
to an (unsigned) hex number.</p>
<div class="refsect3">
<a name="nm-utils-enum-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the <a href="../gobject/gobject-Type-Information.html#GType"><code class="literal">GType</code></a> of the enum</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>the value to be translated</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-enum-to-str.returns"></a><h4>Returns</h4>
<p> a newly allocated string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-enum-from-str"></a><h3>nm_utils_enum_from_str ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
nm_utils_enum_from_str (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                        <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                        <em class="parameter"><code><span class="type">int</span> *out_value</code></em>,
                        <em class="parameter"><code><span class="type">char</span> **err_token</code></em>);</pre>
<p>Converts a string to the matching enum value.</p>
<p>If the enum is a <a href="../gobject/gobject-Type-Information.html#G-TYPE-FLAGS:CAPS"><code class="literal">G_TYPE_FLAGS</code></a> the function returns the logical OR of values
matching the comma-separated tokens in the string; if an unknown token is found
the function returns <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and stores a pointer to a newly allocated string
containing the unrecognized token in <em class="parameter"><code>err_token</code></em>
.</p>
<div class="refsect3">
<a name="nm-utils-enum-from-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the <a href="../gobject/gobject-Type-Information.html#GType"><code class="literal">GType</code></a> of the enum</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the input string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_value</p></td>
<td class="parameter_description"><p>the output value. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>err_token</p></td>
<td class="parameter_description"><p>location to store the first unrecognized token. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-enum-from-str.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the conversion was successful, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-enum-get-values"></a><h3>nm_utils_enum_get_values ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> **
nm_utils_enum_get_values (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> from</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> to</code></em>);</pre>
<p>Returns the list of possible values for a given enum.</p>
<div class="refsect3">
<a name="nm-utils-enum-get-values.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the <a href="../gobject/gobject-Type-Information.html#GType"><code class="literal">GType</code></a> of the enum</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>from</p></td>
<td class="parameter_description"><p>the first element to be returned</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>to</p></td>
<td class="parameter_description"><p>the last element to be returned</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-enum-get-values.returns"></a><h4>Returns</h4>
<p>a NULL-terminated dynamically-allocated array of static strings
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-version"></a><h3>nm_utils_version ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
nm_utils_version (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="refsect3">
<a name="nm-utils-version.returns"></a><h4>Returns</h4>
<p> the version ID of the libnm version. That is, the <code class="literal">NM_VERSION</code>
at runtime.</p>
</div>
<p class="since">Since: 1.6.0</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-parse-variant-attributes"></a><h3>nm_utils_parse_variant_attributes ()</h3>
<pre class="programlisting"><a href="../glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
nm_utils_parse_variant_attributes (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                                   <em class="parameter"><code><span class="type">char</span> attr_separator</code></em>,
                                   <em class="parameter"><code><span class="type">char</span> key_value_separator</code></em>,
                                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_unknown</code></em>,
                                   <em class="parameter"><code>const <a class="link" href="libnm-nm-utils.html#NMVariantAttributeSpec" title="NMVariantAttributeSpec"><span class="type">NMVariantAttributeSpec</span></a> *const *spec</code></em>,
                                   <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parse attributes from a string.</p>
<div class="refsect3">
<a name="nm-utils-parse-variant-attributes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>the input string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attr_separator</p></td>
<td class="parameter_description"><p>the attribute separator character</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key_value_separator</p></td>
<td class="parameter_description"><p>character separating key and values</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ignore_unknown</p></td>
<td class="parameter_description"><p>whether unknown attributes should be ignored</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>spec</p></td>
<td class="parameter_description"><p>the attribute format specifiers</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error on failure. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-parse-variant-attributes.returns"></a><h4>Returns</h4>
<p>a <a href="../glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> mapping attribute names to <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> values. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-format-variant-attributes"></a><h3>nm_utils_format_variant_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_format_variant_attributes (<em class="parameter"><code><a href="../glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *attributes</code></em>,
                                    <em class="parameter"><code><span class="type">char</span> attr_separator</code></em>,
                                    <em class="parameter"><code><span class="type">char</span> key_value_separator</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-qdisc-from-str"></a><h3>nm_utils_tc_qdisc_from_str ()</h3>
<pre class="programlisting"><span class="returnvalue">NMTCQdisc</span> *
nm_utils_tc_qdisc_from_str (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parces the tc style string qdisc representation of the queueing
discipline to a <code class="literal">NMTCQdisc</code> instance. Supports a subset of the tc language.</p>
<div class="refsect3">
<a name="nm-utils-tc-qdisc-from-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the string representation of a qdisc</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-qdisc-from-str.returns"></a><h4>Returns</h4>
<p> the <code class="literal">NMTCQdisc</code> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-qdisc-to-str"></a><h3>nm_utils_tc_qdisc_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_tc_qdisc_to_str (<em class="parameter"><code><span class="type">NMTCQdisc</span> *qdisc</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Turns the <code class="literal">NMTCQdisc</code> into a tc style string representation of the queueing
discipline.</p>
<div class="refsect3">
<a name="nm-utils-tc-qdisc-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>qdisc</p></td>
<td class="parameter_description"><p>the <code class="literal">NMTCQdisc</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-qdisc-to-str.returns"></a><h4>Returns</h4>
<p> formatted string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-action-from-str"></a><h3>nm_utils_tc_action_from_str ()</h3>
<pre class="programlisting"><span class="returnvalue">NMTCAction</span> *
nm_utils_tc_action_from_str (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                             <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parces the tc style string action representation of the queueing
discipline to a <code class="literal">NMTCAction</code> instance. Supports a subset of the tc language.</p>
<div class="refsect3">
<a name="nm-utils-tc-action-from-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the string representation of a action</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-action-from-str.returns"></a><h4>Returns</h4>
<p> the <code class="literal">NMTCAction</code> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-action-to-str"></a><h3>nm_utils_tc_action_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_tc_action_to_str (<em class="parameter"><code><span class="type">NMTCAction</span> *action</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Turns the <code class="literal">NMTCAction</code> into a tc style string representation of the queueing
discipline.</p>
<div class="refsect3">
<a name="nm-utils-tc-action-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>the <code class="literal">NMTCAction</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-action-to-str.returns"></a><h4>Returns</h4>
<p> formatted string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-tfilter-from-str"></a><h3>nm_utils_tc_tfilter_from_str ()</h3>
<pre class="programlisting"><span class="returnvalue">NMTCTfilter</span> *
nm_utils_tc_tfilter_from_str (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parces the tc style string tfilter representation of the queueing
discipline to a <code class="literal">NMTCTfilter</code> instance. Supports a subset of the tc language.</p>
<div class="refsect3">
<a name="nm-utils-tc-tfilter-from-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the string representation of a tfilter</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-tfilter-from-str.returns"></a><h4>Returns</h4>
<p> the <code class="literal">NMTCTfilter</code> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
<hr>
<div class="refsect2">
<a name="nm-utils-tc-tfilter-to-str"></a><h3>nm_utils_tc_tfilter_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
nm_utils_tc_tfilter_to_str (<em class="parameter"><code><span class="type">NMTCTfilter</span> *tfilter</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Turns the <code class="literal">NMTCTfilter</code> into a tc style string representation of the queueing
discipline.</p>
<div class="refsect3">
<a name="nm-utils-tc-tfilter-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>tfilter</p></td>
<td class="parameter_description"><p>the <code class="literal">NMTCTfilter</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location of the error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nm-utils-tc-tfilter-to-str.returns"></a><h4>Returns</h4>
<p> formatted string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: 1.10.2</p>
</div>
</div>
<div class="refsect1">
<a name="libnm-nm-utils.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="NMUtilsSecurityType"></a><h3>enum NMUtilsSecurityType</h3>
<p>Describes generic security mechanisms that 802.11 access points may offer.
Used with <a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()"><code class="function">nm_utils_security_valid()</code></a> for checking whether a given access
point is compatible with a network device.</p>
<div class="refsect3">
<a name="NMUtilsSecurityType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-INVALID:CAPS"></a>NMU_SEC_INVALID</p></td>
<td class="enum_member_description">
<p>unknown or invalid security, placeholder and not used</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-NONE:CAPS"></a>NMU_SEC_NONE</p></td>
<td class="enum_member_description">
<p>unencrypted and open</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-STATIC-WEP:CAPS"></a>NMU_SEC_STATIC_WEP</p></td>
<td class="enum_member_description">
<p>static WEP keys are used for encryption</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-LEAP:CAPS"></a>NMU_SEC_LEAP</p></td>
<td class="enum_member_description">
<p>Cisco LEAP is used for authentication and for generating the
dynamic WEP keys automatically</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-DYNAMIC-WEP:CAPS"></a>NMU_SEC_DYNAMIC_WEP</p></td>
<td class="enum_member_description">
<p>standard 802.1x is used for authentication and
generating the dynamic WEP keys automatically</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-WPA-PSK:CAPS"></a>NMU_SEC_WPA_PSK</p></td>
<td class="enum_member_description">
<p>WPA1 is used with Pre-Shared Keys (PSK)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-WPA-ENTERPRISE:CAPS"></a>NMU_SEC_WPA_ENTERPRISE</p></td>
<td class="enum_member_description">
<p>WPA1 is used with 802.1x authentication</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-WPA2-PSK:CAPS"></a>NMU_SEC_WPA2_PSK</p></td>
<td class="enum_member_description">
<p>WPA2/RSN is used with Pre-Shared Keys (PSK)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="NMU-SEC-WPA2-ENTERPRISE:CAPS"></a>NMU_SEC_WPA2_ENTERPRISE</p></td>
<td class="enum_member_description">
<p>WPA2 is used with 802.1x authentication</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="NM-UTILS-HWADDR-LEN-MAX:CAPS"></a><h3>NM_UTILS_HWADDR_LEN_MAX</h3>
<pre class="programlisting">#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */
</pre>
<p>The maximum length of hardware addresses handled by NetworkManager itself,
<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()"><code class="function">nm_utils_hwaddr_len()</code></a>, and <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="NM-UTILS-INET-ADDRSTRLEN:CAPS"></a><h3>NM_UTILS_INET_ADDRSTRLEN</h3>
<pre class="programlisting">#define NM_UTILS_INET_ADDRSTRLEN     INET6_ADDRSTRLEN
</pre>
<p>Defines the minimal length for a char buffer that is suitable as <em class="parameter"><code>dst</code></em>
 argument
for both <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> and <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="NMVariantAttributeSpec"></a><h3>NMVariantAttributeSpec</h3>
<pre class="programlisting">typedef struct _NMVariantAttributeSpec NMVariantAttributeSpec;</pre>
</div>
<hr>
<div class="refsect2">
<a name="stat"></a><h3>struct stat</h3>
<pre class="programlisting">struct stat;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>