Project

General

Profile

Querying IKESAs using SMP

Examples

Request

<?xml version="1.0"?>
<message xmlns="http://www.strongswan.org/smp/1.0" type="request" id="1">
    <query>
        <!-- request all available IKE_SAs -->
        <ikesalist/>
    </query>
</message>

Response

<?xml version="1.0"?>
<message xmlns="http://www.strongswan.org/smp/1.0" type="response" id="1">
    <query>
        <ikesalist>
            <ikesa>
                <!-- uniquely assigned ID for this IKE_SA -->
                <id>1</id>
                <status>established</status>
                <!-- role of local peer (initiator initiated the IKE_SA -->
                <role>initiator</role>
                <!-- configuration used to set up this IKE_SA -->
                <peerconfig>to-moon</peerconfig>
                <local>
                    <spi>67f4278420f2bc86</spi>
                    <identification type="email">alice@strongswan.org</identification>
                    <address type="ipv4">10.1.0.10</address>
                    <port>500</port>
                    <!-- true if peer is behind a NAT router -->
                    <nat>false</nat>
                </local>
                <remote>
                    <spi>af45d91748bc19e8</spi>
                    <identification type="fqdn">moon.strongswan.org</identification>
                    <address type="ipv4">10.1.0.1</address>
                    <port>500</port>
                    <nat>false</nat>
                </remote>
            </ikesa>
            <ikesa>
                <id>2</id>
                <status>connecting</status>
                <role>initiator</role>
                <peerconfig>to-sun</peerconfig>
                <local>
                    <spi>67f4278420f2bc86</spi>
                    <identification type="email">alice@strongswan.org</identification>
                    <address type="ipv6">::</address>
                    <port>500</port>
                    <nat>true</nat>
                </local>
                <remote>
                    <spi>00</spi>
                    <identification type="fqdn">sun.strongswan.org</identification>
                    <address type="ipv6">fec0::2</address>
                    <port>500</port>
                    <nat>false</nat>
                </remote>
            </ikesa>
        </ikesalist>
    </query>
</message>