1 |
/* |
2 |
* Cisco C7200 (Predator) simulation platform. |
3 |
* Copyright (c) 2006 Christophe Fillot. All rights reserved. |
4 |
* |
5 |
* Cisco EEPROM manipulation functions. |
6 |
*/ |
7 |
|
8 |
#ifndef __CISCO_EEPROM_H__ |
9 |
#define __CISCO_EEPROM_H__ |
10 |
|
11 |
#include "utils.h" |
12 |
|
13 |
/* Get a byte from an EEPROM */ |
14 |
int cisco_eeprom_get_byte(m_uint16_t *eeprom,size_t eeprom_len, |
15 |
size_t offset,m_uint8_t *val); |
16 |
|
17 |
/* Set a byte to an EEPROM */ |
18 |
int cisco_eeprom_set_byte(m_uint16_t *eeprom,size_t eeprom_len, |
19 |
size_t offset,m_uint8_t val); |
20 |
|
21 |
/* Get an EEPROM region */ |
22 |
int cisco_eeprom_get_region(m_uint16_t *eeprom,size_t eeprom_len, |
23 |
size_t offset,m_uint8_t *data,size_t data_len); |
24 |
|
25 |
/* Set an EEPROM region */ |
26 |
int cisco_eeprom_set_region(m_uint16_t *eeprom,size_t eeprom_len, |
27 |
size_t offset,m_uint8_t *data,size_t data_len); |
28 |
|
29 |
/* Dump a Cisco EEPROM with format version 4 */ |
30 |
void cisco_eeprom_v4_dump(m_uint16_t *eeprom,size_t eeprom_len); |
31 |
|
32 |
/* Returns the offset of the specified field */ |
33 |
int cisco_eeprom_v4_find_field(m_uint16_t *eeprom,size_t eeprom_len, |
34 |
m_uint8_t field_type,size_t *field_offset); |
35 |
|
36 |
#endif |
37 |
|