Vector

Generic vector routines, used by VTY internally. More...

## Functions

vector | vector_init (unsigned int size)
void | vector_only_wrapper_free (vector v)
void | vector_only_index_free (void *index)
void | vector_free (vector v)
vector | vector_copy (vector v)
void | vector_ensure (vector v, unsigned int num)
int | vector_empty_slot (vector v)
int | vector_set (vector v, void *val)
int | vector_set_index (vector v, unsigned int i, void *val)
void * | vector_lookup (vector v, unsigned int i)
void * | vector_lookup_ensure (vector v, unsigned int i)
void | vector_unset (vector v, unsigned int i)
unsigned int | vector_count (vector v)

## Variables

void * | tall_vty_vec_ctx

## Detailed Description

Generic vector routines, used by VTY internally.

## Function Documentation

## vector_copy()

vector vector_copy | ( | vector | v | ) |

References _vector::active, _vector::alloced, _vector::index, and tall_vty_vec_ctx.

Referenced by cmd_complete_command_real(), cmd_describe_command_real(), cmd_execute_command_real(), and cmd_execute_command_strict().

## vector_count()

unsigned int vector_count | ( | vector | v | ) |

References _vector::active, and _vector::index.

Referenced by cmd_complete_command(), cmd_describe_command(), cmd_execute_command(), and vty_dump_element().

## vector_empty_slot()

int vector_empty_slot | ( | vector | v | ) |

References _vector::active, and _vector::index.

Referenced by vector_set().

## vector_ensure()

void vector_ensure | ( | vector | v,
|  | unsigned int | num
| ) |  |

References _vector::alloced, _vector::index, tall_vty_vec_ctx, and vector_ensure().

Referenced by vector_ensure(), vector_lookup_ensure(), vector_set(), and vector_set_index().

## vector_free()

void vector_free | ( | vector | v | ) |

References _vector::index.

Referenced by cmd_complete_command(), cmd_complete_command_real(), cmd_describe_command(), cmd_describe_command_real(), cmd_execute_command(), cmd_execute_command_real(), cmd_execute_command_strict(), cmd_free_strvec(), and vty_describe_command().

## vector_init()

vector vector_init | ( | unsigned int | size | ) |

References _vector::active, _vector::alloced, _vector::index, and tall_vty_vec_ctx.

Referenced by cmd_complete_command(), cmd_complete_command_real(), cmd_describe_command(), cmd_describe_command_real(), cmd_execute_command(), cmd_init(), cmd_make_descvec(), cmd_make_strvec2(), install_node_bare(), vty_describe_command(), vty_init(), and vty_init_vtysh().

## vector_lookup()

void* vector_lookup | ( | vector | v,
|  | unsigned int | i
| ) |  |

References _vector::active, and _vector::index.

Referenced by cmd_complete_command(), cmd_describe_command(), and cmd_execute_command().

## vector_lookup_ensure()

void* vector_lookup_ensure | ( | vector | v,
|  | unsigned int | i
| ) |  |

References _vector::index, and vector_ensure().

## vector_only_index_free()

void vector_only_index_free | ( | void * | index | ) |

Referenced by vty_complete_command().

## vector_only_wrapper_free()

void vector_only_wrapper_free | ( | vector | v | ) |

Referenced by cmd_complete_command_real().

## vector_set()

int vector_set | ( | vector | v,
|  | void * | val
| ) |  |

References _vector::active, _vector::index, vector_empty_slot(), and vector_ensure().

Referenced by cmd_complete_command_real(), cmd_describe_command_real(), cmd_make_descvec(), cmd_make_strvec2(), install_element(), vty_complete_command(), and vty_describe_command().

## vector_set_index()

int vector_set_index | ( | vector | v,
|  | unsigned int | i,
|  | void * | val
| ) |  |

References _vector::active, _vector::index, and vector_ensure().

Referenced by cmd_complete_command(), cmd_describe_command(), cmd_execute_command(), install_node_bare(), and vty_create().

## vector_unset()

void vector_unset | ( | vector | v,
|  | unsigned int | i
| ) |  |

References _vector::active, _vector::alloced, and _vector::index.

Referenced by vty_close().

## Variable Documentation

## tall_vty_vec_ctx

void* tall_vty_vec_ctx

Referenced by vector_copy(), vector_ensure(), vector_init(), and vty_init().