-BUILD_NUM = 94
+BUILD_NUM = 1295
char *IPStack_ReadDir(tVFS_Node *Node, int Pos)
{
tInterface *iface;
- char name[] = "ip0\0\0\0";
+ char *name;
ENTER("pNode iPos", Node, Pos);
// Traverse the list
return NULL;
}
+ name = malloc(6);
+ name[0] = 'i';
+ name[1] = 'p';
+
// Create the name
Pos = iface->Node.ImplInt;
- if(Pos < 10)
+ if(Pos < 10) {
name[2] = '0' + Pos;
+ name[3] = '\0';
+ }
else if(Pos < 100) {
name[2] = '0' + Pos/10;
name[3] = '0' + Pos%10;
+ name[4] = '\0';
}
else {
name[2] = '0' + Pos/100;
name[3] = '0' + (Pos/10)%10;
name[4] = '0' + Pos%10;
+ name[5] = '\0';
}
LEAVE('s', name);
// Return the pre-generated name
- return strdup(name);
+ return name;
}
/**
* \}
*/
+
// === INCLUDE SUB-SECTIONS ===
+#include "udi_log.h" // Management Metalanguage
+#include "udi_attr.h" // Management Metalanguage
+#include "udi_cb.h" // Management Metalanguage
#include "udi_meta_mgmt.h" // Management Metalanguage
#include "udi_init.h" // Init
--- /dev/null
+/**
+ * \file udi_attr.h
+ */
+#ifndef _UDI_ATTR_H_
+#define _UDI_ATTR_H_
+
+typedef struct udi_instance_attr_list_s udi_instance_attr_list_t;
+typedef udi_ubit8_t udi_instance_attr_type_t;
+
+/* Instance attribute limits */
+#define UDI_MAX_ATTR_NAMELEN 32
+#define UDI_MAX_ATTR_SIZE 64
+
+/**
+ * \brief Instance Attribute
+ */
+struct udi_instance_attr_list_s
+{
+ char attr_name[UDI_MAX_ATTR_NAMELEN];
+ udi_ubit8_t attr_value[UDI_MAX_ATTR_SIZE];
+ udi_ubit8_t attr_length;
+ udi_instance_attr_type_t attr_type;
+};
+
+
+/**
+ * \brief Instance Attribute Types
+ * \see ::udi_instance_attr_type_t
+ */
+enum
+{
+ UDI_ATTR_NONE,
+ UDI_ATTR_STRING,
+ UDI_ATTR_ARRAY8,
+ UDI_ATTR_UBIT32,
+ UDI_ATTR_BOOLEAN,
+ UDI_ATTR_FILE
+};
+
+
+#endif
--- /dev/null
+/**
+ * \file udi_cb.h
+ */
+#ifndef _UDI_CB_H_
+#define _UDI_CB_H_
+
+typedef struct udi_cb_s udi_cb_t;
+
+/**
+ * \brief Describes a generic control block
+ * \note Semi-opaque
+ */
+struct udi_cb_s
+{
+ /**
+ * \brief Channel associated with the control block
+ */
+ udi_channel_t channel;
+ /**
+ * \brief Current state
+ * \note Driver changable
+ */
+ void *context;
+ /**
+ * \brief CB's scratch area
+ */
+ void *scratch;
+ /**
+ * \brief ???
+ */
+ void *initiator_context;
+ /**
+ * \brief Request Handle?
+ */
+ udi_origin_t origin;
+};
+
+
+#endif
typedef struct udi_chan_context_s udi_chan_context_t;
typedef struct udi_child_chan_context_s udi_child_chan_context_t;
+typedef void udi_op_t(void);
+typedef udi_op_t * const udi_ops_vector_t;
+
/**
* \brief UDI Initialisation Structure
*
// ===
// ===
-/**
- * \brief
- */
-struct udi_init_context_s
-{
- udi_index_t region_idx;
- udi_limits_t limits;
-};
-
/**
* \brief Environement Imposed Limits
*/
udi_ubit32_t min_timer_res;
};
+/**
+ * \brief Primary Region Context data
+ */
+struct udi_init_context_s
+{
+ udi_index_t region_idx;
+ udi_limits_t limits;
+};
+
/**
* \brief Channel context data
*/
--- /dev/null
+/**
+ * \file udi_log.h
+ */
+#ifndef _UDI_LOG_H_
+#define _UDI_LOG_H_
+
+// Required Files
+#include "udi_cb.h"
+
+/**
+ * \brief Trace Event
+ */
+typedef udi_ubit32_t udi_trevent_t;
+
+/**
+ * \brief Log Callback
+ */
+typedef void udi_log_write_call_t(udi_cb_t *gcb, udi_status_t correlated_status);
+
+/**
+ * \name Log Severities
+ * \brief Values for severity
+ * \{
+ */
+#define UDI_LOG_DISASTER 1
+#define UDI_LOG_ERROR 2
+#define UDI_LOG_WARNING 3
+#define UDI_LOG_INFORMATION 4
+/**
+ * \}
+ */
+
+
+#endif
// === CONSTANTS ===
#define NULL ((void*)0)
-#define NUM_TERMS 1
+#define NUM_TERMS 4
#define DEFAULT_TERMINAL "/Devices/VTerm/0"
#define DEFAULT_SHELL "/Acess/SBin/login"