summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-01-12 19:34:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-01-12 19:34:09 +0000
commit74a4a7a1ff9ad79302224ff8ec6b01c56b44d523 (patch)
treef62d2e48fa13e7333438edbb729627cef1f9faa4
parentb873a39ae3f72d3c6c9c1e2078293bafaae8db07 (diff)
Add a callback function that gets called when an LDC connection is established.
-rw-r--r--sys/arch/sparc64/dev/ldc.c4
-rw-r--r--sys/arch/sparc64/dev/ldcvar.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/ldc.c b/sys/arch/sparc64/dev/ldc.c
index 85eb3883bf5..b13f345ec7b 100644
--- a/sys/arch/sparc64/dev/ldc.c
+++ b/sys/arch/sparc64/dev/ldc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldc.c,v 1.1 2009/01/10 17:13:28 kettenis Exp $ */
+/* $OpenBSD: ldc.c,v 1.2 2009/01/12 19:34:08 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -137,6 +137,8 @@ ldc_rx_ctrl_rtr(struct ldc_conn *lc, struct ldc_pkt *lp)
}
DPRINTF(("CTRL/INFO/RTR\n"));
ldc_send_rdx(lc);
+ if (lc->lc_start)
+ lc->lc_start(lc);
break;
case LDC_ACK:
diff --git a/sys/arch/sparc64/dev/ldcvar.h b/sys/arch/sparc64/dev/ldcvar.h
index 618265c7761..a3a67b2d177 100644
--- a/sys/arch/sparc64/dev/ldcvar.h
+++ b/sys/arch/sparc64/dev/ldcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldcvar.h,v 1.1 2009/01/10 17:13:28 kettenis Exp $ */
+/* $OpenBSD: ldcvar.h,v 1.2 2009/01/12 19:34:08 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -89,6 +89,7 @@ struct ldc_conn {
void *lc_sc;
void (*lc_reset)(struct ldc_conn *);
+ void (*lc_start)(struct ldc_conn *);
void (*lc_rx_data)(struct ldc_conn *, struct ldc_pkt *);
};