

CREATE TABLE identities (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  type INTEGER NOT NULL,
  data BLOB NOT NULL,
  UNIQUE (type, data)
);


CREATE TABLE child_configs (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL,
  lifetime INTEGER NOT NULL DEFAULT '1500',
  rekeytime INTEGER NOT NULL DEFAULT '1200',
  jitter INTEGER NOT NULL DEFAULT '60',
  updown TEXT DEFAULT NULL,
  hostaccess INTEGER NOT NULL DEFAULT '0',
  mode INTEGER NOT NULL DEFAULT '2',
  start_action INTEGER NOT NULL DEFAULT '0',
  dpd_action INTEGER NOT NULL DEFAULT '0',
  close_action INTEGER NOT NULL DEFAULT '0',
  ipcomp INTEGER NOT NULL DEFAULT '0',
  reqid INTEGER NOT NULL DEFAULT '0'
);
DROP INDEX IF EXISTS child_configs_name;
CREATE INDEX child_configs_name ON child_configs (
  name
);


CREATE TABLE child_config_traffic_selector (
  child_cfg INTEGER NOT NULL,
  traffic_selector INTEGER NOT NULL,
  kind INTEGER NOT NULL
);
DROP INDEX IF EXISTS child_config_traffic_selector_all;
CREATE INDEX child_config_traffic_selector_all ON child_config_traffic_selector (
  child_cfg, traffic_selector
);

CREATE TABLE proposals (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  proposal TEXT NOT NULL
);


CREATE TABLE child_config_proposal (
  child_cfg INTEGER NOT NULL,
  prio INTEGER NOT NULL,
  prop INTEGER NOT NULL
);


CREATE TABLE ike_configs (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  certreq INTEGER NOT NULL DEFAULT '1',
  force_encap INTEGER NOT NULL DEFAULT '0',
  local TEXT NOT NULL,
  remote TEXT NOT NULL
);


CREATE TABLE ike_config_proposal (
  ike_cfg INTEGER NOT NULL,
  prio INTEGER NOT NULL,
  prop INTEGER NOT NULL
);


CREATE TABLE peer_configs (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL,
  ike_version INTEGER NOT NULL DEFAULT '2',
  ike_cfg INTEGER NOT NULL,
  local_id TEXT NOT NULL,
  remote_id TEXT NOT NULL,
  cert_policy INTEGER NOT NULL DEFAULT '1',
  uniqueid INTEGER NOT NULL DEFAULT '0',
  auth_method INTEGER NOT NULL DEFAULT '1',
  eap_type INTEGER NOT NULL DEFAULT '0',
  eap_vendor INTEGER NOT NULL DEFAULT '0',
  keyingtries INTEGER NOT NULL DEFAULT '3',
  rekeytime INTEGER NOT NULL DEFAULT '7200',
  reauthtime INTEGER NOT NULL DEFAULT '0',
  jitter INTEGER NOT NULL DEFAULT '180',
  overtime INTEGER NOT NULL DEFAULT '300',
  mobike INTEGER NOT NULL DEFAULT '1',
  dpd_delay INTEGER NOT NULL DEFAULT '120',
  virtual TEXT DEFAULT NULL,
  pool TEXT DEFAULT NULL,
  mediation INTEGER NOT NULL DEFAULT '0',
  mediated_by INTEGER NOT NULL DEFAULT '0',
  peer_id INTEGER NOT NULL DEFAULT '0'
);
DROP INDEX IF EXISTS peer_configs_name;
CREATE INDEX peer_configs_name ON peer_configs (
  name
);


CREATE TABLE peer_config_child_config (
  peer_cfg INTEGER NOT NULL,
  child_cfg INTEGER NOT NULL,
  PRIMARY KEY (peer_cfg, child_cfg)
);


CREATE TABLE traffic_selectors (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  type INTEGER NOT NULL DEFAULT '7',
  protocol INTEGER NOT NULL DEFAULT '0',
  start_addr BLOB DEFAULT NULL,
  end_addr BLOB DEFAULT NULL,
  start_port INTEGER NOT NULL DEFAULT '0',
  end_port INTEGER NOT NULL DEFAULT '65535'
);


