2
symtab.c: baseline private symbol table for ION stack
3
with definition of sm_FindFunction(), which
6
Note that this is a canonical private symbol
7
table, provided as a model for mission-
8
specific symbol tables. A mission desiring
9
to override this file should place a copy
10
of it in a mission-specific "include"
11
directory, modify that copy, and modify
12
the ici Makefile to ensure that the compiler
13
looks for symtab.c in that mission-specific
14
include directory rather than in ici/library.
16
Author: Scott Burleigh, JPL
18
Copyright (c) 2006, California Institute of Technology.
19
ALL RIGHTS RESERVED. U.S. Government Sponsorship
23
extern int ionadmin(int, int, int, int, int, int, int, int, int, int);
24
extern int ionexit(int, int, int, int, int, int, int, int, int, int);
25
extern int ltpadmin(int, int, int, int, int, int, int, int, int, int);
26
extern int bpadmin(int, int, int, int, int, int, int, int, int, int);
27
extern int ipnadmin(int, int, int, int, int, int, int, int, int, int);
28
extern int rfxclock(int, int, int, int, int, int, int, int, int, int);
29
extern int ltpclock(int, int, int, int, int, int, int, int, int, int);
30
extern int ltpmeter(int, int, int, int, int, int, int, int, int, int);
31
extern int bpclock(int, int, int, int, int, int, int, int, int, int);
32
extern int ipnfw(int, int, int, int, int, int, int, int, int, int);
33
extern int ltpcli(int, int, int, int, int, int, int, int, int, int);
34
extern int ltpclo(int, int, int, int, int, int, int, int, int, int);
35
extern int udplsi(int, int, int, int, int, int, int, int, int, int);
36
extern int udplso(int, int, int, int, int, int, int, int, int, int);
37
extern int aoslsi(int, int, int, int, int, int, int, int, int, int);
38
extern int aoslso(int, int, int, int, int, int, int, int, int, int);
39
extern int udpcli(int, int, int, int, int, int, int, int, int, int);
40
extern int udpclo(int, int, int, int, int, int, int, int, int, int);
41
extern int tcpcli(int, int, int, int, int, int, int, int, int, int);
42
extern int tcpclo(int, int, int, int, int, int, int, int, int, int);
43
extern int brsccla(int, int, int, int, int, int, int, int, int, int);
44
extern int brsscla(int, int, int, int, int, int, int, int, int, int);
45
extern int ipnadminep(int, int, int, int, int, int, int, int, int, int);
55
FUNCPTR sm_FindFunction(char *name, int *priority, int *stackSize)
57
static SymTabEntry symbols[] =
59
{ "ionadmin", (FUNCPTR) ionadmin, ICI_PRIORITY, 32768 },
60
{ "ionexit", (FUNCPTR) ionexit, ICI_PRIORITY, 32768 },
61
{ "ltpadmin", (FUNCPTR) ltpadmin, ICI_PRIORITY, 32768 },
62
{ "bpadmin", (FUNCPTR) bpadmin, ICI_PRIORITY, 32768 },
63
{ "ipnadmin", (FUNCPTR) ipnadmin, ICI_PRIORITY, 32768 },
64
{ "rfxclock", (FUNCPTR) rfxclock, ICI_PRIORITY, 32768 },
65
{ "ltpclock", (FUNCPTR) ltpclock, ICI_PRIORITY, 32768 },
66
{ "ltpmeter", (FUNCPTR) ltpmeter, ICI_PRIORITY, 32768 },
67
{ "bpclock", (FUNCPTR) bpclock, ICI_PRIORITY, 4096 },
68
{ "ipnfw", (FUNCPTR) ipnfw, ICI_PRIORITY, 65536 },
69
{ "ltpcli", (FUNCPTR) ltpcli, ICI_PRIORITY, 32768 },
70
{ "ltpclo", (FUNCPTR) ltpclo, ICI_PRIORITY, 32768 },
71
{ "udplsi", (FUNCPTR) udplsi, ICI_PRIORITY, 32768 },
72
{ "udplso", (FUNCPTR) udplso, ICI_PRIORITY, 32768 },
73
{ "aoslsi", (FUNCPTR) aoslsi, ICI_PRIORITY, 32768 },
74
{ "aoslso", (FUNCPTR) aoslso, ICI_PRIORITY, 32768 },
75
{ "udpcli", (FUNCPTR) udpcli, ICI_PRIORITY, 32768 },
76
{ "udpclo", (FUNCPTR) udpclo, ICI_PRIORITY, 32768 },
77
{ "tcpcli", (FUNCPTR) tcpcli, ICI_PRIORITY, 4096 },
78
{ "tcpclo", (FUNCPTR) tcpclo, ICI_PRIORITY, 4096 },
79
{ "brsccla", (FUNCPTR) brsccla, ICI_PRIORITY, 32768 },
80
{ "brsscla", (FUNCPTR) brsscla, ICI_PRIORITY, 32768 },
81
{ "ipnadminep", (FUNCPTR) ipnadminep, ICI_PRIORITY, 24576 }
83
static int numSymbols = sizeof symbols / sizeof(SymTabEntry);
89
for (i = 0; i < numSymbols; i++)
91
if (strcmp(name, symbols[i].name) == 0)
93
if (*priority == 0) /* Use default. */
95
*priority = symbols[i].priority;
98
if (*stackSize == 0) /* Use default. */
100
*stackSize = symbols[i].stackSize;
103
return symbols[i].funcPtr;