File: ipsec-whack.8.xml

package info (click to toggle)
libreswan 5.2-2.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 81,656 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (3495 lines) | stat: -rw-r--r-- 110,612 bytes parent folder | download | duplicates (2)
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
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
                   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<refentry id="whack8">
  <refmeta>
    <refentrytitle>IPSEC-WHACK</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="date">29 June 2014</refmiscinfo>
    <refmiscinfo class="source">Libreswan</refmiscinfo>
    <refmiscinfo class="version">@@IPSECVERSION@@</refmiscinfo>
    <refmiscinfo class="manual">Executable programs</refmiscinfo>
  </refmeta>

  <refnamediv id="name">
    <refname>ipsec-whack</refname>
    <refpurpose>ipsec whack : IPsec IKE keying daemon low-level control interface</refpurpose>
  </refnamediv>

  <!-- body begins here -->
  <refsynopsisdiv id="synopsis">

    <cmdsynopsis>
      <command>ipsec whack</command>
      <arg choice="opt">--help</arg>
      <arg choice="opt">--version</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--name <replaceable>connection-name</replaceable></arg>

      <group choice="opt">
        <arg choice="opt">--ipv4</arg>
        <arg choice="opt">--ipv6</arg>
      </group>

      <group choice="opt">
        <arg choice="opt">--tunnelipv4</arg>
        <arg choice="opt">--tunnelipv6</arg>
      </group>

      <sbr />

      <arg choice="opt">--id <replaceable>identity</replaceable></arg>
      <arg choice="opt">--host <replaceable>ip-address</replaceable></arg>
      <arg choice="opt">--cert <replaceable>friendly_name</replaceable></arg>
      <arg choice="opt">--ckaid <replaceable>CKAID</replaceable></arg>
      <arg choice="opt">--ca <replaceable>distinguished name</replaceable></arg>

      <arg choice="opt">--groups <replaceable>access control groups</replaceable></arg>

      <arg choice="opt">--sendcert
      <group choice="plain">
	<arg choice="plain">yes</arg>
        <arg choice="plain">forced</arg>
        <arg choice="plain">always</arg>
        <arg choice="plain">ifasked</arg>
	<arg choice="plain">no</arg>
        <arg choice="plain">never</arg>
      </group>
      </arg>

      <arg choice="opt">--sendca
      <group choice="plain">
        <arg choice="plain">none</arg>
        <arg choice="plain">issuer</arg>
        <arg choice="plain">all</arg>
      </group>
      </arg>

      <arg choice="opt">--certtype <replaceable>number</replaceable></arg>
      <arg choice="opt">--ikeport <replaceable>portnumber</replaceable></arg>
      <arg choice="opt">--nexthop <replaceable>ip-address</replaceable></arg>

      <group choice="opt">
        <arg choice="opt">--client <replaceable>subnet</replaceable></arg>
        <arg choice="opt">--subnet <replaceable>subnet</replaceable></arg>
      </group>

      <arg choice="opt">--clientprotoport <replaceable>protocol</replaceable>/<replaceable>port</replaceable></arg>

      <arg choice="opt">--fragmentation
      <group choice="plain">
	<arg choice="plain">yes</arg>
	<arg choice="plain">no</arg>
	<arg choice="plain">force</arg>
      </group>
      </arg>

      <arg choice="opt">--narrowing
      <group choice="plain">
	<arg choice="plain">yes</arg>
	<arg choice="plain">no</arg>
      </group>
      </arg>

      <arg choice="opt">--sourceip <replaceable>ip-address</replaceable></arg>
      <arg choice="opt">--interface-ip <replaceable>ip-address/mask</replaceable></arg>

      <arg choice="opt">--xauthserver</arg>

      <arg choice="opt">--xauthclient</arg>

      <arg choice="opt">--modecfgserver</arg>

      <arg choice="opt">--modecfgclient</arg>

      <arg choice="opt">--modecfgdns <replaceable>ip-address, ip-address, ...</replaceable></arg>

      <arg choice="opt">--modecfgdomains <replaceable>DNS-domain, DNS-domain, ...</replaceable></arg>
      <arg choice="opt">--modecfgbanner <replaceable>login-banner</replaceable></arg>

      <arg choice="opt">--dnskeyondemand</arg>

      <arg choice="opt">--updown <replaceable>updown</replaceable></arg>

      <sbr />

      <arg choice="plain">--to</arg>

      <sbr />

      <arg choice="opt">--id <replaceable>identity</replaceable></arg>

      <arg choice="opt">--host <replaceable>ip-address</replaceable></arg>

      <arg choice="opt">--cert <replaceable>friendly_name</replaceable></arg>

      <arg choice="opt">--ckaid <replaceable>CKAID</replaceable></arg>

      <arg choice="opt">--ca <replaceable>distinguished
      name</replaceable></arg>

      <arg choice="opt">--groups <replaceable>access control
      groups</replaceable></arg>

      <arg choice="opt">--sendcert <group choice="plain">
          <arg choice="plain">yes</arg>

          <arg choice="plain">always</arg>

          <arg choice="plain">ifasked</arg>

          <arg choice="plain">no</arg>

          <arg choice="plain">never</arg>
        </group></arg>

      <arg choice="opt">--certtype <replaceable>number</replaceable></arg>

      <arg choice="opt">--ikeport <replaceable>port-number</replaceable></arg>

      <arg choice="opt">--nexthop <replaceable>ip-address</replaceable></arg>

      <arg choice="opt">--subnet <replaceable>subnet</replaceable></arg>
      <arg choice="opt">--client <replaceable>subnet</replaceable></arg>

      <arg choice="opt">--clientprotoport
      <replaceable>protocol</replaceable>/<replaceable>port</replaceable></arg>

      <arg choice="opt">--sourceip <replaceable>ip-address</replaceable></arg>
      <arg choice="opt">--interface-ip <replaceable>ip-address/mask</replaceable></arg>

      <arg choice="opt">--xauthserver</arg>

      <arg choice="opt">--xauthclient</arg>

      <arg choice="opt">--modecfgserver</arg>

      <arg choice="opt">--modecfgclient</arg>

      <arg choice="opt">--modecfgdns <replaceable>ip-address, ip-address, ...</replaceable></arg>

      <arg choice="opt">--modecfgdomains <replaceable>DNS-domain, DNS-domain, ...</replaceable></arg>

      <arg choice="opt">--dnskeyondemand</arg>

      <arg choice="opt">--updown <replaceable>updown</replaceable></arg>

      <sbr />

      <sbr />

      <arg choice="opt">--tunnel</arg>

      <arg choice="opt">--psk</arg>

      <arg choice="opt">--rsasig</arg>

      <arg choice="opt">--encapsulation
      <group choice="plain">
        <arg choice="opt">yes</arg>
        <arg choice="opt">no</arg>
        <arg choice="opt">auto</arg>
      </group>
      </arg>

      <arg choice="opt">--encrypt</arg>

      <arg choice="opt">--authenticate</arg>

      <arg choice="opt">--compress</arg>

      <arg choice="opt">--pfs</arg>

      <arg choice="opt">--pfsgroup <group choice="plain">
          <arg choice="opt">modp1024</arg>

          <arg choice="opt">modp1536</arg>

          <arg choice="opt">modp2048</arg>

          <arg choice="opt">modp3072</arg>

          <arg choice="opt">modp4096</arg>

          <arg choice="opt">modp6144</arg>

          <arg choice="opt">modp8192</arg>

          <arg choice="opt">dh22</arg>

          <arg choice="opt">dh23</arg>

          <arg choice="opt">dh24</arg>
        </group></arg>

      <arg choice="opt">--ikelifetime <replaceable>seconds</replaceable></arg>

      <arg choice="opt">--ipseclifetime
      <replaceable>seconds</replaceable></arg>

      <arg choice="opt">--rekeymargin <replaceable>seconds</replaceable></arg>

      <arg choice="opt">--rekeyfuzz
      <replaceable>percentage</replaceable></arg>

      <arg choice="opt">--esp <replaceable>esp-algos</replaceable></arg>

      <arg choice="opt">--dontrekey</arg>

      <arg choice="opt">--aggrmode</arg>

      <arg choice="opt">--modecfgpull</arg>

      <arg choice="opt">--metric <replaceable>metric</replaceable></arg>

      <arg choice="opt">--nflog-group <replaceable>nflognum</replaceable></arg>

      <arg choice="opt">--conn-mark <replaceable>mark/mask</replaceable></arg>

      <group choice="opt">
        <arg choice="opt">--dpddelay <replaceable>seconds</replaceable></arg>

        <arg choice="opt">--dpdtimeout
        <replaceable>seconds</replaceable></arg>
      </group>

      <arg choice="opt">--no-keep-alive</arg>

      <arg choice="opt"><group choice="plain">
          <arg choice="opt">--initiateontraffic</arg>

          <arg choice="opt">--pass</arg>

          <arg choice="opt">--drop</arg>

          <arg choice="opt">--reject</arg>
        </group></arg>

      <arg choice="opt"><group choice="plain">
          <arg choice="opt">--failnone</arg>

          <arg choice="opt">--failpass</arg>

          <arg choice="opt">--faildrop</arg>

          <arg choice="opt">--failreject</arg>
        </group></arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--keyid <replaceable>id</replaceable></arg>

      <arg choice="opt">--addkey</arg>

      <arg choice="opt">--pubkeyrsa <replaceable>key</replaceable></arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <group choice="plain">
        <arg choice="plain">--listen</arg>
        <arg choice="plain">--unlisten</arg>
      </group>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <group choice="plain">
        <arg choice="plain">--ddos-auto</arg>
        <arg choice="plain">--ddos-busy</arg>
        <arg choice="plain">--ddos-unlimited</arg>
      </group>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <group choice="plain">
        <arg choice="plain">--route</arg>

        <arg choice="plain">--unroute</arg>
      </group>

      <arg choice="plain">--name <replaceable>connection-name</replaceable></arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>
      <arg choice="plain">--initiate</arg>
      <arg choice="plain">--name <replaceable>connection</replaceable></arg>
      <arg choice="opt">--remote-host <replaceable>ip-address</replaceable></arg>
      <arg choice="opt">--xauthuser <replaceable>user</replaceable></arg>
      <arg choice="opt">--xauthpass <replaceable>pass</replaceable></arg>
      <arg choice="opt">--asynchronous</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>
      <arg choice="plain">--down</arg>
      <arg choice="plain">--name <replaceable>connection</replaceable></arg>
      <arg choice="opt">--asynchronous</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>
      <group choice='req'>
        <arg choice="plain">--rekey-ike</arg>
        <arg choice="plain">--rekey-child</arg>
        <arg choice="plain">--delete-ike</arg>
        <arg choice="plain">--delete-child</arg>
        <arg choice="plain">--down-ike</arg>
        <arg choice="plain">--down-child</arg>
      </group>
      <arg choice="plain">--name <replaceable>connection</replaceable></arg>
      <arg choice="opt">--asynchronous</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--global-redirect
      <replaceable>yes|no|auto</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--global-redirect-to
      <replaceable>ip-address(es)</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="opt">
	--name
	<replaceable>connection-name</replaceable>
      </arg>

      <arg choice="plain">--redirect-to
      <replaceable>ip-address(es)</replaceable></arg>

    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <group choice="opt">
        <arg choice="opt">--tunnelipv4</arg>

        <arg choice="opt">--tunnelipv6</arg>
      </group>

      <arg choice="plain">--oppohere
      <replaceable>ip-address</replaceable></arg>

      <arg choice="plain">--oppothere
      <replaceable>ip-address</replaceable></arg>

      <arg choice="plain">--opposport
      <replaceable>port</replaceable></arg>

      <arg choice="plain">--oppodport
      <replaceable>port</replaceable></arg>

      <arg choice="plain">--oppoproto
      <replaceable>protocol</replaceable></arg>

    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--crash</arg>

      <arg choice="opt">ipaddress</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--name
      <replaceable>connection-name</replaceable></arg>

      <arg choice="plain">--delete</arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--deletestate
      <replaceable>state-number</replaceable></arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--deleteuser</arg>
      <arg choice="plain">--name
      <replaceable>username</replaceable></arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="opt">
	--name
	<replaceable>connection-name</replaceable>
      </arg>

      <group choice="plain">
	<arg choice="req">
	  --debug
	  <group choice="plain">
	    <arg choice="plain">help</arg>
	    <arg choice="plain">none</arg>
	    <arg choice="plain">base</arg>
	    <arg choice="plain">cpu-usage</arg>
	    <arg choice="plain"><replaceable>class</replaceable></arg>
	  </group>
	</arg>
	<arg choice="req">
	  --no-debug <replaceable>class</replaceable>
	</arg>
	<arg choice="req">
	  --impair
	  <group choice="plain">
	    <arg choice="plain">help</arg>
	    <arg choice="plain">none</arg>
	    <!-- <arg choice="plain">list|show?</arg> -->
	    <arg choice="plain"><replaceable>behaviour</replaceable></arg>
	  </group>
	</arg>
	<arg choice="req">
	  --no-impair <replaceable>behaviour</replaceable>
	</arg>
      </group>

    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="opt">--utc</arg>

      <arg choice="opt">--listall</arg>

      <arg choice="opt">--listpubkeys</arg>

      <arg choice="opt">--listcerts</arg>

      <arg choice="opt">--listcacerts</arg>

      <arg choice="opt">--listcrls</arg>

    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="opt">--utc</arg>

      <arg choice="opt">--rereadsecrets</arg>
      <arg choice="opt">--fetchcrls</arg>
      <arg choice="opt">--rereadall</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--ddns</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--listevents</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--purgeocsp</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--status</arg>
      <arg choice="plain">--addresspoolstatus</arg>
      <arg choice="plain">--briefstatus</arg>
      <arg choice="plain">--connectionstatus</arg>
      <arg choice="plain">--fipsstatus</arg>
      <arg choice="plain">--processstatus</arg>
      <arg choice="plain">--shuntstatus</arg>
      <arg choice="plain">--trafficstatus</arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--globalstatus</arg>
      <arg choice="plain">--clearstats</arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="opt">--ike-socket-bufsize <replaceable>bufsize</replaceable></arg>
      <arg choice="opt">--ike-socket-errqueue-toggle</arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>

      <arg choice="opt">--label <replaceable>string</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>ipsec whack</command>

      <arg choice="plain">--shutdown</arg>

      <arg choice="opt">--rundir <replaceable>path</replaceable></arg>
      <arg choice="opt">--ctlsocket <replaceable>path/file</replaceable></arg>
      <arg choice="opt">--label <replaceable>string</replaceable></arg>
      <arg choice="opt">--leave-state</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="description">

    <title>DESCRIPTION</title>

    <para>
      <command>ipsec whack</command> is an auxiliary
      program to allow requests to be made to a running
      <emphasis>pluto</emphasis>. <command>whack</command>
      uses a UNIX domain socket to speak to <emphasis>pluto</emphasis>
      (by default, <filename>@@RUNDIR@@/pluto.ctl</filename>).
    </para>

    <para>
      <command>whack</command> has an intricate argument
      syntax. This syntax allows many different functions to be
      specified. The help form shows the usage or version
      information. The connection form gives <emphasis>pluto</emphasis>
      a description of a potential connection. The public key form informs
      <emphasis>pluto</emphasis> of the RSA public key for a potential
      peer.  The delete form deletes a connection description and all
      SAs corresponding to it. The listen form tells <emphasis>pluto</emphasis>
      to start or stop listening on the
      public interfaces for IKE requests from peers. The route form
      tells <command>pluto</command> to set up routing for
      a connection; the unroute form undoes this. The initiate form
      tells <command>pluto</command> to negotiate an SA
      corresponding to a connection. The terminate form tells
      <command>pluto</command> to remove all SAs
      corresponding to a connection, including those being
      negotiated. The status form displays the <emphasis>pluto</emphasis>'s
      internal state. The debug form tells <command>pluto</command> to change
      the selection of debugging output "on the fly". The shutdown form
      tells <command>pluto</command> to shut down,
      deleting all SAs.
    </para>

    <para>
      The crash option asks pluto to consider a particularly target IP
      to have crashed, and to attempt to restart all connections with
      that IP address as a gateway. In general, you should use Dead
      Peer Detection to detect this kind of situation automatically,
      but this is not always possible.
    </para>

    <para>
      Most options are specific to one of the forms, and will be
      described with that form. There are three options that apply to
      all forms.
    </para>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--ctlsocket <filename><replaceable>@@RUNDIR@@/pluto.ctl</replaceable></filename></option>
	</term>
        <listitem>
          <para>
	    <emphasis>file</emphasis> is used as the UNIX
	    domain socket for talking to <emphasis>pluto</emphasis>.
	    Use either this option or <option>--rundir</option>, but not both.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--rundir <filename><replaceable>path</replaceable></filename></option>
	</term>
        <listitem>
          <para>
	    <emphasis>path</emphasis> where the UNIX
	    domain socket for talking to the <emphasis>pluto</emphasis>,
	    the <emphasis>pluto.pid</emphasis> file and the
	    <emphasis>pluto.ctl</emphasis> files are found.  Use
	    either this option or <emphasis>--ctlsocket</emphasis>,
	    but not both.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--label <replaceable>string</replaceable></option>
	</term>
        <listitem>
          <para>
	    Adds the string to all error messages generated by
	    <command>whack</command>.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The help form of <command>whack</command> is
      self-explanatory.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--help</option>
	</term>
        <listitem>
          <para>
	    Display the usage message.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--version</option>
	</term>
        <listitem>
          <para>
	    Display the version of <emphasis>whack</emphasis>.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The connection form describes a potential connection to
      <command>pluto</command>. <emphasis>pluto</emphasis>
      needs to know what connections can
      and should be negotiated. When <emphasis>pluto</emphasis>
      is the initiator, it needs to know
      what to propose. When <command>pluto</command> is
      the responder, it needs to know enough to decide whether is is
      willing to set up the proposed connection.
    </para>

    <para>
      The description of a potential connection can specify a large
      number of details. Each connection has a unique name. This name
      will appear in a updown shell command, so it should not contain
      punctuation that would make the command ill-formed.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--name <replaceable>connection-name</replaceable></option>
	</term>
        <listitem>
          <para>
	    Sets the name of the connection.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The topology of a connection is symmetric, so to save space
      here is half a picture:
    </para>

    <para>&nbsp;&nbsp;&nbsp;client_subnet&lt;--&gt;host:ikeport&lt;--&gt;nexthop&lt;---</para>

    <para>
      A similar trick is used in the flags. The same flag names are
      used for both ends. Those before the <option>--to</option> flag
      describe the left side and those afterwards describe the right
      side. When <command>pluto</command> attempts to use
      the connection, it decides whether it is the left side or the
      right side of the connection, based on the IP numbers of its
      interfaces.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--id <replaceable>id</replaceable></option>
	</term>
        <listitem>
          <para>
	    The identity of the end. Currently, this can be an IP
	    address (specified as dotted quad or as a Fully Qualified
	    Domain Name, which will be resolved immediately) or as a
	    Fully Qualified Domain Name itself (prefixed by "@" to
	    signify that it should not be resolved), or as user@FQDN,
	    or an X.509 DN.  <command>pluto</command> only
	    authenticates the identity, and does not use it for
	    addressing, so, for example, an IP address need not be the
	    one to which packets are to be sent. If the option is
	    absent, the identity defaults to the IP address specified
	    by <option>--host</option>.
	  </para>
          <!-- The identity is transmitted in the IKE protocol, and
               is what is authenticated. -->
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--host <replaceable>ip-address</replaceable></option>
	</term>
        <term>
	  <option>--host <replaceable>%any</replaceable></option>
	</term>
        <term>
	  <option>--host <replaceable>%opportunistic</replaceable></option>
	</term>
        <listitem>
          <para>
	    The IP address of the end (generally the public
	    interface).  If <command>pluto</command> is to
	    act as a responder for IKE negotiations initiated from
	    unknown IP addresses (the "Road Warrior" case), the IP
	    address should be specified as <emphasis>%any</emphasis>
	    (currently, the obsolete notation <literal>0.0.0.0</literal>
	    is also accepted for this). If <command>pluto</command> is to
	    opportunistically initiate the connection, use
	    <emphasis>%opportunistic</emphasis>
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--cert <replaceable>friendly_name</replaceable></option>
	</term>
        <listitem>
          <para>
	    The friendly_name (or nickname) of the X.509 certificate
	    that was used when imported the certificate into the NSS
	    database. See <citerefentry>
	    <refentrytitle>ipsec.conf</refentrytitle>
	    <manvolnum>5</manvolnum> </citerefentry> on how to
	    extract this from the PKCS#12 file.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ckaid <replaceable>CKAID</replaceable></option>
	</term>
        <listitem>
	  <para>
	    The CKAID of the X.509 certificate or host key.
	  </para>
	  <para>
	    For X.509 certificates, the CKAID is either the
	    certificate's SubjectKeyIdentifier or the public key's
	    SHA1 fingerprint (when the SubjectKeyIdentifier isn't
	    specified).  For host keys the CKAID is the SHA1
	    fingerprint of the public key.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ca <replaceable>distinguished name</replaceable></option>
	</term>
        <listitem>
          <para>
	    The X.509 Certificate Authority's Distinguished Name (DN)
	    used as trust anchor for this connection. This is the CA
	    certificate that signed the host certificate, as well as
	    the certificate of the incoming client.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--groups <replaceable>access control groups</replaceable></option>
	</term>
        <listitem>
          <para>
	    The access control groups used.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--sendcert</option> <emphasis>yes|forced|always|ifasked|no|never</emphasis>
	</term>
        <listitem>
          <para>
	    Whether or not to send our X.509 certificate credentials.
	    This could potentially give an attacker too much
	    information about which identities are allowed to connect
	    to this host. The default is to use <emphasis>ifasked</emphasis>
	    when we are a Responder, and
	    to use <emphasis>yes</emphasis> (which is the same as
	    <emphasis>forced</emphasis> and <emphasis>always</emphasis>
	    if we are an Initiator. The values <emphasis>no</emphasis>
	    and <emphasis>never</emphasis> are
	    equivalent. NOTE: "forced" does not seem to be actually
	    implemented - do not use it.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--sendca</option> <emphasis>none|issuer|all</emphasis>
	</term>
        <listitem>
	  <para>
	    How much of our available X.509 trust chain to send with
	    the end certificate, excluding any root CAs. Specifying
	    <emphasis>issuer</emphasis> sends just the
	    issuing intermediate CA, while <emphasis>
	    all</emphasis> will send the entire chain of intermediate
	    CAs.<emphasis>none</emphasis> will not send any
	    CA certs. The default is <emphasis>none</emphasis>
	    which maintains the current libreswan behavior.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--certtype <replaceable>number</replaceable></option>
	</term>
        <listitem>
          <para>
	    The X.509 certificate type number.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ikeport <replaceable>port-number</replaceable></option>
	</term>
        <listitem>
          <para>
	    The UDP port that IKE listens to on that host. The default
	    is 500. (<command>pluto</command> on this
	    machine uses the port specified by its own command line
	    argument, so this only affects where <emphasis>pluto</emphasis>
	    sends messages.)
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--nexthop <replaceable>ip-address</replaceable></option>
	</term>
        <listitem>
          <para>
	    Where to route packets for the peer's client (presumably
	    for the peer too, but it will not be used for this). When
	    <command>pluto</command> installs an IPsec SA,
	    it issues a route command. It uses the nexthop as the
	    gateway. The default is the peer's IP address (this can be
	    explicitly written as <emphasis>%direct</emphasis>;
	    the obsolete notation
	    <literal>0.0.0.0</literal> is accepted). This option is
	    necessary if <command>pluto</command>'s host's
	    interface used for sending packets to the peer is neither
	    point-to-point nor directly connected to the peer.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--subnet <replaceable>subnet</replaceable></option>
	</term>
        <term>
	  <option>--client <replaceable>subnet</replaceable></option>
	</term>
        <listitem>
          <para>
	    The subnet for which the IPsec traffic will be destined.
	    If not specified, the host will be the client.  The subnet
	    can be specified using the general form
	    <replaceable>address</replaceable>/<replaceable>mask</replaceable>.
	    The most convenient form of the
	    <replaceable>mask</replaceable> is a decimal integer,
	    specifying the number of leading one bits in the mask.
	    So, for example, 10.0.0.0/8 would specify the class A
	    network "Net 10".
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--clientprotoport <replaceable>protocol</replaceable>/<replaceable>port</replaceable></option>
	</term>
        <listitem>
          <para>
	    Specify the Port Selectors (filters) to be used on this
	    connection. The general form is
	    <emphasis>protocol</emphasis>/<emphasis>port</emphasis>.
	    This is most commonly used to limit the connection to L2TP
	    traffic only by specifying a value of <emphasis>17/1701</emphasis>
	    for UDP (protocol 17) and port 1701. The notation
	    <emphasis>17/%any</emphasis> can be used to allow all UDP
	    traffic and is needed for L2TP connections with Windows XP
	    machines before Service Pack 2.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--narrowing</option> <emphasis>yes|no|auto</emphasis>
	</term>
        <listitem>
          <para>
	    IKEv2 (RFC5996) Section 2.9 Traffic Selector narrowing
	    options.  See <option>narrowing</option> in <citerefentry>
	    <refentrytitle>ipsec.conf</refentrytitle>
	    <manvolnum>5</manvolnum></citerefentry>.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--sourceip <replaceable>ip-address</replaceable></option>
	</term>
        <listitem>
          <para>
	    The IP address for this host to use when transmitting a
	    packet to the remote IPsec gateway itself.  This option is
	    used to make the gateway itself use its internal IP, which
	    is part of the <option>--client
	    <replaceable>subnet</replaceable></option>.  Otherwise it
	    will use its nearest IP address, which is its public IP
	    address, which is not part of the subnet-subnet IPsec
	    tunnel, and would therefore not get encrypted.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--xauthserver</option>
	</term>
        <listitem>
          <para>
	    This end is an xauthserver. It will lookup the xauth user
	    name and password and verify this before allowing the
	    connection to get established.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--xauthclient</option>
	</term>
        <listitem>
          <para>
	    This end is an xauthclient. To bring this connection up
	    with the <option>--initiate</option> also requires the
	    client to specify <option>--xauthuser
	    <replaceable>username</replaceable></option> and
	    <option>--xauthpass
	    <replaceable>password</replaceable></option>
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--xauthuser</option>
	</term>
        <listitem>
          <para>
	    The username for the xauth authentication.This option is
	    normally passed along by <citerefentry>
	    <refentrytitle>ipsec-up</refentrytitle>
	    <manvolnum>8</manvolnum> </citerefentry> when an xauth
	    connection is started using <command>ipsec up
	    <replaceable>connection</replaceable></command>.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--xauthpass</option>
	</term>
        <listitem>
          <para>
	    The password for the xauth authentication. This option
	    is normally passed along by <citerefentry>
	    <refentrytitle>ipsec-up</refentrytitle>
	    <manvolnum>8</manvolnum> </citerefentry> when an xauth
	    connection is started using <command>ipsec up
	    <replaceable>connection</replaceable></command>.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--modecfgserver</option>
	</term>
        <listitem>
          <para>
	    This end is an Mode Config server.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--modecfgclient</option>
	</term>
        <listitem>
          <para>
	    This end is an Mode Config client.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--modecfgdns</option>
	</term>
        <listitem>
          <para>
	    A comma separated list of DNS server IP's to pass along
	    to connecting clients.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--modecfgdomains</option>
	</term>
        <listitem>
          <para>
	    A comma separated list of internal DNS domains to pass
	    along to connecting clients.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--dnskeyondemand</option>
	</term>
        <listitem>
          <para>
	    Specifies that when an RSA public key is needed to
	    authenticate this host, and it isn't already known, fetch
	    it from DNS.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--updown <filename><replaceable>updown</replaceable></filename></option>
	</term>
        <listitem>
          <para>
	    Specifies an external shell command to be run whenever
	    <command>pluto</command> brings up or down a
	    connection. The script is used to build a shell command,
	    so it may contain positional parameters, but ought not to
	    have punctuation that would cause the resulting command to
	    be ill-formed. The default is <emphasis>ipsec
	    _updown</emphasis>. Pluto passes a dozen environment
	    variables to the script about the connection involved.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--to</option>
	</term>
        <listitem>
          <para>
	    Separates the specification of the left and right ends of
	    the connection. Pluto tries to decide whether it is
	    <emphasis>left</emphasis> or <emphasis>right</emphasis>
	    based on the information provided on both sides of this option.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The potential connection description also specifies
      characteristics of rekeying and security.
    </para>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--psk</option>
	</term>
        <listitem>
          <para>
	    Propose and allow preshared secret authentication for IKE
	    peers. This authentication requires that each side use the
	    same secret. May be combined with
	    <option>--rsasig</option>; at least one must be specified.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--rsasig</option>
	</term>
        <listitem>
          <para>
	    Propose and allow RSA signatures for authentication of IKE
	    peers. This authentication requires that each side have
	    have a private key of its own and know the public key of
	    its peer. May be combined with <option>--psk</option>; at
	    least one must be specified.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--encrypt</option>
	</term>
        <listitem>
          <para>
	    All proposed or accepted IPsec SAs will include non-null
	    ESP. The actual choices of transforms are wired into
	    <command>pluto</command>.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--authenticate</option>
	</term>
        <listitem>
          <para>
	    All proposed IPsec SAs will include AH. All accepted IPsec
	    SAs will include AH or ESP with authentication. The actual
	    choices of transforms are wired into <emphasis>pluto</emphasis>.
	    Note that this has nothing to do with IKE authentication.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--compress</option>
	</term>
        <listitem>
          <para>
	    All proposed IPsec SAs will include IPCOMP
	    (compression).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--tunnel</option>
	</term>
        <listitem>
          <para>
	    The IPsec SA should use tunneling. Implicit if the SA is
	    for clients. Must only be used with
	    <option>--authenticate</option> or
	    <option>--encrypt</option>.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ipv4</option>
	</term>
        <listitem>
          <para>
	    The host addresses will be interpreted as IPv4 addresses.
	    This is the default. Note that for a connection, all host
	    addresses must be of the same Address Family (IPv4 and
	    IPv6 use different Address Families).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ipv6</option>
	</term>
        <listitem>
          <para>
	    The host addresses (including nexthop) will be interpreted
	    as IPv6 addresses. Note that for a connection, all host
	    addresses must be of the same Address Family (IPv4 and
	    IPv6 use different Address Families).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--tunnelipv4</option>
	</term>
        <listitem>
          <para>
	    The client addresses will be interpreted as IPv4
	    addresses.  The default is to match what the host will
	    be. This does not imply <option>--tunnel</option> so the
	    flag can be safely used when no tunnel is actually
	    specified. Note that for a connection, all tunnel
	    addresses must be of the same Address Family.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--tunnelipv6</option>
	</term>
        <listitem>
          <para>
	    The client addresses will be interpreted as IPv6
	    addresses.  The default is to match what the host will
	    be. This does not imply <option>--tunnel</option> so the
	    flag can be safely used when no tunnel is actually
	    specified. Note that for a connection, all tunnel
	    addresses must be of the same Address Family.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--pfs</option>
	</term>
        <listitem>
          <para>
	    There should be Perfect Forward Secrecy - new keying
	    material will be generated for each IPsec SA when running
	    Quick Mode in IKEv1 or Create Child in IKEv2. Without this
	    option, the SAKMP SA keying material is used instead.
	    <command>pluto</command> will propose the same
	    group that was used with the original IKE SA.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--pfsgroup <replaceable>modp-group</replaceable></option>
	</term>
        <listitem>
          <para>
	    Sets the Diffie-Hellman group used. Currently the
	    following values are supported:
	    <emphasis>modp1536</emphasis> (DHgroup 5),
	    <emphasis>modp2048</emphasis> (DHgroup 14),
	    <emphasis>modp3072</emphasis> (DHgroup 15),
	    <emphasis>modp4096</emphasis> (DHgroup 16),
	    <emphasis>modp6144</emphasis> (DHgroup 17), and
	    <emphasis>modp8192</emphasis> (DHgroup 18).
	    It is possible to support the weak and broken
	    <emphasis>modp1024</emphasis> (DHgroup 2), but this
	    requires a manual recompile and is strongly discouraged.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--esp <replaceable>esp-algos</replaceable></option>
	</term>
        <listitem>
          <para>
	    ESP encryption/authentication algorithm to be used for
	    the connection (phase2 aka IPsec SA). The options must
	    be suitable as a value of <citerefentry>
	    <refentrytitle>ipsec-spi</refentrytitle>
	    <manvolnum>8</manvolnum> </citerefentry>.  See
	    <citerefentry> <refentrytitle>ipsec.conf</refentrytitle>
	    <manvolnum>5</manvolnum> </citerefentry> for a detailed
	    description of the algorithm format.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--aggrmode</option>
	</term>
        <listitem>
          <para>
	    This tunnel is using aggressive mode ISAKMP
	    negotiation. The default is main mode. Aggressive mode is
	    less secure than main mode as it reveals your identity to
	    an eavesdropper, but is needed to support road warriors
	    using PSK keys or to interoperate with other buggy
	    implementations insisting on using aggressive mode.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--modecfgpull</option>
	</term>
        <listitem>
          <para>
	    Pull the Mode Config network information from the peer.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--dpddelay <replaceable>seconds</replaceable></option>
	</term>
        <listitem>
          <para>
	    Set the delay (in seconds) between Dead Peer Detection
	    (RFC 3706) keepalives (R_U_THERE, R_U_THERE_ACK) that are
	    sent for this connection (default 30 seconds).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--timeout <replaceable>seconds</replaceable></option>
	</term>
        <listitem>
          <para>
	    Set the length of time (in seconds) we will idle without
	    hearing either an R_U_THERE poll from our peer, or an
	    R_U_THERE_ACK reply. After this period has elapsed with no
	    response and no traffic, we will declare the peer dead,
	    and remove the SA (default 120 seconds).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--encapsulation</option> <emphasis>yes|no|auto</emphasis>
	</term>
        <listitem>
          <para>
	    In some cases, for example when ESP packets are filtered
	    or when a broken IPsec peer does not properly recognise
	    NAT, it can be useful to force RFC-3948 encapsulation
	    using this option. It causes pluto lie and tell the remote
	    peer that RFC-3948 encapsulation (ESP in UDP port 4500
	    packets) is required.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      If none of the <option>--encrypt</option>,
      <option>--authenticate</option>, <option>--compress</option>, or
      <option>--pfs</option> flags is given, the initiating the
      connection will only build an ISAKMP SA. For such a connection,
      client subnets have no meaning and must not be specified.
    </para>

    <para>
      Apart from initiating directly using the
      <option>--initiate</option> option, a tunnel can be loaded with
      a different policy.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--initiateontraffic</option>
	</term>
        <listitem>
          <para>
	    Only initiate the connection when we have traffic to
	    send over the connection.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--pass</option>
	</term>
        <listitem>
          <para>
	    Allow <emphasis>unencrypted</emphasis> traffic
	    to flow until the tunnel is initiated.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--drop</option>
	</term>
        <listitem>
          <para>
	    Drop unencrypted traffic silently.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--reject</option>
	</term>
        <listitem>
          <para>
	    Drop unencrypted traffic silently, but send an ICMP
	    message notifying the other end.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      These options need to be documented:
    </para>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--failnone</option>
	</term>
        <listitem>
          <para>
	    To be documented.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--failpass</option>
	</term>
        <listitem>
          <para>
	    To be documented.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--faildrop</option>
	</term>
        <listitem>
          <para>
	    To be documented.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--failreject</option>
	</term>
        <listitem>
          <para>
	    To be documented.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      <command>pluto</command> supports various X.509
      Certificate related options.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--utc</option>
	</term>
        <listitem>
          <para>
	    Display all times in UTC.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--listall</option>
	</term>
        <listitem>
          <para>
	    Lists all of the X.509 information known to pluto.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--listpubkeys</option>
	</term>
        <listitem>
          <para>
	    List all the public keys that have been successfully
	    loaded.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--listcerts</option>
	</term>
        <listitem>
          <para>
	    List all the X.509 certificates that are currently
	    loaded.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--checkpubkeys</option>
	</term>
        <listitem>
          <para>
	    List all the loaded X.509 certificates that are about to
	    expire or have expired.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--listcacerts</option>
	</term>
        <listitem>
          <para>
	    List all the Certificate Authority X.509 certificates
	    that are currently loaded.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--listcrls</option>
	</term>
        <listitem>
          <para>
	    List all the loaded <emphasis>Certificate
	    Revocation Lists</emphasis> (CRLs).
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      The corresponding options <option>--rereadsecrets</option>,
      <option>--rereadall</option>, and <option>--rereadcrls</option>
      options reread this information from their respective sources,
      and purge all the online obtained information. The option
      <option>--listevents</option> lists all pending events, and the
      <option>--ddns</option> triggers the Dynamic DNS update event
      that is normally scheduled to run once every minute.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--ikelifetime <replaceable>seconds</replaceable></option>
	</term>
        <listitem>
          <para>
	    How long <command>pluto</command> will propose
	    that an ISAKMP SA be allowed to live. The default is 28800
	    (eight hours) and the maximum is 86400 (1 day). This option
	    will not affect what is accepted. <emphasis>pluto</emphasis>
	    will reject proposals that exceed the maximum.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ipseclifetime <replaceable>seconds</replaceable></option>
	</term>
        <listitem>
          <para>
	    How long <command>pluto</command> will propose
	    that an IPsec SA be allowed to live. The default is 28800
	    (eight hours) and the maximum is 86400 (one day). This
	    option will not affect what is accepted. <emphasis>pluto</emphasis>
	    will reject proposals that exceed the maximum.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--rekeymargin <replaceable>seconds</replaceable></option>
	</term>
        <listitem>
          <para>
	    How long before an SA's expiration should <emphasis>pluto</emphasis>
	    try to negotiate a replacement SA. This will only happen if
	    <emphasis>pluto</emphasis> was the initiator. The default
	    is 540 (nine minutes).
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--rekeyfuzz <replaceable>percentage</replaceable></option>
	</term>
        <listitem>
          <para>
	    Maximum size of random component to add to rekeymargin,
	    expressed as a percentage of rekeymargin. <emphasis>pluto</emphasis>
	    will select a delay uniformly distributed within this range.
	    By default, the percentage will be 100. If greater determinism
	    is desired, specify 0. It may be appropriate for the percentage
	    to be much larger than 100.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--dontrekey</option>
	</term>
        <listitem>
          <para>
	    A misnomer. Only rekey a connection if we were the
	    Initiator and there was recent traffic on the existing
	    connection. This applies to Phase 1 and Phase 2. This is
	    currently the only automatic way for a connection to
	    terminate. It may be useful with Road Warrior or
	    Opportunistic connections.  Since SA lifetime
	    negotiation is take-it-or-leave it, a Responder normally
	    uses the shorter of the negotiated or the configured
	    lifetime.  This only works because if the lifetime is
	    shorter than negotiated, the Responder will rekey in time
	    so that everything works. This interacts badly with
	    <option>--dontrekey</option>. In this case, the Responder
	    will end up rekeying to rectify a shortfall in an IPsec SA
	    lifetime; for an ISAKMP SA, the Responder will accept the
	    negotiated lifetime.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--deletestate <replaceable>state-number</replaceable></option>
	</term>
        <listitem>
          <para>
	    The deletestate form deletes the state object with the
	    specified serial number. This is useful for selectively
	    deleting instances of connections.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The route form of the <command>whack</command>
      command tells <command>pluto</command> to set up
      routing for a connection. Although like a traditional route, it
      uses an ipsec device as a virtual interface. Once routing is set
      up, no packets will be sent "in the clear" to the peer's client
      specified in the connection. A TRAP shunt eroute will be
      installed; if outbound traffic is caught, Pluto will initiate
      the connection. An explicit <command>whack</command>
      route is not always needed: if it hasn't been done when an IPsec
      SA is being installed, one will be automatically attempted.
    </para>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--route</option>
	</term>
        <term>
	  <option>--name <replaceable>connection-name</replaceable></option>
	</term>
        <listitem>
          <para>
	    When a routing is attempted for a connection, there must
	    not already be a routing for a different connection with
	    the same subnet but different interface or destination, or
	    if there is, it must not be being used by an IPsec
	    SA. Otherwise the attempt will fail.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--unroute</option>
	</term>
        <term>
	  <option>--name <replaceable>connection-name</replaceable></option>
	</term>
        <listitem>
          <para>
	    The unroute form of the <emphasis>whack</emphasis> command tells
	    <emphasis>pluto</emphasis> to undo a routing.
	    <emphasis>pluto</emphasis> will refuse if an IPsec SA is
	    using the connection. If another connection is sharing the
	    same routing, it will be left in place. Without a routing,
	    packets will be sent without encryption or authentication.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The initiate form tells <command>pluto</command> to
      initiate a negotiation with another <emphasis>pluto</emphasis>
      (or other IKE daemon) according to the named connection.
      Initiation requires a route that <option>--route</option>
      would provide; if none is in place at the time an IPsec SA
      is being installed, <emphasis>pluto</emphasis> attempts to set one up.
    </para>

    <variablelist>
      <varlistentry>
        <term>
	  <option>--initiate</option>
	</term>
        <term>
	  <option>--name <replaceable>connection-name</replaceable></option>
	</term>
        <term>
	  <option>--asynchronous</option>
	</term>
        <listitem>
          <para>
	    The initiate form of the <emphasis>whack</emphasis>
	    command will relay back from <command>pluto</command>
	    status information via the UNIX domain socket
	    (unless --asynchronous is specified).
	    Currently <emphasis>whack</emphasis> simply copies this to
	    stderr. When the request is finished (eg. the SAs are
	    established or <command>pluto</command> gives
	    up), <command>pluto</command> closes the
	    channel, causing <command>whack</command> to
	    terminate.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      The opportunistic initiate form is mainly used for debugging.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--tunnelipv4</option>
	</term>
        <term>
	  <option>--tunnelipv6</option>
	</term>
        <term>
	  <option>--oppohere <replaceable>ip-address</replaceable></option>
	</term>
        <term>
	  <option>--oppothere <replaceable>ip-address</replaceable></option>
	</term>
        <term>
	  <option>--opposport <replaceable>port</replaceable></option>
	</term>
        <term>
	  <option>--oppodport <replaceable>port</replaceable></option>
	</term>
        <term>
	  <option>--oppoproto <replaceable>protocol</replaceable></option>
	</term>
        <listitem>
          <para>
	    This will cause <command>pluto</command> to
	    attempt to opportunistically initiate a connection from
	    here to the there, even if a previous attempt had been
	    made. The whack log will show the progress of this
	    attempt.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      Rekeying a connection
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--rekey-ike</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <term>
	  <option>--rekey-child</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <listitem>
          <para>
	    Initiate a rekey of the connection's established IKE or
	    Child SA.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--delete-ike</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <term>
	  <option>--delete-child</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <term>
	  <option>--down-ike</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <term>
	  <option>--down-child</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <listitem>
          <para>
	    Initiate a delete of the connection's established IKE or
	    Child SA.  For <option>--down-ike</option> and
	    <option>--down-child</option> first clear connection's UP
	    policy.
	    <itemizedlist>
	      <listitem>
		<para>
		  deleting an IKE SA implicitly deletes all the IKE
		  SA's children (IKEv2)
		</para>
	      </listitem>
	      <listitem>
		<para>
		  any affected connection with policy UP will try to
		  revive (for <option>--down-ike</option> and
		  <option>--down-child</option>, since the
		  connection's UP policy was cleared, will not revive)
		</para>
	      </listitem>
	    </itemizedlist>
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      Ending a connection
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--delete</option>
	  <option>--name <replaceable>connection</replaceable></option>
	</term>
        <listitem>
          <para>
	    Delete the specified
	    <replaceable>connection</replaceable>.  Any negotiating or
	    established SAs are terminated.  Any routing is removed.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--down</option>
	  <option>--name <replaceable>connection</replaceable></option>
	  <option>--asynchronous</option>
	</term>
        <listitem>
          <para>
	    Delete any Child SAs associated with the connection, and
	    remove UP from the connection's policy (so the connection
	    is no longer required to stay up).  If the connection has
	    an IKE SA that is not not shared with other connections
	    then that is also is deleted.
	  </para>
	  <para>
	    Since the connection is still in place
	    <option>--down</option> does not prevent new negotiations.
	    For instance, the peer may initiate, or a routed
	    (on-demand) connection will initiate when there is
	    traffic.  <option>--unroute</option> will also prevent
	    traffic initiating the connection, and
	    <option>--delete</option> will prevent all negotiation.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--crash <replaceable>ip-address</replaceable></option>
	</term>
        <listitem>
          <para>
	    If the remote peer has crashed, and therefore did not
	    notify us, we keep sending encrypted traffic, and
	    rejecting all plaintext (non-IKE) traffic from that remote
	    peer. The <option>--crash</option> brings our end down as
	    well for all the known connections to the specified
	    <emphasis>ip-address</emphasis>.
	  </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <variablelist>

      <varlistentry>
        <term>
	  <replaceable>ip-address</replaceable>
	</term>
        <listitem>
          <para>
	    If the remote peer has crashed, and therefore did not
	    notify us, we keep sending encrypted traffic, and
	    rejecting all plaintext (non-IKE) traffic from that
	    remote peer. The <option>--crash</option> brings our end
	    down as well for all the known connections to the
	    specified <emphasis>ip-address</emphasis>.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      Redirecting clients can be done using IKEv2 redirect
      mechanism.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--global-redirect</option> <emphasis>yes|no|auto</emphasis>
	</term>
        <listitem>
          <para>
	    The --global-redirect option controls whether <emphasis>pluto</emphasis>
	    will instruct remote peers to redirect IKE/Child SA's during IKE_SA_INIT. Valid
	    options are <emphasis>no</emphasis>, <emphasis>yes</emphasis> and
	    <emphasis>auto</emphasis>, where auto means remote peers
	    will be redirected if DDoS mode is active.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--global-redirect-to <replaceable>ip-address(es)</replaceable></option>
	</term>
        <listitem>
          <para>
	    The destination, or a list of destinations, where the
	    peers will be redirected.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--name <replaceable>connection_name</replaceable></option>
	</term>
        <term>
	  <option>--redirect-to <replaceable>ip-address(es)</replaceable></option>
	</term>
        <listitem>
          <para>
	    The destination, or a list of destinations, where the
	    peers will be redirected.  Specifying the connection
	    name is optional. If not specified the mechanism will
	    redirect all currently active peers.  If specified, only
	    the peers from connection <emphasis>connection_name</emphasis>
	    will be redirected.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      The public key for informs <emphasis>pluto</emphasis> of the RSA
      public key for a potential peer. Private keys must be kept secret,
      so they are kept in <citerefentry>
      <refentrytitle>ipsec.secrets</refentrytitle>
      <manvolnum>5</manvolnum> </citerefentry>.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--keyid <replaceable>id</replaceable></option>
	</term>
        <listitem>
          <para>
	    Specifies the identity of the peer for which a public
	    key should be used. Its form is identical to the identity
	    in the connection. If no public key is specified,
	    <command>pluto</command> attempts to find KEY
	    records from DNS for the id (if a FQDN) or through reverse
	    lookup (if an IP address). Note that there several
	    interesting ways in which this is not secure.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--addkey</option>
	</term>
        <listitem>
          <para>
	    Specifies that the new key is added to the collection;
	    otherwise the new key replaces any old ones.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--pubkeyrsa <replaceable>key</replaceable></option>
	</term>
        <listitem>
          <para>
	    Specifies the value of the RSA public key. It is a
	    sequence of bytes as described in RFC 2537 "RSA/MD5 KEYs
	    and SIGs in the Domain Name System (DNS)".  It is base-64
	    encoded with the prefix 0s prepended.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      The listen form tells <command>pluto</command> to
      start listening for IKE requests on its public interfaces. To
      avoid race conditions, it is normal to load the appropriate
      connections into <command>pluto</command> before
      allowing it to listen. If <command>pluto</command>
      isn't listening, it is pointless to initiate negotiations, so
      it will refuse requests to do so. Whenever the listen form is
      used, <command>pluto</command> looks for public
      interfaces and will notice when new ones have been added and
      when old ones have been removed. This is also the trigger for
      <command>pluto</command> to read the <emphasis>ipsec.secrets</emphasis>
      file. So listen may useful more than once.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--listen</option>
	</term>
        <listitem>
          <para>
	    Start listening for IKE traffic on public interfaces.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--unlisten</option>
	</term>
        <listitem>
          <para>
	    Stop listening for IKE traffic on public interfaces.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      The --ddos-auto, --ddos-busy and --ddos-unlimited options tells
      <command>pluto</command> to update the DDoS
      protection state. Normally, these measures are automatically
      activated or deactivated based on the number of states inside
      pluto. The busy and unlimited option tells pluto to activate or
      deactivate the DDoS protection mode manually.  One of these DDoS
      protection methods is to activate IKEv2 DCOOKIEs to defend
      against spoofed IKE packets.
    </para>

    <variablelist>

      <varlistentry>
        <term>
	  <option>--ddos-busy</option>
	</term>
        <listitem>
          <para>
	    Place pluto into busy mode and activate anti-DDoS
	    measures.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ddos-unlimited</option>
	</term>
        <listitem>
          <para>
	    Pull pluto out of busy mode and deactivate anti-DDoS
	    measures.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
	  <option>--ddos-auto</option>
	</term>
        <listitem>
          <para>
	    Activate the built-in detection mechanism for the
	    anti-DDoS measures.
	  </para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
      The status form will display information about the internal
      state of <command>pluto</command>: information about
      each potential connection, about each state object, and about
      each shunt that <command>pluto</command> is managing
      without an associated connection.
    </para>

    <para>
      Statistics can be seen using <command>ipsec whack
      --globalstats</command> and reset using <command>ipsec whack
      --clearstats</command>. This can be used with the munin software
      to monitor VPN services.
    </para>

      <variablelist>

        <varlistentry>
          <term>
	    <option>--status</option>
	  </term>
          <listitem>
            <para>
	      To be documented.
	    </para>
          </listitem>
        </varlistentry>

      </variablelist>

      <para>
	The trafficstatus form will display the xauth username,
	add_time and the total in and out bytes of the IPsec SA's.
      </para>

      <variablelist>

	<varlistentry>
	  <term>
	    <option>--trafficstatus</option>
	  </term>
	  <listitem>
	    <para>
	      To be documented
	    </para>
	  </listitem>
	</varlistentry>

      </variablelist>

      <para>
	The shutdown form is the proper way to shut down <emphasis>pluto</emphasis>.
	It will tear down the SAs on this machine that <command>pluto</command> has
	negotiated. If the <emphasis>--leave-state</emphasis> option is given,
	it does not delete any connections, and leaves the kernel state in the
	kernel. Note that the init system used might clean up the
	kernel state regardless.
      </para>

      <variablelist>
        <varlistentry>
          <term>
	    <option>--shutdown</option>
	  </term>
          <listitem>
            <para>
	      To be documented.
	    </para>
          </listitem>
        </varlistentry>
      </variablelist>

    <refsect2 id="examples">
      <title>Examples</title>

      <para>It would be normal to start <command>pluto</command>
      in one of the system initialization scripts. It needs to be run by the
      superuser. Generally, no arguments are needed. To run in manually, the
      superuser can simply type</para>

      <para>ipsec pluto</para>

      <para>The command will immediately return, but a <emphasis>pluto</emphasis>
      process will be left running, waiting for requests from
      <command>whack</command> or a peer.</para>

      <para>Using <command>whack</command>, several potential
      connections would be described:</para>

      <para>ipsec whack --name silly
      --host127.0.0.1 --to --host 127.0.0.2 --ikelifetime 900
      --ipseclifetime 800 --keyingtries 3</para>

      <para>Since this silly connection description specifies neither
      encryption, authentication, nor tunneling, it could only be used to
      establish an ISAKMP SA.</para>

      <para>ipsec whack --name conn_name
      --host 10.0.0.1 --client 10.0.1.0/24 --to --host 10.0.0.2
      --client 10.0.2.0/24 --encrypt</para>

      <para>This is something that must be done on both sides. If the other
      side is <command>pluto</command>, the same <emphasis>whack</emphasis>
      command could be used on it (the command syntax is designed to not
      distinguish which end is ours).</para>

      <para>Now that the connections are specified, <emphasis>pluto</emphasis>
      is ready to handle requests and replies via
      the public interfaces. We must tell it to discover those interfaces and
      start accepting messages from peers:</para>

      <para>ipsec whack --listen</para>

      <para>If we don't immediately wish to bring up a secure connection
      between the two clients, we might wish to prevent insecure traffic. The
      routing form asks <command>pluto</command> to cause the
      packets sent from our client to the peer's client to be routed through
      the ipsec0 device; if there is no SA, they will be discarded:</para>

      <para>ipsec whack --route conn_name</para>

      <para>Finally, we are ready to get <command>pluto</command>
      to initiate negotiation for an IPsec SA (and implicitly, an ISAKMP
      SA):</para>

      <para>ipsec whack
      --initiate --name conn_name</para>

      <para>A small log of interesting events will appear on standard output
      (other logging is sent to syslog).</para>

      <para><command>whack</command> can also be used to terminate
      <command>pluto</command> cleanly, tearing down all SAs that
      it has negotiated.</para>

      <para>ipsec whack --shutdown</para>

      <para>Notification of any IPSEC SA deletion, but not ISAKMP SA deletion
      is sent to the peer. Unfortunately, such Notification is not reliable.
      Furthermore, <command>pluto</command> itself ignores
      Notifications.</para>
    </refsect2>

    <refsect2 id="xauth">
      <title>XAUTH</title>

      <para>If <command>pluto</command> needs additional
      authentication, such as defined by the XAUTH specifications, then it may
      ask <command>whack</command> to prompt the operator for
      username or passwords. Typically, these will be entered interactively. A
      GUI that wraps around <command>whack</command> may look for
      the 041 (username) or 040 (password) prompts, and display them to the
      user.</para>

      <para>
	For testing purposes, the options <option>--xauthuser
	<replaceable>user</replaceable></option> <option>--xauthpass
	<replaceable>pass</replaceable></option> may be be given prior
	to the <option>--initiate</option> to provide responses to the
	username and password prompts.
      </para>
    </refsect2>

    <refsect2 id="the_updown_command">
      <title>The updown command</title>

      <para>Whenever <command>pluto</command> brings a connection
      up or down, it invokes the updown command. This command is specified
      using the <option>--updown</option> option. This allows for customized
      control over routing and firewall manipulation.</para>

      <para>The updown is invoked for five different operations. Each of these
      operations can be for our client subnet or for our host itself.</para>

      <variablelist>
        <varlistentry>
          <term><emphasis>prepare-host</emphasis> or
	  <emphasis>prepare-client</emphasis></term>

          <listitem>
            <para>is run before bringing up a new connection if no other
            connection with the same clients is up. Generally, this is useful
            for deleting a route that might have been set up before
	    <emphasis>pluto</emphasis> was run or perhaps by some agent not
            known to <command>pluto</command>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>route-host</emphasis> or
	  <emphasis>route-client</emphasis></term>

          <listitem>
            <para>is run when bringing up a connection for a new peer client
            subnet (even if <emphasis>prepare-host</emphasis> or
            <emphasis>prepare-client</emphasis> was run). The
            command should install a suitable route. Routing decisions are
            based only on the destination (peer's client) subnet address,
            unlike eroutes which discriminate based on source too.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>unroute-host</emphasis> or
	  <emphasis>unroute-client</emphasis></term>

          <listitem>
            <para>is run when bringing down the last connection for a
            particular peer client subnet. It should undo what the
	    <emphasis>route-host</emphasis> or
	    <emphasis>route-client</emphasis> did.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>up-host</emphasis> or <emphasis>up-client</emphasis></term>

          <listitem>
            <para>is run when bringing up a tunnel eroute with a pair of
            client subnets that does not already have a tunnel eroute. This
            command should install firewall rules as appropriate. It is
            generally a good idea to allow IKE messages (UDP port 500) travel
            between the hosts.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>down-host</emphasis> or <emphasis
         >down-client</emphasis></term>

          <listitem>
            <para>is run when bringing down the eroute for a pair of client
            subnets. This command should delete firewall rules as appropriate.
            Note that there may remain some inbound IPsec SAs with these
            client subnets.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>The script is passed a large number of environment variables to
      specify what needs to be done.</para>

      <variablelist>
        <varlistentry>
          <term><emphasis>PLUTO_VERB</emphasis></term>

          <listitem>
            <para>specifies the name of the operation to be performed
            (<emphasis>prepare-host</emphasis>,
	    <emphasis>prepare-client</emphasis>,
	    <emphasis>up-host</emphasis>,
	    <emphasis>up-client</emphasis>,
	    <emphasis>down-host</emphasis>, or
	    <emphasis>down-client</emphasis>). If the address family for
            security gateway to security gateway communications is IPv6, then
            a suffix of -v6 is added to the verb.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_CONNECTION</emphasis></term>

          <listitem>
            <para>is the name of the connection for which we are
            routing.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_NEXT_HOP</emphasis></term>

          <listitem>
            <para>is the next hop to which packets bound for the peer must be
            sent.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_INTERFACE</emphasis></term>

          <listitem>
            <para>is the name of the ipsec interface to be used.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_ME</emphasis></term>

          <listitem>
            <para>is the IP address of our host.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_CLIENT</emphasis></term>

          <listitem>
            <para>is the IP address / count of our client subnet. If the
            client is just the host, this will be the host's own IP address /
            max (where max is 32 for IPv4 and 128 for IPv6).</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_CLIENT_NET</emphasis></term>

          <listitem>
            <para>is the IP address of our client net. If the client is just
            the host, this will be the host's own IP address.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_CLIENT_MASK</emphasis></term>

          <listitem>
            <para>is the mask for our client net. If the client is just the
            host, this will be 255.255.255.255.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER</emphasis></term>

          <listitem>
            <para>is the IP address of our peer.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_CLIENT</emphasis></term>

          <listitem>
            <para>is the IP address / count of the peer's client subnet. If
            the client is just the peer, this will be the peer's own IP
            address / max (where max is 32 for IPv4 and 128 for IPv6).</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_CLIENT_NET</emphasis></term>

          <listitem>
            <para>is the IP address of the peer's client net. If the client is
            just the peer, this will be the peer's own IP address.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_CLIENT_MASK</emphasis></term>

          <listitem>
            <para>is the mask for the peer's client net. If the client is just
            the peer, this will be 255.255.255.255.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_PROTOCOL</emphasis></term>

          <listitem>
            <para>lists the protocols allowed over this IPsec SA.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_PROTOCOL</emphasis></term>

          <listitem>
            <para>lists the protocols the peer allows over this IPsec
            SA.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_PORT</emphasis></term>

          <listitem>
            <para>lists the ports allowed over this IPsec SA.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_PORT</emphasis></term>

          <listitem>
            <para>lists the ports the peer allows over this IPsec SA.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_MY_ID</emphasis></term>

          <listitem>
            <para>lists our id.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_ID</emphasis></term>

          <listitem>
            <para>lists our peer's id.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><emphasis>PLUTO_PEER_CA</emphasis></term>

          <listitem>
            <para>lists the peer's CA.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>All output sent by the script to stderr or stdout is logged. The
      script should return an exit status of 0 if and only if it
      succeeds.</para>

      <para><command>pluto</command> waits for the script to
      finish and will not do any other processing while it is waiting. The
      script may assume that <command>pluto</command> will not
      change anything while the script runs. The script should avoid doing
      anything that takes much time and it should not issue any command that
      requires processing by <command>pluto</command>. Either of
      these activities could be performed by a background subprocess of the
      script.</para>
    </refsect2>

    <refsect2 id="rekeying">
      <title>Rekeying</title>

      <para>When an SA that was initiated by <emphasis>pluto</emphasis>
      has only a bit of lifetime left, <emphasis>pluto</emphasis>
      will initiate the creation of a new SA. This
      applies to ISAKMP and IPsec SAs. The rekeying will be initiated when the
      SA's remaining lifetime is less than the rekeymargin plus a random
      percentage, between 0 and rekeyfuzz, of the rekeymargin.</para>

      <para>Similarly, when an SA that was initiated by the peer has only a
      bit of lifetime left, <command>pluto</command> will try to
      initiate the creation of a replacement. To give preference to the
      initiator, this rekeying will only be initiated when the SA's remaining
      lifetime is half of rekeymargin. If rekeying is done by the responder,
      the roles will be reversed: the responder for the old SA will be the
      initiator for the replacement. The former initiator might also initiate
      rekeying, so there may be redundant SAs created. To avoid these
      complications, make sure that rekeymargin is generous.</para>

      <para>One risk of having the former responder initiate is that perhaps
      none of its proposals is acceptable to the former initiator (they have
      not been used in a successful negotiation). To reduce the chances of
      this happening, and to prevent loss of security, the policy settings are
      taken from the old SA (this is the case even if the former initiator is
      initiating). These may be stricter than those of the connection.</para>

      <para><command>pluto</command> will not rekey an SA if that
      SA is not the most recent of its type (IPsec or ISAKMP) for its
      potential connection. This avoids creating redundant SAs.</para>

      <para>The random component in the rekeying time (rekeyfuzz) is intended
      to make certain pathological patterns of rekeying unstable. If both
      sides decide to rekey at the same time, twice as many SAs as necessary
      are created. This could become a stable pattern without the
      randomness.</para>

      <para>Another more important case occurs when a security gateway has SAs
      with many other security gateways. Each of these connections might need
      to be rekeyed at the same time. This would cause a high peek requirement
      for resources (network bandwidth, CPU time, entropy for random numbers).
      The rekeyfuzz can be used to stagger the rekeying times.</para>

      <para>Once a new set of SAs has been negotiated, <emphasis>pluto</emphasis>
      will never send traffic on a superseded one.
      Traffic will be accepted on an old SA until it expires.</para>
    </refsect2>

    <refsect2 id="selecting_a_connection_when_responding_r">
      <title>Selecting a Connection When Responding: Road Warrior
      Support</title>

      <para>When <command>pluto</command> receives an initial Main
      Mode message, it needs to decide which connection this message is for.
      It picks based solely on the source and destination IP addresses of the
      message. There might be several connections with suitable IP addresses,
      in which case one of them is arbitrarily chosen. (The ISAKMP SA proposal
      contained in the message could be taken into account, but it is
      not.)</para>

      <para>The ISAKMP SA is negotiated before the parties pass further
      identifying information, so all ISAKMP SA characteristics specified in
      the connection description should be the same for every connection with
      the same two host IP addresses. At the moment, the only characteristic
      that might differ is authentication method.</para>

      <para>Up to this point, all configuring has presumed that the IP
      addresses are known to all parties ahead of time. This will not work
      when either end is mobile (or assigned a dynamic IP address for other
      reasons). We call this situation "Road Warrior". It is fairly tricky and
      has some important limitations, most of which are features of the IKE
      protocol.</para>

      <para>Only the initiator may be mobile: the initiator may have an IP
      number unknown to the responder. When the responder doesn't recognize
      the IP address on the first Main Mode packet, it looks for a connection
      with itself as one end and <emphasis>%any</emphasis> as the
      other. If it cannot find one, it refuses to negotiate. If it does find
      one, it creates a temporary connection that is a duplicate except with
      the <emphasis>%any</emphasis> replaced by the source IP
      address from the packet; if there was no identity specified for the
      peer, the new IP address will be used.</para>

      <para>When <command>pluto</command> is using one of these
      temporary connections and needs to find the preshared secret or RSA
      private key in <emphasis>ipsec.secrets</emphasis>, and the
      connection specified no identity for the peer, <emphasis>%any</emphasis>
      is used as its identity. After all, the real
      IP address was apparently unknown to the configuration, so it is
      unreasonable to require that it be used in this table.</para>

      <para>Part way into the Phase 1 (Main Mode) negotiation using one of
      these temporary connection descriptions, <emphasis>pluto</emphasis>
      will receive an Identity Payload. At this
      point, <command>pluto</command> checks for a more
      appropriate connection, one with an identity for the peer that matches
      the payload and would use the same keys as so far used for
      authentication. If it finds one, it will switch to using this better
      connection (or a temporary one derived from this, if it has
      <emphasis>%any</emphasis> for the peer's IP address). It may even turn
      out that no connection matches the newly discovered identity, including
      the current connection; if so, <command>pluto</command>
      terminates negotiation.</para>

      <para>Unfortunately, if preshared secret authentication is being used,
      the Identity Payload is encrypted using this secret, so the secret must
      be selected by the responder without knowing this payload. This limits
      there to being at most one preshared secret for all Road Warrior systems
      connecting to a host. RSA Signature authentication does not require
      that the responder knows how to select the initiator's public key until
      after the initiator's Identity Payload is decoded (using the responder's
      private key, so that must be preselected).</para>

      <para>When <command>pluto</command> is responding to a Quick
      Mode negotiation via one of these temporary connection descriptions, it
      may well find that the subnets specified by the initiator don't match
      those in the temporary connection description. If so, it will look for a
      connection with matching subnets, its own host address, a peer address
      of <emphasis>%any</emphasis> and matching identities. If it
      finds one, a new temporary connection is derived from this one and used
      for the Quick Mode negotiation of IPsec SAs. If it does not find one,
      <command>pluto</command> terminates negotiation.</para>

      <para>Be sure to specify an appropriate nexthop for the responder to
      send a message to the initiator: <command>pluto</command>
      has no way of guessing it (if forwarding isn't required, use an explicit
      <emphasis>%direct</emphasis> as the nexthop and the IP address
      of the initiator will be filled in; the obsolete notation
      <literal>0.0.0.0</literal> is still accepted).</para>

      <para><command>pluto</command> has no special provision for
      the initiator side. The current (possibly dynamic) IP address and
      nexthop must be used in defining connections. These must be properly
      configured each time the initiator's IP address changes.
      <emphasis>pluto</emphasis> has no mechanism to do this
      automatically.</para>

      <para>Although we call this Road Warrior Support, it could also be used
      to support encrypted connections with anonymous initiators. The
      responder's organization could announce the preshared secret that would
      be used with unrecognized initiators and let anyone connect. Of course
      the initiator's identity would not be authenticated.</para>

      <para>If any Road Warrior connections are supported,
      <emphasis>pluto</emphasis> cannot reject an exchange initiated by an
      unknown host until it has determined that the secret is not shared or
      the signature is invalid. This must await the third Main Mode message
      from the initiator. If no Road Warrior connection is supported, the
      first message from an unknown source would be rejected. This has
      implications for ease of debugging configurations and for denial of
      service attacks.</para>

      <para>Although a Road Warrior connection must be initiated by the mobile
      side, the other side can and will rekey using the temporary connection
      it has created. If the Road Warrior wishes to be able to disconnect, it
      is probably wise to set <option>--keyingtries</option> to 1 in the
      connection on the non-mobile side to prevent it trying to rekey the
      connection. Unfortunately, there is no mechanism to unroute the
      connection automatically.</para>
    </refsect2>

    <refsect2 id="debugging">
      <title>Debugging</title>

      <para>
	<command>pluto</command> accepts several optional
	arguments, useful mostly for debugging. Except for
	<option>--interface</option>, each should appear at most
	once.
      </para>

      <variablelist>

        <varlistentry>
          <term>
	    <option>--interface <replaceable>interfacename</replaceable></option>
	  </term>
          <listitem>
            <para>
	      Specifies that the named real public network interface
	      should be considered. The interface name specified
	      should not be <command>ipsec</command><emphasis>N</emphasis>.
	      If the option doesn't appear, all interfaces are considered.
	      To specify several interfaces, use the option once for each.
	      One use of this option is to specify which interface should be
	      used when two or more share the same IP address.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--ikeport <replaceable>port-number</replaceable></option>
	  </term>
          <listitem>
            <para>
	      Changes the UDP port that <emphasis>pluto</emphasis> will use
	      (default, specified by IANA: 500).
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--secretsfile <filename><replaceable>file</replaceable></filename></option>
	  </term>
          <listitem>
            <para>
	      Specifies the file for authentication secrets (default:
	      <filename>@@IPSEC_SECRETS@@</filename>). This name is
	      subject to "globbing" as in <citerefentry>
	      <refentrytitle>sh</refentrytitle>
	      <manvolnum>1</manvolnum> </citerefentry>, so every file
	      with a matching name is processed. Quoting is generally
	      needed to prevent the shell from doing the globbing.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--nofork</option>
	  </term>
          <listitem>
            <para>
	      Disable "daemon fork" (default is to fork). In addition,
	      after the lock file and control socket are created,
	      print the line "Pluto initialized" to standard
	      out.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--uniqueids</option>
	  </term>
          <listitem>
            <para>
	      If this option has been selected, whenever a new ISAKMP
	      SA is established, any connection with the same Peer ID
	      but a different Peer IP address is unoriented (causing
	      all its SAs to be deleted). This helps clean up dangling
	      SAs when a connection is lost and then regained at
	      another IP address.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--force-busy</option>
	  </term>
          <listitem>
            <para>
	      If this option has been selected, pluto will be forced
	      to be "busy". In this state, which happens when there is
	      a Denial of Service attack, will force pluto to use
	      cookies before accepting new incoming IKE
	      packets. Cookies are send and required in ikev1
	      Aggressive Mode and in ikev2.  This option is mostly
	      used for testing purposes, but can be selected by
	      paranoid administrators as well.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--stderrlog</option>
	  </term>
          <listitem>
            <para>
	      Log goes to standard out (default is to use
	      <citerefentry> <refentrytitle>syslogd</refentrytitle>
	      <manvolnum>8</manvolnum> </citerefentry>).
	    </para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>
	<command>pluto</command> is willing to produce a
	prodigious amount of debugging information. There are several
	classes of debugging output, and <emphasis>pluto</emphasis>
	may be directed to produce a selection of them. All lines of
	debugging output are prefixed with "|" to distinguish them
	from normal diagnostic messages.
      </para>

      <para>
	When <command>pluto</command> is invoked, it may
	be given arguments to specify which debug classes to output.
	The current options are:
      </para>

      <variablelist>

        <varlistentry>
          <term>
	    <option>--debug help</option> (whack only)
	  </term>
          <listitem>
            <para>
	      List the debugging classes recognised by <emphasis>pluto</emphasis>.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--debug none</option>
	  </term>
          <listitem>
            <para>
	      Disable logging for all debugging classes.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--debug base</option>
	  </term>
          <listitem>
            <para>
	      Enable debug-logging.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--debug cpu-usage</option>
	  </term>
          <listitem>
            <para>
	      Enable cpu-usage logging.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--debug <replaceable>class</replaceable></option>
	  </term>
          <term>
	    <option>--no-debug <replaceable>class</replaceable></option>
	  </term>
          <term>
	    <option>--debug no-<replaceable>class</replaceable></option>
	  </term>
          <listitem>
            <para>
	      Enable (disable) logging of the specified debugging
	      <replaceable>class</replaceable> (<option>--debug
	      help</option> lists debugging classes supported by this
	      version of <command>pluto</command>).
	    </para>
          </listitem>
        </varlistentry>

      </variablelist>

      <para>
	The debug form of the <command>whack</command>
	command will change the selection in a running
	<emphasis>pluto</emphasis>. If a connection name is specified,
	the flags are added whenever <emphasis>pluto</emphasis> has
	identified that it is dealing with that connection. Unfortunately,
	this is often part way into the operation being observed.
      </para>

      <para>
	For example, to start <command>pluto</command>
	with both <emphasis>base</emphasis> and
	<emphasis>cpu-usage</emphasis> debug-logging enabled:
      </para>

      <para><simplelist columns='1'>
	<member><computeroutput>ipsec pluto --debug base --debug cpu-usage</computeroutput></member>
      </simplelist></para>

      <para>
	To later change this <command>pluto</command> to
	disable <emphasis>base</emphasis> debug-logging use either:
      </para>

      <para><simplelist columns='1'>
	<member><computeroutput>ipsec whack --no-debug base</computeroutput></member>
      </simplelist></para>

      <para>
	or:
      </para>

      <para><simplelist columns='1'>
	<member><computeroutput>ipsec whack --debug none --debug cpu-usage</computeroutput></member>
      </simplelist></para>

    </refsect2>

    <refsect2 id="impairing">
      <title>Impairing</title>

      <para>
	<command>pluto</command> and <emphasis>whack</emphasis>
	accept several optional arguments
	that alter (impair) correct behaviour.
      </para>
      <para>
	These options are solely intended for use by developers when
	testing <command>pluto</command>.
      </para>

      <variablelist>

        <varlistentry>
          <term>
	    <option>--impair help</option> (whack only)
	  </term>
          <listitem>
            <para>
	      List all the behaviours that can be altered (impaired).
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--impair list</option> (whack only)
	  </term>
          <listitem>
            <para>
	      List all the behaviours that are currently altered
	      (impaired).
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--impair none</option>
	  </term>
          <listitem>
            <para>
	      Disable all altered (impaired) behaviours.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>
	    <option>--impair <replaceable>behaviour</replaceable></option>
	  </term>
          <term>
	    <option>--impair <replaceable>behaviour</replaceable>:<replaceable>how</replaceable></option>
	  </term>
          <term>
	    <option>--no-impair <replaceable>behaviour</replaceable></option>
	  </term>
          <listitem>
            <para>
	      Alter (impair) <command>pluto</command>
	      inducing the (possibly erroneous)
	      <replaceable>behaviour</replaceable>.
	    </para>
          </listitem>
        </varlistentry>

      </variablelist>

    </refsect2>

    <refsect2 id="plutos_behaviour_when_things_go_wrong">
      <title>Pluto's Behaviour When Things Go Wrong</title>

      <para>
	When <command>pluto</command> doesn't understand or
	accept a message, it just ignores the message. It is not yet capable of
	communicating the problem to the other IKE daemon (in the future it
	might use Notifications to accomplish this in many cases). It does log a
	diagnostic.
      </para>

      <para>
	When <command>pluto</command> gets no response from a
	message, it resends the same message (a message will be sent at most
	three times). This is appropriate: UDP is unreliable.
      </para>

      <para>
	When pluto gets a message that it has already seen, there are many
	cases when it notices and discards it. This too is appropriate for
	UDP.
      </para>

      <para>
	Combine these three rules, and you can explain many apparently
	mysterious behaviours. In a <command>pluto</command> log,
	retrying isn't usually the interesting event. The critical thing is
	either earlier (<command>pluto</command> got a message that
	it didn't like and so ignored, so it was still awaiting an acceptable
	message and got impatient) or on the other system
	(<emphasis>pluto</emphasis> didn't send a reply because it wasn't happy
	with the previous message).
      </para>
    </refsect2>

    <refsect2 id="notes">
      <title>Notes</title>

      <para>
	Each IPsec SA is assigned an SPI, a 32-bit number used to refer to
	the SA. The IKE protocol lets the destination of the SA choose the SPI.
	The range 0 to 0xFF is reserved for IANA. <emphasis>Pluto</emphasis>
	also avoids choosing an SPI in the range
	0x100 to 0xFFF, leaving these SPIs free for manual keying. Remember that
	the peer, if not <command>pluto</command>, may well chose
	SPIs in this range.
      </para>
    </refsect2>

    <refsect2 id="policies">
      <title>Policies</title>

      <para>
	This catalogue of policies may be of use when trying to configure
	<command>pluto</command> and another IKE implementation to
	interoperate.
      </para>

      <para>
	In Phase 1, only Main Mode is supported. We are not sure that
	Aggressive Mode is secure. For one thing, it does not support identity
	protection. It may allow more severe Denial Of Service attacks.
      </para>

      <para>
	No Informational Exchanges are supported. These are optional and
	since their delivery is not assured, they must not matter. It is the
	case that some IKE implementations won't interoperate without
	Informational Exchanges, but we feel they are broken.
      </para>

      <para>
	No Informational Payloads are supported. These are optional, but
	useful. It is of concern that these payloads are not authenticated in
	Phase 1, nor in those Phase 2 messages authenticated with
	HASH(3).
      </para>

      <variablelist>
        <varlistentry>
          <term>•</term>

          <listitem>
            <para>Diffie Hellman Group MODP 1536 (5) is
            supported. Groups MODP768 and MODP 1024 (1 and 2) are
	    not supported because those are too weak.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>Host authentication can be done by RSA Signatures or
            Pre-Shared Secrets.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>
	      TODO! This information is outdated.
	      3DES CBC (Cypher Block Chaining mode) is the only encryption
              supported, both for ISAKMP SAs and IPSEC SAs.
	    </para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>MD5 and SHA1 hashing are supported for packet authentication
            in both kinds of SAs.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>The ESP, AH, or AH plus ESP are supported. If, and only if,
            AH and ESP are combined, the ESP need not have its own
            authentication component. The selection is controlled by the
            --encrypt and --authenticate flags.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>Each of these may be combined with IPCOMP Deflate
            compression, but only if the potential connection specifies
            compression.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>The IPSEC SAs may be tunnel or transport mode, where
            appropriate. The --tunnel flag controls this when
	    <emphasis>pluto</emphasis> is initiating.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>When responding to an ISAKMP SA proposal, the maximum
            acceptable lifetime is eight hours. The default is one hour. There
            is no minimum. The --ikelifetime flag controls this when
	    <emphasis>pluto</emphasis> is initiating.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>When responding to an IPSEC SA proposal, the maximum
            acceptable lifetime is one day. The default is eight hours. There
            is no minimum. The --ipseclifetime flag controls this when
            <command>pluto</command> is initiating.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>•</term>

          <listitem>
            <para>PFS is acceptable, and will be proposed if the --pfs flag
            was specified. The DH group proposed will be the same as
            negotiated for Phase 1.</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
  </refsect1>

  <refsect1 id="exit_status">
    <title>EXIT STATUS</title>

    <para>
      If <command>ipsec whack</command> detects a problem,
      it will return an exit status of 1. If it received progress
      messages from <command>pluto</command>, it returns
      as status the value of the numeric prefix from the last such
      message that was not a message sent to syslog or a comment (but
      the prefix for success is treated as 0).  Otherwise, the exit
      status is 0.
    </para>
  </refsect1>

  <refsect1 id="files">
    <title>FILES</title>

    <para><filename>@@RUNDIR@@/pluto.pid</filename>
    <filename>@@RUNDIR@@/pluto.ctl</filename>
    <filename>@@IPSEC_SECRETS@@</filename>
    <filename>/dev/urandom</filename></para>
  </refsect1>

  <refsect1 id="environment">
    <title>ENVIRONMENT</title>

    <para>pluto does not use any environment variables</para>
  </refsect1>

  <refsect1 id="see_also">
    <title>SEE ALSO</title>

    <para>The rest of the Libreswan distribution, in particular
    <citerefentry><refentrytitle>ipsec</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>

    <para>
      <citerefentry>
        <refentrytitle>ipsec</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>
      is designed to make using <command>pluto</command>
      more pleasant. Use it!
    </para>

    <para>
      <citerefentry>
        <refentrytitle>ipsec.secrets</refentrytitle>
        <manvolnum>5</manvolnum>
      </citerefentry>
      describes the format of the secrets file.
    </para>

    <para>
      For more information on IPsec, the mailing list, and the relevant
      documents, see:
    </para>

    <para>
      <emphasis><ulink url="https://datatracker.ietf.org/wg/ipsecme/charter/">https://datatracker.ietf.org/wg/ipsecme/charter/</ulink></emphasis>
    </para>

    <para>
      At the time of writing, the latest IETF IKE RFC is:
    </para>

    <para>
      RFC 7296 Internet Key Exchange Protocol Version 2 (IKEv2)
    </para>

    <para>
      The Libreswan web site &lt;https://libreswan.org&gt; and the mailing
      lists described there.
    </para>

    <para>
      The Libreswan wiki &lt;https://libreswan.org/wiki&gt; and the mailing
      lists described there.
    </para>

    <para>
      The Libreswan list of implemented RFCs &lt;https://libreswan.org/wiki/Implemented_Standards&gt;
    </para>
  </refsect1>

  <refsect1 id="history">
    <title>HISTORY</title>

    <para>
      This code is released under the GPL terms. See the accompanying
      files CHANGES COPYING and CREDITS.* for more details.
    </para>

    <para>
      Detailed history (including FreeS/WAN and Openswan) can be found in the docs/ directory.
    </para>

  </refsect1>

  <refsect1 id="bugs">
    <title>BUGS</title>

    <para>Please see
    &lt;<ulink url="https://github.com/libreswan/libreswan/issues">https://github.com/libreswan/libreswan/issues</ulink>&gt;
    for a list of currently known bugs and missing features.</para>

    <para>
      Bugs should be reported to the &lt;swan-dev@lists.libreswan.org&gt;
      mailing list.
    </para>
  </refsect1>

  <refsect1 id='author'>
    <title>AUTHOR</title>
    <para>
      <author><personname><firstname>Paul</firstname><surname>Wouters</surname></personname></author>
    </para>
  </refsect1>
</refentry>