• 管理员
    了解作者
  • WINDOWS
    开发工具
  • 1.8MB
    文件大小
  • bz2
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 622
    下载次数
  • 2003-08-02 00:00
    上传日期
一个unix下面的开源的wap和sms网关的开发包
gateway-1.2.1
  • gateway-1.2.1
  • wmlscript
  • wsbc.c
    31.2KB
  • wsalloc.c
    5.2KB
  • wsbuffer.c
    1.5KB
  • lexer.txt
    834B
  • wsstdlib.c
    7.7KB
  • wsstree.h
    16.7KB
  • wsieee754.h
    2.5KB
  • wsgram.c
    63.6KB
  • wsbuffer.h
    2.2KB
  • make-op-table.in
    777B
  • wsint.h
    6KB
  • wmlsdasm.c
    7.4KB
  • wsutf8.h
    3.3KB
  • wsasm.h
    9.1KB
  • wslexer.c
    32.9KB
  • wmlsc.1
    392B
  • wsencode.h
    4.9KB
  • wserror.c
    6.3KB
  • wsopcodes.h
    6.1KB
  • wsopt.h
    594B
  • wsstream_data.c
    1.5KB
  • wsgram.y
    18.8KB
  • wsieee754.c
    8.2KB
  • wsasm.c
    26.5KB
  • wsstream_file.c
    4.2KB
  • ws.c
    13.9KB
  • wshash.h
    2.1KB
  • wshash.c
    3.1KB
  • wsstdlib.h
    1.5KB
  • wsencode.c
    5.7KB
  • wsbc.h
    8.8KB
  • wsalloc.h
    4.6KB
  • .cvsignore
    15B
  • wmlsc.c
    7.2KB
  • wsstream.c
    1.8KB
  • wmlsdasm.1
    408B
  • wsfalloc.c
    2.5KB
  • wsstream.h
    3.5KB
  • wsfalloc.h
    2.2KB
  • wsgram.h
    2KB
  • wsopt.c
    8.8KB
  • ws.h
    7.2KB
  • wsstree.c
    43.2KB
  • wserror.h
    2.6KB
  • wsutf8.c
    7.7KB
  • utils
  • seewbmp.c
    6.7KB
  • start-stop-daemon.8
    4.4KB
  • makedist
    967B
  • kannel-nag
    1.5KB
  • changelog-report
    644B
  • find-long-lines
    669B
  • wbmp.c
    2KB
  • start-stop-daemon.c
    20.7KB
  • accesslog_parser.pl
    3.1KB
  • OTAbitmap.c
    2.3KB
  • run_kannel_box.8
    860B
  • attgetopt.c
    1.9KB
  • kannel-log-summary
    3.1KB
  • utf8map.pl
    1.9KB
  • kannel-redhat.init.d
    1.8KB
  • wbmp.h
    2.4KB
  • chlog-stats
    596B
  • OTAbitmap.h
    1.8KB
  • run_kannel_box.c
    8.3KB
  • pixmapgen.pl
    576B
  • kannel-stable-rh7.spec
    3.7KB
  • .cvsignore
    41B
  • build-cygwin-package
    897B
  • win1257unicode.txt
    1023B
  • daily-patch
    1.1KB
  • source-stats
    967B
  • kannel-stable-rh6x.spec
    3.6KB
  • run-checks
    490B
  • seewbmp.1
    465B
  • kannel-init.d
    1.9KB
  • contrib
  • php-admin
  • index.html
    1.4KB
  • sendota.php
    3.8KB
  • functions.inc
    831B
  • sendsms.php
    1.1KB
  • admin.php
    1.1KB
  • config.inc
    394B
  • sendvcard.php
    1.7KB
  • README
    198B
  • webalizer
  • split.pl
    661B
  • stats.sh
    861B
  • converte.pl
    1.5KB
  • multi-line.pl
    763B
  • ReadMe
    1.1KB
  • webalizer.conf
    23.4KB
  • web
  • index.html
    269B
  • menu.html
    1.1KB
  • sendsms.php
    15KB
  • form.php
    16KB
