+static void
+kdebug_sadb_x_sa2(ext)
+struct sadb_ext *ext;
+{
+ struct sadb_x_sa2 *sa2 = (struct sadb_x_sa2 *)ext;
+
+ /* sanity check */
+ if (ext == NULL) {
+ panic("kdebug_sadb_x_sa2: NULL pointer was passed.\n");
+ }
+
+ printf("sadb_x_sa2{ mode=%u reqid=%u\n",
+ sa2->sadb_x_sa2_mode, sa2->sadb_x_sa2_reqid);
+ printf(" reserved1=%u reserved2=%u sequence=%u }\n",
+ sa2->sadb_x_sa2_reserved1, sa2->sadb_x_sa2_reserved2,
+ sa2->sadb_x_sa2_sequence);
+
+ return;
+}
+
+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;
+}
+