CREATE TABLE certificates (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  type INTEGER NOT NULL,
  keytype INTEGER NOT NULL,
  data BLOB NOT NULL
);


CREATE TABLE certificate_identity (
  certificate INTEGER NOT NULL,
  identity INTEGER NOT NULL,
  PRIMARY KEY (certificate, identity)
);


CREATE TABLE private_keys (
  id INTEGER NOT NULL  PRIMARY KEY AUTOINCREMENT,
  type INTEGER NOT NULL,
  data BLOB NOT NULL
);


CREATE TABLE private_key_identity (
  private_key INTEGER NOT NULL,
  identity INTEGER NOT NULL,
  PRIMARY KEY (private_key, identity)
);


CREATE TABLE shared_secrets (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  type INTEGER NOT NULL,
  data BLOB NOT NULL
);


CREATE TABLE shared_secret_identity (
  shared_secret INTEGER NOT NULL,
  identity INTEGER NOT NULL,
  PRIMARY KEY (shared_secret, identity)
);


CREATE TABLE certificate_authorities (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  certificate INTEGER NOT NULL
);


CREATE TABLE certificate_distribution_points (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  ca INTEGER NOT NULL,
  type INTEGER NOT NULL,
  uri TEXT NOT NULL
);


CREATE TABLE pools (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL UNIQUE,
  start BLOB NOT NULL,
  end BLOB NOT NULL,
  timeout INTEGER NOT NULL
);

CREATE TABLE addresses (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  pool INTEGER NOT NULL,
  address BLOB NOT NULL,
  identity INTEGER NOT NULL DEFAULT 0,
  acquired INTEGER NOT NULL DEFAULT 0,
  released INTEGER NOT NULL DEFAULT 1
);
DROP INDEX IF EXISTS addresses_pool;
CREATE INDEX addresses_pool ON addresses (
  pool
);
DROP INDEX IF EXISTS addresses_address;
CREATE INDEX addresses_address ON addresses (
  address
);
DROP INDEX IF EXISTS addresses_identity;
CREATE INDEX addresses_identity ON addresses (
  identity
);

CREATE TABLE leases (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  address INTEGER NOT NULL,
  identity INTEGER NOT NULL,
  acquired INTEGER NOT NULL,
  released INTEGER NOT NULL
);

CREATE TABLE attribute_pools (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL
);

CREATE TABLE attributes (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  identity INTEGER NOT NULL DEFAULT 0,
  pool INTEGER NOT NULL DEFAULT 0,
  type INTEGER NOT NULL,
  value BLOB NOT NULL
);
DROP INDEX IF EXISTS attributes_identity;
CREATE INDEX attributes_identity ON attributes (
  identity
);
DROP INDEX IF EXISTS attributes_pool;
CREATE INDEX attributes_pool ON attributes (
  pool
);

