+static void
+kdebug_sadb_session_id(ext)
+ struct sadb_ext *ext;
+{
+ struct sadb_session_id *p = (__typeof__(p))ext;
+
+ /* sanity check */
+ if (ext == NULL)
+ panic("kdebug_sadb_session_id: NULL pointer was passed.\n");
+
+ printf("sadb_session_id{ id0=%llx, id1=%llx}\n",
+ p->sadb_session_id_v[0],
+ p->sadb_session_id_v[1]);
+
+ return;
+}
+
+static void
+kdebug_sadb_sastat(ext)
+ struct sadb_ext *ext;
+{
+ struct sadb_sastat *p = (__typeof__(p))ext;
+ struct sastat *stats;
+ int i;
+
+ /* sanity check */
+ if (ext == NULL)
+ panic("kdebug_sadb_sastat: NULL pointer was passed.\n");
+
+ printf("sadb_sastat{ dir=%u num=%u\n",
+ p->sadb_sastat_dir, p->sadb_sastat_list_len);
+ stats = (__typeof__(stats))(p + 1);
+ for (i = 0; i < p->sadb_sastat_list_len; i++) {
+ printf(" spi=%x,\n",
+ stats[i].spi);
+ }
+ printf("}\n");
+
+ return;
+}
+