File: rommon_var.h

package info (click to toggle)
dynamips 0.2.7-0.2.8RC2-4
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 3,856 kB
  • ctags: 9,893
  • sloc: ansic: 69,846; makefile: 238; sh: 169; perl: 20
file content (41 lines) | stat: -rw-r--r-- 898 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Cisco router simulation platform.
 * Copyright (c) 2007 Christophe Fillot (cf@utc.fr)
 *
 * ROMMON Environment Variables.
 */

#ifndef __ROMMON_VAR_H__
#define __ROMMON_VAR_H__

/* ROMMON variable */
struct rommon_var {
   struct rommon_var *next;
   char *name;
   char *value;
};

/* List of ROMMON variables */
struct rommon_var_list {
   char *filename;
   struct rommon_var *var_list;
};

/* Load file containing ROMMON variables */
int rommon_load_file(struct rommon_var_list *rvl);

/* Add a new variable */
int rommon_var_add(struct rommon_var_list *rvl,char *name,char *value);

/* 
 * Add a new variable, specified at the format: var=value.
 * The string is modified.
 */
int rommon_var_add_str(struct rommon_var_list *rvl,char *str);

/* Get the specified variable */
int rommon_var_get(struct rommon_var_list *rvl,char *name,
                   char *buffer,size_t len);

#endif