librtasevent_src/get_rtas_event.c File Reference

librtasevent routines to parse RTAS events More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "librtasevent.h"
#include "rtas_event.h"

Functions

int cleanup_rtas_event (struct rtas_event *re)
 free the structures related to a parsed rtas event
static struct
rtas_event_scn
add_re_subscn (struct rtas_event_scn *res, char *scn, int scn_id)
 Add a rtas_event_scn for a subsection of an existing section.
static struct
rtas_event_scn
add_re_other_scn (struct rtas_event_scn *res, char *scn, int scn_id)
 add a rtas_event_scn to the list of other sections
static struct
rtas_event_scn
add_re_scn (struct rtas_event *re, char *scn, int scn_id)
 Add a rtas event section to the section list.
static int re_scn_id (struct rtas_v6_scn_hdr *shdr)
 Convert the two character section id into an internal identifier.
static struct
rtas_event_scn
_get_re_scn (struct rtas_event_scn *res, int scn_id)
 the real work for retreiving rtas event sections
struct rtas_event_scnget_re_scn (struct rtas_event *re, int scn_id)
 find the specified section on the list of sections
static int parse_v6_src_scn (struct rtas_event *re, char *src_start)
 parse a version 6 rtas SRC section
static struct
rtas_event
parse_v6_rtas_event (struct rtas_event *re)
 parse a version 6 RTAS event
struct rtas_eventparse_rtas_event (char *buf, int buflen)
 parse an rtas event creating a populated rtas_event structure
struct rtas_event_scnrtas_get_vend_specific_scn (struct rtas_event *re)
 retrive a vendor specific section of the RTAS event


Detailed Description

Copyright (C) 2005 IBM Corporation Common Public License Version 1.0 (see COPYRIGHT)

Author:
Nathan Fontenot <nfont@austin.ibm.com>

Function Documentation

static struct rtas_event_scn* _get_re_scn ( struct rtas_event_scn res,
int  scn_id 
) [static, read]

_get_re_scn

Parameters:
res rtas_event_scn pointer at which to start search
scn_id section id to search for
Returns:
rtas_event_scn on success, NULL on failure

static struct rtas_event_scn* add_re_other_scn ( struct rtas_event_scn res,
char *  scn,
int  scn_id 
) [static, read]

add_re_other_scn

Parameters:
res rtas_event_scn to add the new rtas section to
scn pointer to the beginning of the section to be added
scn_id id of the section to be added
Returns:
pointer to the newly created rtas_event_scn

static struct rtas_event_scn* add_re_scn ( struct rtas_event re,
char *  scn,
int  scn_id 
) [static, read]

add_re_scn

Parameters:
re rtas_event pointer to add this section to
scn pointer to start of rtas event section
scn_id id of the section to be added return pointer to newly created rtas_event_scn

static struct rtas_event_scn* add_re_subscn ( struct rtas_event_scn res,
char *  scn,
int  scn_id 
) [static, read]

add_re_subscn

Parameters:
res rtas_event_scn pointer to section this is to be subsection of
scn start of the rtas event section to add
scn_id section id of section to be added
Returns:
pointer to newly added rtas_event_scn

int cleanup_rtas_event ( struct rtas_event re  ) 

cleanup_rtas_event

Parameters:
re rtas_event pointer
Returns:
0 on success, !0 on failure

struct rtas_event_scn* get_re_scn ( struct rtas_event re,
int  scn_id 
) [read]

get_re_scn

NOTE: this function has been split just so we can have common place to check for NULL 're' pointers (no sense checking everywhere we call this).

Parameters:
re rtas_event pointer
scn_id id of the section to find
Returns:
rtas_event_scn on success, NULL on failure

struct rtas_event* parse_rtas_event ( char *  buf,
int  buflen 
) [read]

parse_rtas_event

Parameters:
buf buffer containing the binary RTAS event
buflen length of the buffer 'buf'
Returns:
pointer to rtas_event

static struct rtas_event* parse_v6_rtas_event ( struct rtas_event re  )  [static, read]

parse_v6_rtas_event

Parameters:
re rtas_event pointer
Returns:
rtas_event pointer on success, NULL on failure

static int parse_v6_src_scn ( struct rtas_event re,
char *  src_start 
) [static]

parse_v6_src_scn

Parameters:
re rtas_event pointer
src_start pointer to beginning of SRC section
Returns:
0 on success, !0 on failure

static int re_scn_id ( struct rtas_v6_scn_hdr shdr  )  [static]

re_scn_id

Parameters:
shdr rtas_v6_scn_hdr pointer
Returns:
section identifier on success, -1 on failure

struct rtas_event_scn* rtas_get_vend_specific_scn ( struct rtas_event re  )  [read]

rtas_get_vend_specific

Parameters:
re parsed rtas event
Returns:
reference to a rtas_event_scn on success, NULL on failure


Generated on Sat Sep 22 08:52:51 2007 for librtasevent by  doxygen 1.5.3