DLink DIR-615 K2



Login to router (user/password — admin/admin)

% telnet 192.168.0.1
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.

Dlink-Router login: admin
Password:
Welcome to
_______ ___ __ ____ _ _ ___
| ___ \ | | |__|| \ | || | / /
| | | || ___ | |__ __ | \| || |/ /
| |___| || |___| | || || |\ || \
|_______/ |______||__||_| \____||_|\___\

= Building Networks for People =




BusyBox v1.19.2 (2012-07-03 11:41:39 MSK) built-in shell (ash)
Enter 'help' for a list of built-in commands.


CPU

$ cat /proc/cpuinfo
system type : Broadcom BCMD144 chip rev 1
processor : 0
cpu model : MIPS 74K V4.9
BogoMIPS : 149.91
wait instruction : no
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : yes
ASEs implemented : mips16 dsp
VCED exceptions : not available
VCEI exceptions : not available

unaligned_instructions : 1
dcache hits : 2147483648
dcache misses : 4244565503
icache hits : 2147483648
icache misses : 4294898166
instructions : 2147483648


PCI bus:

$ lspci
00:04.0 Class ffff: 14e4:0835
00:02.0 Class 0200: 14e4:4715
00:01.0 Class 0280: 14e4:4329
00:00.0 Class 0501: 14e4:0800


Default processes

$ ps
PID USER VSZ STAT COMMAND
1 admin 2728 S /sbin/init
2 admin 0 SW< [kthreadd]
3 admin 0 SWN [ksoftirqd/0]
4 admin 0 SW< [events/0]
5 admin 0 SW< [khelper]
19 admin 0 SW< [kblockd/0]
37 admin 0 SW [pdflush]
38 admin 0 SW [pdflush]
39 admin 0 SW< [kswapd0]
40 admin 0 SW< [aio/0]
68 admin 0 SW< [mtdblockd]
86 admin 3476 S resident[mngr]: building networks for people...
115 admin 1840 S nas
118 admin 1392 S eapd
135 admin 648 S klogd
137 admin 684 S syslogd -S -m 0 -C32 -l 7 -L
179 admin 656 R telnetd -p 23
187 admin 3476 S resident[wrkr]: waiting for something...
192 admin 1580 S watchdog
203 nobody 952 S dnsmasq -C /tmp/dnsmasq.conf
206 admin 656 S httpd
211 admin 832 S miniupnpd -f /tmp/miniupnpd.conf
225 admin 2128 S udhcpc -i wan1 -p /var/run/udhcpc.wan1_1.pid -t 1 -s
313 admin 664 S -sh
324 admin 656 R ps


Serial console output



minicom -D /dev/ttyUSB0


Welcome to minicom 2.5

OPTIONS: I18n
Compiled on Jan 14 2012, 12:40:23.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys

Decompressing...done


CFE version 5.100.138.9 based on BBP 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: �.�.�. �.�.�� 19 11:45:19 UTC 2012 (legath@desk)
Copyright (C) 2000-2008 Broadcom Corporation.

Init Arena
Init Devs.
Boot partition size = 131072(0x20000)
Found an ST compatible serial flash with 64 64KB blocks; total size 4MB
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.100.138.9
CPU type 0x19749: 300MHz
Tot mem: 32768 KBytes

CFE mem: 0x80700000 - 0x80798090 (622736)
Data: 0x8072DEF0 - 0x80731110 (12832)
BSS: 0x80731110 - 0x80732090 (3968)
Heap: 0x80732090 - 0x80796090 (409600)
Stack: 0x80796090 - 0x80798090 (8192)
Text: 0x80700000 - 0x8072DEE4 (188132)

Device eth0: hwaddr 90-94-E4-B3-D5-66, ipaddr 192.168.0.1, mask 255.255.255.0
gateway not set, nameserver not set