内容介绍
Packages sent and received by the fakewap program This file documents the packages sent and received by the fakewap program. Fakewap tests a WAP gateway by sending UDP packages to make simple requests for WML pages. It is meant for stress testing the gateway. The basic session looks like this (WTP is the transaction and WSP is the session protocol layer): A) Fakewap -> Gateway WTP: Invoke PDU WSP: Connect PDU B) Gateway -> Fakewap WTP: Result PDU WSP: ConnectReply PDU C) Fakewap -> Gateway WTP: Ack PDU D) Fakewap -> Gateway WTP: Invoke PDU WSP: Get PDU E) Gateway -> Fakewap WTP: Result PDU WSP: Reply PDU F) Fakewap -> Gateway WTP: Ack PDU G) Fakewap -> Gateway WTP: Invoke PDU WSP: Disconnect PDU Packets A-C open a WAP session. Packets D-F fetch a WML page. Packet G closes the session. The fakewap program does not need to understand the WAP protocols as such, it just needs to generate packets in the right order with a little variation, and keep track of which packets have received and which have not received responses. The detailed formats of the packets are listed below. Note that bits are numbered in the WAP specification with the most significant bit being 0, not 7. Unspecified bits are filled in fakewap or the gateway. Packet A) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 0 | | | | | | | | \ TID, fakewap ------------+---+---+---+---+---+---+---+---| |-- generates octet 3 | | | | | | | | | / linearly ------------+---+---+---+---+---+---+---+---| octet 4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | ------------+---+---+---+---+---+---+---+---| octet 6 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| Fakewap generates a new TID (transaction ID) for each A) packet is generates. TIDs are generated linearly. If a 15 bit counter overflows, fakewap can, for now, stop sending anything. Packet B) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 1 | | | | | | | | \ TID, gateway ------------+---+---+---+---+---+---+---+---| | copies from octet 3 | | | | | | | | | / A) packet ------------+---+---+---+---+---+---+---+---| octet 4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 5 | | | | | | | | | \ ------------+---+---+---+---+---+---+---+---| | Session ID, ... | | | | | | | | | | generated by ------------+---+---+---+---+---+---+---+---| | gateway octet n | | | | | | | | | / ------------+---+---+---+---+---+---+---+---| octet n+1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet n+2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| Fakewap needs to extract the TID and match it to the list of A) packets it has sent that have not yet received a B) packet in response. It also needs to extract and store the Session ID because that is needed by G). The Session ID is encoded in the uintvar format specified by the WSP specification, section 8.1.2 in the WAP 1.1 version. Code for decoding it is in gw/wsp.c (should be moved elsewhere). Packet C) and F) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 0 | | | | | | | | \ TID, must be ------------+---+---+---+---+---+---+---+---| | same as in octet 3 | | | | | | | | | / A) or D) packet. ------------+---+---+---+---+---+---+---+---| Packets C) and F) are identical, except C) gets its TID from an A) packet, and F) from a D) packet. Packet D) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 0 | | | | | | | | \ TID, fakewap ------------+---+---+---+---+---+---+---+---| | generates a octet 3 | | | | | | | | | / new one ------------+---+---+---+---+---+---+---+---| octet 4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 5 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 6 | | | | | | | | | \ ------------+---+---+---+---+---+---+---+---| | ... | | | | | | | | | | URI length ------------+---+---+---+---+---+---+---+---| | octet n | | | | | | | | | / ------------+---+---+---+---+---+---+---+---| octet n+1 | | | | | | | | | \ ------------+---+---+---+---+---+---+---+---| | ... | | | | | | | | | | URI ------------+---+---+---+---+---+---+---+---| | octet n+m | | | | | | | | | / ------------+---+---+---+---+---+---+---+---| The URI (or URL) length is specified with uintvar (code to generate them also in gw/wsp.c). The URL itself is just the octets of the string copied as is. Packet E) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 1 | | | | | | | | \ TID, gateway ------------+---+---+---+---+---+---+---+---| | copies from octet 3 | | | | | | | | | / D) packet ------------+---+---+---+---+---+---+---+---| octet 4 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 5 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | ------------+---+---+---+---+---+---+---+---| octet 7 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 8 | | | | | | | | | \ ------------+---+---+---+---+---+---+---+---| | Compiled WML ... | | | | | | | | | | page. ------------+---+---+---+---+---+---+---+---| | octet n | | | | | | | | | / ------------+---+---+---+---+---+---+---+---| Fakewap needs to extract the TID so it can match it to the D) packet it sent. It can ignore the WML page for now. Packet G) bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ------------+---+---+---+---+---+---+---+---| octet 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | ------------+---+---+---+---+---+---+---+---| octet 2 | 0 | | | | | | | | \ TID, fakewap ------------+---+---+---+---+---+---+---+---| | generates a octet 3 | | | | | | | | | / new one ------------+---+---+---+---+---+---+---+---| octet 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ------------+---+---+---+---+---+---+---+---| octet 5 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | ------------+---+---+---+---+---+---+---+---| octet 6 | | | | | | | | | \ ------------+---+---+---+---+---+---+---+---| | Session ID, ... | | | | | | | | | | copied from ------------+---+---+---+---+---+---+---+---| | B) packet. octet n | | | | | | | | | / ------------+---+---+---+---+---+---+---+---|
评论
  • PUDN用户 2005-12-14 17:28:52
相关推荐