Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
kissdump.c
Package: export.zip [view]
Upload User: hepax88
Upload Date: 2007-01-03
Package Size: 1101k
Code Size: 1k
Category:
TCP/IP Stack
Development Platform:
Visual C++
- /* Tracing routines for KISS TNC
- * Copyright 1991 Phil Karn, KA9Q
- */
- #include "global.h"
- #include "mbuf.h"
- #include "kiss.h"
- #include "devparam.h"
- #include "ax25.h"
- #include "trace.h"
- void
- ki_dump(fp,bpp,check)
- FILE *fp;
- struct mbuf **bpp;
- int check;
- {
- int type;
- int val;
- fprintf(fp,"KISS: ");
- type = PULLCHAR(bpp);
- if(type == PARAM_DATA){
- fprintf(fp,"Datan");
- ax25_dump(fp,bpp,check);
- return;
- }
- val = PULLCHAR(bpp);
- switch(type){
- case PARAM_TXDELAY:
- fprintf(fp,"TX Delay: %lu msn",val * 10L);
- break;
- case PARAM_PERSIST:
- fprintf(fp,"Persistence: %u/256n",val + 1);
- break;
- case PARAM_SLOTTIME:
- fprintf(fp,"Slot time: %lu msn",val * 10L);
- break;
- case PARAM_TXTAIL:
- fprintf(fp,"TX Tail time: %lu msn",val * 10L);
- break;
- case PARAM_FULLDUP:
- fprintf(fp,"Duplex: %sn",val == 0 ? "Half" : "Full");
- break;
- case PARAM_HW:
- fprintf(fp,"Hardware %un",val);
- break;
- case PARAM_RETURN:
- fprintf(fp,"RETURNn");
- break;
- default:
- fprintf(fp,"code %u arg %un",type,val);
- break;
- }
- }
- int
- ki_forus(iface,bp)
- struct iface *iface;
- struct mbuf *bp;
- {
- struct mbuf *bpp;
- int i;
- if(bp->data[0] != PARAM_DATA)
- return 0;
- dup_p(&bpp,bp,1,AXALEN);
- i = ax_forus(iface,bpp);
- free_p(&bpp);
- return i;
- }