A couple of functions added to the plugin interface
authorAndreas Tonnesen <andreto@olsr.org>
Thu, 18 Nov 2004 21:58:46 +0000 (21:58 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Thu, 18 Nov 2004 21:58:46 +0000 (21:58 +0000)
src/olsr_plugin_io.h
src/plugin.c

index c3a5508..bd9242c 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: olsr_plugin_io.h,v 1.11 2004/11/15 12:31:58 kattemat Exp $
+ * $Id: olsr_plugin_io.h,v 1.12 2004/11/18 21:58:46 kattemat Exp $
  *
  */
 
@@ -38,6 +38,8 @@
  *                 GETD__ROUTINGTABLE added
  *                 GETD__HNA_ROUTES added
  *                 GETD__MID_SET added
+ *                 GETF__NET_RESERVE_BUFSPACE added 
+ *                 GETF__NET_OUTBUFFER_PUSH_RESERVED added
  *                 - Andreas
  */
 
 #define GETF__DEL_IFCHGF                           530
 #define GETF__APM_READ                             531
 #define GETF__NET_OUTBUFFER_PUSH                   532
+#define GETF__NET_RESERVE_BUFSPACE                 533
+#define GETF__NET_OUTBUFFER_PUSH_RESERVED          534
 
 #endif
index 67a33ce..85117d3 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: plugin.c,v 1.11 2004/11/15 12:31:58 kattemat Exp $
+ * $Id: plugin.c,v 1.12 2004/11/18 21:58:46 kattemat Exp $
  *
  */
 
@@ -237,6 +237,14 @@ olsr_plugin_io(int cmd, void *data, size_t size)
       ptr = &net_outbuffer_push;
       memcpy(data, &ptr, size);
       break;
+    case(GETF__NET_RESERVE_BUFSPACE):
+      ptr = &net_reserve_bufspace;
+      memcpy(data, &ptr, size);
+      break;
+    case(GETF__NET_OUTBUFFER_PUSH_RESERVED):
+      ptr = &net_outbuffer_push_reserved;
+      memcpy(data, &ptr, size);
+      break;
 
     default:
       return -1;