#include <vxWorks.h>
#include <stdio.h>
#include <string.h>
/*

  nm /tmp/andersb/mc | grep mc_linktimestamp
  objdump -s --start-address=0x01688410 --stop-address=0x01688418 mc
  objdump -s --start-address=0x016883f0 --stop-address=0x01688406 mc 

*/


static char *(*unlinked)() = (char *(*)())0x0;
extern char *mc_linktimestamp();
static char *hijacked_mc_linktimestamp = "#14:34:22/mar 11 2011#";

int hijackOK()
{
  if (mc_linktimestamp == unlinked) {
    printf("'mc_linktimestamp' symbol not found\n");
    return 0;
  } else if (strcmp(mc_linktimestamp(), hijacked_mc_linktimestamp)) {
    printf("'mc_linktimestamp' strings differ ('%s' != '%s')\n",
	   mc_linktimestamp(), hijacked_mc_linktimestamp);
    return 0;
  } else {
    return 1;
  }     
}