CREATE TABLE ike_sas (
  local_spi BLOB NOT NULL PRIMARY KEY,
  remote_spi BLOB NOT NULL,
  id INTEGER NOT NULL,
  initiator INTEGER NOT NULL,
  local_id_type INTEGER NOT NULL,
  local_id_data BLOB DEFAULT NULL,
  remote_id_type INTEGER NOT NULL,
  remote_id_data BLOB DEFAULT NULL,
  host_family INTEGER NOT NULL,
  local_host_data BLOB NOT NULL,
  remote_host_data BLOB NOT NULL,
  created INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE logs (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  local_spi BLOB NOT NULL,
  signal INTEGER NOT NULL,
  level INTEGER NOT NULL,
  msg TEXT NOT NULL,
  time INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP
);

/* Identities */

INSERT INTO identities (
  type, data
) VALUES ( /* C=CH, O=strongSwan Project, CN=strongSwan Root CA */
  9, X'3047310b3009060355040613024348311b3019060355040a13127374726f6e675377616e2050726f6a656374311b3019060355040313127374726f6e675377616e20526f6f74204341'
);

INSERT INTO identities (
  type, data
) VALUES ( /* subjkey of 'C=CH, O=strongSwan Project, CN=strongSwan Root CA' */
  11, X'288a0bd0d28511dae59ffa160ab021d708922d67'
);

INSERT INTO identities (
  type, data
) VALUES ( /* keyid of 'C=CH, O=strongSwan Project, CN=strongSwan Root CA' */
  11, X'91f8e4475f0bc75a388624bcf0a56fe6a45f0c2a'
);

INSERT INTO identities (
  type, data
) VALUES ( /* alice@strongswan.org */
  3, X'616c696365407374726f6e677377616e2e6f7267'
 );

INSERT INTO identities (
  type, data
) VALUES ( /* sun.strongswan.org */
  2, X'73756e2e7374726f6e677377616e2e6f7267'
 );

INSERT INTO identities (
  type, data
) VALUES ( /* subjkey of 'C=CH, O=strongSwan Project, OU=Sales, CN=alice@strongswan.org' */
  11, X'742b920684f2674ce389d64faf59ce840518fd21'
 );

INSERT INTO identities (
  type, data
) VALUES ( /* %any */
  0, '%any'
);

/* Certificates */

INSERT INTO certificates (
   type, keytype, data
) VALUES ( /* C=CH, O=strongSwan Project, CN=strongSwan Root CA */
  1, 1, X'30820455308202bda00302010202083e9346d3b12d6782300d06092a864886f70d01010b05003047310b3009060355040613024348311b3019060355040a13127374726f6e675377616e2050726f6a656374311b3019060355040313127374726f6e675377616e20526f6f74204341301e170d3235313130363030313332365a170d3335313130373030313332365a3047310b3009060355040613024348311b3019060355040a13127374726f6e675377616e2050726f6a656374311b3019060355040313127374726f6e675377616e20526f6f74204341308201a2300d06092a864886f70d01010105000382018f003082018a0282018100997a7e790296b1dfe697090d480043ab51d6deb0a4415223a2dcdd7cfee9f2aba271ed293f12691ba6fd3bf3b477e7dfa4e57778dca316075725056c0a35cc273aed5411b04663998f04eccb8066082d615f15e0588469a595acadfa8fcfeaa5bacc09192c4a4c45792672e291a4da45708561ac6b8c5ed5aaf5a25761c6357d18875b0391cbd4c6265351c814bea4fcc9fbd3e606794f02d89326162ab86e9194f30840e920c192c2d97129e8e93e08543ba8c4cb2c057b9e64215b5ec93a5cd8ef040b3e4df77e617cb4c79afa94385e2c90de44910d4fa112db3deef80589851ba090405c70a061ac752391963eb68c837bfbb8a5ead5f30b54c797591c4ab42904c4930994452b9b776f983c7e3debe5b1ce5b029e5daab6e720e7bc54d4dac75a702cbd809e695b6d9916cac2279a5c04ba6eaab70646274efb99600604604b836542140b43020ad6b2c33c2f8326fd4a34391e2011092d321e84820425bb6562428138ad630cf12ce66de2d85b33151ec43e4504c722f1384e80accbb10203010001a345304330120603551d130101ff040830060101ff020101300e0603551d0f0101ff040403020106301d0603551d0e04160414288a0bd0d28511dae59ffa160ab021d708922d67300d06092a864886f70d01010b050003820181007ccad9c8210802532b184e5fbd23a15cf6830ca783c5cefd1485ea7dd9e5a339074c6e089193d41d4402f31f260be503ab54aa5fc710261ca72455c3aec5f66224ccac23c57b901aaf8df4d878151082765ae6ed854204ec6342dcf6c091852d094ceb528beb7699a1e58d13f3072aa432e74a72ceee4ef57d6deb5963ddaeef15cbec267247a05c1cf2824a5a774bcf31e75f480e17b24568ba547d04ca9a905797cffee0fa309044389b5e23c2c2cb08c18f42a049b5f613f9c75c9cb42d57dc2181877dc8f7351a6d2c1ad81eba12d56b52f96609b696bb6e01ddec0efd893cca413f6b99216930ac4f0e152ac1773f18016323b408b8fc5e0b0acb46a515647cfe6678268ee85637381c8a0497559261e03205e057fcc3303fd0c9cb9183cb1de89c6ea5e7cd95aeb8b5a4413420035ff233d876d4480c0202462184a9a462afcd6502dd1b1badfd590609281fd68e0daf5ad62e2789c92763e843f0cb8cf5fdca9e847533c791a54ae574373e1f4fbc966d90f7fcc994859c7971050f7f'
);

INSERT INTO certificates (
   type, keytype, data
) VALUES ( /* C=CH, O=strongSwan Project, OU=Sales, CN=alice@strongswan.org */
  1, 1, X'3082049a30820302a003020102020105300d06092a864886f70d01010b05003047310b3009060355040613024348311b3019060355040a13127374726f6e675377616e2050726f6a656374311b3019060355040313127374726f6e675377616e20526f6f74204341301e170d3235313130363030313332365a170d3333313130363030313332365a3059310b3009060355040613024348311b3019060355040a13127374726f6e675377616e2050726f6a656374310e300c060355040b130553616c6573311d301b06035504030c14616c696365407374726f6e677377616e2e6f7267308201a2300d06092a864886f70d01010105000382018f003082018a0282018100ac3c9aa1759c1a734717908b4e24d4c414a0cdc87b5f4daf2aa5cf2eed4eb03570cdd9a7b9ee6e16ed02a662c11751c0c44a6eed48086ff4cd0a79490a8352e9e7bb5f65b9c5eeffae89e8b2157fc982e083fe305da08d13eff0dce82b8f6569a63802f9eb8fac9c8a0c3235be52bee0f0907e280aae64e5f41ef10478ea6a9abb483e7d121729146b800b581d0b1759edafc264613b42cb1c3f36aa62b79159706c4e3f6894270c340b20b3f6233dfbf2135a1261984b92c6d23330777e75376b164024b9bab1a31246c182eb2e850a134884556f27ff907577cb74a6cab172db455ff7f58e923e0263dfd9907dd7fc8c0d5eb9f3f2e101db52219a86f4952cdd86748e8253e3fab5c2c5f4c74fe6a58bb294246a9f4ae4742248e059e9ccd65ba325f8386ccd6ea6a87083d9ed8abc022a775c5efd004f84c29e5f73b1e99a894bf5612ff2e986fc9e2df02663b23c77758436dcbb7c3f66977039969d5f1991f9531918a716c88d137ebce8b5c667514ed70eb25dfe48e37d9980648a00190203010001a37f307d301f0603551d23041830168014288a0bd0d28511dae59ffa160ab021d708922d67301f0603551d11041830168114616c696365407374726f6e677377616e2e6f726730390603551d1f04323030302ea02ca02a8628687474703a2f2f63726c2e7374726f6e677377616e2e6f72672f7374726f6e677377616e2e63726c300d06092a864886f70d01010b0500038201810031cbced3a20430bb399d75d35c81ad5269c22b848ddc5302adf946c616cda628f920aefae742314b0b3797523d1bc3fd896dd7fde855972b03072299c3aa69de9c7530f527cbbe689e8d51bbc354c7ef759f5c5350ca80f5566bc9d0501d3f52c7a8e88f0fab15817d9f9b13cfb47b68f24bdab7a9dc701652bffe58fe8624427168262f2f0be311c09b40035b770a5ad46b5dc1ddd592244bef3159b791366a659847a65535f4e3a51f0f248d8dac9d44fe283fbacd51996b29deeea5e7638c8e18ee844001bb26cf804be7c472c68ff210b635e31c64931b88e22260a8b0d5bc9cbfb179225343339f6f5b61b544997db49f15e04ae881cf996262253b0fa066742ae723f5cf5f14988c685f16f0f897c3247e54685a615cebdd4676abca0c3cb5a2d4ebf99f8873df0c292a2f6df1680c94d1572bc2cb95873bf1b04fa8610925116123d182cc127f1c2eeed283c085b84498db214fc371393c27ff84cf707c0cd19fd26591bd3bcb5d431dbb70f49bdd14c771cc0f1ba5dcfd02969bc11c'
);

INSERT INTO certificate_identity (
  certificate, identity
) VALUES (
  1, 1
);

INSERT INTO certificate_identity (
  certificate, identity
) VALUES (
  1, 2
);

INSERT INTO certificate_identity (
  certificate, identity
) VALUES (
  1, 3
);

INSERT INTO certificate_identity (
  certificate, identity
) VALUES (
  2, 4
);

INSERT INTO certificate_identity (
  certificate, identity
) VALUES (
  2, 6
);

/* Private Keys */

INSERT INTO private_keys (
   type, data
) VALUES ( /* key of 'C=CH, O=strongSwan Project, OU=Sales, CN=alice@strongswan.org' */
  1, X'308206e20201000282018100ac3c9aa1759c1a734717908b4e24d4c414a0cdc87b5f4daf2aa5cf2eed4eb03570cdd9a7b9ee6e16ed02a662c11751c0c44a6eed48086ff4cd0a79490a8352e9e7bb5f65b9c5eeffae89e8b2157fc982e083fe305da08d13eff0dce82b8f6569a63802f9eb8fac9c8a0c3235be52bee0f0907e280aae64e5f41ef10478ea6a9abb483e7d121729146b800b581d0b1759edafc264613b42cb1c3f36aa62b79159706c4e3f6894270c340b20b3f6233dfbf2135a1261984b92c6d23330777e75376b164024b9bab1a31246c182eb2e850a134884556f27ff907577cb74a6cab172db455ff7f58e923e0263dfd9907dd7fc8c0d5eb9f3f2e101db52219a86f4952cdd86748e8253e3fab5c2c5f4c74fe6a58bb294246a9f4ae4742248e059e9ccd65ba325f8386ccd6ea6a87083d9ed8abc022a775c5efd004f84c29e5f73b1e99a894bf5612ff2e986fc9e2df02663b23c77758436dcbb7c3f66977039969d5f1991f9531918a716c88d137ebce8b5c667514ed70eb25dfe48e37d9980648a00190203010001028201800d2a2bb28c2404a48b8a4a4ecf8802a84320606242c5cfd103fc3cf80c04eff481bd06362b00c5b2e46647b3f428d5639bcd49a9c2cffc48b494689d53dba24e851b1e094f380912cb7338914611e8a3e387cb39c4aa4526413882960f604c42d544e23b5a8d36871789239c56820a1b74dfc278ca8a36659a3174402082e06797c98797353706798c56f2e706ff46476622c143bd67d36ce5699282d6fd4b738fe3835e96de7e169172c94ae0152503792710032829051bc0ad27e2fc3b32f7cb6e20776c6b5f48f709247e42aa2763ca06fab1321a8f0a3fab68734cee2d9c7a9e80d3ef13f1c87f9bfb12482e1bf89bb83ffe9c7a91ff3fd3e73a34ba218db6bed489249ae24702cfe8080834b34e6a3115e5b27a4e956078197c21dc29fdcb4e6ff0b0c1a64452595f0e1c682c02228f3c72c03dcd91073b334298a96f1eb645cdaa0266edc314900fc18d29432c49c10fb02f52d7422496904423b591de69b561edd53e9f670588b7bc724c8129cdec11fb5d284a632402af57bfc48d010281c100e6c421c5d17e16177f67d552ae943b377c6a94252d35227be493ae08d1ca3728a1bc0af2a261965061f8c2dbb29bc6b28e3bf50ef11f2cb2b1882eb64a97fb4da721e8a7eb29e38f4787af3a342881cb0509673a26a610731600104a6eeec1d6c8c7e8c11661cc3139302f0db87f14b1b10c2517835fb88acd8d88f85c628025b23ca7bbe251eaf40f70c8621366f07a691c88c3547327d6fc852e27ee53e3ea477bf79685007bf128234bfe14c1c74c95d4bd66ab3c6ef494d58c57c23fc9810281c100bf120cea67c4a0894bc086b2ace2c0cc8ce33df304a5c03a767627c8f3c7fdc372a91586863937da2fbea60e4c0be3be320e16ec2f4443ecbe3ac96d39ee05232e2310e770768d04210d9318da2db7b718e62a4e9acd2f5e7e8c6ba7570a6eeca6407aad0936c3402159e0df7fcbc8b351b330efa481d570fd5d0c6b2528819bea6a497a37cc17ef3ea1d643252062c6a57fea2d87b189f4560d9056e186f8476bec502a9a456ededbe3031183c8afc29c009d5bc57a6e1372669e4d34ff92990281c02938e1fb8f57a1a4a2eaae6dada7e7081b5e82863d941f4bd8621515983c322c3ceff558b06f1445d9aa714c83945623314b3e9463b838e8d6d3c7dc6268d1c86651a558d1a652f3164903a1370e01597dd5d72dc917a31a9bd4791482ca7dafdb7ff271038986cb4836f640d233494410a765bcd487f5d43db1c9c4ebe3e0965b4780830c83ab9fdb5e3f3d5dcfe6a7473d84a4b7e2363cae3130348bdb4a7c6036a1dcae778eac5e8a279a04a534efd658015964bf4fe6baeb86bd6a82b0810281c0541aedf48098dcd192b6bc9409e6065803ec4368a5b3105aabaa76f8cdd64aadaddb1fce8766c85f1285293341e639e98ebf04f812164a8ffb6c851dbf523690b5ce59b2869ea89418b890f76f92903bd889f835818eb03b3819378a0196661d65511caeee4f5cc2edeb52410f4ff4987a6e162c668d8016ac7038f730f413993e266b11915e156b0a76d289dbddd59cfb5cc30827a2cec6eeda299f14c704a2ebaea9db16ed5950601a1d4fa862be7b3b9049b40bc9488ae6e0a4edf75648810281c03577988b6a4515e881639bd6bae8e04301747d8aba68d590e0f38ddec5ba298ab0829f2263b14cbf2ff396089ba0449875dcfe4184d926d42e592c2d1653e89336731ec414d77f6601295226447556d0111775bd05e0922768f8cccb10bdb5e699807cbf01b455b85146b6d65c5c6dae64074af345392e79368a14d9998ad8b7c4d357bf8163a92097071f81d378ebfd38a44f39466c2ff8c8f1c2f8c662b130e0523393ccca419d666654792e6f053fb22021f2bf1af0e678ee26b3254ef223'
);

INSERT INTO private_key_identity (
  private_key, identity
) VALUES (
  1, 4
);

INSERT INTO private_key_identity (
  private_key, identity
) VALUES (
  1, 6
);

/* Configurations */

INSERT INTO ike_configs (
  local, remote
) VALUES (
  '10.1.0.10', '192.168.0.2'
);

INSERT INTO ike_configs (
  local, remote
) VALUES (
  '%any', '%any'
);

INSERT INTO peer_configs (
  name, ike_cfg, local_id, remote_id, virtual
) VALUES (
  'nat-t', 1, 4, 5, '0.0.0.0'
);

INSERT INTO peer_configs (
  name, ike_cfg, local_id, remote_id, auth_method
) VALUES (
  'shunts', 2, 7, 7, 0
);

INSERT INTO child_configs (
  name
) VALUES (
  'nat-t'
);

INSERT INTO child_configs (
  name, mode, start_action
) VALUES (
  'local-net', 4, 1
);

INSERT INTO peer_config_child_config (
  peer_cfg, child_cfg
) VALUES (
  1, 1
);

INSERT INTO peer_config_child_config (
  peer_cfg, child_cfg
) VALUES (
  2, 2
);

INSERT INTO traffic_selectors (
  type, start_addr, end_addr
) VALUES ( /* 10.1.0.0/16 */
  7, X'0a010000', X'0a01ffff'
);

INSERT INTO traffic_selectors (
  type, start_addr, end_addr
) VALUES ( /* 0.0.0.0/0 */
  7, X'00000000', X'ffffffff'
);

INSERT INTO traffic_selectors (
  type
) VALUES ( /* dynamic/32 */
  7
);

INSERT INTO child_config_traffic_selector (
  child_cfg, traffic_selector, kind
) VALUES (
  1, 2, 1
);

INSERT INTO child_config_traffic_selector (
	child_cfg, traffic_selector, kind
) VALUES (
  1, 3, 2
);

INSERT INTO child_config_traffic_selector (
	child_cfg, traffic_selector, kind
) VALUES (
  2, 1, 0
);

INSERT INTO child_config_traffic_selector (
	child_cfg, traffic_selector, kind
) VALUES (
  2, 1, 1
);
