GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MSG / V3-0-0

Constituent: msg_mt     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

MSG_cpu.c.vx-xxx-xxx File Reference

Return the IP address of the current embedded CPU (if possible). More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MSG_prvdefs.h"

Include dependency graph for MSG_cpu.c.vx-xxx-xxx:

Include dependency graph

Defines

#define MSG_L_BOOT   (256)
 Maximum recognized length of boot string.


Functions

void MSG_getIP (unsigned char *ip)
 Get the IP address of the current node (if possible).


Variables

char * sysBootLine
 Pointer to the embedded system boot line.


Detailed Description

Return the IP address of the current embedded CPU (if possible).

CVS $Id: MSG_cpu.c.vx-xxx-xxx,v 1.1 2004/12/12 06:45:40 apw Exp $
Author:
A.P.Waite

Function Documentation

void MSG_getIP unsigned char *  ip  ) 
 

Get the IP address of the current node (if possible).

Parameters:
ip (out) Pointer to four byte array, filled by this routine
In this embedded system version, MSG_getIP() will attempt to extract the current CPU's IP node from the VxWorks boot string. If anything goes wrong, this routine will fill in the IP address as '127.0.0.1' (i.e. "I'm me").

Note that the IP address (the four byte unsigned char array, the pointer to which is passed into this routine) is always filled in "network" order, irrespective of host architecture. It was done this way in the expectation that these numbers may end up in a database and that it would be important to use a consistent representation. To be specific, the IP address 127.0.0.1 is returned as follows: /code (ip + 0) = 127; (ip + 1) = 0; (ip + 2) = 0; (ip + 3) = 1; /endcode


Variable Documentation

char * sysBootLine
 

Pointer to the embedded system boot line.

Pointer to the embedded system boot line.


Generated on Sun Jul 17 10:01:18 2005 by doxygen 1.3.3