]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/blobdiff - ti/runtime/netapi/netapi.h
added version string/id
[keystone-rtos/netapi.git] / ti / runtime / netapi / netapi.h
index d1dd141bad5cda56fe06e6fc4ba491136285e074..8a95dfdf648c8a0e702c35164dd50d49fc7800b7 100755 (executable)
 #include <stddef.h>\r
 #include <string.h>\r
 \r
+/**\r
+ * @brief   This is the NWAL LLD Version. Versions numbers are encoded in the following \r
+ * format:\r
+ *  0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD)\r
+ */\r
+#define NETAPI_VERSION_ID                   (0x01000002)\r
+\r
+/**\r
+ * @brief   This is the version string which describes the NWAL LLD along with the\r
+ * date and build information.\r
+ */\r
+#define NETAPI_VERSION_STR      "NETAPI Revision: 01.00.00.02"\r
+\r
+\r
 /**\r
  *   @defgroup netapi_structures  NETAPI data structures\r
  */\r
@@ -116,7 +130,18 @@ typedef struct NETAPI_CFG_Tag
  int def_heap_n_descriptors;   //# descriptors+buffers in default heap\r
  int def_heap_n_zdescriptors;  //# zero len descriptors in defaule heap\r
  int def_heap_buf_size;        //size of buffers in default heap\r
+                               //=MAX amount of area for packet data\r
+ int def_heap_tailroom_size;   //size of tailroom in reserve \r
+ int def_heap_extra_size;      //size of extra space at end of buffer\r
 }NETAPI_CFG_T;\r
+/* note:\r
+   each buffer will be allocated:  def_heap_buf_size+def_heap_extra_size bytes\r
+   each descriptor attached to these buffers will have original_pkt_len of:\r
+      def_heap_buf_size.\r
+   for default RX flow,  for rx packet, the bufptr  will be def_flow_pkt_rx_offset.\r
+   for detault RX flow,  threshold (ie max # of bytes in buffer) will be:\r
+       def_heap_buf_size - def_heap_tailroom_size-def_flow_pkt_rx_offset\r
+*/\r
 \r
 \r
 \r
@@ -383,4 +408,7 @@ int netapi_closeHeap(NETAPI_T p, Pktlib_HeapHandle h);
  */\r
 void netapi_poll_heapGarbage(NETAPI_T p);\r
 \r
+static inline int netapi_get_version(void) {return NETAPI_VERSION_ID;}\r
+static inline char * netapi_get_version_string(void) { return NETAPI_VERSION_STR;}\r
+\r
 #endif\r