Loader:raw Filesys:tftp Dev:eth0 File:: Options:(null)
Loading: Failed.
Could not load :: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: ..... 2699398 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
Linux version 2.6.22 (builder@rd) (gcc version 4.2.4) #1 Tue Jul 3 11:36:41 MSK 2012
CPU revision is: 00019749
Found an ST compatible serial flash with 64 64KB blocks; total size 4MB
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists. Total pages: 4064
Kernel command line: root=/dev/mtdblock2 console=ttyS0,115200 init=/sbin/preinit
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
CPU: BCM53572 rev 1 at 300 MHz
Using 150.000 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13444k/16384k available (2013k kernel code, 2940k reserved, 438k data, 184k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: no core
PCI: no core
PCI: Fixing up bus 0
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.4 (2008/08/26) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 1 ports, IRQ sharing disabled
�erial8250: ttyS0 at MMIO 0x0 (irq = 8) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V0.17
PPTP driver version 0.8.5
Boot partition size = 131072(0x20000)
sflash: squash filesystem with lzma found at block 16
Creating 5 MTD partitions on "sflash":
0x00000000-0x00020000 : "boot"
0x00020000-0x003e0000 : "Linux"
0x00107374-0x003e0000 : "rootfs"
0x003e0000-0x003f0000 : "rgdb"
0x003f0000-0x00400000 : "nvram"
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (128 buckets, 1024 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 184k freed
Failed to execute /init
Failed to execute /sbin/preinit. Attempting defaults...
D-link init started
Readind config from flash...
result read config from flash is 2
Use /etc/config.default
Lenght of avalible memory for title 142 bytes
environ TERM=vt100
environ HOME=/
environ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
environ LD_LIBRARY_PATH=/lib:/lib/private:/usr/lib
environ SHELL=/bin/sh
environ USER=root
resident starting...
count_detected_rpc = 82
1. rpc - 0, type - 2, flags - 0x0000, glocks - 0x0000, version - 0, soname - "somovd", fname - "InternalAction"
2. rpc - 88, type - 3, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libcommon.so", fname - "SetProxyAddr"
3. rpc - 19, type - 3, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libcommon.so", fname - "GetConfigStatus"
4. rpc - 6, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libcommon.so", fname - "Reboot"
5. rpc - 25, type - 3, flags - 0x0001, glocks - 0x0000, version - 1, soname - "/lib/private/libcommon.so", fname - "DataUpload"
6. rpc - 26, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libcommon.so", fname - "DataDownload"
7. rpc - 46, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "conf_arp"
8. rpc - 145, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "conf_ping"
9. rpc - 163, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "salt_conf"
10. rpc - 166, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "conf_traceroute"
11. rpc - 33, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "route_table"
12. rpc - 143, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libcommon.so", fname - "conf_web_profiles"
13. rpc - 8, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "SaveAndReboot"
14. rpc - 20, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "save_config"
15. rpc - 9, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "ResetToDefault"
16. rpc - 10, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "ResetAndReboot"
17. rpc - 11, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "RestoreConfig"
18. rpc - 98, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "RestoreConfigFile"
19. rpc - 12, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "BackupConfig"
20. rpc - 93, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "BackupConfigFile"
21. rpc - 13, type - 3, flags - 0x0001, glocks - 0x0000, version - 2, soname - "/lib/private/libconfig.so", fname - "FirmwareUpload"
22. rpc - 14, type - 3, flags - 0x0001, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "FirmwareUpdate"
23. rpc - 40, type - 3, flags - 0x0001, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "FirmwareRemoteUpdate"
24. rpc - 38, type - 3, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "CheckDefaultPass"
25. rpc - 41, type - 3, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "CheckDefaultConf"
26. rpc - 34, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "dhcp_leases"
27. rpc - 1, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_conf"
28. rpc - 161, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_conf"
29. rpc - 28, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_conf"
30. rpc - 6, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "ddns_conf"
31. rpc - 7, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "dns_conf"
32. rpc - 10, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "vservers_conf"
33. rpc - 16, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "vservers_conf"
34. rpc - 23, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "vservers_conf"
35. rpc - 17, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "routing_conf"
36. rpc - 35, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
37. rpc - 36, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
38. rpc - 37, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
39. rpc - 38, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
40. rpc - 39, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
41. rpc - 40, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
42. rpc - 41, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
43. rpc - 42, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
44. rpc - 44, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
45. rpc - 105, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
46. rpc - 106, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
47. rpc - 107, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
48. rpc - 158, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
49. rpc - 159, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
50. rpc - 160, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
51. rpc - 64, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
52. rpc - 108, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
53. rpc - 109, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
54. rpc - 110, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
55. rpc - 111, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
56. rpc - 133, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wifi_conf"
57. rpc - 72, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "urlfilter_conf"
58. rpc - 71, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "urlfilter_conf"
59. rpc - 60, type - 4, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "apprules_conf"
60. rpc - 68, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "igmp_conf"
61. rpc - 66, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "upnp_conf"
62. rpc - 67, type - 4, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "dev_info_conf"
63. rpc - 148, type - 4, flags - 0x0000, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "dev_info_conf"
64. rpc - 73, type - 4, flags - 0x0002, glocks - 0x0000, version - 1, soname - "/lib/private/libconfig.so", fname - "scheduler_conf"
65. rpc - 74, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "macfilter_conf"
66. rpc - 69, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "pass_conf"
67. rpc - 112, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "device_params_conf"
68. rpc - 171, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "device_params_conf"
69. rpc - 87, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "get_ifaces_name"
70. rpc - 88, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "conf_ipfilter"
71. rpc - 104, type - 4, flags - 0x0000, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "stats"
72. rpc - 119, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "vlan_conf"
73. rpc - 120, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_ifaces_list"
74. rpc - 62, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "set_default_route"
75. rpc - 121, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_ifaces_list"
76. rpc - 122, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "wan_conf"
77. rpc - 103, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "ifaces_stats"
78. rpc - 65, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "ntpclient_conf"
79. rpc - 130, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "conf_log"
80. rpc - 63, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "conf_log"
81. rpc - 129, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "get_port_status"
82. rpc - 152, type - 4, flags - 0x0002, glocks - 0x0000, version - 3, soname - "/lib/private/libconfig.so", fname - "conf_telnetd"
Event pipe size is 4096 bytes
Initializing device...
watchdog: child process
===INIT_DEVICE===
res = 1
Config is good
Check SSID
Do preinit ifaces
bdcfg: No such file or directory
macbuf = 90:94:E4:B3:D5:66
set il0macaddr
board_type_l = 0x058e
init_device: parent process, wait child
et: module license 'Proprietary' taints kernel.
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.100.138.9 (WLTEST)
Set mac 90:94:E4:B3:D5:66 on iface eth0 - OK
eth1: Broadcom BCM4329 802.11 Wireless Controller 5.100.138.9 (WLTEST)
iface: eth1
device eth1 entered promiscuous mode
iface: eth0.1eth0.1: dev_set_promiscuity(master, 1)

device eth0 entered promiscuous mode
device eth0.1 entered promiscuous mode
br0: port 2(eth0.1) entering learning state
br0: port 1(eth1) entering learning state
bdcfg: No such file or directory
COEX: downgraded chanspec 0x2e04 to 0x2b06: channel 1 used by exiting BSSs
COEX: downgraded chanspec 0x2e09 to 0x2b0b: channel 6 used by exiting BSSs
EAP Dispatch Start...
allocated EAPD workspace
add one interface cb for br0
NAS:ignored interface eth1. Invalid NAS mode
init brcm interface br0
Not found brcm interface br0
br0: BRCM socket 4 opened
WPS appSocket 5 opened
No any NAS application need to run.
No any SES application need to run
Set event_msg bitvec [6 8 10 12 25 44] on wl0[eth1]
Configuring BCM5325 vlan...
deleting ifaces...
-vlan iface - eth0.1
br0: port 2(eth0.1) entering disabled state
device eth0.1 left promiscuous mode
br0: port 2(eth0.1) entering disabled state
-vlan iface - wan1
-bridge - br0
br0: port 1(eth1) entering disabled state
device eth1 left promiscuous mode
br0: port 1(eth1) entering disabled state
wan vid: 0, lan_vid: 1
creating wan iface...
bdcfg: No such file owan1: Setting MAC address to r directory
90 94 e4 b3 d5 67.
Set mac 90:94:E4:B3:D5:67 on iface wan1 - OK
creating lan ifacedevice eth1 entered promiscuous mode
...
br0: port 1(eth1) entering learning state
vlan table value 0x10013ef
br0: port 2(eth0.1) entering learning state
creating "transparent" & "tag nat" groups...
Do clear ifaces
bdcfg: No such file or directory
set mac 90:94:E4:B3:D5:66 on br0
bdcfg: No such file or directory
set mac 90:94:E4:B3:D5:67 on wan1
Have lan_array
init_lan: iface = br0
start_ip: static ipv4
init ipfilter
init vserver
init macfilter
start urlfilter
init wans
Intialize wan.....
start_wan_link_on_l2 - Up iface br0
start_wan_link_on_l2 - iface br0 is not wan, pass it
start_wan_link_on_l2 - Up iface wan1
start_ip: dhcp ipv4
start_wan_link_on_l2 - Iface wan1 is up
start ddns
info, udhcp client (v0.9.8) started (iface: wan1, connect: 1)
udhcp client (v0.9.8) started (iface: wan1, connect: 1)
debug, interface wan1 index 7
debug, interface wan1 hwaddr 90:94:e4:b3:d5:67
debug, interface wan1 mtu is 1500

error, options_list_init_json: can't open "udhcpc/options"
error, fill_json: can't open "udhcpc/options"
debug, execle'ing /tmp/udhcpc with name deconfig
start services
start_telnet...
debug, Opening raw socket on ifindex 7

Out init_device
init_device: pid_status(WEXITSTATUS) = 0
Done.
Welcome to
_______ ___ __ ____ _ _ ___
| ___ \ | | |__|| \ | || | / /
| | | || ___ | |__ __ | \| || |/ /
| |___| || |___| | || || |\ || \
|_______/ |______||__||_| \____||_|\___\

= Building Networks for People =

D-link init done
info, Sending discover...
info, Sending discover...
info, Sending discover...
br0: topology change detected, propagating
br0: port 1(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 2(eth0.1) entering forwarding state
info, Sending discover...
info, Sending discover...
info, Sending discover...

import java.util.Enumeration;
import java.util.concurrent.TimeUnit;

import org.jdiameter.api.ApplicationId;
import org.jdiameter.api.Configuration;
import org.jdiameter.api.InternalException;
import org.jdiameter.api.Message;
import org.jdiameter.api.Stack;
import org.jdiameter.api.StackManager;
import org.jdiameter.api.cca.ClientCCASession;
import org.jdiameter.api.validation.AvpRepresentation;
import org.jdiameter.client.api.ISessionFactory;
import org.jdiameter.client.impl.StackImpl;
import org.jdiameter.client.impl.helpers.XMLConfiguration;
import org.jdiameter.common.impl.app.cca.CCASessionFactoryImpl;
import org.jdiameter.common.impl.app.cca.JCreditControlRequestImpl;
import org.jdiameter.common.impl.validation.DictionaryImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* date: 21.04.11
* time: 13:31
* makedoc
*
* @version $Id$
*/
public class StackController {
private static Logger LOG = LoggerFactory.getLogger(StackController.class);

public static void main(String[] args) {
TicSessionID ticSessionID = new TicSessionID(SessionIDGenerator.getNewSessionID());
final String DEBUG_STR = ticSessionID + ":main: ";
LOG.debug("{} start", DEBUG_STR);

Stack s = new StackImpl();
try {
StackManager.registerStack(s);
} catch (InternalException e) {
LOG.error(DEBUG_STR, e);
}


Enumeration<Stack> stacks = StackManager.getStacks();
LOG.info("{} stacks {}", DEBUG_STR, stacks);
while (stacks.hasMoreElements()) {
Stack stack = stacks.nextElement();
LOG.info("{} stack {}", DEBUG_STR, stack);
}

try {
LOG.info("{} stack is active {}", DEBUG_STR, s.isActive());

Configuration c = new XMLConfiguration(StackController.class.getClassLoader().getResourceAsStream("diameter-client.xml"));
ISessionFactory sessionFactory = (ISessionFactory) s.init(c);
s.start();

LOG.info("{} stack is active {}", DEBUG_STR, s.isActive());

DictionaryImpl dictionary = (DictionaryImpl) s.getDictionary();
dictionary.configure(StackController.class.getClassLoader().getResourceAsStream("dictionary.xml"));
dictionary.setEnabled(true);
LOG.info("{} configured {}", DEBUG_STR, dictionary.isConfigured());
LOG.info("{} enabled {}", DEBUG_STR, dictionary.isEnabled());

sessionFactory.registerAppFacory(ClientCCASession.class, new CCASessionFactoryImpl(sessionFactory));

ApplicationId appId = ApplicationId.createByAccAppId(4);
ClientCCASession session = sessionFactory.getNewAppSession(SessionIDGenerator.getNewSessionID(), appId, ClientCCASession.class);
LOG.info("{} session {}", DEBUG_STR, session);
LOG.info("{} session class {}", DEBUG_STR, session.getClass());

ApplicationId sessionAppId = session.getSessionAppId();
LOG.info("{} application id {}", DEBUG_STR, sessionAppId);

JCreditControlRequestImpl event = new JCreditControlRequestImpl(session, "jDiameter", "127.0.0.1");

Message message;
// message = session.getSessions().get(0).createRequest(272, appId, "jDiameter");

AvpRepresentation avpr = CcaDictionary.CCRequestType.avp(dictionary);
message = event.getMessage();

message.getAvps().addAvp(avpr.getCode(), 1, avpr.getVendorId(), avpr.isMandatory(), avpr.isProtected());
LOG.info("{} message {} {} {}", new Object[]{DEBUG_STR, message,message,message});
session.sendCreditControlRequest(event);

s.stop(10, TimeUnit.MILLISECONDS);
} catch (Exception e) {
LOG.error(DEBUG_STR, e);
}

LOG.debug("{} stop", DEBUG_STR);
}
}

Profile

kds

December 2012

S M T W T F S
      1
2345678
9101112131415
1617181920 2122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2017 07:02 pm
Powered by Dreamwidth Studios