/home/hillier_g/checkout/most4linux/libnetservices/src/linux/extensions.c

00001 /*
00002  *  Copyright(c) Siemens AG, Muenchen, Germany, 2005, 2006, 2007
00003  *                           Bernhard Walle <bernhard.walle@gmx.de>
00004  *                           Gernot Hillier <gernot.hillier@siemens.com>
00005  *                           All rights reserved.
00006  *
00007  * ----------------------------------------------------------------------------
00008  * The contents of this file are subject to the Mozilla Public License
00009  * Version 1.1 (the "License"); you may not use this file except in
00010  * compliance with the License. You may obtain a copy of the License at
00011  * http://www.mozilla.org/MPL/
00012  * 
00013  * Software distributed under the License is distributed on an "AS IS"
00014  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
00015  * License for the specific language governing rights and limitations
00016  * under the License.
00017  *
00018  * The Original Code is Siemens code.
00019  * 
00020  * The Initial Developer of the Original Code is Siemens AG.
00021  * Portions created by the Initial Developer are Copyright (C) 2005-06
00022  * the Initial Developer. All Rights Reserved.
00023  * ----------------------------------------------------------------------------
00024  */
00025 #include <errno.h>
00026 #include <signal.h>
00027 #include <pthread.h>
00028 #include <semaphore.h>
00029 #include <time.h>
00030 #include <assert.h>
00031 #include <unistd.h>
00032 #include <sys/types.h>
00033 #include <sys/ioctl.h>
00034 
00035 #include <adjust.h>
00036 #include <mostdef1.h>
00037 #include <mostns1.h>
00038 #include <mostnetsdll.h>
00039 #include <par_cp.h>
00040 
00041 #include "global.h"
00042 #include "most-netservice.h"
00043 #include "service.h"
00044 
00045 
00046 /* -------------------------------------------------------------------------- */
00047 void LinuxPrintRoutingTable(void)
00048 {
00049     int  i, j;
00050     unsigned char buffer[128];
00051 
00052     ParReadBlock(0, 128, buffer);
00053 
00054     pthread_mutex_lock(&g_nets_mutex);
00055     printf("======= TX (Network Output) =======\n");
00056     for (i = 0; i < 16; i++) {
00057         printf("%2X:   ", i*8);
00058         for (j = 0; j < 8; j++) {
00059             printf("%2X  ", buffer[i*8 + j]);
00060         }
00061 
00062         printf("\n");
00063         if (i == 7) {
00064             printf("\n======= RX (Source Port Output) =======\n");
00065         }
00066     }
00067     pthread_mutex_unlock(&g_nets_mutex);
00068 }
00069 

Generated on Fri Mar 9 14:48:59 2007 for MOST Adaption Layer for Netservices Library by  doxygen 1.5.0