summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Carre2008-01-29 09:46:06 +0100
committerThierry Carre2008-01-29 09:46:06 +0100
commit5ba46fb9423de7cf24da850cfd91975d3c0c17a2 (patch)
tree8c15331fc1b89f7294bf9eadd15ec79ecccea291
parent027eb7ed18ccb2c3e0daf680b718e08694ba82f4 (diff)
parent97efd7f502e5e0df79ecef824e3eae02453a6f19 (diff)
Merge Lisa & dev-3-9-8 : First step (compil ok, run fail)
-rw-r--r--.hgignore207
-rw-r--r--app/Makefile_x8651
-rw-r--r--app/sm-agent/.cdtbuild108
-rw-r--r--app/sm-agent/.settings/org.eclipse.cdt.managedbuilder.core.prefs14
-rw-r--r--app/sm-agent/Makefile_x86120
-rwxr-xr-xapp/sm-agent/inc/mib-common.h11
-rwxr-xr-xapp/sm-agent/inc/simulator.h30
-rw-r--r--app/sm-agent/inc/spc200.h86
-rwxr-xr-xapp/sm-agent/inc/systemmanager.h79
-rwxr-xr-xapp/sm-agent/inc/underlayer.h6
-rwxr-xr-xapp/sm-agent/src/agent.cpp65
-rw-r--r--app/sm-agent/src/ip_mib.cpp1
-rw-r--r--app/sm-agent/src/mau_mib.cpp1
-rwxr-xr-xapp/sm-agent/src/simulator.cpp232
-rw-r--r--app/sm-agent/src/spc200.cpp1311
-rwxr-xr-xapp/sm-agent/src/systemmanager.cpp337
-rwxr-xr-xapp/sm-agent/src/underlayer.cpp218
-rw-r--r--app/sm-custom-mib/Makefile_x8661
-rw-r--r--app/sm-emac-drv/enermib.h17
-rw-r--r--app/sm-emac-drv/inc/enermac.h12
-rw-r--r--app/sm-emac-drv/inc/mac_carp.h15
-rw-r--r--app/sm-emac-drv/inc/mac_frame.h88
-rw-r--r--app/sm-emac-drv/inc/mac_isr.h23
-rw-r--r--app/sm-emac-drv/inc/mac_signals.sig356
-rw-r--r--app/sm-emac-drv/inc/mac_timer.h27
-rw-r--r--app/sm-emac-drv/inc/plc_ber.h115
-rw-r--r--app/sm-emac-drv/inc/plc_ce.h89
-rw-r--r--app/sm-emac-drv/inc/plc_dbg.h113
-rw-r--r--app/sm-emac-drv/inc/plc_drv.h701
-rw-r--r--app/sm-emac-drv/inc/plc_mac.h342
-rw-r--r--app/sm-emac-drv/inc/plc_neighbour.h79
-rw-r--r--app/sm-emac-drv/inc/plc_param.h66
-rw-r--r--app/sm-emac-drv/inc/plc_plcp.h507
-rw-r--r--app/sm-emac-drv/inc/plc_rx_buffer.h9
-rw-r--r--app/sm-emac-drv/inc/plc_sms.h13
-rw-r--r--app/sm-emac-drv/inc/plc_test.h57
-rw-r--r--app/sm-emac-drv/inc/plc_tx_buffer.h8
-rw-r--r--app/sm-emac-drv/inc/plc_vport.h72
-rw-r--r--app/sm-emac-drv/inc/plcp_core.h205
-rw-r--r--app/sm-emac-drv/makefile.mk9
-rw-r--r--app/sm-emac-drv/plc_drv_if.h71
-rw-r--r--app/sm-emac-drv/src/crc.c98
-rw-r--r--app/sm-emac-drv/src/emac_asm.s50
-rw-r--r--app/sm-emac-drv/src/emac_isr.c17
-rwxr-xr-xapp/sm-emac-drv/src/enermac.c1594
-rwxr-xr-xapp/sm-emac-drv/src/plc_ber.c2280
-rwxr-xr-xapp/sm-emac-drv/src/plc_dbg.c236
-rw-r--r--app/sm-emac-drv/src/plc_drv.c831
-rwxr-xr-xapp/sm-emac-drv/src/plc_plcp.c1004
-rw-r--r--app/sm-emac-drv/src/plc_rx_buffer.c34
-rw-r--r--app/sm-emac-drv/src/plc_shell.c2072
-rwxr-xr-xapp/sm-emac-drv/src/plc_test.c732
-rwxr-xr-xapp/sm-emac-drv/src/plc_testu.c397
-rw-r--r--app/sm-emac-drv/src/plc_tx_buffer.c16
-rwxr-xr-xapp/sm-emac-drv/src/plcp_channel.c1622
-rwxr-xr-xapp/sm-emac-drv/src/plcp_fmode.c1609
-rwxr-xr-xapp/sm-emac-drv/src/plcp_frame.c217
-rw-r--r--app/sm-emac-drv/src/plcp_mode_3fec.c227
-rw-r--r--app/sm-emac-drv/src/plcp_mode_common.c54
-rw-r--r--app/sm-emac-drv/src/plcp_mode_control.c85
-rw-r--r--app/sm-emac-drv/src/plcp_mode_fec.c247
-rw-r--r--app/sm-emac-drv/src/plcp_mode_robust_fec.c302
-rw-r--r--app/sm-emac-drv/src/plcp_patterns.c5157
-rwxr-xr-xapp/sm-emac-drv/src/plcp_test.c261
-rwxr-xr-xapp/sm-emac-drv/src/plcp_ui.c271
-rw-r--r--app/sm-mib/.cdtbuild2
-rw-r--r--app/sm-mib/Makefile_x8658
-rwxr-xr-xapp/sm-mib/mib-interface.h38
-rwxr-xr-xapp/sm-mib/src/mib-interface.c361
-rwxr-xr-xapp/sm-plc-drv/inc/linux_drv.h74
-rw-r--r--app/sm-plc-drv/inc/mac_carp.h2
-rw-r--r--app/sm-plc-drv/inc/mac_signals.h53
-rw-r--r--app/sm-plc-drv/inc/mac_states.h6
-rwxr-xr-xapp/sm-plc-drv/inc/pb_list.h19
-rw-r--r--app/sm-plc-drv/inc/plc_ce.h5
-rwxr-xr-xapp/sm-plc-drv/inc/plc_common.h26
-rwxr-xr-xapp/sm-plc-drv/inc/plc_dbg.h14
-rw-r--r--app/sm-plc-drv/inc/plc_drv.h50
-rwxr-xr-xapp/sm-plc-drv/inc/plc_mac.h58
-rw-r--r--app/sm-plc-drv/inc/plc_nd.h4
-rw-r--r--app/sm-plc-drv/inc/plc_plcp.h44
-rw-r--r--app/sm-plc-drv/inc/plc_ppc.h30
-rw-r--r--app/sm-plc-drv/inc/plc_sysctl.h49
-rw-r--r--app/sm-plc-drv/inc/ppc_tst.h2
-rwxr-xr-xapp/sm-plc-drv/inc/test_core.h2
-rw-r--r--app/sm-plc-drv/plc_drv_if.h13
-rw-r--r--app/sm-plc-drv/plc_ioctl.h27
-rw-r--r--app/sm-plc-drv/src/ce_core.c1591
-rwxr-xr-xapp/sm-plc-drv/src/crc.c107
-rw-r--r--app/sm-plc-drv/src/linux_crypto.c33
-rw-r--r--app/sm-plc-drv/src/linux_drv.c977
-rwxr-xr-xapp/sm-plc-drv/src/linux_vport.c41
-rw-r--r--app/sm-plc-drv/src/mac_backoff_proc.c139
-rwxr-xr-xapp/sm-plc-drv/src/mac_carp.c148
-rwxr-xr-xapp/sm-plc-drv/src/mac_cco.c112
-rwxr-xr-xapp/sm-plc-drv/src/mac_cs.c96
-rw-r--r--app/sm-plc-drv/src/mac_dbg.c75
-rwxr-xr-xapp/sm-plc-drv/src/mac_frame.c47
-rw-r--r--app/sm-plc-drv/src/mac_interface.c338
-rw-r--r--app/sm-plc-drv/src/mac_network_discovery.c799
-rw-r--r--app/sm-plc-drv/src/mac_rx.c226
-rw-r--r--app/sm-plc-drv/src/mac_rx_coord.c520
-rw-r--r--app/sm-plc-drv/src/mac_timer.c12
-rw-r--r--app/sm-plc-drv/src/mac_tx.c337
-rw-r--r--app/sm-plc-drv/src/mac_tx_coord.c480
-rw-r--r--app/sm-plc-drv/src/pb_core.c199
-rw-r--r--app/sm-plc-drv/src/plc_ber.c110
-rw-r--r--app/sm-plc-drv/src/plc_plcp.c168
-rw-r--r--app/sm-plc-drv/src/plc_ppc.c196
-rw-r--r--app/sm-plc-drv/src/plc_proc.c1194
-rwxr-xr-xapp/sm-plc-drv/src/plc_prof.c6
-rwxr-xr-xapp/sm-plc-drv/src/plc_sampler.c13
-rw-r--r--app/sm-plc-drv/src/plc_sysctl.c1422
-rwxr-xr-xapp/sm-plc-drv/src/plc_vport.c55
-rwxr-xr-xapp/sm-plc-drv/src/plcp_channel.c552
-rwxr-xr-xapp/sm-plc-drv/src/plcp_fmode.c1416
-rwxr-xr-xapp/sm-plc-drv/src/plcp_frame.c81
-rwxr-xr-xapp/sm-plc-drv/src/plcp_mode_chunks.c107
-rw-r--r--app/sm-plc-drv/src/plcp_mode_common.c3
-rwxr-xr-xapp/sm-plc-drv/src/plcp_mode_control.c15
-rw-r--r--app/sm-plc-drv/src/plcp_mode_fec.c101
-rwxr-xr-xapp/sm-plc-drv/src/plcp_mode_robust_fec.c35
-rw-r--r--app/sm-plc-drv/src/plcp_notches.c3
-rw-r--r--app/sm-plc-drv/src/plcp_traces.c24
-rw-r--r--app/sm-plc-drv/src/ppc_r2l.c6
-rw-r--r--app/sm-plc-drv/src/ppc_tst.c293
-rw-r--r--app/sm-plc-drv/src/qsort.c12
-rw-r--r--app/sm-plc-drv/src/test_core.c41
-rw-r--r--app/sm-version/src/version.c4
-rw-r--r--include/cristina/cpu.h2
-rw-r--r--include/cristina/device.h6
-rw-r--r--include/cristina/ethdev.h9
-rw-r--r--include/cristina/tosv.h11
-rw-r--r--include/platform.h62
-rw-r--r--include/platform_lisa.h35
-rw-r--r--include/platform_tina.h33
-rwxr-xr-xlinux-2.6.10/GNUmakefile53
-rw-r--r--linux-2.6.10/Makefile2
-rw-r--r--linux-2.6.10/arch/arm/Makefile2
-rw-r--r--linux-2.6.10/arch/arm/configs/spc200c_defconfig187
-rw-r--r--linux-2.6.10/arch/arm/configs/spc200e_defconfig87
-rw-r--r--linux-2.6.10/arch/arm/kernel/semaphore.c2
-rw-r--r--linux-2.6.10/arch/arm/kernel/signal.c1
-rwxr-xr-xlinux-2.6.10/arch/arm/mach-spc2XX/core.c14
-rw-r--r--linux-2.6.10/arch/arm/mm/fault.c4
-rw-r--r--linux-2.6.10/drivers/mtd/chips/Makefile7
-rw-r--r--linux-2.6.10/drivers/mtd/chips/amd_flash.c7
-rw-r--r--linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0001.c38
-rw-r--r--linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0002.c21
-rw-r--r--linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0020.c16
-rw-r--r--linux-2.6.10/drivers/mtd/chips/gen_probe.c26
-rwxr-xr-xlinux-2.6.10/drivers/mtd/maps/spk200-flash.c2
-rwxr-xr-xlinux-2.6.10/drivers/net/arm/ape110.c21
-rw-r--r--linux-2.6.10/drivers/plc/Kconfig13
-rw-r--r--linux-2.6.10/drivers/voip/Kconfig36
-rw-r--r--linux-2.6.10/fs/binfmt_flat.c4
-rw-r--r--linux-2.6.10/include/asm-arm/arch-s3c2410/io.h9
-rw-r--r--linux-2.6.10/include/asm-arm/arch-spc2xx/uncompress.h14
-rw-r--r--linux-2.6.10/init/main.c7
-rw-r--r--linux-2.6.10/kernel/Makefile2
-rw-r--r--linux-2.6.10/kernel/intermodule.c183
-rw-r--r--linux-2.6.10/kernel/module.c2
-rw-r--r--linux-2.6.10/lib/iomap.c12
-rw-r--r--linux-2.6.10/mm/slab.c11
-rw-r--r--linux-2.6.10/net/Kconfig2
-rw-r--r--linux-2.6.10/net/bridge/br_input.c4
-rw-r--r--linux-2.6.10/net/bridge/br_stp_if.c33
-rw-r--r--linux-2.6.10/scripts/basic/docproc.c16
-rw-r--r--linux-2.6.10/scripts/basic/fixdep.c23
-rw-r--r--linux-2.6.10/scripts/basic/split-include.c2
-rwxr-xr-xlinux-2.6.10/scripts/gen_initramfs_list.sh264
-rw-r--r--linux-2.6.10/scripts/kallsyms.c95
-rw-r--r--linux-2.6.10/scripts/kconfig/conf.c6
-rw-r--r--linux-2.6.10/scripts/kconfig/confdata.c4
-rw-r--r--linux-2.6.10/scripts/kconfig/mconf.c4
-rw-r--r--linux-2.6.10/scripts/lxdialog/dialog.h2
-rw-r--r--linux-2.6.10/scripts/lxdialog/inputbox.c4
-rw-r--r--linux-2.6.10/scripts/mod/sumversion.c8
-rw-r--r--linux-2.6.10/usr/Makefile2
-rw-r--r--linux-2.6.10/usr/gen_init_cpio.c270
-rw-r--r--linux-tools/boa-0.94.13/CREDITS38
-rw-r--r--linux-tools/boa-0.94.13/ChangeLog433
-rw-r--r--linux-tools/boa-0.94.13/Gnu_License340
-rw-r--r--linux-tools/boa-0.94.13/README15
-rw-r--r--linux-tools/boa-0.94.13/boa.conf194
-rw-r--r--linux-tools/boa-0.94.13/contrib/README.chroot.solaris158
-rw-r--r--linux-tools/boa-0.94.13/contrib/redhat/boa.conf183
-rw-r--r--linux-tools/boa-0.94.13/contrib/redhat/boa.init45
-rw-r--r--linux-tools/boa-0.94.13/contrib/redhat/boa.logrotate6
-rw-r--r--linux-tools/boa-0.94.13/contrib/redhat/boa.spec89
-rw-r--r--linux-tools/boa-0.94.13/docs/Makefile31
-rw-r--r--linux-tools/boa-0.94.13/docs/boa.8196
-rw-r--r--linux-tools/boa-0.94.13/docs/boa.texi772
-rwxr-xr-xlinux-tools/boa-0.94.13/docs/boa_banner.pngbin5663 -> 0 bytes
-rw-r--r--linux-tools/boa-0.94.13/examples/cgi-test.cgi120
-rw-r--r--linux-tools/boa-0.94.13/examples/nph-test.cgi69
-rw-r--r--linux-tools/boa-0.94.13/examples/resolver.pl24
-rw-r--r--linux-tools/boa-0.94.13/extras/alphasort.c7
-rw-r--r--linux-tools/boa-0.94.13/extras/scandir.c85
-rw-r--r--linux-tools/boa-0.94.13/extras/strutil.c36
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/README255
-rw-r--r--linux-tools/boa-0.94.13/spc200/boa.conf201
-rw-r--r--linux-tools/boa-0.94.13/spc200/cgi-bin/Makefile34
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/bridge.sh7
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/envp.c22
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/ifconfig.sh6
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/netstat.sh6
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/route.sh6
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/cgi-bin/test.sh3
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/www/SPC200-e.gifbin11831 -> 0 bytes
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/www/SPC200-e_PB_v1_01_2005-HR2.gifbin24752 -> 0 bytes
-rwxr-xr-xlinux-tools/boa-0.94.13/spc200/www/index.html165
-rw-r--r--linux-tools/boa-0.94.13/src/.depend28
-rw-r--r--linux-tools/boa-0.94.13/src/Makefile82
-rw-r--r--linux-tools/boa-0.94.13/src/Makefile.in89
-rw-r--r--linux-tools/boa-0.94.13/src/acconfig.h15
-rw-r--r--linux-tools/boa-0.94.13/src/aclocal.m453
-rw-r--r--linux-tools/boa-0.94.13/src/alias.c632
-rw-r--r--linux-tools/boa-0.94.13/src/boa.c279
-rw-r--r--linux-tools/boa-0.94.13/src/boa.h195
-rw-r--r--linux-tools/boa-0.94.13/src/boa_grammar.y127
-rw-r--r--linux-tools/boa-0.94.13/src/boa_lexer.l155
-rw-r--r--linux-tools/boa-0.94.13/src/buffer.c259
-rw-r--r--linux-tools/boa-0.94.13/src/cgi.c559
-rw-r--r--linux-tools/boa-0.94.13/src/cgi_header.c176
-rw-r--r--linux-tools/boa-0.94.13/src/check_struct_for.m440
-rw-r--r--linux-tools/boa-0.94.13/src/compat.h140
-rw-r--r--linux-tools/boa-0.94.13/src/config.c334
-rw-r--r--linux-tools/boa-0.94.13/src/config.h.in117
-rw-r--r--linux-tools/boa-0.94.13/src/configure2971
-rw-r--r--linux-tools/boa-0.94.13/src/configure.in196
-rw-r--r--linux-tools/boa-0.94.13/src/defines.h198
-rw-r--r--linux-tools/boa-0.94.13/src/escape.c95
-rw-r--r--linux-tools/boa-0.94.13/src/escape.h47
-rw-r--r--linux-tools/boa-0.94.13/src/get.c513
-rw-r--r--linux-tools/boa-0.94.13/src/globals.h193
-rw-r--r--linux-tools/boa-0.94.13/src/hash.c411
-rw-r--r--linux-tools/boa-0.94.13/src/index_dir.c355
-rw-r--r--linux-tools/boa-0.94.13/src/ip.c114
-rw-r--r--linux-tools/boa-0.94.13/src/log.c229
-rw-r--r--linux-tools/boa-0.94.13/src/mmap_cache.c152
-rw-r--r--linux-tools/boa-0.94.13/src/parse.h33
-rw-r--r--linux-tools/boa-0.94.13/src/pipe.c136
-rw-r--r--linux-tools/boa-0.94.13/src/queue.c131
-rw-r--r--linux-tools/boa-0.94.13/src/read.c377
-rw-r--r--linux-tools/boa-0.94.13/src/request.c749
-rw-r--r--linux-tools/boa-0.94.13/src/response.c362
-rw-r--r--linux-tools/boa-0.94.13/src/select.c183
-rw-r--r--linux-tools/boa-0.94.13/src/signals.c231
-rw-r--r--linux-tools/boa-0.94.13/src/sublog.c143
-rw-r--r--linux-tools/boa-0.94.13/src/timestamp.c34
-rw-r--r--linux-tools/boa-0.94.13/src/util.c555
-rw-r--r--linux-tools/boa-0.94.13/src/webindex.pl119
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/cgi-bin/gore.php8
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/cgi-bin/reboot.html2
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/cgi-bin/sipconfig.html79
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/cgi-bin/soft.html3
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/cgi-bin/spidcom.html217
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/www/feat-a.gifbin0 -> 526 bytes
-rwxr-xr-xlinux-tools/boa-0.94.14rc18/spc200/www/feat.gifbin0 -> 489 bytes
-rwxr-xr-xlinux-tools/busybox-1.00/include/applets.h9
-rwxr-xr-xlinux-tools/busybox-1.00/include/usage.h8
-rw-r--r--linux-tools/busybox-1.00/libbb/setup_environment.c2
-rw-r--r--linux-tools/busybox-1.00/networking/Config.in6
-rw-r--r--linux-tools/busybox-1.00/networking/Makefile.in1
-rw-r--r--linux-tools/busybox-1.00/networking/arp.c355
-rwxr-xr-xlinux-tools/busybox-1.00/plcutils/mib.c2
-rw-r--r--linux-tools/busybox-1.00/sysdeps/linux/defconfig1
-rw-r--r--linux-tools/dconf/Makefile12
-rw-r--r--linux-tools/dconf/inc/log.h6
-rw-r--r--linux-tools/dconf/src/dconf.c152
-rw-r--r--linux-tools/dconf/src/log.c32
-rw-r--r--linux-tools/ebtables/ebtables.c11
-rw-r--r--linux-tools/ebtables/extensions/ebt_limit.c4
-rw-r--r--linux-tools/flashfs/image/etc/sip.conf5
-rw-r--r--linux-tools/flashfs/image/etc/wired.conf66
-rw-r--r--linux-tools/flashfs/image/etc/wired8021x.conf19
-rw-r--r--linux-tools/flashfs/image/share/www/cgi-bin/cpuinfos30
-rw-r--r--linux-tools/flashfs/image/share/www/cgi-bin/ifconfig30
-rw-r--r--linux-tools/flashfs/image/share/www/cgi-bin/meminfos30
-rw-r--r--linux-tools/flashfs/image/share/www/favicon.icobin12862 -> 0 bytes
-rw-r--r--linux-tools/flashfs/image/share/www/index.html20
-rw-r--r--linux-tools/flashfs/image/share/www/spidlogo.JPGbin3128 -> 0 bytes
-rwxr-xr-xlinux-tools/hostapd/.config2
-rw-r--r--linux-tools/hostapd/driver_wired.c3
-rw-r--r--linux-tools/hostapd/ieee802_1x.c2
-rw-r--r--linux-tools/hostapd/wired.conf28
-rwxr-xr-xlinux-tools/igmp_filter/igmp_filter.c295
-rw-r--r--linux-tools/japach/AUTHORS2
-rw-r--r--linux-tools/japach/COPYING340
-rw-r--r--linux-tools/japach/ChangeLog0
-rw-r--r--linux-tools/japach/HOW-TO-INSTALL-JAPACH.txt43
-rw-r--r--linux-tools/japach/Makefile344
-rw-r--r--linux-tools/japach/Makefile.am4
-rw-r--r--linux-tools/japach/Makefile.in344
-rw-r--r--linux-tools/japach/README121
-rw-r--r--linux-tools/japach/aclocal.m4104
-rw-r--r--linux-tools/japach/cgi.c76
-rw-r--r--linux-tools/japach/communication.c678
-rw-r--r--linux-tools/japach/config.cache55
-rw-r--r--linux-tools/japach/config.log52
-rw-r--r--linux-tools/japach/config.status169
-rw-r--r--linux-tools/japach/configure3092
-rw-r--r--linux-tools/japach/configure.in83
-rw-r--r--linux-tools/japach/install-sh251
-rw-r--r--linux-tools/japach/japach.c278
-rw-r--r--linux-tools/japach/japach.conf96
-rw-r--r--linux-tools/japach/japach.h164
-rw-r--r--linux-tools/japach/japach.spec38
-rw-r--r--linux-tools/japach/log.c66
-rw-r--r--linux-tools/japach/missing190
-rw-r--r--linux-tools/japach/mkinstalldirs40
-rw-r--r--linux-tools/japach/src/Makefile308
-rw-r--r--linux-tools/japach/src/Makefile.am4
-rw-r--r--linux-tools/japach/src/Makefile.in308
-rw-r--r--linux-tools/japach/src/cgi.c76
-rw-r--r--linux-tools/japach/src/communication.c678
-rw-r--r--linux-tools/japach/src/japach.c278
-rw-r--r--linux-tools/japach/src/japach.h164
-rw-r--r--linux-tools/japach/src/log.c65
-rw-r--r--linux-tools/japach/src/sys.c19
-rw-r--r--linux-tools/japach/src/text.c628
-rw-r--r--linux-tools/japach/sys.c19
-rw-r--r--linux-tools/japach/text.c628
-rw-r--r--linux-tools/japach_old/AUTHORS2
-rw-r--r--linux-tools/japach_old/COPYING340
-rw-r--r--linux-tools/japach_old/ChangeLog0
-rw-r--r--linux-tools/japach_old/HOW-TO-INSTALL-JAPACH.txt40
-rw-r--r--linux-tools/japach_old/Makefile344
-rw-r--r--linux-tools/japach_old/Makefile.am4
-rw-r--r--linux-tools/japach_old/Makefile.in344
-rw-r--r--linux-tools/japach_old/README121
-rw-r--r--linux-tools/japach_old/aclocal.m4104
-rw-r--r--linux-tools/japach_old/config.cache55
-rw-r--r--linux-tools/japach_old/config.status169
-rw-r--r--linux-tools/japach_old/configure3092
-rw-r--r--linux-tools/japach_old/configure.in83
-rw-r--r--linux-tools/japach_old/install-sh251
-rw-r--r--linux-tools/japach_old/japach.conf96
-rw-r--r--linux-tools/japach_old/japach.spec38
-rw-r--r--linux-tools/japach_old/missing190
-rw-r--r--linux-tools/japach_old/mkinstalldirs40
-rw-r--r--linux-tools/japach_old/src/Makefile.am4
-rw-r--r--linux-tools/japach_old/src/Makefile.in308
-rw-r--r--linux-tools/japach_old/src/cgi.c76
-rw-r--r--linux-tools/japach_old/src/communication.c678
-rw-r--r--linux-tools/japach_old/src/cpuinfos30
-rw-r--r--linux-tools/japach_old/src/favicon.icobin12862 -> 0 bytes
-rw-r--r--linux-tools/japach_old/src/ifconfig33
-rw-r--r--linux-tools/japach_old/src/index.html20
-rw-r--r--linux-tools/japach_old/src/japach.c278
-rw-r--r--linux-tools/japach_old/src/japach.conf96
-rw-r--r--linux-tools/japach_old/src/japach.h164
-rw-r--r--linux-tools/japach_old/src/log.c66
-rw-r--r--linux-tools/japach_old/src/makefile308
-rw-r--r--linux-tools/japach_old/src/meminfos30
-rw-r--r--linux-tools/japach_old/src/spidlogo.JPGbin3128 -> 0 bytes
-rw-r--r--linux-tools/japach_old/src/sys.c19
-rw-r--r--linux-tools/japach_old/src/text.c628
-rw-r--r--linux-tools/openssl/Makefile888
-rw-r--r--linux-tools/openssl/apps/Makefile865
-rw-r--r--linux-tools/openssl/crypto/conf/Makefile55
-rw-r--r--linux-tools/openssl/crypto/dh/Makefile17
-rw-r--r--linux-tools/openssl/crypto/dsa/Makefile34
-rw-r--r--linux-tools/openssl/crypto/err/Makefile35
-rw-r--r--linux-tools/openssl/crypto/evp/Makefile45
-rw-r--r--linux-tools/openssl/crypto/opensslconf.h195
-rw-r--r--linux-tools/openssl/crypto/rand/Makefile19
-rw-r--r--linux-tools/openssl/crypto/rsa/Makefile14
-rw-r--r--linux-tools/openssl/fips-1.0/Makefile1
-rw-r--r--linux-tools/openssl/fips-1.0/dsa/Makefile26
l---------linux-tools/openssl/include/openssl/aes.h1
l---------linux-tools/openssl/include/openssl/asn1.h1
l---------linux-tools/openssl/include/openssl/asn1_mac.h1
l---------linux-tools/openssl/include/openssl/asn1t.h1
l---------linux-tools/openssl/include/openssl/bio.h1
l---------linux-tools/openssl/include/openssl/blowfish.h1
l---------linux-tools/openssl/include/openssl/bn.h1
l---------linux-tools/openssl/include/openssl/buffer.h1
l---------linux-tools/openssl/include/openssl/cast.h1
l---------linux-tools/openssl/include/openssl/comp.h1
l---------linux-tools/openssl/include/openssl/conf.h1
l---------linux-tools/openssl/include/openssl/conf_api.h1
l---------linux-tools/openssl/include/openssl/crypto.h1
l---------linux-tools/openssl/include/openssl/des.h1
l---------linux-tools/openssl/include/openssl/des_old.h1
l---------linux-tools/openssl/include/openssl/dh.h1
l---------linux-tools/openssl/include/openssl/dsa.h1
l---------linux-tools/openssl/include/openssl/dso.h1
l---------linux-tools/openssl/include/openssl/e_os2.h1
l---------linux-tools/openssl/include/openssl/ebcdic.h1
l---------linux-tools/openssl/include/openssl/ec.h1
l---------linux-tools/openssl/include/openssl/err.h1
l---------linux-tools/openssl/include/openssl/evp.h1
l---------linux-tools/openssl/include/openssl/fips.h1
l---------linux-tools/openssl/include/openssl/fips_rand.h1
l---------linux-tools/openssl/include/openssl/fips_sha.h1
l---------linux-tools/openssl/include/openssl/hmac.h1
l---------linux-tools/openssl/include/openssl/idea.h1
l---------linux-tools/openssl/include/openssl/krb5_asn.h1
l---------linux-tools/openssl/include/openssl/kssl.h1
l---------linux-tools/openssl/include/openssl/lhash.h1
l---------linux-tools/openssl/include/openssl/md2.h1
l---------linux-tools/openssl/include/openssl/md4.h1
l---------linux-tools/openssl/include/openssl/md5.h1
l---------linux-tools/openssl/include/openssl/mdc2.h1
l---------linux-tools/openssl/include/openssl/obj_mac.h1
l---------linux-tools/openssl/include/openssl/objects.h1
l---------linux-tools/openssl/include/openssl/ocsp.h1
l---------linux-tools/openssl/include/openssl/opensslconf.h1
l---------linux-tools/openssl/include/openssl/opensslv.h1
l---------linux-tools/openssl/include/openssl/ossl_typ.h1
l---------linux-tools/openssl/include/openssl/pem.h1
l---------linux-tools/openssl/include/openssl/pem2.h1
l---------linux-tools/openssl/include/openssl/pkcs12.h1
l---------linux-tools/openssl/include/openssl/pkcs7.h1
l---------linux-tools/openssl/include/openssl/rand.h1
l---------linux-tools/openssl/include/openssl/rc2.h1
l---------linux-tools/openssl/include/openssl/rc4.h1
l---------linux-tools/openssl/include/openssl/rc5.h1
l---------linux-tools/openssl/include/openssl/ripemd.h1
l---------linux-tools/openssl/include/openssl/rsa.h1
l---------linux-tools/openssl/include/openssl/safestack.h1
l---------linux-tools/openssl/include/openssl/sha.h1
l---------linux-tools/openssl/include/openssl/ssl.h1
l---------linux-tools/openssl/include/openssl/ssl2.h1
l---------linux-tools/openssl/include/openssl/ssl23.h1
l---------linux-tools/openssl/include/openssl/ssl3.h1
l---------linux-tools/openssl/include/openssl/stack.h1
l---------linux-tools/openssl/include/openssl/symhacks.h1
l---------linux-tools/openssl/include/openssl/tls1.h1
l---------linux-tools/openssl/include/openssl/tmdiff.h1
l---------linux-tools/openssl/include/openssl/txt_db.h1
l---------linux-tools/openssl/include/openssl/ui.h1
l---------linux-tools/openssl/include/openssl/ui_compat.h1
l---------linux-tools/openssl/include/openssl/x509.h1
l---------linux-tools/openssl/include/openssl/x509_vfy.h1
l---------linux-tools/openssl/include/openssl/x509v3.h1
-rw-r--r--linux-tools/openssl/test/Makefile110
-rw-r--r--linux-tools/rootfs/Makefile243
-rw-r--r--linux-tools/rootfs/Makefile.lisa233
-rwxr-xr-xlinux-tools/rootfs/append.sh17
-rw-r--r--linux-tools/rootfs/dev.txt89
-rw-r--r--linux-tools/rootfs/dir.txt38
-rwxr-xr-xlinux-tools/rootfs/fill_97voip (renamed from linux-tools/rootfs/fill_99voip)9
-rw-r--r--linux-tools/rootfs/image/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/bin/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/dev/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/config/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/network/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/network/if-down.d/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/network/if-post-down.d/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/network/if-pre-up.d/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/network/if-up.d/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/plc/NOPRUNE0
-rwxr-xr-xlinux-tools/rootfs/image/etc/rcS.d/99voip17
-rw-r--r--linux-tools/rootfs/image/etc/rcS.d/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/etc/udhcpc/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/lib/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/lib/modules/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/mnt/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/mnt/flashdisk/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/mnt/ramdisk/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/net/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/proc/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/root/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/sbin/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/share/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/sys/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/tmp/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/usr/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/usr/bin/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/usr/lib/boa/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/usr/sbin/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/usr/share/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/lock/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/lock/subsys/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/log/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/run/NOPRUNE0
-rw-r--r--linux-tools/rootfs/image/var/state/NOPRUNE0
-rwxr-xr-xlinux-tools/rootfs/link.sh9
-rwxr-xr-xlinux-tools/rootfs/link_busybox.sh4
-rw-r--r--linux-tools/rootfs/lnk.txt26
-rw-r--r--linux-tools/rootfs/profile (renamed from linux-tools/rootfs/image/root/.profile)0
-rw-r--r--linux-tools/rootfs/scr.txt18
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/bridge (renamed from linux-tools/rootfs/image/sbin/bridge)0
-rw-r--r--linux-tools/rootfs/scripts/fstab (renamed from linux-tools/rootfs/image/etc/fstab)3
-rw-r--r--linux-tools/rootfs/scripts/group (renamed from linux-tools/rootfs/image/etc/group)0
-rw-r--r--linux-tools/rootfs/scripts/host.conf (renamed from linux-tools/rootfs/image/etc/host.conf)0
-rw-r--r--linux-tools/rootfs/scripts/hosts (renamed from linux-tools/rootfs/image/etc/hosts)6
-rw-r--r--linux-tools/rootfs/scripts/inittab (renamed from linux-tools/rootfs/image/etc/inittab)0
-rw-r--r--linux-tools/rootfs/scripts/nsswitch.conf (renamed from linux-tools/rootfs/image/etc/nsswitch.conf)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/plcfree (renamed from linux-tools/rootfs/image/sbin/plcfree)6
-rw-r--r--linux-tools/rootfs/scripts/protocols (renamed from linux-tools/rootfs/image/etc/protocols)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rc.init (renamed from linux-tools/rootfs/image/rc.init)6
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rc.reboot (renamed from linux-tools/rootfs/image/etc/rc.reboot)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rc.sysinit (renamed from linux-tools/rootfs/image/etc/rc.sysinit)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS (renamed from linux-tools/rootfs/image/etc/rcS)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/04wdd (renamed from linux-tools/rootfs/image/etc/rcS.d/04wdd)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/05syslogd (renamed from linux-tools/rootfs/image/etc/rcS.d/05syslogd)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/06ape110 (renamed from linux-tools/rootfs/image/etc/rcS.d/06ape110)1
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/07rtai (renamed from linux-tools/rootfs/image/etc/rcS.d/07rtai)3
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/08plc (renamed from linux-tools/rootfs/image/etc/rcS.d/08plc)3
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/10network (renamed from linux-tools/rootfs/image/etc/rcS.d/10network)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/12plcpost (renamed from linux-tools/rootfs/image/etc/rcS.d/12plcpost)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/15bridge (renamed from linux-tools/rootfs/image/etc/rcS.d/15bridge)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/16igmp (renamed from linux-tools/rootfs/image/etc/rcS.d/16igmp)0
-rwxr-xr-xlinux-tools/rootfs/scripts/rcS.d/17_8021x40
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/20netfs (renamed from linux-tools/rootfs/image/etc/rcS.d/20netfs)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/30dhcpc (renamed from linux-tools/rootfs/image/etc/rcS.d/30dhcpc)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/60telnetd (renamed from linux-tools/rootfs/image/etc/rcS.d/60telnetd)0
-rwxr-xr-xlinux-tools/rootfs/scripts/rcS.d/70snmp (renamed from linux-tools/rootfs/image/etc/rcS.d/70snmp)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/80wishlist (renamed from linux-tools/rootfs/image/etc/rcS.d/80wishlist)2
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/90safe-return (renamed from linux-tools/rootfs/image/etc/rcS.d/90safe-return)0
-rwxr-xr-x[-rw-r--r--]linux-tools/rootfs/scripts/rcS.d/95ETH_MODE (renamed from linux-tools/rootfs/image/etc/rcS.d/95ETH_MODE)1
-rwxr-xr-xlinux-tools/rootfs/scripts/rcS.d/98conn_server (renamed from linux-tools/rootfs/image/etc/rcS.d/98conn_server)0
-rwxr-xr-xlinux-tools/rootfs/scripts/rcS.d/99httpd (renamed from linux-tools/rootfs/image/etc/rcS.d/97httpd)21
-rw-r--r--linux-tools/rootfs/scripts/syslog.conf (renamed from linux-tools/rootfs/image/etc/syslog.conf)0
-rwxr-xr-xlinux-tools/rootfs/strip.sh6
-rw-r--r--linux-tools/udhcp/default.script50
-rw-r--r--linux-tools/udhcp/script.c28
-rw-r--r--linux-tools/wishlist/inc/mlme.h8
-rw-r--r--linux-tools/wishlist/src/mlme.c91
-rw-r--r--linux-tools/wishlist/src/wishlist.c70
-rw-r--r--linux-tools/wpa_supplicant-0.4.8/.config12
-rw-r--r--linux-tools/wpa_supplicant-0.4.8/wired8021x.conf47
-rw-r--r--linux-tools/wpa_supplicant-0.4.8/wpa_supplicant.c2
-rw-r--r--rtai-3.1-2.6/rtai-core/arch/arm/defconfig2
-rw-r--r--rtai-3.1-2.6/rtai-core/arch/i386/defconfig2
-rw-r--r--tools/bundle/Makefile32
-rw-r--r--tools/bundle/Makefile_Bundle180
-rwxr-xr-xtools/bundle/check.sh26
-rwxr-xr-xtools/bundle/mkimg.sh102
-rw-r--r--voip/Makefile55
-rw-r--r--voip/cgi/Makefile2
-rw-r--r--voip/cgi_chnum/Makefile2
-rw-r--r--voip/demo/CallSignaling.h2
-rw-r--r--voip/demo/H323CallSignaling.cpp933
-rw-r--r--voip/demo/SIPCallSignaling.cpp3920
-rw-r--r--voip/demo/build/makefile5
-rw-r--r--voip/demo/build/subdir.mk6
-rw-r--r--voip/demo/main.cpp25
-rw-r--r--voip/demo/tapi.h1
-rw-r--r--voip/drv_vinetic-2.1/Makefile29
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/dramfw.bin (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/dramfw.bin)bin14850 -> 14850 bytes
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.bin (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.bin)bin14850 -> 14850 bytes
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.c (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.c)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.hex (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.hex)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.txt (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.txt)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.bin (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.bin)bin67698 -> 67698 bytes
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.c (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.c)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.hex (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.hex)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.txt (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.txt)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/errors_RTP_0_17_32_V22.txt (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/errors_RTP_0_17_32_V22.txt)0
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/pramfw.bin (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/pramfw.bin)bin67698 -> 67698 bytes
-rwxr-xr-xvoip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/vinetic_RTP_0_17_32_V22.map (renamed from voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/vinetic_RTP_0_17_32_V22.map)0
-rw-r--r--voip/drv_vinetic-2.1/drv_tapi-3.3.2/Makefile660
-rw-r--r--voip/drv_vinetic-2.1/drv_tapi-3.3.2/drv_config.h104
-rw-r--r--voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile31
-rw-r--r--voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/Makefile80
-rwxr-xr-xvoip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.c4
-rwxr-xr-xvoip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.h5
-rwxr-xr-xvoip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_int.c21
-rw-r--r--voip/drv_vinetic-2.1/drv_vinetic-1.2.1/Makefile694
-rw-r--r--voip/drv_vinetic-2.1/drv_vinetic-1.2.1/drv_config.h151
-rw-r--r--voip/libeXosip2-2.2.2/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/aclocal.m4594
-rw-r--r--voip/libeXosip2-2.2.2/config.h.in116
-rwxr-xr-xvoip/libeXosip2-2.2.2/configure1218
-rw-r--r--voip/libeXosip2-2.2.2/help/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/help/doxygen/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/include/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/include/eXosip2/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/include/eXosip2/eXosip.h76
-rw-r--r--voip/libeXosip2-2.2.2/josua/Makefile.in12
-rwxr-xr-xvoip/libeXosip2-2.2.2/libtool7192
-rw-r--r--voip/libeXosip2-2.2.2/platform/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/platform/vsnet/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/scripts/Makefile.in12
-rwxr-xr-x[-rw-r--r--]voip/libeXosip2-2.2.2/scripts/config.guess151
-rwxr-xr-x[-rw-r--r--]voip/libeXosip2-2.2.2/scripts/config.sub137
-rw-r--r--[-rwxr-xr-x]voip/libeXosip2-2.2.2/scripts/ltmain.sh857
-rw-r--r--voip/libeXosip2-2.2.2/src/Makefile.in12
-rw-r--r--voip/libeXosip2-2.2.2/tools/Makefile.in12
-rw-r--r--voip/libosip2-2.2.2/Makefile.in26
-rw-r--r--voip/libosip2-2.2.2/aclocal.m4594
-rw-r--r--voip/libosip2-2.2.2/config.h.in119
-rwxr-xr-xvoip/libosip2-2.2.2/configure1218
-rw-r--r--voip/libosip2-2.2.2/debian/Makefile.in17
-rw-r--r--voip/libosip2-2.2.2/help/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/help/doxygen/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/help/man/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/include/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/include/osip2/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/include/osipparser2/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/include/osipparser2/headers/Makefile.in15
-rwxr-xr-xvoip/libosip2-2.2.2/libtool7192
-rw-r--r--voip/libosip2-2.2.2/platform/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/platform/rpm/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/platform/vsnet/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/platform/windows/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/scripts/Makefile.in15
-rwxr-xr-x[-rw-r--r--]voip/libosip2-2.2.2/scripts/config.guess151
-rwxr-xr-x[-rw-r--r--]voip/libosip2-2.2.2/scripts/config.sub137
-rw-r--r--[-rwxr-xr-x]voip/libosip2-2.2.2/scripts/ltmain.sh857
-rw-r--r--voip/libosip2-2.2.2/src/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/src/osip2/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/src/osipparser2/Makefile.in15
-rw-r--r--voip/libosip2-2.2.2/src/test/Makefile.in15
-rw-r--r--[-rwxr-xr-x]voip/libosip2-2.2.2/src/test/res/Makefile.in15
612 files changed, 25929 insertions, 80409 deletions
diff --git a/.hgignore b/.hgignore
index 59e6cfd175..4f75f65cfd 100644
--- a/.hgignore
+++ b/.hgignore
@@ -19,6 +19,7 @@ syntax: glob
*.Po
*.exp
*.man
+tags # file created by ctags when we use with vim
# from .cvsignore files
# Boa 0.94.14rc18
linux-tools/boa-0.94.14rc18/docs/Makefile
@@ -85,6 +86,17 @@ linux-tools/openssl/apps/openssl.sha1
linux-tools/openssl/*.flc
linux-tools/openssl/*semantic.cache
linux-tools/openssl/demos/easy_tls/test
+linux-tools/openssl/apps/Makefile
+linux-tools/openssl/crypto/conf/Makefile
+linux-tools/openssl/crypto/dh/Makefile
+linux-tools/openssl/crypto/dsa/Makefile
+linux-tools/openssl/crypto/err/Makefile
+linux-tools/openssl/crypto/evp/Makefile
+linux-tools/openssl/crypto/rand/Makefile
+linux-tools/openssl/crypto/rsa/Makefile
+linux-tools/openssl/fips-1.0/Makefile
+linux-tools/openssl/fips-1.0/dsa/Makefile
+linux-tools/openssl/test/Makefile
# iptables
linux-tools/iptables/.*
linux-tools/iptables/iptables.8
@@ -154,6 +166,8 @@ linux-2.6.10/scripts/lxdialog/lxdialog
linux-2.6.10/scripts/mod/elfconfig.h
linux-2.6.10/scripts/mod/mk_elfconfig
linux-2.6.10/scripts/mod/modpost
+linux-2.6.10/scripts/bin2c
+linux-2.6.10/scripts/conmakehash
linux-2.6.10/usr/gen_init_cpio
linux-2.6.10/usr/initramfs_data.cpio
linux-2.6.10/usr/initramfs_data.cpio.gz
@@ -166,6 +180,129 @@ linux-2.6.10/arch/arm/boot/compressed/piggy.gz
linux-2.6.10/arch/arm/boot/compressed/vmlinux.lds
linux-2.6.10/arch/arm/boot/compressed/vmlinux.S
linux-2.6.10/arch/arm/boot/compressed/vmlinux
+# OpenSSL
+linux-tools/openssl/test/bftest.c
+linux-tools/openssl/test/bntest.c
+linux-tools/openssl/test/casttest.c
+linux-tools/openssl/test/destest.c
+linux-tools/openssl/test/dhtest.c
+linux-tools/openssl/test/dsatest.c
+linux-tools/openssl/test/dummytest
+linux-tools/openssl/test/ectest.c
+linux-tools/openssl/test/enginetest.c
+linux-tools/openssl/test/evp_test.c
+linux-tools/openssl/test/exptest.c
+linux-tools/openssl/test/fips_aesavs.c
+linux-tools/openssl/test/fips_desmovs.c
+linux-tools/openssl/test/fips_dsatest.c
+linux-tools/openssl/test/fips_dssvs.c
+linux-tools/openssl/test/fips_hmactest.c
+linux-tools/openssl/test/fips_randtest.c
+linux-tools/openssl/test/fips_rngvs.c
+linux-tools/openssl/test/fips_rsagtest.c
+linux-tools/openssl/test/fips_rsastest.c
+linux-tools/openssl/test/fips_rsavtest.c
+linux-tools/openssl/test/fips_shatest.c
+linux-tools/openssl/test/fips_test_suite.c
+linux-tools/openssl/test/hmactest.c
+linux-tools/openssl/test/ideatest.c
+linux-tools/openssl/test/md2test.c
+linux-tools/openssl/test/md4test.c
+linux-tools/openssl/test/md5test.c
+linux-tools/openssl/test/mdc2test.c
+linux-tools/openssl/test/randtest.c
+linux-tools/openssl/test/rc2test.c
+linux-tools/openssl/test/rc4test.c
+linux-tools/openssl/test/rc5test.c
+linux-tools/openssl/test/rmdtest.c
+linux-tools/openssl/test/rsa_test.c
+linux-tools/openssl/test/sha1test.c
+linux-tools/openssl/test/shatest.c
+linux-tools/openssl/test/ssltest.c
+linux-tools/openssl/crypto/aes/lib
+linux-tools/openssl/crypto/asn1/lib
+linux-tools/openssl/crypto/bf/lib
+linux-tools/openssl/crypto/bio/lib
+linux-tools/openssl/crypto/bn/lib
+linux-tools/openssl/crypto/buffer/lib
+linux-tools/openssl/crypto/buildinf.h
+linux-tools/openssl/crypto/cast/lib
+linux-tools/openssl/crypto/comp/lib
+linux-tools/openssl/crypto/conf/lib
+linux-tools/openssl/crypto/des/lib
+linux-tools/openssl/crypto/dh/lib
+linux-tools/openssl/crypto/dsa/lib
+linux-tools/openssl/crypto/dso/lib
+linux-tools/openssl/crypto/ec/lib
+linux-tools/openssl/crypto/err/lib
+linux-tools/openssl/crypto/evp/lib
+linux-tools/openssl/crypto/hmac/lib
+linux-tools/openssl/crypto/idea/lib
+linux-tools/openssl/crypto/krb5/lib
+linux-tools/openssl/crypto/lhash/lib
+linux-tools/openssl/crypto/lib
+linux-tools/openssl/crypto/md2/lib
+linux-tools/openssl/crypto/md4/lib
+linux-tools/openssl/crypto/md5/lib
+linux-tools/openssl/crypto/mdc2/lib
+linux-tools/openssl/crypto/objects/lib
+linux-tools/openssl/crypto/ocsp/lib
+linux-tools/openssl/crypto/pem/lib
+linux-tools/openssl/crypto/pkcs12/lib
+linux-tools/openssl/crypto/pkcs7/lib
+linux-tools/openssl/crypto/rand/lib
+linux-tools/openssl/crypto/rc2/lib
+linux-tools/openssl/crypto/rc4/lib
+linux-tools/openssl/crypto/rc5/lib
+linux-tools/openssl/crypto/ripemd/lib
+linux-tools/openssl/crypto/rsa/lib
+linux-tools/openssl/crypto/sha/lib
+linux-tools/openssl/crypto/stack/lib
+linux-tools/openssl/crypto/txt_db/lib
+linux-tools/openssl/crypto/ui/lib
+linux-tools/openssl/crypto/x509/lib
+linux-tools/openssl/crypto/x509v3/lib
+linux-tools/openssl/ssl/lib
+linux-tools/openssl/test/bftest
+linux-tools/openssl/test/bntest
+linux-tools/openssl/test/casttest
+linux-tools/openssl/test/destest
+linux-tools/openssl/test/dhtest
+linux-tools/openssl/test/dsatest
+linux-tools/openssl/test/ectest
+linux-tools/openssl/test/enginetest
+linux-tools/openssl/test/evp_test
+linux-tools/openssl/test/exptest
+linux-tools/openssl/test/fips_aesavs
+linux-tools/openssl/test/fips_desmovs
+linux-tools/openssl/test/fips_dsatest
+linux-tools/openssl/test/fips_dssvs
+linux-tools/openssl/test/fips_hmactest
+linux-tools/openssl/test/fips_randtest
+linux-tools/openssl/test/fips_rngvs
+linux-tools/openssl/test/fips_rsagtest
+linux-tools/openssl/test/fips_rsastest
+linux-tools/openssl/test/fips_rsavtest
+linux-tools/openssl/test/fips_shatest
+linux-tools/openssl/test/fips_test_suite
+linux-tools/openssl/test/hmactest
+linux-tools/openssl/test/ideatest
+linux-tools/openssl/test/md2test
+linux-tools/openssl/test/md4test
+linux-tools/openssl/test/md5test
+linux-tools/openssl/test/mdc2test
+linux-tools/openssl/test/randtest
+linux-tools/openssl/test/rc2test
+linux-tools/openssl/test/rc4test
+linux-tools/openssl/test/rc5test
+linux-tools/openssl/test/rmdtest
+linux-tools/openssl/test/rsa_test
+linux-tools/openssl/test/sha1test
+linux-tools/openssl/test/shatest
+linux-tools/openssl/test/ssltest
+linux-tools/wpa_supplicant-0.4.8/wpa_cli
+linux-tools/wpa_supplicant-0.4.8/wpa_passphrase
+linux-tools/wpa_supplicant-0.4.8/wpa_supplicant
# Driver build-generated files
app/obj/snmp_agent
app/obj/snmp_agent.gdb
@@ -177,6 +314,7 @@ app/sm-phlic/src/phlic_data.inc
app/sm-phlic/src/pmd_states.c
app/sm-plc-drv/obj/rt_cristina/linux_drv.mod.c
app/sm-version/stamp.c
+app/userconf
# Executables
linux-tools/boa-0.94.14rc18/src/boa
linux-tools/boa-0.94.14rc18/src/boa_indexer
@@ -201,41 +339,13 @@ linux-tools/wdd/wdd
linux-tools/wishlist/wishlist
linux-tools/udhcp/udhcpd
linux-tools/igmp_filter/.tmp_versions/*
+linux-tools/dconf/dconf
tools/genNVRAM/genNVRAM
+tools/bundle/*.bin
+tools/bundle/*.tar.bz2
# rootfs
-linux-tools/rootfs/image/bin/boa
-linux-tools/rootfs/image/bin/brctl
-linux-tools/rootfs/image/bin/busybox
-linux-tools/rootfs/image/bin/ebtables
-linux-tools/rootfs/image/bin/iptables
-linux-tools/rootfs/image/bin/mesbox
-linux-tools/rootfs/image/bin/snmp_agent
-linux-tools/rootfs/image/bin/tc
-linux-tools/rootfs/image/bin/tinyftp
-linux-tools/rootfs/image/bin/tinyftpchild
-linux-tools/rootfs/image/bin/udhcpc
-linux-tools/rootfs/image/bin/udhcpd
-linux-tools/rootfs/image/bin/uphp
-linux-tools/rootfs/image/bin/wishlist
-linux-tools/rootfs/image/etc/boa.conf
-linux-tools/rootfs/image/etc/udhcpd.bssid
-linux-tools/rootfs/image/etc/udhcpd.conf
-linux-tools/rootfs/image/etc/udhcpd.leases
-linux-tools/rootfs/image/sbin/mrst
-linux-tools/rootfs/image/sbin/safe-return
-linux-tools/rootfs/image/sbin/wdd
-linux-tools/rootfs/image/usr/lib/boa/boa_indexer
-linux-tools/rootfs/image/usr/share/cgi-bin/Makefile
-linux-tools/rootfs/image/usr/share/cgi-bin/*.sh
-linux-tools/rootfs/image/usr/share/cgi-bin/*.php
-linux-tools/rootfs/image/usr/share/cgi-bin/*.html
-linux-tools/rootfs/image/usr/share/cgi-bin/*.c
-linux-tools/rootfs/image/usr/share/www/*.jpg
-linux-tools/rootfs/image/usr/share/www/*.gif
-linux-tools/rootfs/image/usr/share/www/*.jpeg
-linux-tools/rootfs/image/usr/share/www/*.png
-linux-tools/rootfs/image/usr/share/www/*.html
-linux-tools/rootfs/initrd.efs2.gz
+linux-tools/rootfs/initramfs_list
+linux-tools/rootfs/scripts/rcS.d/97voip
# Spidmonitor
spidmonitor/build/*
spidmonitor/deploy/*
@@ -244,26 +354,41 @@ spidmonitor/deploy/*
*.Plo
*.la
*.lai
-voip/libosip2-2.2.2/config.*
+voip/libosip2-2.2.2/config.h
+voip/libosip2-2.2.2/config.log
+voip/libosip2-2.2.2/config.status
+voip/libosip2-2.2.2/configure
+voip/libosip2-2.2.2/aclocal.m4
+voip/libosip2-2.2.2/libtool
+voip/libosip2-2.2.2/scripts/config.*
+voip/libosip2-2.2.2/scripts/ltmain.sh
voip/libosip2-2.2.2/stamp*
voip/libosip2-2.2.2/libosip2.pc
+voip/libeXosip2-2.2.2/config.h
+voip/libeXosip2-2.2.2/config.log
+voip/libeXosip2-2.2.2/config.status
+voip/libeXosip2-2.2.2/configure
+voip/libeXosip2-2.2.2/aclocal.m4
+voip/libeXosip2-2.2.2/libtool
+voip/libeXosip2-2.2.2/scripts/config.*
+voip/libeXosip2-2.2.2/scripts/ltmain.sh
voip/libeXosip2-2.2.2/tools/sip_reg
voip/libeXosip2-2.2.2/config.*
voip/libeXosip2-2.2.2/stamp*
-voip/drv_vinetic-2.1/drv_tapi-3.3.2/Makefile
voip/drv_vinetic-2.1/drv_tapi-3.3.2/config.log
voip/drv_vinetic-2.1/drv_tapi-3.3.2/config.status
-voip/drv_vinetic-2.1/drv_tapi-3.3.2/drv_config.h
-voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile
voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile.2*
-voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/Makefile
-voip/drv_vinetic-2.1/drv_vinetic-1.2.1/Makefile
+voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/.tmp_versions/*
+voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/.tmp_versions/*
voip/drv_vinetic-2.1/drv_vinetic-1.2.1/config.log
voip/drv_vinetic-2.1/drv_vinetic-1.2.1/config.status
-voip/drv_vinetic-2.1/drv_vinetic-1.2.1/drv_config.h
+voip/build/*
+voip/demo/*
syntax: regexp
^voip/.*stamp.*$
-^voip/libeXosip2.*Makefile$
+^voip/libeXosip2.*Makefile.in$
+^voip/libeXosip2.*Makefile
+^voip/libosip2.*Makefile.in$
^voip/libosip2.*Makefile$
# begin regexp syntax
syntax: regexp
diff --git a/app/Makefile_x86 b/app/Makefile_x86
new file mode 100644
index 0000000000..0cdab17136
--- /dev/null
+++ b/app/Makefile_x86
@@ -0,0 +1,51 @@
+#-------------------------#
+# Makefile for SNMP agent #
+# ****** LINUX ****** #
+# =====< x86-linux >===== #
+# (sm-agent and sm-mib) #
+#-------------------------#
+# by Dušan Stefanović #
+# based on Makefile_polux #
+# by Alexandre Poullain #
+# "Spidcom Technologies" #
+# Date : 11 Dec 2007 #
+#-------------------------#
+
+GCCTARGET = x86-linux
+#GCCTOOLS = /usr/local/toolchains/arm-uclinux/bin
+#COMPILERROOT = /usr/local/toolchains/arm-uclinux/
+
+CC = g++
+AR = ar
+
+#************************************************************
+
+OBJPARENT = ./obj
+OBJDIR = $(OBJPARENT)/$(GCCTARGET)
+
+OBJS = sm-agent/$(OBJDIR)/sm-agent.a sm-mib/$(OBJDIR)/sm-mib.a sm-custom-mib/$(OBJDIR)/sm-custom-mib.a
+
+.PHONY $(OBJDIR)/snmp_agent : $(OBJDIR) $(OBJS)
+ $(CC) -o $(OBJDIR)/snmp_agent $(LDFLAGS) $(OBJS) -lpthread
+
+$(OBJPARENT) :
+ -mkdir $(OBJPARENT)
+
+$(OBJDIR) : $(OBJPARENT)
+ -mkdir $(OBJDIR)
+
+sm-agent/$(OBJDIR)/sm-agent.a :
+ cd sm-agent;make -f Makefile_x86
+
+sm-mib/$(OBJDIR)/sm-mib.a :
+ cd sm-mib;make -f Makefile_x86
+
+sm-custom-mib/$(OBJDIR)/sm-custom-mib.a :
+ cd sm-custom-mib;make -f Makefile_x86
+
+clean:
+ cd sm-agent;make -f Makefile_x86 clean
+ cd sm-mib;make -f Makefile_x86 clean
+ cd sm-custom-mib; make -f Makefile_x86 clean
+ -rm -rf $(OBJDIR)
+ -rmdir $(OBJPARENT)
diff --git a/app/sm-agent/.cdtbuild b/app/sm-agent/.cdtbuild
index f5867b4d0c..43abe8a403 100644
--- a/app/sm-agent/.cdtbuild
+++ b/app/sm-agent/.cdtbuild
@@ -1,54 +1,58 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<?fileVersion 3.1.0?>
+
<ManagedProjectBuildInfo>
- <project id="sm-agent.cdt.managedbuild.target.gnu.exe.392486265" name="Executable (Gnu)" projectType="cdt.managedbuild.target.gnu.exe">
- <configuration id="cdt.managedbuild.config.gnu.exe.debug.1614448811" name="Debug" description="" parent="cdt.managedbuild.config.gnu.exe.debug" artifactName="sm-agent" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" cleanCommand="rm -rf">
- <toolChain superClass="cdt.managedbuild.toolchain.gnu.exe.debug" id="cdt.managedbuild.toolchain.gnu.exe.debug.277447947" name="GCC Tool Chain">
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505" name="GCC C++ Compiler" command="g++-3.4">
- <option superClass="gnu.cpp.compiler.option.preprocessor.def" id="gnu.cpp.compiler.option.preprocessor.def.733537767" valueType="definedSymbols">
- <listOptionValue value="FEATURE_AGENT" builtIn="false"/>
- <listOptionValue value="_NO_THREADS" builtIn="false"/>
- <listOptionValue value="__LINUX__" builtIn="false"/>
- <listOptionValue value="SIMULATION_TEST" builtIn="false"/>
- <listOptionValue value="DEBUG_AGENT_SNMP" builtIn="false"/>
- </option>
- <option superClass="gnu.cpp.compiler.option.include.paths" id="gnu.cpp.compiler.option.include.paths.1941287715" valueType="includePath">
- <listOptionValue value="../inc" builtIn="false"/>
- <listOptionValue value="../../sm-mib/inc" builtIn="false"/>
- <listOptionValue value="../../sm-mib" builtIn="false"/>
- <listOptionValue value="../../../include" builtIn="false"/>
- <listOptionValue value="../" builtIn="false"/>
- </option>
- </tool>
- <tool superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.301144338" name="GCC C Compiler" command="gcc-3.4"/>
- <tool superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug" id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1971354664" name="GCC C Linker"/>
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1039151306" name="GCC C++ Linker" command="g++-3.4">
- <option superClass="gnu.cpp.link.option.libs" id="gnu.cpp.link.option.libs.1677587679" valueType="libs">
- <listOptionValue value="sm-mib" builtIn="false"/>
- </option>
- <option superClass="gnu.cpp.link.option.paths" id="gnu.cpp.link.option.paths.848289700" valueType="stringList">
- <listOptionValue value="../../sm-mib/Debug" builtIn="false"/>
- </option>
- </tool>
- <tool superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1991424756" name="GCC Assembler"/>
- <macros/>
- </toolChain>
- <resourceConfiguration id="cdt.managedbuild.config.gnu.exe.debug.1614448811./sm-agent/src/spidcom_mib.cpp" name="spidcom_mib.cpp" exclude="true" resourcePath="/sm-agent/src/spidcom_mib.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/spidcom_mib.cpp" rcbsApplicability="disable">
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/spidcom_mib.cpp" name="GCC C++ Compiler"/>
- </resourceConfiguration>
- <resourceConfiguration id="cdt.managedbuild.config.gnu.exe.debug.1614448811./sm-agent/src/bridge_mib.cpp" name="bridge_mib.cpp" exclude="true" resourcePath="/sm-agent/src/bridge_mib.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/bridge_mib.cpp" rcbsApplicability="disable">
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/bridge_mib.cpp" name="GCC C++ Compiler"/>
- </resourceConfiguration>
- </configuration>
- <configuration id="cdt.managedbuild.config.gnu.exe.release.1005693407" name="Release" description="" parent="cdt.managedbuild.config.gnu.exe.release" artifactName="sm-agent" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" cleanCommand="rm -rf">
- <toolChain superClass="cdt.managedbuild.toolchain.gnu.exe.release" id="cdt.managedbuild.toolchain.gnu.exe.release.1922425609" name="GCC Tool Chain">
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.256568075" name="GCC C++ Compiler"/>
- <tool superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1004530149" name="GCC C Compiler"/>
- <tool superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release" id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1641269530" name="GCC C Linker"/>
- <tool superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.983299017" name="GCC C++ Linker"/>
- <tool superClass="cdt.managedbuild.tool.gnu.assembler.exe.release" id="cdt.managedbuild.tool.gnu.assembler.exe.release.885959087" name="GCC Assembler"/>
- </toolChain>
- </configuration>
- <macros/>
- </project>
-</ManagedProjectBuildInfo> \ No newline at end of file
+<project id="sm-agent.cdt.managedbuild.target.gnu.exe.392486265" name="Executable (Gnu)" projectType="cdt.managedbuild.target.gnu.exe">
+<configuration artifactName="sm-agent" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.1614448811" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.277447947" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.733537767" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="FEATURE_AGENT"/>
+<listOptionValue builtIn="false" value="_NO_LOGGING"/>
+<listOptionValue builtIn="false" value="_NO_THREADS"/>
+<listOptionValue builtIn="false" value="__LINUX__"/>
+<listOptionValue builtIn="false" value="SIMULATION_TEST"/>
+<listOptionValue builtIn="false" value="DEBUG_AGENT_SNMP"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.1941287715" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="../inc"/>
+<listOptionValue builtIn="false" value="../../sm-mib/inc"/>
+<listOptionValue builtIn="false" value="../../sm-mib"/>
+<listOptionValue builtIn="false" value="../../../include"/>
+<listOptionValue builtIn="false" value="../"/>
+<listOptionValue builtIn="false" value="../../sm-plc-drv"/>
+<listOptionValue builtIn="false" value="../../sm-plc-drv/inc"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.301144338" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1971354664" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1039151306" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<option id="gnu.cpp.link.option.libs.1677587679" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="sm-mib"/>
+</option>
+<option id="gnu.cpp.link.option.paths.848289700" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="../../sm-mib/Debug"/>
+</option>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1991424756" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"/>
+<macros/>
+</toolChain>
+<resourceConfiguration exclude="true" id="cdt.managedbuild.config.gnu.exe.debug.1614448811./sm-agent/src/spidcom_mib.cpp" name="spidcom_mib.cpp" rcbsApplicability="disable" resourcePath="/sm-agent/src/spidcom_mib.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/spidcom_mib.cpp">
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/spidcom_mib.cpp" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505"/>
+</resourceConfiguration>
+<resourceConfiguration exclude="true" id="cdt.managedbuild.config.gnu.exe.debug.1614448811./sm-agent/src/bridge_mib.cpp" name="bridge_mib.cpp" rcbsApplicability="disable" resourcePath="/sm-agent/src/bridge_mib.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/bridge_mib.cpp">
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505./sm-agent/src/bridge_mib.cpp" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1332017505"/>
+</resourceConfiguration>
+</configuration>
+<configuration artifactName="sm-agent" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1005693407" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1922425609" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.256568075" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1004530149" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1641269530" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.983299017" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.885959087" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release"/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/app/sm-agent/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/app/sm-agent/.settings/org.eclipse.cdt.managedbuilder.core.prefs
index 6fa2afdcfb..6de3602e7f 100644
--- a/app/sm-agent/.settings/org.eclipse.cdt.managedbuilder.core.prefs
+++ b/app/sm-agent/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -1,10 +1,10 @@
-#Fri Mar 02 18:42:40 GMT+01:00 2007
+#Tue Dec 11 14:05:03 CET 2007
+cdt.managedbuild.config.gnu.exe.debug.1614448811/internalBuilder/enabled=false
+cdt.managedbuild.config.gnu.exe.debug.1614448811/internalBuilder/ignoreErr=true
+cdt.managedbuild.config.gnu.exe.release.1005693407/internalBuilder/enabled=false
cdt.managedbuild.config.gnu.exe.release.1005693407/internalBuilder/ignoreErr=true
-environment/project=<?xml version\="1.0"?>\n<environment/>
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1614448811=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="C_INCLUDE_PATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1614448811=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<environment>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="replace" value\="/usr/lib/qt/include\:/usr/lib/qt/include\:/usr/lib/qt/include\:/usr/lib/qt/include"/>\n<variable name\="CPATH" operation\="remove" value\=""/>\n<variable name\="C_INCLUDE_PATH" operation\="remove" value\=""/>\n</environment>\n
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1614448811=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
-cdt.managedbuild.config.gnu.exe.release.1005693407/internalBuilder/enabled=false
+environment/project=<?xml version\="1.0"?>\n<environment/>
environment/project/cdt.managedbuild.config.gnu.exe.debug.1614448811=<?xml version\="1.0"?>\n<environment/>
-cdt.managedbuild.config.gnu.exe.debug.1614448811/internalBuilder/enabled=false
-eclipse.preferences.version=1
-cdt.managedbuild.config.gnu.exe.debug.1614448811/internalBuilder/ignoreErr=true
diff --git a/app/sm-agent/Makefile_x86 b/app/sm-agent/Makefile_x86
new file mode 100644
index 0000000000..fe79af671c
--- /dev/null
+++ b/app/sm-agent/Makefile_x86
@@ -0,0 +1,120 @@
+#-------------------------#
+# Makefile for SNMP agent #
+# ******* LINUX ******* #
+# =====< x86-linux >===== #
+# ( sm-agent ) #
+#-------------------------#
+# by Dušan Stefanović #
+# based on Makefile_polux #
+# by Alexandre Poullain #
+# "Spidcom Technologies" #
+# Date : 11 Dec 2007 #
+#-------------------------#
+
+OBJS = $(OBJDIR)/address.o
+OBJS += $(OBJDIR)/asn1.o
+OBJS += $(OBJDIR)/collect.o
+OBJS += $(OBJDIR)/counter.o
+OBJS += $(OBJDIR)/ctr64.o
+OBJS += $(OBJDIR)/eventlist.o
+OBJS += $(OBJDIR)/eventlistholder.o
+OBJS += $(OBJDIR)/gauge.o
+OBJS += $(OBJDIR)/integer.o
+OBJS += $(OBJDIR)/msec.o
+OBJS += $(OBJDIR)/msgqueue.o
+OBJS += $(OBJDIR)/notifyqueue.o
+OBJS += $(OBJDIR)/octet.o
+OBJS += $(OBJDIR)/oid.o
+OBJS += $(OBJDIR)/pdu.o
+OBJS += $(OBJDIR)/reentrant.o
+OBJS += $(OBJDIR)/snmpmsg.o
+OBJS += $(OBJDIR)/target.o
+OBJS += $(OBJDIR)/timetick.o
+OBJS += $(OBJDIR)/userdefined.o
+OBJS += $(OBJDIR)/usertimeout.o
+OBJS += $(OBJDIR)/uxsnmp.o
+OBJS += $(OBJDIR)/v3.o
+OBJS += $(OBJDIR)/vb.o
+OBJS += $(OBJDIR)/avl_map.o
+OBJS += $(OBJDIR)/map.o
+OBJS += $(OBJDIR)/mib.o
+OBJS += $(OBJDIR)/mib_avl_map.o
+OBJS += $(OBJDIR)/mib_context.o
+OBJS += $(OBJDIR)/mib_entry.o
+OBJS += $(OBJDIR)/mib_map.o
+OBJS += $(OBJDIR)/mib_proxy.o
+OBJS += $(OBJDIR)/notification_originator.o
+OBJS += $(OBJDIR)/request.o
+OBJS += $(OBJDIR)/sim_mib.o
+OBJS += $(OBJDIR)/snmp_counters.o
+OBJS += $(OBJDIR)/snmp_group.o
+OBJS += $(OBJDIR)/snmp_notification_mib.o
+OBJS += $(OBJDIR)/snmp_pp_ext.o
+OBJS += $(OBJDIR)/snmp_proxy_mib.o
+OBJS += $(OBJDIR)/snmp_request.o
+OBJS += $(OBJDIR)/snmp_target_mib.o
+OBJS += $(OBJDIR)/snmp_textual_conventions.o
+OBJS += $(OBJDIR)/system_group.o
+OBJS += $(OBJDIR)/threads.o
+OBJS += $(OBJDIR)/tools.o
+OBJS += $(OBJDIR)/vacm.o
+OBJS += $(OBJDIR)/simulator.o
+OBJS += $(OBJDIR)/underlayer.o
+OBJS += $(OBJDIR)/log.o
+OBJS += $(OBJDIR)/agent.o
+OBJS += $(OBJDIR)/if_mib.o
+OBJS += $(OBJDIR)/ip_mib.o
+OBJS += $(OBJDIR)/mau_mib.o
+OBJS += $(OBJDIR)/radius_auth_client_mib.o
+OBJS += $(OBJDIR)/spc200.o
+OBJS += $(OBJDIR)/systemmanager.o
+OBJS += $(OBJDIR)/autoinccounter.o
+OBJS += $(OBJDIR)/agent_remote_log.o
+OBJS += $(OBJDIR)/sm_agent_log_entry.o
+
+#************************************************************
+
+GCCTARGET = x86-linux
+
+GCCROOT = $(COMPILERROOT)
+GCCBIN = $(GCCROOT)/bin
+
+#GCCTOOLS = /usr/local/toolchains/arm-uclinux/bin
+#COMPILERROOT = /usr/local/toolchains/arm-uclinux/
+
+CC = g++
+AR = ar
+
+CFLAGS=$(DEFINES) $(INCLUDE) -c -O2 -fno-rtti -fno-access-control -fno-exceptions
+
+INCLUDE = -I./inc -I../sm-custom-mib/inc -I../sm-mib -I../../include -I.
+
+DEFINES = -DFEATURE_AGENT -D_NO_THREADS -D__LINUX__ -D_NO_LOGGING -DSIMULATION_TEST -DLINUX_BRIDGE_SIMULATION_MODE
+#-DREMOTE_LOG (remove -fno-rtti to use this one on the board)
+
+DEP_H =
+#DEP_H = autoinccounter.h bridge_mib.h if_mib.h ip_mib.h mau_mib.h mib-common.h spc200.h systemmanager.h
+
+
+OBJPARENT = ./obj
+OBJDIR = $(OBJPARENT)/$(GCCTARGET)
+SRCDIR = ./src
+
+#************************************************************
+
+$(OBJDIR)/sm-agent.a : $(OBJDIR) $(OBJS)
+ $(AR) -r $@ $(OBJS)
+
+$(OBJPARENT) :
+ -mkdir $(OBJPARENT)
+
+$(OBJDIR) : $(OBJPARENT)
+ -mkdir $(OBJDIR)
+
+$(OBJDIR)/%.o : $(SRCDIR)/%.cpp $(DEP_H)
+ $(CC) $(CFLAGS) -o $@ $<
+
+clean :
+ -rm -rf $(OBJDIR)
+ -rm -rf $(OBJPARENT)
+
diff --git a/app/sm-agent/inc/mib-common.h b/app/sm-agent/inc/mib-common.h
index 657130bb60..f756b5c9b7 100755
--- a/app/sm-agent/inc/mib-common.h
+++ b/app/sm-agent/inc/mib-common.h
@@ -3,8 +3,8 @@
* PROGRAM MODULE
*
* $Workfile: mib-common.h $
- * $Author: maleval $
- * $Date: 2007/08/02 16:29:46 $
+ * $Author: paris $
+ * $Date: 2007/11/09 18:06:00 $
*
* Copyright (C) 2003 by SPiDCOM Technologies All rights reserved.
*
@@ -68,16 +68,21 @@
#define _DEFAULT_DATA_REFRESH_PERIOD_NODE 1
#define _DEFAULT_AGC_PERIOD 36 //PR17
#define _DEFAULT_AGC_SAMPLES 2000 //PR17
+
#ifdef SIMULATION_TEST
#define _DEFAULT_ANALYSER_TIMEOUT_DELAY 60 //PR12 (Spectrum timeout in seconds)
#define _DEFAULT_ANALYSER_ACTIVATION_DELAY 5 //PR12 (Spectrum activation delay in seconds)
+
#define _DEFAULT_DATA_REFRESH_PERIOD 5
+#define _HOST_DATA_REFRESH_TIME_DELTA 2
+
#define _DYNAMIC_HOST_SUPPRESSION
#define _DYNAMIC_HOST_PARAM_CHANGE
#define _DEFAULT_DATA_REFRESH_PERIOD_SN 3
#define _DEFAULT_DATA_REFRESH_PERIOD_AGC 3
#else
-#define _DEFAULT_DATA_REFRESH_PERIOD 3
+#define _DEFAULT_DATA_REFRESH_PERIOD 5
+#define _HOST_DATA_REFRESH_TIME_DELTA 5
#define _DEFAULT_DATA_REFRESH_PERIOD_SN 3
#define _DEFAULT_DATA_REFRESH_PERIOD_AGC 3
#endif
diff --git a/app/sm-agent/inc/simulator.h b/app/sm-agent/inc/simulator.h
index 1fdc6cbd49..b8f68ada25 100755
--- a/app/sm-agent/inc/simulator.h
+++ b/app/sm-agent/inc/simulator.h
@@ -17,6 +17,8 @@
class SimulatorArgs {
static SimulatorArgs* m_instance;
bool m_areHostsDynamic;
+ bool m_isHostNbFromConfigFile;
+ bool m_isHostNbFromConfigFileRandom;
unsigned short m_nbHosts;
//---- FD01: SNMP BEGIN community
char snmpGETCommunity[ASN_MAX_NAME_LEN];
@@ -27,6 +29,14 @@ public:
static SimulatorArgs* getInstance();
+ void setHostNbFromConfigFile(bool enabled);
+
+ bool getHostNbFromConfigFile();
+
+ void setHostNbFromConfigFileRandom(bool enabled);
+
+ bool getHostNbFromConfigFileRandom();
+
void setAreHostsDynamic(bool isDynamic);
bool getAreHostsDynamic();
@@ -59,6 +69,7 @@ class Simulator : public Underlayer , AutoIncCounter {
bool m_isHostActive[PLCP_MAX_HOST];
bool m_areHostsDynamic;
+ bool m_isHostNbFromConfigFile;
time_t ltime; // PR12
bool m_stpBridgeEnabled; // stp simulation process
@@ -132,6 +143,9 @@ public:
virtual int mib_getHostNb();
virtual int mib_getPlcHost(int hostNb, struct plc_host * plcHost);
virtual int mib_setPlcHost(int hostNb, struct plc_host * plcHost);
+
+ virtual int mib_getPlcLightHost(int hostId, struct plc_host * plcHost);
+ virtual int mib_getIndexByMac(const unsigned char iMacAddress[6]);
/* No context for the system_carrier_tab, as the system, it's unique */
virtual int mib_getSystemCarrier(struct system_carrier_tab * systemCarrierTab);
@@ -232,10 +246,24 @@ public:
//virtual void mib_mac_add_to_str_ip(char* strIp,const unsigned char macAdd[],const char* dev);
// SNMP Community
- virtual bool mib_getSNMPCommunity(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name); //---- FD01: SNMP community
+ virtual bool mib_get_SNMP_community(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name); //---- FD01: SNMP community
unsigned long getInc();
+private :
+ /**
+ * Apply the config file and update the nb
+ * host + active status of hosts
+ *
+ * file format is :
+ * nbHosts=12
+ *
+ */
+ void applyNbHostFromConfigFile();
+
+ void applyNbHostFromConfigFile(bool doIt);
+
+ int buildMac(int i);
};
diff --git a/app/sm-agent/inc/spc200.h b/app/sm-agent/inc/spc200.h
index d13a542562..a43c4a9ced 100644
--- a/app/sm-agent/inc/spc200.h
+++ b/app/sm-agent/inc/spc200.h
@@ -4006,7 +4006,8 @@ public:
unsigned long p2);
//--AgentGen BEGIN=portStatsEntry
void init( bool refresh = false );
- void removeAllRows();
+ void removeAllRows();
+ void remove_obsolete_rows(OrderedList<Oidx>& confirmed);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4047,8 +4048,9 @@ public:
unsigned long p3,
unsigned long p4);
//--AgentGen BEGIN=portStats2Entry
- void init( bool refresh = false );
- void removeAllRows();
+ void init( const Oidx& index );
+ void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4086,9 +4088,10 @@ public:
virtual void set_row(MibTableRow* r,
unsigned long p1,
unsigned long p2);
-//--AgentGen BEGIN=portStats3Entry
- void init( bool refresh = false );
- void removeAllRows();
+//--AgentGen BEGIN=portStats3Entry
+ void init( const Oidx& index );
+ void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4127,8 +4130,9 @@ public:
long p2,
unsigned long p3);
//--AgentGen BEGIN=plcBasePortEntry
- void init( bool refresh = false );
+ void init( const Oidx& index );
void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4170,10 +4174,11 @@ public:
const OctetStr& p2,
const OctetStr& p3);
//--AgentGen BEGIN=plcChannelModulationStringEntry
- void init( bool refresh = false );
- void removeAllRows();
+ void init( const Oidx& index );
+ void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
- unsigned long m_currentRequest;
+ unsigned long m_currentRequest;
//--AgentGen END
};
@@ -4228,6 +4233,7 @@ public:
//--AgentGen BEGIN=plcChannelModulationEntry
void init( bool refresh = false );
void removeAllRows();
+ void remove_obsolete_rows(OrderedList<Oidx>& confirmed_rows);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4268,8 +4274,9 @@ public:
long p4,
long p5);
//--AgentGen BEGIN=plcPortChannelEntry
- void init( bool refresh = false );
- void removeAllRows();
+ void init( const Oidx& index );
+ void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4310,8 +4317,9 @@ public:
const OctetStr& p2,
const OctetStr& p3);
//--AgentGen BEGIN=plcChannelPilotStringEntry
- void init( bool refresh = false );
- void removeAllRows();
+ void init( const Oidx& index );
+ void removeAllRows();
+ void update_structure(OrderedList< Oidx > &confirmed_indexes);
private:
unsigned long m_currentRequest;
//--AgentGen END
@@ -4720,7 +4728,38 @@ class spc200: public MibGroup
static void unlockNode();
static void unlockHosts();
- static void refreshPlcHosts(bool init);
+ /**
+ * Refresh only the requested host
+ * @param init true to init
+ * @param hostIdx the index of the requested host
+ * @param polling is optional, set to true if data must be refreshed only for PlcBasePortTable with lightHost structure
+ * => means no refresh of all host but only light host
+ */
+ static void refreshPlcHost(bool init, int hostIdx);
+
+
+ /**
+ * Refresh the tables structure and the plcBasePort table attributes
+ * @param init true to init
+ * @param hostIdx the index of the requested host
+ * @param polling is optional, set to true if data must be refreshed only for PlcBasePortTable with lightHost structure
+ * => means no refresh of all host but only light host
+ */
+ static void refreshPlcLightHosts( bool init );
+
+
+ static void refreshPlcHosts(bool init);
+
+ /**
+ * Update the plc hosts tables structures.
+ * Compare these tables row, and the
+ * list of connected hosts returned by
+ * the underlayer.
+ * Don't fill the actual data.
+ *
+ */
+ static void updatePlcHostsTableStructure();
+
static void refreshNodeCarrier(bool init);
static void refreshPlcSystem(bool init);
static void refreshPlcSNAnalyser(bool init); //PR12
@@ -4729,7 +4768,22 @@ class spc200: public MibGroup
static ThreadManager _syncNode;
static ThreadManager _syncHosts;
- enum labels {e_true=1,e_false=2}; //PR10
+ enum labels {e_true=1,e_false=2}; //PR10
+
+ /**
+ * Get the corrected request oid from the current request.
+ * Manage only GET and GET_NEXT request (see code for details).
+ *
+ * The caller must perform a delete on the return object
+ * (if not null).
+ *
+ * @param req the current request
+ * @return the corrected oidx, or 0 if the request is not a
+ * GET nor GET_NEXT.
+ *
+ */
+ static Oidx* get_corrected_req_oidx(Request* req, MibTable* pCurrentTable);
+
//--AgentGen END
};
diff --git a/app/sm-agent/inc/systemmanager.h b/app/sm-agent/inc/systemmanager.h
index ced2eb708f..d191e67445 100755
--- a/app/sm-agent/inc/systemmanager.h
+++ b/app/sm-agent/inc/systemmanager.h
@@ -3,8 +3,8 @@
* PROGRAM MODULE
*
* $Workfile: systemmanager.h $
- * $Author: maleval $
- * $Date: 2007/08/02 16:29:46 $
+ * $Author: paris $
+ * $Date: 2007/11/09 18:06:00 $
*
* Copyright (C) 2003 by SPiDCOM Technologies All rights reserved.
*
@@ -16,6 +16,14 @@
#include "agent_pp/mib.h"
+
+/*#ifndef SIMULATION_TEST
+#include "mib_lib.h"
+#else
+
+#endif*/
+
+
#include "mib-interface.h"
#include "autoinccounter.h"
@@ -58,7 +66,7 @@ public:
const struct plc_analyser& PlcSNAnalyser();
const struct agc_analyser& PlcAGCAnalyser();
const struct plc_host& PlcHost(unsigned int hostId);
- void refreshPlcHosts();
+ void refreshPlcHosts(bool lightrefresh = false);
void refreshPlcHost( unsigned int hostId );
void refreshSoftwareReleases();
unsigned int NbPlcHosts();
@@ -249,7 +257,7 @@ public:
void commit();
void boardReset();
void setFlatAdapt();
- unsigned short getNbSofts() { return m_nbSofts; }
+ unsigned short getNbSofts() { return m_nbSofts; };
int getSoftwareReleases(char softReleases[10][32] );
int getLastUploadStatus();
@@ -258,12 +266,51 @@ public:
void getSNMPCommunity( char * pSnmp_GET_community_name, char * pSnmp_SET_community_name );
//---- FD01: SNMP community
+ /**
+ * Return the index of the given macAddress
+ * @param the mac address
+ * @return the index, or -1 if not found
+ */
+ int getPLcHostIndex(const unsigned char[6]);
+
+
+ /**
+ * Return the macAddress of the given index using light host structure
+ * @param i input : the index for which get the mac address
+ * @param macAdd output : the macAdd found
+ *
+ * @return the index (in that case, macAdd is filled with the associated
+ * mac address) , or -1 if not found
+ */
+ int updatePlcLightHostByIndex(int i);
+
+ /**
+ * Get the counter linked to the ith host
+ * @param i
+ */
+ unsigned long getInc(unsigned int i);
+
+ /**
+ * Set the counter linked to the ith host
+ * @param i
+ * @param iTime the nex counter value
+ */
+ void setInc(int i, const unsigned long& iTime);
+
+ /**
+ * Get the hostId indexed host in the list
+ * @param hostId si the index in the host list
+ * @return a reference on the structure
+ */
+ const struct plc_host& getStoredPlcHost(unsigned int hostId);
+
/////////////////////////////////////////////////////////////////////
// Other methods
static unsigned long getInc();
static void intIP_to_strIP(unsigned long intIP, char* ipAddress); //PR08
static unsigned long strIP_to_intIP(char* ipAddress); //PR08
+
/** \brief give the IP address associated to a given mac address
* If something goes wrong, strIp contains a null string ('\0')
* \param strIp (OUT) the string containig the IP
@@ -278,6 +325,28 @@ public:
static void freeMemory();
static enum plc_modulation modulationFromInt( unsigned int );
+ /////////////////////////////////////////////
+
+ /**
+ * convert a Oidx containing a mac address (ex 1.1.1.1.1.1)
+ * to a unsigned char array.
+ *
+ * @param outputMacAdd output : the mac address converted
+ * this array is allocated by the caller
+ * @param indexOidx input : the mac address stored in a Oidx
+ */
+ static void convertOidxToMacAdd(unsigned char outputMacAdd[], const Oidx & indexOidx);
+
+ /**
+ * convert a mac address stored in a unsigned char array to a Oidx item.
+ *
+ * @param macAdd input : the mac address to convert
+ *
+ * @return Oidx a new Oidx instance containing the same mac Address than macAdd.
+ * The caller must delete this instance.
+ */
+ static Oidx* convertMacAddToOidx(const unsigned char macAdd[]);
+
/////////////////////////////////////////////////////////////////////
// Singleton static accessor
static SystemManager* instance();
@@ -318,6 +387,7 @@ private:
//
unsigned long m_topoChanges;
bool m_isHostActive[PLCP_MAX_HOST];
+ unsigned long m_lastTimeUpdate[PLCP_MAX_HOST];
//Software releases
int m_nbSofts;
@@ -357,4 +427,5 @@ SystemManager::isHostActive(unsigned int hostId)
return m_isHostActive[hostId];
}
+
#endif //__SYSTEM_MANAGER_H__
diff --git a/app/sm-agent/inc/underlayer.h b/app/sm-agent/inc/underlayer.h
index 789e469236..4b5a970399 100755
--- a/app/sm-agent/inc/underlayer.h
+++ b/app/sm-agent/inc/underlayer.h
@@ -57,6 +57,10 @@ public:
virtual int mib_getPlcHost(int hostNb, struct plc_host * plcHost);
virtual int mib_setPlcHost(int hostNb, struct plc_host * plcHost);
+ virtual int mib_getPlcLightHost(int mib_getPlcHost, struct plc_host * plcHost);
+ virtual int mib_getIndexByMac(const unsigned char iMacAddress[6]);
+
+
/* No context for the system_carrier_tab, as the system is unique */
virtual int mib_getSystemCarrier(struct system_carrier_tab * systemCarrierTab);
@@ -153,7 +157,7 @@ public:
//virtual void mib_mac_add_to_str_ip(char* strIp,const unsigned char macAdd[],const char* dev);
// SNMP Community
- virtual bool mib_getSNMPCommunity(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name); //---- FD01: SNMP community
+ virtual bool mib_get_SNMP_community(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name); //---- FD01: SNMP community
private:
// temporary fake values for test purpose
diff --git a/app/sm-agent/src/agent.cpp b/app/sm-agent/src/agent.cpp
index a3423e8ae0..993c8ecef9 100755
--- a/app/sm-agent/src/agent.cpp
+++ b/app/sm-agent/src/agent.cpp
@@ -3,8 +3,8 @@
* PROGRAM MODULE
*
* $Workfile: agent.cpp $
- * $Author: maleval $
- * $Date: 2007/08/02 16:29:47 $
+ * $Author: paris $
+ * $Date: 2007/11/22 14:37:47 $
*
* Copyright (C) 2004 by SPiDCOM Technologies All rights reserved.
*
@@ -35,6 +35,13 @@ enum mib_softUpgRc LAST_UPLOAD_STATUS = RC_UPG_OK;
#include "simulator.h"
#endif // SIMULATION_TEST
+#ifndef _NO_LOGGING
+#ifndef REMOTE_LOG
+#include <sys/stat.h> //for mkdir function
+#include <sys/types.h> //for mkdir function
+#endif
+#endif
+
#ifdef REMOTE_LOG
#include "agent_remote_log.h"
#else
@@ -98,6 +105,9 @@ static void sig(int signo)
{
printf ("Detected SIGINT signal ...\n" );
}
+#ifdef __LINUX__
+ close_socket();
+#endif
exit(0);
}
default:
@@ -134,16 +144,27 @@ int main (int argc, char* argv[])
for (int i=1;i<argc;i++) {
if ( strcmp(argv[i],"-h")== 0) {
cout << "usage : "<< endl;
- cout << " -d: set dynamic behavior to on"<< endl;
+ cout << " -d: set dynamic host behavior to on"<< endl;
+ cout << " -df: get host number from simulator.config file (cannot be used with -d)" << endl;
+ cout << " -dfd: get host number from simulator config file (cannot be used with -d)" << endl;
+ cout << " and choose the host to add or remove randomly" << endl;
cout << " -nNBHOSTS: set nb of plc hosts to NBHOSTS"<< endl;
cout << " -pPORTNB: set port used by SNMP to PORTNB"<< endl;
cout << " -cgGETCOMMUNITY: set SNMP GET community "<< endl;
cout << " -csSETCOMMUNITY: set SNMP SET community "<< endl;
+ cout << "WARNING : you must append the parameter to the option (example : -p5521)." << endl;
exit(0);
}
else if (strcmp(argv[i],"-d")== 0) {
SimulatorArgs::getInstance()->setAreHostsDynamic(true);
}
+ else if (strcmp(argv[i],"-df") == 0) {
+ SimulatorArgs::getInstance()->setHostNbFromConfigFile(true);
+ }
+ else if (strcmp(argv[i],"-dfd") == 0) {
+ SimulatorArgs::getInstance()->setHostNbFromConfigFile(true);
+ SimulatorArgs::getInstance()->setHostNbFromConfigFileRandom(true);
+ }
else if (strncmp(argv[i],"-n",2)==0) {
SimulatorArgs::getInstance()->setNbHosts(atoi((argv[i]+2)));
}
@@ -156,6 +177,13 @@ int main (int argc, char* argv[])
else if (strncmp(argv[i],"-cg",3) == 0) {
SimulatorArgs::getInstance()->setSNMPGETCommunity(argv[i]+3);
}//---- FD01: END SNMP community
+
+ // reject the incompatibilty between options
+ if ( SimulatorArgs::getInstance()->getHostNbFromConfigFile() &&
+ SimulatorArgs::getInstance()->getAreHostsDynamic() ) {
+ cout << "-d and -df option cannot be used together, aborting.s" << endl;
+ exit(0);
+ }
}
#endif
@@ -165,8 +193,12 @@ int main (int argc, char* argv[])
#endif //OSE_TARGET
Snmp::socket_startup(); // Initialize socket subsystem
-
+
+ //printf("SNMP SocketInitialized 1\n");
+
Snmpx snmp(status, port );
+
+ //printf("sbno status & port managed\n");
if (status != SNMP_CLASS_SUCCESS)
{
@@ -180,21 +212,35 @@ int main (int argc, char* argv[])
#endif //OSE_TARGET
}
+ printf("Before mib and request list memory allocation\n");
mib = new Mib();
reqList = new RequestList();
+ printf("Mib and requestlist dynamically allocated\n");
#ifndef _NO_LOGGING
// set the DefaultLog used for log feature
#ifndef REMOTE_LOG
- AgentLog* agentLog = new AgentLogImpl("/tmp/default.log");
+ char* user = getenv("USER");
+ char location[100] = "/tmp";
+ if ( NULL != user ) {
+ strcat(location,"/");
+ strcat(location,user);
+ mkdir(location,0777);
+ }
+ strcat(location,"/sm-agent.log");
+ AgentLog* agentLog = new AgentLogImpl(location);
#else
- AgentLog* agentLog = new AgentRemoteLog("192.168.6.6",5501);
+ //printf("remote logger: before creation\n");
+ AgentLog* agentLog = new AgentRemoteLog("192.168.6.9",5501);
+ //printf("remote logger: after creation\n");
#endif // REMOTE_LOG
DefaultLog::init(agentLog);
+ //printf("DefaultLog initialized\n");
#endif // _NO_LOGGING
// register requestList for outgoing requests
mib->set_request_list(reqList);
+ //printf("The list of requests is linked to the mib\n");
#ifdef OSE_TARGET
#else
@@ -225,10 +271,14 @@ int main (int argc, char* argv[])
char snmp_GET_community_name[ASN_MAX_NAME_LEN];
char snmp_SET_community_name[ASN_MAX_NAME_LEN];
+ //printf("getSNMPCommunity is called\n");
+
SystemManager::instance()->getSNMPCommunity( snmp_GET_community_name, snmp_SET_community_name );
reqList->set_read_community( OctetStr(snmp_GET_community_name));
reqList->set_write_community( OctetStr(snmp_SET_community_name));
+
+ //printf("SNMPCommunity are called");
//---- FD01: END SNMP community
@@ -270,6 +320,9 @@ int main (int argc, char* argv[])
#ifdef SIMULATION_TEST
cout << "Spidcom SPC200 SNMP Agent Simulator " << _CURRENT_VERSION <<" started ..." << endl;
#endif
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("agent has been started");
+ LOG_END;
#endif
SnmpTarget::set_default_timeout(1000);
diff --git a/app/sm-agent/src/ip_mib.cpp b/app/sm-agent/src/ip_mib.cpp
index e34f0f83ed..7b240263fc 100644
--- a/app/sm-agent/src/ip_mib.cpp
+++ b/app/sm-agent/src/ip_mib.cpp
@@ -21,6 +21,7 @@
//#include <module_includes.h>
//--AgentGen BEGIN=_INCLUDE
+#include <assert.h>
#include "mib-common.h"
#include "systemmanager.h"
diff --git a/app/sm-agent/src/mau_mib.cpp b/app/sm-agent/src/mau_mib.cpp
index c412381681..a4cb27d7f5 100644
--- a/app/sm-agent/src/mau_mib.cpp
+++ b/app/sm-agent/src/mau_mib.cpp
@@ -23,6 +23,7 @@
//--AgentGen BEGIN=_INCLUDE
#include "mib-common.h"
#include "systemmanager.h"
+#include <assert.h>
#include <iostream>
using namespace std;
diff --git a/app/sm-agent/src/simulator.cpp b/app/sm-agent/src/simulator.cpp
index 654b2d2c04..7aa5f4bebf 100755
--- a/app/sm-agent/src/simulator.cpp
+++ b/app/sm-agent/src/simulator.cpp
@@ -9,6 +9,7 @@
#define LOG_VALUE(x) LOG(""#x" =");LOG(x)
#define LOG_SIMULATOR_END LOG_END;
+#define MAC_ADD_DELTA 1
// SimulatorArgs
@@ -23,6 +24,8 @@ SimulatorArgs* SimulatorArgs::getInstance() {
SimulatorArgs::SimulatorArgs() {
m_areHostsDynamic = false;
+ m_isHostNbFromConfigFile = false;
+ m_isHostNbFromConfigFileRandom = false;
m_nbHosts = _DEFAULT_SNMP_NUMBER_HOSTS;
LOG_SIMULATOR_BEGIN(DEBUG_LOG);
LOG(m_areHostsDynamic);
@@ -44,6 +47,37 @@ SimulatorArgs::SimulatorArgs() {
//---- FD01: SNMP END community
};
+
+void SimulatorArgs::setHostNbFromConfigFile(bool enabled) {
+ m_isHostNbFromConfigFile = enabled;
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG(m_isHostNbFromConfigFile);
+ LOG_SIMULATOR_END;
+}
+
+bool SimulatorArgs::getHostNbFromConfigFile() {
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("getHostNbFromConfigFile");
+ LOG(m_isHostNbFromConfigFile);
+ LOG_SIMULATOR_END;
+ return m_isHostNbFromConfigFile;
+}
+
+void SimulatorArgs::setHostNbFromConfigFileRandom(bool enabled) {
+ m_isHostNbFromConfigFileRandom = enabled;
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG(m_isHostNbFromConfigFileRandom);
+ srand(time(NULL));
+ LOG_SIMULATOR_END;
+}
+
+bool SimulatorArgs::getHostNbFromConfigFileRandom() {
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("getHostNbFromConfigFileRandom");
+ LOG(m_isHostNbFromConfigFileRandom);
+ LOG_SIMULATOR_END;
+ return m_isHostNbFromConfigFileRandom;
+}
void SimulatorArgs::setAreHostsDynamic(bool isDynamic) {
m_areHostsDynamic = isDynamic;
@@ -77,6 +111,8 @@ unsigned int SimulatorArgs::getNbHosts() {
return m_nbHosts;
}
+
+
//---- FD01: BEGIN SNMP community
void SimulatorArgs::setSNMPSETCommunity(char * pSnmpSETCommunity) {
strcpy(snmpSETCommunity, pSnmpSETCommunity);
@@ -113,16 +149,18 @@ Simulator::Simulator( /*SystemManager *systemManager*/ ) {
m_isInit = true;
m_nbHosts = SimulatorArgs::getInstance()->getNbHosts();
-
+
+ m_areHostsDynamic = SimulatorArgs::getInstance()->getAreHostsDynamic();
+ m_isHostNbFromConfigFile = SimulatorArgs::getInstance()->getHostNbFromConfigFile();
+
int idx=0;
for(idx=0;idx<m_nbHosts;idx++) {
m_isHostActive[idx] = true;
}
while (idx<PLCP_MAX_HOST) {
m_isHostActive[idx] = false;
- idx++;
- }
- m_areHostsDynamic = SimulatorArgs::getInstance()->getAreHostsDynamic();
+ idx++;
+ }
memset(&m_systemCarrier,'0',sizeof(struct system_carrier_tab));
@@ -163,8 +201,19 @@ Simulator::Simulator( /*SystemManager *systemManager*/ ) {
time(&ltime);
// add empty plc host datas
- m_plcHosts = (struct plc_host*)malloc(sizeof(struct plc_host)*m_nbHosts);
+ m_plcHosts = (struct plc_host*)malloc(sizeof(struct plc_host)*PLCP_MAX_HOST);
memset(m_plcHosts,0,sizeof(struct plc_host)*m_nbHosts);
+
+ // add mac add for all the possible hosts
+ for(int i=0;i<PLCP_MAX_HOST-1;i++) {
+ for(int j=0;j<6;j++) {
+ m_plcHosts[i].macAddress[j] = buildMac(i);
+ }
+ }
+
+ if ( m_isHostNbFromConfigFile ) {
+ applyNbHostFromConfigFile(true);
+ }
}
Simulator::~Simulator(){
@@ -657,7 +706,7 @@ int Simulator::mib_getHostNb() {
unsigned short nbHostActive = 0;
// simulate power up and down on several plc connexions
LOG_SIMULATOR_BEGIN(DEBUG_LOG);
- LOG("mib_getHostNb, host actives");
+ LOG("mib_getHostNb, dynamic hosts, host actives");
for (unsigned short idx=0;idx<m_nbHosts;idx++) {
if ( /*( idx != 0 ) &&*/
@@ -675,6 +724,9 @@ int Simulator::mib_getHostNb() {
LOG_SIMULATOR_END;
return nbHostActive;
}
+ else if ( m_isHostNbFromConfigFile ) {
+ applyNbHostFromConfigFile();
+ }
return m_nbHosts;
};
@@ -727,7 +779,8 @@ int Simulator::mib_getPlcHost(int hostNb, struct plc_host * plcHost) {
// m_plchost[i].ber [indx] = ( 2000 + 1000 * cos(val+inc*3+0.8 ) ); //PR15
}
- if ( m_isInit && k%2 == 0 )
+ //if ( m_isInit && k%2 == 0 )
+ if ( k%2 == 0 )
{
(plcHost)->rx_channel.modulation[j*8 + k/2] = (unsigned char)
( SystemManager::modulationFromInt( rand()%6 ) + 16 * SystemManager::modulationFromInt( rand()%6 ) );
@@ -743,7 +796,7 @@ int Simulator::mib_getPlcHost(int hostNb, struct plc_host * plcHost) {
(plcHost)->avg_band_att[j] = j;//( 380 + 200 * cos(val+inc ) );
(plcHost)->avg_band_snr[j] = j;//( 280 + 150 * cos(val+inc+0.8) );
- if ( m_isInit )
+ //if ( m_isInit )
{
(plcHost)->rx_channel.pilots[j*2 ] = (unsigned char)( 1 + rand()%49 );
(plcHost)->rx_channel.pilots[j*2+1] = (unsigned char)( 50 + rand()%78 );
@@ -756,14 +809,14 @@ int Simulator::mib_getPlcHost(int hostNb, struct plc_host * plcHost) {
}
{
- (plcHost)->macAddress[0] = (uint8_t)(i+1);
- (plcHost)->macAddress[1] = (uint8_t)(i+1);
- (plcHost)->macAddress[2] = (uint8_t)(i+1);
- (plcHost)->macAddress[3] = (uint8_t)(i+1);
- (plcHost)->macAddress[4] = (uint8_t)(i+1);
- (plcHost)->macAddress[5] = (uint8_t)(i+1);
+ (plcHost)->macAddress[0] = (uint8_t)(buildMac(i));
+ (plcHost)->macAddress[1] = (uint8_t)(buildMac(i));
+ (plcHost)->macAddress[2] = (uint8_t)(buildMac(i));
+ (plcHost)->macAddress[3] = (uint8_t)(buildMac(i));
+ (plcHost)->macAddress[4] = (uint8_t)(buildMac(i));
+ (plcHost)->macAddress[5] = (uint8_t)(buildMac(i));
- if ( i == 2 ) { // SNMP_AGENT_WORK, add to test bug related to mac address with same ending digit
+ /*if ( i == 2 ) { // SNMP_AGENT_WORK, add to test bug related to mac address with same ending digit
// (in decimal format)
(plcHost)->macAddress[0] = (uint8_t)(2);
(plcHost)->macAddress[1] = (uint8_t)(2);
@@ -772,11 +825,11 @@ int Simulator::mib_getPlcHost(int hostNb, struct plc_host * plcHost) {
(plcHost)->macAddress[4] = (uint8_t)(2);
//(plcHost+i)->macAddress[5] = (uint8_t)(35);
(plcHost)->macAddress[5] = (uint8_t)(24);
- }
+ }*/
}
- if ( m_isInit )
+ //if ( m_isInit )
{
(plcHost)->gain = (uint16_t)999;
(plcHost)->automatic = true;
@@ -846,6 +899,42 @@ int Simulator::mib_setPlcHost(int hostNb, struct plc_host * plcHost) {
};
+
+int Simulator::mib_getPlcLightHost(int hostId, struct plc_host * plcHost)
+{
+ applyNbHostFromConfigFile();
+
+ if (( hostId < 0 ) && ( hostId > m_nbHosts )) {
+ return -1;
+ }
+ if ( m_isHostActive[hostId] ) {
+ mib_getPlcHost(hostId,plcHost);
+ return RET_SUCCESS;
+ }
+ else {
+ return RET_SUCCESS+1;
+ }
+}
+
+int Simulator::mib_getIndexByMac(const unsigned char iMacAddress[6]) {
+
+ for(int i=0;i<PLCP_MAX_HOST;i++) {
+ if ( m_isHostActive[i] ) {
+ struct plc_host *currentHost = m_plcHosts+i;
+ if ( ( currentHost->macAddress[0] == (int)iMacAddress[0] ) &&
+ ( currentHost->macAddress[1] == (int)iMacAddress[1] ) &&
+ ( currentHost->macAddress[2] == (int)iMacAddress[2] ) &&
+ ( currentHost->macAddress[3] == (int)iMacAddress[3] ) &&
+ ( currentHost->macAddress[4] == (int)iMacAddress[4] ) &&
+ ( currentHost->macAddress[5] == (int)iMacAddress[5] ) ) {
+ return i;
+ }
+ }
+ }
+ return -1;
+}
+
+
int Simulator::mib_getSystemCarrier(struct system_carrier_tab * systemCarrierTab) {
struct system_carrier_tab & systemcarrier = *systemCarrierTab;
@@ -883,7 +972,7 @@ int Simulator::mib_getSystemCarrier(struct system_carrier_tab * systemCarrierTab
systemcarrier.carrierAdapt[idAdapt] = rand()%8192;
}
- }
+ }
}
indx = j*PMD_GROUPS_PER_BAND + rand()%( PMD_GROUPS_PER_BAND / 2 );
@@ -1486,7 +1575,7 @@ bool Simulator::mib_get_is_ip_dynamic() {
}
//---- FD01: BEGIN SNMP community
-bool Simulator::mib_getSNMPCommunity(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name) {
+bool Simulator::mib_get_SNMP_community(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name) {
SimulatorArgs::getInstance()->getSNMPCommunity(pSnmp_GET_community_name, pSnmp_SET_community_name);
@@ -1507,7 +1596,110 @@ bool Simulator::mib_getSNMPCommunity(char * pSnmp_GET_community_name, char * pSn
LOG("mib_mac_add_to_str_ip");
sprintf(strIp,"11.22.33.%d",macAdd[5]);
LOG(strIp);
- LOG_SIMULATOR_END;
+ LOG_SIMULATOR_END;
}*/
+
+void Simulator::applyNbHostFromConfigFile() {
+ applyNbHostFromConfigFile(!m_isInit);
+}
+
+void Simulator::applyNbHostFromConfigFile(bool doIt) {
+ //TODO remove this (just for test)
+ int count=0;
+ for(int i=0;i<PLCP_MAX_HOST;i++) {
+ if ( m_isHostActive[i] == true ) {
+ count ++;
+ }
+ }
+
+ if ( doIt ) {
+ FILE* configFile = fopen("simulator.config","r");
+ if ( configFile != NULL ) {
+ int param =-1;
+ char buffer[200];
+ while( fgets(buffer,199,configFile) != NULL ) {
+ char *input = buffer;
+ char *token;
+ while ( ( token = strtok(input,"=\n")) != NULL ) {
+ if ( strcmp(token,"nbHosts") == 0 ) {
+ token = strtok(NULL,"=\n");
+ sscanf(token,"%d",&param);
+ break;
+ }
+ input = NULL;
+ }
+ }
+ fclose(configFile);
+ if ( param != -1 ) {
+ if ( SimulatorArgs::getInstance()->getHostNbFromConfigFileRandom() == false ) {
+ // linear process
+ m_nbHosts = param;
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("applyNbHostFromConfigFile static");
+ LOG("nbHost=");
+ LOG(m_nbHosts);
+ LOG_SIMULATOR_END;
+ int idx=0;
+ for(idx=0;idx<m_nbHosts;idx++) {
+ m_isHostActive[idx] = true;
+ }
+ while (idx<PLCP_MAX_HOST) {
+ m_isHostActive[idx] = false;
+ idx++;
+ }
+ }
+ else if ( m_nbHosts != param ) {
+ // random process
+ int activePreviousCount = m_nbHosts;
+ m_nbHosts = param;
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("applyNbHostFromConfigFile dynamic");
+ LOG("nbHost=");
+ LOG(m_nbHosts);
+ LOG("activePreviousCount");
+ LOG(activePreviousCount);
+ LOG_SIMULATOR_END;
+ bool statusSearched = ( (m_nbHosts > activePreviousCount) ? false : true );
+ int delta = ( (m_nbHosts > activePreviousCount) ?
+ m_nbHosts - activePreviousCount : activePreviousCount - m_nbHosts );
+ int i = 0;
+ while(i<delta) {
+ int randIdx = rand() % PLCP_MAX_HOST;
+ if ( m_isHostActive[randIdx] == statusSearched ) {
+ m_isHostActive[randIdx] = ( statusSearched ? false : true );
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("host");
+ LOG(" idx=");
+ LOG(randIdx);
+ LOG(" macAdd=");
+ LOG(m_plcHosts[randIdx].macAddress[0]);
+ LOG(m_plcHosts[randIdx].macAddress[1]);
+ LOG(m_plcHosts[randIdx].macAddress[2]);
+ LOG(m_plcHosts[randIdx].macAddress[3]);
+ LOG(m_plcHosts[randIdx].macAddress[4]);
+ LOG(m_plcHosts[randIdx].macAddress[5]);
+ LOG("is ");
+ LOG((m_isHostActive[randIdx] == true ) ? "activated" : "deactivated"); LOG_SIMULATOR_END;
+ i ++;
+ }
+ }
+ }
+ }
+ }
+ else {
+ LOG_SIMULATOR_BEGIN(DEBUG_LOG);
+ LOG("applyNbHostFromConfigFile");
+ LOG("no config file found, keep m_nbHosts unchanged");
+ LOG_SIMULATOR_END;
+ }
+ }
+}
+
+
+int Simulator::buildMac(int i) {
+ return MAC_ADD_DELTA + i;
+}
+
+
#endif
diff --git a/app/sm-agent/src/spc200.cpp b/app/sm-agent/src/spc200.cpp
index 07d19cb693..dcb384e458 100644
--- a/app/sm-agent/src/spc200.cpp
+++ b/app/sm-agent/src/spc200.cpp
@@ -15,6 +15,8 @@
#include "mib-interface.h"
#include <if_mib.h>
#include <radius_auth_client_mib.h>
+#include <assert.h>
+
using namespace std;
@@ -436,7 +438,8 @@ unsigned long plcTopoChanges::inc()
void plcTopoChanges::init( bool refresh ){
if ( refresh )
{
- spc200::refreshPlcHosts(true);
+ //TODO remove this test hardcode
+ //spc200::refreshPlcHosts(true);
}
set_state( SystemManager::instance()->getTopoChanges() );
}
@@ -2712,8 +2715,10 @@ int plcModulationInputProceed::set(const Vbx& vb)
plcInputModulationGroup16::instance->get_state() );
if ( result )
- {
- plcChannelModulationStringEntry::instance->init();
+ {
+ spc200::updatePlcHostsTableStructure();
+ Oidx inpAddrIndex( inpAddr.get_printable() );
+ plcChannelModulationStringEntry::instance->init(inpAddrIndex);
}
plcModulationInputResult::instance->set_state( result?
@@ -3479,7 +3484,9 @@ int plcPilotsInputProceed::set(const Vbx& vb)
if ( result )
{
- plcChannelPilotStringEntry::instance->init();
+ spc200::updatePlcHostsTableStructure();
+ Oidx inpAddrIndex( inpAddr.get_printable() );
+ plcChannelPilotStringEntry::instance->init(inpAddrIndex);
}
plcPilotsInputResult::instance->set_state( result?
@@ -7704,6 +7711,7 @@ plcAGCAnalyserSamplesPart1::plcAGCAnalyserSamplesPart1():
// the static pointer plcAGCAnalyserSamplesPart1::instance.
instance = this;
//--AgentGen BEGIN=plcAGCAnalyserSamplesPart1::plcAGCAnalyserSamplesPart1
+ m_currentRequest = 0;
//--AgentGen END
}
@@ -7824,6 +7832,7 @@ plcMasterBssId::plcMasterBssId():
// the static pointer plcMasterBssId::instance.
instance = this;
//--AgentGen BEGIN=plcMasterBssId::plcMasterBssId
+ m_currentRequest = 0;
//--AgentGen END
}
@@ -7948,6 +7957,7 @@ plcSlaveBssId::plcSlaveBssId():
// the static pointer plcSlaveBssId::instance.
instance = this;
//--AgentGen BEGIN=plcSlaveBssId::plcSlaveBssId
+ m_currentRequest = 0;
//--AgentGen END
}
@@ -8072,6 +8082,7 @@ plcSpyIsDynamic::plcSpyIsDynamic():
// the static pointer plcSpyIsDynamic::instance.
instance = this;
//--AgentGen BEGIN=plcSpyIsDynamic::plcSpyIsDynamic
+ m_currentRequest = 0;
//--AgentGen END
}
@@ -8195,6 +8206,7 @@ plcStaticSpySynchBandNb::plcStaticSpySynchBandNb():
// the static pointer plcStaticSpySynchBandNb::instance.
instance = this;
//--AgentGen BEGIN=plcStaticSpySynchBandNb::plcStaticSpySynchBandNb
+ m_currentRequest = 0;
//--AgentGen END
}
@@ -10935,8 +10947,10 @@ void portStatsEntry::update(Request* req)
{
static Oidx myTableOid = oidPortStatsSignal;
if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ req->get_oid(0) != myTableOid ) {
+ //TODO remove this
+ //return;
+ }
}
last += val;
@@ -10977,10 +10991,26 @@ portStatsEntry::removeAllRows()
}
}
+void
+portStatsEntry::remove_obsolete_rows(OrderedList<Oidx>& confirmed_rows)
+{
+ remove_obsolete_rows(confirmed_rows);
+}
+
void
portStatsEntry::init( bool refresh )
{
- spc200::refreshPlcHosts( !refresh );
+ //TODO remove this test hardcode
+ //spc200::refreshPlcHosts( !refresh );
+
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStatsEntry IMPOSSIBLE");
+ LOG_END;
+
+ unsigned char dummyMacAdd[6];
+ int idx = SystemManager::instance()->getPLcHostIndex(dummyMacAdd);
+ spc200::refreshPlcHost( !refresh, idx );
}
//--AgentGen END
@@ -11097,27 +11127,39 @@ void portStats2Entry::update(Request* req)
{
// This table needs to be updated.
//--AgentGen BEGIN=portStats2Entry::update
- static unsigned long last = SystemManager::getInc();
+ //static unsigned long last = SystemManager::getInc();
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
- unsigned long val = SystemManager::getInc()-last;
-
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
- {
- static Oidx myTableOid = oidPortStats2Signal;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
- }
+ HostsSynchonizer _sync;
+
+ //unsigned long val = SystemManager::getInc()-last;
+
+ // check if table structure update is required
+ /*static Oidx myTableOid = oidPortStats2Entry;
+
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ ( ( req->get_oid(0) == myTableOid ) ) ) {
+ last += val;
+ m_currentRequest = req->get_request_id();
+ spc200::updatePlcHostsTableStructure();
+ }*/
+
+ Oidx* pReqOidx = spc200::get_corrected_req_oidx(req,this);
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
+ if ( 0 != pReqOidx ) {
+ Oidx remainingOidx = index(*pReqOidx);
+
+ if ( remainingOidx.as_string() != "" ) {
+ // request init for a given oid
+ Oidx indexOidx = remainingOidx.cut_right(1);
+ // keep only the first 6 digits
+ init(indexOidx);
+ }
+ delete pReqOidx;
+ }
+
//--AgentGen END
}
@@ -11154,11 +11196,70 @@ portStats2Entry::removeAllRows(){
}
}
-void
-portStats2Entry::init( bool refresh )
+void
+portStats2Entry::init( const Oidx& index )
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats2Entry begin");
+ LOG_END;
+
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+
+
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats2Entry end");
+ LOG_END;
+}
+
+void
+portStats2Entry::update_structure(OrderedList< Oidx > &confirmed_indexes)
{
- spc200::refreshPlcHosts( !refresh );
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+ Oidx* oid = index_cur.get();
+
+ for (int j=1; j<PMD_MAX_BANDS; j++) {
+ char bandId[5];
+ sprintf(bandId,"%d",j);
+
+ Oidx* oid1 = new Oidx(*oid); *oid1 += bandId;
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats2Entry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+
+ MibTableRow* newRow = add_row(*oid1);
+ OctetStr dummy1("");
+ OctetStr dummy2("");
+ // add a dummy row to be sure the row is added
+ set_row(newRow,dummy1,dummy2,0,0);
+ }
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats2Entry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
//--AgentGen END
@@ -11271,27 +11372,33 @@ void portStats3Entry::update(Request* req)
{
// This table needs to be updated.
//--AgentGen BEGIN=portStats3Entry::update
- static unsigned long last = SystemManager::getInc();
+ //static unsigned long last = SystemManager::getInc();
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
- unsigned long val = SystemManager::getInc()-last;
-
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
- {
- static Oidx myTableOid = oidPortStats3AvgAtt;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
- }
-
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
+ HostsSynchonizer _sync;
+
+ //unsigned long val = SystemManager::getInc()-last;
+
+ // check if table structure update is required
+ /*static Oidx myTableOid = oidPortStats3Entry;
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ ( ( req->get_oid(0) == myTableOid ) ) ) {
+ last += val;
+ m_currentRequest = req->get_request_id();
+ spc200::updatePlcHostsTableStructure();
+ }*/
+
+ Oidx* pReqOidx = spc200::get_corrected_req_oidx(req,this);
+ if ( 0 != pReqOidx ) {
+ Oidx indexOidx = index(*pReqOidx);
+ if ( indexOidx.as_string() != "" ) {
+ // request init for a given oid
+ init(indexOidx);
+ }
+ delete pReqOidx;
+ }
//--AgentGen END
}
@@ -11326,11 +11433,58 @@ portStats3Entry::removeAllRows(){
}
}
-void
-portStats3Entry::init( bool refresh )
-{
- spc200::refreshPlcHosts( !refresh );
+void
+portStats3Entry::init( const Oidx& index )
+{
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats3Entry::init - begin");
+ LOG_END;
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats3Entry::init - end");
+ LOG_END;
+}
+
+void
+portStats3Entry::update_structure(OrderedList< Oidx > &confirmed_indexes)
+{
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+ Oidx* oid = index_cur.get();
+ Oidx* oid1 = new Oidx(*oid);
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats3Entry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+
+ MibTableRow* newRow = add_row(*oid1);
+ // add a dummy row to be sure the row is added
+ set_row(newRow,0,0);
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("portStats3Entry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
//--AgentGen END
@@ -11448,22 +11602,35 @@ void plcBasePortEntry::update(Request* req)
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
+ HostsSynchonizer _sync;
+
unsigned long val = SystemManager::getInc()-last;
+
+ // check if table structure update is required
+ static Oidx myTableOid = oidPlcBasePortEntry;
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ (/* ( req->get_oid(0) == myTableOid )*/true ) ) {
+
+ last += val;
+ m_currentRequest = req->get_request_id();
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry::update of tables structures is called");
+ LOG_END;
+ spc200::updatePlcHostsTableStructure();
+ }
+ else
{
- static Oidx myTableOid = oidPlcBasePortAddress;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry::update of host structure is NOT called");
+ LOG_END;
}
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
+/*
+ Oidx indexOidx = index(req->get_oid(0));
+ if ( indexOidx.as_string() != "" ) {
+ init(indexOidx);
+ }*/
//--AgentGen END
}
@@ -11502,10 +11669,62 @@ plcBasePortEntry::removeAllRows()
}
void
-plcBasePortEntry::init( bool refresh )
-{
- spc200::refreshPlcHosts( !refresh );
+plcBasePortEntry::init( const Oidx& index )
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry begin");
+ LOG_END;
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry end");
+ LOG_END;
+}
+
+void
+plcBasePortEntry::update_structure(OrderedList<Oidx>& confirmed_indexes)
+{
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+
+ Oidx* oid = index_cur.get();
+ Oidx* oid1 = new Oidx(*oid);
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+ MibTableRow* newRow = add_row(*oid1);
+ OctetStr dummy("");
+ // add a dummy row to be sure the row is added
+ set_row(newRow,dummy,0,0);
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcBasePortEntry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
+
+
+
//--AgentGen END
@@ -11621,30 +11840,57 @@ void plcChannelModulationStringEntry::update(Request* req)
{
// This table needs to be updated.
//--AgentGen BEGIN=plcChannelModulationStringEntry::update
- static unsigned long last = SystemManager::getInc();
+ //static unsigned long last = SystemManager::getInc();
+ static const Oidx myTableOid = oidPlcChannelModulationStringEntry;
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
- unsigned long val = SystemManager::getInc()-last;
-
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
+ HostsSynchonizer _sync;
+
+ //unsigned long val = SystemManager::getInc()-last;
+
+ // check if table structure update is required
+ /*static Oidx myTableOid = oidPlcChannelModulationStringEntry;
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ ( ( req->get_oid(0) == myTableOid ) ) ) {
+ last += val;
+ m_currentRequest = req->get_request_id();
+ spc200::updatePlcHostsTableStructure();
+ }*/
+
+ // security check for get next :
+ if ( ( req->get_oid(0) != myTableOid ) &&
+ ( ! myTableOid.is_root_of(req->get_oid(0)) ) )
{
- static Oidx myTableOid = oidPlcRxChannelModulation;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("Don't update plcChannelModulationStringEntry table\n");
+ LOG_END;
}
-
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
- //--AgentGen END
+ else {
+ Oidx* pReqOidx = spc200::get_corrected_req_oidx(req,this);
+ if ( 0 != pReqOidx ) {
+ Oidx indexOidx = index(*pReqOidx);
+ //TODO remove this trace
+ const char * tmp = indexOidx.get_printable();
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationStringEntry::update, indexOidx =");
+ LOG(indexOidx.get_printable());
+ LOG_END;
+
+ if ( indexOidx.as_string() != "" ) {
+ // request init for a given oid
+ init(indexOidx);
+ }
+
+ delete pReqOidx;
+ }
+ }
+ //--AgentGen END
}
+
+
int plcChannelModulationStringEntry::is_transition_ok(MibTable* table, MibTableRow* row, const Oidx& index,
int currentStatus, int requestedStatus)
{
@@ -11679,11 +11925,60 @@ plcChannelModulationStringEntry::removeAllRows()
}
}
-void
-plcChannelModulationStringEntry::init( bool refresh )
+void
+plcChannelModulationStringEntry::init( const Oidx& index )
+{
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationEntry begin");
+ LOG_END;
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationEntry end");
+ LOG_END;
+}
+
+void
+plcChannelModulationStringEntry::update_structure(OrderedList< Oidx > &confirmed_indexes)
{
- spc200::refreshPlcHosts( !refresh );
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+ Oidx* oid = index_cur.get();
+ Oidx* oid1 = new Oidx(*oid);
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationStringEntry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+ MibTableRow* newRow = add_row(*oid1);
+ OctetStr dummy1("");
+ OctetStr dummy2("");
+ OctetStr dummy3("");
+ // add a dummy row to be sure the row is added
+ set_row(newRow,dummy1,dummy2,dummy3);
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationStringEntry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
//--AgentGen END
@@ -11827,8 +12122,10 @@ void plcChannelModulationEntry::update(Request* req)
{
static Oidx myTableOid = oidPlcModGroup1;
if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ req->get_oid(0) != myTableOid ) {
+ //TODO remove this
+ //return;
+ }
}
last += val;
@@ -11892,8 +12189,29 @@ plcChannelModulationEntry::removeAllRows()
void
plcChannelModulationEntry::init( bool refresh )
{
- spc200::refreshPlcHosts( !refresh );
+ //TODO remove this test hardcode
+ //spc200::refreshPlcHosts( !refresh );
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationEntry begin");
+ LOG_END;
+
+ unsigned char dummyMacAdd[6];
+ int idx = SystemManager::instance()->getPLcHostIndex(dummyMacAdd);
+ spc200::refreshPlcHost( !refresh, idx );
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelModulationEntry end");
+ LOG_END;
+}
+
+void
+plcChannelModulationEntry::remove_obsolete_rows(OrderedList<Oidx>& confirmed_rows)
+{
+ MibTable::remove_obsolete_rows(confirmed_rows);
}
+
+
//--AgentGen END
@@ -12009,27 +12327,35 @@ void plcPortChannelEntry::update(Request* req)
{
// This table needs to be updated.
//--AgentGen BEGIN=plcPortChannelEntry::update
- static unsigned long last = SystemManager::getInc();
+ //static unsigned long last = SystemManager::getInc();
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
- unsigned long val = SystemManager::getInc()-last;
-
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
- {
- static Oidx myTableOid = oidPlcPortChannelType;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ HostsSynchonizer _sync;
+
+ //unsigned long val = SystemManager::getInc()-last;
+
+ // check if table structure update is required
+ /*static Oidx myTableOid = oidPlcPortChannelEntry;
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ ( ( req->get_oid(0) == myTableOid ) ) ) {
+ last += val;
+ m_currentRequest = req->get_request_id();
+ spc200::updatePlcHostsTableStructure();
+ }*/
+
+ Oidx* pReqOidx = spc200::get_corrected_req_oidx(req,this);
+ if ( 0 != pReqOidx ) {
+ Oidx remainingOidx = index(*pReqOidx);
+ if ( remainingOidx.as_string() != "" ) {
+ // request init for a given oid
+ Oidx indexOidx = remainingOidx.cut_right(1);
+ // keep only the 6 first digits
+ init(indexOidx);
+ }
+ delete pReqOidx;
}
-
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
//--AgentGen END
}
@@ -12069,11 +12395,66 @@ plcPortChannelEntry::removeAllRows()
}
}
-void
-plcPortChannelEntry::init( bool refresh )
+void
+plcPortChannelEntry::init( const Oidx& index )
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcPortChannelEntry begin");
+ LOG_END;
+
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcPortChannelEntry begin");
+ LOG_END;
+}
+
+void
+plcPortChannelEntry::update_structure(OrderedList< Oidx > &confirmed_indexes)
{
- spc200::refreshPlcHosts( !refresh );
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+ Oidx* oid = index_cur.get();
+
+ for (int j=1; j<4; j++) { //TODO maybe, change this (j values :1,2,3)
+ char channelId[5];
+ sprintf(channelId,"%d",j);
+
+ Oidx* oid1 = new Oidx(*oid); *oid1 += channelId;
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcPortChannelEntry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+ MibTableRow* newRow = add_row(*oid1);
+ // add a dummy row to be sure the row is added
+ set_row(newRow,0,0,0,0,0);
+ }
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcPortChannelEntry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
+
//--AgentGen END
@@ -12188,27 +12569,34 @@ void plcChannelPilotStringEntry::update(Request* req)
{
// This table needs to be updated.
//--AgentGen BEGIN=plcChannelPilotStringEntry::update
- static unsigned long last = SystemManager::getInc();
+ //static unsigned long last = SystemManager::getInc();
if( m_currentRequest == req->get_request_id() )
return;
- HostsSynchonizer _sync;
-
- unsigned long val = SystemManager::getInc()-last;
-
- if ( val < _DEFAULT_DATA_REFRESH_PERIOD )
- {
- static Oidx myTableOid = oidPlcRxChannelPilots;
- if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
- }
+ HostsSynchonizer _sync;
+
+ //unsigned long val = SystemManager::getInc()-last;
- last += val;
- m_currentRequest = req->get_request_id();
-
- init(true);
+ // check if table structure update is required
+ /*static Oidx myTableOid = oidPlcChannelPilotStringEntry;
+
+ if ( ( val >= _DEFAULT_DATA_REFRESH_PERIOD ) &&
+ ( ( req->get_oid(0) == myTableOid ) ) ) {
+ last += val;
+ m_currentRequest = req->get_request_id();
+ spc200::updatePlcHostsTableStructure();
+ }*/
+
+ Oidx* pReqOidx = spc200::get_corrected_req_oidx(req,this);
+ if ( 0 != pReqOidx ) {
+ Oidx indexOidx = index(*pReqOidx);
+ if ( indexOidx.as_string() != "" ) {
+ // request init for a given oid
+ init(indexOidx);
+ }
+ delete pReqOidx;
+ }
//--AgentGen END
}
@@ -12246,11 +12634,62 @@ plcChannelPilotStringEntry::removeAllRows()
}
}
+void
+plcChannelPilotStringEntry::init( const Oidx& index )
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelPilotStringEntry begin");
+ LOG_END;
+
+ unsigned char macAdd[6];
+ SystemManager::instance()->convertOidxToMacAdd(macAdd, index);
+ int hostIdx = SystemManager::instance()->getPLcHostIndex(macAdd);
+ if ( hostIdx != -1 ) {
+ spc200::refreshPlcHost(true,hostIdx);
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelPilotStringEntry end");
+ LOG_END;
+}
+
void
-plcChannelPilotStringEntry::init( bool refresh )
-{
- spc200::refreshPlcHosts( !refresh );
+plcChannelPilotStringEntry::update_structure(OrderedList< Oidx > &confirmed_indexes) {
+ //build the confirmed_rows
+ OrderedList<Oidx> confirmed_rows;
+
+ OrderedListCursor<Oidx> index_cur;
+
+ for (index_cur.init(&confirmed_indexes); index_cur.get(); index_cur.next()) {
+ Oidx* oid = index_cur.get();
+ Oidx* oid1 = new Oidx(*oid);
+ confirmed_rows.add(oid1);
+
+ if ( find_index(*oid1) == 0 ) {
+ // the data for this index are missing, add them
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelPilotStringEntry::update_structure : add index");
+ LOG(oid1->get_printable());
+ LOG_END;
+ MibTableRow* newRow = add_row(*oid1);
+ // add a dummy row to be sure the row is added
+ OctetStr dummy1("");
+ OctetStr dummy2("");
+ OctetStr dummy3("");
+ set_row(newRow,dummy1,dummy2,dummy3);
+ }
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelPilotStringEntry::update_structure : remove_obsolete_rows\n");
+ LOG_END;
+
+ remove_obsolete_rows(confirmed_rows);
}
+
+
+
//--AgentGen END
@@ -12379,8 +12818,10 @@ void plcChannelPilotsEntry::update(Request* req)
{
static Oidx myTableOid = oidPlcChannelPilot1;
if ( req->get_type() == sNMP_PDU_GET ||
- req->get_oid(0) != myTableOid )
- return;
+ req->get_oid(0) != myTableOid ) {
+ //TODO remove this
+ //return;
+ }
}
last += val;
@@ -12425,7 +12866,17 @@ plcChannelPilotsEntry::removeAllRows()
void
plcChannelPilotsEntry::init( bool refresh )
{
- spc200::refreshPlcHosts( !refresh );
+ //TODO remove this test hardcode
+ //spc200::refreshPlcHosts( !refresh );
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("plcChannelPilotsEntry IMPOSSIBLE");
+ LOG_END;
+
+
+ unsigned char dummyMacAdd[6];
+ int idx = SystemManager::instance()->getPLcHostIndex(dummyMacAdd);
+ spc200::refreshPlcHost( !refresh, idx );
}
//--AgentGen END
@@ -14036,6 +14487,8 @@ spc200::spc200():
add(new plcInputNodePilot2());
add(new plcNodePilotsInputProceed());
add(new plcNodePilotsInputResult());
+
+ //TEST64 slaves
add(new plcNodeAdaptsInputBand());
add(new plcNodeAdaptsInputGroup());
add(new plcNodeAdaptsInputCarrier1());
@@ -14048,6 +14501,8 @@ spc200::spc200():
add(new plcNodeAdaptsInputCarrier8());
add(new plcNodeAdaptsInputProceed());
add(new plcNodeAdaptsInputResult());
+
+
add(new plcNodeActionsCommitProceed());
add(new plcNodeActionsCommitResult());
add(new plcNodeActionsResetProceed());
@@ -14097,7 +14552,13 @@ spc200::spc200():
#ifdef INCLUDE_NOD_PILOTS_TABLE
add(new plcNodePilotsEntry());
#endif
+
+
+
add(new plcNodeAdaptsStringEntry());
+
+
+
#ifdef INCLUDE_NOD_ADAPTS_TABLE
add(new plcNodeAdaptsEntry());
#endif
@@ -14223,6 +14684,7 @@ spc200::refreshNodeCarrier( bool init )
plcNodeAdaptsEntry::instance->removeAllRows();
#endif
+
plcNodeAdaptsStringEntry::instance->removeAllRows();
//////////////////////////////////////////////////////////
@@ -14232,42 +14694,44 @@ spc200::refreshNodeCarrier( bool init )
unsigned char pilots[ (PMD_MAX_BANDS-1) * 2];
- SystemManager::instance()->refreshPlcHosts();
- unsigned int nbHosts = SystemManager::instance()->NbPlcHosts();
+ //SystemManager::instance()->refreshPlcHosts();
+ // test64salves plcNodeAdaptsStringEntry::instance->add_row( plcNodeAdaptsStringEntryIdx );
+ // test64salves unsigned int nbHosts = SystemManager::instance()->NbPlcHosts();
- for ( unsigned int hostIdx=0 ; hostIdx<nbHosts ; ++hostIdx )
- {
+
+ // test64salves for ( unsigned int hostIdx=0 ; hostIdx<nbHosts ; ++hostIdx )
+ // test64salves {
// for each host
- Oidx plcBasePortIdx;
+ // test64salves Oidx plcBasePortIdx;
unsigned int indx_pilot = 0;
- SystemManager::instance()->refreshPlcHost(hostIdx);
- const struct plc_host& plchost = SystemManager::instance()->PlcHost(hostIdx);
+ // test64salves SystemManager::instance()->refreshPlcHost(hostIdx);
+ // test64salves const struct plc_host& plchost = SystemManager::instance()->PlcHost(hostIdx);
LOG_BEGIN(DEBUG_LOG);
LOG("spc200::refreshNodeCarrier\n");
- SM_AGENT_LOG(plchost);
+// SM_AGENT_LOG(plchost);
LOG_END
- if ( SystemManager::instance()->isHostActive(hostIdx) )
- {
+ // test64salves if ( SystemManager::instance()->isHostActive(hostIdx) )
+ // test64salves {
// for each host
- char macAddrId[_DEFAULT_OID_BUFFER_SIZE];
+ // test64salves char macAddrId[_DEFAULT_OID_BUFFER_SIZE];
//sprintf( macAddrId, "%d.%d.%d.%d.%d.%d",
- sprintf( macAddrId, "%lu.%lu.%lu.%lu.%lu.%lu",
- (unsigned long)plchost.macAddress[0],
- (unsigned long)plchost.macAddress[1],
- (unsigned long)plchost.macAddress[2],
- (unsigned long)plchost.macAddress[3],
- (unsigned long)plchost.macAddress[4],
- (unsigned long)plchost.macAddress[5]);
+ // test64salves sprintf( macAddrId, "%lu.%lu.%lu.%lu.%lu.%lu",
+ // test64salves (unsigned long)plchost.macAddress[0],
+ // test64salves (unsigned long)plchost.macAddress[1],
+ // test64salves (unsigned long)plchost.macAddress[2],
+ // test64salves (unsigned long)plchost.macAddress[3],
+ // test64salves (unsigned long)plchost.macAddress[4],
+ // test64salves (unsigned long)plchost.macAddress[5]);
// put mac address of current host as first part of plcNodeAdaptsStringEntry index
- plcBasePortIdx = Oidx(macAddrId);
- }
- else {
- continue;
- }
+ // test64salves plcBasePortIdx = Oidx(macAddrId);
+ // test64salves }
+ // test64salves else {
+ // test64salves continue;
+ // test64salves }
// index : { plcNodeNotchesBand; plcNodeNotchesGroup}
for ( unsigned int i=1 ; i<PMD_MAX_BANDS ; ++i )
@@ -14276,8 +14740,11 @@ spc200::refreshNodeCarrier( bool init )
sprintf( buf, "%d", i);
Oidx plcNodeBandId(buf);
// append band id to plcNodeAdaptsStringEntry index
- Oidx plcNodeAdaptsStringEntryIdx = plcBasePortIdx + plcNodeBandId ;
- // Oidx plcNodeAdaptsStringEntryIdx = plcNodeBandId ; // just for test
+
+
+ //64slaves Oidx plcNodeAdaptsStringEntryIdx = plcBasePortIdx + plcNodeBandId ;
+
+ //64slaves Oidx plcNodeAdaptsStringEntryIdx = plcNodeBandId ; // just for test
#ifdef INCLUDE_NOD_PILOTS_TABLE
@@ -14285,8 +14752,11 @@ spc200::refreshNodeCarrier( bool init )
plcNodePilotsEntry::instance->add_row( plcNodeBandId );
#endif
MibTableRow* plcNodeAdaptStr =
- //plcNodeAdaptsStringEntry::instance->add_row( plcNodeBandId );
- plcNodeAdaptsStringEntry::instance->add_row( plcNodeAdaptsStringEntryIdx );
+
+// test64salves plcNodeAdaptsStringEntry::instance->add_row( plcNodeAdaptsStringEntryIdx );
+// test64salves
+ plcNodeAdaptsStringEntry::instance->add_row( plcNodeBandId );
+
unsigned char bandAdaptStr[ PMD_GROUPS_PER_BAND*PMD_CARRIERS_PER_GROUP*2 ];
bandAdaptStr[0] = '\0';
@@ -14374,9 +14844,12 @@ spc200::refreshNodeCarrier( bool init )
} // end for k
} // end for j
- plcNodeAdaptsStringEntry::instance->set_row
- ( plcNodeAdaptStr,
- OctetStr( bandAdaptStr, PMD_GROUPS_PER_BAND*PMD_CARRIERS_PER_GROUP*2 ) );
+
+ plcNodeAdaptsStringEntry::instance->set_row (
+ plcNodeAdaptStr,
+ OctetStr( bandAdaptStr, PMD_GROUPS_PER_BAND*PMD_CARRIERS_PER_GROUP*2 )
+ );
+
#ifdef INCLUDE_NOD_PILOTS_TABLE
plcNodePilotsEntry::instance->set_row( plcNodePilots, pilot1, pilot2 );
@@ -14390,13 +14863,415 @@ spc200::refreshNodeCarrier( bool init )
plcNodeNotches::instance->set_state
( OctetStr( &systemcarrier.groupNotch[16], (PMD_MAX_BANDS-1) * PMD_GROUPS_PER_BAND) );
- } // end for hostIdx
+
+ // test64salves } // end for hostIdx
}
}
}
+
+
+
+/**
+ *
+ * Remove all tables rows
+ */
+void spc200::refreshPlcHost( bool init, int hostIdx)
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 refreshPlcHost begin with index: "); LOG(hostIdx);
+ LOG_END;
+
+ char buf[_DEFAULT_OID_BUFFER_SIZE];
+ static OctetStr hostMacAdd[PLCP_MAX_HOST];
+ static unsigned int lastHostNb = 0;
+
+ bool isTopoChange = false;
+ char macAddrId[_DEFAULT_OID_BUFFER_SIZE];
+ unsigned int activeHostsIdx = 0;
+
+
+ unsigned long period = SystemManager::instance()->getInc() - SystemManager::instance()->getInc(hostIdx);
+ if (period >= _DEFAULT_DATA_REFRESH_PERIOD )
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("refresh of the host table is to be done");
+ LOG_END;
+ // Impacted tables
+
+ //Go and find the good host data
+ // Don't get refresh the host data, it is internally handled by the system manager
+ // depending on a delta refresh time on a host basis .
+ const struct plc_host& plchost = SystemManager::instance()->PlcHost(hostIdx);
+
+
+ //Topo changed
+ unsigned int nbHosts = SystemManager::instance()->NbPlcHosts();
+ isTopoChange = (lastHostNb == nbHosts);
+
+ // Find the good row to update
+ if ( SystemManager::instance()->isHostActive(hostIdx) )
+ {
+ //unsigned int indxHost = i+1-nbInactiveHosts;
+
+ const unsigned char physAddr[] =
+ { (unsigned char)plchost.macAddress[0],
+ (unsigned char)plchost.macAddress[1],
+ (unsigned char)plchost.macAddress[2],
+ (unsigned char)plchost.macAddress[3],
+ (unsigned char)plchost.macAddress[4],
+ (unsigned char)plchost.macAddress[5] };
+
+ //Topo changed if the address of the host indexed hostIdx has changed
+ if ( hostMacAdd[hostIdx] != OctetStr( physAddr, 6 ) )
+ {
+ isTopoChange = true;
+ hostMacAdd[activeHostsIdx] = OctetStr( physAddr, 6 );
+ }
+
+ sprintf( macAddrId, "%lu.%lu.%lu.%lu.%lu.%lu",
+ (unsigned long)plchost.macAddress[0],
+ (unsigned long)plchost.macAddress[1],
+ (unsigned long)plchost.macAddress[2],
+ (unsigned long)plchost.macAddress[3],
+ (unsigned long)plchost.macAddress[4],
+ (unsigned long)plchost.macAddress[5]);
+
+
+
+ /* char test[50]={0};
+ sprintf(test, "%02X-%02X-%02X-%02X-%02X-%02X",
+ plchost.macAddress[0],
+ plchost.macAddress[1],
+ plchost.macAddress[2],
+ plchost.macAddress[3],
+ plchost.macAddress[4],
+ plchost.macAddress[5]);*/
+
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200::refreshPlcHost: Tables for host with Mac Address"); LOG(macAddrId);
+ LOG_END;
+
+
+
+ // Build the OIDs of all the entries for this host
+ Oidx plcBasePortId(macAddrId);
+ sprintf( buf, "%s.%d", macAddrId, 1 );
+ Oidx plcPortChannelRxId(buf);
+ sprintf( buf, "%s.%d", macAddrId, 2 );
+ Oidx plcPortChannelRxLastId(buf);
+ sprintf( buf, "%s.%d", macAddrId, 3 );
+ Oidx plcPortChannelTxId(buf);
+ unsigned int aStaticBand = SystemManager::instance()->getPlcStaticSpySynchBandNb();
+
+
+ //PLC BASE PORT TABLE
+ MibTableRow* plcBasePort = plcBasePortEntry::instance->find_index( plcBasePortId );
+ if (NULL == plcBasePort ){
+ plcBasePort = plcBasePortEntry::instance->add_row( plcBasePortId );
+ }
+ assert( NULL != plcBasePort );
+ // set the row with the good values
+ plcBasePortEntry::instance->set_row( plcBasePort,
+ OctetStr( physAddr, 6 ),
+ plchost.automatic ? e_true : e_false ,
+ plchost.avg_att); //TODO check if this is the real attenuation
+
+
+ //RX PLC PORT CHANNEL TABLE
+ MibTableRow* plcPortChannelRx = plcPortChannelEntry::instance->find_index( plcPortChannelRxId );
+ if (NULL == plcPortChannelRx ){
+ plcPortChannelRx = plcPortChannelEntry::instance->add_row( plcPortChannelRxId );
+ }
+ // plcPortChannel table must contain a row indexed with plcPortChannelRxId
+ assert( NULL != plcPortChannelRx);
+ // set the row with the good values
+ plcPortChannelEntry::instance->set_row( plcPortChannelRx,
+ plchost.rx_channel.type, //TBC
+ 0, //TBC ??? RX GAIN ???
+ plchost.rx_channel.bandwidth,
+ plchost.rx_channel.max_bandwidth,
+ aStaticBand );
+
+ //LAST RX PLC PORT CHANNEL
+ MibTableRow* plcPortChannelRxLast = plcPortChannelEntry::instance->find_index( plcPortChannelRxLastId );
+ if (NULL == plcPortChannelRxLast ){
+ plcPortChannelRxLast = plcPortChannelEntry::instance->add_row( plcPortChannelRxLastId );
+ }
+ // The dedicated rows must be in the table
+ assert( NULL != plcPortChannelRxLast);
+ // set the row with the good values
+ plcPortChannelEntry::instance->set_row( plcPortChannelRxLast,
+ plchost.rx_last_channel.type, //TBC
+ 0, //TBC ??? RX LAST GAIN???
+ plchost.rx_last_channel.bandwidth,
+ plchost.rx_last_channel.max_bandwidth,
+ aStaticBand);
+
+ MibTableRow* plcPortChannelTx = plcPortChannelEntry::instance->find_index( plcPortChannelTxId );
+ if (NULL == plcPortChannelTx ){
+ plcPortChannelTx = plcPortChannelEntry::instance->add_row( plcPortChannelTxId );
+ }
+ // The dedicated rows must be in the table
+ assert( NULL != plcPortChannelTx );
+ // set the row with the good values
+ plcPortChannelEntry::instance->set_row( plcPortChannelTx,
+ plchost.tx_channel.type, //TBC
+ plchost.gain, //The GAIN is only relevant for TX channel
+ plchost.tx_channel.bandwidth ,
+ plchost.tx_channel.max_bandwidth,
+ aStaticBand);
+
+
+
+
+
+ MibTableRow* plcChanModStringRow = plcChannelModulationStringEntry::instance->find_index( plcBasePortId );
+ if (NULL == plcChanModStringRow ){
+ plcChanModStringRow = plcChannelModulationStringEntry::instance->add_row( plcBasePortId );
+ }
+ // MUST contain the row now
+ assert( NULL != plcChanModStringRow );
+ // set the values
+ plcChannelModulationStringEntry::instance->set_row(
+ plcChanModStringRow,
+ OctetStr( &plchost.rx_channel.modulation[PMD_GROUPS_PER_BAND/2], PMD_GROUPS_PER_BAND/2 * (PMD_MAX_BANDS - 1) ),
+ OctetStr( &plchost.rx_last_channel.modulation[PMD_GROUPS_PER_BAND/2],PMD_GROUPS_PER_BAND/2 * (PMD_MAX_BANDS - 1) ),
+ OctetStr( &plchost.tx_channel.modulation[PMD_GROUPS_PER_BAND/2], PMD_GROUPS_PER_BAND/2 * (PMD_MAX_BANDS - 1)
+ ) );
+
+
+ MibTableRow* plcChanPilotsStringRow = plcChannelPilotStringEntry::instance->find_index( plcBasePortId );
+ if (NULL == plcChanPilotsStringRow ){
+ plcChanPilotsStringRow = plcChannelPilotStringEntry::instance->add_row( plcBasePortId );
+ }
+ // MUST contain the row now
+ assert( NULL != plcChanPilotsStringRow );
+ // set the values
+ plcChannelModulationStringEntry::instance->set_row(
+ plcChanPilotsStringRow,
+ OctetStr( &plchost.rx_channel.pilots[2], 2*(PMD_MAX_BANDS-1) ),
+ OctetStr( &plchost.rx_last_channel.pilots[2], 2*(PMD_MAX_BANDS-1) ),
+ OctetStr( &plchost.tx_channel.pilots[2], 2*(PMD_MAX_BANDS-1) ) );
+
+
+ // PORT STATS 3 Table
+ MibTableRow* portStats3 = portStats3Entry::instance->find_index( plcBasePortId );
+ if (NULL == portStats3 ){
+ portStats3 = portStats3Entry::instance->add_row( plcBasePortId );
+ }
+ // MUST contain the row now
+ assert( NULL != portStats3 );
+ // set the values
+ portStats3Entry::instance->set_row( portStats3, (unsigned long)plchost.avg_att, (unsigned long)plchost.avg_snr);
+
+
+ for ( unsigned int j=1 ; j< PMD_MAX_BANDS ; ++j )
+ {
+ sprintf( buf, "%s.%d", macAddrId, j );
+ Oidx portStats2Id(buf);
+
+ sprintf( buf, "%s.%d.%d", macAddrId, 1, j );
+ Oidx plcChannelRxId(buf);
+ sprintf( buf, "%s.%d.%d", macAddrId, 2, j );
+ Oidx plcChannelRxLastId(buf);
+ sprintf( buf, "%s.%d.%d", macAddrId, 3, j );
+ Oidx plcChannelTxId(buf);
+
+ unsigned char signalVal[2*PMD_CARRIERS_PER_BAND];
+ unsigned char noiseVal [2*PMD_CARRIERS_PER_BAND];
+ //
+ for ( unsigned int k=0; k<PMD_GROUPS_PER_BAND; ++k )
+ {
+ for ( unsigned int l=0 ; l<PMD_CARRIERS_PER_GROUP; ++l ) //plcStatsGroup
+ {
+ #ifdef INCLUDE_PORT_STATS_TABLE
+ sprintf( buf, "%s.%d.%d.%d\0", macAddrId, j, k+1, l+1 );
+ Oidx portStatsId(buf);
+ #endif
+ unsigned int indx = j*PMD_GROUPS_PER_BAND*PMD_CARRIERS_PER_GROUP+k*PMD_CARRIERS_PER_GROUP + l;
+
+ #ifdef INCLUDE_PORT_STATS_TABLE
+ MibTableRow* portStats = portStatsEntry::instance->find_index( portStatsId );
+ if (NULL == portStats ){
+ portStats = portStatsEntry::instance->add_row( portStatsId );
+ }
+ // MUST contain the row now
+ assert( NULL != portStats );
+ // set the values
+ portStatsEntry::instance->set_row( portStats,
+ (unsigned long)( plchost.signal[indx]),
+ (unsigned long)( plchost.noise [indx]));
+ // (unsigned long)( plchost.ber [indx])); //PR15
+ #endif
+
+
+ unsigned int indx_high = 2 * (k*PMD_CARRIERS_PER_GROUP + l);
+ unsigned int indx_low = indx_high + 1;
+
+ signalVal[indx_high] = (unsigned char) ( plchost.signal[indx] / 256 );
+ noiseVal [indx_high] = (unsigned char) ( plchost.noise [indx] / 256 );
+// berVal [indx_high] = (unsigned char) ( plchost.ber [indx] / 256 ); //PR15
+
+ signalVal[indx_low] = (unsigned char) ( plchost.signal[indx] % 256 );
+ noiseVal [indx_low] = (unsigned char) ( plchost.noise [indx] % 256 );
+// berVal [indx_low] = (unsigned char) ( plchost.ber [indx] % 256 ); //PR15
+ }// for l< PMD_CARRIERS_PER_GROUP
+ }// for k< PMD_GROUPS_PER_BAND
+
+
+
+ MibTableRow* portStats2 = portStats2Entry::instance->find_index( portStats2Id );
+ if (NULL == portStats2 ){
+ portStats2 = portStats2Entry::instance->add_row( portStats2Id );
+ }
+ // MUST contain the row now
+ assert( NULL != portStats2 );
+ //Set the values
+ portStats2Entry::instance->set_row
+ ( portStats2,
+ OctetStr( signalVal,2 * PMD_CARRIERS_PER_BAND),
+ OctetStr( noiseVal, 2 * PMD_CARRIERS_PER_BAND),
+ (unsigned long)plchost.avg_band_att[j],
+ (unsigned long)plchost.avg_band_snr[j]);
+ #ifdef INCLUDE_CHAN_MOD_TABLE
+ MibTableRow* plcChannelModulationRx =
+ plcChannelModulationEntry::instance->add_row( plcChannelRxId );
+ plcChannelModulationEntry::instance->set_row(
+ plcChannelModulationRx,
+ (long)(plchost.rx_channel.modulation[j*8 ]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8 ]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+1]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+1]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+2]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+2]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+3]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+3]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+4]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+4]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+5]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+5]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+6]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+6]%16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+7]/16) + 1,
+ (long)(plchost.rx_channel.modulation[j*8+7]%16) + 1 );
+ #endif
+
+ #ifdef INCLUDE_CHAN_PILOTS_TABLE
+ MibTableRow* plcChannelPilotsRx =
+ plcChannelPilotsEntry::instance->add_row( plcChannelRxId );
+ plcChannelPilotsEntry::instance->set_row(
+ plcChannelPilotsRx,
+ plchost.rx_channel.pilots[j*2],
+ plchost.rx_channel.pilots[j*2+1]);
+ #endif
+
+ #ifdef INCLUDE_CHAN_MOD_TABLE
+ MibTableRow* plcChannelModulationRxLast =
+ plcChannelModulationEntry::instance->add_row( plcChannelRxLastId );
+ plcChannelModulationEntry::instance->set_row(
+ plcChannelModulationRxLast,
+ (long)(plchost.rx_last_channel.modulation[j*8 ]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8 ]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+1]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+1]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+2]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+2]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+3]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+3]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+4]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+4]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+5]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+5]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+6]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+6]%16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+7]/16) + 1,
+ (long)(plchost.rx_last_channel.modulation[j*8+7]%16) + 1 );
+ #endif
+
+ #ifdef INCLUDE_CHAN_PILOTS_TABLE
+ MibTableRow* plcChannelPilotsRxLast =
+ plcChannelPilotsEntry::instance->add_row( plcChannelRxLastId );
+ plcChannelPilotsEntry::instance->set_row(
+ plcChannelPilotsRxLast,
+ plchost.rx_last_channel.pilots[j*2],
+ plchost.rx_last_channel.pilots[j*2+1] );
+ #endif
+
+ #ifdef INCLUDE_CHAN_MOD_TABLE
+ MibTableRow* plcChannelModulationTx =
+ plcChannelModulationEntry::instance->add_row( plcChannelTxId );
+ plcChannelModulationEntry::instance->set_row(
+ plcChannelModulationTx,
+ (long)(plchost.tx_channel.modulation[j*8 ]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8 ]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+1]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+1]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+2]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+2]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+3]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+3]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+4]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+4]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+5]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+5]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+6]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+6]%16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+7]/16) + 1,
+ (long)(plchost.tx_channel.modulation[j*8+7]%16) + 1 );
+ #endif
+
+ #ifdef INCLUDE_CHAN_PILOTS_TABLE
+ MibTableRow* plcChannelPilotsTx =
+ plcChannelPilotsEntry::instance->add_row( plcChannelTxId );
+ plcChannelPilotsEntry::instance->set_row(
+ plcChannelPilotsTx,
+ plchost.tx_channel.pilots[j*2],
+ plchost.tx_channel.pilots[j*2+1]);
+ #endif
+ // } // for l< PMD_CARRIERS_PER_GROUP
+
+ // } // for k< PMD_GROUPS_PER_BAND
+
+ } //for j< PMD_MAX_BANDS
+
+ //lastHostNb = activeHostsIdx;
+
+
+ }// if host active
+
+ else // host not active
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("Host not active with HostId: ");
+ LOG(hostIdx);
+ LOG_END;
+ }
+
+ if ( isTopoChange )
+ {
+ SystemManager::instance()->incTopoChanges();
+ }
+
+ } // if table is to be updated
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 refreshPlcHost end");
+ LOG_END;
+
+
+}
+
void spc200::refreshPlcHosts( bool init )
{
+
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 refreshPlcHosts begin");
+ LOG_END;
+
static OctetStr hostAddresses[PLCP_MAX_HOST];
static unsigned long last = SystemManager::getInc();
static unsigned int lastHostNumber = 0;
@@ -14407,6 +15282,8 @@ void spc200::refreshPlcHosts( bool init )
char buf[_DEFAULT_OID_BUFFER_SIZE];
char macAddrId[_DEFAULT_OID_BUFFER_SIZE];
+ unsigned int aStaticBand = SystemManager::instance()->getPlcStaticSpySynchBandNb();
+
//HostsSynchonizer _sync;
{
//////////////////////////////////////////////////////////
@@ -14529,7 +15406,7 @@ void spc200::refreshPlcHosts( bool init )
0, //TBC ??? RX GAIN ???
plchost.rx_channel.bandwidth,
plchost.rx_channel.max_bandwidth,
- SystemManager::instance()->getPlcStaticSpySynchBandNb()); //FIXME this call is correct only for static band
+ aStaticBand); //FIXME this call is correct only for static band
MibTableRow* plcPortChannelRxLast =
plcPortChannelEntry::instance->add_row( plcPortChannelRxLastId );
@@ -14539,7 +15416,7 @@ void spc200::refreshPlcHosts( bool init )
0, //TBC ??? RX LAST GAIN???
plchost.rx_last_channel.bandwidth,
plchost.rx_last_channel.max_bandwidth,
- SystemManager::instance()->getPlcStaticSpySynchBandNb()); //FIXME this call is correct only for static band
+ aStaticBand); //FIXME this call is correct only for static band
MibTableRow* plcPortChannelTx =
plcPortChannelEntry::instance->add_row( plcPortChannelTxId );
@@ -14549,12 +15426,12 @@ void spc200::refreshPlcHosts( bool init )
plchost.gain, //The GAIN is only relevant for TX channel
plchost.tx_channel.bandwidth,
plchost.tx_channel.max_bandwidth,
- SystemManager::instance()->getPlcStaticSpySynchBandNb()); //FIXME this call is correct only for static band
+ aStaticBand); //FIXME this call is correct only for static band
- char ipAdd[17];
+ /* char ipAdd[17];
// SystemManager::macAdd_to_strIP(ipAdd,physAddr,"plc0");
if (strlen(ipAdd)==0) // no result
- strcpy(ipAdd,"0.0.0.0"); // put a default value
+ strcpy(ipAdd,"0.0.0.0"); // put a default value*/
MibTableRow* plcBasePort =
plcBasePortEntry::instance->add_row( plcBasePortId );
@@ -14768,9 +15645,108 @@ void spc200::refreshPlcHosts( bool init )
SystemManager::instance()->incTopoChanges();
}
}
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 refreshPlcHosts end");
+ LOG_END;
}
+
+/*//PLC BASE PORT TABLE: update the specific light host entry in plcBasePortTable
+ Oidx plcBasePortId(macAdd);
+ sprintf( buf, "%s.%d", macAdd, 1 );
+
+ MibTableRow* plcBasePort = plcBasePortEntry::instance->find_index( plcBasePortId );
+ if (NULL == plcBasePort ){
+ plcBasePort = plcBasePortEntry::instance->add_row( plcBasePortId );
+ }
+ assert( NULL != plcBasePort );
+ // set the row with the good values
+ plcBasePortEntry::instance->set_row(plcBasePort,
+ OctetStr( macAdd, 6 ),
+ m_plchost[i].automatic ? e_true : e_false ,
+ m_plchost[i].avg_att); //TODO check if this is the real attenuation*/
+
+
+
+void spc200::updatePlcHostsTableStructure() {
+
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 updatePlcHostsTableStructure begin");
+ LOG_END;
+
+ // get the list of currently active host
+ OrderedList<Oidx> macAddOidxList;
+ int nbHost = SystemManager::instance()->NbPlcHosts();
+ int nbHostFound = 0;
+ //unsigned char macAdd[6];
+
+ // refresh list of hosts with light information (no spectrum)
+ SystemManager::instance()->refreshPlcHosts(true);
+
+ for(int i=0; i<PLCP_MAX_HOST ;i++) {
+ // if ( -1 != SystemManager::instance()->getPlcLightHostMacByIndex(i,macAdd) ) {
+ const struct plc_host & aHost = SystemManager::instance()->getStoredPlcHost(i);
+
+ if ( SystemManager::instance()->isHostActive(i) ) {
+
+ Oidx* pMacAddOidx = SystemManager::convertMacAddToOidx(aHost.macAddress);
+ macAddOidxList.add(pMacAddOidx);
+ nbHostFound ++;
+
+ /*char macAddrId[_DEFAULT_OID_BUFFER_SIZE];
+ sprintf( macAddrId, "%lu.%lu.%lu.%lu.%lu.%lu",
+ (unsigned long)macAdd[0],
+ (unsigned long)macAdd[1],
+ (unsigned long)macAdd[2],
+ (unsigned long)macAdd[3],
+ (unsigned long)macAdd[4],
+ (unsigned long)macAdd[5]);
+
+ Oidx plcBasePortId(macAdd);*/
+
+ //PLC BASE PORT TABLE: update the specific light host entry in plcBasePortTable
+ MibTableRow* plcBasePort = plcBasePortEntry::instance->find_index( *pMacAddOidx );
+ if (NULL == plcBasePort ){
+ plcBasePort = plcBasePortEntry::instance->add_row( *pMacAddOidx );
+ SystemManager::instance()->setInc(i,0);
+ }
+ assert( NULL != plcBasePort );
+ // set the row with the good values
+ plcBasePortEntry::instance->set_row(plcBasePort,
+ OctetStr( aHost.macAddress , 6 ),
+ aHost.automatic ? e_true : e_false ,
+ aHost.avg_att); //TODO check if this is the real attenuation
+ //TODO remove this trace printf("avg_att = %d\n",aHost.avg_att);
+
+ // }
+ if ( nbHostFound >= nbHost ) {
+ break;
+ }
+ }
+ }
+
+ // update all the table indexed (at least partially) by mac address
+ portStats2Entry::instance->update_structure(macAddOidxList);
+
+ portStats3Entry::instance->update_structure(macAddOidxList);
+
+ plcBasePortEntry::instance->update_structure(macAddOidxList);
+
+ plcChannelModulationStringEntry::instance->update_structure(macAddOidxList);
+
+ plcPortChannelEntry::instance->update_structure(macAddOidxList);
+
+ plcChannelPilotStringEntry::instance->update_structure(macAddOidxList);
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SPC200 updatePlcHostsTableStructure end");
+ LOG_END;
+
+}
+
void spc200::refreshPlcSystem(bool init)
{
static unsigned long last = SystemManager::getInc();
@@ -14914,6 +15890,21 @@ void spc200::refreshPlcAGCAnalyser(bool init)
}
}//PR17 END
+
+Oidx* spc200::get_corrected_req_oidx(Request* req, MibTable* pCurrentTable) {
+ Oidx* pReqOidx = 0;
+ if ( req->get_type() == sNMP_PDU_GET ) {
+ pReqOidx = new Oidx(req->get_oid(0));
+ }
+ else if ( req->get_type() == sNMP_PDU_GETNEXT ) {
+ MibLeaf* nextMibLeaf = pCurrentTable->find_next(req->get_oid(0));
+ if ( 0 != nextMibLeaf ) {
+ pReqOidx = new Oidx(nextMibLeaf->get_oid());
+ }
+ }
+ return pReqOidx;
+}
+
//--AgentGen END
diff --git a/app/sm-agent/src/systemmanager.cpp b/app/sm-agent/src/systemmanager.cpp
index fcf0805ffa..e535bcf6e6 100755
--- a/app/sm-agent/src/systemmanager.cpp
+++ b/app/sm-agent/src/systemmanager.cpp
@@ -3,8 +3,8 @@
* PROGRAM MODULE
*
* $Workfile: systemmanager.cpp $
- * $Author: maleval $
- * $Date: 2007/08/02 16:29:48 $
+ * $Author: paris $
+ * $Date: 2007/11/22 14:37:49 $
*
* Copyright (C) 2004 by SPiDCOM Technologies All rights reserved.
*
@@ -22,6 +22,11 @@ using namespace std;
#include "mib-common.h"
#include "systemmanager.h"
+
+
+
+
+
#include "mib-interface.h"
#include "if_mib.h"
@@ -44,6 +49,12 @@ using namespace std;
extern int InitAllCustomMibs(Mib& mib);
#endif
+
+
+
+
+
+
/**
* SystemManager
*
@@ -353,6 +364,9 @@ SystemManager::SystemManager()
m_underlayer = new Underlayer();
#endif
+ for(int i=0;i<PLCP_MAX_HOST;++i) {
+ m_lastTimeUpdate[i] = 0;
+ }
}
@@ -413,6 +427,22 @@ SystemManager::getInc()
return val;
}
+
+unsigned long SystemManager::getInc(unsigned int i)
+{
+ if (i<PLCP_MAX_HOST)
+ return m_lastTimeUpdate[i];
+ else
+ return 0;
+}
+
+
+void SystemManager::setInc(int i, const unsigned long& iTime)
+{
+ if (i<PLCP_MAX_HOST)
+ m_lastTimeUpdate[i] = iTime;
+}
+
//PR08 BEGIN
/**
* To convert from int ip to char ip
@@ -661,41 +691,154 @@ SystemManager::NbPlcHosts()
const struct plc_host&
SystemManager::PlcHost(unsigned int hostId)
{
-/*#ifdef SIMULATION_TEST // MUST BE KEPT HERE
- if ( hostId != 0 )
+ //unsigned long period = getInc() - m_lastTimeUpdate[hostId];
+ //if ( /*m_isInit || */period >= _DEFAULT_DATA_REFRESH_PERIOD )
{
-#ifdef _DYNAMIC_HOST_SUPPRESSION
- m_isHostActive = ( hostId == 0 || (rand()%2 != 1) );
-#else
- m_isHostActive = true;
-#endif
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("refresh host");
+ if (m_isInit) LOG("m_isInit is TRUE");
+ else LOG("m_isInit is FALSE");
+ LOG_END;
+
+ refreshPlcHost(hostId);
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("hostrefreshed");
+ LOG_END;
+
}
-#endif*/
+
return m_plchost[hostId];
}
+
+
+const struct plc_host& SystemManager::getStoredPlcHost(unsigned int hostId)
+{
+ return m_plchost[hostId];
+}
+
+
void
SystemManager::refreshPlcHost( unsigned int hostId )
{
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHost HEAVY IOCTL BEGIN for host id"); LOG(hostId);
+ LOG_END;
+
m_isHostActive[hostId] = ( m_underlayer->mib_getPlcHost( hostId, &m_plchost[hostId] ) == RET_SUCCESS );
+
+ //update the time of last update
+
+
+ /*char test[50]={0};
+ sprintf(test, "%02X-%02X-%02X-%02X-%02X-%02X",
+ m_plchost[hostId].macAddress[0],
+ m_plchost[hostId].macAddress[1],
+ m_plchost[hostId].macAddress[2],
+ m_plchost[hostId].macAddress[3],
+ m_plchost[hostId].macAddress[4],
+ m_plchost[hostId].macAddress[5]);*/
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHost HEAVY IOCTL finished");
+ LOG_END;
+
+
+ if (m_isHostActive[hostId])
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHost Host updated"); LOG(hostId);
+ LOG("MAC Address is: ");
+ LOG((int)m_plchost[hostId].macAddress[0]);
+ LOG((int)m_plchost[hostId].macAddress[1]);
+ LOG((int)m_plchost[hostId].macAddress[2]);
+ LOG((int)m_plchost[hostId].macAddress[3]);
+ LOG((int)m_plchost[hostId].macAddress[4]);
+ LOG((int)m_plchost[hostId].macAddress[5]);
+ LOG_END;
+
+ m_lastTimeUpdate[hostId]= getInc();
+ }
+ else
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHost HEAVY IOCTL in ERROR");
+ LOG_END;
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("end refresh host index"); LOG(hostId);
+ LOG_END;
}
+
void
-SystemManager::refreshPlcHosts()
+SystemManager::refreshPlcHosts(bool lightrefresh)
{
+ LOG_BEGIN(DEBUG_LOG);
+ if (lightrefresh)
+ LOG("SystemManager::refreshPlcHosts called with light ioctl");
+ else
+ LOG("SystemManager::refreshPlcHosts called with heavy ioctl");
+ LOG_END;
//ThreadSynchronize _ts_synchronize(*instance());
-
+
+
unsigned int nbHosts = NbPlcHosts();
unsigned int nbOfActiveHosts = 0;
//for ( unsigned int i=0 ; i<nbHosts; ++i ) IMS#5
for (unsigned int i=0;((i<PLCP_MAX_HOST)&&(nbOfActiveHosts<nbHosts));++i)
- {
- m_isHostActive[i] = ( m_underlayer->mib_getPlcHost( i, &m_plchost[i] ) == RET_SUCCESS );
+ {
- if ( m_isHostActive ) {
+ if (!lightrefresh)
+ {
+ m_isHostActive[i] = ( m_underlayer->mib_getPlcHost( i, &m_plchost[i] ) == RET_SUCCESS );
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHosts HEAVY IOCTL for Mac Address: ");
+ LOG((int)m_plchost[i].macAddress[0]);
+ LOG((int)m_plchost[i].macAddress[1]);
+ LOG((int)m_plchost[i].macAddress[2]);
+ LOG((int)m_plchost[i].macAddress[3]);
+ LOG((int)m_plchost[i].macAddress[4]);
+ LOG((int)m_plchost[i].macAddress[5]);
+ LOG("index is:");LOG(i);
+ LOG("isHostActive:"); LOG(m_isHostActive[i] == 1 ? "true" : "false");
+ LOG_END;
+
+ }
+ else
+ {
+ m_isHostActive[i] = ( updatePlcLightHostByIndex(i) == RET_SUCCESS );
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager::refreshPlcHosts LIGHT IOCTL for Mac Address: ");
+ LOG((int)m_plchost[i].macAddress[0]);
+ LOG((int)m_plchost[i].macAddress[1]);
+ LOG((int)m_plchost[i].macAddress[2]);
+ LOG((int)m_plchost[i].macAddress[3]);
+ LOG((int)m_plchost[i].macAddress[4]);
+ LOG((int)m_plchost[i].macAddress[5]);
+ LOG("index is:");LOG(i);
+ LOG("isHostActive:"); LOG(m_isHostActive[i] == 1 ? "true" : "false");
+ LOG_END;
+
+ }
+
+
+ if (!lightrefresh)
+ {
+ m_lastTimeUpdate[i] = getInc();
+ }
+
+ if ( m_isHostActive[i] ) {
nbOfActiveHosts ++;
}
}
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("refresh all hosts end");
+ LOG_END;
}
@@ -1845,12 +1988,17 @@ void SystemManager::setSpanningTreeProtocol( bool enabled , unsigned char Interf
//---- FD01: BEGIN SNMP community
void SystemManager::getSNMPCommunity( char * pSnmp_GET_community_name, char * pSnmp_SET_community_name ){
- /*init*/
- strcpy(pSnmp_GET_community_name,_DEFAULT_SNMP_GET_COMMUNITY);
- strcpy(pSnmp_SET_community_name,_DEFAULT_SNMP_SET_COMMUNITY);
-
+
/* if overriden retrieve these data */
- m_underlayer->mib_getSNMPCommunity( pSnmp_GET_community_name, pSnmp_SET_community_name );
+ if (m_underlayer->mib_get_SNMP_community( pSnmp_GET_community_name, pSnmp_SET_community_name ) != RET_SUCCESS)
+ {
+ printf("nosuccessssss");
+ // put default values if underlayer could not find values (could be no config file on the modem)
+ strcpy(pSnmp_GET_community_name,_DEFAULT_SNMP_GET_COMMUNITY);
+ strcpy(pSnmp_SET_community_name,_DEFAULT_SNMP_SET_COMMUNITY);
+ }
+ else{printf("successssss");}
+
}
//---- FD01: END SNMP community
@@ -2116,3 +2264,152 @@ bool SystemManager::getIsIpDynamic() {
return m_underlayer->mib_get_is_ip_dynamic();
}
+
+void SystemManager::convertOidxToMacAdd(unsigned char outputMacAdd[], const Oidx & indexOidx) {
+ const char* indexStr = indexOidx.get_printable();
+
+ LOG_SYSTEM_MANAGER_BEGIN(DEBUG_LOG);
+ LOG("convertOidxToMacAdd, input =");
+ LOG(indexStr);
+ LOG_END;
+
+ Oidx work = Oidx(indexOidx);
+ int myInt=0;
+ for(int i=0;i<6;i++) {
+ myInt = (int)work.last();
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("THE INT I GET IN THE CONVERSTION IS");LOG(myInt);
+ LOG_END;
+ outputMacAdd[5-i] = work.last();
+ work = work.cut_right(1);
+ }
+
+ LOG_SYSTEM_MANAGER_BEGIN(DEBUG_LOG);
+ LOG("convertOidxToMacAdd, output =");
+
+ OctetStr aAddress(outputMacAdd,6);
+ LOG( "address: " ); LOG(aAddress.get_printable());
+ LOG((int)outputMacAdd[0]);
+ LOG((int)outputMacAdd[1]);
+ LOG((int)outputMacAdd[2]);
+ LOG((int)outputMacAdd[3]);
+ LOG((int)outputMacAdd[4]);
+ LOG((int)outputMacAdd[5]);
+ LOG_END;
+
+}
+
+ /**
+ * The caller must delete the Oidx
+ */
+Oidx* SystemManager::convertMacAddToOidx(const unsigned char macAdd[]) {
+ char macAddStr[_DEFAULT_OID_BUFFER_SIZE];
+ LOG_SYSTEM_MANAGER_BEGIN(DEBUG_LOG);
+ LOG("convertMacAddToOidx, input =");
+ LOG((int)macAdd[0]);
+ LOG((int)macAdd[1]);
+ LOG((int)macAdd[2]);
+ LOG((int)macAdd[3]);
+ LOG((int)macAdd[4]);
+ LOG((int)macAdd[5]);
+ LOG_END;
+ sprintf( macAddStr, "%lu.%lu.%lu.%lu.%lu.%lu",
+ macAdd[0],
+ macAdd[1],
+ macAdd[2],
+ macAdd[3],
+ macAdd[4],
+ macAdd[5]);
+ Oidx* result = new Oidx(macAddStr);
+ LOG_SYSTEM_MANAGER_BEGIN(DEBUG_LOG);
+ LOG("convertMacAddToOidx output =");
+ LOG(result->get_printable());
+ LOG_END;
+ return result;
+}
+
+
+int SystemManager::getPLcHostIndex(const unsigned char iMacAddress[6])
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager getPLcHostIndex begin with Mac Address: ");
+ LOG((int)iMacAddress[0]);
+ LOG((int)iMacAddress[1]);
+ LOG((int)iMacAddress[2]);
+ LOG((int)iMacAddress[3]);
+ LOG((int)iMacAddress[4]);
+ LOG((int)iMacAddress[5]);
+ LOG_END;
+
+ int i = m_underlayer->mib_getIndexByMac(iMacAddress);
+ if ( (i<0) || (i>= PLCP_MAX_HOST))
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager getPLcHostIndex return -1");
+ LOG_END;
+ return -1;
+ }
+ else
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager getPLcHostIndex return hostId: "); LOG(i);
+ LOG_END;
+ return i;
+ }
+}
+
+int SystemManager::updatePlcLightHostByIndex(int i)
+{
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager getPlcLightHostMacByIndex begin");
+ LOG_END;
+
+ // if hot was not active, it should now be active, and managed
+ bool hostToRefresh = !m_isHostActive[i];
+
+ struct plc_host aLightHost;
+
+ ///bool result
+ m_isHostActive[i] = (m_underlayer->mib_getPlcLightHost(i, &aLightHost) == RET_SUCCESS);
+
+ if (!m_isHostActive[i])
+ {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager error mib_getPlcLightHost returns -1");
+ LOG_END;
+ return -1;
+ }
+ else
+ {
+ // update data of light host in host list
+ m_plchost[i].automatic = aLightHost.automatic;
+ m_plchost[i].avg_att = aLightHost.avg_att;
+
+ for (int j=0;j<6;++j)
+ {
+
+ if ( aLightHost.macAddress[j] != m_plchost[i].macAddress[j])
+ {
+ m_plchost[i].macAddress[j] = (unsigned char) aLightHost.macAddress[j];
+ // if mac address changed => host must be refreshed
+ hostToRefresh = true;
+
+ }
+ }
+
+ if (hostToRefresh)
+ {
+ //host was not active and is active now or host mac changed => host must be refreshed
+ m_lastTimeUpdate[i] = 0;
+ }
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("SystemManager mib_getPlcLightHost return a mac address");
+ LOG_END;
+ return 0;
+ }
+}
+
+
diff --git a/app/sm-agent/src/underlayer.cpp b/app/sm-agent/src/underlayer.cpp
index 92a3235248..f2cd4353c7 100755
--- a/app/sm-agent/src/underlayer.cpp
+++ b/app/sm-agent/src/underlayer.cpp
@@ -8,44 +8,74 @@ void Underlayer::setIsInit(bool enabled) {
}
int DEBUG_METH(Underlayer::mib_getPlcSystem(struct plc_system * plcSystem) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getPlcSystem begin");
+ LOG_END;
return ::mib_getPlcSystem(plcSystem);
};
int Underlayer::mib_getSysname(char *sysname) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getSysname begin");
+ LOG_END;
return ::mib_getSysname(sysname);
};
int Underlayer::mib_setSysname(char *sysname) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setSysname begin");
+ LOG_END;
return ::mib_setSysname(sysname);
};
int Underlayer::mib_getBridgeMac(struct bridge_mac * bridgeMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getBridgeMac begin");
+ LOG_END;
return ::mib_getBridgeMac(bridgeMac);
};
int Underlayer::mib_setBridgeMac(struct bridge_mac * bridgeMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setBridgeMac begin");
+ LOG_END;
return ::mib_setBridgeMac(bridgeMac);
};
int Underlayer::mib_getPlcAnalyser(struct plc_analyser * plcAnalyser) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getPlcAnalyser begin");
+ LOG_END;
return ::mib_getPlcAnalyser(plcAnalyser);
};
int Underlayer::mib_setPlcAnalyser(struct plc_analyser * plcAnalyser) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setPlcAnalyser begin");
+ LOG_END;
return ::mib_setPlcAnalyser(plcAnalyser);
};
int Underlayer::mib_setAgcAnalyser(struct agc_analyser * agcAnalyser) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setAgcAnalyser begin");
+ LOG_END;
return ::mib_setAgcAnalyser(agcAnalyser);
};
int Underlayer::mib_getAgcAnalyser(struct agc_analyser * agcAnalyser) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getAgcAnalyser begin");
+ LOG_END;
agcAnalyser->period=_DEFAULT_AGC_PERIOD;
agcAnalyser->samples=MAX_AGC_SAMPLES;
return ::mib_getAgcAnalyser(agcAnalyser);
};
int Underlayer::mib_getEthMac(struct eth_mac * ethMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getEthMac begin");
+ LOG_END;
int result = ::mib_getEthMac(ethMac);
//ethMac->ifGeneralInformationGroup.ifHighSpeed = ::mib_getEthCurrentSpeed(); // for ETH_STATIC comment this line
DEBUG_TXT(ethMac->ifGeneralInformationGroup.ifHighSpeed);
@@ -53,55 +83,138 @@ int Underlayer::mib_getEthMac(struct eth_mac * ethMac) {
};
int Underlayer::mib_setEthMac(struct eth_mac * ethMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setEthMac begin");
+ LOG_END;
return ::mib_setEthMac(ethMac);
};
int Underlayer::mib_getPlcMac(struct plc_mac * plcMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getPlcMac begin");
+ LOG_END;
return ::mib_getPlcMac(plcMac);
};
int Underlayer::mib_setPlcMac(struct plc_mac * plcMac) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setPlcMac begin");
+ LOG_END;
return ::mib_setPlcMac(plcMac);
};
int Underlayer::mib_getHostNb(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getHostNb begin");
+ LOG_END;
return ::mib_getHostNb();
};
int Underlayer::mib_getPlcHost(int hostNb, struct plc_host * plcHost) {
- return ::mib_getPlcHost(hostNb,plcHost);
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getPlcHost begin");
+ LOG_END;
+
+
+ struct timeval ct;
+ gettimeofday(&ct, 0);
+ //TEST60slaves
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("BEFORE REFRESH HOST: ");LOG(hostNb);LOG(ct.tv_sec);LOG(" : ");LOG(ct.tv_usec);
+ LOG_END;
+
+ int i = ::mib_getPlcHost(hostNb,plcHost);
+
+ gettimeofday(&ct, 0);
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("AFTER REFRESH HOST: ");LOG(hostNb);LOG(ct.tv_sec);LOG(" : ");LOG(ct.tv_usec);
+ LOG(" with MAC obtained: ");
+ LOG((int)plcHost->macAddress[0]);
+ LOG((int)plcHost->macAddress[1]);
+ LOG((int)plcHost->macAddress[2]);
+ LOG((int)plcHost->macAddress[3]);
+ LOG((int)plcHost->macAddress[4]);
+ LOG((int)plcHost->macAddress[5]);
+ LOG_END;
+
+ return i;
+ //return ::mib_getPlcHost(hostNb,plcHost);
};
int Underlayer::mib_setPlcHost(int hostNb, struct plc_host * plcHost) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setPlcHost begin");
+ LOG_END;
return ::mib_setPlcHost(hostNb,plcHost);
};
+int Underlayer::mib_getPlcLightHost(int hostNb, struct plc_host * plcHost) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getPlcLightHost begin");
+ LOG_END;
+ return ::mib_getPlcLightHost(hostNb,plcHost);
+};
+
+int Underlayer::mib_getIndexByMac(const unsigned char iMacAddress[6]) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getIndexByMac begin with Mac Address: ");
+ LOG((int)iMacAddress[0]);
+ LOG((int)iMacAddress[1]);
+ LOG((int)iMacAddress[2]);
+ LOG((int)iMacAddress[3]);
+ LOG((int)iMacAddress[4]);
+ LOG((int)iMacAddress[5]);
+ LOG_END;
+ return ::mib_getIndexByMac( iMacAddress);
+};
+
/* No context for the system_carrier_tab, as the system is unique */
int Underlayer::mib_getSystemCarrier(struct system_carrier_tab * systemCarrierTab) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getSystemCarrier begin");
+ LOG_END;
return ::mib_getSystemCarrier(systemCarrierTab);
};
int Underlayer::mib_setSystemCarrier(struct system_carrier_tab * systemCarrierTab) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setSystemCarrier begin");
+ LOG_END;
return ::mib_setSystemCarrier(systemCarrierTab);
};
int Underlayer::mib_setFlatAdapt(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setFlatAdapt begin");
+ LOG_END;
return ::mib_setFlatAdapt();
};
void Underlayer::mib_commit(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_commit begin");
+ LOG_END;
::mib_commit();
};
void Underlayer::mib_boardReset(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_boardReset begin");
+ LOG_END;
::mib_boardReset();
};
#ifdef __LINUX__
int Underlayer::init_socket(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("init_socket begin");
+ LOG_END;
return ::init_socket();
};
void Underlayer::close_socket(void) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("close_socket begin");
+ LOG_END;
return ::close_socket();
};
@@ -112,10 +225,16 @@ enum mib_softUpgRc DEBUG_METH(Underlayer::mib_openFTP(char ftpServerIp[16], uint
DEBUG_VAR(ftpServerPort);
DEBUG_VAR(login);
DEBUG_VAR(passwd);
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_openFTP begin");
+ LOG_END;
return ::mib_openFTP(ftpServerIp,ftpServerPort,login,passwd);
};
enum mib_softUpgRc DEBUG_METH(Underlayer::mib_closeFTP(void) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_closeFTP begin");
+ LOG_END;
return ::mib_closeFTP();
};
@@ -125,10 +244,17 @@ enum mib_softUpgRc DEBUG_METH(Underlayer::mib_upgradeSoftware(char *ftpIp, uint1
DEBUG_VAR(login);
DEBUG_VAR(passwd);
DEBUG_VAR(remoteFile);
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_upgradeSoftware begin");
+ LOG_END;
return ::mib_upgradeSoftware(ftpIp,ftp_port,login,passwd,remoteFile);
};
enum mib_softUpgRc DEBUG_METH(Underlayer::mib_getLastUploadStatus(void) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getLastUploadStatus begin");
+ LOG_END;
return ::mib_getLastUploadStatus();
};
@@ -137,6 +263,9 @@ enum mib_softUpgRc DEBUG_METH(Underlayer::mib_getSoftwareRelease(char releaseNam
};
enum mib_softUpgRc DEBUG_METH(Underlayer::mib_commitSoftwareUpgrade(char* softwareName) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_commitSoftwareUpgrade begin");
+ LOG_END;
DEBUG_VAR(softwareName);
enum mib_softUpgRc returnValue = ::mib_commitSoftwareUpgrade(softwareName);
SystemManager::instance()->PlcSystem();
@@ -144,6 +273,9 @@ enum mib_softUpgRc DEBUG_METH(Underlayer::mib_commitSoftwareUpgrade(char* softwa
};
enum mib_softUpgRc DEBUG_METH(Underlayer::mib_eraseRelease(char *releaseName) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_eraseRelease begin");
+ LOG_END;
DEBUG_VAR(releaseName);
enum mib_softUpgRc returnValue = ::mib_eraseRelease(releaseName);
SystemManager::instance()->PlcSystem();
@@ -151,20 +283,32 @@ enum mib_softUpgRc DEBUG_METH(Underlayer::mib_eraseRelease(char *releaseName) {)
};
void DEBUG_METH(Underlayer::mib_get_bootstats(int *boot, int *manual_reset, int *failure_reset) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_bootstats begin");
+ LOG_END;
return ::mib_get_bootstats(boot,manual_reset,failure_reset);
};
// development for SPiDmonitor v2.0
bool DEBUG_METH(Underlayer::mib_get_stp_enabled(unsigned char Interface ) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_stp_enabled begin");
+ LOG_END;
return ( ::mib_getSTPMode() == BRIDGE_STP_ON );
}
void DEBUG_METH(Underlayer::mib_set_stp_enabled(bool enabled,unsigned char Interface) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_stp_enabled begin");
+ LOG_END;
::mib_setSTPMode(( enabled ? BRIDGE_STP_ON : BRIDGE_STP_OFF));
}
int DEBUG_METH(Underlayer::mib_getEthCurrentMode(enumDuplex_t& oMode) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getEthCurrentMode begin");
+ LOG_END;
int result = ::mib_getEthCurrentMode(&oMode);
DEBUG_VAR(result);
DEBUG_VAR(oMode);
@@ -172,11 +316,18 @@ int DEBUG_METH(Underlayer::mib_getEthCurrentMode(enumDuplex_t& oMode) {)
}
enumDuplex_t DEBUG_METH(Underlayer::mib_getWishedEthMode() {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getWishedEthMode begin");
+ LOG_END;
return ::mib_getWishedEthMode();
}
int DEBUG_METH(Underlayer::mib_setWishedEthMode(int mode) {)
DEBUG_TXT("Underlayer::mib_setWishedEthMode begin");
+
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setWishedEthMode begin");
+ LOG_END;
if (mode == ETH_MODE_HD)
return ::mib_setWishedEthMode(ETH_MODE_HD);
else if (mode == ETH_MODE_FD)
@@ -206,14 +357,23 @@ void DEBUG_METH(Underlayer::mib_set_eth_auto_mode(bool enabled) {)
}*/
int DEBUG_METH(Underlayer::mib_get_bridge_admin_status() {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_bridge_admin_status begin");
+ LOG_END;
return ::mib_getBridgeForwarding();
}
void DEBUG_METH(Underlayer::mib_set_bridge_admin_status(int status) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_bridge_admin_status begin");
+ LOG_END;
::mib_setBridgeForwarding(status);
}
int DEBUG_METH(Underlayer::mib_getEthCurrentSpeed(enumSpeed_t& oSpeed) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getEthCurrentSpeed begin");
+ LOG_END;
int result = ::mib_getEthCurrentSpeed(&oSpeed);
DEBUG_VAR(result);
DEBUG_VAR(oSpeed);
@@ -224,6 +384,9 @@ int DEBUG_METH(Underlayer::mib_getEthCurrentSpeed(enumSpeed_t& oSpeed) {)
}
enumSpeed_t DEBUG_METH(Underlayer::mib_getWishedEthSpeed(void) {)
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getWishedEthSpeed begin");
+ LOG_END;
enumSpeed_t result = ::mib_getWishedEthSpeed();
DEBUG_TXT(result);
return result;
@@ -234,6 +397,10 @@ int DEBUG_METH(Underlayer::mib_setWishedEthSpeed(long speed) {)
DEBUG_TXT("Underlayer::mib_set_eth_speed, before mib_setEthSpeed()");
DEBUG_TXT(speed);
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_setWishedEthSpeed begin");
+ LOG_END;
+
if (speed == ETH_SPEED_10 )
return ::mib_setWishedEthSpeed(ETH_SPEED_10);
else if (speed == ETH_SPEED_100 )
@@ -261,34 +428,58 @@ void DEBUG_METH(Underlayer::mib_set_eth_auto_speed(bool enabled) {)
} */
bool Underlayer::mib_get_plc_is_spy_dynamic() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_plc_is_spy_dynamic begin");
+ LOG_END;
return m_isSpyDynamic;
}
void Underlayer::mib_set_plc_is_spy_dynamic(bool enabled) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_is_spy_dynamic begin");
+ LOG_END;
m_isSpyDynamic = enabled;
}
unsigned int Underlayer::mib_get_plc_static_spy_synch_band_nb() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_plc_static_spy_synch_band_nb begin");
+ LOG_END;
return ::mib_getStaticBand();
}
void Underlayer::mib_set_plc_static_spy_synch_band_nb(unsigned int bandNb) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_static_spy_synch_band_nb begin");
+ LOG_END;
::mib_setStaticBand(bandNb);
}
bool Underlayer::mib_get_plc_segmentation_and_reassembly() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_plc_segmentation_and_reassembly begin");
+ LOG_END;
return ::mib_get_plc_segmentation_and_reassembly();
}
void Underlayer::mib_set_plc_segmentation_and_reassembly(bool enabled) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_segmentation_and_reassembly begin");
+ LOG_END;
::mib_set_plc_segmentation_and_reassembly(enabled);
}
bool Underlayer::mib_get_plc_power_equalization() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_plc_power_equalization begin");
+ LOG_END;
return ::mib_get_plc_power_equalization();
}
void Underlayer::mib_set_plc_power_equalization(bool enabled) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_power_equalization begin");
+ LOG_END;
::mib_set_plc_power_equalization(enabled);
}
@@ -297,15 +488,24 @@ unsigned int Underlayer::mib_get_plc_bss_id() {
}
void Underlayer::mib_set_plc_bss_id(unsigned int bssId) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_bss_id begin");
+ LOG_END;
::mib_set_plc_bssid(bssId);
}
unsigned int Underlayer::mib_get_plc_preferred_bss_id() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_plc_preferred_bss_id begin");
+ LOG_END;
return ::mib_get_plc_preferred_bssid();
}
void Underlayer::mib_set_plc_preferred_bss_id(unsigned int bssId) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_plc_preferred_bss_id begin");
+ LOG_END;
::mib_set_plc_preferred_bssid(bssId);
}
@@ -352,18 +552,28 @@ bool Underlayer::mib_set_radius_slave_authentication(const char *radiusUserName,
void Underlayer::mib_set_is_ip_dynamic(bool isDynamic) {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_set_is_ip_dynamic begin");
+ LOG_END;
::mib_setDHCPMode(isDynamic);
}
bool Underlayer::mib_get_is_ip_dynamic() {
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_get_is_ip_dynamic begin");
+ LOG_END;
return mib_getDHCPMode();
}
+
//---- FD01: BEGIN SNMP community
-bool Underlayer::mib_getSNMPCommunity(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name){
-bool result = false;
+bool Underlayer::mib_get_SNMP_community(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name){
+ LOG_BEGIN(DEBUG_LOG);
+ LOG("mib_getSNMPCommunity begin");
+ LOG_END;
+ bool result = false;
- if (0 == mib_get_SNMP_community(pSnmp_GET_community_name,pSnmp_SET_community_name ) ){
+ if (0 == ::mib_get_SNMP_community(pSnmp_GET_community_name,pSnmp_SET_community_name ) ){
result = true;}
return result;
diff --git a/app/sm-custom-mib/Makefile_x86 b/app/sm-custom-mib/Makefile_x86
new file mode 100644
index 0000000000..bb0f6adfae
--- /dev/null
+++ b/app/sm-custom-mib/Makefile_x86
@@ -0,0 +1,61 @@
+#-------------------------#
+# CUSTOM MIB #
+# CUSTOM MIB #
+# Makefile for SNMP agent #
+# ******* LINUX ******* #
+# =====< x86-linux >===== #
+# ( sm-mib ) #
+#-------------------------#
+# by Dušan Stefanović #
+# based on Makefile_polux #
+# by Franck Paris #
+# "Spidcom Technologies" #
+# Date : 11 Dec 2007 #
+#-------------------------#
+
+OBJS += $(OBJDIR)/custom_init_mib.o
+OBJS += $(OBJDIR)/custom_mib.o
+OBJS += $(OBJDIR)/custom_test_mib.o
+
+#************************************************************
+
+GCCROOT = $(COMPILERROOT)
+GCCBIN = $(GCCROOT)/bin
+
+GCCTARGET = x86-linux
+#GCCTOOLS = /usr/local/toolchains/arm-uclinux/bin
+#COMPILERROOT = /usr/local/toolchains/arm-uclinux/
+
+CC = g++
+AR = ar
+CFLAGS=$(DEFINES) $(INCLUDE) -c -O2 -fno-rtti -fno-access-control -fno-exceptions
+INCLUDE = -I./inc -I../sm-agent/inc/agent_pp -I../sm-agent/inc -I../sm-agent/inc/snmp_pp -I../../include -I.
+
+DEFINES = -DFEATURE_AGENT -D_NO_THREADS -DSP_CRISTINA -D__LINUX__ -DSIMULATION_TEST
+
+DEP_H =
+#mib.h mib-interface.h rfc1213.h mib_lib.h
+
+
+OBJPARENT = ./obj
+OBJDIR = $(OBJPARENT)/$(GCCTARGET)
+SRCDIR = ./src
+
+
+#************************************************************
+
+
+$(OBJDIR)/sm-custom-mib.a : $(OBJDIR) $(OBJS)
+ $(AR) -r $@ $(OBJS)
+
+$(OBJPARENT) :
+ -mkdir $(OBJPARENT)
+
+$(OBJDIR) : $(OBJPARENT)
+ -mkdir $(OBJDIR)
+
+$(OBJDIR)/%.o : $(SRCDIR)/%.cpp $(DEP_H)
+ $(CC) $(CFLAGS) -o $@ $<
+
+clean :
+ -rm -rf $(OBJDIR)
diff --git a/app/sm-emac-drv/enermib.h b/app/sm-emac-drv/enermib.h
deleted file mode 100644
index eb00ab8951..0000000000
--- a/app/sm-emac-drv/enermib.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __ENERMIB_H__
-#define __ENERMIB_H__
-
-struct emac_conf {
- int gain;
- int gap;
- int slave_no;
- int nb_slaves;
- int frame_slots;
- int frame_spaces;
- int beacon_spaces;
- int beacon_offset;
- int cid;
- int slices;
-};
-
-#endif /* __ENERMIB_H__ */
diff --git a/app/sm-emac-drv/inc/enermac.h b/app/sm-emac-drv/inc/enermac.h
deleted file mode 100644
index cc41454274..0000000000
--- a/app/sm-emac-drv/inc/enermac.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ENERMAC_H__
-#define __ENERMAC_H__
-
-extern DevErr mac_init(void);
-extern DevErr mac_open(struct plc_drv_unit *unit);
-extern DevErr mac_start(struct plc_drv_unit *unit);
-extern int mac_write(struct plc_drv_unit *unit, char *buf, int d_len);
-extern void mac_lock(struct plc_drv_unit *unit);
-extern void mac_unlock(struct plc_drv_unit *unit);
-extern void mac_heartbeat(void);
-
-#endif /* __ENERMAC_H__ */
diff --git a/app/sm-emac-drv/inc/mac_carp.h b/app/sm-emac-drv/inc/mac_carp.h
deleted file mode 100644
index e26e47ecd1..0000000000
--- a/app/sm-emac-drv/inc/mac_carp.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#ifndef MAC_CARP_H
-#define MAC_CARP_H
-
-#ifndef __KERNEL__
-#include "osarch.h"
-#endif
-
-extern void carp_lookup(uint8_t DA[6], uint8_t NHA[6]);
-
-extern void carp_insert(uint8_t DA[6], uint8_t NHA[6]);
-
-extern void carp_init_ui(void);
-
-#endif // MAC_CARP_H
diff --git a/app/sm-emac-drv/inc/mac_frame.h b/app/sm-emac-drv/inc/mac_frame.h
deleted file mode 100644
index 065a16d57e..0000000000
--- a/app/sm-emac-drv/inc/mac_frame.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef MAC_FRAME_H
-#define MAC_FRAME_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#include "platform.h"
-#ifndef FEATURE_ENERVATION
-#include "plc_plcp.h" // pour les host
-#include "mac_timer.h" // pour timer_w_ack
-
-
-/* type of mac frame */
-#define MAC_TYPE_DATA 1
-#define MAC_TYPE_ACK 2
-#define MAC_TYPE_UDATA 3
-
-/* state of mac frame */
-#define MAC_STATE_IDLE 0
-#define MAC_STATE_DATA 1
-#define MAC_STATE_DATA_W_ACK 2
-#define MAC_STATE_UDATA 3
-#define MAC_STATE_ACK 4
-#define MAC_STATE_TMO_W_ACK 5
-#define MAC_STATE_TMO_TX 6
-#define MAC_STATE_SENT 7
-
-extern uint8_t DEFAULT_NHA[6];
-
-extern struct list_head mac_tx_free_queue;
-extern struct list_head mac_rx_free_queue;
-
-
-struct mac_frame
-{
- struct mac_header *header;
- uint8_t *c_buf;
- uint8_t *d_buf;
- int d_len;
- int c_len;
-
- int type;
- int subtype;
- int state;
- int prio;
- int flags;
-
- /* DA and SA are not part of header but are used for ACK management */
- uint8_t DA[6]; /* destination address */
- uint8_t SA[6]; /* source address */
- struct plcp_host *host; /* link used for transmit */
-
- struct mac_timer timer_w_ack;
- struct mac_timer timer_tx;
-
- uint32_t intg : 2; /* integrity */
- uint32_t idx : 6;
- struct list_head free; // sert pour TX et RX dans l'alloc et le free
- struct list_head pending; // mac_tx_queue
- struct list_head link; /* pour les mégaframes */
- bool failed;
-
- struct {
- uint32_t handle_tx_ra;
- uint32_t handle_tx_status;
- uint32_t free_ra;
- bool is_tx_frame;
- } debug;
-};
-
-extern void mac_init_frame(struct mac_frame *frame);
-
-extern struct mac_frame *mac_alloc_tx_frame(int prio);
-extern struct mac_frame *mac_alloc_rx_frame(void);
-
-extern void mac_free_tx_frame(struct mac_frame *frame);
-extern void mac_free_rx_frame(struct mac_frame *frame);
-
-extern void mac_init_frames(struct plc_drv_unit *unit);
-
-extern struct mac_frame *mac_get_frame_by_id(struct plc_drv_unit *unit, uint8_t id);
-extern struct mac_frame *mac_get_token_frame(struct plc_drv_unit *unit);
-extern uint8_t mac_frame_id(struct mac_frame *frame);
-
-#endif // FEATURE_ENERVATION
-#endif // MAC_FRAME_H
-
-
diff --git a/app/sm-emac-drv/inc/mac_isr.h b/app/sm-emac-drv/inc/mac_isr.h
deleted file mode 100644
index 9544c44508..0000000000
--- a/app/sm-emac-drv/inc/mac_isr.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef MAC_ISR_H
-#define MAC_ISR_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#include "platform.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-
-
-extern void mac_rx_end_isr(struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern void mac_idle_isr(struct plc_drv_unit *unit);
-extern void mac_busy_isr(struct plc_drv_unit *unit);
-extern void mac_rx_start_isr(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern void mac_tx_end_isr(struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern void mac_tmo_isr(struct plc_drv_unit *unit);
-extern void mac_eof_isr(struct plc_drv_unit *unit);
-extern void mac_timeout(struct plc_drv_unit *unit);
-
-#endif /* MAC_ISR_H */
-
-
diff --git a/app/sm-emac-drv/inc/mac_signals.sig b/app/sm-emac-drv/inc/mac_signals.sig
deleted file mode 100644
index 5527bf3fde..0000000000
--- a/app/sm-emac-drv/inc/mac_signals.sig
+++ /dev/null
@@ -1,356 +0,0 @@
-#ifndef _MAC_SIGNALS_
-#define _MAC_SIGNALS_
-
-#include "ose.h"
-
-
-/* number of signal per process */
-#define TX_COORD_SIGNALS (9)
-#define RX_COORD_SIGNALS (2)
-#define BP_SIGNALS (6)
-#define CS_SIGNALS (6)
-#define CCO_SIGNALS (6)
-
-
-/* signal offset */
-#define TX_COORD_SIGOFF (0)
-#define RX_COORD_SIGOFF (TX_COORD_SIGOFF + TX_COORD_SIGNALS)
-#define BP_SIGOFF (RX_COORD_SIGOFF + RX_COORD_SIGNALS)
-#define CS_SIGOFF (BP_SIGOFF + BP_SIGNALS)
-#define CCO_SIGOFF (CS_SIGOFF + CS_SIGNALS)
-
-
-
-/*---------------------- tx_coordination signals ----------------------------*/
-
-#define MPDU_REQUEST (TX_COORD_SIGOFF + 0) /* !- SIGNO( struct MpduRequest ) -! */
-#define PHY_TX_DATA_CONFIRM (TX_COORD_SIGOFF + 1) /* !-SIGNO(struct PhyTxDataConfirm)-! */
-#define RIFS_TMO (TX_COORD_SIGOFF + 2) /* !-SIGNO(struct RIFSTmo)-! */
-#define RX_ACK (TX_COORD_SIGOFF + 3) /* !-SIGNO(struct RxAck)-! */
-#define ACCESS (TX_COORD_SIGOFF + 4) /* !-SIGNO(struct Access)-! */
-#define PHY_TX_STATUS_INDICATION (TX_COORD_SIGOFF + 5) /* !-SIGNO(struct PhyTxStatusIndication)-! */
-#define POLLED (TX_COORD_SIGOFF + 6) /* !-SIGNO(struct Polled)-! */
-#define TX_CFACK (TX_COORD_SIGOFF + 7) /* !-SIGNO(struct TxCfAck)-! */
-#define RX_OTHER (TX_COORD_SIGOFF + 8) /* !-SIGNO(struct RxOther)-! */
-
-
-
-struct MpduRequest {
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int pframe;
-};
-
-struct PhyTxDataConfirm
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int pframe;
- unsigned short date;
-};
-
-struct RIFSTmo
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
- unsigned short id;
-};
-
-struct RxAck
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned char seqno;
-};
-
-struct RxCfAck
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned char seqno;
-};
-
-struct Polled
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned char seqno;
-};
-
-#define BP_ACCESS_DONE 0
-#define BP_ACCESS_LIMIT 1
-struct Access
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short respno;
- unsigned short status;
-};
-
-struct PhyTxStatusIndication
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-struct TxCfAck
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned char SA[6];
- unsigned char seqno;
-};
-
-struct RxOther
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-/*---------------------- rx_coordination signals ----------------------------*/
-
-
-#define PHY_RX_DATA_INDICATION (RX_COORD_SIGOFF + 0) /* !-SIGNO(struct PhyRxDataIndication)-! */
-#define PHY_RX_STATUS_INDICATION (RX_COORD_SIGOFF + 1) /* !-SIGNO(struct PhyRxStatusIndication)-! */
-
-struct PhyRxDataIndication
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int pframe;
-};
-
-
-struct PhyRxStatusIndication
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short status; /* implicit DROP */
-};
-
-
-
-/*---------------------- backoff procedure signals ------------------------------*/
-
-
-#define BUSY (BP_SIGOFF + 0) /* !-SIGNO(struct Busy)-! */
-#define IDLE (BP_SIGOFF + 1) /* !-SIGNO(struct Idle)-! */
-#define BP_TMO (BP_SIGOFF + 2) /* !-SIGNO(struct BPTmo)-! */
-#define BACKOFF (BP_SIGOFF + 3) /* !-SIGNO(struct Backoff)-! */
-#define CANCEL (BP_SIGOFF + 4) /* !-SIGNO(struct Cancel)-! */
-#define ACCESS_ERROR (BP_SIGOFF + 5) /* !-SIGNO(struct AccessError)-! */
-
-struct Busy
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-struct Idle
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-struct BPTmo
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
- unsigned short id;
-};
-
-struct AccessError
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-struct Backoff
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short reqno;
-};
-
-struct Cancel
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-/*---------------------- channel state signals ------------------------------*/
-
-
-#define PHY_CCA_BUSY (CS_SIGOFF + 0) /* !-SIGNO(struct PhyCCABusy)-! */
-#define PHY_CCA_IDLE (CS_SIGOFF + 1) /* !-SIGNO(struct PhyCCAIdle)-! */
-#define SET_NAV (CS_SIGOFF + 2) /* !-SIGNO(struct SetNav)-! */
-#define CLEAR_NAV (CS_SIGOFF + 3) /* !-SIGNO(struct ClearNav)-! */
-#define TMO_NAV (CS_SIGOFF + 4) /* !-SIGNO(struct TmoNav)-! */
-#define CCA_REQUEST (CS_SIGOFF + 5) /* !-SIGNO(struct CCARequest)-! */
-
-/* NOTE: each one of these events can be forwarded to virtual process backoff_procedure */
-
-struct PhyCCABusy
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-struct PhyCCAIdle
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-struct SetNav
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
- unsigned int dur;
-};
-
-struct ClearNav
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-struct TmoNav
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
- unsigned short id;
-};
-
-struct CCARequest
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned short date;
-};
-
-/*---------------------- protocol management signals ------------------------------*/
-
-
-#define MM_REQUEST (CCO_SIGOFF + 0) /* !-SIGNO(struct MmRequest)-! */
-#define MM_CONFIRM (CCO_SIGOFF + 1) /* !-SIGNO(struct MmConfirm)-! */
-#define MM_INDICATE (CCO_SIGOFF + 2) /* !-SIGNO(struct MmIndicate)-! */
-#define TBTT (CCO_SIGOFF + 3) /* !-SIGNO(struct Tbtt)-! */
-#define CF_START (CCO_SIGOFF + 4) /* !-SIGNO(struct CfStart)-! */
-#define CF_STOP (CCO_SIGOFF + 5) /* !-SIGNO(struct CfStop)-! */
-
-
-#define MM_CFPOLL (0)
-#define MM_CFEND (1)
-#define MM_BEACON (2)
-struct MmRequest
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int mm_type;
- unsigned int addressee;
-};
-
-#define MCTRL_SUCCESS 0
-#define MCTRL_FAILED 1
-struct MmConfirm
-{
- SIGSELECT sig_no;
- unsigned int unit;
- int mm_type;
- unsigned short status;
-};
-
-struct MmIndicate
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int mm_type;
-};
-
-struct Tbtt
-{
- SIGSELECT sig_no;
- unsigned int unit;
- unsigned int date;
-};
-
-struct CfStart
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-struct CfStop
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-
-/*----------------------------- signal union -------------------------------*/
-
-struct SigHeader
-{
- SIGSELECT sig_no;
- unsigned int unit;
-};
-
-/* signaux gérés */
-union SIGNAL
-{
- SIGSELECT sigNo;
-
- /* bas signal */
- struct SigHeader SigHeader;
-
- /* tx_coordination signals */
- struct MpduRequest MpduRequest;
- struct PhyTxDataConfirm PhyTxDataConfirm;
- struct PhyTxStatusIndication PhyTxStatusIndication;
- struct RIFSTmo RIFSTmo;
- struct Access Access;
- struct RxAck RxAck;
- struct TxCfAck TxCfAck;
- struct Polled Polled;
- struct RxOther RxOther;
-
- /* rx_coordination signals */
- struct PhyRxDataIndication PhyRxDataIndication;
- struct PhyRxStatusIndication PhyRxStatusIndication;
-
- /* backoff procedure signals */
- struct Idle Idle;
- struct Busy Busy;
- struct BPTmo BPTmo;
- struct Cancel Cancel;
- struct Backoff Backoff;
- struct AccessError AccessError;
-
- /* channel state signals */
- struct PhyCCAIdle PhyCCAIdle;
- struct PhyCCABusy PhyCCABusy;
- struct SetNav SetNav;
- struct ClearNav ClearNav;
- struct CCARequest CCARequest;
- struct TmoNav TmoNav;
-
- /* management signals */
- struct MmRequest MmRequest;
- struct MmConfirm MmConfirm;
- struct MmIndicate MmIndicate;
- struct Tbtt Tbtt;
- struct CfStart CfStart;
- struct CfStop CfStop;
-};
-
-#endif /* _MAC_SIGNALS_ */
diff --git a/app/sm-emac-drv/inc/mac_timer.h b/app/sm-emac-drv/inc/mac_timer.h
deleted file mode 100644
index 613ad22dd1..0000000000
--- a/app/sm-emac-drv/inc/mac_timer.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MAC_TIMER_H
-#define MAC_TIMER_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#include "platform.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-
-struct mac_timer {
- struct list_head link;
- void (*tmo_fn)(void *arg1, void *arg2);
- void *tmo_arg1;
- void *tmo_arg2;
- int ticks;
-};
-
-extern void mac_init_timer(struct mac_timer *timer);
-extern void mac_start_timer(struct mac_timer *timer, int slots,
- void (*tmo_fn)(void *arg1, void *arg2), void *arg1, void *arg2);
-extern void mac_stop_timer(struct mac_timer *timer);
-extern void mac_init_timers(struct plc_drv_unit *unit);
-extern void mac_start_timers(struct plc_drv_unit *unit);
-//extern struct mac_timer mac_token_timer;
-
-#endif /* MAC_TIMER_H */
diff --git a/app/sm-emac-drv/inc/plc_ber.h b/app/sm-emac-drv/inc/plc_ber.h
deleted file mode 100644
index db65285947..0000000000
--- a/app/sm-emac-drv/inc/plc_ber.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef PLC_BER_H
-#define PLC_BER_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#include "platform.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "mac_timer.h"
-#ifdef FEATURE_ENERVATION
-#include "enermac.h"
-#else
-#include "mac_frame.h"
-#endif
-
-#define BER_CONTROL_PATTERN_SIZE PLCP_BLOCK_PAYLOAD_SIZE
-struct ber_header {
- uint8_t control_pattern;
- uint8_t payload_pattern;
-#ifndef FEATURE_ENERVATION
- uint8_t padding[PLCP_BLOCK_PAYLOAD_SIZE -
- (MAC_HEADER_SIZE%PLCP_BLOCK_PAYLOAD_SIZE) - 2];
-#endif // FEATURE_ENERVATION
- uint8_t pattern[BER_CONTROL_PATTERN_SIZE];
-};
-
-int plcp_build_ber_frame(
- struct plc_drv_unit *unit,
- struct plcp_host *host,
- uint8_t *c_buf, int *c_len,
- uint8_t *d_buf, int *d_len);
-
-
-#define BER_PATTERN_00 0 /* 00 00 00 00 ... */
-#define BER_PATTERN_FF 1 /* FF FF FF FF ... */
-#define BER_PATTERN_0F 2 /* 0F 0F 0F 0F ... */
-#define BER_PATTERN_0123 3 /* 00 01 02 03 ... */
-#define BER_PATTERN_NOT_0123 4 /* FF FE FD FC ... */
-#define BER_PATTERN_ALT_0123 5 /* 00 01 02 03 ... ALTERNATE */
-#define BER_PATTERN_ALT_NOT_0123 6 /* FF FE FD FC ... ALTERNATE */
-
-#define BER_PATTERN_MAX 6
-
-
-
-/* BER flags */
-#define BER_F_UPDATE 1
-#define BER_F_ERRORS_ONLY 2
-#define BER_F_FEC_MISMATCH 4
-#define BER_F_MEMWIDTH_16 8
-#define BER_F_AFTER_FEC 16
-#define BER_F_BEFORE_FEC 32
-#define BER_F_DETAILED 64
-
-void plcp_payload_map(struct plc_drv_unit *unit,
- uint16_t *mem_exp_addr, uint16_t *mem_real_addr,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, int flags, int mem_width);
-
-void plcp_control_map(struct plc_drv_unit *unit,
- uint16_t *mem_real_addr,
- int nbits, int band,
- bool compare_with_expected, bool errors_only, int pattern, int start_bit);
-
-void plcp_payload_ber(struct plc_drv_unit *unit,
- uint16_t *expected, uint16_t *real,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int start_bit, uint8_t rx_bands);
-
-void plcp_control_ber(struct plc_drv_unit *unit,
- uint16_t *mem_real_addr,
- uint16_t *mem_exp_addr, int nbits, int band, int start_bit);
-
-int plcp_payload_ber_len(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int nb_slots);
-
-void plcp_cleanup_ber(struct plc_drv_unit *unit);
-
-void plcp_update_group_ber(struct plc_drv_unit *unit, int pattern,
- int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]);
-
-void plcp_update_payload_ber(struct plc_drv_unit *unit, int pattern, int d_len);
-void plcp_display_payload_ber(struct plc_drv_unit *unit, int flags);
-
-void plcp_update_control_ber(struct plc_drv_unit *unit, int pattern);
-void plcp_display_control_ber(struct plc_drv_unit *unit, int flags);
-
-
-void plcp_update_slice_ber(struct plc_drv_unit *unit, int pattern,
- uint8_t *d_buf, int d_len);
-void plcp_display_slice_ber(struct plc_drv_unit *unit, int detailed);
-
-void plcp_bad_slice_dump(void);
-
-void plcp_bad_slice_map(struct plc_drv_unit *unit, int flags);
-void plcp_compute_payload_ber(struct plc_drv_unit *unit, int pattern);
-
-void plcp_prepare_payload_ber(struct plc_drv_unit *unit, int d_len);
-
-void plcp_init_ber(void);
-
-int plcp_fill_with_pattern(uint8_t *buf, int pattern, int len);
-
-int shell_ber(int argc, char *argv[]);
-int shell_xxcmap(int argc, char *argv[]);
-int shell_xxmap(int argc, char *argv[]);
-int shell_xxmem(int argc, char *argv[]);
-int shell_ber_info(int argc, char *argv[]);
-
-
-#endif /* PLC_BER_H */
-
-
diff --git a/app/sm-emac-drv/inc/plc_ce.h b/app/sm-emac-drv/inc/plc_ce.h
deleted file mode 100644
index c612c652d1..0000000000
--- a/app/sm-emac-drv/inc/plc_ce.h
+++ /dev/null
@@ -1,89 +0,0 @@
-#ifndef PLC_CE_H
-#define PLC_CE_H
-
-#include "plc_drv.h"
-
-#define RAFALE_WITH_NR
-/* host CE state machine */
-
-#define CE_STATE_IDLE 0
-#define CE_STATE_W_PERIOD 1
-#define CE_STATE_SENDING 2
-#define CE_STATE_W_REPLY 3
-#define CE_STATE_I_STEP 4
-#define CE_STATE_BLOCKED 5
-#define CE_STATE_KILLED 6
-#define CE_STATE_STOPPING 7
-
-#define CE_HEADER_LEN (sizeof(struct ce_header))
-#define CE_MAX_SPECTRUM 400
-
-#define CE_MAX_CONTROL_LEN 100 /* max control len */
-#define CE_MAX_PAYLOAD_LEN (15 * PMD_SLICE_SIZE) /* max payload len */
-
-#define FEC_LIMIT_TOTAL 100000 // 10^5
-
-#define CE_NB_STEPS 5
-#define DEFAULT_GLOMER 22
-
-#define NO_SAVA 0
-#define SAVA_5V 1
-#define SAVA_8V 2
-#define SAVA_12V 3
-#define SAVA_MB 4
-#define MAX_AFE 5
-
-#define DSP_TO_DBMHZ(glom) (19*log10(glom)-113)
-#define DBMHZ_TO_DSP(dbmhz) (pow(10,(dbmhz+113)/19))
-#define POWER_TO_MW(pw) (pw/10000000)
-#define MW_TO_DBM(mw) (10*log10(mw))
-#define POWER_TO_DBM(pw) (10*log10(pw) - 70)
-#define BANDWITH(nb_bands) (4000000*nb_bands)
-
-/*********************************************************************************
- *
- * Interface functions
- *
- *********************************************************************************/
-
-extern int nb_bpsk_slots;
-extern int nb_qam16_slots;
-
-/* fonctions publiques */
-void ce_init(struct plc_drv_unit * unit);
-
-int ce_start(struct plc_drv_unit * unit);
-
-int ce_stop(struct plc_drv_unit * unit);
-
-void ce_rx_data_isr(struct plc_drv_unit * unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-
-void ce_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-
-void ce_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-
-/*********************** for shell commands only *******************/
-
-void ce_getm_sn(struct plc_drv_unit * unit, int test_delay, bool manual, uint16_t agc_gain);
-
-double ce_estim_power(struct pmd_band_quality qual[PMD_MAX_BANDS], uint8_t used_mask);
-
-double ce_get_power(struct plc_drv_unit *unit, double signal[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND]);
-
-double ce_get_band_power(struct plc_drv_unit *unit, int band, double signal[PMD_CARRIERS_PER_BAND]);
-
-int ce_estim_band_quality(struct pmd_band_quality *quality, int band_no);
-
-void ce_analyse_spectrum(struct plc_drv_unit *unit);
-
-void ce_start_host(struct plc_drv_unit * unit, struct plcp_host *host);
-
-int ce_start_hosts(struct plc_drv_unit *unit);
-
-void ce_stop_host(struct plc_drv_unit * unit, struct plcp_host *host);
-
-int ce_stop_hosts(struct plc_drv_unit *unit);
-
-void ce_spaces(struct plc_drv_unit *unit);
-
-#endif /* PLC_CHANNEL_H */
diff --git a/app/sm-emac-drv/inc/plc_dbg.h b/app/sm-emac-drv/inc/plc_dbg.h
deleted file mode 100644
index 3acb1b0766..0000000000
--- a/app/sm-emac-drv/inc/plc_dbg.h
+++ /dev/null
@@ -1,113 +0,0 @@
-#ifndef PLC_DBG_H
-#define PLC_DBG_H
-
-#ifndef __KERNEL__
-#include <sys/time.h>
-#include "inet.h"
-#endif
-
-#define PLC_SNAP_NB_RECORDS 100
-#define PLC_SNAP_SIZE 32
-
-#define BUG() error(__LINE__)
-
-#define ASSERT(n) do { if (!(n)) BUG(); } while(0)
-extern void bug(char *file, int line);
-extern void bugp(char *file, int line, char *fmt, void *arg);
-
-extern int last_tx_idx;
-extern int last_rx_idx;
-
-extern uint8_t last_tx[PLC_SNAP_NB_RECORDS][PLC_SNAP_SIZE];
-extern uint8_t last_tx_burst[PLC_SNAP_NB_RECORDS][8];
-extern uint8_t last_rx[PLC_SNAP_NB_RECORDS][PLC_SNAP_SIZE];
-extern uint8_t last_rx_burst[PLC_SNAP_NB_RECORDS][8];
-
-struct plc_packet_record {
- struct timeval tv;
- int direction;
- int unit;
- int valid;
- char burst[8];
-#define PLC_SNAP_RX 0
-#define PLC_SNAP_TX 1
- char packet[PLC_SNAP_SIZE];
-};
-
-extern struct plc_packet_record plc_packet_log[PLC_SNAP_NB_RECORDS];
-extern int plc_packet_log_idx;
-
-#define LOG_TX(iUnit) \
-{ \
- uint16_t reg; \
- void* burst; \
- gettimeofday(&plc_packet_log[plc_packet_log_idx].tv, NULL); \
- plc_packet_log[plc_packet_log_idx].direction = PLC_SNAP_TX; \
- plc_packet_log[plc_packet_log_idx].unit = iUnit; \
- plc_packet_log[plc_packet_log_idx].valid = 1; \
- memcpy(plc_packet_log[plc_packet_log_idx].packet, \
- frame, PLC_SNAP_SIZE); \
- /*memcpy(plc_packet_log[plc_packet_log_idx].burst, (void*)0x44060400, 8);*/ \
- reg = r16(PMD_UNIT(iUnit)+PMD_UNIT_TX_BURSTS); \
- burst = (void *)(reg + PMD_PHLIC_DATA_REGBASE); \
- memcpy(plc_packet_log[plc_packet_log_idx].burst, (void*)burst, 8); \
- plc_packet_log_idx = (plc_packet_log_idx + 1)%PLC_SNAP_NB_RECORDS; \
-}
-
-#define LOG_RX(iUnit, Valid) \
-{ \
- uint16_t reg; \
- void* burst; \
- gettimeofday(&plc_packet_log[plc_packet_log_idx].tv, NULL); \
- plc_packet_log[plc_packet_log_idx].direction = PLC_SNAP_RX; \
- plc_packet_log[plc_packet_log_idx].unit = iUnit; \
- plc_packet_log[plc_packet_log_idx].valid = Valid; \
- memcpy(plc_packet_log[plc_packet_log_idx].packet, \
- &RX_FRAME, PLC_SNAP_SIZE); \
- /*memcpy(plc_packet_log[plc_packet_log_idx].burst, (void*)0x44060410, 8);*/ \
- reg = r16(PMD_UNIT(iUnit)+PMD_UNIT_RX_BURSTS); \
- burst = (void *)(reg + PMD_PHLIC_DATA_REGBASE); \
- memcpy(plc_packet_log[plc_packet_log_idx].burst, (void*)burst, 8); \
- plc_packet_log_idx = (plc_packet_log_idx + 1)%PLC_SNAP_NB_RECORDS; \
-}
-
-#define RX_DROP 2
-#define LOG_DROP(iUnit) \
-{ \
- uint16_t reg; \
- void* burst; \
- gettimeofday(&plc_packet_log[plc_packet_log_idx].tv, NULL); \
- plc_packet_log[plc_packet_log_idx].direction = PLC_SNAP_RX; \
- plc_packet_log[plc_packet_log_idx].unit = iUnit; \
- plc_packet_log[plc_packet_log_idx].valid = RX_DROP; \
- plc_packet_log_idx = (plc_packet_log_idx + 1)%PLC_SNAP_NB_RECORDS; \
-}
-
-#define FILL_RX \
-{ \
- memset(&plc_rx_buffer[0][0],0xaa,PLC_SNAP_SIZE); \
-}
-
-#define FILL_TX \
-{ \
- memset(&plc_tx_buffer[0][0],0xbb,PLC_SNAP_SIZE); \
-}
-
-#define PLC_PARAM(type, name, value, comment) \
-extern type name; /* value comment */
-
-#include "plc_param.h"
-
-
-/* debug functions */
-#if 0
-extern void mac_display_all_events(void);
-extern void mac_display_unexpected_events(void);
-extern void mac_display_send_failed(void);
-extern void mac_failed_event(int state, int event);
-extern void mac_error_event(int state, int event);
-extern void mac_log_event(int state, int event);
-extern void mac_clean_stats(void);
-#endif
-
-#endif /* PLC_DBG_H */
diff --git a/app/sm-emac-drv/inc/plc_drv.h b/app/sm-emac-drv/inc/plc_drv.h
deleted file mode 100644
index aec9036e14..0000000000
--- a/app/sm-emac-drv/inc/plc_drv.h
+++ /dev/null
@@ -1,701 +0,0 @@
-#ifndef PLC_DRV_H
-#define PLC_DRV_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#ifdef USE_OSEDEF_H
-#include "osedef.h"
-#endif
-#include "ethdev.h" /* Interface for ethernet device drivers. */
-#include "cpu.h" /* CPU specific definitions. */
-#include "board.con" /* Board specific configurations. */
-
-#include "platform.h"
-
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_test.h"
-#include "plc_vport.h"
-#include "tosv.h"
-#include "plc_ce.h"
-#include "list.h"
-#include "enermib.h"
-
-#define MAC_MTU 2048
-#define MAC_TX_RING_SIZE 128
-#define MAC_RX_RING_SIZE 128
-
-/* total number of slots allocated to one FD */
-#define MAC_FD_SLOTS 255
-
-/* offset from the heartbeat to the first field device */
-#define MAC_HB_OFFSET 20
-
-/* number of field devices */
-#define ENER_MAX_SLAVES 6
-
-struct slave_stats {
- int recv_pb;
- int recv_frame;
- int drop_frame;
-};
-
-struct emac_stats {
- int heartbeat;
-
- int mac_write_ok;
- int mac_write_nok;
- int mac_xmit_slices[PLCP_MAX_SLICES+1];
- int mac_recv_slices[PLCP_MAX_SLICES+1];
- int mac_recv_fec_ok[PLCP_MAX_SLICES+1];
- int mac_recv_fec_nok[PLCP_MAX_SLICES+1];
-
- int mac_alloc_recv_ok;
- int mac_alloc_recv_nok;
- int mac_recv_pb_ok;
- int mac_recv_pb_ok_fec;
- int mac_recv_pb_nok_fec;
- int mac_recv_slave_ok;
- int mac_recv_slave_nok;
- int mac_recv_bad_len;
-
- int mac_free_recv;
- int mac_drop_recv;
- int mac_drop_bad_frame_no;
- int mac_drop_incomplete;
-
- int mac_queue_recv;
- int mac_poll_recv;
-
- int plcp_write_pb_ok;
- int plcp_write_pb_nok;
- int plcp_write_ok;
- int plcp_write_nok;
- int plcp_xmit_done_ok;
- int plcp_xmit_done_nok;
-
- int plcp_recv_done;
- int plcp_queue_recv;
- int plcp_poll_recv_ok;
- int plcp_poll_recv_nok;
-
- int plcp_xmit_slices[PLCP_MAX_SLICES+1];
- int plcp_recv_slices[PLCP_MAX_SLICES+1];
-
-} ;
-
-/* for neighbour and vport */
-
-struct mac_addr
-{
- uint8_t addr[6];
-};
-
-#define SAME_MAC(A,B) (*((uint16_t*)A)==*((uint16_t*)B) && \
- *(((uint16_t*)A)+1)==*(((uint16_t*)B)+1) && \
- *(((uint16_t*)A)+2)==*(((uint16_t*)B)+2))
-/* driver name */
-
-#define PLC_DRV_NAME PLC_DDNAME
-
-/* Some words are not written to SDRAM by the FEC.
- * A workaround is to use a rx buffer in DPSRAM.
- * Once all slices have been received, the whole frame is copied in SDRAM.
- */
-
-/* #define PLC_SIMULATION */
-
-
-/* minimum stack size for interrupt service routine (ISR) */
-#define PLC_DRV_ISR_STACK_SIZE 1024
-
-/* PLC driver global */
-struct plc_drv {
- int units_started;
- int units_opened;
-};
-
-#define PLC_MAC_LOG_SZ 100
-struct plc_mac_log_noise {
- int16_t noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
- int8_t slots[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
- int agc;
-};
-
-struct plc_mac_log_sp {
- uint16_t gain_agc;
- uint16_t fft_gain[PMD_MAX_BANDS];
- int16_t real[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- int16_t imag[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- double amp[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
-};
-
-extern struct plc_mac_log_noise mac_log_noise[PLC_MAC_LOG_SZ];
-extern int noiseIndex;
-
-extern struct plc_mac_log_sp mac_log_sp[PLC_MAC_LOG_SZ];
-extern int spIndex;
-
-extern int max_gain_per_band[];
-
-/* nombre d'unité PLC au max */
-#define PLC_DRV_MAX_UNITS 1
-
-/* Ethernet link compatibility */
-#define MAXMACTYPES 10
-#define PLC_MAX_VPORTS (16)
-
-typedef enum
- {
- ad_hoc = 0,
- repeater = 1,
- station = 2
- } plc_if_mode_t;
-
-/* PLC driver unit */
-struct plc_drv_unit {
-
-/********************* données driver ****************************/
- bool polled; /* true if the device is in polled mode. */
- bool init; /* true if the device has been found and initialized */
- bool opened; /* true if the device is already opened by a client */
- bool started; /* true if the device is running */
-
- U32 failed_write; /* Number of failed write attempts since last TX */
- U32 failed_read; /* Number of failed read attempts since last RX */
-
- uint8_t mac_addr[6]; /* active MAC address */
- uint8_t TEI;
-
- uint32_t numEthTypes; /* Number of Ethernet types */
- uint16_t ethTypes[MAXMACTYPES]; /* Ethernet types */
-
- /* Client callback functions & object */
- struct DcFuncs dcFuncs;
- void *dcObj;
-
-/********************* données interface mode *********************/
- plc_if_mode_t mode;
- uint32_t level; // repeater level, 0 for the HE
-
- bool attached; // TO BE REMOVED: FOR TEST ONLY
- uint8_t station_addr[6]; // TO BE REMOVED: FOR TEST ONLY
-
-/********************* données plcp *******************************/
- int id; /* [0..7] */
- uint32_t used_bands;
- int nb_bands;
- int first_band;
-#ifdef SOFIA
- int together;
- int new_txFilter;
- int new_rxFilter;
- int new_shaker;
-#endif
-
- int control_modulation;
- int control_len;
- int control_symbols;
- int control_slots;
- int block_slots;
- int control_bits_per_band[PMD_MAX_BANDS];
-
- /* FEC slices */
- slice_t fec_valid_slices;
-
- struct {
- /* next rx/tx address for ROBUSTA frames*/
- uint16_t txstart_date;
- uint16_t rxstart_date;
- uint16_t busy_date;
- uint16_t idle_date;
- uint16_t txend_date;
- uint16_t rxend_date;
- uint16_t eof_date;
- uint16_t tmo_date;
-
- /* next rx/tx address for ROBUSTA frames*/
- struct {
- uint8_t *c_block_addr;
- int c_blocks;
- } tx;
- struct {
- uint16_t c_blocks;
- } rx;
-
- struct {
- uint16_t early_tx_start;
- uint16_t nb_calibrate;
- uint16_t nb_start;
- uint16_t nb_ref_head;
- uint16_t nb_control;
- uint16_t nb_wait_control;
- uint16_t n_slots;
- uint16_t n_drop_slots;
- uint16_t nb_wait_block;
- uint16_t rx_nb_eof;
- uint16_t tx_nb_eof;
- uint16_t ref_interval;
- uint16_t nb_periodic_ref;
- uint8_t vote;
- int fmode;
- int control_power;
- bool fcs;
- bool scramble;
- bool check_all_crc;
- } config;
- int state;
-
- } plcp;
-
-/******************* données MAC ************************************/
- /* addresse non alignées sur 32 bits */
-
- struct emac_conf emac;
-
- struct {
- int flags; /* type de service pour transmission */
- int period; /* period betweeen two channel request */
- int inter_step; /* space between two steps */
- int timeout; /* timeout pour la réponse */
- int tmo_kill; /* timeout before removing the host */
- int band_min; /* estimation minimum qui doit exister sur chaque bande */
- int max_slots; /* maximum size in slots of payload */
- int rafale_slots; /* number of slots used in rafale */
- int nb_ber_test; /* number of ber tests */
- int nb_sound; /* number of sound frames sent before update */
- int no_response; /* maximum no responses before link down */
- int nb_samples; /* number of samples to record */
- int max_mtu; /* fix maximum mtu to deliver hosts */
- int min_mtu; /* fix minimum mtu to deliver hosts */
- int pilots_threshold; /* choice between single pilots or double pilots */
- uint32_t origine; /* phlic start of mesures */
- uint32_t start_date; /* OS start date of mesures */
- bool power_on; /* ajust power on control depending of att */
- bool power_equ; /* power equalization between control and data */
- bool get_spectrum; /* record spectrum on every frame */
- bool steps[CE_NB_STEPS]; /* uesd step */
- uint8_t session; /* session number */
- uint8_t loopback; /* loopback to step noise */
- uint8_t nb_used_bands; /* default nb of used_bands */
- uint8_t unused_bands; /* default unused bands mask */
- uint16_t data_gain; /* gain used for data if autom_power disabled */
- } ce;
-
- struct {
- struct pmd_band_quality __rx_qual[PMD_MAX_BANDS];
- struct pmd_band_quality *rx_qual[PMD_MAX_BANDS];
- int nbits;
- int slices;
- uint8_t rx_bands;
- } ber;
-
- struct {
- bool started; /* can start or stop the protocol */
- int flags; /* type de service pour transmission */
- /* F_ACK: utilisation du canal fiable */
- int period; /* period betweeen two channel request */
- uint16_t tx_gain; /* gain courant utilisé pour faire les recherches */
- CANCEL_INFO timer;
- } neighbour;
-
-
- struct {
- bool started;
- bool autotest;
- bool ber;
- int ber_delay;
- int ber_tx_control_pattern;
- int ber_tx_payload_pattern;
- int ber_rx_control_pattern;
- int ber_rx_payload_pattern;
-
- int delay;
- int nb_frames;
- int d_len;
- int c_len;
- int host_id;
- int gain_begin;
- int gain_end;
- int gain_step;
- int index;
- int tx_gain;
- int payload_check;
- int flags;
-
- } test;
-
- struct pmd_unit *PMD;
-
- /*
- * Virtual Ports
- */
-
- struct plc_vport_unit *vports[PLC_MAX_VPORTS];
-
- /*
- * counters
- */
- struct {
-
- struct {
- /* informations générales sur le protocole */
- int nb_send_seek;
- int nb_send_found;
- int nb_recv_seek;
- int nb_recv_found;
- int nb_tx_failed;
- int q_full;
- int host_full;
- int no_host_free;
- int host_already_exist;
- } neighbour;
-
- struct {
- /* protocol messages logs */
- int nb_send_request;
- int nb_tmo_request;
- int nb_killed;
- int nb_cycle_error;
- int nb_send_reply;
- int nb_recv_request;
- int nb_recv_reply;
- int nb_send_frame;
- int nb_sent_success;
- int nb_sent_failed;
- int requeued_frame;
- int q_full;
- int channel_full;
- int id_full;
- int id_error;
- int corrupted_qual;
- int bad_step;
- int bad_session;
- int bad_current_id;
-
- /* spectrum mesures */
- double power;
- uint16_t gain_agc;
- uint16_t fft_gain[PMD_MAX_BANDS];
- int16_t real[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- int16_t imag[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- double amp[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
-
- /* signal noise mesures */
- uint16_t log_agc[LOG_SN_MAX];
- uint16_t log_fft[LOG_SN_MAX][PMD_MAX_BANDS];
- uint32_t log_date_off[LOG_SN_MAX];
-
- double avg_fft[PMD_MAX_BANDS];
- double log_sn[LOG_SN_MAX][PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- double avg_sn[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- double min_sn[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- double max_sn[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
-
- /* noise mesures */
- uint16_t noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
- /* temporary vars */
- struct pmd_band_quality quality[PMD_MAX_BANDS];
- uint16_t pilots[PMD_MAX_BANDS][2];
- uint16_t new_id1;
- uint16_t new_id2;
- uint16_t nb_slots;
- uint8_t unused_bands;
- uint8_t nb_used_bands;
- } ce;
-
- struct {
- int nb_writes;
- int nb_handle_tx_failed;
- int nb_handle_rx_failed;
- int nb_handle_tx;
- int nb_handle_rx;
- int e_bad_c_buf;
- int e_bad_d_buf;
-#define TEST_MAX_SCAN 16
- int nb_handle_rx2[PLC_MOD_MAX+1][TEST_MAX_SCAN+1];
- int agc_index;
- uint16_t tab_agc[NB_AGC_MEASURES];
- } test;
-
- struct {
- int handle_tx_data;
- int handle_tx_test;
- int handle_tx_ber;
- int handle_tx_sms;
- int handle_tx_channel;
- int handle_tx_probe;
-
- int handle_rx_data;
- int handle_rx_test;
- int handle_rx_ber;
- int handle_rx_sms;
- int handle_rx_channel;
- int handle_rx_probe;
-
- int handle_tx;
- int handle_tx_failed;
- int handle_rx;
- int handle_rx_failed;
- } drv;
-
- struct {
- int rx_pframe;
- int rx_duplicate;
- int retries;
- int too_many_retries;
- int rx_ack;
- int rx_data;
- int rx_udata;
- int rx_mngdata;
- int rx_unknown;
-#if 0
-#ifdef MAC_PARTIAL_RETRANSMISSION
- int short_retries;
- int ignored;
- int aborted;
-#endif
-#endif
- int early_rx_detect;
- int drop_rx_end;
- int write;
-
- int e_rx_bad_slice;
- int e_rx_bad_len;
- int e_rx_bad_header;
- int e_rx_alloc_frame;
- int e_rx_alloc_mem;
- int e_rx_alloc_ack;
- int e_rx_ack_id;
- int e_rx_ack_seqno;
- int e_rx_ack_state;
- int e_rx_no_frame;
- int e_tx_too_late;
- int e_tx_no_pframe;
- int e_tx_bad_len;
- int e_tx_bad_nha;
- int e_tx_empty_pframe;
- int e_tx_ack;
- int e_tx_end;
- int e_tx_oversize;
- int e_tx_cbuf_trunc;
- int e_tx_dbuf_trunc;
- int tx_queue_ack;
- int tx_queue_data;
- int tx_queue_udata;
- int tx_queue_token;
- int tx_queue_unknown;
- int sent_ack;
- int sent_data;
- int sent_udata;
- int sent_mngdata;
- int sent_token;
- int sent_unknown;
- int tmo_tx;
- int tmo_w_ack;
- int e_tx_bad_vport;
- int e_rx_bad_vport;
- } mac;
-
- struct {
- int busy_isr;
- int rx_start_isr;
- int rx_more_isr;
- int rx_data_isr;
- int rx_end_isr;
- int tx_start;
- int tx_more_isr;
- int tx_data_isr;
- int tx_end_isr;
- int tmo_isr1;
- int tmo_isr2;
- int eof_isr;
-
- int rx_valid_control; /* # of frames with valid PLCP control */
- int rx_invalid_control; /* # of frames without valid PLCP control */
- int valid_control[PMD_MAX_BANDS];
- int invalid_control[PMD_MAX_BANDS];
- int valid_block[PMD_MAX_BANDS];
- int invalid_block[PMD_MAX_BANDS];
-
- int band[PMD_MAX_BANDS];
- int valid_slice[PLCP_MAX_SLICES];
- int invalid_slice[PLCP_MAX_SLICES];
- int no_buffer;
- int rx_drop;
- int rx_control_bad_crc;
- int rx_control_bad_channel_id;
- int rx_control_bad_efr;
- int rx_control_bad_dlen;
- int rx_control_bad_clen;
- int rx_control_bad_slices;
- int rx_bad_payload;
- int bad_fcs;
- int e_rx_more;
- int bad_mac_address;
-
- /* fatal error events */
- int transmit_error;
- int busy_error;
- int tx_start_error;
- int rx_start_error;
- int rx_data_error;
- int tx_more_error;
- int tx_data_error;
- int tx_end_error;
- int rx_end_error;
- int tmo_drop_error;
-
- /* ignored events */
- int eof_ignored;
- int eof_error;
-
- int eof_at_tx_ctrl;
- int eof_at_tx_block;
- int eof_at_tx_data;
- int eof_at_rx_ctrl;
- int eof_fake_tx_end;
- int eof_at_state_rx_block;
- int eof_at_state_rx_data;
- int busy_at_state_drop;
-
-#ifdef FEATURE_ENERVATION
- int queue_xmit;
- int poll_xmit_already_sending;
- int poll_xmit_success;
- int poll_xmit_empty;
- int tx_end;
-#endif
- int head;
- int tail;
-
- struct {
- int state_source;
- int event;
- int state_destin;
- int ok;
- int date;
- } reg[PLCP_MAX_REG];
-
- int event[PLCP_NB_EVENT][PLCP_NB_STATE];
- } plcp;
-
- struct {
- int d_len; /* debug */
- int pattern; /* debug */
-
- int control_valid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- int control_invalid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- int payload_valid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
- int payload_invalid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
-
-#if 0
- int raw_slice_valid[PLCP_MAX_SLICES];
- int raw_slice_invalid[PLCP_MAX_SLICES];
- int raw_slice_viterbi[PLCP_MAX_SLICES];
- int raw_slice_rs[PLCP_MAX_SLICES];
-
- int good_slice[PLCP_MAX_SLICES];
- int bad_slice[PLCP_MAX_SLICES];
- int hw_good_slice[PLCP_MAX_SLICES];
- int hw_bad_slice[PLCP_MAX_SLICES];
- int hw_false_good_slice[PLCP_MAX_SLICES];
- int hw_false_bad_slice[PLCP_MAX_SLICES];
-#endif
- int samples;
-
- uint32_t hw_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
- uint16_t min_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
- uint16_t max_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
- uint32_t var_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
- int slice_valid[PLCP_MAX_SLICES];
- int slice_invalid[PLCP_MAX_SLICES];
- } ber;
-
- struct emac_stats emac;
- } stats;
-
- int ber_slots;
-};
-
-struct mac_frame {
- struct list_head link;
- struct plc_drv_unit *unit;
- char *buf;
- int len;
- int wlen;
- int pb_count;
- int frame_no;
- int pf_no;
- uint32_t pb_mask;
- int sar_count;
- uint32_t sar_mask;
-};
-
-struct mac_mode {
- char *name;
- struct plcp_callbacks callbacks;
- int (*__open)(struct plc_drv_unit *unit);
- int (*__start)(struct plc_drv_unit *unit);
-};
-
-struct mac_slave {
- int slave_no;
- struct mac_frame *sar_mframe;
- struct slave_stats stats;
-};
-
-struct pb_desc {
- uint32_t len : 8; /* [0..220] */
- uint32_t slave_no : 8;
- uint32_t frame_no : 6;
- uint32_t pf_no : 2;
- uint32_t pb_count : 4;
- uint32_t pb_no : 4;
-};
-
-#define PB_PAYLOAD_SIZE 220
-struct pb {
- struct pb_desc desc;
- char payload[PB_PAYLOAD_SIZE];
-};
-
-
-extern struct plc_drv_unit units[PLC_DRV_MAX_UNITS];
-extern struct plc_drv_unit *plc_drv_get_unit(int id);
-
-extern void
-drv_handle_tx(struct plc_drv_unit *unit, struct plcp_host *host,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags, bool failed);
-
-extern void
-drv_handle_rx(struct plc_drv_unit *unit, struct plcp_host *host,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags, bool failed);
-
-/*
- * useful macros to display IEEE802 MAC addresses
- * example: printf("DA = "IEEE802_FMT"\n", DA);
- */
-#define IEEE802_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define IEEE802_VAL(mac) \
- (mac)[0], (mac)[1], (mac)[2], (mac)[3], (mac)[4], (mac)[5]
-
-extern SEMAPHORE *mac_lock_sem;
-extern SEMAPHORE *ce_lock_sem;
-extern SEMAPHORE *nd_lock_sem;
-extern void drv_lock(struct plc_drv_unit *unit);
-extern void drv_unlock(struct plc_drv_unit *unit);
-
-#define drv_alloc malloc
-#define drv_free free
-
-#endif /* PLC_DRV_H */
diff --git a/app/sm-emac-drv/inc/plc_mac.h b/app/sm-emac-drv/inc/plc_mac.h
deleted file mode 100644
index 35905820ed..0000000000
--- a/app/sm-emac-drv/inc/plc_mac.h
+++ /dev/null
@@ -1,342 +0,0 @@
-#ifndef MAC_H
-#define MAC_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-#include "platform.h"
-
-/*--------------------------------- FRAME TYPES and SUBTYPES ---------------------------------------*/
-
-/* MAC TYPE (see cac header) */
-#define MA_TYPE_CONTROL 0
-#define MA_TYPE_DATA 1
-#define MA_TYPE_MANAGEMENT 2
-
-/* MAC SUBTYPE (see cac header) */
-
-/* => control */
-#define MA_SUBTYPE_RTS 0
-#define MA_SUBTYPE_CTS 1
-#define MA_SUBTYPE_ACK 2
-#define MA_SUBTYPE_BEACON 3
-#define MA_SUBTYPE_CFEND 4
-
-/* => data */
-#define MA_SUBTYPE_AD_HOC 5
-#define MA_SUBTYPE_INTRA_CELL 6
-#define MA_SUBTYPE_INTER_CELL 7
-#define MA_SUBTYPE_NULL 8
-
-/* => management */
-#define MA_SUBTYPE_ASSOCIATION 9
-#define MA_SUBTYPE_TEST 10
-#define MA_SUBTYPE_BER 11
-#define MA_SUBTYPE_SMS 12
-#define MA_SUBTYPE_PROBE 13
-#define MA_SUBTYPE_CHANNEL 14
-
-
-/* suntype macros */
-#define IS_UNICAST(pframe) ((pframe->cac->DA[0] & 1)==0)
-#define IS_BROADCAST(pframe) ((pframe->cac->DA[0] & 1)!=0)
-
-/* mac header flags */
-#define MA_BIT_RETRY 1
-#define MA_BIT_CFPOLL 2
-#define MA_BIT_CFACK 4
-#define MA_BIT_NEEDACK 8
-
-
-
-#if !defined(FEATURE_CCO) // old access layer
-
-#define MAC_TMO_TOKEN 10 /* ms */
-#define MAC_MODE_FREE 0
-#define MAC_MODE_TOKEN 1
-
-#endif
-
-
-#ifdef FEATURE_ENERVATION
-#include "enermac.h"
-#else
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "pkt_log_if.h"
-#include "ose.h"
-#include "mac_timer.h"
-#include "mac_frame.h"
-
-struct mac_header {
- uint8_t type;
- uint8_t id;
- uint8_t seqno;
- uint8_t retry;
- uint16_t len; /* payload len (without header) = c_len + d_len */
- uint8_t TEI;
- uint8_t pad;
- uint32_t crc;
-};
-extern uint32_t crc32(unsigned char *message, int len);
-
-static INLINE uint32_t mac_crc(struct mac_header *header) {
- return crc32((unsigned char *)header, sizeof(struct mac_header) - 4);
-}
-
-#define MAC_PAYLOAD_CSIZE (PLCP_PAYLOAD_CSIZE-MAC_HEADER_SIZE)
-#define MAC_HEADER_SIZE (sizeof(struct mac_header))
-#define MAC_PAYLOAD_DSIZE (PLCP_PAYLOAD_SIZE-MAC_HEADER_SIZE)
-
-/*--------------------------------- PROTOCOL DATA ---------------------------------------*/
-
-// #define CSMA_SPEED
-
-struct tasklet {
- void (*handler)(void *arg1, void *arg2);
- void *arg1;
- void *arg2;
- struct list_head link;
-};
-
-extern struct pkt_log mac_plog;
-extern void mac_queue_tasklet(void (*handler)(void *, void *), void *arg1, void *arg2);
-extern void mac_set_qsize(int prio, int size);
-
-extern DevErr mac_init(void);
-extern DevErr mac_open(struct plc_drv_unit *unit);
-extern DevErr mac_start(struct plc_drv_unit *unit);
-extern void mac_handle_tx(struct plc_drv_unit *unit, struct mac_frame *frame, int status);
-extern int mac_snapshot(char *buffer);
-extern int mac_access_snapshot(char *buffer);
-extern void mac_restart(struct plc_drv_unit *unit);
-extern void mac_print_header(struct mac_header *header);
-
-extern DevErr mac_write(struct plc_drv_unit *unit, uint8_t *DA, uint8_t *d_buf, int d_len, int subtype, int flags, int prio, uint8_t TEI);
-extern DevErr mm_write(struct plc_drv_unit *unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, int subtype, int flags, int prio);
-
-extern void mac_start_tmo_token(struct plc_drv_unit *unit);
-extern void mac_stop_tmo_token(struct plc_drv_unit *unit);
-extern void __mac_debug_frame(char *s, struct mac_frame *frame);
-#define mac_debug_frame(s,frame) __mac_debug_frame(s,frame)
-
-
-/* constantes */
-#define MAC_TMO_TX 20 /* ms */
-#define MAC_TTL 10 /* rx frame logical time to live */
-#define MAC_MAX_RETRIES 20
-#define MAC_TMO_W_ACK 20 /* ms */
-
-#define SEND_FAILED 1
-#define SEND_DONE 0
-
-
-#ifdef FEATURE_ENERVATION
-#define MAC_RX_RING_SIZE 64
-#define MAC_TX_RING_SIZE 64
-#else
-
-#define MAC_TASKLETS 128
-/* priority used for mac_write or mm_write */
-#define MAC_PRIO_MMDU_SIZE 10
-#define MAC_PRIO_MSDU_SIZE 54
-#define MAC_PRIO_MMDU 0
-#define MAC_PRIO_MSDU 1
-#define PLC_PRIO_MAX 2 /* prio must be in [0..PLC_PRIO_MAX] */
-#define PLC_HOST_MAX 5 /* 0 is the broadcast host */
-#define MAC_TX_RING_SIZE (MAC_PRIO_MMDU_SIZE + MAC_PRIO_MSDU_SIZE)
-
-#if (MAC_TX_RING_SIZE>64)
-#error MAX_TX_RING_SIZE must be <= 64 (because of id on 6 bits)
-#endif
-
-#define MAC_RX_RING_SIZE MAC_TX_RING_SIZE
-#endif
-
-#define get_data_seqno(seqno) ((uint8_t)(seqno & 0x0f))
-#define get_ack_seqno(seqno) ((uint8_t)((seqno >> 4) & 0x0f))
-#define set_data_seqno(seqno, data_seqno) (seqno=(uint8_t)((seqno & 0xf0) + (data_seqno & 0x0f)))
-#define set_ack_seqno(seqno, ack_seqno) (seqno=(uint8_t)((seqno & 0x0f) + ((ack_seqno << 4) & 0xf0)))
-
-
-
-/*--------------------------------- PROTOCOL CONTROL ---------------------------------------*/
-#if defined(FEATURE_CCO)
-
-/* default interframe spaces */
-
-#ifdef SP_SFK_WIN32
-#define MAC_CSMA_SIFS 0 /* Short Interframe Space */
-#define MAC_CSMA_RIFS 50 /* Response InterFrame Space */
-#define MAC_CSMA_TRESP 100 /* Response InterFrame Space */
-#define MAC_CSMA_DIFS 50 /* Distributed Interframe Space */
-#define MAC_CSMA_PIFS 50 /* Point coord Interframe Space */
-#define MAC_CSMA_TS 10
-#define MAC_CSMA_EIFS 50 /* Extended Interframe Space */
-#else
-
-#ifndef OS_DEBUG
-#define MAC_CSMA_SIFS 0 /* Short Interframe Space */
-#define MAC_CSMA_RIFS 25 /* Response InterFrame Space */
-#define MAC_CSMA_TRESP 40 /* Response InterFrame Space */
-#define MAC_CSMA_DIFS 40 /* Distributed Interframe Space */
-#define MAC_CSMA_PIFS 25 /* Point coord Interframe Space */
-#define MAC_CSMA_EIFS 200 /* Extended Interframe Space */
-#define MAC_CSMA_TS 8
-#else
-#define MAC_CSMA_SIFS 0 /* Short Interframe Space */
-#define MAC_CSMA_RIFS 23 /* Response InterFrame Space */
-#define MAC_CSMA_TRESP 45 /* Response InterFrame Space */
-#define MAC_CSMA_PIFS 23 /* Point coord Interframe Space */
-#define MAC_CSMA_DIFS 31 /* Distributed Interframe Space */
-#define MAC_CSMA_EIFS 200 /* Extended Interframe Space */
-#define MAC_CSMA_TS 20
-#endif
-#endif /* SP_SFK_WIN32 */
-
-#ifndef softOSE
-#define MAC_ACCESS_LIMIT 300 /* 300 ms */
-#else
-#define MAC_ACCESS_LIMIT 3000 /* 3 s */
-#endif
-
-/* default protocol control parameters */
-#define MAC_CSMA_CWMIN 0
-#define MAC_CSMA_CWMAX 8
-#define MAC_CSMA_RETRIES 10
-#define MAC_CSMA_TMO_MIN 3
-#define MAC_CSMA_TMO_MAX 300
-
-#ifdef SP_SFK_WIN32
-#define MAC_CSMA_CFP_MAX_DURATION 7000 // must be less than BEACON_INTERVAL
-#define MAC_CSMA_BEACON_INTERVAL 10000 // should be power of 2
-#else
-#define MAC_CSMA_CFP_MAX_DURATION 470 // must be less than BEACON_INTERVAL
-#define MAC_CSMA_BEACON_INTERVAL 500
-#endif
-
-#define SAP_QUEUE_SIZE 2
-#define IN_QUEUE_SIZE 5
-
-/* protocol data mode */
-#define MASTER_MODE 0
-#define FREE_MODE 1
-#define SLAVE_MODE 2
-
-#define MAC_CSMA_CF_DELAY 0
-
-#endif /* FEATURE_CCO */
-
-
-/* CID used for broadcast */
-#ifdef softOSE
-#define MAC_BROADCAST_CHANNEL 1 /* bpsk */
-#else
-#define MAC_BROADCAST_CHANNEL 7 /* robuste qpsk */
-#endif
-
-/* 5 mots de 32 bits */
-struct plcp_frame;
-extern int mac_access_init(void);
-extern int mac_access_open(struct plc_drv_unit *unit);
-extern int mac_access_start(struct plc_drv_unit *unit);
-extern int mac_access_write(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern struct plcp_host* mac_host_lookup(struct plc_drv_unit *unit, uint8_t *dstEthAddr);
-extern void mac_handle_tx_end(struct plc_drv_unit *unit, struct plcp_frame *pframe, int status);
-extern void mac_handle_rx_end(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-
-static INLINE uint16_t cac_crc(uint32_t * cac)
-{
- return (cac[0]+cac[1]+cac[2]+cac[3]);
-}
-
-/* allocate a signal buffer */
-union SIGNAL *sig_alloc(int sigNo);
-
-/* allocate a signal buffer */
-void sig_free(union SIGNAL *sig);
-
-
-/*--------------------------------- MAC DEBBUG ---------------------------------------*/
-
-#define MAC_MAX_REG 4096
-
-#define MAC_STATUS_ERROR 2
-#define MAC_STATUS_IGNORED 1
-#define MAC_STATUS_OK 0
-
-struct history {
- int head;
- int tail;
-
- struct {
- PROCESS sender;
- PROCESS receiver;
- int date;
- int state;
- int sig;
- int status;
- }
- reg[MAC_MAX_REG];
-};
-
-struct perf {
- int head;
- int tail;
-
- struct {
- uint16_t dlen;
- uint16_t retries;
- uint16_t in_date;
- uint16_t out_date;
- uint8_t dest_addr;
- }
- reg[MAC_MAX_REG];
-};
-
-
-#ifdef CSMA_SPEED
-/* no trace of mac_register_event */
-#define mac_register_event(state, sig, status) do; while(0)
-#define mac_register_perf(DA, in_date, dlen, retries) do; while(0)
-#define csma_stats(x)
-#else
-extern void mac_register_event(int state, union SIGNAL *sig, int status);
-extern void mac_register_perf(uint8_t DA, uint16_t in_date, uint16_t dlen, uint16_t retries);
-#define csma_stats(x) x
-#endif // CSMA_SPEED
-
-extern PROCESS tx_coordination_;
-extern PROCESS rx_coordination_;
-extern PROCESS backoff_procedure_; // virtual process (equal to channel_state_)
-extern PROCESS mac_poll_process_;
-extern PROCESS cco_;
-extern PROCESS ose_tosv_;
-extern PROCESS channel_state_;
-
-int shell_mngt_start(int argc, char **argv);
-int shell_mngt_stop(int argc, char **argv);
-int shell_display_history(int argc, char *argv[]);
-int shell_display_perf(int argc, char *argv[]);
-
-/* number of states per proccess */
-#define RX_COORD_STATES (2)
-#define TX_COORD_STATES (9)
-#define BP_STATES (4)
-#define CS_STATES (5)
-#define CCO_STATES (5)
-
-
-/* offset for states */
-#define RX_COORD_OFFSET (0)
-#define TX_COORD_OFFSET (RX_COORD_OFFSET + RX_COORD_STATES)
-#define BP_OFFSET (TX_COORD_OFFSET + TX_COORD_STATES)
-#define CS_OFFSET (BP_OFFSET + BP_STATES)
-#define CCO_OFFSET (CS_OFFSET + CS_STATES)
-
-extern void mac_lock(struct plc_drv_unit *unit);
-extern void mac_unlock(struct plc_drv_unit *unit);
-
-#endif /* FEATURE_ENERVATION */
-#endif /* MAC_H */
-
-
diff --git a/app/sm-emac-drv/inc/plc_neighbour.h b/app/sm-emac-drv/inc/plc_neighbour.h
deleted file mode 100644
index bc6b7a6fab..0000000000
--- a/app/sm-emac-drv/inc/plc_neighbour.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef PLC_NEIGHBOUR_H
-#define PLC_NEIGHBOUR_H
-
-#include "plc_drv.h"
-
-/* probing must be used only for ad-hoc mode */
-
-struct NeighbourTimer
-{
- SIGSELECT sig_no;
- struct plc_drv_unit *unit;
-};
-
-
-struct NeighbourCmd
-{
- SIGSELECT sig_no;
- struct plc_drv_unit *unit;
-};
-
-
-struct NeighbourRecv
-{
- SIGSELECT sig_no;
- struct plc_drv_unit *unit;
- struct plcp_host *host;
- int event;
- uint8_t *c_buf;
- uint16_t c_len;
- uint8_t *d_buf;
- uint16_t d_len;
- bool failed;
-};
-
-/* HEADER */
-struct neighbour_header
-{
- uint8_t type; /* SEEK or FOUND */
- uint8_t nb_bands; /* nb used bands */
- uint8_t used_bands; /* mask of used bands */
- struct mac_addr srcEthAddr; /* adresse ethernet de l'emetteur */
- plc_if_mode_t mode; /* mode of transmitter */
- uint32_t level; /* repeater level */
-};
-
-/* FRAMES */
-struct neighbour_seek
-{
- struct neighbour_header head;
- int nb_neighbour;
- struct mac_addr list[1]; /* list des voisins */
-};
-
-struct neighbour_found
-{
- struct neighbour_header head;
-};
-
-#define MAC_ADDR_SIZE (sizeof(struct mac_addr))
-#define NEIGHBOUR_HEADER_LEN (sizeof(struct neighbour_header))
-#define NEIGHBOUR_BUF_SIZE (sizeof(struct neighbour_seek) + PLCP_MAX_HOST*MAC_ADDR_SIZE)
-#define NEIGHBOUR_DEFAULT_PERIOD 2000 /* 2 secondes */
-#define NEIGHBOUR_DEFAULT_GAIN 0x300
-
-/* fonctions publiques */
-
-void neighbour_init(struct plc_drv_unit * unit);
-void neighbour_reset(struct plc_drv_unit * unit);
-int neighbour_start(struct plc_drv_unit * unit);
-int neighbour_stop(struct plc_drv_unit * unit);
-void neighbour_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-void neighbour_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host, uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-
-/* commandes shell */
-int neighbour_set_gain(struct plc_drv_unit * unit, uint16_t gain);
-void neighbour_stats(struct plc_drv_unit * unit);
-void neighbour_conf(struct plc_drv_unit * unit);
-
-#endif /* PLC_NEIGHBOUR_H */
diff --git a/app/sm-emac-drv/inc/plc_param.h b/app/sm-emac-drv/inc/plc_param.h
deleted file mode 100644
index 3349fe29e9..0000000000
--- a/app/sm-emac-drv/inc/plc_param.h
+++ /dev/null
@@ -1,66 +0,0 @@
-PLC_PARAM(int, plcp_log_level, 0, "")
-PLC_PARAM(int, plcp_save, 1, "")
-PLC_PARAM(int, delta_efr, 0, "")
-PLC_PARAM(int, delta_rpr, 0, "")
-PLC_PARAM(int, delta_srr, 0, "")
-PLC_PARAM(int, eifs_on_ack_miss, 1, "")
-#ifndef softOSE
-PLC_PARAM(int, enable_fast_ack, 1, "")
-PLC_PARAM(int, enable_tx_start_imm, 1, "")
-#else
-PLC_PARAM(int, enable_fast_ack, 0, "")
-PLC_PARAM(int, enable_tx_start_imm, 0, "")
-#endif
-PLC_PARAM(int, max_mega, PLCP_PAYLOAD_DSIZE, "")
-PLC_PARAM(int, force_default_efr, 0, "")
-PLC_PARAM(int, force_tx_cid, 0, "")
-
-/* DEBUG FLAGS: should always be OFF */
-PLC_PARAM(int, skip_rx_end, 0, "")
-PLC_PARAM(int, skip_eof, 0, "")
-PLC_PARAM(int, skip_dcAlloc, 0, "")
-PLC_PARAM(int, skip_memcpy, 0, "")
-PLC_PARAM(int, skip_ddHandleRX, 0, "")
-PLC_PARAM(int, force_alloc_size, 0, "")
-
-PLC_PARAM(int, early_ifs, 0, "")
-
-PLC_PARAM(int, bridge_offset, 0, "")
-PLC_PARAM(int, only_start, 1, "")
-
-PLC_PARAM(int, force_tmo, 0, "tmo")
-PLC_PARAM(int, force_rsr, 1, "ref space")
-
-PLC_PARAM(int, mac_drop_idle, 0, "")
-PLC_PARAM(int, mac_drop_rx_end, 0, "")
-PLC_PARAM(int, mac_drop_eof, 0, "")
-
-PLC_PARAM(int, bypass_drv, 1, "bypass ddSignal and stuff...")
-
-PLC_PARAM(int, plcp_drop_busy, 0, "")
-PLC_PARAM(int, plcp_drop_rx_start, 0, "")
-PLC_PARAM(int, plcp_drop_idle, 0, "")
-PLC_PARAM(int, plcp_drop_rx_end, 0, "")
-PLC_PARAM(int, plcp_drop_eof, 0, "")
-PLC_PARAM(int, plcp_drop_tx_more, 0, "")
-PLC_PARAM(int, plcp_drop_tx_end, 0, "")
-PLC_PARAM(int, plcp_drop_tmo, 0, "")
-PLC_PARAM(int, plcp_drop_tmo1, 0, "")
-PLC_PARAM(int, plcp_drop_tmo2, 0, "")
-PLC_PARAM(int, update_chmr, 0, "")
-PLC_PARAM(int, update_pilots, 0, "")
-PLC_PARAM(int, no_drop, 0, "never drop a frame (always get an rx_end)")
-PLC_PARAM(int, no_drop_symbols, 80, "payload symbols (when not dropping)")
-PLC_PARAM(int, no_drop_efr, 100, "EFR (when not dropping)")
-PLC_PARAM(int, no_drop_slices, 3, "slices (when not dropping)")
-
-PLC_PARAM(int, band_stats, 0, "Enable stat calculation/display on all bands")
-PLC_PARAM(int, plc_logNoiseOn, 0, "Enable log of Noise/spectrum")
-PLC_PARAM(int, pilots_gap, 20, "minimum gap between pilots")
-PLC_PARAM(int, use_avg_sn, 0, "use average sn for pilots mesures")
-
-PLC_PARAM(int, tx_master, 0, "mac transmit if in master mode")
-PLC_PARAM(int, tx_slave, 1, "mac transmit if in slave mode")
-PLC_PARAM(int, force_ctrl_slots, 0, "force number of control slots")
-PLC_PARAM(int, force_clen, 0, "force arabica size")
-
diff --git a/app/sm-emac-drv/inc/plc_plcp.h b/app/sm-emac-drv/inc/plc_plcp.h
deleted file mode 100644
index 9bbd2b7f6f..0000000000
--- a/app/sm-emac-drv/inc/plc_plcp.h
+++ /dev/null
@@ -1,507 +0,0 @@
-#ifndef PLCP_H
-#define PLCP_H
-
-#include "platform.h"
-#include "plc_pmd.h"
-#include "tosv.h"
-#include "list.h"
-
-#define PLCP_MAX_SLICES 256
-#define PLCP_PAYLOAD_SIZE (PLCP_MAX_SLICES*PMD_SLICE_SIZE)
-
-#ifdef FEATURE_ENERVATION
-#define PLCP_TX_SLICE_INTERVAL (PLCP_MAX_SLICES*2) /* no interrupt */
-#define PLCP_RX_SLICE_INTERVAL (PMD_MAX_SLICES/2)
-#else
-#define PLCP_TX_SLICE_INTERVAL 16
-#define PLCP_RX_SLICE_INTERVAL (PMD_MAX_SLICES/2)
-#endif
-
-/* data sent in control format */
-#define PLCP_BLOCK_PAYLOAD_SIZE 28
-struct plcp_block {
- uint32_t payload[PLCP_BLOCK_PAYLOAD_SIZE/4];
- uint32_t crc;
-};
-
-#define PLCP_BLOCK_SIZE (sizeof(struct plcp_block))
-#define PLCP_MAX_BLOCKS 32 /* up to 32*28=896 bytes of payload */
-
-#define PLCP_PAYLOAD_CSIZE (PLCP_BLOCK_PAYLOAD_SIZE*PLCP_MAX_BLOCKS)
-#define PLCP_PAYLOAD_DSIZE PLCP_PAYLOAD_SIZE
-
-
-extern struct list_head plcp_tx_free_queue;
-extern struct list_head plcp_rx_free_queue;
-extern struct list_head plcp_tx_queue;
-extern struct list_head plcp_tx_done_queue;
-extern struct list_head plcp_rx_queue;
-extern SEMAPHORE *plcp_tx_queue_sem;
-
-#define LOG_SN_MAX 2000
-#define LOG_SOUND_MAX 512 /* MUST BE power of 2 */
-
-#define PLCP_VALID_SLICE 0x8000 /* Just one bit set to 1 */
-
-#if 0
-#define F_MORE_BLOCK 0x8000
-#define F_FIRST_BLOCK 0x4000
-
-/* after folding the sum, we get a 9 bits value */
-#define PLCP_FOLD_SUM(sum) ((( sum >> 8 ) + (sum & 0x00ff) ) ^ 0x00a0)
-
-#define PLCP_CRC(flags_crc) (flags_crc & 0x0fff)
-#define PLCP_FLAGS(flags_crc) (flags_crc & 0xf000)
-#endif
-
-
-typedef struct pb_set {
- int dword [(PLCP_MAX_SLICES+31)/32];
-} pb_set;
-#define PB_SET(n,p) ((p)->dword[(n)/32] |= (1 << ((n) % 32)))
-#define PB_CLR(n,p) ((p)->dword[(n)/32] &= ~(1 << ((n) % 32)))
-#define PB_ISSET(n,p) ((p) ->dword[(n)/32] & (1 << ((n) % 32)))
-#define PB_ZERO(p) memset((char *) (p), (char) 0, sizeof (*(p)))
-#define PB_ONE(p) memset((char *) (p), (char) 0xff, sizeof (*(p)))
-
-struct cac_header
-{
- uint8_t type;
- uint8_t flags;
- uint8_t subtype;
- uint8_t seqno;
- uint8_t STEI; // Source Terminal Equipement Identifier
- uint8_t DTEI; // Destination Terminal Equipement Identifier
- uint8_t DA[6];
- uint8_t SA[6];
-};
-
-
-/*
- * PLCP control must be 32-bit aligned for performance, and to ensure
- * correct 32-bit operations.
- */
-struct plcp_control {
- /* DEV_TEI */
- uint8_t TEI; // terminal equipement identifier
- uint8_t channel_id; // tone map index
- uint16_t clen;
- uint16_t dlen;
- uint8_t efr;
- uint8_t slices;
- struct cac_header cac; // needed to have the good control buffer size in pool
- uint32_t crc;
-};
-
-struct plcp_frame {
- int no; /* frame number */
- uint8_t drop;
- uint8_t ack;
- uint8_t retry;
- uint8_t TEI;
- uint16_t c_len;
- uint16_t d_len;
- struct plcp_control *control;
- /* DEV_TEI */
- uint16_t *channel_id; /* REMOVEME cause ugly. Permits CE changes */
- uint8_t *c_buf;
-
- uint8_t *head; /* beginning of allocated space */
- uint8_t *d_buf; /* beginning of valid octets */
-
- pb_set pb_mask;
- int pb_errors;
-
- uint16_t mreq_date;
- /*
- * bands used for RX (can be lower than used bands if first bands missed
- * the START symbol)
- */
- uint8_t rx_bands;
- int nb_rx_bands;
- struct plcp_uchannel *uchannel;
- uint16_t data_gain; /* TX only */
- uint16_t ctrl_gain; /* only fr control */
-
- struct list_head link; /* for chaining in PLCP queues */
- struct {
- bool is_tx_frame;
- } debug;
- struct cac_header *cac;
-
- int pb_count; /* number of useful slices */
- int pb_done_dma; /* number of slices transfered by DMA */
-
-#ifndef FEATURE_ENERVATION
- int flags;
- int prio; /* [0..PLC_PRIO_MAX] 0 is highest*/
- int type;
- int subtype;
- int mtu;
- int nb_retries;
- int seqno;
-
- struct list_head mac_frames; /* list of contained mac frames */
- struct list_head inq; /* mac access input queue */
- struct plcp_host *host;
- uint8_t NHA[6]; /* next hop destination address */
- uint8_t PHA[6]; /* previous hop source address */
-
- SEMAPHORE *sem;
-#else
- int frame_count; /* number of mac frames */
- int state;
-#define PF_IDLE 0
-#define PF_XMIT 1
-
-#endif /* FEATURE_ENERVATION */
-};
-
-struct plcp_regs {
- struct plcp_frame *rx_ring;
- struct plcp_frame *tx_ring;
- uint32_t rx_ring_size;
- uint32_t tx_ring_size;
-};
-
-struct plc_drv_unit;
-
-struct plcp_callbacks {
- void (*tx_end)(struct plc_drv_unit *unit, struct plcp_frame *frame);
- void (*busy)(struct plc_drv_unit *unit);
- void (*rx_start)(struct plc_drv_unit *unit, struct plcp_frame *frame);
- void (*rx_end)(struct plc_drv_unit *unit, struct plcp_frame *frame);
- void (*eof)(struct plc_drv_unit *unit);
- void (*tmo)(struct plc_drv_unit *unit);
- void (*rx_drop)(struct plc_drv_unit *unit);
- void (*tx_status)(struct plc_drv_unit *unit, struct plcp_frame *frame);
-};
-
-extern struct plcp_callbacks *plcp_callbacks_fn;
-
-#define PLCP_CID_NONE 0
-#define PLCP_CID_BPSK 1
-#define PLCP_CID_QPSK 2
-#define PLCP_CID_QAM16 3
-#define PLCP_CID_QAM64 4
-#define PLCP_CID_QAM256 5
-#define PLCP_CID_OPTIMAL 6
-#define PLCP_NB_PREFIXED_CHANNEL 7
-
-#define PLCP_MAX_CHANNEL_ID 128
-#define PLCP_MAX_UCHANNEL 32
-#define PLCP_MAX_HOST 16
-#define PLCP_DEFAULT_OGAIN 0x100
-#define PLCP_DEFAULT_CHANNEL_ID 0
-#define PLCP_ID_NOT_DEFINED PLCP_MAX_CHANNEL_ID
-#define PLCP_MAX_SLOTS 200
-#define PLCP_MAX_REG 128
-
-#define PLCP_STATE_IDLE 0
-#define PLCP_STATE_TX_REQ 1
-#define PLCP_STATE_TX_CTRL 2
-#define PLCP_STATE_TX_BLOCK 3
-#define PLCP_STATE_TX_DATA 4
-#define PLCP_STATE_RX_CTRL 5
-#define PLCP_STATE_RX_BLOCK 6
-#define PLCP_STATE_RX_DATA 7
-#define PLCP_STATE_DROP 8
-#define PLCP_STATE_DROP_DATA 9
-#define PLCP_NB_STATE 10
-
-#define PLCP_EVENT_TX_START 0
-#define PLCP_EVENT_TX_MORE 1
-#define PLCP_EVENT_TX_DATA 2
-#define PLCP_EVENT_TX_END 3
-#define PLCP_EVENT_BUSY 4
-#define PLCP_EVENT_RX_START 5
-#define PLCP_EVENT_RX_DATA 6
-#define PLCP_EVENT_RX_END 7
-#define PLCP_EVENT_EOF 8
-#define PLCP_EVENT_TMO_DROP 9
-#define PLCP_EVENT_START_TMO 10
-#define PLCP_EVENT_STOP_TMO 11
-#define PLCP_EVENT_TMO_MAC 12
-#define PLCP_NB_EVENT 13
-
-
-/* payload modes */
-#define PLCP_MODE_CONTROL 0 /* no payload */
-#define PLCP_MODE_FEC 1 /* payload with FEC*/
-#define PLCP_MODE_ROBUST_FEC 2 /* payload with FEC, with redundancy on each */
-#define PLCP_MODE_3FEC 3 /* payload with FEC, with redundancy (3x) */
-#define PLCP_NB_MODE 4
-
-/* unidirectionnal channel (rx or tx) */
-struct plcp_uchannel_ops;
-
-struct plcp_uchannel
-{
- int mode; /* PLCP_MODE_FEC or PLCP_MODE_ROBUST_FEC */
-
- /* qualité du canal */
- struct pmd_band_quality quality[PMD_MAX_BANDS];
-
- /* pilotes utilisés pour le loopkup */
- uint16_t pilots[PMD_MAX_BANDS][2];
- int bits_per_band[PMD_MAX_BANDS];
- /*
- * given the slice count, we get the EFR and number of symbols
- * using the following lookup tables.
- */
- struct {
- uint16_t payload_slots[PLCP_MAX_SLICES+1];
- uint16_t periodic_ref_slots[PLCP_MAX_SLICES+1];
- /* int nb_slices_max; */
- int bits_per_slot;
- } lookup;
-
- uint8_t nb_used_bands;
- uint8_t unused_bands;
-
- struct plcp_uchannel_ops *ops;
- int index; /* index de position */
- bool used;
-
-};
-
-struct plcp_uchannel_ops {
- int (*check_control)(struct plc_drv_unit *, struct plcp_frame *);
- void (*build_lookup)(struct plc_drv_unit *, struct plcp_uchannel *);
- int (*mtu)(struct plc_drv_unit *, struct plcp_uchannel *, int);
- int (*tx_start)(struct plc_drv_unit *, struct plcp_frame *);
- int (*tx_data)(struct plc_drv_unit *, struct plcp_frame *);
- int (*rx_start)(struct plc_drv_unit *, struct plcp_frame *);
- int (*rx_more)(struct plc_drv_unit *, struct plcp_frame *);
- int (*rx_data)(struct plc_drv_unit *, struct plcp_frame *);
- int (*rx_end)(struct plc_drv_unit *, struct plcp_frame *);
-};
-
-extern struct plcp_uchannel_ops plcp_uchannel_ops[PLCP_NB_MODE];
-
-/* informations concernant un destinataire */
-struct plcp_host
-{
- /* -------------------- host information -------------------------------- */
- uint8_t mac_addr[6]; /* mac address */
- uint8_t BSSID; /* identify the bssid of the host (for intra-cell communication) */
- uint8_t TEI; /* identify the host in the network */
- int att; /* average attenuation of the link */
- double glomer; /* average noise on the link */
-
- /*--------------------- transmission parameters -------------------------- */
- uint16_t id; /* remote tone map index of the current frame in transmit */
- uint16_t data_gain; /* gain de transmit */
- uint16_t ctrl_gain; /* only fr control */
- struct plcp_uchannel * uchannel; /* tone map information */
- double snr; /* average snr on the link */
- uint16_t mtu; /* maximum transmit unit for this channel */
- uint16_t max_slots; /* nombre de slots à envoyer au maximum */
-
- uint16_t pil_signal[PMD_MAX_BANDS][2]; /* signal received on pilots */
-
- /*--------------------- reception parameters -------------------------- */
- uint8_t id1; /* identifiant 1 en reception */
- uint8_t id2; /* identifiant 2 en reception */
- uint8_t id3; /* identifiant 2 en reception */
-
- /*---------------------- history of the measures --------------------------*/
- uint32_t log_time[LOG_SOUND_MAX];
- uint16_t log_noise[LOG_SOUND_MAX][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // log remod noise for each sample
- int ber_valid[LOG_SOUND_MAX][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // log nb invalid bits for each sample
- int ber_invalid[LOG_SOUND_MAX][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // log nb inv bits for each sample
- int log_cid[LOG_SOUND_MAX]; // log channel id for each sample
- int nb_ech;
- int next_ech;
- /*---------------------- synthesis of the history --------------------------*/
- int tot_valid[PLC_MOD_MAX+1][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // nb_valid total bits
- int tot_invalid[PLC_MOD_MAX+1][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // nb_inv total bits
- uint16_t bpsk_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // noise remod max for bpsk
- uint16_t qam16_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]; // noise remod max for qam16
- uint8_t bpsk_num;
- uint8_t qam16_num;
- bool clean_table; // clean sound synthesis
-
- /*-----------------------tested channel------------------------------------ */
- struct plcp_uchannel *test_uchannel; // channel used for testing
- int test_id; // channel id for testing
- int remain_ber_test; // remaining ber test during ce
- int remain_sound; // remain sound frames before updating channel
- uint16_t test_data_gain; // gain used for payload
- uint16_t test_ctrl_gain; // gain used for control
-
- /*------------------------ ce internal -------------------------------------*/
- CANCEL_INFO tx_timer;
- CANCEL_INFO rx_timer;
- uint8_t step; /* current step */
- uint8_t seqno; /* current seqno */
- int ce_state;
- int no_response;
- bool need_sync;
- bool pollable; // true if the sta is pollable
- bool started;
-
- /*------------------------ link statistics-----------------------------------*/
- struct {
- int nb_send_request;
- int nb_tmo_request;
- int nb_cycle_error;
- int nb_send_reply;
- int nb_sent_success;
- int nb_sent_failed;
- int nb_recv_request;
- int nb_recv_reply;
- int bad_step;
- int bad_session;
- int bad_current_id;
- int bad_test_id;
- int bad_tx_qual;
- int bad_tmo;
- } stats;
-
- /*------------------------------ uchannel internal--------------------------- */
- int index; // index of the struct in the pool
- bool used; // indicate if this struct has been allocated
-};
-
-/***************************************************************************
- *
- * interface
- *
- ***************************************************************************/
-int plcp_init(void);
-int plcp_open(struct plc_drv_unit *unit, struct plcp_callbacks *callbacks);
-int plcp_start(struct plc_drv_unit *unit);
-int plcp_write(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-bool plcp_start_tmo(struct plc_drv_unit *unit, uint16_t date);
-bool plcp_stop_tmo(struct plc_drv_unit *unit);
-
-
-
-
-
-/***************************************************************************
- *
- * parametrage
- *
- ***************************************************************************/
-
-void plcp_set_bands(struct plc_drv_unit *unit, int mask);
-void plcp_set_header_modulation(struct plc_drv_unit *unit, int mod);
-void plcp_set_payload_modulation(struct plc_drv_unit *unit, int mod);
-void plcp_set_efr(struct plc_drv_unit *unit, int efr);
-int plcp_get_efr(struct plc_drv_unit *unit, int blocks, struct plcp_uchannel *uchannel, int slices);
-int plcp_set_group_modulation(struct pmd_band_quality *quality, int group, int nmod);
-int plcp_get_group_modulation(struct pmd_band_quality *quality, int group);
-void plcp_build_lookup(struct plc_drv_unit *unit, struct plcp_uchannel *uchannel);
-void plcp_copy_channel(struct plcp_uchannel *from, struct plcp_uchannel *to);
-void plcp_set_tx_quality( struct plc_drv_unit *unit, struct plcp_uchannel *uchannel);
-void plcp_set_rx_quality( struct plc_drv_unit *unit, struct plcp_uchannel *uchannel);
-bool band_is_used(struct plc_drv_unit *unit, int band);
-bool plcp_same_mac(uint8_t * addr1, uint8_t * addr2);
-void plcp_get_noise(struct plc_drv_unit * unit,uint16_t tab[8][16]);
-void plcp_channels_init(void);
-struct plcp_host * plcp_host_alloc(void);
-struct plcp_uchannel * plcp_uchannel_alloc(int mode);
-int plcp_id_alloc(void);
-void plcp_host_free(struct plcp_host *host);
-void plcp_uchannel_free(struct plcp_uchannel *uchannel);
-void plcp_id_free(int id);
-struct plcp_host * plcp_get_host_by_addr(uint8_t *DA);
-struct plcp_host * plcp_get_host_by_index(int index);
-struct plcp_uchannel * plcp_get_uchannel_by_id(int id);
-struct plcp_uchannel * plcp_get_uchannel_by_index(int index);
-struct plcp_host * plcp_create_host(struct plc_drv_unit *unit, uint8_t *mac_addr);
-void plcp_destroy_host(struct plc_drv_unit *unit, struct plcp_host * host);
-void plcp_create_prefixed_channels(void);
-void plcp_destroy_prefixed_channels(void);
-int plcp_get_max_data_len(struct plc_drv_unit *unit, struct plcp_uchannel * uchannel, int nb_slots);
-int plcp_get_data_slots(struct plc_drv_unit *unit, struct plcp_uchannel * uchannel, int len);
-bool plcp_is_medium_busy(struct plc_drv_unit *unit);
-struct plcp_host *plcp_get_next_pollable(void);
-
-void plcp_build_prefixed_channels(struct plc_drv_unit * unit);
-
-bool plcp_link_uchannel_to_id(struct plcp_uchannel *uchannel, int id);
-bool plcp_unlink_uchannel_to_id(struct plcp_uchannel *uchannel, int id);
-
-void plcp_register_event(struct plc_drv_unit * unit, int event, int state_destin, bool ok);
-void plcp_display_reg(struct plc_drv_unit * unit);
-
-extern bool plcp_send_in_progress(struct plc_drv_unit *unit);
-
-#define PLCP_ROBUSTA_CHANNEL_ID 0x8000
-
-/* 10 words for which PHLIC can perform the vote, minus one byte for CRC */
-#define PLCP_ROBUSTA_SLICE_SIZE (20-1)
-
-void pmd_switch_off_pilots(int band);
-void pmd_switch_on_pilots(int band);
-
-struct plcp_frame *plcp_alloc_tx_frame(void);
-struct plcp_frame *plcp_alloc_rx_frame(void);
-void plcp_free_tx_frame(struct plcp_frame *frame);
-void plcp_free_rx_frame(struct plcp_frame *frame);
-void plcp_init_frames(void);
-void plcp_enable(struct plc_drv_unit *unit);
-void plcp_dump_uchannel(struct plc_drv_unit *unit, struct plcp_uchannel *uchannel);
-
-#define plcp_fec_dbg_mem_enable() \
- *(volatile uint16_t*)PMD_FEC_DBG_ENB = 2;
-
-#define plcp_fec_dbg_mem_disable() \
- *(volatile uint16_t*)PMD_FEC_DBG_ENB = 0;
-
-/* AGC bloqué si IS_FRAME = CHMR */
-#define plcp_disable_chmr() { \
- if (update_chmr) { \
- *(volatile uint16_t*)DSP_CHMR_ADDR = 0; \
- } \
-}
-
-#define plcp_restore_chmr(unit) { \
- if (update_chmr) { \
- *(volatile uint16_t*)DSP_CHMR_ADDR = (unit)->used_bands; \
- }\
-}
-
-extern int plcp_snapshot(char *buffer);
-extern uint16_t plcp_pilots[PMD_MAX_BANDS][2];
-extern uint16_t dsp_pilots[PMD_MAX_BANDS][2];
-extern uint8_t plcp_notchs_bitmap[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-extern uint8_t plcp_pilots_bitmap[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
-#define plcp_slice_viterbi(slice) \
- (*(((uint32_t*)PMD_DMA_REGBASE)+(slice)) & 0x0000ffff)
-
-#define plcp_slice_rs(slice) \
- ((*(((uint32_t*)PMD_DMA_REGBASE)+(slice)) & 0x7fff0000)>>16)
-
-#define plcp_slice_valid(slice) \
-((*(((uint32_t*)PMD_DMA_REGBASE)+(slice%PMD_MAX_SLICES)) & 0x80000000)==0)
-
-#define plcp_slice_qword(slice) (*(((uint32_t*)PMD_DMA_REGBASE)+(slice)))
-
-extern uint8_t plcp_notchs_bitmap[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
-extern int plcp_find_valid_control(
- struct plc_drv_unit *unit,
- struct plcp_frame *pframe);
-
-#define band_is_used(unit, band) (((unit)->used_bands & PLC_BAND(band))!=0)
-
-extern uint8_t plcp_get_rx_bands(struct plc_drv_unit *unit);
-
-/* Compute the number of slices that can fit in a number of slots */
-extern int plcp_fit_nb_slices(struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
- int max_slices, int max_slots, int *p_data_slots, int *p_ref_slots);
-extern uint16_t plcp_get_timer(struct plc_drv_unit *unit);
-
-extern void plcp_lock(struct plc_drv_unit *unit);
-extern void plcp_unlock(struct plc_drv_unit *unit);
-
-extern void plcp_test_open(struct plc_drv_unit *unit);
-
-extern uint16_t plcp_get_cid_by_name(char *name);
-#endif /* PLCP_H */
-
diff --git a/app/sm-emac-drv/inc/plc_rx_buffer.h b/app/sm-emac-drv/inc/plc_rx_buffer.h
deleted file mode 100644
index e9604305be..0000000000
--- a/app/sm-emac-drv/inc/plc_rx_buffer.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef PLC_RX_BUFFER_H
-#define PLC_RX_BUFFER_H
-
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#endif /* PLC_RX_BUFFER_H */
-
diff --git a/app/sm-emac-drv/inc/plc_sms.h b/app/sm-emac-drv/inc/plc_sms.h
deleted file mode 100644
index 01b5983348..0000000000
--- a/app/sm-emac-drv/inc/plc_sms.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __RPC_H__
-#define __RPC_H__
-#include "plc_drv.h"
-
-void rpc_write(struct plc_drv_unit* unit, char* rpcString);
-void rpc_cmd(struct plc_drv_unit* unit, char* rpcCmdString);
-
-void rpc_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-void rpc_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed);
-
-#endif /* __RPC_H__ */
diff --git a/app/sm-emac-drv/inc/plc_test.h b/app/sm-emac-drv/inc/plc_test.h
deleted file mode 100644
index eeb849c97c..0000000000
--- a/app/sm-emac-drv/inc/plc_test.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef PLC_TEST_H
-#define PLC_TEST_H
-
-#include "plc_drv.h"
-
-struct test_header
-{
- int type;
- int mod;
- int tx_gain;
- int index;
-};
-
-#define TEST_HEADER_SIZE sizeof(struct test_header)
-
-#define TEST_NORMAL 0
-#define TEST_AUTOSCAN 1
-#define TEST_BER 2
-
-#define NB_AGC_MEASURES 50
-
-void test_init(struct plc_drv_unit * unit);
-int test_set_num(struct plc_drv_unit * unit,int nb);
-int test_start_tx(struct plc_drv_unit * unit);
-int test_stop_tx(struct plc_drv_unit * unit);
-void test_start_rx(struct plc_drv_unit * unit);
-void test_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len,
- uint8_t *d_buf, int d_len, bool failed);
-void test_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len,
- uint8_t *d_buf, int d_len, bool failed);
-void ber_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len,
- uint8_t *d_buf, int d_len, bool failed);
-void ber_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len,
- uint8_t *d_buf, int d_len, bool failed);
-void test_stats(struct plc_drv_unit * unit);
-void test_conf(struct plc_drv_unit * unit);
-int test_set_host(struct plc_drv_unit * unit, int host_id);
-
-void test_int_handler(struct plc_drv_unit *unit);
-void test_agc(struct plc_drv_unit *unit);
-int test_set_payload_check(struct plc_drv_unit * unit, bool check);
-int test_set_gain(struct plc_drv_unit * unit,int start,int stop,int step);
-int test_set_flag(struct plc_drv_unit *unit, int flag);
-int test_unset_flag(struct plc_drv_unit *unit, int flag);
-void test_autotest(struct plc_drv_unit * unit);
-int test_set_csize(struct plc_drv_unit * unit, int csize);
-int test_set_dsize(struct plc_drv_unit * unit, int dsize);
-
-int test_set_ber(struct plc_drv_unit * unit, bool enable);
-int test_set_ber_delay(struct plc_drv_unit * unit, int d);
-int test_set_ber_pattern(struct plc_drv_unit * unit, int control_pattern, int payload_pattern);
-
-#endif /* PLC_TEST_H */
diff --git a/app/sm-emac-drv/inc/plc_tx_buffer.h b/app/sm-emac-drv/inc/plc_tx_buffer.h
deleted file mode 100644
index d0e528de92..0000000000
--- a/app/sm-emac-drv/inc/plc_tx_buffer.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef PLC_TX_BUFFER_H
-#define PLC_TX_BUFFER_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#endif /* PLC_TX_BUFFER_H */
-
diff --git a/app/sm-emac-drv/inc/plc_vport.h b/app/sm-emac-drv/inc/plc_vport.h
deleted file mode 100644
index 705cf7d5ca..0000000000
--- a/app/sm-emac-drv/inc/plc_vport.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef PLC_VPORT_H
-#define PLC_VPORT_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#ifdef USE_OSEDEF_H
-#include "osedef.h"
-#endif
-
-#include "cpu.h" /* CPU specific definitions. */
-#include "board.con" /* Board specific configurations. */
-
-#include "platform.h"
-
-/* forward decl */
-struct plc_vport_unit;
-struct mac_addr;
-struct plc_drv_unit;
-
-// management of vport global tables
-extern uint32_t vport_get_unit_id(struct plc_vport_unit *vport);
-
-extern struct plc_vport_unit *vport_new_vport(uint32_t master_unit_id);
-
-extern bool vport_free_vport(struct plc_vport_unit *vport);
-
-extern bool vport_set_peer_address(struct plc_vport_unit *vport, struct mac_addr mac_addr);
-
-extern struct mac_addr *vport_get_peer_address(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_dd_write(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_tx_queue_full(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_handle_tx_failed(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_handle_tx_done(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_handle_rx_failed(struct plc_vport_unit *vport);
-
-extern unsigned int vport_get_stat_handle_rx_done(struct plc_vport_unit *vport);
-
-extern void vport_clean_stats(struct plc_vport_unit *vport);
-
-
-// management of vports for a unit
-
-// errcodes
-#define VPORT_INV_MODE (-1)
-#define VPORT_NO_MORE_VP (-2)
-#define VPORT_INV_ADDR (-3)
-#define VPORT_ALREADY_EXISTS (-4)
-#define VPORT_INV_VPORT (-5)
-
-extern int vport_create(struct plc_drv_unit *unit, struct mac_addr peer_addr);
-
-extern int vport_destroy(struct plc_drv_unit *unit, unsigned int vport_no);
-
-// To be called only by mac_tx and mac_rx
-
-extern void vport_handle_tx(struct plc_vport_unit *unit,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags, bool failed);
-
-extern void vport_handle_rx(struct plc_vport_unit *unit,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags, bool failed);
-
-#endif /* PLC_VPORT_H */
diff --git a/app/sm-emac-drv/inc/plcp_core.h b/app/sm-emac-drv/inc/plcp_core.h
deleted file mode 100644
index 6797c9f276..0000000000
--- a/app/sm-emac-drv/inc/plcp_core.h
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifndef PLCP_CORE_H
-#define PLCP_CORE_H
-#include "platform.h"
-#include "plc_drv.h"
-#include "plc_ber.h"
-
-#ifndef __KERNEL
-#define PLCP_DEBUG
-#endif
-
-#define POWER_ALL_BANDS 0
-#define POWER_SINGLE_BAND 1
-#define POWER_USED_BANDS 2
-
-/*
- * FEC does not support buffers crossing a 16-bit frontier.
- */
-#define PLCP_DMA_BUFFER_SIZE 0x10000
-#define PLCP_TX_RING_SIZE 10
-#define PLCP_RX_RING_SIZE 3
-
-#define PLCP_FEC_LATENCY (4+1) /* number of 36 µs symbols + 1 margin */
-
-#define FEC_MAX_SLICES PMD_FEC_MEM_NB_SLICES
-#define FEC_WORDS_PER_SLICE 256
-#define FEC_MEMSIZE (PMD_FEC_MEM_NB_SLICES*FEC_WORDS_PER_SLICE*2)
-#define FEC_SHRINKED_MEMSIZE ((FEC_MEMSIZE*241*3)/(256*4))
-
-extern unsigned int crc32(unsigned char *message, int len);
-
-#define plcp_fcs crc32
-
-#define control_crc(control) \
- crc32((uint8_t*)control, sizeof(struct plcp_control) - sizeof(uint32_t))
-
-#define block_crc(block) \
- crc32((uint8_t*)block->payload, PLCP_BLOCK_PAYLOAD_SIZE)
-
-#if 0
-#define control_crc(control) \
- ((*((uint32_t*)control+0))+ \
- (*((uint32_t*)control+1))+ \
- (*((uint32_t*)control+2))+ \
- (*((uint32_t*)control+3))+ \
- (*((uint32_t*)control+4))+ \
- (*((uint32_t*)control+5))+ \
- (*((uint32_t*)control+6))+ 0x10)
-
-#define block_crc(block) \
- block->payload[0] + block->payload[1] + block->payload[2] + \
- block->payload[3] + block->payload[4] + block->payload[5] + \
- block->payload[6] + 0x1010
-#endif
-
-
-#ifdef PLCP_DEBUG
-#define PLCP_LOG_PMD_RX if (plcp_log_level) plcp_log_pmd_rx
-#define PLCP_LOG_PMD_TX if (plcp_log_level) plcp_log_pmd_tx
-
-extern int plcp_log_locked;
-#define PLCP_LOG(date, name, value) \
- do { if (plcp_log_locked==0) plcp_add_log(__LINE__, (date), (name), (int)(value)); } while(0)
-extern void plcp_add_log(int line, uint16_t date, char *name, int value);
-#else
-#define PLCP_LOG_PMD_RX(unit) do { ; } while(0)
-#define PLCP_LOG_PMD_TX(unit) do { ; } while(0)
-#define PLCP_LOG(date, name, value) do { ; } while(0)
-#endif
-
-struct plcp_fmode {
- /* MAC interface */
- char *name;
- int (*fm_start)(struct plc_drv_unit *unit);
- int (*fm_efr)(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices);
-
- int (*fm_write)(struct plc_drv_unit *unit, struct plcp_frame *pframe);
- bool (*fm_start_tmo)(struct plc_drv_unit *unit, uint16_t date);
- bool (*fm_stop_tmo)(struct plc_drv_unit *unit);
-
- /* PMD interface */
- struct pmd_ind fm_ind;
-
- /* private functions */
- void (*__status)(struct plc_drv_unit *unit);
- void (*__idle)(struct plc_drv_unit *unit);
- int (*__busy)(struct plc_drv_unit *unit, uint16_t date);
- int (*__rx_start)(struct plc_drv_unit *unit, uint16_t date);
- int (*__rx_more)(struct plc_drv_unit *unit, uint16_t date);
- int (*__rx_end)(struct plc_drv_unit *unit, uint16_t date,
- struct plcp_frame *pframe);
- int (*__tx_start)(struct plc_drv_unit *unit,
- struct plcp_frame *pframe, uint16_t date);
- void (*__write_control)(struct plc_drv_unit *unit,
- struct plcp_frame *pframe);
- int (*__mtu)(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots);
- void (*__drop)(struct plc_drv_unit *unit, uint16_t date);
-
-};
-
-/* --- VARIABLES --- */
-extern struct plcp_frame *plcp_tx_frame;
-extern struct plcp_frame *plcp_rx_frame;
-
-extern char *plcp_fmode_name(int fmode);
-extern void plcp_fmode_status(struct plc_drv_unit *unit);
-extern struct plcp_fmode plcp_fmodes[PLCP_NB_FMODE];
-static INLINE struct plcp_fmode *plcp_get_fmode(struct plc_drv_unit *unit) {
- return &plcp_fmodes[unit->plcp.config.fmode];
-}
-
-extern struct transition_t plcp_transitions[PLCP_NB_EVENT][PLCP_NB_STATE];
-extern uint8_t plcp_rx_bands;
-extern int plcp_save;
-extern char *plcp_state_name[PLCP_NB_STATE];
-extern char *plcp_event_name[PLCP_NB_EVENT];
-
-extern uint32_t plcp_shrinked_patterns[BER_PATTERN_MAX+1][FEC_SHRINKED_MEMSIZE];
-
-/* --- FUNCTIONS --- */
-extern void plcp_init_ui(void);
-
-int plcp_check_control_common(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_check_control_only(struct plc_drv_unit *, struct plcp_frame *);
-
-void plcp_build_lookup_control(struct plc_drv_unit *, struct plcp_uchannel*);
-int plcp_rx_start_control(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_more_control(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_end_control(struct plc_drv_unit *unit, struct plcp_frame *);
-int plcp_mtu_control(struct plc_drv_unit *, struct plcp_uchannel *, int );
-
-void plcp_build_lookup_fec(struct plc_drv_unit *, struct plcp_uchannel*);
-int plcp_mtu_fec(struct plc_drv_unit *, struct plcp_uchannel *, int );
-int plcp_tx_start_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_tx_data_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_start_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_more_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_data_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_end_fec(struct plc_drv_unit *, struct plcp_frame *);
-
-void plcp_build_lookup_robust_fec(struct plc_drv_unit *, struct plcp_uchannel*);
-int plcp_mtu_robust_fec(struct plc_drv_unit *, struct plcp_uchannel *, int );
-int plcp_tx_start_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_tx_data_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_start_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_more_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_data_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_end_robust_fec(struct plc_drv_unit *, struct plcp_frame *);
-
-int plcp_mtu_3fec(struct plc_drv_unit *, struct plcp_uchannel *, int );
-int plcp_tx_start_3fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_tx_data_3fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_start_3fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_more_3fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_data_3fec(struct plc_drv_unit *, struct plcp_frame *);
-int plcp_rx_end_3fec(struct plc_drv_unit *, struct plcp_frame *);
-
-extern uint8_t plcp_tx_d_buf[PLCP_TX_RING_SIZE][PLCP_DMA_BUFFER_SIZE];
-extern uint8_t plcp_rx_d_buf[PLCP_RX_RING_SIZE][PLCP_DMA_BUFFER_SIZE];
-extern uint8_t plcp_rx_junk[PLCP_DMA_BUFFER_SIZE];
-extern uint8_t plcp_rx_robust_fec[PLCP_DMA_BUFFER_SIZE];
-
-void plcp_robust_fec_status(struct plc_drv_unit *unit);
-
-void plcp_prepare_rx_header(struct plc_drv_unit *unit);
-void plcp_register_agc(struct plc_drv_unit *unit);
-int plcp_get_first_started_band(struct plc_drv_unit *unit);
-uint8_t plcp_get_started_bands(struct plc_drv_unit *unit);
-void plcp_set_rx_nb_bands(struct plc_drv_unit *unit, int nb_bands);
-
-extern int plcp_set_fmode(struct plc_drv_unit *unit, int fmode);
-
-void plcp_set_efr(struct plc_drv_unit *unit, int efr);
-void plcp_set_rpr(int rpr);
-void plcp_set_srr(int srr);
-void plcp_set_periodic_ref(struct plc_drv_unit *unit,
- int ref_interval, int nb_ref, int nb_bands);
-
-
-void plcp_control_power(struct plc_drv_unit *unit, uint8_t not_used);
-void plcp_data_power(struct plc_drv_unit *unit, uint8_t unused);
-void plcp_write_control(int dst, int src);
-void plcp_log_control(int date, struct plcp_control *control);
-int plcp_find_valid_block(struct plc_drv_unit *unit, struct plcp_block *block);
-void plcp_log_pmd_rx(struct plc_drv_unit *unit);
-void plcp_log_pmd_tx(struct plc_drv_unit *unit);
-
-int plcp_channel_open(struct plc_drv_unit *unit);
-int plcp_fmode_open(struct plc_drv_unit *unit);
-int plcp_fmode_start(struct plc_drv_unit *unit);
-int plcp_get_control_slots(
- struct plc_drv_unit *unit,
- int control_len, /* bytes */
- int *control_symbols,
- uint16_t *control_slots,
- int *dsp_rpr /* position of second reference symbol */ );
-
-void plcp_scramble(struct plcp_frame *pframe, int slices);
-
-int plcp_check_fcs(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-int plcp_add_fcs(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-void plcp_rebuild_channels(struct plc_drv_unit *unit);
-
-#endif /* PLCP_CORE_H */
diff --git a/app/sm-emac-drv/makefile.mk b/app/sm-emac-drv/makefile.mk
deleted file mode 100644
index aabcf23b6e..0000000000
--- a/app/sm-emac-drv/makefile.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-include ..$/userconf.mk
-SM = sm-emac-drv
-IS_BSP_MODULE = yes
-
-OBJS = plcp_test.o plcp_fmode.o plc_drv.o plcp_patterns.o plcp_ui.o plcp_mode_common.o plcp_mode_control.o plcp_mode_fec.o plcp_mode_robust_fec.o plcp_mode_3fec.o plcp_channel.o plc_plcp.o plc_rx_buffer.o plc_tx_buffer.o plc_shell.o plc_testu.o crc.o plcp_frame.o plc_dbg.o
-
-OBJS += enermac.o emac_isr.o emac_asm.o
-
-include ..$/common$/make$/module_rules.mk
diff --git a/app/sm-emac-drv/plc_drv_if.h b/app/sm-emac-drv/plc_drv_if.h
deleted file mode 100644
index c006379b5b..0000000000
--- a/app/sm-emac-drv/plc_drv_if.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef PLC_DRV_IF_H
-#define PLC_DRV_IF_H
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-#include "platform.h"
-#include "osetypes.h"
-#include "device.h"
-#include "plc_lnk_if.h"
-#include "enermib.h"
-
-extern void emac_get_defaults(struct emac_conf *conf);
-extern void emac_get_conf(struct emac_conf *conf);
-extern void emac_set_conf(struct emac_conf *conf);
-
-#define PLC_DEVICE_TAGC_TYPE 0x4100
-
-/*
- * Bands to be used for one unit. The value is a bit mask of used bands.
- */
-#define PLC_DEVICE_TAGC_BANDS (PLC_DEVICE_TAGC_TYPE+1)
-#define PLC_BAND(n) (1<<n)
-
-/*
- * payload modulation.
- */
-#define PLC_DEVICE_TAGC_PAYLOAD_MOD (PLC_DEVICE_TAGC_TYPE+2)
-
-#define PLC_MOD_NONE 0
-#define PLC_MOD_BPSK 1
-#define PLC_MOD_QPSK 2
-#define PLC_MOD_QAM16 3
-#define PLC_MOD_QAM64 4
-#define PLC_MOD_QAM256 5
-#define PLC_MOD_MAX 5
-#define PLC_MOD_PAYLOAD_DEFAULT PLC_MOD_QAM64
-
-#define PLC_DRV_MTU 1550
-#define PLC_DRV_MRU 1550
-
-/* frame modes */
-#define PLCP_FMODE_ENER 0 /* enervation payload */
-#define PLCP_NB_FMODE 1
-
-
-/* FLAGS for transmissing a frame */
-#define F_ACK 1
-#define F_NO_HANDLE_TX 2 /* Do not deliver the dcHandleTx (txEnd) */
-#define F_NO_HANDLE_TX_NO_FREE 3 /* Do not deliver the dcHandleTx and no free(txEnd) */
-
-extern void plc_drv_register_shell_cmds(void);
-bool shell_plcGetAck(int argc, char *argv[]);
-void mib_drv_stats(struct plc_plc *plcPlc);
-int ce_get_nb_hosts(void);
-int mib_ce_host(int host_id, struct plc_host *plcHost);
-int plcp_getPilots(struct system_carrier_tab *systemCarrierTab);
-int plcp_getAdapts(struct system_carrier_tab *systemCarrierTab);
-int plcp_setAdapts(struct system_carrier_tab *systemCarrierTab);
-int plcp_getNotchs(struct system_carrier_tab *systemCarrierTab);
-int plcp_setNotchs(struct system_carrier_tab *systemCarrierTab);
-int plcp_setAck(bool mode);
-
-/* Autostart from flash specific data */
-extern bool INIT_DONE;
-extern int init_flip(int argc, char **argv);
-
-// vport if
-
-extern void plc_vport_register_shell_cmds(void);
-
-#endif /* PLC_DRV_IF_H */
diff --git a/app/sm-emac-drv/src/crc.c b/app/sm-emac-drv/src/crc.c
deleted file mode 100644
index 907d367a4a..0000000000
--- a/app/sm-emac-drv/src/crc.c
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef __KERNEL__
-#include <stdio.h>
-#endif
-
-#if 0
-/* compute 32 bits CRC (ploynome is 0x04C11DB7 */
-unsigned int crc32(unsigned char *message, int len)
-{
- int i, j;
- unsigned int byte, crc, mask;
- i = 0;
- crc = 0xFFFFFFFF;
- while (len > 0) {
- byte = message[i]; // Get next byte.
- crc = crc ^ byte;
- for (j = 7; j >= 0; j--) { // Do eight times.
- mask = -(crc & 1);
- crc = (crc >> 1) ^ (0xEDB88320 & mask);
- }
- i = i + 1;
- len--;
- }
- return ~crc;
-}
-#endif
-
-
-// $Id: crc.c,v 1.1 2005/06/27 10:41:33 fleury Exp $
-//
-// I grabbed these CRC routines from the following source:
-// http://www.landfield.com/faqs/compression-faq/part1/section-25.html
-//
-// These routines are very useful, so I'm including them in bochs.
-// They are not covered by the license, as they are not my doing.
-// My gratitude to the author for offering them on the 'net.
-//
-// I only changed the u_long to unsigned long, and u_char to unsigned char,
-// and gave the functions prototypes.
-//
-// -Kevin
-//
-// **************************************************************************
-// The following C code (by Rob Warnock <rpw3@sgi.com>) does CRC-32 in
-// BigEndian/BigEndian byte/bit order. That is, the data is sent most
-// significant byte first, and each of the bits within a byte is sent most
-// significant bit first, as in FDDI. You will need to twiddle with it to do
-// Ethernet CRC, i.e., BigEndian/LittleEndian byte/bit order. [Left as an
-// exercise for the reader.]
-//
-// The CRCs this code generates agree with the vendor-supplied Verilog models
-// of several of the popular FDDI "MAC" chips.
-// **************************************************************************
-unsigned long crc32_table[256];
-/* Initialized first time "crc32()" is called. If you prefer, you can
- * statically initialize it at compile time. [Another exercise.]
- */
-
-unsigned long crc32(unsigned char *buf, int len);
-void init_crc32(void);
-
-unsigned long crc32(unsigned char *buf, int len)
-{
- static int init = 0;
- unsigned char *p;
- unsigned long crc;
-
-#if 0
- if (!crc32_table[1]) /* if not already done, */
- init_crc32(); /* build table */
-#endif
- if(!init) {
- init_crc32();
- init=1;
- }
- crc = 0xffffffff; /* preload shift register, per CRC-32 spec */
- for (p = buf; len > 0; ++p, --len)
- crc = (crc << 8) ^ crc32_table[(crc >> 24) ^ *p];
- return ~crc; /* transmit complement, per CRC-32 spec */
-}
-
-/*
- * Build auxiliary table for parallel byte-at-a-time CRC-32.
- */
-#define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */
-
-void init_crc32(void)
-{
- int i, j;
- unsigned long c;
-
- for (i = 0; i < 256; ++i) {
- for (c = i << 24, j = 8; j > 0; --j)
- c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
- crc32_table[i] = c;
- }
-}
-
-
diff --git a/app/sm-emac-drv/src/emac_asm.s b/app/sm-emac-drv/src/emac_asm.s
deleted file mode 100644
index 16ac5d7d43..0000000000
--- a/app/sm-emac-drv/src/emac_asm.s
+++ /dev/null
@@ -1,50 +0,0 @@
-;
-; Copyright (C) 2005 by SPiDCOM Technologies. All rights reserved.
-; Author : fft.
-;
-
- AREA EMAC, CODE, READONLY
-
- EXPORT emac_write_pb
-
-emac_write_pb
- STMFD r13!, {r4-r9}
-
- LDMIA r1!, {r3-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
- ADD r0, r0, #32
-
- LDMIA r1!, {r2-r9}
- STMIA r0, {r2-r9}
- MCR p15, 0, r0, c7, c14, 1
-
- LDMFD r13!, {r4-r9} ; Restore registers and return
- BX r14
-
- END
diff --git a/app/sm-emac-drv/src/emac_isr.c b/app/sm-emac-drv/src/emac_isr.c
deleted file mode 100644
index e6c5fd9bd7..0000000000
--- a/app/sm-emac-drv/src/emac_isr.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "platform.h"
-#include "ose_i.h"
-#include "osedef.h"
-
-OS_PROCESS(heartbeat) {
-
- extern void mac_heartbeat(void);
-
- ApGpio_dev_t *gpio_dev = (ApGpio_dev_t *) GPIO_BASE;
-
- if (gpio_dev->GPIO_23_16.status != 0x00) {
- /* clear interrupt */
- gpio_dev->GPIO_23_16.raw_status = 0xFF;
- mac_heartbeat();
- }
-}
-
diff --git a/app/sm-emac-drv/src/enermac.c b/app/sm-emac-drv/src/enermac.c
deleted file mode 100755
index 7e97353bef..0000000000
--- a/app/sm-emac-drv/src/enermac.c
+++ /dev/null
@@ -1,1594 +0,0 @@
-#include "platform.h"
-#include <stdio.h>
-#include <string.h>
-#include "plc_dbg.h"
-#include "ose.h"
-#include "osedef.h"
-#include "inet.h"
-#include "tosv.h"
-#include "time.h"
-#include "shell.h"
-#include "shell_if.h"
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "inet.h"
-#include "mib.h"
-#include "list.h"
-#include "mac_isr.h"
-#include "shell.h"
-#ifndef softOSE
-#include "getopt.h"
-#endif
-#include "ui.h"
-#include "plcp_core.h"
-#include "utmo_if.h"
-#include "gpio.h"
-
-int pf_no = 0;
-
-static ApGpio_dev_t *gpio_dev = (ApGpio_dev_t *) GPIO_BASE;
-static struct plc_drv_unit *plc0;
-
-extern PROCESS mac_recv_;
-extern PROCESS plcp_recv_;
-
-#define MAC_MODE_ENER 0
-#define MAC_NB_MODES 1
-
-int mac_bypass_queue_recv = 0;
-
-
-#define ENER_MAX_FRAMES 3
-struct plcp_frame *__xmit_pframe[ENER_MAX_FRAMES];
-
-#define ENER_WRITES (PLCP_MAX_SLICES*3)
-uint8_t *w_buf[ENER_WRITES];
-int w_len[ENER_WRITES];
-int w_idx = 0;
-int done_idx = 0;
-
-struct mac_slave slaves[ENER_MAX_SLAVES+1];
-
-static int __ener_open(struct plc_drv_unit *unit);
-static int __ener_start(struct plc_drv_unit *unit);
-
-static int __ener_start_hb(int argc, char **argv);
-static int __ener_start_hb_internal(int argc, char **argv);
-static int __ener_stop_hb(int argc, char **argv);
-static int __ener_one_hb_gpio(int argc, char **argv);
-static int __ener_one_hb_local(int argc, char **argv);
-static int __ener_get_conf(int argc, char **argv);
-static int __ener_get_stats(int argc, char **argv);
-static int __ener_get_queues(int argc, char **argv);
-static int __ener_get_dist(int argc, char **argv);
-static int __ener_set_gain(int argc, char **argv);
-static int __ener_set_master(int argc, char **argv);
-static int __ener_set_slave(int argc, char **argv);
-static int __ener_set_nb_slave(int argc, char **argv);
-static int __ener_set_gap(int argc, char **argv);
-static int __ener_set_beacon_offset(int argc, char **argv);
-static int __ener_set_beacon_spaces(int argc, char **argv);
-static int __ener_set_frame_spaces(int argc, char **argv);
-static int __ener_set_cid(int argc, char **argv);
-static int __ener_set_slices(int argc, char **argv);
-static int __ener_clean_stats(int argc, char **argv);
-static int __ener_queue_recv_on(int argc, char **argv);
-static int __ener_queue_recv_off(int argc, char **argv);
-static void __ener_apply(void);
-extern void heartbeat_init(void);
-
-struct mac_mode mac_modes[MAC_NB_MODES] = {
- {
- "ENERVATION",
- {
- /* PLCP callbacks */
- mac_tx_end_isr,
- NULL, /* busy */
- NULL, /* rx_start */
- mac_rx_end_isr,
- NULL, /* eof */
- NULL, /* tmo */
- NULL, /* drop */
- mac_tx_end_isr /* status */
- },
- __ener_open,
- __ener_start
- }
-};
-
-static struct mac_mode *__mm;
-
-#define TX 1
-#define RX 2
-
-#define MAC 8
-#define PLCP 16
-
-#define ERR 32
-#define POLL 64
-#define SAR 128
-#define ALLOC 256
-#define FREE 512
-#define QUEUE 1024
-
-#define OR_MASK RX|TX
-#define AND_MASK 0
-#define NOT_MASK 0
-
-#if 0
-#define MPRINT(mask, args...)\
-if (((mask) & (OR_MASK)) \
- && (((mask) & (AND_MASK))==(AND_MASK)) \
- && (((mask) & (NOT_MASK))==0)) { \
- wait_sem(&printf_sem); \
- printf("%s ", __FUNCTION__); \
- printf(args); \
- signal_sem(printf_sem);\
-}
-#endif
-#if 0
-#define MFRAME_INFO(mask, mframe) mframe_info(__FUNCTION__,mask,mframe)
-#endif
-
-#define MFRAME_INFO(mask, mframe) /* */
-
-
-LIST_HEAD(mac_xmit_queue);
-LIST_HEAD(mac_xmit_free_queue);
-LIST_HEAD(plcp_xmit_free_queue);
-
-LIST_HEAD(mac_recv_queue);
-LIST_HEAD(mac_recv_sar_queue);
-LIST_HEAD(mac_recv_free_queue);
-
-LIST_HEAD(pmd_xmit_queue); /* for loopback */
-
-struct mac_frame mac_xmit_frames[MAC_TX_RING_SIZE];
-struct mac_frame mac_recv_frames[MAC_RX_RING_SIZE];
-
-SEMAPHORE *mac_recv_free_sem;
-SEMAPHORE *mac_recv_sem;
-SEMAPHORE *mac_lock_recv_sem;
-SEMAPHORE *mac_lock_xmit_sem;
-SEMAPHORE *plcp_lock_recv_sem;
-SEMAPHORE *plcp_lock_xmit_sem;
-
-struct mac_frame *mac_alloc_xmit(void);
-void mac_queue_xmit(struct mac_frame *mframe);
-void mac_poll_xmit(void);
-int mac_write_pbs(struct mac_frame *mframe, uint32_t mask);
-void mac_free_xmit(struct mac_frame *mframe);
-int mac_recv_pb(struct mac_frame *mframe, struct pb *pb);
-INLINE void mac_wake_up_recv() { signal_fsem(mac_recv_); }
-INLINE void plcp_wake_up_recv() { signal_fsem(plcp_recv_); }
-
-#define W_LOG_DEBUG
-#ifdef W_LOG_DEBUG
-struct w_log_ent {
- int date;
- struct pb_desc desc;
- int w_pf_no;
- int w_pf_pb_count;
- int pf_no;
- int pf_pb_count;
- int w_idx;
- int done_idx;
-};
-
-struct w_log_ent w_log[256];
-uint8_t w_log_idx = 0;
-int w_log_lock = 0;
-
-void INLINE W_LOG(struct pb_desc *desc, struct plcp_frame *pf) {
- struct w_log_ent *w;
-
- if (w_log_lock==0) {
- w = &w_log[w_log_idx];
- w->date = plcp_get_timer(plc0);
- w->desc = *desc;
- w->w_pf_no = pf->no;
- w->w_pf_pb_count = pf->pb_count;
- w->pf_no = pf_no;
- w->pf_pb_count = __xmit_pframe[pf_no]->pb_count;
- w->w_idx = w_idx;
- w->done_idx = done_idx;
- w_log_idx++;
- }
-}
-
-int __ener_get_w_log(int argc, char **argv) {
- struct w_log_ent *w;
- int i;
- uint8_t idx = w_log_idx;
- w_log_lock = 1;
- for (i=0;i<256;i++) {
- w = &w_log[idx];
- printf("%d frame_no=%d pb_no=%d/%d w_pf_no=%d(%d) pf_no=%d(%d) w_idx=%d done_idx=%d\n",
- w->date,
- w->desc.frame_no,
- w->desc.pb_no,
- w->desc.pb_count,
- w->w_pf_no,
- w->w_pf_pb_count,
- w->pf_no,
- w->pf_pb_count,
- w->w_idx,
- w->done_idx);
- idx++;
- }
- w_log_lock = 0;
- return RET_SUCCESS;
-}
-
-struct pf_log_ent {
- int line;
- int date;
- int hb;
- int pf_no;
- int done_no;
- int w_idx;
- int done_idx;
- struct {
- int frame_count;
- int pb_count;
- } pf[ENER_MAX_FRAMES];
-};
-
-struct pf_log_ent pf_log[256];
-uint8_t pf_log_idx = 0;
-int pf_log_lock = 0;
-
-
-void INLINE PF_LOG(int line, int done_no) {
- int i;
- struct pf_log_ent *p;
- if (pf_log_lock) {
- return;
- }
- p = &pf_log[pf_log_idx];
- p->line = line;
- p->date = plcp_get_timer(plc0);
- p->hb = plc0->stats.emac.heartbeat;
- p->w_idx = w_idx;
- p->done_idx = done_idx;
- p->done_no = done_no;
- p->pf_no = pf_no;
- for (i=0;i<ENER_MAX_FRAMES;i++) {
- p->pf[i].frame_count = __xmit_pframe[i]->frame_count;
- p->pf[i].pb_count = __xmit_pframe[i]->pb_count;
- }
- pf_log_idx++;
-}
-
-int __ener_get_pf_log(int argc, char **argv) {
- struct pf_log_ent *p;
- int i,j;
- uint8_t idx = pf_log_idx;
- pf_log_lock = 1;
- for (i=0;i<256;i++) {
- p = &pf_log[idx];
- printf("%d.%d line=%d w_idx=%d done_idx=%d ",
- p->hb,
- p->date,
- p->line,
- p->w_idx,
- p->done_idx);
- for (j=0;j<ENER_MAX_FRAMES;j++) {
- printf("%c%d:%d ",
- j==p->done_no?'*':
- (j==p->pf_no?'p':' '),
- p->pf[j].frame_count,
- p->pf[j].pb_count);
- }
- printf("\n");
- idx++;
- }
- pf_log_lock = 0;
- return RET_SUCCESS;
-}
-
-#else
-void INLINE W_LOG(struct pb_desc *desc, struct plcp_frame *pf) { ; }
-void INLINE PF_LOG(int line, int done_no) { ; }
-#endif /* W_LOG_DEBUG */
-
-void pf_xmit_init(struct plcp_frame *pf) {
- pf->state = PF_IDLE;
- pf->d_len = 0;
- pf->pb_count = 0;
- pf->frame_count = 0;
-}
-
-void pf_xmit_fixup(struct plcp_frame *pf) {
- int slice;
- struct pb *pb = ((struct pb*)pf->d_buf)+pf->pb_count;
- for (slice=pf->pb_count;slice<PLCP_MAX_SLICES;slice++, pb++) {
- *(uint32_t*)pb = 0;
- }
- pf->state = PF_XMIT;
-}
-
-void pf_xmit_start(struct plcp_frame *pf) {
- if (plcp_write(plc0, pf)==0) {
- pf_xmit_fixup(pf);
- plc0->stats.emac.plcp_write_ok++;
- plc0->stats.emac.plcp_xmit_slices[pf->pb_count]++;
- drain_write_buffer();
- } else {
- plc0->stats.emac.plcp_write_nok++;
- }
- if (plc0->emac.nb_slaves==1) {
- plc0->PMD->tx_start = 1;
- }
-}
-
-void pf_xmit_done(struct plc_drv_unit *unit, struct plcp_frame *pf) {
- int i;
- for (i=0;i<pf->frame_count;i++) {
- drv_handle_tx(unit, 0, 0, 0,
- w_buf[done_idx], w_len[done_idx], 0, 0, false);
- done_idx = (done_idx+1)%ENER_WRITES;
- }
-}
-
-int mac_write(struct plc_drv_unit *unit, char *buf, int len) {
-
- static int frame_no = 0;
- struct plcp_frame *pf;
- int pb_count;
- struct pb_desc desc;
- int offset;
- int slice;
- uint32_t msr;
- int w_pf_no = pf_no;
-
- if (unit->emac.slave_no==0) {
- /* master can not send... */
- return -1;
- }
-
- pf = __xmit_pframe[w_pf_no];
- if (pf->pb_count >= PLCP_MAX_SLICES) {
- unit->stats.emac.mac_write_nok++;
- return -1;
- }
-
- pb_count = (len + PB_PAYLOAD_SIZE - 1)/PB_PAYLOAD_SIZE;
-
- unit->stats.emac.mac_write_ok++;
- unit->stats.emac.mac_xmit_slices[pb_count]++;
-
- /* store original buffer address */
- w_buf[w_idx] = (uint8_t*)buf;
- w_len[w_idx] = len;
- w_idx = (w_idx+1)%ENER_WRITES;
-
- frame_no++;
- offset = 0;
-
- desc.slave_no = unit->emac.slave_no;
- desc.frame_no = frame_no;
- desc.pb_count = pb_count;
-
- for (slice=0;slice<pb_count;slice++, offset+=PB_PAYLOAD_SIZE) {
-
- LOCK_SAVE(msr);
- pf = __xmit_pframe[w_pf_no];
- if (pf->pb_count>=PLCP_MAX_SLICES) {
- w_pf_no = (w_pf_no+1)%ENER_MAX_FRAMES;
- pf = __xmit_pframe[w_pf_no];
- }
-
- desc.pf_no = w_pf_no;
- desc.pb_no = slice;
-
- if ((offset+PB_PAYLOAD_SIZE)<len) {
- desc.len = PB_PAYLOAD_SIZE;
-#if 1
- emac_write_pb(pf->d_buf+pf->d_len, buf+offset, desc);
- pf->d_len += PB_PAYLOAD_SIZE+sizeof(struct pb_desc);
-#else
- memcpy(pf->d_buf+pf->d_len, &desc, sizeof(struct pb_desc));
- pf->d_len += sizeof(struct pb_desc);
- memcpy(pf->d_buf+pf->d_len, buf+offset, PB_PAYLOAD_SIZE);
- pf->d_len += PB_PAYLOAD_SIZE;
-#endif
- } else {
- desc.len = len-offset;
-#if 1
- emac_write_pb(pf->d_buf+pf->d_len, buf+offset, desc);
- pf->d_len += PB_PAYLOAD_SIZE+sizeof(struct pb_desc);
-#else
- memcpy(pf->d_buf+pf->d_len, &desc, sizeof(struct pb_desc));
- pf->d_len += sizeof(struct pb_desc);
- memcpy(pf->d_buf+pf->d_len, buf+offset, desc.len);
- memset(pf->d_buf+pf->d_len+desc.len, 0, PB_PAYLOAD_SIZE - desc.len);
- pf->d_len += PB_PAYLOAD_SIZE;
-#endif
- pf->frame_count++;
- }
- pf->pb_count++;
- W_LOG(&desc, pf);
- LOCK_RESTORE(msr);
- }
- return 0;
-}
-
-struct mac_frame *mac_alloc_recv(struct plc_drv_unit *unit, int len) {
-
- struct mac_frame *mframe;
- uint8_t *buf;
-
- if (len>PLC_DRV_MTU) {
- unit->stats.emac.mac_recv_bad_len++;
- return NULL;
- }
-
- buf = unit->dcFuncs.dcAlloc(unit->dcObj, len);
- if (!buf) {
- unit->stats.emac.mac_alloc_recv_nok++;
- return NULL;
- }
-
- wait_sem(mac_recv_free_sem);
- if (list_empty(&mac_recv_free_queue)) {
- unit->stats.emac.mac_alloc_recv_nok++;
- signal_sem(mac_recv_free_sem);
- unit->dcFuncs.dcFree(mframe->unit->dcObj, buf);
- return NULL;
- }
- unit->stats.emac.mac_alloc_recv_ok++;
- mframe = (struct mac_frame*)
- list_entry(mac_recv_free_queue.next, struct mac_frame, link);
- mframe->frame_no = -1;
- mframe->buf = (char*)buf;
- mframe->unit = unit;
- list_del_init(&mframe->link);
- MFRAME_INFO(RX|MAC|ALLOC, mframe);
- signal_sem(mac_recv_free_sem);
-
- return mframe;
-}
-
-void mac_free_recv(struct mac_frame *mframe) {
- wait_sem(mac_recv_free_sem);
- MFRAME_INFO(RX|MAC|FREE, mframe);
- list_add_tail(&mframe->link, &mac_recv_free_queue);
- plc0->stats.emac.mac_free_recv++;
- signal_sem(mac_recv_free_sem);
-}
-
-
-void mac_queue_recv(struct mac_frame *mframe) {
- plc0->stats.emac.mac_queue_recv++;
- plc0->stats.emac.mac_recv_slices[mframe->pb_count]++;
- if (mac_bypass_queue_recv) {
- drv_handle_rx(mframe->unit,
- 0 /*host*/, 0 /* c_buf*/, 0 /* c_len */,
- (uint8_t*)mframe->buf, mframe->len,
- 0 /* subtype*/, 0 /*flags */, false /*failed*/);
- mac_free_recv(mframe);
- } else {
- wait_sem(mac_recv_sem);
- MFRAME_INFO(RX|MAC|QUEUE, mframe);
- list_add_tail(&mframe->link, &mac_recv_queue);
- signal_sem(mac_recv_sem);
- mac_wake_up_recv();
- }
-}
-
-void mac_poll_recv() {
-
- struct list_head *p;
- struct list_head *q;
- struct mac_frame *mframe;
-
- wait_sem(mac_recv_sem);
- list_for_each_safe(p, q, &mac_recv_queue) {
- mframe = (struct mac_frame*)list_entry(p, struct mac_frame, link);
- list_del_init(&mframe->link);
- MFRAME_INFO(RX|MAC|POLL, mframe);
- plc0->stats.emac.mac_poll_recv++;
- mframe->unit = plc_drv_get_unit(0); /* FIXME */
- drv_handle_rx(mframe->unit,
- 0 /*host*/, 0 /* c_buf*/, 0 /* c_len */,
- (uint8_t*)mframe->buf, mframe->len,
- 0 /* subtype*/, 0 /*flags */, false /*failed*/);
- mac_free_recv(mframe);
-
- }
- signal_sem(mac_recv_sem);
-}
-
-static void __ener_apply(void) {
-
- struct plcp_frame *pf;
- plcp_fmode_start(plc0);
- if (plc0->emac.slave_no>0) {
- pf = __xmit_pframe[pf_no];
- pf_xmit_start(pf);
- pf_no = (pf_no+1)%ENER_MAX_FRAMES;
- }
-}
-
-struct plcp_frame *plcp_alloc_recv() {
-
- struct plcp_frame *pframe;
-
- pframe = plcp_alloc_rx_frame();
- if (pframe) {
- pframe->pb_count = 0;
- pframe->pb_done_dma = 0;
- }
- return pframe;
-}
-
-void plcp_free_recv(struct plcp_frame *pframe) {
- plcp_free_rx_frame(pframe);
-}
-
-void plcp_queue_recv(struct plcp_frame *pframe) {
- uint32_t msr;
- plc0->stats.emac.plcp_queue_recv++;
- LOCK_SAVE(msr);
- list_add_tail(&pframe->link, &plcp_rx_queue);
- LOCK_RESTORE(msr);
- plcp_wake_up_recv();
-}
-
-void mac_drop_recv(struct mac_frame *mframe) {
- plc0->stats.emac.mac_drop_recv++;
- plc0->dcFuncs.dcFree(plc0->dcObj,mframe->buf);
- mac_free_recv(mframe);
-}
-
-/*
- * RETURNS:
- * 0 if frame if complete
- * -1 otherwise
- */
-
-int mac_recv_pb(struct mac_frame *mframe, struct pb *pb) {
-
- int offset;
- plc0->stats.emac.mac_recv_pb_ok++;
- mframe->len += pb->desc.len;
- mframe->sar_mask |= (1<<pb->desc.pb_no);
- offset = (pb->desc.pb_no*PB_PAYLOAD_SIZE);
- memcpy(mframe->buf+offset, pb->payload, pb->desc.len);
- MFRAME_INFO(RX|MAC|SAR, mframe);
- if (mframe->sar_mask == mframe->pb_mask) {
- mac_queue_recv(mframe);
- return 0;
- } else {
- return -1;
- }
-}
-
-void plcp_recv_pb(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int slice;
- int offset;
- int len;
- slice_t bit;
- struct pb *pb;
- struct mac_frame *mframe;
- struct mac_slave *slave;
-
- /* reset PB count. "used" flag must be taken into account */
- pframe->pb_count = 0;
- offset = 0;
- for (slice=0;slice<PLCP_MAX_SLICES;slice++, offset+=PMD_SLICE_SIZE, bit<<=1) {
- if (PB_ISSET(slice, &pframe->pb_mask)) {
- unit->stats.emac.mac_recv_pb_ok_fec++;
- unit->stats.emac.mac_recv_fec_ok[slice]++;
- pb = (struct pb*)(pframe->d_buf+offset);
-
- if (pb->desc.slave_no==0) {
- /* last used PB */
- break;
- }
-
- if (pb->desc.slave_no>ENER_MAX_SLAVES) {
- unit->stats.emac.mac_recv_slave_nok++;
- continue;
- }
-
- unit->stats.emac.mac_recv_slave_ok++;
- slave = &slaves[pb->desc.slave_no];
- pframe->pb_count++;
- slave->stats.recv_pb++;
- if (pb->desc.pb_no==0) {
- /* first PB in frame */
- if (slave->sar_mframe) {
- unit->stats.emac.mac_drop_incomplete++;
- /* last frame could not be reassembled */
- mac_drop_recv(slave->sar_mframe);
- slave->sar_mframe = NULL;
- slave->stats.drop_frame++;
- }
- len = pb->desc.pb_count * PB_PAYLOAD_SIZE;
- mframe = mac_alloc_recv(unit, len);
- if (mframe) {
- mframe->frame_no = pb->desc.frame_no;
- mframe->pf_no = pb->desc.pf_no;
- mframe->sar_count = 0;
- mframe->sar_mask = 0;
- mframe->pb_mask = (1<<pb->desc.pb_count)-1;
- mframe->pb_count = pb->desc.pb_count;
- mframe->len = 0;
- slave->sar_mframe = mframe;
- } else {
- /* could not allocate MAC frame */
- continue;
- }
- } else {
- /* not the first PB */
- if (!slave->sar_mframe) {
- /* missed first PB of current frame */
- continue;
- }
-
- if (slave->sar_mframe->frame_no!=pb->desc.frame_no) {
- /* missed last PBs of previous frame */
- /* missed first PBs of current frame */
- unit->stats.emac.mac_drop_bad_frame_no++;
- mac_drop_recv(slave->sar_mframe);
- slave->sar_mframe = NULL;
- slave->stats.drop_frame++;
- continue;
- }
- mframe = slave->sar_mframe;
- }
- if (mac_recv_pb(mframe, pb)==0) {
- slave->sar_mframe = NULL;
- slave->stats.recv_frame++;
- }
- } else {
- unit->stats.emac.mac_recv_pb_nok_fec++;
- unit->stats.emac.mac_recv_fec_nok[slice]++;
- }
- }
- unit->stats.emac.plcp_recv_slices[pframe->pb_count]++;
-}
-
-
-void plcp_poll_recv() {
-
- struct plcp_frame *pframe;
- uint32_t msr;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- LOCK_SAVE(msr);
- if (list_empty(&plcp_rx_queue)) {
- LOCK_RESTORE(msr);
- unit->stats.emac.plcp_poll_recv_nok++;
- } else {
- pframe = (struct plcp_frame*)
- list_entry(plcp_rx_queue.next, struct plcp_frame, link);
- list_del_init(&pframe->link);
- LOCK_RESTORE(msr);
- unit->stats.emac.plcp_poll_recv_ok++;
- plcp_recv_pb(unit, pframe);
- plcp_free_recv(pframe);
- }
-}
-
-void plcp_dump_pb(int mask, struct pb *pb) {
-#if 0
- struct pb_desc *desc = &pb->desc;
- MPRINT(mask,
- "frame_no %d pb %d [0..%d] len=%d used=%d more=%d\n",
- desc->frame_no, desc->pb_no, desc->pb_count-1,
- desc->len, desc->used, desc->more);
-#endif
-}
-
-void plcp_dump_pframe(int mask, struct plcp_frame *pframe) {
-
- int slice;
- int offset = 0;
- struct pb *pb;
- for (slice=0;slice<pframe->pb_count;slice++, offset+=PMD_SLICE_SIZE) {
- pb = (struct pb*)(pframe->d_buf+offset);
- plcp_dump_pb(mask, pb);
- }
-}
-
-DevErr mac_init(void) {
- __mm = &mac_modes[0];
- plc0 = plc_drv_get_unit(0);
-
-
- return plcp_init();
-}
-
-DevErr mac_open(struct plc_drv_unit *unit) {
- return __mm->__open(unit);
-}
-
-static int __ener_open(struct plc_drv_unit *unit) {
-
- int i;
- mib_mib *mib;
-
- mac_lock_recv_sem = create_sem(1);
- mac_lock_xmit_sem = create_sem(1);
- mac_recv_sem = create_sem(1);
- mac_recv_free_sem = create_sem(1);
-
- plcp_lock_recv_sem = create_sem(1);
- plcp_lock_xmit_sem = create_sem(1);
-
- for (i=0; i<MAC_TX_RING_SIZE; i++) {
- INIT_LIST_HEAD(&mac_xmit_frames[i].link);
- list_add(&mac_xmit_frames[i].link, &mac_xmit_free_queue);
- MFRAME_INFO(TX|MAC, &mac_xmit_frames[i]);
- }
- for (i=0; i<MAC_RX_RING_SIZE; i++) {
- INIT_LIST_HEAD(&mac_recv_frames[i].link);
- list_add(&mac_recv_frames[i].link, &mac_recv_free_queue);
- MFRAME_INFO(RX|MAC, &mac_xmit_frames[i]);
- }
- memset(slaves,0,sizeof(slaves));
-
- ui_add_cmd2("hb one gpio", __ener_one_hb_gpio,
- "send one heartbeat on GPIO", UI_SPV );
- ui_add_cmd2("hb one local", __ener_one_hb_local,
- "simulate heartbeat locally", UI_SPV );
- ui_add_cmd2("hb start gpio", __ener_start_hb,
- "start generating heartbeat on GPIO", UI_SPV );
- ui_add_cmd2("hb start local", __ener_start_hb_internal,
- "start local heartbeat (internal)", UI_SPV );
- ui_add_cmd2("hb stop", __ener_stop_hb,
- "stop local heartbeat", UI_SPV );
- ui_add_cmd2("emac get conf", __ener_get_conf,
- "get EMAC configuration", UI_SPV );
- ui_add_cmd2("emac get stats", __ener_get_stats,
- "get EMAC statistics", UI_SPV );
- ui_add_cmd2("emac get queues", __ener_get_queues,
- "get EMAC queues", UI_SPV );
- ui_add_cmd2("emac get dist", __ener_get_dist,
- "get EMAC distribution", UI_SPV );
- ui_add_cmd2("emac set gain", __ener_set_gain,
- "set EMAC gain for TX", UI_SPV );
- ui_add_cmd2("emac set gap", __ener_set_gap,
- "set minimum gap between FEC and write process (TX)", UI_SPV );
-
- ui_add_cmd2("emac set beacon offset", __ener_set_beacon_offset,
- "set offset from heartbeat", UI_SPV );
- ui_add_cmd2("emac set beacon spaces", __ener_set_beacon_spaces,
- "set number of slots between 2 beacons", UI_SPV );
- ui_add_cmd2("emac set frame spaces", __ener_set_frame_spaces,
- "set number of slots between 2 frames", UI_SPV );
-
- ui_add_cmd2("emac set master", __ener_set_master,
- "set device type to master", UI_SPV );
- ui_add_cmd2("emac set slave", __ener_set_slave,
- "set device type to slave", UI_SPV );
- ui_add_cmd2("emac set nb_slave", __ener_set_nb_slave,
- "set number of slaves", UI_SPV );
-
- ui_add_cmd2("emac set slices", __ener_set_slices,
- "set number of slices per slave", UI_SPV );
- ui_add_cmd2("emac set cid", __ener_set_cid,
- "set CID used by every slave", UI_SPV );
- ui_add_cmd2("emac clean stats", __ener_clean_stats,
- "get EMAC statistics", UI_SPV );
- ui_add_cmd2("emac queue recv off", __ener_queue_recv_off,
- "disable queueing of rx frames (frames are delivered by PLCP).",
- UI_SPV );
- ui_add_cmd2("emac queue recv on", __ener_queue_recv_on,
- "enable queueing of rx frames (frames are delivered by MAC).",
- UI_SPV );
-
-#ifdef W_LOG_DEBUG
- ui_add_cmd2("emac get wlog", __ener_get_w_log,
- "get write log", UI_SPV );
- ui_add_cmd2("emac get pflog", __ener_get_pf_log,
- "get pframe log", UI_SPV );
-#endif
-
- mib = mibGetCopy();
- unit->emac = mib->emac_conf;
- mibFree(mib);
-
- plcp_open(unit, &__mm->callbacks);
-
- return 0;
-
-}
-
-DevErr mac_start(struct plc_drv_unit *unit) {
- return __mm->__start(unit);
-}
-
-static int __ener_start(struct plc_drv_unit *unit) {
-
- int i;
-
- struct plcp_frame *pf;
-
- if (plcp_start(unit)<0) {
- return -1;
- }
- plcp_enable(unit);
-
- for (i=0;i<ENER_MAX_FRAMES;i++) {
- pf = plcp_alloc_tx_frame();
- __xmit_pframe[i] = pf;
- pf_xmit_init(pf);
- pf->no = i;
- }
-
- /* send first frame (empty) */
- pf_no = 0;
-
- __ener_apply();
- heartbeat_init();
- return 0;
-}
-
-OS_PROCESS(mac_recv)
-{
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
-
- set_fsem((OSFSEMVAL)0, mac_recv_);
- while (1) {
- wait_fsem((OSFSEMVAL)1);
- wait_sem(mac_lock_recv_sem);
- mac_poll_recv();
- signal_sem(mac_lock_recv_sem);
- }
-}
-
-OS_PROCESS(plcp_recv)
-{
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
-
- set_fsem((OSFSEMVAL)0, plcp_recv_);
- while (1) {
- wait_fsem((OSFSEMVAL)1);
- wait_sem(plcp_lock_recv_sem);
- plcp_poll_recv();
- signal_sem(plcp_lock_recv_sem);
- }
-}
-
-void mac_lock(struct plc_drv_unit *unit) {
- wait_sem(mac_lock_xmit_sem);
- wait_sem(mac_lock_recv_sem);
- wait_sem(plcp_lock_xmit_sem);
- wait_sem(plcp_lock_recv_sem);
-}
-
-void mac_unlock(struct plc_drv_unit *unit) {
- signal_sem(mac_lock_xmit_sem);
- signal_sem(mac_lock_recv_sem);
- signal_sem(plcp_lock_xmit_sem);
- signal_sem(plcp_lock_recv_sem);
-}
-
-void mac_dump_conf(struct plc_drv_unit *unit) {
- printf("mac .................. ENERMAC \n");
- printf("fixed gain ........... %d (0x%x)\n",
- unit->emac.gain, unit->emac.gain);
- printf("FEC gap .............. %d\n", unit->emac.gap);
- printf("emac queue recv ...... %s \n",
- mac_bypass_queue_recv ? "disabled":"enabled");
- if (unit->emac.slave_no>0) {
- printf("device type .......... slave #%d \n",
- unit->emac.slave_no);
- } else {
- printf("device type .......... master \n");
- }
- printf("nb slaves ............ %d\n", unit->emac.nb_slaves);
- printf("frame slots .......... %d (%d us)\n",
- unit->emac.frame_slots,
- (unit->emac.frame_slots*PMD_SYMBOL_DURATION)/1000);
- printf("inter frame spaces ... %d (%d us)\n",
- unit->emac.frame_spaces,
- (unit->emac.frame_spaces*PMD_SYMBOL_DURATION)/1000);
- printf("inter beacon spaces ... %d (%d us)\n",
- unit->emac.beacon_spaces,
- (unit->emac.beacon_spaces*PMD_SYMBOL_DURATION)/1000);
-
- printf("beacon offset ......... %d (%d us)\n",
- unit->emac.beacon_offset, (unit->emac.beacon_offset*PMD_SYMBOL_DURATION)/1000);
-}
-
-/* ------------------------------------------------------ PLCP ISR */
-/*
- * This function is called by PMD when the last slice of payload
- * has been sent.
- */
-void mac_tx_end_isr(struct plc_drv_unit *unit, struct plcp_frame *pf)
-{
- if (pf->state==PF_XMIT) {
- unit->stats.emac.plcp_xmit_done_ok++;
- } else {
- unit->stats.emac.plcp_xmit_done_nok++;
- }
-
- PF_LOG(__LINE__, pf->no);
-
- /* done xmit (pf_no-1) */
- pf_xmit_done(unit, pf);
- pf_xmit_init(pf);
-
- /* write prepared frame */
- pf = __xmit_pframe[pf_no];
- pf_xmit_start(pf);
-
- /* prepare next frame */
- pf_no = (pf_no+1)%ENER_MAX_FRAMES;
-}
-
-void mac_rx_end_isr(struct plc_drv_unit *unit, struct plcp_frame *pframe)
-{
- unit->stats.emac.plcp_recv_done++;
- plcp_queue_recv(pframe);
-}
-
-/* --------------------------------------------- DUMMY FUNCTIONS */
-
-void test_init(struct plc_drv_unit *unit) { }
-void ce_init(struct plc_drv_unit *unit) { }
-void neighbour_init(struct plc_drv_unit *unit) { }
-void plcp_init_ber(void) { }
-void carp_init_ui(struct plc_drv_unit *unit) { }
-int shell_glomerOn(int argc, char *argv[]) { return RET_SUCCESS; }
-int shell_glomerOff(int argc, char *argv[]) { return RET_SUCCESS; }
-int ce_get_nb_hosts() { return 0; }
-
-//#define FEC_WORDS_PER_SLICE 256
-//#define FEC_MAX_SLICES 16
-
-int shell_xxmem(int argc, char *argv[]) {
-
-#ifndef softOSE
- int c, n = FEC_WORDS_PER_SLICE * FEC_MAX_SLICES, l;
- bool commas = false;
- int w;
- volatile uint16_t *addr;
- bool fec_diag = false;
-
- if (strcmp(argv[0],"txmem")==0) {
- addr = (volatile uint16_t*)PMD_FEC_TX_MEM;
- } else {
- addr = (volatile uint16_t*)PMD_FEC_RX_MEM;
- }
-
- getopt_clear();
-
- while ((c = getopt(argc, argv, "n:chfrs:")) != EOF)
- {
- switch (c)
- {
- case 'c':
- commas = true;
- break;
-
- case 'f':
- fec_diag = true;
- break;
-
- case 'n':
- n = strtoul(optarg,NULL,0);
- break;
-
- case 's':
- n = strtoul(optarg,NULL,0);
- n = n * FEC_WORDS_PER_SLICE;
- break;
-
- case 'h':
- default:
- goto usage;
- }
- }
-
- plcp_fec_dbg_mem_enable();
- l = 0;
- if (commas) {
- printf("{");
- w = 0;
- while (n--) {
- if (!w) {
- printf("\n ");
- w = 8;
- if (++l==32) {
- l = 0;
- printf("\n");
- }
- }
- w--;
- printf("0x%04x, ",*addr);
- addr++;
- }
- printf("\n}\n");
- } else {
- while (--n) {
- printf("%08x %04x\n", addr, *addr);
- addr++;
- }
- }
- while ((c = getopt(argc, argv, "n:chfrs:")) != EOF)
- {
- switch (c)
- {
- case 'c':
- commas = true;
- break;
-
- case 'f':
- fec_diag = true;
- break;
-
- case 'n':
- n = strtoul(optarg,NULL,0);
- break;
-
- case 's':
- n = strtoul(optarg,NULL,0);
- n = n * FEC_WORDS_PER_SLICE;
- break;
-
- case 'h':
- default:
- goto usage;
- }
- }
-
- plcp_fec_dbg_mem_enable();
- l = 0;
- if (commas) {
- printf("{");
- w = 0;
- while (n--) {
- if (!w) {
- printf("\n ");
- w = 8;
- if (++l==32) {
- l = 0;
- printf("\n");
- }
- }
- w--;
- printf("0x%04x, ",*addr);
- addr++;
- }
- printf("\n}\n");
- } else {
- while (--n) {
- printf("%08x %04x\n", addr, *addr);
- addr++;
- }
- }
- plcp_fec_dbg_mem_disable();
- return RET_SUCCESS;
-
-usage:
- printf("%s options:\n",argv[0]);
- printf(" -c displays memory words separated with commas\n");
- printf(" -n <words> displays only <words> words\n");
-
-#endif /* softOSE */
- return RET_SUCCESS;
-}
-
-static void __ener_dump_plcp_queue(struct list_head *head, int n) {
- struct list_head *p;
- struct plcp_frame *pframe;
- uint32_t msr;
- LOCK_SAVE(msr);
- printf("0x%0x (0x%x, 0x%x) HEAD\n", head, head->prev, head->next);
- list_for_each(p, head) {
- pframe = (struct plcp_frame*)
- list_entry(p, struct plcp_frame, link);
- printf("0x%0x (0x%0x, 0x%0x) slices=%d\n",
- &pframe->link,
- pframe->link.prev,
- pframe->link.next,
- pframe->pb_count);
- if (--n<=0) {
- printf("*** CORRUPTED ***\n");
- LOCK_RESTORE(msr);
- return;
- }
- }
- LOCK_RESTORE(msr);
-}
-
-static void __ener_dump_mac_queue(struct list_head *head, int n) {
- struct list_head *p;
- struct mac_frame *mframe;
- uint32_t msr;
- LOCK_SAVE(msr);
- printf("0x%0x (0x%x, 0x%x) HEAD\n", head, head->prev, head->next);
- list_for_each(p, head) {
- mframe = (struct mac_frame*)
- list_entry(p, struct mac_frame, link);
- printf("0x%0x (0x%0x, 0x%0x) frame_no=%d.%d pb_count=%d mask=%x/%x\n",
- &mframe->link,
- mframe->link.prev,
- mframe->link.next,
- mframe->pf_no,
- mframe->frame_no,
- mframe->pb_count,
- mframe->sar_mask,
- mframe->pb_mask);
- if (--n<=0) {
- printf("*** CORRUPTED ***\n");
- LOCK_RESTORE(msr);
- return;
- }
- }
- LOCK_RESTORE(msr);
-}
-
-void INLINE PERCENT(int n, int total) {
- printf("%d/%d (%.2f %%)\n",
- (n), (total), 100*((float)(n)/(float)(total)));
-}
-
-void INLINE TRI(int valid ,int invalid) {
- printf("%d/%d/%d (%.2f %%)\n",
- (valid), (invalid), (valid+invalid),
- 100*((float)(valid)/(float)(valid+invalid)));
-}
-
-void INLINE TRII(int valid, int invalid1, int invalid2) {
- printf("%d/%d+%d/%d (%.2f %%)\n",
- (valid), invalid1, invalid2, (valid+invalid1+invalid2),
- 100*((float)(valid)/(float)(valid+invalid1+invalid2)));
-}
-
-static int __ener_one_hb_gpio(int argc, char **argv) {
- static int reg;
- ApGpio_dev_t *ApGpio_dev = (ApGpio_dev_t *) GPIO_BASE;
- /* write 1 on GPIOs 24 to 30 */
- ApGpio_dev->GPIO_31_24.data_out = 0xFF;
- ApGpio_dev->GPIO_31_24.direction = 0x80;
- reg = ApGpio_dev->GPIO_31_24.data_out;
- ApGpio_dev->GPIO_31_24.data_out = 0x80;
- ApGpio_dev->GPIO_31_24.direction = 0x80;
- reg = ApGpio_dev->GPIO_31_24.data_out;
- return RET_SUCCESS;
-}
-
-static int __ener_one_hb_local(int argc, char **argv) {
- mac_heartbeat();
- return RET_SUCCESS;
-}
-
-static void __hb_tmo(uint32_t user_obj, uint32_t ose_date) {
- __ener_one_hb_gpio(0, 0);
-}
-
-uint32_t timer_obj;
-
-static int __ener_start_hb(int argc, char **argv) {
-
- uint32_t req_date;
- uint32_t beacon_slots;
- uint32_t beacon_period;
-
- beacon_slots = plc0->emac.frame_slots + plc0->emac.frame_spaces;
- beacon_slots *= plc0->emac.nb_slaves;
-
- beacon_period = beacon_slots + plc0->emac.beacon_spaces;
- beacon_period = (beacon_period*PMD_SYMBOL_DURATION)/1000;
-
- utmo_request(&timer_obj, &req_date, __hb_tmo, 0, beacon_period, 1);
- return RET_SUCCESS;
-}
-
-static void __hb_tmo_internal(uint32_t user_obj, uint32_t ose_date) {
- mac_heartbeat();
-}
-
-static int __ener_start_hb_internal(int argc, char **argv) {
-
- uint32_t req_date;
- uint32_t beacon_slots;
- uint32_t beacon_period;
-
- beacon_slots = plc0->emac.frame_slots + plc0->emac.frame_spaces;
- beacon_slots *= plc0->emac.nb_slaves;
-
- beacon_period = beacon_slots + plc0->emac.beacon_spaces;
- beacon_period = (beacon_period*PMD_SYMBOL_DURATION)/1000;
-
- utmo_request(&timer_obj, &req_date, __hb_tmo_internal, 0, beacon_period, 1);
-}
-
-static int __ener_stop_hb(int argc, char **argv) {
- utmo_cancel(timer_obj);
- return RET_SUCCESS;
-}
-
-static int __ener_get_conf(int argc, char **argv) {
- mac_dump_conf(plc0);
- return RET_SUCCESS;
-}
-
-static int __ener_get_stats(int argc, char **argv) {
- struct emac_stats _s, *s = &_s;
- struct mac_slave *slave;
- int i;
- uint32_t msr;
-
- LOCK_SAVE(msr);
- *s = plc0->stats.emac;
- for (i=1;i<=ENER_MAX_SLAVES;i++) {
- slave = &slaves[i];
- printf("slave[%d].recv_pb ......... %d\n", i, slave->stats.recv_pb);
- printf("slave[%d].recv_frame ......... %d\n", i, slave->stats.recv_frame);
- printf("slave[%d].drop_frame ......... %d\n", i, slave->stats.drop_frame);
- }
- LOCK_RESTORE(msr);
-
- /* XMIT */
- printf("TRANSMIT\n");
- printf("mac_write ................ ");
- TRI(s->mac_write_ok, s->mac_write_nok);
- printf("plcp_write ............... ");
- TRI(s->plcp_write_ok, s->plcp_write_nok);
- printf("plcp_xmit_done ........... ");
- TRI(s->plcp_xmit_done_ok, s->plcp_xmit_done_nok);
-
- printf("\nRECEIVE\n");
- printf("mac_alloc_recv ........... ");
- TRI(s->mac_alloc_recv_ok, s->mac_alloc_recv_nok);
- printf("mac_free_recv ............ %d\n", s->mac_free_recv);
- printf("mac_recv_pb FEC .......... ");
- TRI(s->mac_recv_pb_ok_fec, s->mac_recv_pb_nok_fec);
- printf("mac_recv_pb slave_no ..... ");
- TRI(s->mac_recv_slave_ok, s->mac_recv_slave_nok);
- printf("mac_alloc_pb bad len ..... %d\n", s->mac_recv_bad_len);
- printf("mac_recv_pb SAR .......... ");
- TRI(s->mac_recv_pb_ok,
- s->mac_recv_slave_ok - s->mac_recv_pb_ok);
- printf("mac_sar_recv ............. ");
- TRII(s->mac_queue_recv, s->mac_drop_bad_frame_no, s->mac_drop_incomplete);
- printf("mac_poll_recv ............ %d\n", s->mac_poll_recv);
- printf("plcp_recv_done ........... %d\n", s->plcp_recv_done);
- printf("plcp_queue_recv .......... %d\n", s->plcp_queue_recv);
- printf("plcp_poll_recv ........... ");
- TRI(s->plcp_poll_recv_ok, s->plcp_poll_recv_nok);
-
- printf("heartbeat ................ %d\n", s->heartbeat);
- printf("pf_no .................... %d\n", pf_no);
-
-
- return RET_SUCCESS;
-}
-
-static int __ener_get_queues(int argc, char **argv) {
-
- int i;
- printf("TRANSMIT\n");
- printf("w_idx ..................... %d/%d\n", w_idx, ENER_WRITES-1);
- printf("done_idx .................. %d/%d\n", done_idx, ENER_WRITES-1);
- printf("w_buf[mac_xmit_queue ............ \n");
- i = done_idx;
- printf("w_buf[%d]=0x%08x w_len[%d]=%d (done_idx)",
- i,w_buf[i],i,w_len[i]);
- while (i!=w_idx) {
- i = (i+1)%ENER_WRITES;
- printf("\nw_buf[%d]=0x%08x w_len[%d]=%d ",i,w_buf[i],i,w_len[i]);
- }
- printf("(w_idx)\n");
-
- printf("\nRECEIVE\n");
- printf("mac_recv_queue ............ \n");
- __ener_dump_mac_queue(&mac_recv_queue, MAC_RX_RING_SIZE+2);
- printf("mac_recv_free_queue ....... \n");
- __ener_dump_mac_queue(&mac_recv_free_queue, MAC_RX_RING_SIZE+2);
- printf("plcp_rx_queue ............ \n");
- __ener_dump_plcp_queue(&plcp_rx_queue, PLCP_RX_RING_SIZE+2);
-#if 0
- printf("plcp_rx_free_queue ....... \n");
- __ener_dump_plcp_queue(&plcp_rx_free_queue, PLCP_RX_RING_SIZE+2);
-#endif
- return RET_SUCCESS;
-}
-
-static int __ener_get_dist(int argc, char **argv) {
-
- int slice;
- int total;
- int valid;
- int invalid;
- struct emac_stats _s, *s = &_s;
- uint32_t msr;
-
- LOCK_SAVE(msr);
- *s = plc0->stats.emac;
- LOCK_RESTORE(msr);
-
- printf("TRANSMIT\n");
- for (slice=0, total=0;slice<=PLCP_MAX_SLICES;slice++) {
- total += s->mac_xmit_slices[slice];
- }
- for (slice=0;slice<=PLCP_MAX_SLICES;slice++) {
- if (s->mac_xmit_slices[slice]>0) {
- printf("%2d-slices MAC frames .... ", slice);
- PERCENT(s->mac_xmit_slices[slice], total);
- }
- }
- for (slice=0, total=0;slice<=PLCP_MAX_SLICES;slice++) {
- total += s->plcp_xmit_slices[slice];
- }
- for (slice=0;slice<=PLCP_MAX_SLICES;slice++) {
- if (s->plcp_xmit_slices[slice]>0) {
- printf("%2d-slices PLCP frames .... ", slice);
- PERCENT(s->plcp_xmit_slices[slice], total);
- }
- }
-
- printf("\nRECEIVE\n");
- for (slice=0, total=0;slice<=PLCP_MAX_SLICES;slice++) {
- total += s->mac_recv_slices[slice];
- }
- for (slice=0;slice<=PLCP_MAX_SLICES;slice++) {
- if (s->mac_recv_slices[slice]>0) {
- printf("%2d-slices MAC frames .... ", slice);
- PERCENT(s->mac_recv_slices[slice], total);
- }
- }
- for (slice=0, total=0;slice<=PLCP_MAX_SLICES;slice++) {
- total += s->plcp_recv_slices[slice];
- }
- for (slice=0;slice<=PLCP_MAX_SLICES;slice++) {
- if (s->plcp_recv_slices[slice]>0) {
- printf("%2d-slices PLCP frames .... ", slice);
- PERCENT(s->plcp_recv_slices[slice], total);
- }
- }
-
- printf("FEC RX\n");
- valid = 0;
- invalid = 0;
- for (slice=0;slice<=PLCP_MAX_SLICES;slice++) {
- valid += s->mac_recv_fec_ok[slice];
- invalid += s->mac_recv_fec_nok[slice];
- total = s->mac_recv_fec_ok[slice] + s->mac_recv_fec_nok[slice];
- if (total>0) {
- printf("FEC status pb [%d] ....... ", slice);
- TRI(s->mac_recv_fec_ok[slice],
- s->mac_recv_fec_nok[slice]);
- }
- }
- printf("TOTAL .................... "); TRI(valid, invalid);
-
- return RET_SUCCESS;
-}
-
-static int __ener_set_gain(int argc, char **argv) {
-
- struct plcp_frame *pf;
- int i;
-
- plc0->emac.gain = strtoul(argv[1],NULL,0);
-
- for (i=0;i<ENER_MAX_FRAMES;i++) {
- pf = __xmit_pframe[i];
- pf->data_gain = plc0->emac.gain;
- pf->ctrl_gain = plc0->emac.gain;
- }
-
- return RET_SUCCESS;
-}
-
-static int __ener_set_master(int argc, char **argv) {
- plc0->emac.slave_no = 0;
- __ener_apply();
- return RET_SUCCESS;
-}
-
-static int __in_range(int argc, char **argv, int min, int max) {
- int val;
- if (argc!=2) {
- goto usage;
- }
- val = strtoul(argv[1],NULL,0);
- if ((val<min) || (val>max)) {
- goto usage;
- }
- return val;
-
-usage:
- printf("usage: %s <val>\n",argv[0]);
- printf(" where val in [%d..%d]\n", min, max);
- return -1;
-}
-
-static int __ener_set_slave(int argc, char **argv) {
- int slave_no = __in_range(argc, argv, 1, plc0->emac.nb_slaves);
- if (slave_no>=0) {
- plc0->emac.slave_no = slave_no;
- __ener_apply();
- }
- return RET_SUCCESS;
-}
-
-static int __ener_set_nb_slave(int argc, char **argv) {
- int nb_slaves = __in_range(argc, argv, 1, ENER_MAX_SLAVES);
- if (nb_slaves>=0) {
- plc0->emac.nb_slaves = nb_slaves;
- }
- return RET_SUCCESS;
-}
-
-static int __ener_set_slices(int argc, char **argv) {
- int slices = __in_range(argc, argv, 1, PLCP_MAX_SLICES);
- if (slices>=0) {
- plc0->emac.slices = slices;
- __ener_apply();
- }
- return RET_SUCCESS;
-}
-
-static int __ener_set_cid(int argc, char **argv) {
- int cid = __in_range(argc, argv, 1, 10);
- if (cid>0) {
- plc0->emac.cid = cid;
- __ener_apply();
- }
- return RET_SUCCESS;
-}
-
-
-int __ener_queue_recv_off(int argc, char **argv) {
- mac_bypass_queue_recv = 1;
- return RET_SUCCESS;
-}
-
-int __ener_queue_recv_on(int argc, char **argv) {
- mac_bypass_queue_recv = 0;
- return RET_SUCCESS;
-}
-
-static int __ener_clean_stats(int argc, char **argv) {
- int i;
- uint32_t msr;
- LOCK_SAVE(msr);
- for (i=0;i<=ENER_MAX_SLAVES;i++) {
- memset(&slaves[i].stats, 0, sizeof(struct slave_stats));
- }
- memset(&plc0->stats.emac, 0, sizeof(plc0->stats.emac));
- LOCK_RESTORE(msr);
- return RET_SUCCESS;
-}
-
-static int __ener_set_gap(int argc, char **argv) {
-
- plc0->emac.gap = strtoul(argv[1],NULL,0);
- if (plc0->emac.gap<PLCP_TX_SLICE_INTERVAL) {
- plc0->emac.gap = PLCP_TX_SLICE_INTERVAL;
- printf("gap adjusted to minimum value (%d)\n", plc0->emac.gap);
- }
- return RET_SUCCESS;
-}
-
-static int __ener_set_frame_spaces(int argc, char **argv) {
-
- plc0->emac.frame_spaces = strtoul(argv[1],NULL,0);
- __ener_apply();
-
- return RET_SUCCESS;
-}
-
-static int __ener_set_beacon_offset(int argc, char **argv) {
- plc0->emac.beacon_offset = strtoul(argv[1],NULL,0);
- __ener_apply();
- return RET_SUCCESS;
-}
-
-static int __ener_set_beacon_spaces(int argc, char **argv) {
- plc0->emac.beacon_spaces = strtoul(argv[1],NULL,0);
- __ener_apply();
- return RET_SUCCESS;
-}
-
-void mac_heartbeat(void) {
-
- uint16_t date;
- uint16_t tx_schedule;
- gpio_write2(SLAVE_HB_GPIO, 1);
- led_on(2);
- if (plc0->emac.nb_slaves>1) {
- date = plcp_get_timer(plc0);
- tx_schedule = date + plc0->emac.beacon_offset;
- tx_schedule +=
- ((plc0->emac.slave_no-1)*(plc0->emac.frame_slots+plc0->emac.frame_spaces));
- pmd_request_timer2(plc0->id, tx_schedule);
- PLCP_LOG(date, "HEARTBEAT tx_schedule", tx_schedule);
- }
- /* NB : if only one slave, we transmit as soon as we have the tx_end */
- led_off(2);
- plc0->stats.emac.heartbeat++;
- gpio_write2(SLAVE_HB_GPIO, 0);
-}
-
-void heartbeat_install(void) {
- PROCESS pid;
- void heartbeat(void);
-
- pid = create_process(OS_INT_PROC, "heartbeat",
- heartbeat, /* entry point */
- 4096, /* stacksize */
- GPIOINTS2_PRIO, /* priority */
- (OSTIME) 0 /* timeslice */,
- (PROCESS)0 /* bid */,
- (struct OS_redir_entry *)0,
- GPIOINTS2_VECTOR, /* GPIO 16-23 */
- (OSUSER)0);
-
-}
-
-void heartbeat_init(void) {
-
- uint32_t msr;
- ApVic_dev_t *ApVic_dev = (ApVic_dev_t *) APVIC_BASE;
-
- /* 16 : IN (heartbeat) */
- /* 17..23 : IN (nothing) */
- gpio_dev->GPIO_23_16.direction = 0xFF;
-
- /* 16 : EDGE mode */
- /* 17..23 : LEVEL mode */
- gpio_dev->GPIO_23_16.edge = 0x01;
-
- /* 16 : Trigger on Rising Edge */
- gpio_dev->GPIO_23_16.polarity = 0x01;
-
- /* 16..23 : no resync */
- gpio_dev->GPIO_23_16.resync = 0x00;
-
- /* clear any interrupt */
- gpio_dev->GPIO_23_16.raw_status = 0xFF;
-
- /* 16 : IT enabled */
- gpio_dev->GPIO_23_16.enable_set = 0x01;
-
-#if 0
- LOCK_SAVE(msr);
- ApVic_dev->priority_table_channel[E110_INT_VECTOR] = 3;
- ApVic_dev->priority_table_channel[GPIOINTS2_VECTOR] = 0;
- ApVic_dev->priority_table_channel[PLC_INT_RX_VECTOR] = 2;
- ApVic_dev->priority_table_channel[PLC_INT_PHLIC_VECTOR] = 1;
- ApVic_dev->priority_table_channel[PLC_INT_ERR_VECTOR] = 1;
- ApVic_dev->priority_table_channel[UARTINTR0_VECTOR] = 4;
- LOCK_RESTORE(msr);
-#endif
-}
-
-void emac_get_defaults(struct emac_conf *conf) {
- conf->gain = 800;
- conf->gap = 32;
- conf->slave_no = 0;
- conf->nb_slaves = ENER_MAX_SLAVES;
- conf->beacon_offset = 10;
- conf->beacon_spaces = 0;
- conf->frame_spaces = 2;
- conf->cid = 6;
- conf->slices = PLCP_MAX_SLICES;
-}
-
-void emac_get_conf(struct emac_conf *conf) {
- *conf = plc0->emac;
-}
-
-void emac_set_conf(struct emac_conf *conf) {
- plc0->emac = *conf;
-}
-
diff --git a/app/sm-emac-drv/src/plc_ber.c b/app/sm-emac-drv/src/plc_ber.c
deleted file mode 100755
index a7cc6597d4..0000000000
--- a/app/sm-emac-drv/src/plc_ber.c
+++ /dev/null
@@ -1,2280 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#include <unistd.h>
-#else
-#ifndef softOSE
-#include <unistd.h>
-#include <sys/stat.h>
-#include "shell.h"
-#endif
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "math.h"
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_dbg.h"
-#include "plc_ber.h"
-#include "list.h"
-#include "shell_if.h"
-#ifndef softOSE
-#include "getopt.h"
-#endif
-#include "plcp_core.h"
-#include "lib_if.h"
-
-int group_valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-int group_invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
-int __tx_slices;
-
-struct bad_slice {
- uint16_t rx_mem[FEC_MAX_SLICES*FEC_WORDS_PER_SLICE];
- uint8_t d_buf[PLCP_MAX_SLICES*PMD_SLICE_SIZE];
- bool hw_good_slice[PLCP_MAX_SLICES];
- uint32_t hw_status[PLCP_MAX_SLICES];
- bool good_slice[PLCP_MAX_SLICES];
- struct pmd_band_quality rx_qual[PMD_MAX_BANDS];
- int slices;
- int pattern;
- int d_len;
- int mismatch;
-#define NO_MISMATCH 0
-#define HW_FALSE_BAD_SLICE 1
-#define HW_FALSE_GOOD_SLICE 2
-};
-
-static struct pmd_band_quality *__bpsk_qual[PMD_MAX_BANDS];
-static struct pmd_band_quality *__qam256_qual[PMD_MAX_BANDS];
-static struct pmd_band_quality __bpsk;
-static struct pmd_band_quality __qam256;
-
-static uint8_t __slice_pattern[PLCP_MAX_SLICES*PMD_SLICE_SIZE];
-
-/* obtenu en regardant la mémoire de debug en TX aprés injection
- * de 16 slices (maximum que le fec peut mémoriser) */
-
-static uint16_t __rx_control[PMD_MAX_BANDS][BER_CONTROL_PATTERN_SIZE/2];
-#ifndef __KERNEL__
-__ALIGN(512)
-#endif
-static struct bad_slice __bad_slice
-#ifdef __KERNEL__
-__attribute__((aligned(512)))
-#endif
-;
-
-static uint16_t
-__control_patterns[BER_PATTERN_MAX+1][BER_CONTROL_PATTERN_SIZE/2];
-
-static char __shell_line[128];
-
-struct mem_curs {
- int nbits; /* number of valid bits in reg */
- uint32_t reg;
- uint32_t *addr; /* next address to read */
-};
-
-void mem_curs_init(struct mem_curs *curs, void *addr) {
- curs->reg = 0;
- curs->nbits = 0;
- curs->addr = addr;
-}
-
-uint32_t mem_curs_read(struct mem_curs *curs, int nbits) {
- uint32_t reg;
- int low_bits, high_bits;
- uint32_t low, high;
- if (nbits<=curs->nbits) {
- reg = curs->reg & ((1<<nbits)-1);
- curs->nbits -= nbits;
- curs->reg >>= nbits;
- } else {
- low_bits = curs->nbits;
- high_bits = nbits - low_bits;
- low = curs->reg;
-
- /* read 32 bits */
- curs->reg = *(curs->addr);
- curs->addr++;
- if (high_bits==32) {
- high = curs->reg;
- curs->nbits = 0;
- curs->reg = 0;
- reg = high;
- } else {
- high = curs->reg & ((1<<high_bits)-1);
- curs->nbits = 32 - high_bits;
- curs->reg >>= high_bits;
- reg = (high<<low_bits)|(low);
- }
- }
- return reg;
-}
-
-int mem_curs_compare(struct mem_curs *exp, struct mem_curs *real, int nbits) {
-
- uint32_t exp_reg = mem_curs_read(exp, nbits);
- uint32_t real_reg = mem_curs_read(real, nbits);
- uint32_t diff = exp_reg ^ real_reg;
- return dword_ones(diff);
-}
-
-void mem_shrink(uint8_t *dst, uint16_t *src, int nbytes) {
-
- int n, n_slice;
- uint16_t low, high;
- struct mem_curs curs;
- mem_curs_init(&curs,src);
- for (n_slice=0,n=0;n<nbytes;) {
- if (n_slice==241) {
- n_slice = 1;
- src += 15;
- } else {
- n_slice++;
- }
- low = *src++;
- if (n_slice==241) {
- n_slice = 1;
- src += 15;
- } else {
- n_slice++;
- }
- high = *src++;
- *dst++ = (uint8_t)(low);
- *dst++ = (uint8_t)((high<<4)|((low&0x0f00)>>8));
- *dst++ = (uint8_t)(high>>4);
- n += 3;
- }
-}
-
-uint32_t rxmem[FEC_MEMSIZE/4];
-uint32_t txmem[FEC_MEMSIZE/4];
-uint32_t shrinked_rxmem[(FEC_SHRINKED_MEMSIZE+3)/4];
-uint32_t shrinked_txmem[(FEC_SHRINKED_MEMSIZE+3)/4];
-
-uint16_t read_carrier_bits(int carrier_bits,
- uint16_t *mem_word, int *mem_bits, uint16_t **addr, int mem_width)
-{
-
- uint16_t carrier_word;
- uint16_t *adresse;
- int low_bits, high_bits;
- uint16_t low_word;
- uint16_t high_word;
- uint32_t last_byte, high_byte;
-
- /* si le nombre de bits disponible est plus petit que le nombre de bits
- * demandés */
- if (*mem_bits<carrier_bits) {
- /* read low order bits */
- low_bits = *mem_bits;
- low_word = *mem_word;
- adresse=(*addr);
-
- /* read high order bits */
- high_bits = carrier_bits - low_bits;
- *mem_word = *adresse;
- high_word = ((*mem_word&((1<<high_bits)-1))<<low_bits);
- carrier_word = high_word+low_word;
-
-#if 0
- printf(" (((%04x & %04x)<<%d)=%04x + (%04x) -> %04x\n",
- *mem_word, ((1<<high_bits)-1), low_bits, high_word,
- low_word, carrier_word);
-#endif
-
- *mem_bits = mem_width - high_bits;
- *mem_word = *mem_word >> high_bits;
- last_byte=((uint32_t)adresse) & 0x000001ff;
- high_byte=((uint32_t)adresse) & 0xfffffe00;
-
- //printf("addr=%08x lastb=%08x highb=%08x\n",adresse,last_byte,high_byte);
- if ((mem_width==12) && (last_byte>=480)){
- *addr=(uint16_t*)(high_byte+0x200);
- //printf(".\n");
- } else {
- (*addr)++;
- }
- } else {
- carrier_word = (*mem_word & ((1<<carrier_bits)-1));
-
-#if 0
- printf(" (%04x & %04x) -> %04x\n",
- *mem_word, ((1<<carrier_bits)-1), carrier_word);
-#endif
-
- *mem_bits -= carrier_bits;
- *mem_word = (*mem_word >> carrier_bits);
- }
- return carrier_word;
-}
-
-void skip_nbits(int nbits,
- uint16_t *mem_word, int *mem_bits, uint16_t **addr, int mem_width)
-{
- int bits;
- while (nbits>0) {
- bits = (nbits<mem_width?nbits:mem_width);
- read_carrier_bits(bits, mem_word, mem_bits, addr, mem_width);
- }
-}
-
-void plcp_control_map(struct plc_drv_unit *unit,
- uint16_t *mem_real_addr, int nbits, int band,
- bool compare_with_expected, bool errors_only, int pattern, int offset)
-{
- int group, bits, frame_bit;
- int notch, carrier;
- int errors;
- char *p;
-
- uint16_t real_word; /* bits really transfered on a specific carrier */
- int mem_real_bits = 0;
- uint16_t mem_real_word = 0;
-
- uint16_t exp_word; /* bits expected on a specific carrier */
- int mem_exp_bits = 0;
- uint16_t mem_exp_word = 0;
-
- uint16_t *mem_exp_addr;
-
- if (compare_with_expected) {
- if ((pattern<0) || (pattern>BER_PATTERN_MAX)) {
- printf("invalid control pattern %d, no comparison done.\n",
- pattern);
- compare_with_expected = false;
- mem_exp_addr = __control_patterns[0];
- } else {
- mem_exp_addr = __control_patterns[pattern];
- }
- }
-
- /* expected address is cber_patern */
- bits = 1; /* BPSK */
-
- /* Compute the number of bits that each band can send in one symbol */
- printf("band grp \n");
- for (group=0, frame_bit=0; nbits && group<PMD_GROUPS_PER_BAND;group++) {
- notch = plcp_notchs_bitmap[band][group]|plcp_pilots_bitmap[band][group];
- errors = 0;
- p = __shell_line;
- p += sprintf(p, "%4d %3d ", band, group);
- for (carrier=0;nbits && carrier<PMD_CARRIERS_PER_GROUP;
- carrier++, notch>>=1) {
- if (notch&1) {
- p += sprintf(p, "-- ");
- } else {
- if (frame_bit>=offset) {
- /*
- * For control BER we do not read
- * memory until we reach the required offset.
- * In fact we want the comparison to
- * start at the 'mem_real_addr' address (which
- * is the start of an unvoted plcp_header).
- * The offset is used to determine on which group
- * the transmission of this plcp_header has
- * started (to take into account the previous
- * - voted - copy of the plcp_header).
- */
- real_word = read_carrier_bits(bits,
- &mem_real_word, &mem_real_bits,
- &mem_real_addr, 16);
- exp_word = read_carrier_bits(bits,
- &mem_exp_word, &mem_exp_bits,
- &mem_exp_addr, 16);
- if (compare_with_expected) {
- if (exp_word!=real_word) {
- p += sprintf(p, "%d[%d]* ", real_word, exp_word);
- errors++;
- } else {
- p += sprintf(p, "%d[%d] ", real_word, exp_word);
- }
- } else {
- p += sprintf(p, "%d ", real_word);
- }
- nbits--;
- }
- frame_bit++;
- } /* notch ? */
- } /* carriers */
- if (frame_bit>=offset) {
- if ((errors) || (!errors_only)) {
- printf("%s\n", __shell_line);
- }
- }
- } /* group */
-}
-
-void plcp_control_ber(struct plc_drv_unit *unit,
- uint16_t *mem_real_addr,
- uint16_t *mem_exp_addr, int nbits, int band, int offset) {
-
- int group, bits, i, frame_bit;
- int notch, carrier;
-
- uint16_t real_word; /* bits really transfered on a specific carrier */
- int mem_real_bits = 0;
- uint16_t mem_real_word = 0;
-
- uint16_t exp_word; /* bits expected on a specific carrier */
- int mem_exp_bits = 0;
- uint16_t mem_exp_word = 0;
-
- bits = 1; /* BPSK */
-
- /* Compute the number of bits that each band can send in one symbol */
- for (group=0, frame_bit=0; nbits && group<PMD_GROUPS_PER_BAND;group++) {
- notch = plcp_notchs_bitmap[band][group]|plcp_pilots_bitmap[band][group];
- for (i=0;nbits && i<PMD_CARRIERS_PER_GROUP; i++, notch>>=1) {
- if ((notch&1)==0) {
- if (frame_bit>=offset) {
- real_word = read_carrier_bits(bits,
- &mem_real_word, &mem_real_bits,
- &mem_real_addr, 16);
- exp_word = read_carrier_bits(bits,
- &mem_exp_word, &mem_exp_bits,
- &mem_exp_addr, 16);
- carrier = group*PMD_CARRIERS_PER_GROUP + i;
- if (real_word!=exp_word) {
- unit->stats.ber.control_invalid[band][carrier]++;
- } else {
- unit->stats.ber.control_valid[band][carrier]++;
- }
- nbits--;
- }
- frame_bit++;
- } /* notch ? */
- } /* carriers */
- } /* groups */
-}
-
-void plcp_prepare_control_ber(struct plc_drv_unit *unit) {
-
- int band;
-
- /* copy control words */
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (unit->plcp.config.vote) {
- /* copy a non-voted block */
- memcpy(__rx_control[band],
- (void*)(pmd_rx_control(band)+PMD_MAX_CONTROL_BYTES),
- BER_CONTROL_PATTERN_SIZE);
- } else {
- memcpy(__rx_control[band],
- (void*)pmd_rx_control(band),
- BER_CONTROL_PATTERN_SIZE);
- }
-
- }
-}
-
-void plcp_update_control_ber(struct plc_drv_unit *unit, int pattern) {
-
- uint16_t *mem_real_addr;
- uint16_t *mem_exp_addr;
- int nbits;
- int band;
- int offset;
-
- plcp_prepare_control_ber(unit);
-
- mem_exp_addr=__control_patterns[pattern];
- nbits = BER_CONTROL_PATTERN_SIZE*8;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- mem_real_addr = __rx_control[band];
- if (unit->plcp.config.vote) {
- offset = nbits % unit->control_bits_per_band[band];
- } else {
- offset = 0;
- }
- plcp_control_ber(unit, mem_real_addr, mem_exp_addr,
- nbits, band, offset);
- }
- }
-}
-
-/* printf("File ber is %d:%d %s\n",fd,errno,strerror(errno));*/
-#ifndef __KERNEL__
-#ifndef softOSE
-#undef write
-#include "unistd.h"
-#endif
-#ifndef softOSE
-void plcp_save_control_ber(struct plc_drv_unit *unit) {
-
- uint32_t valid=0;
- uint32_t invalid=0;
- int band, carrier;
- uint32_t b_valid;
- uint32_t b_invalid;
- int fd;
- char buf[255];
-
- fd = open("/ram/control_ber.csv",O_RDWR|O_CREAT,S_IRWXU);
- sprintf(buf,"%10s ; %10s ; %10s ; %10s ; %10s\n",
- "band","carrier","valid","invalid","total");
- write(fd,buf,strlen(buf));
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- sprintf(buf,"%10d ; %10d ; %10d ; %10d ; %10d\n",
- band, carrier,
- unit->stats.ber.control_valid[band][carrier],
- unit->stats.ber.control_invalid[band][carrier],
- unit->stats.ber.control_valid[band][carrier]
- +unit->stats.ber.control_invalid[band][carrier]);
- write(fd,buf,strlen(buf));
- }
- }
- }
- sprintf(buf,"\n%20s ; %10s ; %10s ; %10s\n",
- "","valid","invalid","total");
- write(fd,buf,strlen(buf));
- sprintf(buf,"%20s ; %10s ; %10s ; %10s ; %10s\n",
- "band","bits","bits","bits","BER");
- write(fd,buf,strlen(buf));
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- b_valid = 0;
- b_invalid = 0;
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- b_valid += unit->stats.ber.control_valid[band][carrier];
- b_invalid += unit->stats.ber.control_invalid[band][carrier];
- valid += unit->stats.ber.control_valid[band][carrier];
- invalid += unit->stats.ber.control_invalid[band][carrier];
- }
- sprintf(buf,"%20d ; %10d ; %10d ; %10d ; %10.6f\n",
- band, b_valid, b_invalid, b_valid+b_invalid,
- (float)b_invalid/(float)(b_valid+b_invalid)
- );
- write(fd,buf,strlen(buf));
- }
- }
-
- sprintf(buf,"%20s ; %10lu ; %10lu ; %10lu\n","TOTAL",
- valid, invalid, valid+invalid);
- write(fd,buf,strlen(buf));
- sprintf(buf,"BER = %.6f \n",
- (float)invalid/(float)(valid+invalid));
- write(fd,buf,strlen(buf));
- close(fd);
-}
-#endif
-#endif
-
-void plcp_display_control_ber(struct plc_drv_unit *unit, int flags) {
-
- uint32_t valid=0;
- uint32_t invalid=0;
- int band, carrier;
- uint32_t b_valid;
- uint32_t b_invalid;
-
- printf("\n--- control BER ---\n");
- if (flags & BER_F_DETAILED) {
- printf("%10s%10s%10s%10s%10s\n",
- "band","carrier","valid","invalid","total");
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- if (((flags & BER_F_ERRORS_ONLY)==0) ||
- (unit->stats.ber.control_invalid[band][carrier]>0)) {
- printf("%10d%10d%10d%10d%10d\n",
- band, carrier,
- unit->stats.ber.control_valid[band][carrier],
- unit->stats.ber.control_invalid[band][carrier],
- unit->stats.ber.control_valid[band][carrier]
- +unit->stats.ber.control_invalid[band][carrier]);
- }
- }
- }
- }
- printf("\n");
- }
- printf("%20s%10s%10s%10s\n",
- "","valid","invalid","total");
- printf("%20s%10s%10s%10s BER\n",
- "band","bits","bits","bits");
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- b_valid = 0;
- b_invalid = 0;
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- b_valid += unit->stats.ber.control_valid[band][carrier];
- b_invalid += unit->stats.ber.control_invalid[band][carrier];
- valid += unit->stats.ber.control_valid[band][carrier];
- invalid += unit->stats.ber.control_invalid[band][carrier];
- }
- printf("%20d%10d%10d%10d %.6f\n",
- band, b_valid, b_invalid, b_valid+b_invalid,
- (float)b_invalid/(float)(b_valid+b_invalid)
- );
- }
- }
- printf("\n");
-
- printf("%20s%10lu%10lu%10lu %.6f\n",
- "TOTAL", valid, invalid, valid+invalid,
- (float)invalid/(float)(valid+invalid));
-}
-
-void plcp_bad_slice_map(struct plc_drv_unit *unit, int flags) {
-
-#if 0
- struct pmd_band_quality *qual[PMD_MAX_BANDS];
- int nbits, band, slice;
- int padding_len;
-
- if (__bad_slice.mismatch == NO_MISMATCH) {
- printf("no FEC inconsistency detected\n");
- return;
- }
-
- if (__bad_slice.d_len > ((FEC_MAX_SLICES-1)*PMD_SLICE_SIZE)) {
- /* d_len is too long, add padding at the beginning of the payload */
- padding_len = __bad_slice.d_len - (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE;
- plcp_fill_with_pattern(__slice_pattern,
- __bad_slice.pattern, padding_len);
- plcp_fill_with_pattern(__slice_pattern + padding_len,
- __bad_slice.pattern, (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE);
- } else {
- padding_len = 0;
- plcp_fill_with_pattern(__slice_pattern,
- __bad_slice.pattern, __bad_slice.d_len);
- }
-
- printf("BER detected a false %s slice from FEC\n",
- __bad_slice.mismatch==HW_FALSE_BAD_SLICE ? "invalid":"valid");
-
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- qual[band] = &__bad_slice.rx_qual[band];
- }
- }
-
- for (slice=0;slice<__bad_slice.slices;slice++) {
- if (__bad_slice.hw_good_slice[slice]==__bad_slice.good_slice[slice]) {
- printf("slice %d %s for FEC and BER\n",
- slice, __bad_slice.hw_good_slice[slice]?"valid":"invalid");
- } else {
- printf("slice %d %s for FEC (status=0x%08x) and %s for BER\n",
- slice,
- __bad_slice.hw_good_slice[slice]?"valid":"invalid",
- __bad_slice.hw_status[slice],
- __bad_slice.good_slice[slice]?"valid":"invalid");
- if (flags & BER_F_BEFORE_FEC) {
- nbits = PMD_SLICE_SIZE_WITH_REED_SOLOMON*12;
- plcp_payload_map(unit,
- __payload_patterns[__bad_slice.pattern],
- __bad_slice.rx_mem, qual, nbits,
- slice*PMD_SLICE_SIZE_WITH_REED_SOLOMON*12 /* offset */,
- flags, 12);
- }
- if (flags & BER_F_AFTER_FEC) {
- nbits = PMD_SLICE_SIZE*8;
- plcp_payload_map(unit,
- (uint16_t*)(__slice_pattern + slice*PMD_SLICE_SIZE),
- (uint16_t*)(__bad_slice.d_buf + slice*PMD_SLICE_SIZE),
- __qam256_qual, nbits, 0 /* offset */, flags, 16);
- }
-
- }
- }
-#endif
-}
-
-int common_bits(uint16_t a, uint16_t b, int bits) {
- int n;
- for (n=0; bits>0; bits--,a>>=1,b>>=1) {
- n += ((a&1)==(b&1));
- }
- return n;
-}
-
-int plcp_carrier_bits(struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int band, int group, int carrier) {
- int mod, bits, notch;
- mod = plcp_get_group_modulation(qual[band], group);
- bits = pmd_get_mod_bits_per_slot(mod);
- notch = plcp_notchs_bitmap[band][group]|plcp_pilots_bitmap[band][group];
- if (((1<<carrier) & (~notch))!=0) {
- ASSERT(bits<=8);
- return bits;
- } else {
- return 0;
- }
-}
-
-int plcp_group_bits(struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int band, int group) {
- int mod, bits, ones, group_bits;
- uint8_t notch;
- mod = plcp_get_group_modulation(qual[band], group);
- bits = pmd_get_mod_bits_per_slot(mod);
- notch = plcp_notchs_bitmap[band][group]|plcp_pilots_bitmap[band][group];
- ones = byte_zeroes((uint8_t)notch);
- group_bits = (ones * bits);
- ASSERT(group_bits<=64);
- return group_bits;
-}
-
-void inc_band(int *band, uint8_t rx_bands) {
- ASSERT(band!=0);
- ASSERT(rx_bands);
- (*band)++;
- if ((*band)==PMD_MAX_BANDS) {
- (*band) = 0;
- }
- while ((rx_bands & (1<<(*band)))==0) {
- (*band)++;
- if ((*band)==PMD_MAX_BANDS)
- (*band) = 0;
- }
- ASSERT((*band)<PMD_MAX_BANDS);
-}
-
-void inc_group(int *band, int *group, uint8_t rx_bands) {
- ASSERT(group!=0);
- (*group)++;
- if ((*group)==PMD_GROUPS_PER_BAND) {
- (*group) = 0;
- inc_band(band, rx_bands);
- }
-}
-
-void inc_carrier(int *band, int *group, int *carrier, uint8_t rx_bands) {
- ASSERT(carrier!=0);
- (*carrier)++;
- if ((*carrier)==PMD_CARRIERS_PER_GROUP) {
- (*carrier) = 0;
- inc_group(band, group, rx_bands);
- }
-}
-
-void plcp_group_ber(struct plc_drv_unit *unit,
- uint32_t *shrinked_exp, uint32_t *shrinked_real,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, uint8_t rx_bands,
- int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]) {
-
- struct mem_curs curs_exp;
- struct mem_curs curs_real;
- int group_bits, frame_bit, errors;
- int band, group;
-
- if (nbits<=0) {
- return;
- }
-
- frame_bit = 0;
-
- mem_curs_init(&curs_exp, shrinked_exp);
- mem_curs_init(&curs_real, shrinked_real);
-
- band=0;
- group=0;
-
- /* go to first band */
- inc_band(&band, rx_bands);
-
- /* FAST FORWARD until we reach offset */
- if (offset) {
- while (nbits>0) {
- group_bits = plcp_group_bits(qual, band, group);
- if ((frame_bit + group_bits) > offset) {
- /* we found the right group in the right band */
- group_bits -= (offset-frame_bit);
- frame_bit = offset;
- goto compare;
- }
- frame_bit += group_bits;
- inc_group(&band, &group, rx_bands);
- } /* nbits */
- } /* offset ? */
-
- while (nbits>0) {
- group_bits = plcp_group_bits(qual, band, group);
-
-compare:
- if (group_bits>nbits) {
- group_bits=nbits;
- }
-
- if (group_bits>32) {
- errors = mem_curs_compare(&curs_real, &curs_exp, 32);
- errors += mem_curs_compare(&curs_real, &curs_exp, group_bits - 32);
- } else {
- errors = mem_curs_compare(&curs_real, &curs_exp, group_bits);
- }
- invalid[band][group] += errors;
- valid[band][group] += (group_bits - errors);
- nbits -= group_bits;
- inc_group(&band, &group, rx_bands);
- } /* nbits */
-}
-
-/*
- * This function shall be used only for detailed BER computation.
- * It performs the following computation:
- * - Compute payload ber for each carrier.
- * - Compute slice BER (before FEC)
- */
-void plcp_carrier_ber(struct plc_drv_unit *unit,
- uint32_t *shrinked_exp, uint32_t *shrinked_real,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, uint8_t rx_bands,
- int valid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND],
- int invalid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND],
- int slice_valid[PLCP_MAX_SLICES],
- int slice_invalid[PLCP_MAX_SLICES]) {
-
- struct mem_curs curs_exp;
- struct mem_curs curs_real;
- int slice_bits, slice, bits;
- int carrier_bits, frame_bit, errors;
- int band, group, carrier;
- int n;
-
- if (nbits<=0) {
- return;
- }
-
- frame_bit = 0;
-
- mem_curs_init(&curs_exp, shrinked_exp);
- mem_curs_init(&curs_real, shrinked_real);
-
- band=0;
- group=0;
- carrier=0;
- slice_bits = 0;
- slice = 0;
-
- /* go to first band */
- inc_band(&band, rx_bands);
-
- /* FAST FORWARD until we reach offset */
- if (offset) {
- while (nbits>0) {
- carrier_bits = plcp_carrier_bits(qual, band, group, carrier);
- if ((frame_bit + carrier_bits) > offset) {
- /* we found the right group in the right band */
- carrier_bits -= (offset-frame_bit);
- frame_bit = offset;
- nbits -= offset;
- goto compare;
- }
- frame_bit += carrier_bits;
- slice_bits += carrier_bits;
- if (slice_bits>=(PMD_SLICE_SIZE_WITH_REED_SOLOMON*12)) {
- slice_bits -= (PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- slice++;
- }
- inc_carrier(&band, &group, &carrier, rx_bands);
- } /* nbits */
- } /* offset ? */
-
- while (nbits>0) {
- carrier_bits = plcp_carrier_bits(qual, band, group, carrier);
-
-compare:
- if (carrier_bits>nbits) {
- carrier_bits=nbits;
- }
-
- n = group*PMD_CARRIERS_PER_GROUP + carrier;
- ASSERT(n<PMD_CARRIERS_PER_BAND);
- ASSERT(band<PMD_MAX_BANDS);
-
- if ((slice_bits+carrier_bits)>(PMD_SLICE_SIZE_WITH_REED_SOLOMON*12)) {
- bits = (PMD_SLICE_SIZE_WITH_REED_SOLOMON*12)-slice_bits;
-
- errors = mem_curs_compare(&curs_real, &curs_exp, bits);
- invalid[band][n] += errors;
- slice_invalid[slice] += errors;
- valid[band][n] += (bits - errors);
- slice_valid[slice] += (bits - errors);
-
- bits = carrier_bits - bits;
- slice++;
-
- errors = mem_curs_compare(&curs_real, &curs_exp, bits);
- invalid[band][n] += errors;
- slice_invalid[slice] += errors;
- valid[band][n] += (bits - errors);
- slice_valid[slice] += (bits - errors);
-
- slice_bits = bits;
- } else {
- errors = mem_curs_compare(&curs_real, &curs_exp, carrier_bits);
- invalid[band][n] += errors;
- slice_invalid[slice] += errors;
- valid[band][n] += (carrier_bits - errors);
- slice_valid[slice] += (carrier_bits - errors);
- slice_bits += carrier_bits;
- if (slice_bits==(PMD_SLICE_SIZE_WITH_REED_SOLOMON*12)) {
- slice_bits = 0;
- slice++;
- }
- }
- nbits -= carrier_bits;
- inc_carrier(&band, &group, &carrier, rx_bands);
- } /* nbits */
-}
-
-void plcp_carrier_map(struct plc_drv_unit *unit,
- uint32_t *shrinked_exp, uint32_t *shrinked_real,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, uint8_t rx_bands, int flags) {
-
- uint32_t exp_reg;
- uint32_t real_reg;
- uint32_t diff;
-
- struct mem_curs curs_exp;
- struct mem_curs curs_real;
- int carrier_bits;
- int errors = 0;
- int frame_bit = 0;
- int band = 0;
- int group = 0;
- int carrier = 0;
- int n;
- int slots = 0;
-
- char *p = __shell_line;
-
- if (nbits<=0) {
- return;
- }
-
- mem_curs_init(&curs_exp, shrinked_exp);
- mem_curs_init(&curs_real, shrinked_real);
-
- /* go to first band */
- inc_band(&band, rx_bands);
-
- //printf("band group slot\n");
-
- /* FAST FORWARD until we reach offset */
- if (offset) {
-
- p += sprintf(p, "%4d %4d %4d ", band, group, slots);
- while (nbits>0) {
- carrier_bits = plcp_carrier_bits(qual, band, group, carrier);
- p += sprintf(p," ");
- if ((frame_bit + carrier_bits) > offset) {
- /* we found the right group in the right band */
- carrier_bits -= (offset-frame_bit);
- frame_bit = offset;
- goto compare;
- }
- frame_bit += carrier_bits;
- inc_carrier(&band, &group, &carrier, rx_bands);
- if (group==0) {
- p = __shell_line;
- slots++;
- }
- } /* nbits */
- } /* offset ? */
-
- p += sprintf(p, "%4d %4d %4d ", band, group, slots);
- while (nbits>0) {
- carrier_bits = plcp_carrier_bits(qual, band, group, carrier);
-
-compare:
- if (carrier_bits>nbits) {
- carrier_bits=nbits;
- }
-
- exp_reg = mem_curs_read(&curs_exp, carrier_bits);
- real_reg = mem_curs_read(&curs_real, carrier_bits);
- diff = exp_reg ^ real_reg;
-
- if (diff) {
- p += sprintf(p,"%02x[%02x]* ", real_reg, exp_reg);
- errors++;
- } else {
- p += sprintf(p,"%02x[%02x] ", real_reg, exp_reg);
- };
-
- n = group*PMD_CARRIERS_PER_GROUP + carrier;
- nbits -= carrier_bits;
- inc_carrier(&band, &group, &carrier, rx_bands);
- if (carrier==0) {
- if ((errors>0) || ((flags & BER_F_ERRORS_ONLY)==0)) {
- printf("%s\n", __shell_line );
- }
- p = __shell_line;
- p += sprintf(p, "%4d %4d %4d ", band, group, slots);
- errors = 0;
- if (group==0) {
- slots++;
- }
- }
- } /* nbits */
-}
-
-#if 0
-void plcp_payload_ber(struct plc_drv_unit *unit,
- uint16_t *mem_exp_addr, uint16_t *mem_real_addr,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, uint8_t rx_bands) {
-
- int mod, band, group, bits;
- int notch, carrier;
- int slice = 0, frame_bit, n, i;
- int slots = 0;
-
- uint16_t real_bit;
- int mem_real_bits = 0;
- uint16_t mem_real_word = 0;
-
- uint16_t exp_bit;
- int mem_exp_bits = 0;
- uint16_t mem_exp_word = 0;
-
- ASSERT(mem_exp_addr);
-
- /* Compute the number of bits that each band can send in one symbol */
- frame_bit = 0;
- while (nbits>0) {
- for (band=0;(nbits>0) && (band<PMD_MAX_BANDS);band++) {
- if (rx_bands & (1<<band)) {
- for (group=0;(nbits>0) && (group<PMD_GROUPS_PER_BAND);
- group++) {
-
- mod = plcp_get_group_modulation(qual[band], group);
- bits = pmd_get_mod_bits_per_slot(mod);
- notch = plcp_notchs_bitmap[band][group]
- |plcp_pilots_bitmap[band][group];
- for (i=0;(nbits>0) && (i<PMD_CARRIERS_PER_GROUP);
- i++,notch>>=1) {
- if (bits>nbits) {
- bits = nbits;
- }
- if (!(notch&1)) {
- carrier = group*PMD_CARRIERS_PER_GROUP + i;
- for (n=0;n<bits;n++,frame_bit++,nbits--) {
- if (frame_bit>=offset) {
- exp_bit = read_carrier_bits(1,
- &mem_exp_word, &mem_exp_bits,
- &mem_exp_addr, 12);
- real_bit = read_carrier_bits(1,
- &mem_real_word, &mem_real_bits,
- &mem_real_addr, 12);
- slice = frame_bit/(PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- if (exp_bit==real_bit) {
- unit->stats.ber.payload_valid[band][carrier]++;
- unit->stats.ber.raw_slice_valid[slice]++;
- } else {
- unit->stats.ber.payload_invalid[band][carrier]++;
- unit->stats.ber.raw_slice_invalid[slice]++;
- }
- }
- }
- } /* notch ? */
- } /* carrier */
- } /* group */
- } /* band used ? */
- } /* bands */
- slots++;
- } /* nbits */
-}
-#endif
-
-void plcp_payload_map(struct plc_drv_unit *unit,
- uint16_t *mem_exp_addr, uint16_t *mem_real_addr,
- struct pmd_band_quality *qual[PMD_MAX_BANDS],
- int nbits, int offset, int flags, int mem_width) {
-
- int errors;
-
- int mod, band, group, bits;
- int notch, carrier;
- int slice = 0, frame_bit, n, i;
- int slots = 0;
-
- uint16_t real_word; /* bits really transfered on a specific carrier */
- uint16_t real_bit;
- int mem_real_bits = 0;
- uint16_t mem_real_word = 0;
-
- uint16_t exp_word; /* bits expected on a specific carrier */
- uint16_t exp_bit;
- int mem_exp_bits = 0;
- uint16_t mem_exp_word = 0;
-
- char *p;
-
- ASSERT(mem_exp_addr);
- printf("comparing real=%08x, exp=%08x for %d bits, offset=%d\n",
- mem_real_addr, mem_exp_addr, nbits, offset);
-
-
- /* Compute the number of bits that each band can send in one symbol */
- printf("band group slot\n");
- frame_bit = 0;
- while (nbits>0) {
- for (band=0;(nbits>0) && (band<PMD_MAX_BANDS);band++) {
- if (band_is_used(unit,band)) {
- for (group=0;(nbits>0) && (group<PMD_GROUPS_PER_BAND);
- group++) {
-
- errors = 0;
- p = __shell_line;
- p += sprintf(p, "%4d %4d %4d ", band, group, slots);
-
- if (qual) {
- mod = plcp_get_group_modulation(qual[band], group);
- bits = pmd_get_mod_bits_per_slot(mod);
- } else {
- bits = 1;
- }
- notch = plcp_notchs_bitmap[band][group]
- |plcp_pilots_bitmap[band][group];
- for (i=0;(nbits>0) && (i<PMD_CARRIERS_PER_GROUP);
- i++,notch>>=1) {
- if (bits>nbits) {
- bits = nbits;
- }
- if (notch&1) {
- p += sprintf(p, "-- ");
- } else {
- carrier = group*PMD_CARRIERS_PER_GROUP + i;
- exp_word = 0;
- real_word = 0;
- for (n=0;n<bits;n++,frame_bit++,nbits--) {
- if (frame_bit>=offset) {
- exp_bit = read_carrier_bits(1,
- &mem_exp_word, &mem_exp_bits,
- &mem_exp_addr, mem_width);
- real_bit = read_carrier_bits(1,
- &mem_real_word, &mem_real_bits,
- &mem_real_addr, mem_width);
- slice = frame_bit/(PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- exp_word |= (exp_bit<<n);
- real_word |= (real_bit<<n);
-#if 0
- printf("real_bit=%02x n=%d real_word=%02x"
- "mem_exp_word=%02x mem_exp_bits=%d addr=%08x\n",
- real_bit, n, real_word,
- mem_exp_word, mem_exp_bits, mem_exp_addr);
-#endif
- }
- }
- if (real_word!=exp_word) {
- p += sprintf(p,"%02x[%02x]* ",
- real_word, exp_word);
- errors++;
- } else {
- p += sprintf(p,"%02x[%02x] ",
- real_word, exp_word);
- }
- } /* notch ? */
- } /* carrier */
- if (frame_bit>=offset) {
- if ((errors>0) || ((flags & BER_F_ERRORS_ONLY)==0)) {
- printf("%s\n", __shell_line );
- }
- }
- } /* group */
- } /* band used ? */
- } /* bands */
- slots++;
- } /* nbits */
-}
-
-void plcp_update_carrier_ber(struct plc_drv_unit *unit, int pattern,
- int valid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND],
- int invalid[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND],
- int slice_valid[PLCP_MAX_SLICES],
- int slice_invalid[PLCP_MAX_SLICES])
-{
- int offset;
-
- if ((pattern<0) || (pattern>BER_PATTERN_MAX)) {
- /* drop this */
- } else {
- if (unit->ber.slices>(FEC_MAX_SLICES-1)) {
- offset = (unit->ber.slices-(FEC_MAX_SLICES-1))*
- (PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- } else {
- offset = 0;
- }
- plcp_carrier_ber(unit, plcp_shrinked_patterns[pattern], shrinked_rxmem,
- unit->ber.rx_qual, unit->ber.nbits, offset, unit->ber.rx_bands,
- valid, invalid, slice_valid, slice_invalid);
- }
- unit->stats.ber.samples++;
-}
-
-void plcp_update_noise_ber(struct plc_drv_unit *unit) {
-
- int band, group, samples;
- uint16_t noise;
- int ecart;
- samples=unit->stats.ber.samples;
-
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- noise=pmd_get_noise(band,group);
- unit->stats.ber.hw_noise[band][group] += noise;
- /* min */
- if(samples>0){
- if(noise < unit->stats.ber.min_noise[band][group]){
- unit->stats.ber.min_noise[band][group]=noise;
- }
- /* max */
- if(noise > unit->stats.ber.max_noise[band][group]){
- unit->stats.ber.max_noise[band][group]=noise;
- }
- /* var */
- ecart=(int)noise-(int)(unit->stats.ber.hw_noise[band][group]/samples);
- unit->stats.ber.var_noise[band][group] += (ecart * ecart);
- } else {
- unit->stats.ber.min_noise[band][group]=noise;
- unit->stats.ber.max_noise[band][group]=noise;
- unit->stats.ber.var_noise[band][group]=0;
- }
- }
- }
- }
-}
-
-void plcp_copy_fec_mem(uint16_t *dst, uint16_t *fec_src, int slices) {
-
- int pos, slice;
- uint16_t *src;
-
- plcp_fec_dbg_mem_enable();
- for (slice=0, pos=0;slice<slices;slice++) {
- if ((slices-slice)<FEC_MAX_SLICES) {
- /*
- * FEC memory only contains the last slices
- * of the received frame
- */
- src = fec_src + (pos*FEC_WORDS_PER_SLICE);
- memcpy(dst,src,FEC_WORDS_PER_SLICE*2);
- dst += FEC_WORDS_PER_SLICE;
- }
- pos = (pos+1)%FEC_MAX_SLICES;
- }
- plcp_fec_dbg_mem_disable();
-}
-
-
-void plcp_prepare_payload_ber(struct plc_drv_unit *unit, int d_len) {
-
- int band;
-
- /* copy RX quality */
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- unit->ber.__rx_qual[band] = *(struct pmd_band_quality*)
- (PMD_PHLIC_DATA_REGBASE
- +PMD_BAND(band)+PMD_BAND_RX_QUALITY);
- unit->ber.rx_qual[band] = &unit->ber.__rx_qual[band];
- }
- }
-
- /* compute number of received bits */
- unit->ber.rx_bands = plcp_get_rx_bands(unit);
- unit->stats.ber.d_len = d_len;
- unit->ber.slices = (d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
- unit->ber.nbits = unit->ber.slices * PMD_SLICE_SIZE_WITH_REED_SOLOMON *
- PMD_BYTE_SIZE_WITH_VITERBI;
-
- /* copy FEC debug memory */
- plcp_copy_fec_mem((uint16_t*)rxmem, (uint16_t*)PMD_FEC_RX_MEM, unit->ber.slices);
-
- /* extract significant bits */
- mem_shrink((uint8_t*)shrinked_rxmem,(uint16_t*)rxmem,FEC_SHRINKED_MEMSIZE);
-}
-
-void plcp_update_group_ber(struct plc_drv_unit *unit, int pattern,
- int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]) {
-
- int offset;
-
- ASSERT((pattern>=0)&&(pattern<=BER_PATTERN_MAX));
-
- unit->stats.ber.samples++;
- unit->stats.ber.pattern = pattern;
- if (unit->ber.slices>(FEC_MAX_SLICES-1)) {
- offset = (unit->ber.slices-(FEC_MAX_SLICES-1))*
- (PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- } else {
- offset = 0;
- }
- plcp_group_ber(unit, plcp_shrinked_patterns[pattern], shrinked_rxmem,
- unit->ber.rx_qual, unit->ber.nbits, offset,
- unit->ber.rx_bands, valid, invalid);
-
- if(unit->ce.get_spectrum)
- {
- /* analyse spectrum measures */
- ce_analyse_spectrum(unit);
- }
-}
-
-void plcp_update_slice_ber(struct plc_drv_unit *unit, int pattern,
- uint8_t *d_buf, int d_len) {
-
- int i;
- int slice;
- int slices = unit->ber.slices;
- uint8_t *p = d_buf;
- uint8_t *q = __slice_pattern;
- int valid_bits;
- bool good_slice[PLCP_MAX_SLICES];
- bool hw_good_slice[PLCP_MAX_SLICES];
- int mismatch = NO_MISMATCH;
- int padding_len;
-
- if (d_len > ((FEC_MAX_SLICES-1)*PMD_SLICE_SIZE)) {
- /* d_len is too long, add padding at the beginning of the payload */
- padding_len = d_len - (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE;
- plcp_fill_with_pattern(__slice_pattern, pattern, padding_len);
- plcp_fill_with_pattern(__slice_pattern + padding_len, pattern,
- (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE);
- } else {
- padding_len = 0;
- plcp_fill_with_pattern(__slice_pattern, pattern, d_len);
- }
-
- for (slice=0;slice<slices;slice++) {
- good_slice[slice] = true;
- for (i=0;i<PMD_SLICE_SIZE;i++,p++,q++) {
- if (*p!=*q) {
- valid_bits = common_bits((uint16_t)*p, (uint16_t)*q, 8);
- unit->stats.ber.slice_valid[slice]+= valid_bits;
- unit->stats.ber.slice_invalid[slice]+= (8-valid_bits);
- good_slice[slice] = false;
- } else {
- unit->stats.ber.slice_valid[slice]+=8;
- }
- }
-
- if (good_slice[slice]) {
- unit->stats.ber.good_slice[slice]++;
- } else {
- unit->stats.ber.bad_slice[slice]++;
- }
-
- hw_good_slice[slice] = plcp_slice_valid(slice);
- if (hw_good_slice[slice]) {
- unit->stats.ber.hw_good_slice[slice]++;
- if (!good_slice[slice]) {
- unit->stats.ber.hw_false_good_slice[slice]++;
- if (mismatch<HW_FALSE_GOOD_SLICE) {
- mismatch = HW_FALSE_GOOD_SLICE;
- }
- }
- } else {
- unit->stats.ber.hw_bad_slice[slice]++;
- if (good_slice[slice]) {
- unit->stats.ber.hw_false_bad_slice[slice]++;
- if (mismatch<HW_FALSE_BAD_SLICE) {
- mismatch = HW_FALSE_BAD_SLICE;
- }
- }
- }
-
- /* reed solomon & viterbi counters */
- unit->stats.ber.raw_slice_viterbi[slice] += plcp_slice_viterbi(slice);
- unit->stats.ber.raw_slice_rs[slice] += plcp_slice_rs(slice);
- }
- if (mismatch>__bad_slice.mismatch){
- __bad_slice.mismatch = mismatch;
- for (slice=0;slice<slices;slice++) {
- __bad_slice.hw_good_slice[slice] = hw_good_slice[slice];
- __bad_slice.good_slice[slice] = good_slice[slice];
- }
- memcpy(__bad_slice.rx_mem, rxmem, sizeof(rxmem));
- memcpy(__bad_slice.d_buf, d_buf, d_len);
- memcpy(__bad_slice.rx_qual,unit->ber.__rx_qual,
- sizeof(__bad_slice.rx_qual));
- __bad_slice.slices = slices;
- __bad_slice.pattern = pattern;
- __bad_slice.d_len = d_len;
- for (slice=0;slice<slices;slice++) {
- __bad_slice.hw_status[slice] = plcp_slice_qword(slice);
- }
- }
-}
-
-void plcp_display_slice_ber(struct plc_drv_unit *unit, int flags) {
-
- int slice;
- uint32_t raw_viterbi=0;
- uint32_t raw_rs=0;
- uint32_t raw_valid=0;
- uint32_t raw_invalid=0;
- uint32_t valid=0;
- uint32_t invalid=0;
- uint32_t total;
- uint32_t good_slices=0;
- uint32_t hw_good_slices=0;
-
- printf("\n--- slice BER before FEC ---\n");
- for (slice=0;slice<PLCP_MAX_SLICES;slice++) {
- if ((unit->ber.slices-slice)<FEC_MAX_SLICES) {
- raw_valid += unit->stats.ber.raw_slice_valid[slice];
- raw_invalid += unit->stats.ber.raw_slice_invalid[slice];
- raw_rs += unit->stats.ber.raw_slice_rs[slice];
- raw_viterbi += unit->stats.ber.raw_slice_viterbi[slice];
- valid += unit->stats.ber.slice_valid[slice];
- invalid += unit->stats.ber.slice_invalid[slice];
- good_slices += unit->stats.ber.good_slice[slice];
- hw_good_slices += unit->stats.ber.hw_good_slice[slice];
- }
- }
-
- printf("%5s %10s %10s %10s %10s %10s\n",
- "slice","valid", "invalid", "total", "Viterbi", "RS");
- printf("%5s %10s %10s %10s %10s %10s BER\n",
- "","bits", "bits", "bits", "bit fixes", "byte fixes");
- for (slice=0;slice<PLCP_MAX_SLICES;slice++) {
- if ((unit->ber.slices-slice)<FEC_MAX_SLICES) {
- total = unit->stats.ber.raw_slice_valid[slice]
- + unit->stats.ber.raw_slice_invalid[slice];
- if (total) {
- printf("%5d %10d %10d %10d %10d %10d %.6f\n",
- slice,
- unit->stats.ber.raw_slice_valid[slice],
- unit->stats.ber.raw_slice_invalid[slice],
- unit->stats.ber.raw_slice_valid[slice] +
- unit->stats.ber.raw_slice_invalid[slice],
- unit->stats.ber.raw_slice_viterbi[slice],
- unit->stats.ber.raw_slice_rs[slice],
- (float)unit->stats.ber.raw_slice_invalid[slice]/
- (float)(unit->stats.ber.raw_slice_valid[slice]+
- unit->stats.ber.raw_slice_invalid[slice]));
- } else {
- break;
- }
- }
- }
-
- printf("----- ---------- ---------- ---------- "
- "---------- ----------\n");
- printf("%5s %10lu %10lu %10lu %10lu %10lu\n",
- "TOTAL", raw_valid, raw_invalid, raw_valid+raw_invalid,
- raw_viterbi, raw_rs);
-
-
- printf("\n--- slice BER after FEC ---\n");
- printf("%5s %10s %10s %10s %10s %10s\n",
- "slice","valid", "invalid", "total", "BER valid", "FEC valid");
- printf("%5s %10s %10s %10s %10s %10s BER\n",
- "","bits", "bits", "bits", "slices", "slices");
- for (slice=0;slice<PLCP_MAX_SLICES;slice++) {
- if ((unit->ber.slices-slice)<FEC_MAX_SLICES) {
- total = unit->stats.ber.slice_valid[slice]
- + unit->stats.ber.slice_invalid[slice];
- /*
- * 2004-27-04 / TF / FR0030
- * display all slices (even in non detailed mode)
- */
- if (total) {
- printf("%5d %10d %10d %10d %10d %10d %c %.6f\n",
- slice,
- unit->stats.ber.slice_valid[slice],
- unit->stats.ber.slice_invalid[slice],
- unit->stats.ber.slice_valid[slice] +
- unit->stats.ber.slice_invalid[slice],
- unit->stats.ber.good_slice[slice],
- unit->stats.ber.hw_good_slice[slice],
- unit->stats.ber.hw_false_good_slice[slice]?'*':' ',
- (float)unit->stats.ber.slice_invalid[slice]/
- (float)(unit->stats.ber.slice_valid[slice]+
- unit->stats.ber.slice_invalid[slice]));
- } else {
- break;
- }
- }
- }
-
- printf("----- ---------- ---------- ---------- ---------- ----------\n");
- printf("%5s %10lu %10lu %10lu %10lu %10lu\n",
- "TOTAL", valid, invalid, valid+invalid,
- good_slices, hw_good_slices);
-}
-
-void plcp_bad_slice_dump() {
-
- int slice, word, n, i;
- uint8_t real, exp;
-
- if (__bad_slice.mismatch == NO_MISMATCH) {
- printf("no FEC inconsistency detected\n");
- return;
- }
-
- printf("BER detected a false %s from FEC\n",
- __bad_slice.mismatch==HW_FALSE_BAD_SLICE ? "invalid":"valid");
-
- plcp_fill_with_pattern(__slice_pattern,
- __bad_slice.pattern, __bad_slice.d_len);
-
- for (slice=0;slice<__bad_slice.slices;slice++) {
- if (__bad_slice.hw_good_slice[slice]==__bad_slice.good_slice[slice]) {
- printf("slice %d %s for FEC and BER\n",
- slice, __bad_slice.hw_good_slice[slice]?"valid":"invalid");
- } else {
- printf("slice %d %s for FEC (status=0x%08x) and %s for BER\n",
- slice,
- __bad_slice.hw_good_slice[slice]?"valid":"invalid",
- __bad_slice.hw_status[slice],
- __bad_slice.good_slice[slice]?"valid":"invalid");
- printf("before FEC\n");
- for (word=0, n=0;word<PMD_SLICE_SIZE_WITH_REED_SOLOMON;word++) {
- printf("%04x ",__bad_slice.rx_mem[word]);
- if (++n==8) {
- n=0;
- printf("\n");
- }
- }
- printf("\n");
- printf("after FEC\n");
- for (i=0, n=0;i<PMD_SLICE_SIZE;i++) {
- real = __bad_slice.d_buf[(slice*PMD_SLICE_SIZE)+i];
- exp = __slice_pattern[(slice*PMD_SLICE_SIZE)+i];
- printf("%02x[%02x]%c ", real, exp,
- (real!=exp?'*':' '));
- if (++n==8) {
- n=0;
- printf("\n");
- }
- }
- printf("\n");
- }
- }
-}
-
-
-#ifndef __KERNEL__
-#ifndef softOSE
-void plcp_save_slice_ber(struct plc_drv_unit *unit) {
-
- int slice;
- uint32_t total;
- int fd;
- char buf[255];
-
- fd = open("/ram/slice_ber.csv",O_RDWR|O_CREAT,S_IRWXU);
- sprintf(buf,"%10s ; %10s ; %10s ; %10s\n",
- "slice","valid","invalid","total");
- write(fd,buf,strlen(buf));
-
- for (slice=0;slice<PLCP_MAX_SLICES;slice++) {
- total = unit->stats.ber.slice_valid[slice]
- + unit->stats.ber.slice_invalid[slice];
- if (total) {
- sprintf(buf, "%10d ; %10d ; %10d ; %10d \n",
- slice,
- unit->stats.ber.slice_valid[slice],
- unit->stats.ber.slice_invalid[slice],
- total);
- write(fd,buf,strlen(buf));
- } else {
- break;
- }
- }
- close(fd);
-}
-#endif
-#endif
-
-void plcp_cleanup_ber(struct plc_drv_unit *unit) {
- __bad_slice.mismatch = NO_MISMATCH;
- memset(&unit->stats.ber,0,sizeof(unit->stats.ber));
-
- /* force fec mem to be disabled to avoid txmap interrupt problems */
- plcp_fec_dbg_mem_disable();
-}
-
-#ifndef __KERNEL__
-#ifndef softOSE
-void plcp_save_payload_ber(struct plc_drv_unit *unit) {
-
- uint32_t valid=0;
- uint32_t invalid=0;
- int band, carrier;
- uint32_t b_valid;
- uint32_t b_invalid;
- int fd;
- char buf[255];
-
- fd = open("/ram/payload_ber.csv",O_RDWR|O_CREAT,S_IRWXU);
- sprintf(buf,"%10s ; %10s ; %10s ; %10s ; %10s\n",
- "band","carrier","valid","invalid","total");
- write(fd,buf,strlen(buf));
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- sprintf(buf,"%10d ; %10d ; %10d ; %10d ; %10d\n",
- band, carrier,
- unit->stats.ber.payload_valid[band][carrier],
- unit->stats.ber.payload_invalid[band][carrier],
- unit->stats.ber.payload_valid[band][carrier]
- +unit->stats.ber.payload_invalid[band][carrier]);
- write(fd,buf,strlen(buf));
- }
- }
- }
- sprintf(buf,"\n%20s ; %10s ; %10s ; %10s\n",
- "","valid","invalid","total");
- write(fd,buf,strlen(buf));
- sprintf(buf,"%20s ; %10s ; %10s ; %10s ; %10s\n",
- "band","bits","bits","bits","BER");
- write(fd,buf,strlen(buf));
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- b_valid = 0;
- b_invalid = 0;
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- b_valid += unit->stats.ber.payload_valid[band][carrier];
- b_invalid += unit->stats.ber.payload_invalid[band][carrier];
- valid += unit->stats.ber.payload_valid[band][carrier];
- invalid += unit->stats.ber.payload_invalid[band][carrier];
- }
- sprintf(buf,"%20d ; %10d ; %10d ; %10d ; %10.6f\n",
- band, b_valid, b_invalid, b_valid+b_invalid,
- (float)b_invalid/(float)(b_valid+b_invalid)
- );
- write(fd,buf,strlen(buf));
- }
- }
-
- sprintf(buf,"%20s ; %10lu ; %10lu ; %10lu\n","TOTAL",
- valid, invalid, valid+invalid);
- write(fd,buf,strlen(buf));
- sprintf(buf,"BER = %.6f \n",
- (float)invalid/(float)(valid+invalid));
- write(fd,buf,strlen(buf));
- close(fd);
-}
-#endif
-#endif
-
-void plcp_display_payload_ber(struct plc_drv_unit *unit, int flags) {
-
- uint32_t valid=0;
- uint32_t invalid=0;
- int band, carrier;
- uint32_t b_valid;
- uint32_t b_invalid;
- double signal;
-
- printf("\n--- payload BER ---\n");
- if (flags & BER_F_DETAILED) {
- printf("%10s\t%10s\t%10s\t%10s\t%10s\t%10s\n",
- "band","carrier","valid","invalid","total","spectrum");
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (unit->ber.rx_bands & (1<<band)) {
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- if(unit->stats.ber.samples > 0)
- signal=unit->stats.ce.amp[band][carrier]/unit->stats.ber.samples;
- else
- signal=0;
- if (((flags & BER_F_ERRORS_ONLY)==0) ||
- (unit->stats.ber.payload_invalid[band][carrier]>0)) {
- printf("%10d\t%10d\t%10d\t%10d\t%10d\t%10.4f\n",
- band, carrier,
- unit->stats.ber.payload_valid[band][carrier],
- unit->stats.ber.payload_invalid[band][carrier],
- unit->stats.ber.payload_valid[band][carrier]
- +unit->stats.ber.payload_invalid[band][carrier],
- signal);
- }
- }
- }
- }
- printf("\n");
- }
- printf("%20s%10s%10s%10s\n",
- "","valid","invalid","total");
- printf("%20s%10s%10s%10s BER\n",
- "band","bits","bits","bits");
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (unit->ber.rx_bands & (1<<band)) {
- b_valid = 0;
- b_invalid = 0;
- for (carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- b_valid += unit->stats.ber.payload_valid[band][carrier];
- b_invalid += unit->stats.ber.payload_invalid[band][carrier];
- valid += unit->stats.ber.payload_valid[band][carrier];
- invalid += unit->stats.ber.payload_invalid[band][carrier];
- }
- printf("%20d%10d%10d%10d %.6f\n",
- band, b_valid, b_invalid, b_valid+b_invalid,
- (float)b_invalid/(float)(b_valid+b_invalid)
- );
- }
- }
- printf("\n");
-
- printf("%20s%10lu%10lu%10lu %.6f\n",
- "TOTAL", valid, invalid, valid+invalid,
- (float)invalid/(float)(valid+invalid));
-}
-/*
- * return the maximum len for this number of slots,
- * without exceeding 16 slices
- */
-
-
-int plcp_payload_ber_len(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int nb_slots) {
-
- int len;
- len = plcp_get_max_data_len(unit, uchannel, nb_slots);
-#if 0
- if (len > ((FEC_MAX_SLICES-1)*PMD_SLICE_SIZE)) {
- len = (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE;
- }
-#endif
- return len;
-}
-
-int plcp_fill_with_pattern(uint8_t *buf, int pattern, int len) {
-
- int i;
-
- switch (pattern) {
- case BER_PATTERN_FF:
- for (i=0; i<len; i++) {
- *(buf+i) = 0xff;
- }
- break;
-
- case BER_PATTERN_0F:
- for (i=0; i<len; i++) {
- *(buf+i) = 0x0f;
- }
- break;
-
- case BER_PATTERN_00:
- for (i=0; i<len; i++) {
- *(buf+i) = 0x00;
- }
- break;
-
- case BER_PATTERN_NOT_0123:
- case BER_PATTERN_ALT_NOT_0123:
- for (i=0; i<len; i++) {
- *(buf+i) = ~((uint8_t)i);
- }
- break;
-
- case BER_PATTERN_0123:
- case BER_PATTERN_ALT_0123:
- default:
- for (i=0; i<len; i++) {
- *(buf+i) = (uint8_t)i;
- }
- }
- return len;
-}
-int plcp_toggle_pattern(int pattern) {
- switch (pattern) {
- case BER_PATTERN_ALT_0123: return BER_PATTERN_ALT_NOT_0123;
- case BER_PATTERN_ALT_NOT_0123: return BER_PATTERN_ALT_0123;
- default: return pattern;
- }
-}
-
-int plcp_build_ber_frame(
- struct plc_drv_unit *unit,
- struct plcp_host *host,
- uint8_t *c_buf, int *c_len,
- uint8_t *d_buf, int *d_len) {
-
- struct ber_header ber_h;
- int padding_len;
- int max_ber_len;
-
- *c_len = sizeof(struct ber_header);
- max_ber_len = plcp_payload_ber_len(unit, host->uchannel, host->mtu);
- if (*d_len>max_ber_len) {
- *d_len = max_ber_len;
- } else {
- *d_len = (*d_len/PMD_SLICE_SIZE)*PMD_SLICE_SIZE;
- if (*d_len==0) {
- *d_len = PMD_SLICE_SIZE;
- }
- }
-
- /* FIXME : should be done when transmitting, not when preparing the
- * frame */
- __tx_slices = ((*d_len)+PMD_SLICE_SIZE-1)/PMD_SLICE_SIZE;
-
- /* check for alternative patterns */
- unit->test.ber_tx_control_pattern =
- plcp_toggle_pattern(unit->test.ber_tx_control_pattern);
- unit->test.ber_tx_payload_pattern =
- plcp_toggle_pattern(unit->test.ber_tx_payload_pattern);
-
-
- ber_h.control_pattern = unit->test.ber_tx_control_pattern;
- ber_h.payload_pattern = unit->test.ber_tx_payload_pattern;
- plcp_fill_with_pattern(ber_h.pattern,
- ber_h.control_pattern, BER_CONTROL_PATTERN_SIZE);
- memcpy(c_buf, &ber_h, sizeof(struct ber_header));
-
- if (*d_len > ((FEC_MAX_SLICES-1)*PMD_SLICE_SIZE)) {
- /* d_len is too long, add padding at the beginning of the payload */
- padding_len = *d_len - (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE;
- plcp_fill_with_pattern(d_buf, ber_h.payload_pattern, padding_len);
- plcp_fill_with_pattern(d_buf + padding_len, ber_h.payload_pattern,
- (FEC_MAX_SLICES-1)*PMD_SLICE_SIZE);
- } else {
- plcp_fill_with_pattern(d_buf, ber_h.payload_pattern, *d_len);
- }
-
- return 0;
-}
-
-
-void plcp_display_brief_ber(struct plc_drv_unit *unit, int flags) {
-
- int band, group, carrier, i;
- int g_min, g_max;
- int gc_valid, gc_invalid, gp_valid, gp_invalid, g_noise;
- int bc_valid, bc_invalid, bp_valid, bp_invalid, b_noise;
- double etype;
-
- printf("%4s %5s %11s %11s %10s %10s %10s %10s\n",
- "", "", "control", "payload", "average", "min", "max", "ecart");
- printf("%4s %5s %11s %11s %10s %10s %10s %10s\n",
- "band", "group", "BER", "BER", "noise", "noise", "noise", "noise");
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- bc_valid = 0;
- bc_invalid = 0;
- bp_valid = 0;
- bp_invalid = 0;
- b_noise = 0;
-
- for (group=0; group<PMD_GROUPS_PER_BAND; group++) {
-
- gc_valid = 0;
- gc_invalid = 0;
- gp_valid = 0;
- gp_invalid = 0;
-
- for (i=0; i<PMD_CARRIERS_PER_GROUP; i++) {
- carrier = group * PMD_CARRIERS_PER_GROUP + i;
-
- gc_valid += unit->stats.ber.control_valid[band][carrier];
- gc_invalid += unit->stats.ber.control_invalid[band][carrier];
- gp_valid += unit->stats.ber.payload_valid[band][carrier];
- gp_invalid += unit->stats.ber.payload_invalid[band][carrier];
- }
-
- g_noise = unit->stats.ber.hw_noise[band][group];
- g_min = unit->stats.ber.min_noise[band][group];
- g_max = unit->stats.ber.max_noise[band][group];
- etype = (double)unit->stats.ber.var_noise[band][group];
-
- if (unit->stats.ber.samples>0) {
- g_noise = g_noise/unit->stats.ber.samples;
- etype = etype / unit->stats.ber.samples;
- etype = sqrt(etype);
- } else {
- g_noise = 0;
- etype = 0;
- }
-
- printf("%4d %5d %.9f %.9f %5d ",
- band, group,
- (float)gc_invalid/(float)(gc_invalid + gc_valid),
- (float)gp_invalid/(float)(gp_invalid + gp_valid),
- g_noise);
- printf("%5d %5d %5.4f\n", g_min, g_max, etype);
- bc_valid += gc_valid;
- bc_invalid += gc_invalid;
- bp_valid += gp_valid;
- bp_invalid += gp_invalid;
- b_noise += g_noise;
-
- }
-
- b_noise /= PMD_GROUPS_PER_BAND;
-
- printf("%4d %5s %.9f %.9f %d\n\n",
- band, "AVG",
- (float)bc_invalid/(float)(bc_invalid + bc_valid),
- (float)bp_invalid/(float)(bp_invalid + bp_valid),
- b_noise);
- }
-
- }
-}
-
-void plcp_ber_debug(void) {
-
-}
-
-#if 0
-/* Number of ONEs into one byte */
-static uint8_t ONES[256];
-
-/* number of ONEs in one byte */
-void plcp_init_ones(void) {
- int n, bit, ones;
- for (n=0;n<256;n++) {
- ones = 0;
- for (bit=0;bit<8;bit++) {
- if (n & (1<<bit)) {
- ones++;
- }
- }
- ONES[n] = ones;
- }
-}
-#endif
-
-void plcp_init_ber(void) {
-
- int pattern, band;
-
- for (pattern=0;pattern<=BER_PATTERN_MAX;pattern++) {
- plcp_fill_with_pattern((uint8_t*)__control_patterns[pattern],
- pattern, BER_CONTROL_PATTERN_SIZE);
- }
-
- memset(&__bpsk, 0x11, sizeof(struct pmd_band_quality));
- memset(&__qam256, 0x55, sizeof(struct pmd_band_quality));
-
- for (band=0;band<PMD_MAX_BANDS;band++) {
- __bpsk_qual[band] = &__bpsk;
- __qam256_qual[band] = &__qam256;
- }
-}
-
-#ifndef __KERNEL__
-#ifndef softOSE
-int shell_ber(int argc, char *argv[]) {
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- int flags = 0;
- bool brief = false;
- int c;
-
- getopt_clear();
-
- while ((c = getopt(argc, argv, "cdsbe")) != EOF)
- {
- switch (c)
- {
- case 'c':
- plcp_cleanup_ber(unit);
- printf("BER samples cleaned.\n");
- return RET_SUCCESS;
-
- case 'd':
- flags |= BER_F_DETAILED;
- break;
-
- case 'e':
- flags |= BER_F_ERRORS_ONLY;
- break;
-
- case 'b':
- brief = true;
- break;
-
-#ifndef __KERNEL__
-#ifndef softOSE
- case 's' :
- plcp_save_control_ber(unit);
- plcp_save_payload_ber(unit);
- plcp_save_slice_ber(unit);
-#endif /* softOSE */
-#endif
- printf("BER samples saved.\n");
-
- return RET_SUCCESS;
-
- default:
- goto usage;
- }
- }
-
- if (brief) {
- plcp_display_brief_ber(unit, flags);
- } else {
- plcp_display_control_ber(unit,flags);
- plcp_display_payload_ber(unit,flags);
- plcp_display_slice_ber(unit,flags);
- }
-
- return RET_SUCCESS;
-
-usage:
- printf("ber displays payload ber for each band\n");
- printf(" -b displays brief ber (control+payload+noise)\n");
- printf(" -d displays payload ber for each carrier\n");
- printf(" -e displays errors only\n");
- printf(" -c cleans previous BER samples\n");
- return RET_SUCCESS;
-
-}
-
-int shell_xxcmap(int argc, char *argv[]) {
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- int band, nbits, c;
- bool errors_only = false;
- uint16_t *mem_real_addr;
- uint16_t *mem_exp_addr;
- bool tx;
- int pattern;
- int offset;
- int flags = 0;
-
- if (strcmp(argv[0],"txcmap")==0) {
- tx = true;
- pattern = unit->test.ber_tx_control_pattern;
- } else {
- tx = false;
- pattern = unit->test.ber_rx_control_pattern;
- }
-
- getopt_clear();
-
- while ((c = getopt(argc, argv, "eh")) != EOF)
- {
- switch (c)
- {
- case 'e':
- errors_only = true;
- break;
-
- case 'h':
- default:
- goto usage;
- }
- }
-
- nbits = PLCP_BLOCK_PAYLOAD_SIZE*8;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- if (tx) {
- mem_real_addr = (uint16_t*)pmd_tx_control(band);
- offset = 0;
- } else {
- mem_real_addr = __rx_control[band];
- if (unit->plcp.config.vote) {
- /* need to use a "non-voted" block */
- offset = nbits % unit->control_bits_per_band[band];
- } else {
- offset = 0;
- }
- }
- printf("control map for %d bits starting at 0x%08x (band %d), offset=%d \n",
- nbits, mem_real_addr, band, offset);
-#if 0
- plcp_control_map(unit, mem_real_addr, nbits, band,
- compare_with_expected, errors_only, pattern, offset);
-#else
- mem_exp_addr = __control_patterns[pattern];
- if (errors_only) {
- flags |= BER_F_ERRORS_ONLY;
- }
- plcp_payload_map(unit, mem_exp_addr, mem_real_addr,
- __bpsk_qual, nbits, offset, flags, 16);
-#endif
- }
- }
- return RET_SUCCESS;
-
-usage:
- printf("%s options:\n",argv[0]);
- printf(" -h this help page\n");
- printf(" -e displays errors only\n");
-
- return RET_SUCCESS;
-}
-
-int shell_xxmap(int argc, char *argv[]) {
-
- int slices;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- struct pmd_band_quality *qual[PMD_MAX_BANDS];
- int band, slots, c;
- uint32_t *shrinked_mem;
- uint32_t *shrinked_pattern;
- int nbits;
- int offset = 0;
- int flags = 0;
- int pattern;
- uint8_t rx_bands;
-
- qual[0] = NULL;
- if (strcmp(argv[0],"txmap")==0) {
- for (band=1;band<PMD_MAX_BANDS;band++) {
- qual[band] = (struct pmd_band_quality*)
- (PMD_PHLIC_DATA_REGBASE
- +PMD_BAND(band)+PMD_BAND_TX_QUALITY);
- }
- slices = __tx_slices;
- slots = (unit->PMD->tx_payload_nb_symbols+1)/unit->nb_bands;
- plcp_copy_fec_mem((uint16_t*)txmem, (uint16_t*)PMD_FEC_TX_MEM, slices);
- mem_shrink((uint8_t*)shrinked_txmem,(uint16_t*)txmem,FEC_SHRINKED_MEMSIZE);
- shrinked_mem = shrinked_txmem;
- pattern = unit->test.ber_tx_payload_pattern;
- rx_bands = unit->used_bands;
- } else {
- for (band=1;band<PMD_MAX_BANDS;band++) {
- qual[band] = (struct pmd_band_quality*)
- (PMD_PHLIC_DATA_REGBASE
- +PMD_BAND(band)+PMD_BAND_RX_QUALITY);
- }
- slices = unit->ber.slices;
- slots = (unit->PMD->rx_payload_nb_symbols+1)/unit->nb_bands;
- shrinked_mem = shrinked_rxmem;
- pattern = unit->test.ber_rx_payload_pattern;
- rx_bands = unit->ber.rx_bands;
- }
- shrinked_pattern = plcp_shrinked_patterns[pattern];
-
- if (slices>(FEC_MAX_SLICES-1)) {
- offset = (slices-(FEC_MAX_SLICES-1))*
- (PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
- }
- nbits = (slices*PMD_SLICE_SIZE_WITH_REED_SOLOMON*12);
-
- getopt_clear();
-
- while ((c = getopt(argc, argv, "ehfmab")) != EOF)
- {
- switch (c)
- {
- case 'e':
- flags |= BER_F_ERRORS_ONLY;
- break;
-
- case 'm':
- flags |= BER_F_FEC_MISMATCH;
- break;
-
- case 'f':
- flags &= (~BER_F_ERRORS_ONLY);
- break;
-
- case 'a':
- flags |= BER_F_AFTER_FEC;
- break;
-
- case 'b':
- flags |= BER_F_BEFORE_FEC;
- break;
-
- case 'h':
- default:
- goto usage;
- }
- }
-
- if (flags & BER_F_FEC_MISMATCH) {
- plcp_bad_slice_map(unit, flags);
- } else {
- printf("displaying payload map for %d bits\n", nbits);
- printf("shrinked payload pattern #%d located at 0x%08x, real=0x%08x\n",
- pattern, shrinked_pattern, shrinked_mem);
- plcp_carrier_map(unit, shrinked_pattern, shrinked_mem,
- qual, nbits, offset, rx_bands, flags);
- }
-
- return RET_SUCCESS;
-
-usage:
- printf("%s options:\n",argv[0]);
- printf(" -h this help page\n");
- printf(" -e displays errors only\n");
- printf(" -f displays full map\n");
- printf("\n");
- printf(" FEC vs BER mismatch diagnostics:\n");
- printf(" -m FEC diagnostics (FEC vs BER)\n");
- printf(" -a display mismatching slices after FEC\n");
- printf(" -b display mismatching slices before FEC\n");
- return RET_SUCCESS;
-}
-
-int shell_xxmem(int argc, char *argv[]) {
-
- int c, n = FEC_WORDS_PER_SLICE * FEC_MAX_SLICES, l;
- bool commas = false;
- int w;
- volatile uint16_t *addr;
- bool fec_diag = false;
-
- if (strcmp(argv[0],"txmem")==0) {
- addr = (volatile uint16_t*)PMD_FEC_TX_MEM;
- } else {
- addr = (volatile uint16_t*)PMD_FEC_RX_MEM;
- }
-
- getopt_clear();
-
- while ((c = getopt(argc, argv, "n:chfrs:")) != EOF)
- {
- switch (c)
- {
- case 'c':
- commas = true;
- break;
-
- case 'f':
- fec_diag = true;
- break;
-
- case 'r':
- addr = (uint16_t*)rxmem;
- break;
-
- case 'n':
- n = strtoul(optarg,NULL,0);
- break;
-
- case 's':
- n = strtoul(optarg,NULL,0);
- n = n * FEC_WORDS_PER_SLICE;
- break;
-
- case 'h':
- default:
- goto usage;
- }
- }
-
- if (fec_diag) {
- plcp_bad_slice_dump();
- return RET_SUCCESS;
- }
-
- plcp_fec_dbg_mem_enable();
- l = 0;
- if (commas) {
- printf("{");
- w = 0;
- while (n--) {
- if (!w) {
- printf("\n ");
- w = 8;
- if (++l==32) {
- l = 0;
- printf("\n");
- }
- }
- w--;
- printf("0x%04x, ",*addr);
- addr++;
- }
- printf("\n}\n");
- } else {
- while (--n) {
- printf("%08x %04x\n", addr, *addr);
- addr++;
- }
- }
- plcp_fec_dbg_mem_disable();
- return RET_SUCCESS;
-
-usage:
- printf("%s options:\n",argv[0]);
- printf(" -c displays memory words separated with commas\n");
- printf(" -n <words> displays only <words> words\n");
- printf(" -f FEC diagnostics (FEC vs BER)\n");
- printf(" -r displays last copy of FEC RX memory\n");
-
- return RET_SUCCESS;
-}
-
-int shell_ber_info(int argc, char *argv[]) {
- int pattern;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- printf( "BER samples .................... %d\n"
- "BER last rx control pattern .... %d\n"
- "BER last rx payload pattern .... %d\n"
- "BER last d_len ................. %d\n"
- "BER last pattern ............... %d\n"
- "BER_CONTROL_PATTERN_SIZE ....... %d\n"
- "sizeof(struct ber_header) ...... %d\n",
- unit->stats.ber.samples,
- unit->test.ber_rx_control_pattern,
- unit->test.ber_rx_payload_pattern,
- unit->stats.ber.d_len,
- unit->stats.ber.pattern,
- BER_CONTROL_PATTERN_SIZE,
- sizeof(struct ber_header));
-
- for (pattern=0;pattern<=BER_PATTERN_MAX;pattern++) {
- printf("0x%08x __control_patterns[%d]\n",
- __control_patterns[pattern],pattern);
- dump8((char*)__control_patterns[pattern],
- BER_CONTROL_PATTERN_SIZE, 16);
- }
- return RET_SUCCESS;
-}
-#endif
-#endif
-
-void ber_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed)
-{
- struct ber_header *ber_h = (struct ber_header *)c_buf;
-
- unit->test.ber_rx_control_pattern = ber_h->control_pattern;
- unit->test.ber_rx_payload_pattern = ber_h->payload_pattern;
-
- /* ber sur les données de control */
- plcp_update_control_ber(unit, ber_h->control_pattern);
-
- /* ber sur la payload */
- unit->stats.ber.d_len = d_len;
- unit->stats.ber.pattern = ber_h->payload_pattern;
- plcp_update_noise_ber(unit);
- plcp_update_carrier_ber(unit, ber_h->payload_pattern,
- unit->stats.ber.payload_valid, unit->stats.ber.payload_invalid,
- unit->stats.ber.raw_slice_valid, unit->stats.ber.raw_slice_invalid);
- plcp_update_slice_ber(unit, ber_h->payload_pattern, d_buf, d_len);
-
- if(unit->ce.get_spectrum) {
- /* analyse spectrum measures */
- ce_analyse_spectrum(unit);
- }
- /* traitement habituel sur la trame */
- test_handle_rx(unit, host, c_buf, c_len, d_buf, d_len, failed);
-}
-
-void ber_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed)
-{
- delay(unit->test.ber_delay);
- test_handle_tx(unit, host, c_buf, c_len, d_buf, d_len, failed);
-}
-
diff --git a/app/sm-emac-drv/src/plc_dbg.c b/app/sm-emac-drv/src/plc_dbg.c
deleted file mode 100755
index 519d90ec8f..0000000000
--- a/app/sm-emac-drv/src/plc_dbg.c
+++ /dev/null
@@ -1,236 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include "board.con"
-#endif
-#include "plc_pmd.h"
-#include "plc_drv.h"
-#include "platform.h"
-#include "plc_dbg.h"
-#include "shell_if.h"
-#include "plc_dbg.h"
-
-
-uint16_t plc_dbg_area[4095];
-
-uint8_t last_tx[PLC_SNAP_NB_RECORDS][PLC_SNAP_SIZE];
-uint8_t last_tx_burst[PLC_SNAP_NB_RECORDS][8];
-uint8_t last_rx[PLC_SNAP_NB_RECORDS][PLC_SNAP_SIZE];
-uint8_t last_rx_burst[PLC_SNAP_NB_RECORDS][8];
-
-#undef PLC_PARAM
-#define PLC_PARAM(type, name, value,comment) type name = value; /* comment */
-#include "plc_param.h"
-
-struct plc_packet_record plc_packet_log[PLC_SNAP_NB_RECORDS];
-int plc_packet_log_idx = 0;
-
-#if 0
-void mac_display_frame(struct plcp_control *control,
- struct mac_header *header,
- uint8_t *c_buf, int c_len,
- uint8_t *d_buf, int d_len) {
-
-#if 0
- uint32_t mask_low;
- uint32_t mask_high;
-#endif /* MAC_TOKEN*/
-
-#ifndef __KERNEL__
- plcp_dump_control(control);
- printf("\n%08x MAC header\n", header);
-
- mac_print_header(header);
-
- printf("\n%08x MAC c_buf\n", c_buf);
- dump8(c_buf, c_len, 16);
-
- printf("\n%08x MAC d_buf\n", d_buf);
- dump8(d_buf, d_len, 16);
-#else
- printf("mac_display_frame not implented in KERNEL mode\n");
-#endif /* __KERNEL__ */
-}
-
-#if 0
-int mac_event_count[MAC_NB_STATES][MAC_NB_EVENTS];
-int mac_unexpected_event[MAC_NB_STATES][MAC_NB_EVENTS];
-int mac_failed_count[MAC_NB_STATES][MAC_NB_EVENTS];
-
-void mac_clean_stats(void) {
- memset(mac_event_count,0,sizeof(mac_event_count));
- memset(mac_unexpected_event,0,sizeof(mac_unexpected_event));
- memset(mac_failed_count,0,sizeof(mac_failed_count));
-}
-
-char *state_name[MAC_NB_STATES] = {
- "IDLE",
- "RX",
- "ACK",
- "DATA",
- "W_AK",
- "UDAT",
- "RX_D",
- "RX_U",
- "AK_D",
- "AK_U",
- "AK+D",
- "AK+U"
-};
-
-char *event_name[MAC_NB_EVENTS] = {
- "busy",
- "rx_start",
- "idle",
- "rx_end",
- "rx_ack",
- "rx_data",
- "rx_udata",
- "tx_data",
- "tx_udata",
- "tx_end",
- "tmo_tx",
- "tmo_ack",
- "rx_ack_d",
- "rx_ack_u",
- "rx_eof"
-};
-
-struct mac_log_entry {
- int state;
- int event;
-};
-
-#define MAC_LOG_SZ 10
-int mac_log_idx = 0;
-struct mac_log_entry mac_log[MAC_LOG_SZ];
-
-void mac_log_event(int state, int event) {
- mac_event_count[state][event]++;
- mac_log[mac_log_idx].state = state;
- mac_log[mac_log_idx].event = event;
- mac_log_idx++;
- if (mac_log_idx >= MAC_LOG_SZ) {
- mac_log_idx = 0;
- }
-}
-
-static char buffer[256];
-
-void mac_error_event(int state, int event) {
- int i, idx;
- uint32_t msr;
- char *p;
-
- mac_unexpected_event[state][event]++;
-#if 0
- LOCK_SAVE(msr);
- p= buffer;
- for (i=0, idx=mac_log_idx;i<MAC_LOG_SZ;i++) {
- p += sprintf(p, "%s/%s ",
- event_name[mac_log[idx].event],
- state_name[mac_log[idx].state]);
- idx++;
- if (idx >= MAC_LOG_SZ)
- idx =0;
- }
- RT_PRINTM(TRACE_MAC,TRACE_ERROR, "%s (unexpected)\n", buffer);
- LOCK_RESTORE(msr);
-#endif
-}
-
-void mac_failed_event(int state, int event) {
- mac_failed_count[state][event]++;
-}
-
-void mac_display_stats(int p[MAC_NB_STATES][MAC_NB_EVENTS], bool brief)
-{
- int state;
- int event;
-
- printf("%8s ","");
- for (state=0;state<MAC_NB_STATES;state++) {
- printf("%5s",state_name[state]);
- }
- printf("\n");
- for (event=0;event<MAC_NB_EVENTS;event++) {
- if (brief) {
- for (state=0;state<MAC_NB_STATES;state++) {
- if (p[state][event])
- goto display_this_event;
- }
- continue;
- }
-display_this_event:
- printf("%8s",event_name[event]);
- for (state=0;state<MAC_NB_STATES;state++) {
- printf("%5d",p[state][event]);
- }
- printf("\n");
- }
-}
-
-void mac_display_all_events(void) {
- printf("--- all events ---\n");
- mac_display_stats(mac_event_count, false);
-}
-
-void mac_display_unexpected_events(void) {
- printf("--- unexpected events (in brief) ---\n");
- mac_display_stats(mac_unexpected_event, true);
-}
-
-void mac_display_send_failed(void) {
- printf("--- send failed events (in brief) ---\n");
- mac_display_stats(mac_failed_count, true);
-}
-
-#endif /* MAC_TOKEN */
-
-uint32_t plc_bug_catch_ra = 0;
-int plc_bug_snap = 0;
-bool plc_bug_freeze = false;
-char plc_bug_snapshot[4096];
-
-void bug(char *file, int line) {
-
-#ifdef softOSE
- printf("bug detected in %s:%d\n",file,line);
-#else
- uint32_t ra; /* return address */
- uint32_t var;
- uint32_t msr;
-
- LOCK_SAVE(msr);
-#ifndef __KERNEL__
- __asm{
- MOV var, &ra
- STR lr, [&ra]
- }
-#else
- printf("asm code not implemented in KERNEL mode\n");
-#endif
- if ((plc_bug_catch_ra==ra) ||(plc_bug_catch_ra==-1)) {
- RT_PRINTM(TRACE_MAC,TRACE_ERROR,
- "bug detected in %s:%d ra = 0x%08x\r\n",file,line,ra);
- if (plc_bug_snap&1) {
- plcp_snapshot(plc_bug_snapshot);
- RT_PRINTM(TRACE_MAC,TRACE_ERROR, "%s\r\n",plc_bug_snapshot);
- }
- if (plc_bug_snap&2) {
- mac_snapshot(plc_bug_snapshot);
- RT_PRINTM(TRACE_MAC,TRACE_ERROR, "%s\r\n",plc_bug_snapshot);
- }
- if (plc_bug_freeze==true) {
- while(1);
- }
- } else {
- RT_PRINTM(TRACE_BUG,TRACE_ERROR,
- "bug detected in %s:%d ra = 0x%08x\r\n",file,line,ra);
- }
- LOCK_RESTORE(msr);
-}
-#endif /* softOSE */
-#endif
diff --git a/app/sm-emac-drv/src/plc_drv.c b/app/sm-emac-drv/src/plc_drv.c
deleted file mode 100644
index 7d96f56302..0000000000
--- a/app/sm-emac-drv/src/plc_drv.c
+++ /dev/null
@@ -1,831 +0,0 @@
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
-
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#endif
-#include <stddef.h>
-#include <string.h>
-#include "osetypes.h" /* Basic types in OSE products. */
-
-#ifdef OSE_EPSILON
-#include "ose_i.h"
-#include "bios.h"
-#include "exc_inthdlr.h"
-#else
-#include "ose.h"
-#endif
-
-#ifdef USE_OSEDEF_H
-#include "osedef.h"
-#endif
-
-#define DEVICE_DRIVER /* This file is a device driver implementation. */
-#include "ethdev.h" /* Interface for ethernet device drivers. */
-#include "cpu.h" /* CPU specific definitions. */
-#include "board.con" /* Board specific configurations. */
-
-#include "plc_dbg.h"
-
-#include "plc_drv_if.h"
-#include "plc_drv.h"
-#include "plc_mac.h"
-#include "plc_plcp.h"
-#include "plc_pmd.h"
-#include "plc_test.h"
-#include "plc_dbg.h"
-#include "plc_neighbour.h"
-#include "plc_sms.h"
-#include "plc_ce.h"
-#include "mac_carp.h"
-
-/* structure commune pour toutes les unités */
-struct plc_drv plc_drv;
-
-
-/* 1 unit = a set of bands = 1 network interface */
-
-struct plc_drv_unit units[PLC_DRV_MAX_UNITS];
-
-struct plc_drv_unit *plc_drv_get_unit(int id) {
- if (id>PLC_DRV_MAX_UNITS) {
- return NULL;
- } else {
- return &units[id];
- }
-}
-
-#ifdef softOSE
-int plc_poll_phlic() {
- /* IRQs are simulated by sending signals */
- return 0;
-}
-
-int plc_poll_dma() {
- return 0;
-}
-
-int plc_poll_ahb() {
- return 0;
-}
-#endif /* softOSE */
-
-extern void pmd_phlic_isr(void);
-extern void pmd_dma_isr(void);
-extern void ahb_error_isr(void);
-
-
-/*****************************************************************
- *
- * ddDevClass
- *
- *****************************************************************/
-
-static U32
-ddDevClass(void)
-{
- return DEVICE_CLASS;
-}
-
-
-/*****************************************************************
- *
- * ddDevInfo
- *
- *****************************************************************/
-
-static DevErr
-ddDevInfo(DevTag *tagdList)
-{
- DevTag *dummy = 0;
- /* A pointer to the client's error tag pointer. */
- DevTag **errPtr = &dummy;
-
- while (*tagdList != DEVICE_TAGEND)
- {
- switch (*tagdList)
- {
- case DEVICE_TAGERRPTR:
- errPtr = (DevTag **) tagdList[1];
- break;
-
- case DEVICE_TAGD_OPENALL:
- tagdList[1] = (DevTag) 0;
- break;
-
- case DEVICE_TAGD_UNITLO:
- tagdList[1] = (DevTag) 0;
- break;
-
- case DEVICE_TAGD_UNITHI:
- tagdList[1] = (DevTag) PLC_DRV_MAX_UNITS;
- break;
-
- case DEVICE_TAGD_NAME:
- strcpy((char *) tagdList[1], PLC_DRV_NAME);
- break;
-
- case DEVICE_TAGD_VERSION:
- tagdList[1] = (DevTag) DEVICE_VERSION;
- break;
-
- default:
- *errPtr = tagdList;
- return DEVICE_EINVALID_TAG;
- }
- tagdList += 2; /* Skip tag and it's value. */
- }
- return DEVICE_SUCCESS;
-}
-
-/*****************************************************************
- *
- * ddUnitInfo
- *
- *****************************************************************/
-
-static DevErr
-ddUnitInfo(U32 unit, DevTag *taguList)
-{
- DevTag *dummy = 0;
- /* A pointer to the client's error tag pointer. */
- DevTag **errPtr = &dummy;
-
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- while (*taguList != DEVICE_TAGEND)
- {
- switch (*taguList)
- {
- case DEVICE_TAGERRPTR:
- errPtr = (DevTag **) taguList[1];
- break;
-
- case DEVICE_TAGU_DEVTYPES:
- taguList[1] = (DevTag) DEVICE_TETHERNET;
- break;
-
- case DEVICE_TAGU_INUSE:
- taguList[1] = (DevTag) p->opened;
- break;
-
- case DEVICE_TAGU_MAX_MTU:
- taguList[1] = PLC_DRV_MTU;
- break;
-
- case DEVICE_TAGU_MAX_MRU:
- taguList[1] = PLC_DRV_MRU;
- break;
-#ifdef OSE_DELTA
- case DEVICE_TAGU_NUMDEVTYPES:
- taguList[1] = 1;
- break;
-#endif
- default:
- *errPtr = taguList;
- return DEVICE_EINVALID_TAG;
- }
-
- taguList += 2; /* Skip tag and it's value. */
- }
- return DEVICE_SUCCESS;
-}
-
-
-/*****************************************************************
- *
- * ddOpen
- *
- *****************************************************************/
-
-static DevErr
-ddOpen(U32 unit, U32 devicethTypes, void *dcObjects,
- const struct DcFuncs * dcfuncs, struct ISRInfo *isrInfo)
-{
- struct plc_drv_unit *p;
- int i;
-
- p = plc_drv_get_unit(unit);
-
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-#if 0
- if (devicethTypes != DEVICE_TETHERNET)
- return DEVICE_EILLEGAL_DEVTYPE;
-#endif
-
- if (!p->init)
- return DEVICE_EDEVICE_NOT_FOUND;
-
- if (p->opened)
- return DEVICE_EALREADY_OPENED;
-
- /* PLC led on */
-#ifdef SP_CRISTINA
-#ifndef __KERNEL__
- plc_system_led(0);
-#endif
-#endif
-
- init_crc32();
-
-#if 0
- drv_init_buffer();
-#endif
-
- /* open */
- mac_open(p);
-
- /* Set our local device handler function pointers. */
-
- p->dcObj = dcObjects;
- p->dcFuncs = *dcfuncs;
-
- if (isrInfo) {
- if(plc_drv.units_opened > 0){
- p->polled = 0;
- isrInfo->numISRs = 0;
- } else { /* first unit */
- p->polled = 0;
- isrInfo->numISRs = 3;
- /* IRQ from the PHLIC */
- isrInfo->ISR[0].entrypoint = pmd_phlic_isr;
- isrInfo->ISR[0].stacksize = PLC_DRV_ISR_STACK_SIZE;
- isrInfo->ISR[0].vector = PLC_PHLIC_INT_VECTOR;
- isrInfo->ISR[0].priority = PLC_PHLIC_INT_PRIO;
- /* IRQ from the FEC */
- isrInfo->ISR[1].entrypoint = pmd_dma_isr;
- isrInfo->ISR[1].stacksize = PLC_DRV_ISR_STACK_SIZE;
- isrInfo->ISR[1].vector = PLC_DMA_INT_VECTOR;
- isrInfo->ISR[1].priority = PLC_DMA_INT_PRIO;
- /* AHB error IRQ */
- isrInfo->ISR[2].entrypoint = ahb_error_isr;
- isrInfo->ISR[2].stacksize = PLC_DRV_ISR_STACK_SIZE;
- isrInfo->ISR[2].vector = AHB_ERROR_INT_VECTOR;
- isrInfo->ISR[2].priority = AHB_ERROR_INT_PRIO;
- }
-
- } else {
- p->polled = 1;
- }
-
- p->opened = 1;
- plc_drv.units_opened++;
- p->numEthTypes = 0; /* Initialize Ethernet types to 0 */
- for (i=0;i<MAXMACTYPES;i++) {
- p->ethTypes[i] = 0;
- }
-
- /* Virtual Ports init */
- for (i=0; i<PLC_MAX_VPORTS; i++)
- p->vports[i] = NULL;
-
- return DEVICE_SUCCESS;
-}
-
-
-/*****************************************************************
- *
- * ddStart
- *
- *****************************************************************/
-
-static DevErr
-ddStart(U32 unit)
-{
-
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!p->opened)
- return DEVICE_ENOT_OPENED;
-
- if (p->started)
- return DEVICE_EALREADY_STARTED;
-
- /* allocation of buffer done by PLCP */
-
- p->started = 1;
- plc_drv.units_started++;
-
- /* PLC led off */
-#ifdef SP_CRISTINA
-#ifndef __KERNEL__
- plc_system_led(1);
-#endif
-#endif
-
- /* initialisation des tests */
- test_init(p);
-#ifndef __KERNEL__
- testu_init(p);
-#else
- printf("testu_init function not implemented in KERNEL\n");
-#endif
-
- /* initialisation des data pour ND */
- neighbour_init(p);
-
- /* start the MAC layer */
- mac_start(p);
-
- /* initialisation des data pour la channel estimation */
- ce_init(p);
-
- /* Set flat banana mode */
-/* pmd_set_adapt_flat_banana();*/
-#ifndef __KERNEL__
- /* Apply des parametres de mib sauvegardées */
- shell_mibApply(0, NULL);
-#endif
-
-
- return DEVICE_SUCCESS;
-}
-
-/*****************************************************************
- *
- * ddClose
- *
- *****************************************************************/
-
-static DevErr
-ddClose(U32 unit)
-{
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!p->opened)
- return DEVICE_ENOT_OPENED;
-
- if (p->started) {
-
- p->started = 0;
- plc_drv.units_started--;
- }
- p->opened = 0;
- plc_drv.units_opened--;
- return DEVICE_SUCCESS;
-}
-
-/*****************************************************************
- *
- * ddGetConf
- *
- *****************************************************************/
-
-static DevErr
-ddGetConf(U32 unit, DevTag *tagcList)
-{
- DevTag *dummy = 0;
- DevTag **errPtr = &dummy;
- uint32_t typeNo = 0;
-
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!p->opened)
- return DEVICE_ENOT_OPENED;
-
- while (*tagcList != DEVICE_TAGEND)
- {
- switch (*tagcList)
- {
-#ifdef OSE_DELTA
- case DEVICE_TAGC_INTERRUPTS:
- tagcList[1] = (p->polled == 1) ? 0 : 1;
- break;
-#endif
- case DEVICE_TAGC_ETHADDR:
- memcpy((void *) tagcList[1], p->mac_addr, 6);
- break;
-
- case DEVICE_TAGC_TYPE:
- if (typeNo == MAXMACTYPES)
- tagcList[1] = 0;
- else
- tagcList[1] = p->ethTypes[typeNo++];
- break;
-
- case DEVICE_TAGERRPTR:
- errPtr = (DevTag **) tagcList[1];
- break;
-
- default:
- *errPtr = tagcList;
- return DEVICE_EINVALID_TAG;
- }
- tagcList += 2; /* Skip tag and it's value. */
- }
- return DEVICE_SUCCESS;
-}
-
-/*
- * TODO:
- * add configuration tag to specify the default modulation
- * add configuration tag to specify used bands
- * add configuration tagfor notches
- */
-
-/*****************************************************************
- *
- * ddSetConf
- *
- *****************************************************************/
-
-static DevErr
-ddSetConf(U32 unit, DevTag * tagcList)
-{
-
- DevTag *dummy = 0;
- DevTag **errPtr = &dummy; /* A pointer to the client's error tag pointer. */
- uint32_t typeSet = 0;
-
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!p->opened)
- return DEVICE_ENOT_OPENED;
-
- if (p->started)
- return DEVICE_EALREADY_STARTED;
-
- while (*tagcList != DEVICE_TAGEND)
- {
- switch (*tagcList)
- {
-#ifdef XXX_MAC_TOKEN
- case PLC_DEVICE_TAGC_TOKEN_TIMEOUT :
- p->timeout=(int)tagcList[1];
- break;
- case PLC_DEVICE_TAGC_TOKEN_MASTER :
- p->master=(bool)tagcList[1];
- break;
-#endif
- case PLC_DEVICE_TAGC_BANDS :
- plcp_set_bands(p,tagcList[1]);
- break;
-
-#ifdef OSE_DELTA
- /* Interrupt mode. */
- case DEVICE_TAGC_INTERRUPTS :
- p->polled = tagcList[1] == 0 ? 1 : 0;
- break;
-#endif
- /* Ethernet address. */
- case DEVICE_TAGC_ETHADDR:
- memcpy(p->mac_addr, (void *) tagcList[1], 6);
- break;
-
- /* Ethernet types. */
- case DEVICE_TAGC_TYPE:
- if (typeSet == 0)
- {
- typeSet = 1;
- p->numEthTypes = 0;
- }
-
- if (p->numEthTypes == MAXMACTYPES)
- {
- *errPtr = (DevTag *) tagcList;
- return DEVICE_EINVALID_TAG;
- }
- else
- p->ethTypes[p->numEthTypes++] = (uint16_t) tagcList[1];
- break;
-
- case PLC_DEVICE_TAGC_PAYLOAD_MOD :
- //plcp_set_payload_modulation(p,tagcList[1]);
- break;
-
- case DEVICE_TAGERRPTR:
- errPtr = (DevTag **) tagcList[1];
- break;
-
- default:
- *errPtr = (DevTag *) tagcList;
- return DEVICE_EINVALID_TAG;
- }
- tagcList += 2; /* Skip tag and it's value. */
- }
- return DEVICE_SUCCESS;
-}
-
-
-/*****************************************************************
- *
- * drv_handle_tx
- *
- *****************************************************************/
-
-void
-drv_handle_tx(struct plc_drv_unit *unit, struct plcp_host *host,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags,
- bool failed)
-{
-
- if(failed)
- unit->stats.drv.handle_tx_failed++;
- else
- unit->stats.drv.handle_tx++;
-
- if (!(flags & F_NO_HANDLE_TX)) {
- unit->dcFuncs.dcHandleTX(unit->dcObj, d_buf_sdu, d_len_sdu, 0);
- unit->stats.drv.handle_tx_data++;
- }
- else {
- unit->dcFuncs.dcFree(unit->dcObj, d_buf_sdu);
- }
-}
-/*****************************************************************
- *
- * drv_handle_rx
- *
- *****************************************************************/
-
-void
-drv_handle_rx(struct plc_drv_unit *unit, struct plcp_host *host,
- uint8_t *c_buf_sdu, int c_len_sdu,
- uint8_t *d_buf_sdu, int d_len_sdu,
- int subtype, int flags,
- bool failed)
-{
-
- if(failed)
- unit->stats.drv.handle_rx_failed++;
- else
- unit->stats.drv.handle_rx++;
-
- unit->stats.drv.handle_rx_data++;
- unit->dcFuncs.dcHandleRX(unit->dcObj, d_buf_sdu, d_len_sdu, failed);
-}
-
-/*****************************************************************
- *
- * ddRead
- *
- *****************************************************************/
-
-static DevErr
-ddRead(U32 unit, void *buf, U32 *buflen)
-{
- /* discard values, since function not implemented */
- (void) unit;
- (void) buf;
- (void) buflen;
- return DEVICE_EFUNCTION_NOT_AVAILABLE;
-}
-
-/*****************************************************************
- *
- * ddWrite: called by bridge
- *
- *****************************************************************/
-
-static DevErr
-ddWrite(U32 id, void *buf, U32 *buflen)
-{
- struct plc_drv_unit *unit;
- DevErr err;
-#ifndef FEATURE_ENERVATION
- uint8_t subtype;
- uint8_t *DA;
- uint16_t *p_flags = (uint16_t*)((uint8_t*)buf + LNK_FLAGS_OFFSET);
- int flags ;
-#endif
-
- unit = plc_drv_get_unit(id);
- if (!unit)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!unit->opened)
- return DEVICE_ENOT_OPENED;
-
- if (!unit->started)
- return DEVICE_ENOT_STARTED;
-
-#ifdef FEATURE_ENERVATION
- if (mac_write(unit, (char*)buf, (int)(*buflen))<0) {
- return DEVICE_EQUEUE_FULL;
- } else {
- return DEVICE_SUCCESS;
- }
-#else
- /* si on ne filtre pas, on regarde si on ACK ou pas */
- if (unit->mac.filter) {
- flags = (int) *p_flags;
- } else {
- flags = (unit->mac.retransmit ? F_ACK : 0);
- }
-
- if (unit->mode == ad_hoc)
- subtype = MA_SUBTYPE_AD_HOC;
- else
- subtype = MA_SUBTYPE_INTRA_CELL;
-
- /* MAC addresse is in dbuf */
- DA=(uint8_t*)buf;
-
- /* Add address in carp table */
- /* DA = Source Address of the Eth packet */
- /* NHA = Our Adress; Our PLC MAC address */
- /* Only if not an ARP */
- /* if (DA[13] != 0x06) */
- carp_insert(&DA[6], unit->mac_addr);
-
- return mac_write(unit, DA, (uint8_t*)(buf), (int)(*buflen), subtype, flags, MAC_PRIO_MSDU,unit->mac_addr[5]);
-#endif
-}
-
-
-
-/*
- *===========================================================================
- * ddSimInt
- *===========================================================================
- * Description: Check registers for new RX and TX events and simulate
- * an interrupt by calling the ISR.
- *
- * Parameters: unit Which unit to check.
- *
- * Returns: DEVICE_SUCCESS
- * DEVICE_EILLEGAL_UNIT
- * DEVICE_ENOT_OPENED
- * DEVICE_ENOT_STARTED
- * DEVICE_EFUNCTION_NOT_AVAILABLE (if not implemented)
-*/
-
-static DevErr
-ddSimInt(U32 unit)
-{
- struct plc_drv_unit *p;
-
- p = plc_drv_get_unit(unit);
- if (!p)
- return DEVICE_EILLEGAL_UNIT;
-
- if (!p->opened)
- return DEVICE_ENOT_OPENED;
-
- if (!p->started)
- return DEVICE_ENOT_STARTED;
-
- return DEVICE_SUCCESS;
-}
-
-/*****************************************************************
- *
- * ddAbortWrite
- *
- *****************************************************************/
-
-static DevErr
-ddAbortRead(U32 unit)
-{
- (void)unit;
- return DEVICE_EFUNCTION_NOT_AVAILABLE;
-}
-
-static DevErr
-ddAbortWrite(U32 unit)
-{
- (void)unit;
- return DEVICE_EFUNCTION_NOT_AVAILABLE;
-}
-
-/*****************************************************************
- *
- * plc_drv_functions
- *
- *****************************************************************/
-
-const struct DdFuncs *
-plc_drv_functions(void)
-{
- static const struct DdFuncs ddFuncs =
- {
- ddDevInfo,
- ddUnitInfo,
- ddOpen,
- ddStart,
- ddClose,
- ddGetConf,
- ddSetConf,
- ddWrite,
- ddRead,
- ddSimInt,
- ddAbortWrite,
- ddAbortRead
- };
-
- return &ddFuncs;
-}
-
-
-/*****************************************************************
- *
- * plc_drv_init
- *
- *****************************************************************/
-
-DevErr
-plc_drv_init(void)
-{
- int i;
- DevErr err;
- for (i=0;i<PLC_DRV_MAX_UNITS;i++) {
- units[i].init = true;
- units[i].id = i;
- }
- err = mac_init();
- return err;
-}
-
-
-/*****************************************************************
- *
- * plc_drv_biosentry
- *
- *****************************************************************/
-
-long
-plc_drv_biosentry(long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7)
-{
- (void) arg7; /* not used */
-
- switch (arg1)
- {
- case DEVICE_FCINIT:
- return (long) plc_drv_init();
- case DEVICE_FCFUNCTIONS:
- return (long) plc_drv_functions();
- case DEVICE_FCDEVCLASS:
- return (long) ddDevClass();
- case DEVICE_FCDEVINFO:
- return (long) ddDevInfo((DevTag *) arg2);
- case DEVICE_FCUNITINFO:
- return (long) ddUnitInfo((uint32_t) arg2, (DevTag *) arg3);
-
- case DEVICE_FCOPEN:
- return (long) ddOpen((uint32_t) arg2,
- (uint32_t) arg3,
- (void *) arg4,
- (struct DcFuncs *) arg5,
- (struct ISRInfo *) arg6);
- case DEVICE_FCSTART:
- return (long) ddStart((uint32_t) arg2);
- case DEVICE_FCCLOSE:
- return (long) ddClose((uint32_t) arg2);
-
- case DEVICE_FCSETCONF:
- return (long) ddSetConf((uint32_t) arg2, (DevTag *) arg3);
- case DEVICE_FCGETCONF:
- return (long) ddGetConf((uint32_t) arg2, (DevTag *) arg3);
-
- case DEVICE_FCWRITE:
- return (long) ddWrite((uint32_t) arg2, (void *) arg3, (U32 *) arg4);
- case DEVICE_FCREAD:
- return (long) ddRead((uint32_t) arg2, (void *) arg3, (U32 *) arg4);
- case DEVICE_FCSIMINT:
- return (long) ddSimInt((uint32_t) arg2);
- case DEVICE_FCABORTWRITE:
- return (long) ddAbortWrite((uint32_t) arg2);
- case DEVICE_FCABORTREAD:
- return (long) ddAbortRead((uint32_t) arg2);
-
- default:
- return DEVICE_EUNKNOWN;
- }
-}
-
-void drv_lock(struct plc_drv_unit *unit) {
- mac_lock(unit);
- plcp_lock(unit);
-}
-
-void drv_unlock(struct plc_drv_unit *unit) {
- plcp_start(unit);
- plcp_unlock(unit);
- mac_unlock(unit);
-}
-
diff --git a/app/sm-emac-drv/src/plc_plcp.c b/app/sm-emac-drv/src/plc_plcp.c
deleted file mode 100755
index 089ac8c149..0000000000
--- a/app/sm-emac-drv/src/plc_plcp.c
+++ /dev/null
@@ -1,1004 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "platform.h"
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-#ifndef softOSE
-#include "gpio.h"
-#endif
-#ifndef softOSE
-#include "getopt.h"
-#endif
-#include "shell.h"
-#include "lib_if.h"
-#ifndef softOSE
-#include "utmo_if.h"
-#endif
-
-/* FUNCTION PROTOTYPES --------------------------------------------------- */
-
-/* MACROS */
-
-#define L_MAX 1024
-
-/* VARIABLES */
-
-struct pkt_log plcp_plog;
-struct pkt_log pmd_plog;
-
-/*
- * memcpy shall NOT be used for copying data to PHLIC: 8 bits access are
- * NOT supported.
- */
-
-#ifndef __KERNEL__
-__ALIGN(8)
-#endif
- struct plcp_block __rx_block
-#ifdef __KERNEL__
- __attribute__((aligned(8)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(8)
-#endif
-struct plcp_block __rx_block_waste
-#ifdef __KERNEL__
- __attribute__((aligned(8)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(8)
-#endif
-struct plcp_control __rx_control_waste
-#ifdef __KERNEL__
- __attribute__((aligned(8)))
-#endif
-;
-
-/* JANTUNES : 6 july 2004 (J-3) ; max_gain_per_band using HM ACP graphic*/
-//int max_gain_per_band[] = {0,2500,1600,1000,1000,850,850,800};
-int max_gain_per_band[] = {0,1000,1000,900,900,800,800,800};
-
-struct plcp_frame *plcp_tx_frame = NULL; /* current tx frame */
-struct plcp_frame *plcp_rx_frame = NULL; /* current rx frame */
-struct plcp_control rx_control; // to store each arabica block
-
-static struct plcp_callbacks __default_callbacks = {
- NULL, /* tx_end */
- NULL, /* busy */
- NULL, /* rx_start */
- NULL, /* rx_end */
- NULL, /* eof */
- NULL, /* tmo */
- NULL, /* rx_drop */
- NULL, /* tx_status */
-};
-
-struct plcp_callbacks *plcp_callbacks_fn = &__default_callbacks;
-
-static int l_idx;
-static int l_cnt;
-
-struct plcp_log {
- uint16_t date;
- uint32_t ra;
- char *name;
- int value;
-} plcp_log[L_MAX];
-
-int plcp_enable_log = 1;
-
-uint8_t plcp_rx_bands;
-
-/* FUNCTIONS ------------------------------------------------------------- */
-
-uint8_t plcp_get_rx_bands(struct plc_drv_unit *unit)
-{
- return plcp_rx_bands;
-}
-
-int plcp_log_locked = 0;
-
-void plcp_add_log(int line, uint16_t date, char *name, int value) {
- uint32_t ra;
-#ifndef __KERNEL__
-#ifndef softOSE
- __asm{
- STR lr, [&ra]
- }
-#endif /* softOSE */
-#else
- printf("asm code not implemented in KERNEL mode\n");
-#endif
- plcp_log[l_idx].ra = line;
- plcp_log[l_idx].date = date;
- plcp_log[l_idx].name = name;
- plcp_log[l_idx].value = value;
- if (++l_idx >=L_MAX) {
- l_idx = 0;
- }
- l_cnt++;
-}
-
-void plcp_debug_log() {
- int i, count;
-
- plcp_log_locked = 1;
- i = l_idx;
- for (count=0;count<L_MAX;count++) {
- if (plcp_log[i].ra!=0) {
- printf("%5d line=%5d %s=%d (0x%08x)\n",
- plcp_log[i].date,
- plcp_log[i].ra,
- plcp_log[i].name,
- plcp_log[i].value,
- plcp_log[i].value);
- }
- if (++i>=L_MAX) {
- i = 0;
- }
- }
- plcp_log_locked = 0;
-}
-
-void plcp_log_pmd_rx(struct plc_drv_unit *unit) {
- uint16_t date = plcp_get_timer(unit);
- struct pmd_unit *PHLIC_UNIT = pmd_get_unit(0);
-
-#define DV(a) plcp_add_log(__LINE__, date, #a, PHLIC_UNIT->a)
-
- DV(nb_bands);
- DV(last_band);
- DV(to_drop);
- DV(tx_more_ctl);
- DV(rx_more_ctl);
- DV(timer_irq_req1);
- DV(timer_irq_val1);
- DV(vote_wanted);
- DV(only_start);
- DV(rx_broadcast);
- DV(eof_irq_mask);
- DV(timer_irq_req2);
- DV(timer_irq_val2);
- DV(rx_start);
- DV(rx_high_slice_ad);
- DV(rx_low_slice_ad);
- DV(rx_slices_number);
- DV(rx_nb_calibrate);
- DV(rx_nb_refs);
- DV(rx_control_nb_symbols);
- DV(rx_nb_wait_ose);
- DV(rx_payload_nb_symbols);
- DV(rx_nb_eof);
- DV(rx_control_nb_words);
- DV(rx_spy_refs);
- DV(rx_spy_ctrls);
- DV(rx_nb_starts);
- DV(isr);
-
- PLCP_LOG(date, "PH1_EFR", *(uint16_t *)(PH1_EFR_ADDR));
- PLCP_LOG(date, "DSP_FTR", *(uint16_t *)(DSP_FTR_ADDR));
-
- if (plcp_log_level==1) {
- PLCP_LOG(date, "band links",
- *(uint16_t*)(pmd_desyr_link_addr(0)) +
- *(uint16_t*)(pmd_desyr_link_addr(1)) +
- *(uint16_t*)(pmd_desyr_link_addr(2)) +
- *(uint16_t*)(pmd_desyr_link_addr(3)) +
- *(uint16_t*)(pmd_desyr_link_addr(4)) +
- *(uint16_t*)(pmd_desyr_link_addr(5)) +
- *(uint16_t*)(pmd_desyr_link_addr(6)) +
- *(uint16_t*)(pmd_desyr_link_addr(7)));
- } else {
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x08",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+0*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x48",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+1*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x88",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+2*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0xc8",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+3*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x108",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+4*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x148",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+5*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x188",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+6*PMD_GOTO_SIZE));
- PLCP_LOG(date, "PHLIC_CODE_BASE+0x1c8",
- *(uint16_t*)(PMD_PHLIC_CODE_REGBASE+PMD_GOTO_BASE+7*PMD_GOTO_SIZE));
-
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1900",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1900));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1a00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1a00));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1b00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1b00));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1c00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1c00));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1d00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1d00));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1e00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1e00));
- PLCP_LOG(date, "PHLIC_DATA_BASE+0x1f00",
- *(uint16_t*)(PMD_PHLIC_DATA_REGBASE+0x1f00));
-
- PLCP_LOG(date, "DESYR_LINK band 0", *(uint16_t*)(pmd_desyr_link_addr(0)));
- PLCP_LOG(date, "DESYR_LINK band 1", *(uint16_t*)(pmd_desyr_link_addr(1)));
- PLCP_LOG(date, "DESYR_LINK band 2", *(uint16_t*)(pmd_desyr_link_addr(2)));
- PLCP_LOG(date, "DESYR_LINK band 3", *(uint16_t*)(pmd_desyr_link_addr(3)));
- PLCP_LOG(date, "DESYR_LINK band 4", *(uint16_t*)(pmd_desyr_link_addr(4)));
- PLCP_LOG(date, "DESYR_LINK band 5", *(uint16_t*)(pmd_desyr_link_addr(5)));
- PLCP_LOG(date, "DESYR_LINK band 6", *(uint16_t*)(pmd_desyr_link_addr(6)));
- PLCP_LOG(date, "DESYR_LINK band 7", *(uint16_t*)(pmd_desyr_link_addr(7)));
- }
-
- PLCP_LOG(date, "DSP_CHMR", *(uint16_t*)(DSP_CHMR_ADDR));
-
- PLCP_LOG(unit->PMD->val_timer, "val_timer", unit->PMD->val_timer);
-}
-void plcp_log_pmd_tx(struct plc_drv_unit *unit) {
- uint16_t date = plcp_get_timer(unit);
- struct pmd_unit *PHLIC_UNIT = pmd_get_unit(0);
-
-#define DV(a) plcp_add_log(__LINE__, date, #a, PHLIC_UNIT->a)
-
- DV(nb_bands);
- DV(last_band);
- DV(tx_more_ctl);
- DV(timer_irq_req1);
- DV(timer_irq_val1);
- DV(vote_wanted);
- DV(only_start);
- DV(tx_broadcast);
- DV(eof_irq_mask);
- DV(timer_irq_req2);
- DV(timer_irq_val2);
- DV(tx_start);
- DV(tx_high_slice_ad);
- DV(tx_low_slice_ad);
- DV(tx_slices_number);
- DV(tx_nb_calibrate);
- DV(tx_nb_refs);
- DV(tx_control_nb_symbols);
- DV(tx_nb_wait_ose);
- DV(tx_payload_nb_symbols);
- DV(tx_nb_eof);
- DV(tx_control_nb_words);
- DV(tx_min);
- DV(tx_max);
- DV(isr);
-
- PLCP_LOG(date, "PH1_EFR", *(uint16_t *)(PH1_EFR_ADDR));
-
- PLCP_LOG(date, "band links",
- *(uint16_t*)(pmd_desyr_link_addr(0)) +
- *(uint16_t*)(pmd_desyr_link_addr(1)) +
- *(uint16_t*)(pmd_desyr_link_addr(2)) +
- *(uint16_t*)(pmd_desyr_link_addr(3)) +
- *(uint16_t*)(pmd_desyr_link_addr(4)) +
- *(uint16_t*)(pmd_desyr_link_addr(5)) +
- *(uint16_t*)(pmd_desyr_link_addr(6)) +
- *(uint16_t*)(pmd_desyr_link_addr(7)));
-
- PLCP_LOG(unit->PMD->val_timer, "val_timer", unit->PMD->val_timer);
-}
-
-void plcp_log_control(int date, struct plcp_control *control) {
-
- PLCP_LOG(date, "channel_id", control->channel_id);
- PLCP_LOG(date, "TEI", control->TEI);
- /* DO_THIS: control->TEI and control->TMI */
- PLCP_LOG(date, "clen", control->clen);
- PLCP_LOG(date, "dlen", control->dlen);
- PLCP_LOG(date, "efr", control->efr);
- PLCP_LOG(date, "slices", control->slices);
- PLCP_LOG(date, "cac.type", control->cac.type);
- PLCP_LOG(date, "cac.subtype", control->cac.subtype);
- //PLCP_LOG(date, "cac.retry", control->cac.retry);
- PLCP_LOG(date, "cac.seqno", control->cac.seqno);
- PLCP_LOG(date, "cac.DA[0]", control->cac.DA[0]);
- PLCP_LOG(date, "cac.DA[1]", control->cac.DA[1]);
- PLCP_LOG(date, "cac.DA[2]", control->cac.DA[2]);
- PLCP_LOG(date, "cac.DA[3]", control->cac.DA[3]);
- PLCP_LOG(date, "cac.DA[4]", control->cac.DA[4]);
- PLCP_LOG(date, "cac.DA[5]", control->cac.DA[5]);
- PLCP_LOG(date, "cac.SA[0]", control->cac.SA[0]);
- PLCP_LOG(date, "cac.SA[1]", control->cac.SA[1]);
- PLCP_LOG(date, "cac.SA[2]", control->cac.SA[2]);
- PLCP_LOG(date, "cac.SA[3]", control->cac.SA[3]);
- PLCP_LOG(date, "cac.SA[4]", control->cac.SA[4]);
- PLCP_LOG(date, "cac.SA[5]", control->cac.SA[5]);
- PLCP_LOG(date, "crc", control->crc);
- if (control->crc == control_crc(control)) {
- PLCP_LOG(date, "crc is valid", 1);
- } else {
- PLCP_LOG(date, "crc is invalid", 0);
- }
-}
-
-int plcp_find_valid_block(
- struct plc_drv_unit *unit,
- struct plcp_block *block) {
-
- int band;
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band) && (pmd_band_started(band))) {
- memcpy(block,(void*)pmd_rx_control(band),sizeof(struct plcp_block));
- if (block_crc(block)==block->crc) {
- unit->stats.plcp.valid_block[band]++;
- return 0;
- } else {
- unit->stats.plcp.invalid_block[band]++;
- }
- }
- }
- return -1;
-}
-
-
-void plcp_set_efr(struct plc_drv_unit *unit, int efr)
-{
- *(uint16_t *)(PH1_EFR_ADDR) =
- *(uint16_t *)(PH2_EFR_ADDR) =
- *(uint16_t *)(PH3_EFR_ADDR) =
- *(uint16_t *)(PH4_EFR_ADDR) =
- *(uint16_t *)(PH5_EFR_ADDR) =
- *(uint16_t *)(PH6_EFR_ADDR) =
- *(uint16_t *)(PH7_EFR_ADDR) = (efr+delta_efr);
-}
-
-
-/* first reference symbol */
-void plcp_set_rpr(int rpr) {
- *(volatile uint16_t*)DSP_RPR_ADDR = rpr + delta_rpr;
-}
-
-/* second reference symbol */
-void plcp_set_srr(int srr) {
- *(volatile uint16_t*)DSP_FTR_ADDR = srr + delta_srr;
-}
-
-/* reference space register */
-void plcp_set_periodic_ref(struct plc_drv_unit *unit,
- int ref_interval, int nb_ref, int nb_bands) {
- *(volatile uint16_t*)DSP_RSR_ADDR = ref_interval + nb_ref;
- unit->PMD->rx_ref_interval = (nb_bands * ref_interval);
- unit->PMD->tx_ref_interval = (nb_bands * ref_interval);
- unit->PMD->nb_periodic_ref = (nb_bands * nb_ref);
-}
-
-/* configure RX parameters according to the number of used bands */
-void plcp_set_rx_nb_bands(struct plc_drv_unit *unit, int nb_bands) {
- /*
- * The first reference symbol is seen as the "start" symbol on
- * the receive side. Therefore, there the number of reference
- * symbols must be reduced by one on the receive side...
- */
- unit->PMD->rx_nb_starts = nb_bands * unit->plcp.config.nb_start;
- unit->PMD->rx_nb_refs = nb_bands * (unit->plcp.config.nb_ref_head - 1);
- unit->PMD->rx_nb_wait_ose = nb_bands * unit->plcp.config.nb_wait_control;
- unit->PMD->rx_nb_eof = unit->plcp.config.rx_nb_eof * nb_bands;
- unit->PMD->rx_control_nb_symbols = unit->block_slots * nb_bands;
-}
-
-/*****************************************************************
- *
- * plcp_set_bands
- *
- * set bands owning the unit according to the mask.
- *
- *****************************************************************/
-
-void plcp_set_bands(struct plc_drv_unit *unit, int mask)
-{
- int band;
- int nb_bands = 0;
-
- unit->used_bands = mask;
-
- /* count number of bands */
- for (band=1; band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit, band)) {
- nb_bands++;
- }
- }
- unit->nb_bands = nb_bands;
-
- /* JANTUNES : 06 Juillet 2004 (J-3), max_gain en fonction du nb de bandes */
- unit->neighbour.tx_gain=(max_gain_per_band[nb_bands]);
-}
-
-
-/* on cherche à savoir si le canal est occupé */
-bool plcp_is_medium_busy(struct plc_drv_unit *unit)
-{
- int band;
- bool busy;
- busy=false;
-#ifndef softOSE
- /* check plcp state machine to see if sta is receiving or transmitting */
- if(unit->plcp.state == PLCP_STATE_IDLE)
- {
- /* sense if there is a signal activity on one band at least */
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- if(pmd_is_band_busy(band)){
- busy=true;
- break;
- }
- }
- }
- }
- else { /* transmitting or receiving */
- busy=true;
- }
-#endif
- return busy;
-}
-
-uint16_t plcp_get_timer(struct plc_drv_unit *unit)
-{
-#ifndef softOSE
- return (unit)->PMD->val_timer;
-#else
-#define PLCP_TIMER_MASK ((uint64_t)0xffff)
- uint64_t ms;
- uint16_t val_timer;
- struct timeval tv;
-
- (void) unit;
-
- gettimeofday(&tv, NULL);
- ms=tv.tv_sec*1000+tv.tv_usec/1000;
- val_timer=(uint16_t)(ms & PLCP_TIMER_MASK);
- return val_timer;
-#endif
-}
-
-/*****************************************************************
- *
- * plcp_init
- *
- * This function is called at init of the device. It fixes the
- * default channel modulation for each band and register the PMD
- * indication. Independant of the units.
- *
- *****************************************************************/
-
-int plcp_init(void)
-{
- pmd_init();
- plcp_init_frames();
- plcp_init_ber();
- plcp_channels_init();
- return DEVICE_SUCCESS;
-}
-
-/*****************************************************************
- *
- * plcp_open
- *
- * open an unit, initializes bands, default control
- * modulation, and force stop rx state machine.
- *
- *****************************************************************/
-
-int plcp_open(struct plc_drv_unit *unit, struct plcp_callbacks *callbacks)
-{
- if (!callbacks) {
- return DEVICE_EUNKNOWN;
- }
-
- if (pmd_open(unit->id)<0)
- return -1;
-
- unit->PMD = pmd_get_unit(unit->id);
-
- pkt_log_init(&plcp_plog, 50, 64);
- pkt_log_init(&pmd_plog, 50, 64);
-
- unit->used_bands = 0;
- unit->control_modulation = PLC_MOD_BPSK;
-#ifdef SOFIA
- unit->together=0;
- unit->new_shaker=0;
- unit->new_txFilter=0;
-
- /* note that this is the default conf of the chip */
- pmd_disable_bands_together();
- pmd_disable_new_tx_filter();
- pmd_disable_new_rx_filter();
- pmd_disable_new_shaker();
-#endif
-
- /* initialize counters */
- unit->failed_read = 0;
- memset(&unit->stats, 0, sizeof(unit->stats));
-
- /* desactivation des interruptions */
- pmd_disable_irq();
-
- /* machine d'état en IDLE */
- unit->PMD->rx_start = 0;
- unit->PMD->tx_start = 0;
-
- plcp_fmode_open(unit);
- plcp_channel_open(unit);
- plcp_callbacks_fn = callbacks;
-#ifndef __KERNEL__
- plcp_init_ui();
- plcp_test_open(unit);
-#else
- printf("plcp_init_ui not implemented in KERNEL mode\n");
- printf("plcp_test_open not implemented in KERNEL mode\n");
-#endif
- return DEVICE_SUCCESS;
-}
-
-void INLINE plcp_write_quality(void *dst, void *src) {
-#ifdef softOSE
- /* do nothing... */
-#else
-#ifndef __KERNEL__
- __asm {
- /* read quality bands 1 {r2-r3}, 2 {r4-r5}, 3 {r6-r7}, 4 {r8-r9} */
- ldmia src!,{r2-r9}
-
- /* write quality band 1 */
- stmia dst!,{r2-r3}
-
- /* write quality band 2 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r4-r5}
-
- /* write quality band 3 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r6-r7}
-
- /* write quality band 4 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r8-r9}
-
- /* read quality bands 5 {r2-r3}, 6 {r4-r5}, 7 {r6-r7} */
- ldmia src!,{r2-r7}
-
- /* write quality band 5 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r2-r3}
-
- /* write quality band 6 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r4-r5}
-
- /* write quality band 7 */
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct pmd_band_quality))
- stmia dst!,{r6-r7}
- }
-#else
- printf("asm code not implemented in KERNEL mode\n");
-#endif
-#endif /* softOSE */
-}
-
-void plcp_set_rx_quality(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel)
-{
- plcp_write_quality(
- (void*)(PMD_PHLIC_DATA_REGBASE+
- PMD_BAND(1)+PMD_BAND_RX_QUALITY),
- (void*)&uchannel->quality[1]);
-}
-
-void plcp_set_tx_quality(struct plc_drv_unit *unit, struct plcp_uchannel *uchannel) {
-
- int band;
-
- plcp_write_quality((void*)(PMD_PHLIC_DATA_REGBASE+PMD_BAND(1)+PMD_BAND_TX_QUALITY),(void*)&uchannel->quality[1]);
-
- if(update_pilots)
- {
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit, band)) {
- /*
- * 2004-09-02 / TF / Switch off pilots for unusable bands
- * (with all modulations set to none)
- */
- if (uchannel->bits_per_band[band]==0) {
- /* dont forget to reactivate them after transmit */
- pmd_switch_off_carrier(band, plcp_pilots[band][0]);
- pmd_switch_off_carrier(band, plcp_pilots[band][1]);
- } else {
- pmd_switch_on_carrier(band, plcp_pilots[band][0]);
- pmd_switch_on_carrier(band, plcp_pilots[band][1]);
- }
- }
- }
- }
-}
-
-/* set power on control bands */
-// CARE ABOUT SYNCHRO BAND!!!!!!
-void plcp_control_power(struct plc_drv_unit *unit, uint8_t not_used)
-{
- int band;
- uint8_t bit=1;
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit, band)) {
- if(bit & not_used)
- pmd_disable_bpsk(band);
- else
- pmd_enable_bpsk(band);
- }
- bit = bit << 1;
- }
-}
-
-/* set power only on really used bands */
-/* ASSERT all none mod bands are unused */
-void plcp_data_power(struct plc_drv_unit *unit, uint8_t unused)
-{
- int band;
- uint8_t bit=1;
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit, band)) {
- if (bit & unused) {
- pmd_disable_all_mod(band);
- } else {
- pmd_enable_all_mod(band);
- }
- }
- bit = bit << 1;
- }
-}
-
-
-
-int plcp_start(struct plc_drv_unit *unit) {
-
- int dsp_rpr;
- int status;
- int band, nb_bands;
-
-#ifdef start
-/* FIXME !!! */
-#undef start
-#endif
- if (pmd_start(unit->id)<0)
- return -1;
-
- /*
- * 2004-02-25 / TF / FR0025
- * update pilot mask whenever plcp is (re)started to take
- * into account moved pilots
- */
-
- /* set control pilots */
- led_off(4);
- pmd_set_aspro_pilots(plcp_pilots);
- pmd_set_dsp_pilots(dsp_pilots);
- pmd_set_notchs(plcp_notchs_bitmap);
-
- /* Check that at least one band has been configured */
- for (band=0,nb_bands=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band))
- nb_bands++;
- }
- if (nb_bands==0) {
- RT_PRINTM(TRACE_PLCP,TRACE_WARNING,
- "at least one band should be configured for unit %d\n",
- unit->id);
- return DEVICE_EUNKNOWN;
- }
- unit->nb_bands = nb_bands;
-
- /* Compute the number of symbols for the PLCP control */
- unit->control_len = sizeof(struct plcp_control);
-
-#ifdef SOFIA
- /* register to default modulation in dsp */
- pmd_set_control_mod(unit->control_modulation);
-#endif
-
- status = plcp_get_control_slots(unit, unit->control_len,
- &unit->control_symbols,
- &unit->plcp.config.nb_control, &dsp_rpr);
- if (status<0) {
- RT_PRINTM(TRACE_PLCP,TRACE_ERROR,
- "invalid control symbol count\n");
- return DEVICE_EUNKNOWN;
- }
-
- unit->plcp.config.n_slots =
- unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control;
-
- //plcp_build_prefixed_channels(unit);
- plcp_fmode_start(unit);
-
- /* update lookup tables for channels */
- plcp_rebuild_channels(unit);
-
-#ifndef __KERNEL__
- plcp_test_start(unit);
-#else
- printf("plcp_test_start not implemented in KERNEL mode\n");
-#endif
- return DEVICE_SUCCESS;
-}
-
-void plcp_enable(struct plc_drv_unit *unit) {
-
- /* enable reception of frames */
- if (unit->emac.slave_no>0) {
- *(uint16_t*)(DSP_CHMR_ADDR) = 0;
- } else {
- *(uint16_t*)(DSP_CHMR_ADDR) = unit->used_bands;
- }
- unit->PMD->rx_start = 1;
-
- /* enable DMA and PHLIC IRQs */
- /* FIXME: should not be done at unit level */
- pmd_enable_irq();
-}
-
-void plcp_disable(struct plc_drv_unit *unit) {
-
- /* disable reception of frames */
- *(uint16_t*)(DSP_CHMR_ADDR) = 0;
- unit->PMD->rx_start = 0;
-
- /* disable DMA and PHLIC IRQs */
- pmd_disable_irq();
-
- /* empty AHB fifo */
- *(uint16_t*)PMD_IRQ_ENABLE = 0x0;
-}
-
-
-/* mesure du bruit sur chaque groupe de porteuse */
-void plcp_get_noise(struct plc_drv_unit * unit, uint16_t tab[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND]){
- int band, group;
- uint16_t noise;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- noise=pmd_get_noise(band,group);
- tab[band][group]=noise;
- }
- }
- }
-}
-
-void plcp_register_agc(struct plc_drv_unit *unit)
-{
- int agc_index;
-
- /* quelquesoit le type de trame, on stoke le gain */
- agc_index=unit->stats.test.agc_index;
- unit->stats.test.tab_agc[agc_index] = pmd_get_agc_gain();
- unit->stats.test.agc_index = ((agc_index + 1) % NB_AGC_MEASURES);
-}
-
-
-
-void plcp_write_control(int dst, int src) {
-#ifdef softOSE
- memcpy((void*)dst, (void*)src, sizeof(struct plcp_control));
-#else
-#ifndef __KERNEL__
- __asm {
- /* load 32-byte PLCP frame control (including CAC) in r5-r12 */
- ldmia src!,{r5-r12}
-
- /* store frame control on each band */
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- add dst,dst,(PMD_BAND_SIZE-sizeof(struct plcp_control))
- stmia dst!,{r5-r12}
- }
-#else
- printf("asm code not implemented in KERNEL mode\n");
-#endif
-#endif /* softOSE */
-}
-
-int plcp_get_first_started_band(struct plc_drv_unit *unit) {
-
- int band;
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band) && (pmd_band_started(band))) {
- return band;
- }
- }
- return -1;
-}
-
-uint8_t plcp_get_started_bands(struct plc_drv_unit *unit) {
-
- uint8_t started_bands;
-
- started_bands = unit->used_bands &
- ((pmd_band_started(1)<<1) |
- (pmd_band_started(2)<<2) |
- (pmd_band_started(3)<<3) |
- (pmd_band_started(4)<<4) |
- (pmd_band_started(5)<<5) |
- (pmd_band_started(6)<<6) |
- (pmd_band_started(7)<<7));
-
- return started_bands;
-}
-
-/* returns number of DATA symbols (without periodic REF symbol)
- * needed to transmit len bytes. */
-int plcp_get_data_slots(
- struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int len)
-{
- int slices = (len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
- return uchannel->lookup.payload_slots[slices];
-}
-
-/* Compute the number of slices that can fit in a number of slots */
-int plcp_fit_nb_slices(
- struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
- int max_slices, int max_slots,
- int *p_data_slots, int *p_ref_slots)
-{
- int slices = max_slices;
- ASSERT(slices>=0);
- while ((slices > 0) &&
- ((uchannel->lookup.payload_slots[slices] +
- uchannel->lookup.periodic_ref_slots[slices]) > max_slots)) {
- slices--;
- }
- if (p_data_slots)
- *p_data_slots = uchannel->lookup.payload_slots[slices];
- if (p_ref_slots)
- *p_ref_slots = uchannel->lookup.periodic_ref_slots[slices];
- return slices;
-}
-
-
-bool __send_in_progress[PLCP_NB_STATE] = {
- false, /* PLCP_STATE_IDLE */
- true, /* PLCP_STATE_TX_REQ */
- true, /* PLCP_STATE_TX_CTRL */
- true, /* PLCP_STATE_TX_BLOCK */
- true, /* PLCP_STATE_TX_DATA */
- false, /* PLCP_STATE_RX_CTRL */
- false, /* PLCP_STATE_RX_BLOCK */
- false, /* PLCP_STATE_RX_DATA */
- false, /* PLCP_STATE_DROP */
- false /* PLCP_STATE_DROP_DATA */
-};
-
-bool plcp_send_in_progress(struct plc_drv_unit *unit) {
- return (__send_in_progress[unit->plcp.state]);
-}
-
-/* porteuses pilotes: la phase est constante sur les pilotes. Elle est
- * retrouvée grace au symbole de référence. Ensuite dans le temps il peut
- * arriver que cette phase dérive à cause de la dérive d'horloge qui
- * engendre une rotation de phase. on applique donc sur les porteuses intermédiaires une rotations linéaire
- * pour remettre dans le droit chemin. */
-
-/* dont register during display */
-#ifndef __KERNEL__
-void plcp_display_reg(struct plc_drv_unit * unit)
-{
- int i;
- plcp_save=0;
- for(i=unit->stats.plcp.head; i != unit->stats.plcp.tail; i=((i+1)%PLCP_MAX_REG))
- {
- printf("[%s] -> %s:%d -> [%s] (%s)\r\n",
- plcp_state_name[unit->stats.plcp.reg[i].state_source],
- plcp_event_name[unit->stats.plcp.reg[i].event],
- unit->stats.plcp.reg[i].date,
- plcp_state_name[unit->stats.plcp.reg[i].state_destin],
- unit->stats.plcp.reg[i].ok?"ok":"error");
- }
- plcp_save=1;
-}
-#endif
-
-int plcp_locked = 0;
-void plcp_lock(struct plc_drv_unit *unit) {
- plcp_locked = 1;
- unit->PMD->rx_start = 0;
- delay(100);
- *(volatile uint16_t*)DSP_CHMR_ADDR = 0;
- delay(100);
-}
-
-void plcp_unlock(struct plc_drv_unit *unit) {
- unit->PMD->rx_start = 1;
- if (unit->emac.slave_no>0) {
- *(uint16_t*)(DSP_CHMR_ADDR) = 0;
- } else {
- *(uint16_t*)(DSP_CHMR_ADDR) = unit->used_bands;
- }
- plcp_locked = 0;
-}
-
-#ifndef softOSE
-#define SAMPLES 2000
-static uint32_t timer_obj;
-static int cur;
-static uint16_t min_corr[PMD_MAX_BANDS][SAMPLES];
-static uint16_t max_corr[PMD_MAX_BANDS][SAMPLES];
-static uint16_t agc_corr[SAMPLES];
-
-/* network allocation vectore expired */
-void timer2_isr(uint32_t user_obj, uint32_t ose_date)
-{
- int band, msr;
- /* log timer */
- LOCK_SAVE(msr);
- if(cur < SAMPLES){
- agc_corr[cur]=pmd_get_agc_gain();
- for(band=0; band<PMD_MAX_BANDS; band++){
- min_corr[band][cur]=pmd_get_min_corr(band);
- max_corr[band][cur]=pmd_get_max_corr(band);
- }
- cur++;
- }
- LOCK_RESTORE(msr);
-}
-
-
-
-int shell_plcpScanNetwork(int argc, char **argv)
-{
- uint32_t req_date;
- int dur, i,b;
- if(argc != 2){
- printf("usage: plcp scan network <dur_us>\n");
- return 0;
- }
- dur=atoi(argv[1]);
- cur=0;
- utmo_request(&timer_obj, &req_date, timer2_isr, (uint32_t)0, dur, 1/* periodic */);
- delay(1000);
- utmo_cancel(timer_obj);
- for(i=0; i<cur; i++){
- for(b=1; b<PMD_MAX_BANDS; b++){
- printf("%d;%d ",min_corr[b][i], max_corr[b][i]);
- }
- printf("%d\n",agc_corr[i]);
- }
-}
-
-#endif
diff --git a/app/sm-emac-drv/src/plc_rx_buffer.c b/app/sm-emac-drv/src/plc_rx_buffer.c
deleted file mode 100644
index d100e21874..0000000000
--- a/app/sm-emac-drv/src/plc_rx_buffer.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#endif
-#include "platform.h"
-#include "plcp_core.h"
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t plcp_rx_d_buf[PLCP_RX_RING_SIZE][PLCP_DMA_BUFFER_SIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t plcp_rx_junk[PLCP_DMA_BUFFER_SIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t plcp_rx_robust_fec[PLCP_DMA_BUFFER_SIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
diff --git a/app/sm-emac-drv/src/plc_shell.c b/app/sm-emac-drv/src/plc_shell.c
deleted file mode 100644
index c9c47e8fa6..0000000000
--- a/app/sm-emac-drv/src/plc_shell.c
+++ /dev/null
@@ -1,2072 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdlib.h>
-#include <string.h>
-#include "stdio.h"
-#include "osedef.h"
-#include "shell.h"
-#endif
-#include "shell_if.h"
-#include "plc_drv_if.h"
-#include "plc_drv.h"
-#include "string.h"
-#include "plc_dbg.h"
-#include "plc_pmd.h"
-#include "plc_mac.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "plc_sms.h"
-#include "ui.h"
-#ifndef softOSE
-#include <getopt.h>
-#endif
-#include "mib.h"
-#include "plc_neighbour.h"
-#include "pkt_log_if.h"
-#include "plc_dbg.h"
-#include "mac_carp.h"
-#include "plcp_core.h"
-#include "list.h"
-#include "lib_if.h"
-
-
-#ifdef FEATURE_SHELL
-
-#ifndef __KERNEL__
-int shell_testu(int argc, char *argv[]);
-#endif
-int shell_neighbour(int argc, char *argv[]);
-int shell_plcGetConf(int argc, char *argv[]);
-int shell_plcpScanNetwork(int argc, char **argv);
-
-#define DOT_WIDTH 40
-
-void dotify(char *dst, char *src) {
-
- int len, dots;
-
- len = strlen(src);
- if (len>=DOT_WIDTH) {
- len = DOT_WIDTH-1;
- dots = 1;
- } else {
- dots = DOT_WIDTH-len;
- }
-
- memcpy(dst, src, len);
- memset(dst+len, '.', dots);
- *(dst+DOT_WIDTH)='\0';
-}
-
-char snapshot_buffer[4096];
-char dot_buffer[DOT_WIDTH+1];
-
-#define DISPLAY(a) { dotify(dot_buffer, #a); printf("%s %d\n",dot_buffer,unit->stats.a); }
-#define DISPLAY2(a,b) { dotify(dot_buffer, #a); printf("%s %d (%d%%)\n",dot_buffer,unit->stats.a,(b)!=0?100*unit->stats.a/(b):0); }
-
-#ifdef softOSE
-#define strtoul strtol
-#endif
-
-const char *plc_if_mode_str(plc_if_mode_t mode)
-{
- switch(mode)
- {
- case ad_hoc:
- return "ad-hoc";
- break;
- case repeater:
- return "repeater";
- break;
- case station:
- return "station";
- break;
- default:
- return "?";
- break;
- }
-}
-
-int shell_readSwitches(int argc, char **argv)
-{
- uint16_t valSwitches;
-
- valSwitches = *(uint16_t*)0x42040006;
-
- printf("Switches values : %d\n",valSwitches);
- return 0;
-}
-
-void mib_drv_stats(struct plc_plc *plcPlc) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- plcPlc->inPackets = 0;
- plcPlc->outPackets = 0;
- plcPlc->inPacketsError = 0;
- plcPlc->outPacketsError = 0;
- plcPlc->inPacketsBridged = 0;
-}
-
-int shell_drv_stats(struct plc_drv_unit *unit)
-{
- DISPLAY(drv.handle_tx_data);
- DISPLAY(drv.handle_tx_test);
- DISPLAY(drv.handle_tx_ber);
- DISPLAY(drv.handle_tx_sms);
- DISPLAY(drv.handle_tx_channel);
- DISPLAY(drv.handle_tx_probe);
- printf("\n");
- DISPLAY(drv.handle_rx_data);
- DISPLAY(drv.handle_rx_test);
- DISPLAY(drv.handle_rx_ber);
- DISPLAY(drv.handle_rx_sms);
- DISPLAY(drv.handle_rx_channel);
- DISPLAY(drv.handle_rx_probe);
- printf("\n");
- DISPLAY(drv.handle_tx);
- DISPLAY(drv.handle_rx);
- DISPLAY(drv.handle_tx_failed);
- DISPLAY(drv.handle_rx_failed);
- return 0;
-}
-
-int mib_macStats(struct plc_mac *plcMac) { ; }
-
-int shell_access_stats(struct plc_drv_unit *unit)
-{
- return 0;
-}
-
-/* CAC UI */
-int shell_cac_create_host(int argc, char **argv) {
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- uint8_t mac_addr[6];
- int a,b,c,d,e,f;
-
- if (argc>1) {
- sscanf(argv[1],"%02x:%02x:%02x:%02x:%02x:%02x",
- &a, &b, &c, &d, &e, &f);
- mac_addr[0] = (uint8_t)a;
- mac_addr[1] = (uint8_t)b;
- mac_addr[2] = (uint8_t)c;
- mac_addr[3] = (uint8_t)d;
- mac_addr[4] = (uint8_t)e;
- mac_addr[5] = (uint8_t)f;
- } else {
- mac_addr[0] = (char)0;
- mac_addr[1] = (char)rand();
- mac_addr[2] = (char)rand();
- mac_addr[3] = (char)rand();
- mac_addr[4] = (char)rand();
- mac_addr[5] = (char)rand();
- }
- printf("creating host %02x:%02x:%02x:%02x:%02x:%02x \n",
- mac_addr[0], mac_addr[1], mac_addr[2],
- mac_addr[3], mac_addr[4], mac_addr[5]);
-
- plcp_create_host(unit,mac_addr);
-
- return 0;
-}
-
-/* PLCP UI */
-
-int shell_phys_stats(struct plc_drv_unit *unit) {
-
- printf("\ninterrupt counters\n");
- DISPLAY(plcp.busy_isr);
- DISPLAY(plcp.rx_start_isr);
- DISPLAY(plcp.rx_more_isr);
- DISPLAY(plcp.rx_data_isr);
- DISPLAY(plcp.rx_end_isr);
- DISPLAY(plcp.tx_start);
- DISPLAY(plcp.tx_more_isr);
- DISPLAY(plcp.tx_data_isr);
- DISPLAY(plcp.tx_end_isr);
- DISPLAY(plcp.tmo_isr1);
- DISPLAY(plcp.tmo_isr2);
- DISPLAY(plcp.eof_isr);
-
- printf("\nchecktest errors\n");
- DISPLAY(plcp.rx_drop);
- DISPLAY(plcp.no_buffer);
- DISPLAY(plcp.rx_invalid_control);
- DISPLAY(plcp.rx_valid_control);
- DISPLAY(plcp.rx_control_bad_crc);
- DISPLAY(plcp.rx_control_bad_channel_id);
- DISPLAY(plcp.rx_control_bad_efr);
- DISPLAY(plcp.rx_control_bad_dlen);
- DISPLAY(plcp.rx_control_bad_clen);
- DISPLAY(plcp.rx_control_bad_slices);
- DISPLAY(plcp.rx_bad_payload);
- DISPLAY(plcp.bad_fcs);
-
- printf("\nserious error events\n");
- DISPLAY(plcp.eof_error);
- DISPLAY(plcp.transmit_error);
- DISPLAY(plcp.busy_error);
- DISPLAY(plcp.rx_start_error);
- DISPLAY(plcp.rx_data_error);
- DISPLAY(plcp.rx_end_error);
- DISPLAY(plcp.tx_start_error);
- DISPLAY(plcp.tx_more_error);
- DISPLAY(plcp.tx_data_error);
- DISPLAY(plcp.tx_end_error);
- DISPLAY(plcp.tmo_drop_error);
-
- printf("\nignored events\n");
- DISPLAY(plcp.eof_ignored);
- DISPLAY(plcp.eof_at_tx_ctrl);
- DISPLAY(plcp.eof_at_tx_block);
- DISPLAY(plcp.eof_at_tx_data);
- DISPLAY(plcp.eof_at_rx_ctrl);
- DISPLAY(plcp.eof_at_state_rx_block);
- DISPLAY(plcp.eof_at_state_rx_data);
- DISPLAY(plcp.eof_fake_tx_end);
-
- return 0;
-}
-
-
-int shell_plcp_stats(struct plc_drv_unit *unit) {
-
- int slice, slices, band, total;
- char buffer[80];
-
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- total = unit->stats.plcp.valid_control[band] +
- unit->stats.plcp.invalid_control[band];
- sprintf(buffer, "plcp.control[%d] (valid/invalid/total)", band);
- dotify(dot_buffer, buffer);
- printf("%s %d/%d/%d\n", dot_buffer,
- unit->stats.plcp.valid_control[band],
- unit->stats.plcp.invalid_control[band], total);
- }
- }
-
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit,band)) {
- total = unit->stats.plcp.valid_block[band] +
- unit->stats.plcp.invalid_block[band];
- sprintf(buffer, "plcp.block[%d] (valid/invalid/total)", band);
- dotify(dot_buffer, buffer);
- printf("%s %d/%d/%d\n", dot_buffer,
- unit->stats.plcp.valid_block[band],
- unit->stats.plcp.invalid_block[band], total);
- }
- }
-
- for (slice=0; (slice<PLCP_MAX_SLICES) && (slices>0); slice++) {
- slices = unit->stats.plcp.valid_slice[slice] +
- unit->stats.plcp.invalid_slice[slice];
- sprintf(buffer, "plcp.slice[%d] (valid/invalid/total)", slice);
- dotify(dot_buffer, buffer);
- printf("%s %d/%d/%d\n", dot_buffer,
- unit->stats.plcp.valid_slice[slice],
- unit->stats.plcp.invalid_slice[slice],
- slices);
- }
- return 0;
-}
-
-int shell_plcstats(int argc, char **argv)
-{
-#ifdef STATS
- struct plc_drv_unit *unit;
-
- unit = plc_drv_get_unit(0);
-
- switch (argc) {
-
- case 2:
- if (!strcmp(argv[1],"clean")) {
- memset(&unit->stats,0,sizeof(unit->stats));
- return 0;
- }
-
- if (!strcmp(argv[1],"drv")) {
- shell_drv_stats(unit);
- return 0;
- }
-
- if (!strcmp(argv[1],"pmd")) {
- plcp_display_reg(unit);
- return 0;
- }
-
- if (!strcmp(argv[1],"phys")){
- shell_phys_stats(unit);
- return 0;
- }
-
- if (!strcmp(argv[1],"plcp")){
- shell_plcp_stats(unit);
- return 0;
- }
-
- default:
- shell_plcp_stats(unit);
- shell_drv_stats(unit);
- break;
- }
- return 0;
-#endif /* STATS */
-}
-
-#ifdef SOFIA
-int shell_plcSetTogether(int argc, char *argv[]) {
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
- if(argc != 2){
- printf("usage: plc set bands together [on/off]\n");
- } else {
- if(strcmp(argv[1],"on")==0){
- pmd_enable_bands_together();
- unit->together=1;
- } else if(strcmp(argv[1],"off")==0){
- pmd_disable_bands_together();
- unit->together=0;
- } else {
- printf("use [on/off]\n");
- }
- printf("new band sync changed\n");
- }
- return 0;
-}
-
-int shell_plcSetNewShaker(int argc, char *argv[]) {
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
- if(argc != 2){
- printf("usage: plc set new shaker [on/off]\n");
- } else {
- if(strcmp(argv[1],"on")==0){
- pmd_enable_new_shaker();
- unit->new_shaker=1;
- } else if(strcmp(argv[1],"off")==0){
- pmd_disable_new_shaker();
- unit->new_shaker=0;
- } else {
- printf("use [on/off]\n");
- }
- printf("new skaker changed\n");
- }
- return 0;
-}
-/* convertion du nom de la modulation en level */
-static int plc_mod_to_id(char * mod)
-{
- if(strcmp(mod,"qam256")==0)
- return PLC_MOD_QAM256;
- else if(strcmp(mod,"qam64")==0)
- return PLC_MOD_QAM64;
- else if(strcmp(mod,"qam16")==0)
- return PLC_MOD_QAM16;
- else if(strcmp(mod,"qpsk")==0)
- return PLC_MOD_QPSK;
- else if(strcmp(mod,"bpsk")==0)
- return PLC_MOD_BPSK;
- else if(strcmp(mod,"none")==0)
- return PLC_MOD_NONE;
- else
- return -1;
-}
-
-
-int shell_plcSetCtrlMod(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- int id;
- if(argc != 2){
- printf("must select a modulation\n");
- } else {
- id=plc_mod_to_id(argv[1]);
- if(id == -1){
- printf("bad modulation for control\n");
- } else {
- drv_lock(unit);
- unit->control_modulation=id;
- printf("ctrl modulation set to %s\n", argv[1]);
- drv_unlock(unit); // restart plcp layer
- }
- }
- return 0;
-}
-
-
-int shell_plcSetTxDelay(int argc, char *argv[]) {
- int delay = strtol(argv[1],NULL,0);
- pmd_set_tx_delay(delay);
- return 0;
-}
-
-int shell_plcSetDetectLevel(int argc, char *argv[]) {
- int lev = strtol(argv[1],NULL,0);
- pmd_set_start_detect_level(lev);
- return 0;
-}
-
-int shell_plcSetNewTxFilter(int argc, char *argv[]) {
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
- if(argc != 2){
- printf("usage: plc set new tx_filter [on/off]\n");
- } else {
- if(strcmp(argv[1],"on")==0){
- pmd_enable_new_tx_filter();
- unit->new_txFilter=1;
- } else if(strcmp(argv[1],"off")==0){
- pmd_disable_new_tx_filter();
- unit->new_txFilter=0;
- } else {
- printf("use [on/off]\n");
- }
- printf("new filter changed\n");
- }
- return 0;
-}
-
-int shell_plcSetNewRxFilter(int argc, char *argv[]) {
- struct plc_drv_unit *unit;
- unit = plc_drv_get_unit(0);
- if(argc != 2){
- printf("usage: plc set new rx_filter [on/off]\n");
- } else {
- if(strcmp(argv[1],"on")==0){
- pmd_enable_new_rx_filter();
- unit->new_rxFilter=1;
- } else if(strcmp(argv[1],"off")==0){
- pmd_disable_new_rx_filter();
- unit->new_rxFilter=0;
- } else {
- printf("use [on/off]\n");
- }
- printf("new filters change done\n");
- }
- return 0;
-}
-
-int shell_plcSetRxFilterGain(int argc, char *argv[]) {
- uint16_t gain;
- if(argc != 2){
- printf("usage: plc set rx_filter gain <gain>\n");
- } else {
- gain=(uint16_t)atoi(argv[1]);
- if(gain>=1 && gain <=3){
- pmd_set_rx_filter_gain(gain);
- printf("rx filter set to %d\n",gain);
- } else {
- printf("use [on/off]\n");
- }
- }
- return 0;
-}
-
-int shell_plcSetTxFilterGain(int argc, char *argv[]) {
- uint16_t gain;
- if(argc != 2){
- printf("usage: plc set tx_filter gain <gain>\n");
- } else {
- gain=(uint16_t)atoi(argv[1]);
- if(gain>=1 && gain <=3){
- pmd_set_tx_filter_gain(gain);
- printf("tx filter set to %d\n",gain);
- } else {
- printf("use [on/off]\n");
- }
- }
- return 0;
-}
-#endif
-
-int shell_setmod(int argc, char *argv[]) {
-
- int mod;
- int band;
- int cid;
- int group;
- uint32_t msr;
- struct plc_drv_unit *unit;
- struct plcp_uchannel *uchannel;
-
- if (argc!=4) {
- printf("usage: %s <cid> <band> <none|bspk|qpsk|qam16|qam64|qam256>", argv[0]);
- return -1;
- }
-
- cid = strtoul(argv[1], 0, NULL);
- band = strtoul(argv[2], 0, NULL);
-
- if (strcmp(argv[2], "none")==0) {
- mod = PLC_MOD_NONE;
- } else if (strcmp(argv[2], "bpsk")==0) {
- mod = PLC_MOD_BPSK;
- } else if (strcmp(argv[2], "qpsk")==0) {
- mod = PLC_MOD_QPSK;
- } else if (strcmp(argv[2], "qam16")==0) {
- mod = PLC_MOD_QAM16;
- } else if (strcmp(argv[2], "qam64")==0) {
- mod = PLC_MOD_QAM64;
- } else if (strcmp(argv[2], "qam256")==0) {
- mod = PLC_MOD_QAM256;
- } else {
- printf("unknown modulation %s\n",argv[2]);
- return -1;
- }
-
- drv_lock(unit);
-uchannel = plcp_get_uchannel_by_id(cid);
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- plcp_set_group_modulation(&uchannel->quality[band],
- group, mod);
- }
- drv_unlock(unit);
-
- return RET_SUCCESS;
- LOCK_SAVE(msr);
- //plcp_set_payload_modulation(unit, mod);
- plcp_start(unit);
- LOCK_RESTORE(msr);
- return 0;
-}
-
- int shell_plcSnapshot(int argc, char *argv[]) {
- uint32_t msr;
- LOCK_SAVE(msr);
- plcp_snapshot(snapshot_buffer);
-#ifndef FEATURE_ENERVATION
- printf("%s\n",snapshot_buffer);
- mac_access_snapshot(snapshot_buffer);
- printf("%s\n",snapshot_buffer);
- mac_snapshot(snapshot_buffer);
- printf("%s\n",snapshot_buffer);
-#endif /* FEATURE_ENERVATION */
- LOCK_RESTORE(msr);
- return 0;
- }
-
- extern int coef_corr;
- int shell_plcSetCoefCorr(int argc, char *argv[]) {
- coef_corr=atoi(argv[1]);
- return 0;
- }
-
- int shell_plcSetTmoDrop(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- unit->plcp.config.n_drop_slots=atoi(argv[1]);
- return 0;
- }
-
- int shell_plcSetEarlyTx(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- unit->plcp.config.early_tx_start=atoi(argv[1]);
- return 0;
- }
-
- int shell_plcRestart(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetBands(int argc, char *argv[]) {
- int mask,band,arg;
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- printf("configuring band");
- arg = 1;
- mask = 0;
- while (arg < argc) {
- band = strtol(argv[arg],NULL,0);
- mask |= (1<<band);
- printf(" %d",band);
- arg++;
- }
- printf("\n");
- plcp_set_bands(unit, mask);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetTxGain(int argc, char *argv[]) {
- int gain = strtol(argv[1],NULL,0);
- pmd_set_tx_gain(gain);
- return 0;
- }
-
-
- int shell_plcSetPilots(int argc, char *argv[]) {
-
- uint16_t pilot1, pilot2, dsp_mode, i;
- int band;
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
-
- if (argc!=4 && argc!=5) {
- printf("usage: plc set pilots <band> <pilot1> <pilot2> [dsp_mode:0=diff,1=pil1,2pil2]\r\n");
- return 0;
- }
- band = strtol(argv[1],NULL,0);
- pilot1 = strtol(argv[2],NULL,0);
- pilot2 = strtol(argv[3],NULL,0);
- if(argc == 5)
- dsp_mode = atoi(argv[4]);
- else
- dsp_mode=0;
- if ((band>=PMD_MAX_BANDS) || (pilot1>=PMD_CARRIERS_PER_BAND) || (pilot2>=PMD_CARRIERS_PER_BAND) || dsp_mode > 2) {
- printf("invalid argument\r\n");
- return 0;
- }
-
- drv_lock(unit);
- for(i=1;i<PMD_MAX_BANDS;i++){
- if(band < 0 || i == band){
- plcp_pilots[i][1] = pilot2;
- plcp_pilots[i][0] = pilot1;
- if(dsp_mode == 0){
- dsp_pilots[i][1] = pilot1;
- dsp_pilots[i][0] = pilot2;
- } else if(dsp_mode == 1) {
- dsp_pilots[i][1] = pilot1;
- dsp_pilots[i][0] = pilot1;
- } else {
- dsp_pilots[i][1] = pilot2;
- dsp_pilots[i][0] = pilot2;
- }
- printf("pilots for band %d now at position %d and %d\r\n", band, pilot1, pilot2);
- }
- }
- drv_unlock(unit);
- return 0;
- }
-
-int shell_plc_set_fcs_on(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.fcs = true;
- printf("FCS enabled for PLCP payload\n");
- return 0;
-}
-
-int shell_plc_set_fcs_off(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.fcs = false;
- printf("FCS disabled for PLCP payload\n");
- return 0;
-}
-
- int shell_plcSetCalibrate(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- unit->plcp.config.nb_calibrate = strtoul(argv[1],NULL,0);
- unit->PMD->tx_nb_calibrate =
- unit->plcp.config.nb_calibrate * unit->nb_bands;
- printf("nb_calibrate set to %d\n", unit->plcp.config.nb_calibrate);
- return 0;
- }
-
- int shell_plcSetRefhead(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.nb_ref_head = strtoul(argv[1],NULL,0);
- printf("nb_ref_head set to %d\n", unit->plcp.config.nb_ref_head);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plc_set_ref_interval(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.ref_interval = strtoul(argv[1],NULL,0);
- printf("ref_interval set to %d\n", unit->plcp.config.ref_interval);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plc_set_nb_periodic_ref(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.nb_periodic_ref = strtoul(argv[1],NULL,0);
- printf("nb_periodic_ref set to %d\n", unit->plcp.config.nb_periodic_ref);
- drv_unlock(unit);
- return RET_SUCCESS;
- }
-
- int shell_plcSetRxEof(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.rx_nb_eof = strtoul(argv[1],NULL,0);
- printf("rx_nb_eof set to %d slots\n", unit->plcp.config.rx_nb_eof);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetTxEof(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.tx_nb_eof = strtoul(argv[1],NULL,0);
- printf("tx_nb_eof set to %d symbols\n", unit->plcp.config.tx_nb_eof);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetWaitControl(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.nb_wait_control = strtoul(argv[1],NULL,0);
- printf("nb_wait_control set to %d\n", unit->plcp.config.nb_wait_control);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetWaitBlock(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- drv_lock(unit);
- unit->plcp.config.nb_wait_block = strtoul(argv[1],NULL,0);
- printf("nb_wait_block set to %d\n", unit->plcp.config.nb_wait_block);
- drv_unlock(unit);
- return 0;
- }
-
- int shell_plcSetWait(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- int nb_wait = strtoul(argv[1], NULL, 0);
- drv_lock(unit);
- unit->plcp.config.nb_wait_control = nb_wait;
- printf("nb_wait_control set to %d\n", unit->plcp.config.nb_wait_control);
- unit->plcp.config.nb_wait_block = nb_wait;
- printf("nb_wait_block set to %d\n", unit->plcp.config.nb_wait_block);
- drv_unlock(unit);
- return RET_SUCCESS;
- }
-
-int shell_plcSetNotch(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- int band, group, value;
- drv_lock(unit);
- if(argc==2){
- if(strcmp(argv[1],"simple")==0){
- plcp_notchs_bitmap[1][1]=0;
- plcp_notchs_bitmap[2][1]=0;
- plcp_notchs_bitmap[3][1]=0;
- plcp_notchs_bitmap[4][1]=0;
- plcp_notchs_bitmap[5][1]=0;
- plcp_notchs_bitmap[6][1]=0;
- plcp_notchs_bitmap[7][1]=0;
- } else if(strcmp(argv[1],"double")==0) {
- plcp_notchs_bitmap[1][1]=0xff;
- plcp_notchs_bitmap[2][1]=0xff;
- plcp_notchs_bitmap[3][1]=0xff;
- plcp_notchs_bitmap[4][1]=0xff;
- plcp_notchs_bitmap[5][1]=0xff;
- plcp_notchs_bitmap[6][1]=0xff;
- plcp_notchs_bitmap[7][1]=0xff;
- }
- } else {
- band = strtol(argv[1],NULL,0);
- if ((band<0) ||(band>PMD_MAX_BANDS)){
- shell_plcGetConf(0,NULL);
- return -1;
- }
- group = strtol(argv[2],NULL,0);
- if(group == -1){
- value = strtol(argv[3],NULL,0);
- memset(plcp_notchs_bitmap[band],value,sizeof(plcp_notchs_bitmap[band]));
- }
- else if((group<0) ||(group>PMD_GROUPS_PER_BAND)){
- shell_plcGetConf(0,NULL);
- return -1;
- }
- else {
- value = strtol(argv[3],NULL,0);
- plcp_notchs_bitmap[band][group]=value;
- }
- }
- pmd_set_notchs(plcp_notchs_bitmap);
- drv_unlock(unit);
- return 0;
-}
-
- int shell_plcGetConf(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- int band;
-
- mac_dump_conf(unit);
- plcp_dump_conf(unit);
- return RET_SUCCESS;
- }
-
-int shell_dchannel(int argc, char *argv[]) {
-
- struct plc_drv_unit *unit;
- struct plcp_uchannel *uchannel;
- int id;
-
- if (argc!=3) {
- printf("usage: dchannel <unit> <channelid>\n");
- return -1;
- }
-
- id = atoi(argv[1]);
- unit = plc_drv_get_unit(id);
- if ((!unit) || (!unit->opened)) {
- printf("invalid unit %d\n", id);
- return -1;
- }
- id = atoi(argv[2]);
- uchannel = plcp_get_uchannel_by_id(id);
- if (!uchannel) {
- printf("invalid uchannel %d\n", id);
- return -1;
- }
-
- if (argc == 3)
- plcp_dump_uchannel(unit, uchannel);
- else
- plcp_Xdump_uchannel(unit, uchannel,atoi(argv[3]));
- return 0;
-}
-
-void du_printf(char *s, void *v) {
- uint16_t *addr = (uint16_t*)v;
- printf("%08x %s %04x\n", addr, s, *addr);
-}
-
-void dq(struct plc_drv_unit *unit) {
-
- int band;
- struct pmd_band_quality *PMD_QUALITY;
-
- for (band=0; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit, band)) {
- PMD_QUALITY = (struct pmd_band_quality*)
- (PMD_PHLIC_DATA_REGBASE
- + PMD_BAND(band)+PMD_BAND_RX_QUALITY);
-
- printf("%08x RX band %d, %08x %08x [15..0]\n",
- &PMD_QUALITY->q[0], band, PMD_QUALITY->q[1], PMD_QUALITY->q[0]);
-
- PMD_QUALITY = (struct pmd_band_quality*)
- (PMD_PHLIC_DATA_REGBASE
- + PMD_BAND(band)+PMD_BAND_TX_QUALITY);
-
- printf("%08x TX band %d, %08x %08x [15..0]\n",
- &PMD_QUALITY->q[0], band, PMD_QUALITY->q[1], PMD_QUALITY->q[0]);
- }
- }
-}
-
-int shell_dq(int argc, char *argv[]) {
-
- int id;
- struct plc_drv_unit *unit;
-
- if (argc!=2) {
- printf("usage: dq <unit>\n");
- return -1;
- }
-
- id = atoi(argv[1]);
- unit = plc_drv_get_unit(id);
- if ((!unit) || (!unit->opened)) {
- printf("invalid unit %d\n", id);
- return -1;
- }
- dq(unit);
- return 0;
-}
-struct mac_frame display_frame;
-
-static int INLINE first_band(uint32_t mask)
-{
- int band=0;
- while((mask & 1)==0)
- {
- mask = mask >> 1;
- band++;
- }
- return band;
-}
-
-#ifndef __KERNEL__
-int __inline min(int a, int b) {
- return (a<b?a:b);
-}
-#endif
-
-void printf_int(char *name, int value, char *comment) {
- printf("%s = %d %s\n",name, value, comment);
-}
-
-int sscanf_int(char *s) {
- return strtoul(s,NULL,0);
-}
-
-int shell_force(int argc, char *argv[]) {
-
- if ((argc!=1) && (argc!=3)) {
- printf("usage: force <name> <value>\n");
- goto display;
- }
-
- if (argc==3) {
-
-#undef PLC_PARAM
-#define PLC_PARAM(type,name,value,comment) \
- if (strcmp(argv[1],#name)==0) { \
- name = sscanf_##type(argv[2]); \
- }
-#include "plc_param.h"
-#undef PLC_PARAM
- }
-
-display:
-#undef PLC_PARAM
-#define PLC_PARAM(type,name,value,comment) printf_##type(#name, name, comment);
-#include "plc_param.h"
-#undef PLC_PARAM
- return 0;
-}
-
-#ifndef FEATURE_ENERVATION
-int shell_rpcWrite(int argc, char *argv[]) {
- char rpcString[255] = "";
- int i;
- struct plc_drv_unit *unit;
-
- sprintf(rpcString,"SMS received :\n\t%s SAYS: ",SYSNAME);
- for (i=1;i<argc;i++) {
- strcat(rpcString,argv[i]);
- strcat(rpcString," ");
- }
- strcat(rpcString,"\0");
-
- unit = plc_drv_get_unit(0);
-
- rpc_write(unit,rpcString);
- return 0;
-}
-
-int shell_test(int argc, char *argv[]) {
-
- struct plc_drv_unit *unit;
-
- unit = plc_drv_get_unit(0);
-
- if(argc==1){
- test_conf(unit);
- }
- else if(strcmp(argv[1],"agc")==0) {
- test_agc(unit);
- }
- else if(strcmp(argv[1],"num")==0) {
- test_set_num(unit,atoi(argv[2]));
- }
- else if(strcmp(argv[1],"log")==0) {
- test_log(unit);
- }
- else if(strcmp(argv[1],"ack")==0) {
- test_set_flag(unit, F_ACK);
- }
- else if(strcmp(argv[1],"no_ack")==0) {
- test_unset_flag(unit, F_ACK);
- }
- else if(strcmp(argv[1],"host")==0) {
- test_set_host(unit,atoi(argv[2]));
- }
- else if (strcmp(argv[1],"ber")==0) {
- test_set_ber(unit, true);
- }
- else if (strcmp(argv[1],"no_ber")==0) {
- test_set_ber(unit, false);
- }
- else if (strcmp(argv[1],"ber_delay")==0) {
- test_set_ber_delay(unit, strtoul(argv[2],NULL,0));
- }
- else if (strcmp(argv[1],"delay")==0) {
- test_set_delay(unit, strtoul(argv[2],NULL,0));
- }
- else if (strcmp(argv[1],"ber_pattern")==0) {
- test_set_ber_pattern(unit,
- strtoul(argv[2],NULL,0), strtoul(argv[3],NULL,0));
- }
- else if (strcmp(argv[1],"pattern")==0) {
- test_set_pattern(unit,
- strtoul(argv[2],NULL,0), strtoul(argv[3],NULL,0));
- }
- else if(strcmp(argv[1],"size")==0) {
- test_set_dsize(unit,atoi(argv[2]));
- test_set_csize(unit,0);
- }
- else if(strcmp(argv[1],"csize")==0) {
- test_set_csize(unit,atoi(argv[2]));
- }
- else if(strcmp(argv[1],"dsize")==0) {
- test_set_dsize(unit,atoi(argv[2]));
- }
- else if (strcmp(argv[1],"tx")==0) {
- test_start_tx(unit);
- }
- else if(strcmp(argv[1],"rx")==0) {
- test_start_rx(unit);
- }
- else if(strcmp(argv[1],"stop")==0) {
- test_stop_tx(unit);
- }
- else if(strcmp(argv[1],"stats")==0) {
- test_stats(unit);
- }
- else if(strcmp(argv[1],"autoscan")==0) {
- test_autotest(unit);
- }
- else if(strcmp(argv[1],"check")==0) {
- printf("payload check activated.\n");
- test_set_payload_check(unit, true);
- }
- else if(strcmp(argv[1],"no_check")==0) {
- printf("payload check de-activated.\n");
- test_set_payload_check(unit, false);
- }
- else if(strcmp(argv[1],"gain")==0) {
- if(argc!=5){
- test_conf(unit);
- return 0;
- }
- test_set_gain(unit,strtol(argv[2],NULL,0),strtol(argv[3],NULL,0),strtol(argv[4],NULL,0));
- }
-
- return 0;
-}
-#endif /* FEATURE_ENERVATION */
-
-
-int shell_crash(int argc, char **argv) {
- int i;
-
- i = 3/0;
-
-}
-int shell_double(int argc, char **argv) {
-
- double negative = (double)-0.5;
- double zero = (double)0;
- double positive = (double)0.5;
-
- if (negative > 0) {
- printf("oops: negative > 0\n");
- }
- if (zero > 0) {
- printf("oops: zero > 0\n");
- }
- if (positive > 0) {
- printf("ok : positive > 0\n");
- } else {
- printf("oops : positive is not > 0 !\n");
- }
- return RET_SUCCESS;
-}
-
-
-/*
- * Virtex 1 register dump functions
- */
-
-#define DV(a) \
-printf("%08x %s = %04x\r\n",&PHLIC_UNIT->a, #a, PHLIC_UNIT->a);
-
-void dump_phlic() {
- struct pmd_unit *PHLIC_UNIT = pmd_get_unit(0);
- DV(nb_bands);
- DV(last_band);
- DV(to_drop);
- DV(tx_more_ctl);
- DV(rx_more_ctl);
- DV(timer_irq_req1);
- DV(timer_irq_val1);
- DV(val_timer);
- DV(vote_wanted);
- DV(only_start);
- DV(tx_broadcast);
- DV(rx_broadcast);
- DV(eof_irq_mask);
- DV(timer_irq_req2);
- DV(timer_irq_val2);
- DV(nb_periodic_ref);
- DV(tx_start);
- DV(tx_high_slice_ad);
- DV(tx_low_slice_ad);
- DV(tx_slices_number);
- DV(tx_nb_calibrate);
- DV(tx_nb_refs);
- DV(tx_control_nb_symbols);
- DV(tx_nb_wait_ose);
- DV(tx_payload_nb_symbols);
- DV(tx_nb_eof);
- DV(tx_control_nb_words);
- DV(tx_min);
- DV(tx_max);
- DV(tx_ref_interval);
- DV(rx_start);
- DV(rx_high_slice_ad);
- DV(rx_low_slice_ad);
- DV(rx_slices_number);
- DV(rx_nb_calibrate);
- DV(rx_nb_refs);
- DV(rx_control_nb_symbols);
- DV(rx_nb_wait_ose);
- DV(rx_payload_nb_symbols);
- DV(rx_nb_eof);
- DV(rx_control_nb_words);
- DV(rx_spy_refs);
- DV(rx_spy_ctrls);
- DV(rx_nb_starts);
- DV(rx_ref_interval);
- DV(isr);
-}
-
-void dump_band(int i) {
-
- char *addr = (char*)(PMD_V1_REGBASE + i*0x100000);
- printf("band %d\r\n", i);
-
- printf(" pilots ");
- dump16(addr, 2*2, 2);
-
- printf(" notchs ");
- dump8(addr+0x04, 8*2, 16);
-
- printf(" tt(bpsk) ");
- dump16(addr+0x14, 1*2, 1);
-
- printf(" tt(qpsk) ");
- dump16(addr+0x16, 1*2, 1);
-
- printf(" tt(qam16) ");
- dump16(addr+0x18, 2*2, 2);
-
- printf(" tt(qam64) ");
- dump16(addr+0x1c, 3*2, 3);
-
- printf(" tt(qam256) ");
- dump16(addr+0x22, 4*2, 4);
-
- printf(" rt(bpsk) ");
- dump16(addr+0x2a, 1*2, 1);
-
- printf(" rt(qpsk) ");
- dump16(addr+0x2c, 1*2, 1);
-
- printf(" rt(qam16) ");
- dump16(addr+0x2e, 2*2, 2);
-
- printf(" rt(qam64) ");
- dump16(addr+0x32, 3*2, 3);
-
- printf(" rt(qam256) ");
- dump16(addr+0x38, 4*2, 4);
-
- printf(" efr ");
- dump16(addr+0x40, 1*2, 1);
-}
-
-void dump_bands() {
- int i;
- for (i=1;i<PMD_MAX_BANDS;i++) {
- dump_band(i);
- }
-}
-
-void dump_notchs() {
- printf("notchs\n");
- printf("band 1 "); dump8((char*)PH1_NO0R_ADDR, 16, 16);
- printf("band 2 "); dump8((char*)PH2_NO0R_ADDR, 16, 16);
- printf("band 3 "); dump8((char*)PH3_NO0R_ADDR, 16, 16);
- printf("band 4 "); dump8((char*)PH4_NO0R_ADDR, 16, 16);
- printf("band 5 "); dump8((char*)PH5_NO0R_ADDR, 16, 16);
- printf("band 6 "); dump8((char*)PH6_NO0R_ADDR, 16, 16);
- printf("band 7 "); dump8((char*)PH7_NO0R_ADDR, 16, 16);
-}
-
-void dump_efr() {
- printf("efr\n");
- du_printf("PH1_EFR_ADDR", (uint16_t*)PH1_EFR_ADDR);
- du_printf("PH2_EFR_ADDR", (uint16_t*)PH2_EFR_ADDR);
- du_printf("PH3_EFR_ADDR", (uint16_t*)PH3_EFR_ADDR);
- du_printf("PH4_EFR_ADDR", (uint16_t*)PH4_EFR_ADDR);
- du_printf("PH5_EFR_ADDR", (uint16_t*)PH5_EFR_ADDR);
- du_printf("PH6_EFR_ADDR", (uint16_t*)PH6_EFR_ADDR);
- du_printf("PH7_EFR_ADDR", (uint16_t*)PH7_EFR_ADDR);
-}
-
-/*
- * Virtex 2 register dump functions
- */
-
-void dump_dsp_cor() {
- int i;
- char *addr;
- printf("band correlation\r\n");
- for (i=1;i<PMD_MAX_BANDS;i++) {
- addr = (char*)(PMD_V2_REGBASE + 0x0c00 + i*0x10);
- printf("band %d %08x %04x\r\n",
- i, addr, *(uint16_t*)addr);
- }
-}
-
-void dump_band_pilots(int band) {
-
- uint16_t *pi1 = (uint16_t*)(DSP_PI1CHAN1R_ADDR + (band-1)*8);
- uint16_t *pi2 = (uint16_t*)(DSP_PI2CHAN1R_ADDR + (band-1)*8);
- printf("band %d (%d-%d MHz): %08x %d (%.3f MHz) %08x %d (%.3f MHz)\n",
- band,
- 2+(band-1)*4,
- 2+(band*4),
- pi1, *pi1, pmd_get_carrier_frequency(band, *pi1)/1000000,
- pi2, *pi2, pmd_get_carrier_frequency(band, *pi2)/1000000);
-}
-
-void dump_pilots() {
- int band;
-
- printf("pilots\r\n");
- for (band=1; band<PMD_MAX_BANDS; band++) {
- dump_band_pilots(band);
- }
-}
-
-void dump_dsp_dbg() {
-
- printf("dsp debug registers\r\n");
- du_printf("DSP_FLBR", (uint16_t*)DSP_FLBR_ADDR);
- du_printf("DSP_CLBR", (uint16_t*)DSP_CLBR_ADDR);
- du_printf("DSP_ALBR", (uint16_t*)DSP_ALBR_ADDR);
- du_printf("DSP_RBYR", (uint16_t*)DSP_RBYR_ADDR);
- du_printf("DSP_IBYR", (uint16_t*)DSP_IBYR_ADDR);
-}
-
-void dump_dsp_delta() {
- printf("dsp delta registers\r\n");
- du_printf("DSP_DELTA1", (uint16_t*)DSP_DELTA1_ADDR);
- du_printf("DSP_DELTA2", (uint16_t*)DSP_DELTA2_ADDR);
- du_printf("DSP_DELTA3", (uint16_t*)DSP_DELTA3_ADDR);
- du_printf("DSP_DELTA4", (uint16_t*)DSP_DELTA4_ADDR);
- du_printf("DSP_DELTA5", (uint16_t*)DSP_DELTA5_ADDR);
- du_printf("DSP_DELTA6", (uint16_t*)DSP_DELTA6_ADDR);
- du_printf("DSP_DELTA7", (uint16_t*)DSP_DELTA7_ADDR);
-}
-
-
-void dump_dsp_setup(void) {
- printf("dsp debug registers\r\n");
- du_printf("DSP_RPR", (uint16_t*)DSP_RPR_ADDR);
- du_printf("DSP_FTR", (uint16_t*)DSP_FTR_ADDR);
- du_printf("DSP_MOR", (uint16_t*)DSP_MOR_ADDR);
- du_printf("DSP_CHMR", (uint16_t*)DSP_CHMR_ADDR);
- du_printf("DSP_OGAIN_ADDR", (uint16_t*)DSP_OGAIN_ADDR);
-}
-
-void dump_agc(void) {
- printf("agc\r\n");
- dump16((char*)PMD_V2_REGBASE+0x1080, 14*2, 1);
-}
-
-void dump_timings(void) {
- printf("timings\r\n");
- dump16((char*)PMD_V2_REGBASE+0x1094, 2*2, 1);
-
-}
-
-void dump_paf(void) {
- printf("paf\r\n");
- dump16((char*)PMD_V2_REGBASE+0x1098, 2*2, 1);
- dump16((char*)PMD_V2_REGBASE+0x1100, 3*2, 1);
- dump16((char*)PMD_V2_REGBASE+0x1110, 5*2, 1);
- dump16((char*)PMD_V2_REGBASE+0x1120, 4*2, 1);
-
-}
-
-int shell_debug_plcp(int argc, char **argv) {
- plcp_debug_log();
- return 0;
-}
-
-int shell_debug_ahb_error(int argc, char **argv) {
- printf("disabling LED access to virtex 2\n");
- printf("s2 0x46020000 0\n");
-#ifndef softOSE
- *(uint16_t*)0x46020000 = 0;
-#endif
- printf("switching off LEDs\n");
- printf("s2 0x44020000 0xaaaa\n");
-#ifndef softOSE
- *(uint16_t*)0x44020000 = 0xaaaa;
- printf("AHB error occured if upper right LED is on\n");
-#else
- printf("AHB error can not occur in SFK !\n");
-#endif
- return 0;
-}
-
-int shell_debug_ahb_renew(int argc, char **argv) {
- printf("disabling LED access to virtex 1\n");
- printf("s2 0x46020000 0xaaaa\n");
-#ifndef softOSE
- *(uint16_t*)0x46020000 = 0xaaaa;
-#endif
- printf("switching off LEDs\n");
- printf("s2 0x44020000 0\n");
-#ifndef softOSE
- *(uint16_t*)0x44020000 = 0;
-#else
- printf("AHB error can not occur in SFK !\n");
-#endif
- return 0;
-}
-
-
-int shell_dv(int argc, char *argv[]) {
- dump_phlic();
- return 0;
-}
-
-int shell_bands(int argc, char *argv[]) {
- dump_bands();
- return RET_SUCCESS;
-}
-
-
-int shell_de(int argc, char *argv[]) {
-
-#if 0
- printf("VIRTEX1\r\n");
- dump_phlic();
- dump_adapt();
- dump_bands();
-
- printf("VIRTEX2\r\n");
-#endif
- dump_notchs();
- dump_efr();
- dump_pilots();
- dump_dsp_cor();
- dump_dsp_setup();
-#if 0
- dump_dsp_dbg();
- dump_dsp_delta();
- dump_agc();
- dump_timings();
- dump_paf();
-#endif
-
- return 0;
-}
-
-#define REGDUMP_NB_REGS 2048
-#define REGDUMP_SIZE (REGDUMP_NB_REGS*4*2)
-
-struct reg_descriptor {
- char *description;
- uint16_t *addr;
- uint16_t n; /* number of 16-bits registers */
-};
-
-#define __REG(reg) {#reg,(uint16_t*)reg,1}
-#define __PHLIC_REG(reg) \
-{#reg, (uint16_t*) &(((struct pmd_unit*) \
- (PMD_PHLIC_DATA_REGBASE+PMD_UNIT_BASE))->reg), 1}
-
-struct reg_descriptor __reg_descriptor[] = {
- __PHLIC_REG(nb_bands),
- __PHLIC_REG(last_band),
- __PHLIC_REG(to_drop),
- __PHLIC_REG(tx_more_ctl),
- __PHLIC_REG(rx_more_ctl),
- __PHLIC_REG(timer_irq_req1),
- __PHLIC_REG(timer_irq_val1),
- __PHLIC_REG(val_timer),
- __PHLIC_REG(vote_wanted),
- __PHLIC_REG(only_start),
- __PHLIC_REG(tx_broadcast),
- __PHLIC_REG(rx_broadcast),
- __PHLIC_REG(eof_irq_mask),
- __PHLIC_REG(timer_irq_req2),
- __PHLIC_REG(timer_irq_val2),
- __PHLIC_REG(nb_periodic_ref),
- __PHLIC_REG(tx_start),
- __PHLIC_REG(tx_high_slice_ad),
- __PHLIC_REG(tx_low_slice_ad),
- __PHLIC_REG(tx_slices_number),
- __PHLIC_REG(tx_nb_calibrate),
- __PHLIC_REG(tx_nb_refs),
- __PHLIC_REG(tx_control_nb_symbols),
- __PHLIC_REG(tx_nb_wait_ose),
- __PHLIC_REG(tx_payload_nb_symbols),
- __PHLIC_REG(tx_nb_eof),
- __PHLIC_REG(tx_control_nb_words),
- __PHLIC_REG(tx_min),
- __PHLIC_REG(tx_max),
- __PHLIC_REG(tx_ref_interval),
- __PHLIC_REG(rx_start),
- __PHLIC_REG(rx_high_slice_ad),
- __PHLIC_REG(rx_low_slice_ad),
- __PHLIC_REG(rx_slices_number),
- __PHLIC_REG(rx_nb_calibrate),
- __PHLIC_REG(rx_nb_refs),
- __PHLIC_REG(rx_control_nb_symbols),
- __PHLIC_REG(rx_nb_wait_ose),
- __PHLIC_REG(rx_payload_nb_symbols),
- __PHLIC_REG(rx_nb_eof),
- __PHLIC_REG(rx_control_nb_words),
- __PHLIC_REG(rx_spy_refs),
- __PHLIC_REG(rx_spy_ctrls),
- __PHLIC_REG(rx_nb_starts),
- __PHLIC_REG(rx_ref_interval),
- __PHLIC_REG(isr),
- {"adapt / band 0", (uint16_t*)(PMD_ADAPT_REGBASE), 128},
- {"adapt / band 1", (uint16_t*)(PMD_ADAPT_REGBASE+0x100), 128},
- {"adapt / band 2", (uint16_t*)(PMD_ADAPT_REGBASE+0x200), 128},
- {"adapt / band 3", (uint16_t*)(PMD_ADAPT_REGBASE+0x300), 128},
- {"adapt / band 4", (uint16_t*)(PMD_ADAPT_REGBASE+0x400), 128},
- {"adapt / band 5", (uint16_t*)(PMD_ADAPT_REGBASE+0x500), 128},
- {"adapt / band 6", (uint16_t*)(PMD_ADAPT_REGBASE+0x600), 128},
- {"adapt / band 7", (uint16_t*)(PMD_ADAPT_REGBASE+0x700), 128},
- __REG(PH1_EFR_ADDR),
- __REG(PH1_NO0R_ADDR),
- __REG(PH1_NO1R_ADDR),
- __REG(PH1_NO2R_ADDR),
- __REG(PH1_NO3R_ADDR),
- __REG(PH1_NO4R_ADDR),
- __REG(PH1_NO5R_ADDR),
- __REG(PH1_NO6R_ADDR),
- __REG(PH1_NO7R_ADDR),
- __REG(PH1_PI1R_ADDR),
- __REG(PH1_PI2R_ADDR),
- __REG(PH1_RT0R_ADDR),
- __REG(PH1_RT10R_ADDR),
- __REG(PH1_RT1R_ADDR),
- __REG(PH1_RT2R_ADDR),
- __REG(PH1_RT3R_ADDR),
- __REG(PH1_RT4R_ADDR),
- __REG(PH1_RT5R_ADDR),
- __REG(PH1_RT6R_ADDR),
- __REG(PH1_RT7R_ADDR),
- __REG(PH1_RT8R_ADDR),
- __REG(PH1_RT9R_ADDR),
- __REG(PH1_TT0R_ADDR),
- __REG(PH1_TT10R_ADDR),
- __REG(PH1_TT1R_ADDR),
- __REG(PH1_TT2R_ADDR),
- __REG(PH1_TT3R_ADDR),
- __REG(PH1_TT4R_ADDR),
- __REG(PH1_TT5R_ADDR),
- __REG(PH1_TT6R_ADDR),
- __REG(PH1_TT7R_ADDR),
- __REG(PH1_TT8R_ADDR),
- __REG(PH1_TT9R_ADDR),
- __REG(PH2_EFR_ADDR),
- __REG(PH2_NO0R_ADDR),
- __REG(PH2_NO1R_ADDR),
- __REG(PH2_NO2R_ADDR),
- __REG(PH2_NO3R_ADDR),
- __REG(PH2_NO4R_ADDR),
- __REG(PH2_NO5R_ADDR),
- __REG(PH2_NO6R_ADDR),
- __REG(PH2_NO7R_ADDR),
- __REG(PH2_PI1R_ADDR),
- __REG(PH2_PI2R_ADDR),
- __REG(PH2_RT0R_ADDR),
- __REG(PH2_RT10R_ADDR),
- __REG(PH2_RT1R_ADDR),
- __REG(PH2_RT2R_ADDR),
- __REG(PH2_RT3R_ADDR),
- __REG(PH2_RT4R_ADDR),
- __REG(PH2_RT5R_ADDR),
- __REG(PH2_RT6R_ADDR),
- __REG(PH2_RT7R_ADDR),
- __REG(PH2_RT8R_ADDR),
- __REG(PH2_RT9R_ADDR),
- __REG(PH2_TT0R_ADDR),
- __REG(PH2_TT10R_ADDR),
- __REG(PH2_TT1R_ADDR),
- __REG(PH2_TT2R_ADDR),
- __REG(PH2_TT3R_ADDR),
- __REG(PH2_TT4R_ADDR),
- __REG(PH2_TT5R_ADDR),
- __REG(PH2_TT6R_ADDR),
- __REG(PH2_TT7R_ADDR),
- __REG(PH2_TT8R_ADDR),
- __REG(PH2_TT9R_ADDR),
- __REG(PH3_EFR_ADDR),
- __REG(PH3_NO0R_ADDR),
- __REG(PH3_NO1R_ADDR),
- __REG(PH3_NO2R_ADDR),
- __REG(PH3_NO3R_ADDR),
- __REG(PH3_NO4R_ADDR),
- __REG(PH3_NO5R_ADDR),
- __REG(PH3_NO6R_ADDR),
- __REG(PH3_NO7R_ADDR),
- __REG(PH3_PI1R_ADDR),
- __REG(PH3_PI2R_ADDR),
- __REG(PH3_RT0R_ADDR),
- __REG(PH3_RT10R_ADDR),
- __REG(PH3_RT1R_ADDR),
- __REG(PH3_RT2R_ADDR),
- __REG(PH3_RT3R_ADDR),
- __REG(PH3_RT4R_ADDR),
- __REG(PH3_RT5R_ADDR),
- __REG(PH3_RT6R_ADDR),
- __REG(PH3_RT7R_ADDR),
- __REG(PH3_RT8R_ADDR),
- __REG(PH3_RT9R_ADDR),
- __REG(PH3_TT0R_ADDR),
- __REG(PH3_TT10R_ADDR),
- __REG(PH3_TT1R_ADDR),
- __REG(PH3_TT2R_ADDR),
- __REG(PH3_TT3R_ADDR),
- __REG(PH3_TT4R_ADDR),
- __REG(PH3_TT5R_ADDR),
- __REG(PH3_TT6R_ADDR),
- __REG(PH3_TT7R_ADDR),
- __REG(PH3_TT8R_ADDR),
- __REG(PH3_TT9R_ADDR),
- __REG(PH4_EFR_ADDR),
- __REG(PH4_NO0R_ADDR),
- __REG(PH4_NO1R_ADDR),
- __REG(PH4_NO2R_ADDR),
- __REG(PH4_NO3R_ADDR),
- __REG(PH4_NO4R_ADDR),
- __REG(PH4_NO5R_ADDR),
- __REG(PH4_NO6R_ADDR),
- __REG(PH4_NO7R_ADDR),
- __REG(PH4_PI1R_ADDR),
- __REG(PH4_PI2R_ADDR),
- __REG(PH4_RT0R_ADDR),
- __REG(PH4_RT10R_ADDR),
- __REG(PH4_RT1R_ADDR),
- __REG(PH4_RT2R_ADDR),
- __REG(PH4_RT3R_ADDR),
- __REG(PH4_RT4R_ADDR),
- __REG(PH4_RT5R_ADDR),
- __REG(PH4_RT6R_ADDR),
- __REG(PH4_RT7R_ADDR),
- __REG(PH4_RT8R_ADDR),
- __REG(PH4_RT9R_ADDR),
- __REG(PH4_TT0R_ADDR),
- __REG(PH4_TT10R_ADDR),
- __REG(PH4_TT1R_ADDR),
- __REG(PH4_TT2R_ADDR),
- __REG(PH4_TT3R_ADDR),
- __REG(PH4_TT4R_ADDR),
- __REG(PH4_TT5R_ADDR),
- __REG(PH4_TT6R_ADDR),
- __REG(PH4_TT7R_ADDR),
- __REG(PH4_TT8R_ADDR),
- __REG(PH4_TT9R_ADDR),
- __REG(PH5_EFR_ADDR),
- __REG(PH5_NO0R_ADDR),
- __REG(PH5_NO1R_ADDR),
- __REG(PH5_NO2R_ADDR),
- __REG(PH5_NO3R_ADDR),
- __REG(PH5_NO4R_ADDR),
- __REG(PH5_NO5R_ADDR),
- __REG(PH5_NO6R_ADDR),
- __REG(PH5_NO7R_ADDR),
- __REG(PH5_PI1R_ADDR),
- __REG(PH5_PI2R_ADDR),
- __REG(PH5_RT0R_ADDR),
- __REG(PH5_RT10R_ADDR),
- __REG(PH5_RT1R_ADDR),
- __REG(PH5_RT2R_ADDR),
- __REG(PH5_RT3R_ADDR),
- __REG(PH5_RT4R_ADDR),
- __REG(PH5_RT5R_ADDR),
- __REG(PH5_RT6R_ADDR),
- __REG(PH5_RT7R_ADDR),
- __REG(PH5_RT8R_ADDR),
- __REG(PH5_RT9R_ADDR),
- __REG(PH5_TT0R_ADDR),
- __REG(PH5_TT10R_ADDR),
- __REG(PH5_TT1R_ADDR),
- __REG(PH5_TT2R_ADDR),
- __REG(PH5_TT3R_ADDR),
- __REG(PH5_TT4R_ADDR),
- __REG(PH5_TT5R_ADDR),
- __REG(PH5_TT6R_ADDR),
- __REG(PH5_TT7R_ADDR),
- __REG(PH5_TT8R_ADDR),
- __REG(PH5_TT9R_ADDR),
- __REG(PH6_EFR_ADDR),
- __REG(PH6_NO0R_ADDR),
- __REG(PH6_NO1R_ADDR),
- __REG(PH6_NO2R_ADDR),
- __REG(PH6_NO3R_ADDR),
- __REG(PH6_NO4R_ADDR),
- __REG(PH6_NO5R_ADDR),
- __REG(PH6_NO6R_ADDR),
- __REG(PH6_NO7R_ADDR),
- __REG(PH6_PI1R_ADDR),
- __REG(PH6_PI2R_ADDR),
- __REG(PH6_RT0R_ADDR),
- __REG(PH6_RT10R_ADDR),
- __REG(PH6_RT1R_ADDR),
- __REG(PH6_RT2R_ADDR),
- __REG(PH6_RT3R_ADDR),
- __REG(PH6_RT4R_ADDR),
- __REG(PH6_RT5R_ADDR),
- __REG(PH6_RT6R_ADDR),
- __REG(PH6_RT7R_ADDR),
- __REG(PH6_RT8R_ADDR),
- __REG(PH6_RT9R_ADDR),
- __REG(PH6_TT0R_ADDR),
- __REG(PH6_TT10R_ADDR),
- __REG(PH6_TT1R_ADDR),
- __REG(PH6_TT2R_ADDR),
- __REG(PH6_TT3R_ADDR),
- __REG(PH6_TT4R_ADDR),
- __REG(PH6_TT5R_ADDR),
- __REG(PH6_TT6R_ADDR),
- __REG(PH6_TT7R_ADDR),
- __REG(PH6_TT8R_ADDR),
- __REG(PH6_TT9R_ADDR),
- __REG(PH7_EFR_ADDR),
- __REG(PH7_NO0R_ADDR),
- __REG(PH7_NO1R_ADDR),
- __REG(PH7_NO2R_ADDR),
- __REG(PH7_NO3R_ADDR),
- __REG(PH7_NO4R_ADDR),
- __REG(PH7_NO5R_ADDR),
- __REG(PH7_NO6R_ADDR),
- __REG(PH7_NO7R_ADDR),
- __REG(PH7_PI1R_ADDR),
- __REG(PH7_PI2R_ADDR),
- __REG(PH7_RT0R_ADDR),
- __REG(PH7_RT10R_ADDR),
- __REG(PH7_RT1R_ADDR),
- __REG(PH7_RT2R_ADDR),
- __REG(PH7_RT3R_ADDR),
- __REG(PH7_RT4R_ADDR),
- __REG(PH7_RT5R_ADDR),
- __REG(PH7_RT6R_ADDR),
- __REG(PH7_RT7R_ADDR),
- __REG(PH7_RT8R_ADDR),
- __REG(PH7_RT9R_ADDR),
- __REG(PH7_TT0R_ADDR),
- __REG(PH7_TT10R_ADDR),
- __REG(PH7_TT1R_ADDR),
- __REG(PH7_TT2R_ADDR),
- __REG(PH7_TT3R_ADDR),
- __REG(PH7_TT4R_ADDR),
- __REG(PH7_TT5R_ADDR),
- __REG(PH7_TT6R_ADDR),
- __REG(PH7_TT7R_ADDR),
- __REG(PH7_TT8R_ADDR),
- __REG(PH7_TT9R_ADDR),
- {"band 1 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 1*0x10), 1},
- {"band 2 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 2*0x10), 1},
- {"band 3 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 3*0x10), 1},
- {"band 4 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 4*0x10), 1},
- {"band 5 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 5*0x10), 1},
- {"band 6 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 6*0x10), 1},
- {"band 7 / prev band", (uint16_t*)(PMD_V2_REGBASE+0x0c00 + 7*0x10), 1},
- __REG(DSP_ALBR_ADDR),
- __REG(DSP_CHMR_ADDR),
- __REG(DSP_CLBR_ADDR),
- __REG(DSP_DELTA1_ADDR),
- __REG(DSP_DELTA2_ADDR),
- __REG(DSP_DELTA3_ADDR),
- __REG(DSP_DELTA4_ADDR),
- __REG(DSP_DELTA5_ADDR),
- __REG(DSP_DELTA6_ADDR),
- __REG(DSP_DELTA7_ADDR),
- __REG(DSP_FBYR_ADDR),
- __REG(DSP_FLBR_ADDR),
- __REG(DSP_FSR_ADDR),
- __REG(DSP_FTR_ADDR),
- __REG(DSP_IBYR_ADDR),
- __REG(DSP_IFSR_ADDR),
- __REG(DSP_ISFR_ADDR),
- __REG(DSP_MOR_ADDR),
- __REG(DSP_OGAIN_ADDR),
- __REG(DSP_PI1CHAN1R_ADDR),
- __REG(DSP_PI1CHAN2R_ADDR),
- __REG(DSP_PI1CHAN3R_ADDR),
- __REG(DSP_PI1CHAN4R_ADDR),
- __REG(DSP_PI1CHAN5R_ADDR),
- __REG(DSP_PI1CHAN6R_ADDR),
- __REG(DSP_PI1CHAN7R_ADDR),
- __REG(DSP_PI2CHAN1R_ADDR),
- __REG(DSP_PI2CHAN2R_ADDR),
- __REG(DSP_PI2CHAN3R_ADDR),
- __REG(DSP_PI2CHAN4R_ADDR),
- __REG(DSP_PI2CHAN5R_ADDR),
- __REG(DSP_PI2CHAN6R_ADDR),
- __REG(DSP_PI2CHAN7R_ADDR),
- __REG(DSP_RBYR_ADDR),
- __REG(DSP_RPR_ADDR),
- __REG(DSP_RSR_ADDR),
- __REG(DSP_STIND1_ADDR),
- __REG(DSP_STIND2_ADDR),
- __REG(DSP_STIND3_ADDR),
- __REG(DSP_STIND4_ADDR),
- __REG(DSP_STIND5_ADDR),
- __REG(DSP_STIND6_ADDR),
- __REG(DSP_STIND7_ADDR),
- __REG(DSP_STR_ADDR),
- {"AGC",(uint16_t*)(PMD_V2_REGBASE+0x1080), 10},
- {"timings",(uint16_t*)(PMD_V2_REGBASE+0x1094), 2},
- {"PAF",(uint16_t*)(PMD_V2_REGBASE+0x1098), 2},
- {"PAF",(uint16_t*)(PMD_V2_REGBASE+0x1100), 3},
- {"PAF",(uint16_t*)(PMD_V2_REGBASE+0x1110), 5},
- {"PAF",(uint16_t*)(PMD_V2_REGBASE+0x1120), 4},
- {0,0,0}
-};
-
-struct regdump_entry {
- volatile uint16_t *addr;
- uint16_t value;
-} __reg_dump[REGDUMP_NB_REGS];
-
-int __regp(struct reg_descriptor *desc) {
-
- int n = desc->n;
- volatile uint16_t *reg = (volatile uint16_t*)desc->addr;
- while (n--) {
- printf("%s *0x%08x = 0x%04x\r\n", desc->description, reg, *reg);
- reg++;
- }
- return desc->n;
-}
-
-int shell_regp(int argc, char *argv[]) {
-
- struct reg_descriptor *desc = __reg_descriptor;
- int n;
-
- for (n=0,desc=__reg_descriptor;desc->n;desc++) {
- n += __regp(desc);
- }
- printf("%d registers dumped.\r\n", n);
-
- return 0;
-}
-
-int __regw(struct regdump_entry *entry, struct reg_descriptor *desc) {
-
- int n = desc->n;
- volatile uint16_t *reg = (volatile uint16_t*)desc->addr;
- while (n--) {
- entry->addr = reg;
- entry->value = *reg;
- entry++;
- reg++;
- }
- return desc->n;
-}
-
-
-int shell_regw(int argc, char *argv[]) {
-
- struct reg_descriptor *desc = __reg_descriptor;
- struct regdump_entry *entry = __reg_dump;
- int n;
-
- for (n=0,desc=__reg_descriptor;desc->n;desc++) {
- n += __regw(entry, desc);
- entry += desc->n;
- }
- printf("%d registers stored.\r\n", n);
-
- return 0;
-}
-
-int __regd(struct regdump_entry *entry, struct reg_descriptor *desc) {
-
- int n = desc->n;
- volatile uint16_t *reg = (volatile uint16_t*)desc->addr;
- while (n--) {
- if ((entry->value) != *reg) {
- printf("%s *0x%08x = 0x%04x -> 0x%04x\r\n",
- desc->description, entry->addr, entry->value, *reg);
- }
- entry++;
- reg++;
- }
- return desc->n;
-}
-
-
-int shell_regd(int argc, char *argv[]) {
-
- struct reg_descriptor *desc = __reg_descriptor;
- struct regdump_entry *entry = __reg_dump;
- int n;
-
- for (n=0, desc=__reg_descriptor;desc->n;desc++) {
- n += __regd(entry, desc);
- entry += desc->n;
- }
- printf("%d registers diff'ed.\r\n", n);
-
- return 0;
-}
-
-
-char pkt_log_test_tab[16];
-
-int shell_pkt_log_test(int argc, char *argv[]) {
-
- int i;
- struct pkt_log head;
- pkt_log_init(&head, 5, 16);
- for (i=0;i<7;i++) {
- memset(pkt_log_test_tab,i,16);
- pkt_log_add(&head, PKT_LOG_RX, i, pkt_log_test_tab);
- }
- pkt_log_dump(&head);
- return 0;
-}
-
-int shell_plc_log_plcp(int argc, char *argv[]) {
- extern struct pkt_log plcp_plog;
- pkt_log_dump(&plcp_plog);
- return 0;
-}
-
-int shell_plc_log_pmd(int argc, char *argv[]) {
- extern struct pkt_log pmd_plog;
- pkt_log_dump(&pmd_plog);
- return 0;
-}
-
-int shell_plc_log_dup(int argc, char *argv[]) {
- extern struct pkt_log pmd_plog;
- pkt_log_find_dup(&pmd_plog);
- return 0;
-}
-
-int shell_mibSetMode(int argc, char **argv)
-{
- plc_if_mode_t newmode;
-
- if (!strcmp(argv[1],plc_if_mode_str(ad_hoc)))
- newmode = ad_hoc;
- else if (!strcmp(argv[1],plc_if_mode_str(repeater)))
- newmode = repeater;
- else if (!strcmp(argv[1],plc_if_mode_str(station)))
- newmode = station;
- else
- {
- printf("Invalid mode string \"%s\"\n",argv[1]);
- return RET_ERROR;
- }
-
- if ((int)newmode!=mib_getMode(1))
- mib_setMode(1,(int)newmode);
-
- return 0;
-}
-
-int shell_mibGetMode(int argc, char **argv)
-{
- plc_if_mode_t mode;
-
- mode = (plc_if_mode_t)mib_getMode(1);
-
- printf("Mode: %s\n",plc_if_mode_str(mode));
-
- return 0;
-}
-
-int shell_debug_uart(int argc, char *argv[]) {
-#ifndef softOSE
- static int n = 0;
- extern struct pkt_log pmd_plog;
- n++;
- uart_printf("test #%d\n", n);
- if (argc>0) {
- uart_puts(argv[1]);
- uart_put_char('\n');
- } else {
- uart_puts("test uart");
- uart_put_char('\n');
- }
-#endif
- return 0;
-}
-
-int shell_debug_uart_proxy(int argc, char *argv[]) {
-#ifndef softOSE
- uart_proxy_puts("test uart_proxy_puts");
- uart_proxy_puts("hello uart_proxy_puts");
-#endif
- return 0;
-}
-#ifndef FEATURE_ENERVATION
-int shell_free_style(int argc, char *argv[]) {
-
- extern int shell_bridge(int _argc, char *_argv[]);
-
- static char *__args[] = { "bridge", "off", NULL };
- shell_bridge(2, __args);
- shell_glomerOff(argc, argv);
- shell_plcSetFree(argc, argv);
- shell_plcp_set_fmode_p(argc, argv);
-}
-#endif /* FEATURE_ENERVATION */
-
-int shell_byte_ones(int argc, char *argv[]) {
- uint8_t n = (uint8_t)strtoul(argv[1],NULL,0);
- printf("%d (%x) contains %d ONES and %d ZEROES\n",
- n, n, byte_ones(n), byte_zeroes(n));
- return RET_SUCCESS;
-}
-
-int shell_word_ones(int argc, char *argv[]) {
- uint16_t n = (uint16_t)strtoul(argv[1],NULL,0);
- printf("%d (%x) contains %d ONES and %d ZEROES\n",
- n, n, word_ones(n), word_zeroes(n));
- return RET_SUCCESS;
-}
-int shell_dword_ones(int argc, char *argv[]) {
- uint32_t n = (uint32_t)strtoul(argv[1],NULL,0);
- printf("%d (%x) contains %d ONES and %d ZEROES\n",
- n, n, dword_ones(n), dword_zeroes(n));
- return RET_SUCCESS;
-}
-
-
-void plc_drv_register_shell_cmds(void) {
- ui_add_cmd("plog test",shell_pkt_log_test);
-
- ui_add_cmd("plc get channels",shell_dchannel);
- ui_add_cmd("plc get quality", shell_dq);
- ui_add_cmd("plc get phlic reg", shell_dv);
- ui_add_cmd2("plc get efr", shell_de, "get PLC efr registers", UI_SPV );
- ui_add_cmd2("plc get bands", shell_bands, "get bands settings", UI_SPV );
- ui_add_cmd("plc set mod",shell_setmod);
- ui_add_cmd2("plc get stats", shell_plcstats, "get plc statistics", UI_SPV );
- ui_add_cmd("plc set coef_corr", shell_plcSetCoefCorr);
- ui_add_cmd("plc set tmo_drop", shell_plcSetTmoDrop);
- ui_add_cmd("plc set early_tx", shell_plcSetEarlyTx);
- ui_add_cmd("plc snapshot", shell_plcSnapshot);
-#ifdef SOFIA
- ui_add_cmd("plc set ctrl mod", shell_plcSetCtrlMod);
- ui_add_cmd("plc set new tx_filter", shell_plcSetNewTxFilter);
- ui_add_cmd("plc set new rx_filter", shell_plcSetNewRxFilter);
- ui_add_cmd("plc set rx_filter gain", shell_plcSetRxFilterGain);
- ui_add_cmd("plc set tx_filter gain", shell_plcSetTxFilterGain);
- ui_add_cmd("plc set together", shell_plcSetTogether);
- ui_add_cmd("plc set new shaker", shell_plcSetNewShaker);
- ui_add_cmd("plc set tx delay", shell_plcSetTxDelay);
- ui_add_cmd("plc set detect level", shell_plcSetDetectLevel);
-#endif
- ui_add_cmd("plc set bands", shell_plcSetBands);
-#ifndef FEATURE_ENERVATION
- ui_add_cmd("plc set qsize", shell_plcSetQsize);
-#endif /* FEATURE_ENERVATION */
- ui_add_cmd("plc set tx gain", shell_plcSetTxGain);
- ui_add_cmd("plc set pilots", shell_plcSetPilots);
- ui_add_cmd("plc set fcs on", shell_plc_set_fcs_on);
- ui_add_cmd("plc set fcs off", shell_plc_set_fcs_off);
-#ifndef FEATURE_ENERVATION
- ui_add_cmd("plc set ack", shell_plcSetAck);
- ui_add_cmd("plc set tmo_w_ack", shell_plcSetTmowack);
- ui_add_cmd("plc set tmo_tx", shell_plcSetTmotx);
-#ifndef FEATURE_CCO
- ui_add_cmd("plc set tmo_token", shell_plcSetTmotoken);
- ui_add_cmd("plc set free", shell_plcSetFree);
- ui_add_cmd("plc set token", shell_plcSetToken);
-#endif /* FEATURE_CCO */
- ui_add_cmd("plc create host", shell_cac_create_host);
- ui_add_cmd("free style", shell_free_style);
- ui_add_cmd("plc set retries", shell_plcSetRetries);
- ui_add_cmd("plc set txstart_busy_dur", shell_plcSetTxstartBusyDur);
- ui_add_cmd("plc set txend_idle_dur", shell_plcSetTxEndIdleDur);
- ui_add_cmd("plc set txshort_idle_dur", shell_plcSetTxShortIdleDur);
-#endif /* FEATURE_ENERVATION */
- ui_add_cmd("plc set calibrate", shell_plcSetCalibrate);
- ui_add_cmd("plc set ref", shell_plcSetRefhead);
- ui_add_cmd("plc set ref_interval", shell_plc_set_ref_interval);
- ui_add_cmd("plc set nb_periodic_ref", shell_plc_set_nb_periodic_ref);
- ui_add_cmd("plc set rxEof", shell_plcSetRxEof);
- ui_add_cmd("plc set txEof", shell_plcSetTxEof);
- ui_add_cmd("plc set wait", shell_plcSetWait);
- ui_add_cmd("plc set Notch", shell_plcSetNotch);
- ui_add_cmd("plc get conf", shell_plcGetConf);
- ui_add_cmd("plc restart", shell_plcRestart);
- ui_add_cmd("debug crash", shell_crash);
- ui_add_cmd("debug double", shell_double);
- ui_add_cmd("board get switch", shell_readSwitches);
-#ifndef __KERNEL__
- ui_add_cmd("testu", shell_testu );
-#else
- printf("testu ui cmd not implemented in KERNEL mode\n");
-#endif
- ui_add_cmd("debug plcp", shell_debug_plcp);
- ui_add_cmd("debug ahb error", shell_debug_ahb_error);
- ui_add_cmd("debug ahb renew", shell_debug_ahb_renew);
- ui_add_cmd2("force", shell_force," force a parameter", UI_SPV);
-
-#ifndef FEATURE_ENERVATION
- ui_add_cmd("debug sms",shell_rpcWrite);
- ui_add_cmd("test", shell_test );
- ui_add_cmd("nd get conf", shell_neighbourConf);
- ui_add_cmd("nd get stats", shell_neighbourStats);
- ui_add_cmd("nd set ack", shell_neighbourAck);
- ui_add_cmd("nd set no_ack", shell_neighbourNoack);
- ui_add_cmd("nd set period", shell_neighbourPeriod);
- ui_add_cmd("nd set gain", shell_neighbourGain);
- ui_add_cmd("nd reset", shell_neighbourReset);
- ui_add_cmd("nd start", shell_neighbourStart);
- ui_add_cmd("nd stop", shell_neighbourStop);
- ui_add_cmd2("glomer on", shell_glomerOn,"Glomer on doesn't need any help",0);
- ui_add_cmd2("glomer off", shell_glomerOff,"Stop the busy glom nd and ce process",0);
- ui_add_cmd("nd restart", shell_neighbourRestart);
-/* ui_add_cmd("log on", shell_logOn);*/
-/* ui_add_cmd("log off", shell_logOff);*/
-/* ui_add_cmd("log noise", shell_logNoise);*/
-/* ui_add_cmd("log norm noise", shell_logNormNoise);*/
-/* ui_add_cmd("log spectrum", shell_logSpectrum);*/
-
-#endif /* FEATURE_ENERVATION */
-
- ui_add_cmd("debug uart",shell_debug_uart);
- ui_add_cmd("debug uart_proxy",shell_debug_uart_proxy);
- ui_add_cmd("debug reg print",shell_regp);
- ui_add_cmd("debug reg save", shell_regw);
- ui_add_cmd("debug reg diff", shell_regd);
-
-#ifndef softOSE
- ui_add_cmd("txmem", shell_xxmem );
- ui_add_cmd("rxmem", shell_xxmem );
-#ifndef FEATURE_ENERVATION
- ui_add_cmd("txcmap", shell_xxcmap );
- ui_add_cmd("rxcmap", shell_xxcmap );
- ui_add_cmd("txmap", shell_xxmap );
- ui_add_cmd("rxmap", shell_xxmap );
- ui_add_cmd("ber", shell_ber);
- ui_add_cmd("ber_info", shell_ber_info );
-#endif /* FEATURE_ENERVATION */
-#endif /* softOSE */
-
- ui_add_cmd2("mib set mode", shell_mibSetMode,
- "mib set mode <mode string>\n"
- "Valid mode strings are: ad-hoc, repeater, station.\n"
- "Set the interface mode (Ad-Hoc,infrastructure/repeater, infrastructure/station).\n"
- "The board needs to be reset.\n",
- UI_SPV);
- ui_add_cmd("mib get mode", shell_mibGetMode);
- ui_add_cmd("byte ones", shell_byte_ones );
- ui_add_cmd("word ones", shell_word_ones );
- ui_add_cmd("dword ones", shell_dword_ones );
-#ifndef softOSE
- ui_add_cmd("plcp scan network", shell_plcpScanNetwork);
-#endif
-
- carp_init_ui();
-}
-
-#endif
-
diff --git a/app/sm-emac-drv/src/plc_test.c b/app/sm-emac-drv/src/plc_test.c
deleted file mode 100755
index da6ae60c4b..0000000000
--- a/app/sm-emac-drv/src/plc_test.c
+++ /dev/null
@@ -1,732 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-#include "plc_dbg.h"
-#include "ose.h"
-#include "plc_drv.h"
-#include "plc_mac.h"
-#include "plc_test.h"
-#include "plc_rx_buffer.h"
-#include "plc_ber.h"
-#include "plcp_core.h" /* FIXME: for PLCP_FMODE_P */
-#include "lib_if.h"
-
-
-/* buffer aligné sur 32 bits pour arm (header test sur 32 bits) */
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t test_c_buf[MAC_PAYLOAD_CSIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t test_d_buf[MAC_PAYLOAD_DSIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t __test_pattern[PLCP_MAX_SLICES*PMD_SLICE_SIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
-#define PATTERN(i) (__test_pattern[i])
-
-uint16_t tx_gain_tab[TEST_MAX_SCAN];
-uint16_t tx_nb_entry = 0;
-
-/* JA 16/04/04 log test */
-
-#define PLC_TEST_LOG_NB_REC 1000
-#define PLC_SNAP_RX 0
-#define PLC_SNAP_TX 1
-
-struct plc_test_record {
-/* struct timeval tv;*/
- int index;
-};
-
-struct plc_test_record plc_test_log[PLC_TEST_LOG_NB_REC];
-int plc_test_log_idx = 0;
-
-#define LOG_TESTRX \
-{ \
- plc_test_log[plc_test_log_idx].index = th->index; \
- plc_test_log_idx = (plc_test_log_idx + 1)%PLC_TEST_LOG_NB_REC; \
-}
-#if 0
-#define LOG_TESTRX \
-{ \
- gettimeofday(&plc_lnk_log[plc_lnk_log_idx].tv, NULL); \
- plc_test_log[plc_lnk_log_idx].direction = PLC_SNAP_TX; \
- plc_test_log[plc_lnk_log_idx].index = b_link->ifindex; \
- RT_PRINTM(TRACE_PLCLNK,TRACE_INFO,"%d.%d ethWrite \n", \
- plc_lnk_log[plc_lnk_log_idx].tv.tv_sec, \
- plc_lnk_log[plc_lnk_log_idx].tv.tv_usec/1000); \
- plc_lnk_log_idx = (plc_lnk_log_idx + 1)%PLC_LNK_LOG_NB_REC; \
-}
-#endif
-/* END JA LOG test */
-
-void test_init(struct plc_drv_unit * unit){
-
- int slice, i, j, line, n;
-
- unit->test.nb_frames=100;
- unit->test.d_len=1000;
- unit->test.c_len=0;
- unit->test.host_id=0;
- unit->test.gain_begin=0x200;
- unit->test.gain_end=0x400;
- unit->test.gain_step=0x40;
- unit->test.started=false;
- unit->test.autotest=false;
- unit->test.ber=false;
- unit->test.index=0;
- unit->test.delay=0; /* ms between TEST frames */
- /* 2004-02-23 / TF
- * changed BER delay from 40 to 60 ms to avoid errors in control BER
- */
- unit->test.ber_delay=200; /* ms between BER frames */
- unit->test.ber_tx_control_pattern=BER_PATTERN_ALT_0123;
- unit->test.ber_tx_payload_pattern=BER_PATTERN_ALT_0123;
- unit->test.ber_rx_control_pattern=-1;
- unit->test.ber_rx_payload_pattern=-1;
- unit->test.flags=0; /* F_ACK / F_ARABICA not used by default */
-
- memset(plc_test_log,0,sizeof(plc_test_log));
-
-
- for (n=0,slice=0;slice<PLCP_MAX_SLICES;slice++) {
- for (line=0,j=0;line<PMD_SLICE_SIZE/16;line++) {
- __test_pattern[n++] = slice;
- for (i=0;i<14;i++) {
- __test_pattern[n++] = (uint8_t)line;
- }
- __test_pattern[n++] = ~slice;
- }
- }
-}
-
-void test_reset(struct plc_drv_unit * unit){
-
- /* on clean la structure reset */
- memset(plc_test_log,0,sizeof(plc_test_log));
- plc_test_log_idx = 0;
- memset(&unit->stats.test,0,sizeof(unit->stats.test));
- memset(&tx_gain_tab,0,TEST_MAX_SCAN*sizeof(uint16_t));
- tx_nb_entry = 0;
-
- /* on clean les stats plc */
- memset(&unit->stats,0,sizeof(unit->stats));
-
-#if 0
- /* on clean les log noise */
- memset(mac_log_noise,0,PLC_MAC_LOG_SZ*sizeof(mac_log_noise[0]));
- noiseIndex = 1;
- memset(mac_log_sp,0,PLC_MAC_LOG_SZ*sizeof(mac_log_sp[0]));
- spIndex = 1;
-#endif
-
-}
-
-int test_set_csize(struct plc_drv_unit * unit, int csize)
-{
- if(unit->test.started){
- return -1;
- }
- if(unit->test.c_len > MAC_PAYLOAD_CSIZE){
- printf("test size must be less than %d bytes\r\n",
- MAC_PAYLOAD_CSIZE);
- }
- unit->test.c_len = csize;
- return 0;
-}
-
-int test_set_dsize(struct plc_drv_unit * unit, int dsize)
-{
- if(unit->test.started){
- return -1;
- }
- if(unit->test.d_len > MAC_PAYLOAD_DSIZE){
- printf("test size must be less than %d bytes\r\n",
- MAC_PAYLOAD_DSIZE);
- }
- unit->test.d_len = dsize;
- return 0;
-}
-
-int test_set_flag(struct plc_drv_unit *unit, int flag) {
-
- if(unit->test.started){
- return -1;
- }
- unit->test.flags |= flag;
- return 0;
-}
-
-int test_unset_flag(struct plc_drv_unit *unit, int flag) {
-
- if(unit->test.started){
- return -1;
- }
- unit->test.flags &= ~flag;
- return 0;
-}
-
-
-int test_set_num(struct plc_drv_unit * unit,int nb)
-{
- if(unit->test.started){
- return -1;
- }
- unit->test.nb_frames=nb;
- return 0;
-}
-
-int test_set_payload_check(struct plc_drv_unit * unit, bool check) {
-
- unit->test.payload_check = check;
- return 0;
-}
-
-int test_set_ber(struct plc_drv_unit * unit, bool enable) {
-
- if (enable) {
- printf("ber mode enabled\n");
- } else {
- printf("ber mode disabled\n");
- }
- unit->test.ber = enable;
- return 0;
-}
-
-int test_set_delay(struct plc_drv_unit * unit, int d) {
-
- printf("delay between TEST frames set to %d ms\n", d);
-
- unit->test.delay = d;
- return 0;
-}
-
-int test_set_ber_delay(struct plc_drv_unit * unit, int d) {
-
- printf("delay between BER frames set to %d ms\n", d);
-
- unit->test.ber_delay = d;
- return 0;
-}
-
-int test_set_pattern(struct plc_drv_unit * unit,
- int start, int modulo) {
-
- int i, n;
- int slice;
- uint8_t p = start;
-
- if (modulo==0) {
- modulo = PMD_SLICE_SIZE;
- }
-
- for (n=0, i=0;i<sizeof(__test_pattern); i++) {
- __test_pattern[n++] = (p%modulo);
- p++;
- }
-
- printf("dumping first 2 slices of test pattern:\n");
-#ifndef __KERNEL__
- dump8((char*)__test_pattern, PMD_SLICE_SIZE, 16);
- printf("\n");
- dump8((char*)__test_pattern, PMD_SLICE_SIZE, 16);
-#else
- printf("\tNot available in KERNEL mode\n");
-#endif
- return 0;
-}
-
-int test_set_ber_pattern(struct plc_drv_unit * unit,
- int control_pattern, int payload_pattern) {
-
- if ((control_pattern<0) || (control_pattern>BER_PATTERN_MAX)) {
- printf("control pattern must be in [0..%d] range\n",
- BER_PATTERN_MAX);
- return -1;
- }
-
- if ((payload_pattern<0) || (payload_pattern>BER_PATTERN_MAX)) {
- printf("payload pattern must be in [0..%d] range\n",
- BER_PATTERN_MAX);
- return -1;
- }
-
- printf("control pattern = %d, payload pattern = %d \n",
- control_pattern, payload_pattern);
-
- unit->test.ber_tx_control_pattern = control_pattern;
- unit->test.ber_tx_payload_pattern = payload_pattern;
- return 0;
-}
-
-int test_set_gain(struct plc_drv_unit * unit,int start,int stop,int step)
-{
- if(unit->test.started){
- return -1;
- }
- if (((stop-start)/step) > (TEST_MAX_SCAN-1))
- {
- printf("Error: range too big; %d steps max\n",TEST_MAX_SCAN - 1);
- return -1;
- }
- unit->test.gain_begin=start;
- unit->test.gain_end=stop;
- unit->test.gain_step=step;
- return 0;
-}
-
-int test_set_host(struct plc_drv_unit * unit, int host_id)
-{
- struct plcp_host *host;
- if(unit->test.started){
- return -1;
- }
- /* recherche de l'host connaissant sa poition */
- host=plcp_get_host_by_index(host_id);
- if(host==NULL)
- {
- printf("host id unknown\r\n");
- return -1;
- }
- /* on enregistre l'addresse mac */
- unit->test.host_id=host_id;
- return 0;
-}
-
-
-void test_write(struct plc_drv_unit * unit, struct plcp_host *host)
-{
- struct test_header *th;
-
- if (unit->test.ber==false) {
- if (unit->test.c_len) {
- th = (struct test_header *)test_c_buf;
- } else {
- th = (struct test_header *)test_d_buf;
- }
- th->index++;
- }
-
- unit->stats.test.nb_writes++;
-
- /* envoie prioritaire sur la donnée */
- mm_write(unit, host, &test_c_buf[0], unit->test.c_len, &test_d_buf[0], unit->test.d_len,
- (unit->test.ber?MA_SUBTYPE_BER:MA_SUBTYPE_TEST), unit->test.flags, MAC_PRIO_MMDU);
-}
-
-
-
-int test_start_tx(struct plc_drv_unit * unit)
-{
- struct plcp_host *host;
- struct test_header *th;
- int bits;
- int i;
-
- if(unit->test.started){
- return -1;
- }
-
- if (unit->plcp.config.fmode == PLCP_FMODE_P) {
- printf("cannot use test tool with P-mode enabled.\n");
- return -1;
- }
-
- /* récupération des info sur le destinataire */
- host=plcp_get_host_by_index(unit->test.host_id);
-
- if(host == NULL)
- {
- printf("test start error, host_id %d unknown\r\n", unit->test.host_id);
- return -1;
- }
-
- unit->test.started=true;
-
- if (unit->test.ber) {
- plcp_build_ber_frame(unit, host,
- test_c_buf, &unit->test.c_len,
- test_d_buf, &unit->test.d_len);
-
- /* initialisation concernant les données de control */
- plcp_cleanup_ber(unit);
- // *(uint16_t*)(0x6406003a) = 0; // vote desactived
- // *(uint16_t*)(0x6406003a) = 0;
-
- /* initialisation concernant la payload */
- bits = (unit->test.d_len + PMD_SLICE_SIZE - 1)/PMD_SLICE_SIZE;
- bits = bits * PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12;
- printf("ber mode: csize=%d dsize=%d (%d slots)\n",
- unit->test.c_len,
- unit->test.d_len,
- (host->uchannel->lookup.bits_per_slot ?
- (bits/host->uchannel->lookup.bits_per_slot):0));
-
- } else {
- /* header de test */
- th=(struct test_header*)&test_d_buf[0];
-
- th->type = TEST_NORMAL;
- th->index = 0;
-
- for (i=0; i<MAC_PAYLOAD_CSIZE; i++) {
- test_c_buf[i] = (uint8_t)i;
- }
-
- for (i=TEST_HEADER_SIZE; i<MAC_PAYLOAD_DSIZE; i++) {
- test_d_buf[i] = PATTERN(i);
- }
- }
-
- /* reset des informations */
- test_reset(unit);
-
- /* envoie de la première trame */
- test_write(unit, host);
- return 0;
-}
-
-int test_stop_tx(struct plc_drv_unit * unit)
-{
- if(unit->test.started==false){
- return -1;
- }
- unit->test.started=false;
- unit->test.autotest=false;
- return 0;
-}
-
-
-void test_start_rx(struct plc_drv_unit * unit)
-{
- /* on nettoie les informations de test */
- test_reset(unit);
-}
-
-void test_handle_tx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed)
-{
- if(failed){
- unit->stats.test.nb_handle_tx_failed++;
- } else {
- unit->stats.test.nb_handle_tx++;
- }
- if (unit->test.started){
- if(unit->stats.test.nb_writes >= unit->test.nb_frames){
- /* transfert terminé */
- unit->test.started=false;
- } else {
- delay(unit->test.delay);
- test_write(unit, host);
- }
- }
-}
-
-#if 0
-void test_int_handler(struct plc_drv_unit *unit)
-{
- int agc_index;
-
- /* quelquesoit le type de trame, on stoke le gain */
- agc_index=unit->stats.test.agc_index;
- unit->stats.test.tab_agc[agc_index] = unit->stats.channel.gain_agc;
- unit->stats.test.agc_index = ((agc_index + 1) % NB_AGC_MEASURES);
-
-}
-#endif
-
-void test_handle_rx(struct plc_drv_unit * unit, struct plcp_host *host,
- uint8_t *c_buf, int c_len, uint8_t *d_buf, int d_len, bool failed)
-{
- struct test_header *th;
- int i;
-
- if(failed){
- unit->stats.test.nb_handle_rx_failed++;
- } else {
- unit->stats.test.nb_handle_rx++;
- if (c_len) {
- th = (struct test_header *)c_buf;
- } else {
- th = (struct test_header *)d_buf;
- }
-
- if (unit->test.payload_check) {
- for (i=0;i<c_len;i++) {
- if ( *(c_buf+i) != (uint8_t)i ) {
- unit->stats.test.e_bad_c_buf++;
- }
- }
-
- for (i=TEST_HEADER_SIZE; i<d_len; i++) {
- if ( *(d_buf+i) != PATTERN(i) ) {
- unit->stats.test.e_bad_d_buf++;
- }
- }
- }
-
-#if 0
- if(th->type == TEST_AUTOSCAN)
- {
- if ((th->mod < PLC_MOD_MAX) && (th->index < TEST_MAX_SCAN))
- {
- unit->stats.test.nb_handle_rx2[th->mod][th->index]++;
- tx_gain_tab[th->index] = th->tx_gain;
- if (th->index > tx_nb_entry)
- tx_nb_entry = th->index;
- }
- }
-#endif
-
- /* log des bon recus */
- LOG_TESTRX;
- }
-
- /* libération du buffer */
-
- if (c_len>0) {
- drv_free(c_buf);
- }
-
- if (d_len>0) {
- drv_free(d_buf);
- }
-}
-
-void test_conf(struct plc_drv_unit * unit){
- printf("%s ",unit->test.autotest?"AUTOTEST":"TEST");
- printf("%s\r\n",unit->test.started?"STARTED":"STOPPED");
- printf("frame csize .......... %d\r\n",unit->test.c_len);
- printf("frame dsize .......... %d\r\n",unit->test.d_len);
- printf("frame num ............ %d\r\n",unit->test.nb_frames);
- printf("host id .............. %d\r\n",unit->test.host_id);
- printf("payload check ........ %s\r\n",
- unit->test.payload_check?"enabled":"disabled");
- printf("delay ................ %d\r\n",unit->test.delay);
- printf("BER .................. %s\r\n",
- unit->test.ber?"enabled":"disabled");
- printf("BER delay ............ %d\r\n",unit->test.ber_delay);
- printf("BER control pattern .. %d\r\n",unit->test.ber_tx_control_pattern);
- printf("BER payload pattern .. %d\r\n",unit->test.ber_tx_payload_pattern);
- printf("mode ................. %s\r\n",
- unit->test.flags & F_ACK ? "acknowledged":"non acknowledged");
- printf("autoscan settings: \n");
- printf(" start gain ......... 0x%x\n",unit->test.gain_begin);
- printf(" end gain ........... 0x%x\n",unit->test.gain_end);
- printf(" step ............... 0x%x\n",unit->test.gain_step);
-}
-
-void test_agc(struct plc_drv_unit *unit)
-{
- int i, index;
- uint16_t *tab_agc;
- double moy=0;
-
- tab_agc=&unit->stats.test.tab_agc[0];
- index = unit->stats.test.agc_index;
-
- for(i=0;i<NB_AGC_MEASURES;i++){
- if((i % 10)==0) printf("\n");
- printf("%d ",tab_agc[index]);
- index = ((index + 1) % NB_AGC_MEASURES);
- moy += tab_agc[index];
- }
- moy = moy / NB_AGC_MEASURES;
- printf("\navg agc=%6.2f\n",moy);
-}
-
-void test_stats(struct plc_drv_unit * unit){
- if(/*unit->test.autotest*/1) {
-#if 0
- char *mod_tab[] = {"bpsk", "qpsk", "qam16", "qam64", "qam256","TOTAL"};
- int best_match=0, best_mod=0, best_gain=0;
- int sum_row[33], sum_col[PLC_MOD_MAX];
- int i, j;
- printf("\r\nreceive:\r\n\t");
- for(i=0;i<(PLC_MOD_MAX+1);i++) {
- printf("%s\t",mod_tab[i]);
- }
- printf("\n------------------------------------------------------\n");
-
- memset(sum_row,0,sizeof(sum_row));
- memset(sum_col,0,sizeof(sum_col));
- for (i=0;i<=tx_nb_entry;i++) {
- printf("0x%x\t|",tx_gain_tab[i]);
- for (j=0;j<PLC_MOD_MAX;j++) {
- printf("%d\t",unit->stats.test.nb_handle_rx2[j][i]);
- sum_row[i] += unit->stats.test.nb_handle_rx2[j][i];
- sum_col[j] += unit->stats.test.nb_handle_rx2[j][i];
- if ((unit->stats.test.nb_handle_rx2[j][i] > best_match)
- || ((unit->stats.test.nb_handle_rx2[j][i] == best_match)
- && (j>best_mod))) {
- best_mod = j;
- best_gain = i;
- best_match = unit->stats.test.nb_handle_rx2[j][i];
- }
- }
- printf("| %d\n",sum_row[i]);
- }
- printf("\n------------------------------------------------------\n");
- printf("TOTAL\t|%d\t%d\t%d\t%d\t%d\n",sum_col[0], sum_col[1],sum_col[2],sum_col[3],sum_col[4]);
- printf("Information : best result is %d with gain=0x%x in %s\n",
- best_match,tx_gain_tab[best_gain],mod_tab[best_mod]);
- printf("\n");
-#endif
- printf("\r\ntransmit:\r\n");
- printf("--->%d frames written\r\n",unit->stats.test.nb_writes);
- printf("--->%d mac handle tx\r\n",unit->stats.test.nb_handle_tx);
- printf("--->%d mac handle tx failed\r\n",unit->stats.test.nb_handle_tx_failed);
- printf("--->%d mac handle rx\r\n",unit->stats.test.nb_handle_rx);
- printf("--->%d mac handle rx failed\r\n",unit->stats.test.nb_handle_rx_failed);
- printf("--->%d mac retries\r\n",unit->stats.mac.retries);
-
-
- printf("\r\nreceive:\r\n");
- printf("--->%d frames detected\r\n", unit->stats.plcp.busy_isr);
- printf(" - %d with bad plcp header\r\n",
- unit->stats.plcp.rx_invalid_control);
- printf(" - %d with bad mac header\r\n",
- unit->stats.mac.e_rx_bad_header);
- printf(" - %d with corrupted mac payload\r\n",
- unit->stats.mac.e_rx_bad_slice);
- if (unit->stats.test.e_bad_c_buf>0) {
- printf(" - %d with bad c_buf\r\n",unit->stats.test.e_bad_c_buf);
- }
- if (unit->stats.test.e_bad_d_buf>0) {
- printf(" - %d with bad d_buf\r\n",unit->stats.test.e_bad_d_buf);
- }
-
-
- printf("--->%d handled frames\r\n",unit->stats.test.nb_handle_rx);
- printf("--->%d acknowledges received\r\n",unit->stats.mac.rx_ack);
- }
-}
-
-
-void test_log(struct plc_drv_unit * unit){
- int i = 0;
- int j = 0;
- int plc_test_exp;
-
- printf("Trame de test NON recus :\n");
- plc_test_exp = 1;
- for (i=0;(i<PLC_TEST_LOG_NB_REC) && plc_test_log[j].index;i++) {
- if (plc_test_exp != plc_test_log[j].index)
- printf("%d ",plc_test_exp);
- else
- j++;
- plc_test_exp++;
- }
-}
-
-
-void test_autotest(struct plc_drv_unit * unit)
-{
- int mod;
- int gain;
- int i = 0;
- struct test_header * th;
- struct plcp_host *clone;
- struct plcp_host *host;
-
- if(unit->test.started){
- return;
- }
-
- th=(struct test_header *)&test_d_buf[0];
- th->type=TEST_AUTOSCAN;
- tx_nb_entry = 0;
-
- /* récupération des info sur le destinataire */
- host=plcp_get_host_by_index(unit->test.host_id);
-
- if(host == NULL)
- {
- printf("test start error, host_id %d unknown\r\n",
- unit->test.host_id);
- return;
- }
-
- /* reset des informations */
- test_reset(unit);
-
- /* clonage du host car on renvoie avec gain différent */
- clone = plcp_host_alloc();
- memcpy(&clone->mac_addr[0], &host->mac_addr[0], 6);
-
- unit->test.autotest = true;
-
- for (mod=0; mod<PLC_MOD_MAX; mod++)
- {
- /* Wait for test to finish before doing any arm */
- while(unit->test.started){
- delay(10);
- }
-
- /* modification du channel */
- clone->uchannel = plcp_get_uchannel_by_id(mod+1);
- clone->id=mod+1;
-
- for (gain=unit->test.gain_begin, i=0; gain<=unit->test.gain_end;
- gain+=unit->test.gain_step,i++)
- {
- /* Wait for test to finish before doing any arm */
- while(unit->test.started){
- delay(10);
- }
-
- /* header de test */
- th->index = i;
- th->tx_gain = gain;
- th->mod = mod;
-
- /* modification du gain */
- clone->data_gain = gain;
- clone->ctrl_gain = gain;
-
- /* affichage du clone courant */
- /* ce_display_host(unit, clone); */
-
- /* démarrage des tests */
- unit->test.started=true;
- unit->stats.test.nb_writes=0;
-
- /* envoie de la première trame */
- test_write(unit, clone);
- }
- }
-
- /* Wait for test to finish before doing any arm */
- while(unit->test.started){
- delay(10);
- }
-
- /* libératon du clone */
- plcp_host_free(clone);
-
- unit->test.autotest = false;
-
-}
-
diff --git a/app/sm-emac-drv/src/plc_testu.c b/app/sm-emac-drv/src/plc_testu.c
deleted file mode 100755
index 450d2bc049..0000000000
--- a/app/sm-emac-drv/src/plc_testu.c
+++ /dev/null
@@ -1,397 +0,0 @@
-#include "ose.h"
-#include "inet.h"
-#include "inet.sig"
-#include "ineterr.h"
-
-#include <stdio.h>
-#include <string.h>
-#ifdef USE_OSEDEF_H
-#include "osedef.h"
-#endif
-#include "plc_drv.h"
-#include "plc_dbg.h"
-
-/*
- * utilisation de testu:
- * ---------------------
- *
- * - envoie de paternes non fragmentables, avec numéros de séquence
- * - l'outil s'utilise comme test, et détecte:
- * . les doublons
- * . les déséquencements
- * . le nombre de trames valides
- *
- */
-
-#define UNDEF_SEQNO -1
-#define UDP_PORT 15 /* port du serveur */
-#define NB_SEQNO_SAVED 16 /* puissance de deux */
-#define MAX_FRAME_LEN 8000 /* taille suffisante pour être absorbée par la socket */
-
-/* signaux */
-#define SIG_TESTU_TX 1
-
-/* header de testu */
-struct testu_header
-{
- int seqno;
-};
-
-/* contestu.tx_framee de testu */
-struct test_udp
-{
- bool started;
- int num;
- int size;
- /* remote addresse */
- unsigned int raddr;
- /* trame d'émission et de réception */
- char tx_frame[MAX_FRAME_LEN];
- char rx_frame[MAX_FRAME_LEN];
- /* statistiques */
- struct
- {
- int tab_seq[NB_SEQNO_SAVED]; /* NB_SEQNO_SAVED derniers numéros de séquence */
- int next; /* position suivante */
- int last_seqno; /* index du dernier */
- int nb_received;
- int nb_doublons;
- int nb_deseq;
- int nb_valid;
- } stats;
-};
-
-/* signal utlisé pour transmettre */
-union SIGNAL
-{
- SIGSELECT sigNo;
-};
-
-
-/* informations sur testu */
-static struct test_udp testu;
-
-
-/* ouverture socket par le serveur */
-static int
-udpServerSocket(U16 port)
-{
- int sd;
- struct sockaddr_in addr;
-
- if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- error(errno);
-
- /* Set local address. */
- memset(&addr, 0, sizeof (addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = INADDR_ANY;
- addr.sin_port = htons(port);
-
- if (bind(sd, (struct sockaddr *) &addr, sizeof (addr)) < 0)
- error(errno);
-
- return sd;
-}
-
-
-
-/* envoyer une trame de taille inférieure à MAX_FRAME_LEN */
-int envoyer(int sd, struct sockaddr_in *remote, char * buf, int len){
-
- int n;
- while(len>0)
- {
- n = sendto(sd, buf, len, 0, (struct sockaddr *) remote, sizeof(struct sockaddr));
- if(n < 0) return -1;
- len -= n;
- }
- return 0;
-}
-
-
-/* le numéro de séquence à t-il deja été vu? */
-bool check_doublon(int seqno)
-{
- int i;
- for(i=0; i<NB_SEQNO_SAVED; i++)
- {
- if(seqno == testu.stats.tab_seq[i])
- {
- /* doublon trouvé */
- break;
- }
- }
- if(i == NB_SEQNO_SAVED) {
- /* doublon non trouvé */
- testu.stats.tab_seq[testu.stats.next]=seqno;
- testu.stats.next = (testu.stats.next + 1) % (NB_SEQNO_SAVED - 1);
- return false;
- } else {
- return true;
- }
-}
-
-/* on vérifie s'il y a eu un déséquencement (cas 1 2 4 exclus) */
-bool check_bad_sequence(int seqno)
-{
- int ecart;
- if(testu.stats.last_seqno == UNDEF_SEQNO)
- {
- testu.stats.last_seqno=seqno;
- return false;
- }
- else
- {
- /* distance entre testu.stats.last_seqno ----> seqno */
- ecart = seqno - testu.stats.last_seqno;
- if(ecart > 0) {
- /* seqno est arrivé aprés testu.stats.last_seqno (cas normal) */
- testu.stats.last_seqno=seqno;
- return false;
- } else {
- /* seqno est en retard */
- return true;
- }
- }
-}
-
-
-
-/* process qui emet */
-OS_PROCESS(send_udp)
-{
- union SIGNAL *sig;
- static const SIGSELECT udpSig[] = { 1, SIG_TESTU_TX };
- struct sockaddr_in remote_addr;
- struct sockaddr_in local_addr;
- struct testu_header *head;
- int fd, num;
-
- head=(struct testu_header *)&testu.tx_frame[0];
-
- for (;;)
- {
- /* Wait for a UDP datagram... */
- sig = receive((SIGSELECT *) udpSig);
- testu.started=1;
- RT_PRINTM(TRACE_MAC,TRACE_INFO,"start sending\n");
-
- /* Create udp socket */
- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- error(errno);
- /* local adresse */
- memset(&local_addr,0,sizeof(local_addr));
- local_addr.sin_family = AF_INET;
- local_addr.sin_port = 0;
- local_addr.sin_addr.s_addr = INADDR_ANY;
-
- if (bind(fd, (struct sockaddr *) &local_addr, sizeof (struct sockaddr_in)) < 0)
- error(errno);
-
- /* distant adresse */
- memset(&remote_addr,0,sizeof(remote_addr));
- remote_addr.sin_family = AF_INET;
- remote_addr.sin_port = htons(UDP_PORT);
- remote_addr.sin_addr.s_addr = testu.raddr;
-
- for(num=0; num < testu.num; num++)
- {
- /* fill the header */
- head->seqno=num;
-
- /* send the testu.tx_frame */
- if(envoyer(fd, &remote_addr, &testu.tx_frame[0], testu.size) < 0)
- {
- RT_PRINTM(TRACE_MAC,TRACE_INFO,"send error\n");
- RT_PRINTM(TRACE_MAC, TRACE_INFO, "error number is %d \n", errno);
- break;
- }
- /* arret forcé */
- if(!testu.started){
- RT_PRINTM(TRACE_MAC,TRACE_INFO,"transmit interrupted after %d sent\n",num);
- break;
- }
- }
-
- if(num == testu.num)
- {
- RT_PRINTM(TRACE_MAC,TRACE_INFO,"send done\n");
- }
- testu.started=0;
- close(fd);
-
- }
-}
-
-/* processus de reception */
-OS_PROCESS(recv_udp)
-{
- struct sockaddr_in remote_addr;
- struct testu_header *head;
- int sd0;
- char stop;
- int size, n;
-
- size = sizeof(struct sockaddr_in);
- head=(struct testu_header *)&testu.rx_frame[0];
-
- while(1)
- {
- sd0 = udpServerSocket(UDP_PORT);
- stop=0;
- while (!stop)
- {
- n = recvfrom (sd0, testu.rx_frame, MAX_FRAME_LEN, 0/* flags */, (struct sockaddr *) &remote_addr, &size);
- if(n < 0)
- {
- stop=1;
- RT_PRINTM(TRACE_MAC,TRACE_INFO,"recv udp error [code is %d]\n",errno);
- }
- else
- {
- testu.stats.nb_received++;
- if(check_doublon(head->seqno)){
- testu.stats.nb_doublons++;
- } else if(check_bad_sequence(head->seqno)) {
- testu.stats.nb_deseq++;
- } else {
- testu.stats.nb_valid++;
- }
- }
- }
- close(sd0);
- }
-}
-
-
-/* on prepare la réception des trames */
-void testu_rx(void)
-{
- int i;
-
- /* on efface les statistiques */
- memset(&testu.stats, 0, sizeof(testu.stats));
-
- /* derniers numéros de séquence */
- for(i=0; i<NB_SEQNO_SAVED; i++)
- {
- testu.stats.tab_seq[i]=UNDEF_SEQNO;
- }
- testu.stats.last_seqno=UNDEF_SEQNO;
-}
-
-
-
-/* initialisation de testu */
-int testu_init(void)
-{
- int i;
-
- /* configuration par défault */
- testu.num=10000;
- testu.size=1400;/* pas de fragmentation */
- testu.raddr = inet_addr("192.168.0.3");
-
- /* patern à envoyer */
- for(i=sizeof(struct testu_header); i<MAX_FRAME_LEN ;i++)
- {
- testu.tx_frame[i]=i;
- }
-
- /* on clean les stats */
- testu_rx();
- return 0;
-}
-
-/* udp_send ip_addr port data_addr data_len */
-int testu_tx(void)
-{
- union SIGNAL *sig;
- extern PROCESS send_udp_;
-
-
- if(testu.started){
- printf("testu already started\n");
- return -1;
- }
-
- /* vérification de la cohérence des parametres */
- sig=alloc(sizeof(union SIGNAL), SIG_TESTU_TX);
-
- send(&sig, send_udp_);
- return 0;
-}
-
-/* udp_send ip_addr port data_addr data_len */
-int testu_stop(void)
-{
- if(!testu.started){
- printf("testu not started\n");
- return -1;
- }
-
- testu.started=0;
-
- return 0;
-}
-
-/* statitiques udp */
-void testu_stats(void)
-{
- printf("number of frame received = %d\n",testu.stats.nb_received);
- printf("....number of frame valid = %d\n",testu.stats.nb_valid);
- printf("....number of frame dupplicated = %d\n",testu.stats.nb_doublons);
- printf("....number of frame desequenced = %d\n",testu.stats.nb_deseq);
-}
-
-/* statistiques */
-void testu_conf(void)
-{
- struct in_addr sin_addr;
- sin_addr.s_addr=testu.raddr;
- printf("testu conf\n");
- printf("....tx_frame is sent %d times\n",testu.num);
- printf("....tx_frame has %d bytes\n",testu.size);
- printf("....remote ip addr is %s\n",inet_ntoa(sin_addr));
-}
-
-/* commande shell */
-int shell_testu(int argc, char *argv[]) {
-
- int size;
-
- if(argc == 1) {
- testu_conf();
- }
- else if(strcmp(argv[1],"num")==0) {
- testu.num=atoi(argv[2]);
- }
- else if(strcmp(argv[1],"size")==0) {
- size=atoi(argv[2]);
- if(size > MAX_FRAME_LEN){
- printf("frame should not exceed %d bytes (socket buffer)\n",MAX_FRAME_LEN);
- return -1;
- }
- testu.size=size;
- }
- else if (strcmp(argv[1],"raddr")==0) {
- testu.raddr = inet_addr(argv[2]);
- }
- else if(strcmp(argv[1],"tx")==0) {
- testu_tx();
- }
- else if(strcmp(argv[1],"rx")==0) {
- testu_rx();
- }
- else if(strcmp(argv[1],"stop")==0) {
- testu_stop();
- }
- else if(strcmp(argv[1],"stats")==0) {
- testu_stats();
- }
-
- return 0;
-}
-
-
diff --git a/app/sm-emac-drv/src/plc_tx_buffer.c b/app/sm-emac-drv/src/plc_tx_buffer.c
deleted file mode 100644
index b4c912e0ce..0000000000
--- a/app/sm-emac-drv/src/plc_tx_buffer.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#endif
-#include "platform.h"
-#include "plcp_core.h"
-
-#ifndef __KERNEL__
-__ALIGN(32)
-#endif
-uint8_t plcp_tx_d_buf[PLCP_TX_RING_SIZE][PLCP_DMA_BUFFER_SIZE]
-#ifdef __KERNEL__
-__attribute__((aligned(32)))
-#endif
-;
-
diff --git a/app/sm-emac-drv/src/plcp_channel.c b/app/sm-emac-drv/src/plcp_channel.c
deleted file mode 100755
index 2b649ab95a..0000000000
--- a/app/sm-emac-drv/src/plcp_channel.c
+++ /dev/null
@@ -1,1622 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-#include "mib.h"
-#include "lib_if.h"
-
-/* plcp internal data */
-static struct plcp_host hosts_pool[PLCP_MAX_HOST]; // host structs
-static struct plcp_uchannel uchannels_pool[PLCP_MAX_UCHANNEL]; // uchannel structs
-static struct plcp_uchannel * channels[PLCP_MAX_CHANNEL_ID]; // channels_id association
-static struct plcp_host * cache_host; // a cache for the last host found
-static bool id_pool[PLCP_MAX_CHANNEL_ID]; // id pool
-static int next_pollable;
-static int index_uchannel;
-
-
-/* init hosts pool */
-void plcp_channels_init(void)
-{
- int i;
- memset(hosts_pool,0,PLCP_MAX_HOST*sizeof(struct plcp_host));
- memset(uchannels_pool,0,PLCP_MAX_UCHANNEL*sizeof(struct plcp_uchannel));
- memset(channels,NULL,PLCP_MAX_CHANNEL_ID*sizeof(struct plcp_uchannel *));
- memset(id_pool,false,PLCP_MAX_CHANNEL_ID*sizeof(bool));
- /* host indexes */
- for(i=0; i<PLCP_MAX_HOST; i++){
- hosts_pool[i].index=i;
- }
- /* uchannel indexes */
- for(i=0; i<PLCP_MAX_UCHANNEL; i++){
- uchannels_pool[i].index=i;
- }
- cache_host=NULL;
- next_pollable=0;
- index_uchannel=0;
-}
-
-
-/* allocate one host */
-struct plcp_host * plcp_host_alloc(void)
-{
- struct plcp_host * host=NULL;
- int i;
- for(i=0; i<PLCP_MAX_HOST; i++)
- {
- if(!hosts_pool[i].used){
- host=&hosts_pool[i];
- host->used=true;
- break;
- }
- }
- return host;
-}
-
-struct plcp_uchannel_ops plcp_uchannel_ops[PLCP_NB_MODE] = {
- { /* PLCP_MODE_CONTROL */
- plcp_check_control_only, /* validate control part */
- plcp_build_lookup_control, /* build_lookup */
- plcp_mtu_control, /* mtu */
- plcp_tx_start_fec, /* tx_start */
- NULL, /* tx_data */
- plcp_rx_start_control, /* rx_start */
- plcp_rx_more_control, /* rx_more */
- NULL, /* rx_data */
- plcp_rx_end_control /* rx_end */
- },
- { /* PLCP_MODE_FEC */
- plcp_check_control_common, /* validate control part */
- plcp_build_lookup_fec, /* build_lookup */
- plcp_mtu_fec, /* mtu */
- plcp_tx_start_fec, /* tx_start */
- plcp_tx_data_fec, /* tx_data */
- plcp_rx_start_fec, /* rx_start */
- plcp_rx_more_fec, /* rx_more */
- plcp_rx_data_fec, /* rx_data */
- plcp_rx_end_fec /* rx_end */
- },
- { /* PLCP_MODE_ROBUST_FEC */
- plcp_check_control_common, /* validate control part */
- plcp_build_lookup_robust_fec, /* build_lookup */
- plcp_mtu_robust_fec, /* mtu */
- plcp_tx_start_robust_fec, /* tx_start */
- plcp_tx_data_robust_fec, /* tx_data */
- plcp_rx_start_robust_fec, /* rx_start */
- plcp_rx_more_robust_fec, /* rx_more */
- plcp_rx_data_robust_fec, /* rx_data */
- plcp_rx_end_robust_fec /* rx_end */
- },
- { /* PLCP_MODE_3FEC */
- plcp_check_control_common, /* validate control part */
- plcp_build_lookup_fec, /* build_lookup */
- plcp_mtu_3fec, /* mtu */
- plcp_tx_start_3fec, /* tx_start */
- plcp_tx_data_fec, /* tx_data */
- plcp_rx_start_3fec, /* rx_start */
- plcp_rx_more_fec, /* rx_more */
- plcp_rx_data_3fec, /* rx_data */
- plcp_rx_end_3fec /* rx_end */
- },
-};
-
-/* find a free uchannel in the pool */
-struct plcp_uchannel * plcp_uchannel_alloc(int mode)
-{
- struct plcp_uchannel * uchannel=NULL;
- int i;
-
- if ((mode<0) || (mode>=PLCP_NB_MODE)) {
-#ifndef __KERNEL__
- errno = EINVAL;
-#endif
- return NULL;
- }
-
- for(i=0; i<PLCP_MAX_UCHANNEL; i++)
- {
- if(!uchannels_pool[index_uchannel].used){
- uchannel=&uchannels_pool[index_uchannel];
- uchannel->mode = mode;
- uchannel->ops = &plcp_uchannel_ops[mode];
- uchannel->used = true;
- uchannel->unused_bands=0;
- break;
- }
- index_uchannel = (index_uchannel + 1) % PLCP_MAX_UCHANNEL;
- }
- return uchannel;
-}
-
-/* allocation d'un identifiant de channel */
-int plcp_id_alloc(void)
-{
- int i;
- /* on s'arrêtera quand i==end */
- for(i=0 ;i<PLCP_MAX_CHANNEL_ID; i++)
- {
- if(id_pool[i] == false)
- {
- /* channel alloué */
- id_pool[i]=true;
- break;
- }
- }
- return i;
-}
-
-
-/* libération d'une structure host */
-void plcp_host_free(struct plcp_host *host)
-{
- host->used=false;
-}
-
-
-/* libération d'une structure host */
-void plcp_uchannel_free(struct plcp_uchannel *uchannel)
-{
- uchannel->used=false;
-}
-
-
-/* libération d'un identifiant de channel. ATTENTION: ne pas libèrer un
- * identifiant qui n'a pas été alloué pour la station!! */
-void plcp_id_free(int id)
-{
- id_pool[id]=false;
-}
-
-/* comparaison de deux adresses mac */
-bool plcp_same_mac(uint8_t * addr1, uint8_t * addr2)
-{
- int i;
- for(i=0;i<6;i++){
- if(addr1[i] != addr2[i]) return false;
- }
- return true;
-}
-
-
-/* retreive host by mac address. If doesn't exist, retrun NULL */
-struct plcp_host *plcp_get_host_by_addr(uint8_t *DA)
-{
- struct plcp_host * host;
- int i;
-
- /* on recherche d'abord dans le cache */
- if(cache_host && cache_host->used && plcp_same_mac(&cache_host->mac_addr[0],DA)) return cache_host;
-
- /* on recherche ensuite dans la liste */
- for(i=0; i<PLCP_MAX_HOST; i++)
- {
- host=&hosts_pool[i];
- if(host->used && plcp_same_mac(&host->mac_addr[0],DA))
- {
- cache_host=host;
- return host;
- }
- }
- return NULL;
-}
-
-/* find the next pollable host in the list */
-struct plcp_host *plcp_get_next_pollable(void)
-{
- struct plcp_host * host;
- int i;
-
- /* on recherche ensuite dans la liste */
- for(i=0; i<PLCP_MAX_HOST; i++)
- {
- host=&hosts_pool[next_pollable];
- next_pollable = (next_pollable + 1) % PLCP_MAX_HOST;
- if(host->used && host->pollable) return host;
- }
- return NULL;
-}
-
-/* retreive the host by this position in the list */
-inline struct plcp_host * plcp_get_host_by_index(int index)
-{
- if(index < 0 || index >= PLCP_MAX_HOST) return NULL;
- if(hosts_pool[index].used) return &hosts_pool[index];
- return NULL;
-}
-
-
-struct plcp_uchannel *plcp_get_uchannel_by_id(int id)
-{
- /* DO_THIS: check tone map identifier */
- /* int TEI;
- * TEI = id >> 8;
- * if(TEI == 0){
- * find into prefixed channels
- * }
- * else if((unit->TEI > 0) && (TEI == unit->TEI)){
- * find into all allocated channels
- * }
- * else {
- * return NULL;
- * }
- */
- if(id < 0 || id >= PLCP_MAX_CHANNEL_ID)
- return NULL;
- else
- return channels[id];
-}
-
-struct plcp_host * plcp_get_host_by_pos(struct plc_drv_unit *unit,int hostNb)
-{
- /* on recherche ensuite dans la liste */
- if (unit->started ==0)
- return NULL;
- if(hostNb < 0 || hostNb >= PLCP_MAX_HOST) return NULL;
- if(!hosts_pool[hostNb].used) return NULL;
- return &hosts_pool[hostNb];
-}
-
-
-bool plcp_link_uchannel_to_id(struct plcp_uchannel *uchannel, int id)
-{
- /* check that id is used */
- if(id_pool[id]==false) return false;
- /* check that uchannel is used */
- if(uchannel->used==false) return false;
- /* check that no previous association exists */
- if(channels[id]!=NULL) return false;
- /* association */
- channels[id]=uchannel;
- return true;
-}
-
-bool plcp_unlink_uchannel_to_id(struct plcp_uchannel *uchannel, int id)
-{
- /* check that id is used */
- if(id_pool[id]==false) return false;
- /* check that uchannel is used */
- if(uchannel->used==false) return false;
- /* check that previous association exists */
- if(channels[id]==NULL) return false;
- /* break association */
- channels[id]=NULL;
- return true;
-}
-
-/* retreive the uchannel by this position in the list */
-struct plcp_uchannel *plcp_get_uchannel_by_index(int index)
-{
- if(index < 0 || index >= PLCP_MAX_UCHANNEL) return NULL;
- if(uchannels_pool[index].used) return &uchannels_pool[index];
- return NULL;
-}
-
-/* copy one prebuilt uchannel to another */
-void plcp_copy_channel(struct plcp_uchannel *to, struct plcp_uchannel *from)
-{
- int to_index = to->index;
- /* save index */
- *to = *from;
- to->index = to_index;
-}
-
-/* creation d'un host par défault */
-/* DO_THIS: create a link only if TEI has been allocated */
-struct plcp_host * plcp_create_host(struct plc_drv_unit *unit, uint8_t *mac_addr)
-{
- struct plcp_uchannel *uchannel;
- struct plcp_host * host;
- bool error=true;
- /* allocation d'une structure host */
- host=plcp_host_alloc();
- host->pollable=false;
- if(host)
- {
- /* creation d'un nouveau canal pour la transmission */
- host->uchannel=plcp_uchannel_alloc(PLCP_MODE_FEC);
- host->test_uchannel=plcp_uchannel_alloc(PLCP_MODE_FEC);
- if(host->uchannel && host->test_uchannel)
- {
- /* allocation de channel id pour la récéption */
- host->id1=plcp_id_alloc();
- host->id2=plcp_id_alloc();
- host->id3=plcp_id_alloc();
-
- if(host->id1 != PLCP_MAX_CHANNEL_ID && host->id2 != PLCP_MAX_CHANNEL_ID && host->id3 != PLCP_MAX_CHANNEL_ID)
- {
- memcpy(host->mac_addr,mac_addr,6);
- host->id=PLCP_DEFAULT_CHANNEL_ID;
- host->test_id=PLCP_DEFAULT_CHANNEL_ID;
- host->data_gain=PLCP_DEFAULT_OGAIN;
- host->ctrl_gain=PLCP_DEFAULT_OGAIN;
-
- /* default transmit channel */
- uchannel=plcp_get_uchannel_by_id(PLCP_DEFAULT_CHANNEL_ID);
-
- /* on utilise un canal bien séparé pour la transmission */
- if(uchannel)
- {
- plcp_copy_channel(host->uchannel, uchannel);
- plcp_copy_channel(host->test_uchannel, uchannel);
- }
- host->max_slots=PLCP_MAX_SLOTS;
- host->mtu=plcp_get_max_data_len(unit, host->uchannel, PLCP_MAX_SLOTS);
- host->ce_state=CE_STATE_IDLE;
- host->step=0;
- host->no_response=0;
-#ifdef HOST_UNUSED_BANDS
- host->unused_bands=0;
- host->nb_used_bands=unit->nb_bands;
- host->rx_unused_bands=0;
-#endif
- host->nb_ech=0;
- host->clean_table=true;
- host->next_ech=0;
-
- /* pas d'erreur */
- error=false;
- /* indicate that this host is ready */
- host->need_sync=true;
- }
- }
- }
-
- /* traitement des erreurs */
- if(error){
- if(host){
- if(host->uchannel){
- if(host->id1 != PLCP_MAX_CHANNEL_ID)
- plcp_id_free(host->id1);
- if(host->id2 != PLCP_MAX_CHANNEL_ID)
- plcp_id_free(host->id2);
- plcp_uchannel_free(host->uchannel);
- }
- if(host->test_uchannel){
- plcp_uchannel_free(host->test_uchannel);
- }
- plcp_host_free(host);
- host=NULL;
- }
- }
- return host;
-
-}
-
-/* libération de toutes les structures host */
-void plcp_destroy_host(struct plc_drv_unit *unit, struct plcp_host * host)
-{
- struct plcp_uchannel *uchannel;
- /* libération du premier canal de reception */
- if(host->id1 > PLCP_NB_PREFIXED_CHANNEL)
- {
- uchannel=plcp_get_uchannel_by_id(host->id1);
- /* libération éventuelle du uchannel */
- if(uchannel)
- {
- /* break the association between uchannel and id */
- plcp_unlink_uchannel_to_id(uchannel, host->id1);
-
- /* free the channel */
- plcp_uchannel_free(uchannel);
- }
- /* free the id */
- plcp_id_free(host->id1);
- }
- /* libération du deuxième canal de reception */
- if(host->id2 > PLCP_NB_PREFIXED_CHANNEL)
- {
- uchannel=plcp_get_uchannel_by_id(host->id2);
- /* libération éventuelle du uchannel */
- if(uchannel)
- {
- /* break the association between uchannel and id */
- plcp_unlink_uchannel_to_id(uchannel, host->id2);
-
- /* free the channel */
- plcp_uchannel_free(uchannel);
- }
- /* free the id */
- plcp_id_free(host->id2);
- }
- /* libération du deuxième canal de reception */
- if(host->id3 > PLCP_NB_PREFIXED_CHANNEL)
- {
- uchannel=plcp_get_uchannel_by_id(host->id3);
- /* libération éventuelle du uchannel */
- if(uchannel)
- {
- /* break the association between uchannel and id */
- plcp_unlink_uchannel_to_id(uchannel, host->id3);
-
- /* free the channel */
- plcp_uchannel_free(uchannel);
- }
- /* free the id */
- plcp_id_free(host->id3);
- }
-
- /* free transmit channel */
- plcp_uchannel_free(host->uchannel);
- plcp_uchannel_free(host->test_uchannel);
-
- /* free struct host */
- plcp_host_free(host);
-
- host->need_sync=false;
-}
-
-struct plcp_prefixed_uchannel {
- struct pmd_band_quality quality[PMD_MAX_BANDS];
-};
-
-struct plcp_prefixed_uchannel plcp_prefixed_uchannel[PLCP_NB_PREFIXED_CHANNEL]=
-{
- { /* PLCP_CID_NONE */
- {
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 },
- { 0x0, 0x0 }
- }
- },
- { /* PLCP_CID_BSPK */
- {
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 },
- { 0x11111111, 0x11111111 }
- }
- },
- { /* PLCP_CID_QSPK */
- {
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 },
- { 0x22222222, 0x22222222 }
- }
- },
- { /* PLCP_CID_QAM16 */
- {
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 },
- { 0x33333333, 0x33333333 }
- }
- },
- { /* PLCP_CID_QAM64 */
- {
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 }
- }
- },
- { /* PLCP_CID_QAM256 */
- {
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 }
- }
- },
- {
- {
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x44444444, 0x44444444 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 },
- { 0x55555555, 0x55555555 }
- }
- }
-};
-
-#if 0
-/* creation des chanaux predefinis */
-void plcp_build_prefixed_channels(struct plc_drv_unit * unit)
-{
- struct plcp_uchannel * uchannel;
- int band, group, cid, modulation;
-
- /* prefixed channels */
- for(cid=0; cid<PLCP_NB_PREFIXED_CHANNEL; cid++)
- {
- /* get uchannel uchannel */
- uchannel = plcp_get_uchannel_by_id(cid);
- uchannel->used = true;
- modulation = plcp_prefixed_uchannel[cid].modulation;
-
-#ifndef HOST_UNUSED_BANDS
- /* used bands */
- uchannel->unused_bands = 0;
- uchannel->nb_used_bands = unit->nb_bands;
-#endif
-
- /* modulation pour chaque groupe de porteuse */
- for (band=0;band<PMD_MAX_BANDS;band++) {
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- plcp_set_group_modulation(&uchannel->quality[band],
- group, modulation);
- }
- }
-
- /* pilotes pour chaque bande */
- for(band=0; band<PMD_MAX_BANDS;band++) {
- uchannel->pilots[band][0]=plcp_pilots[band][0];
- uchannel->pilots[band][1]=plcp_pilots[band][1];
- }
-
- /* table de lookup pour le channel */
- plcp_build_lookup(unit, uchannel);
- }
-}
-#endif
-
-/* creation des chanaux predefinis */
-void plcp_destroy_prefixed_channels(void)
-{
- struct plcp_uchannel * uchannel;
- uint16_t id;
-
- /* prefixed channels */
- for(id=0; id<PLCP_NB_PREFIXED_CHANNEL; id++)
- {
- uchannel=plcp_get_uchannel_by_id(id);
- /* break association */
- plcp_unlink_uchannel_to_id(uchannel, id);
- /* free the id */
- plcp_id_free(id);
- /* free the uchannel */
- plcp_uchannel_free(uchannel);
- }
-}
-
-/* Default active carriers pilots */
-uint16_t plcp_pilots[PMD_MAX_BANDS][2] =
-{
-/* band 0 */ { 0x14, 0x70 },
-/* band 1 */ { 0x14, 0x70 },
-/* band 2 */ { 0x14, 0x70 },
-/* band 3 */ { 0x14, 0x70 },
-/* band 4 */ { 0x14, 0x70 },
-/* band 5 */ { 0x14, 0x70 },
-/* band 6 */ { 0x14, 0x70 },
-/* band 7 */ { 0x14, 0x70 }
-};
-
-/* Default active carriers pilots */
-uint16_t dsp_pilots[PMD_MAX_BANDS][2] =
-{
-/* band 0 */ { 0x14, 0x14 },
-/* band 1 */ { 0x14, 0x14 },
-/* band 2 */ { 0x14, 0x14 },
-/* band 3 */ { 0x14, 0x14 },
-/* band 4 */ { 0x14, 0x14 },
-/* band 5 */ { 0x14, 0x14 },
-/* band 6 */ { 0x14, 0x14 },
-/* band 7 */ { 0x14, 0x14 }
-};
-
-uint8_t plcp_notchs_bitmap[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND] =
-{
-/* band 0 */ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-/* band 1 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 2 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 3 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 4 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 5 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 6 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF },
-/* band 7 */ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }
-};
-
-/*
- * A bit is set here for each carrier used as pilot
- */
-uint8_t plcp_pilots_bitmap[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-
-
-int plcp_get_group_modulation(
- struct pmd_band_quality *quality,
- int group )
-{
- uint8_t *p = (uint8_t*)&quality->q[0];
- uint8_t mod = *(p+(group/2));
- if (group&1) { /* odd */
- return (int)(mod>>4);
- } else { /* even */
- return (int)(mod&0x0F);
- }
-}
-
-int plcp_set_group_modulation(
- struct pmd_band_quality *quality,
- int group, int nmod
-)
-{
- uint8_t *p = (uint8_t*)&quality->q[0];
- uint8_t *pmod = (p+(group/2));
- uint8_t mod = *pmod;
- if (group&1) { /* odd */
- *pmod = ((uint8_t)nmod << 4) + (mod & 0x0F);
- } else { /* even */
- *pmod = (mod & 0xF0) + ((uint8_t)nmod);
- }
- return 0;
-}
-
-/* build a pilot bitmap with pairs of pilots */
-void plcp_set_pilots_bitmap(uint16_t pilots[PMD_MAX_BANDS][2])
-{
- int band, group, carrier;
- uint8_t bit=1;
- memset(plcp_pilots_bitmap, 0, sizeof(plcp_pilots_bitmap));
- for (band=0;band<PMD_MAX_BANDS;band++) {
-
- /* first pilot */
- carrier = pilots[band][0];
- group = carrier / PMD_CARRIERS_PER_GROUP;
- bit = (carrier % PMD_CARRIERS_PER_GROUP);
- plcp_pilots_bitmap[band][group] |= (1<<bit);
-
- /* second pilot */
- carrier = pilots[band][1];
- group = carrier / PMD_CARRIERS_PER_GROUP;
- bit = (carrier % PMD_CARRIERS_PER_GROUP);
- plcp_pilots_bitmap[band][group] |= (1<<bit);
- }
-}
-
-int plcp_getPilots(struct system_carrier_tab *systemCarrierTab)
-{
- int i;
- int pilot_1 = 20 , pilot_2 = 112;
-
- memset(systemCarrierTab->groupPilot,0,sizeof(systemCarrierTab->groupPilot));
-
- /* The groupPilot tab is per group */
- /* To set a pilot, we must set a bit in the right group */
- for (i=0;i<PMD_MAX_BANDS;i++) {
- if (plcp_pilots[i][0])
- pilot_1 = plcp_pilots[i][0] - 1;
- if (plcp_pilots[i][1])
- pilot_2 = plcp_pilots[i][1] - 1;
- systemCarrierTab->groupPilot[(pilot_1/PMD_CARRIERS_PER_GROUP) + i*PMD_GROUPS_PER_BAND] =
- 1<<(pilot_1%PMD_CARRIERS_PER_GROUP) ;
- systemCarrierTab->groupPilot[(pilot_2/PMD_CARRIERS_PER_GROUP) + i*PMD_GROUPS_PER_BAND] =
- 1<<(pilot_2%PMD_CARRIERS_PER_GROUP) ;
- }
- return 0;
-}
-
-int plcp_getAdapts(struct system_carrier_tab *systemCarrierTab)
-{
- int band,carrier;
-
- for(band=1;band<PMD_MAX_BANDS;band++)
- for(carrier=0;carrier<PMD_CARRIERS_PER_BAND;carrier++)
- systemCarrierTab->carrierAdapt[band*PMD_CARRIERS_PER_BAND+carrier] = pmd_get_adapt(band,carrier);
- return 0;
-}
-
-int plcp_setAdapts(struct system_carrier_tab *systemCarrierTab)
-{
- int band,carrier;
-
- for(band=1;band<PMD_MAX_BANDS;band++)
- for(carrier=0;carrier<PMD_CARRIERS_PER_BAND;carrier++)
- pmd_set_adapt(band, carrier, systemCarrierTab->carrierAdapt[band*PMD_CARRIERS_PER_BAND+carrier]);
- return 0;
-}
-
-struct plcp_host *
-plcp_get_host_by_pos(struct plc_drv_unit *unit,int hostNb);
-
-void mib_set_gain(int hostNb, int gain)
-{
- struct plcp_host * host;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- host = plcp_get_host_by_pos(unit, hostNb);
-
- if (host != NULL) {
- RT_PRINTM(ALWAYS_PRINTED,TRACE_ERROR,"Setting Tx ctrl/data gain at %d\n",gain);
- host->data_gain = gain;
- host->ctrl_gain = gain;
- }
- RT_PRINTM(ALWAYS_PRINTED,TRACE_ERROR,"Setting Tx gain done\n");
-}
-
-void plcp_setHostPilots(enum channel_type type, int hostNb, struct plc_channel *channel)
-{
- int band, idx=0;
- struct plcp_host * host;
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
-
- host = plcp_get_host_by_pos(unit, hostNb);
-
- if (host != NULL) {
-
- if (type == TX_CHANNEL)
- idx = host->uchannel->index;
- for (band=0;band<PMD_MAX_BANDS*2;band+=2) {
- if (idx) {
-/* if(channel->pilots[band]==10)*/
-/* RT_PRINTM(ALWAYS_PRINTED,TRACE_ERROR,"SET on BAND %d\n",band);*/
- host->uchannel->pilots[band/2][0] = channel->pilots[band];
- host->uchannel->pilots[band/2][1] = channel->pilots[band+1];
- plcp_build_lookup(unit, host->uchannel);
-
- }
- else {
- channels[host->id1]->pilots[band/2][0] = channel->pilots[band];
- channels[host->id1]->pilots[band/2][1] = channel->pilots[band+1];
- channels[host->id2]->pilots[band/2][0] = channel->pilots[band];
- channels[host->id2]->pilots[band/2][1] = channel->pilots[band+1];
- channels[host->id3]->pilots[band/2][0] = channel->pilots[band];
- channels[host->id3]->pilots[band/2][1] = channel->pilots[band+1];
- plcp_build_lookup(unit,channels[host->id1]);
- plcp_build_lookup(unit,channels[host->id2]);
- plcp_build_lookup(unit,channels[host->id3]);
- }
- }
- }
-}
-
-int plcp_setPilots(struct system_carrier_tab *systemCarrierTab)
-{
- int band, group, pilot, val;
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
-
- plcp_lock(unit);
- /* The groupPilot tab is per group */
- /* To set a pilot, we must set a bit in the right group */
- for (band=0, pilot=0;band<PMD_MAX_BANDS;band++,pilot=0)
- for (group=0;group<PMD_GROUPS_PER_BAND;group++)
- if (systemCarrierTab->groupPilot[band*PMD_GROUPS_PER_BAND + group]) {
- plcp_pilots[band][pilot] = group * PMD_CARRIERS_PER_GROUP;
- val = systemCarrierTab->groupPilot[band*PMD_GROUPS_PER_BAND + group];
- while (val) {
- plcp_pilots[band][pilot]++;
- val = val>>1;
- }
- pilot = 1;
- }
-
- plcp_unlock(unit);
- return 0;
-}
-
-int plcp_getNotchs(struct system_carrier_tab *systemCarrierTab)
-{
- memcpy(systemCarrierTab->groupNotch, plcp_notchs_bitmap,sizeof(plcp_notchs_bitmap));
-
-#if 0
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if (!band_is_used(unit,band)) {
- memset(&systemCarrierTab->groupNotch[band*PMD_GROUPS_PER_BAND], 0xFF,PMD_GROUPS_PER_BAND);
- }
- }
-#endif
- return 0;
-}
-
-int plcp_setBands(int mask)
-{
- int band;
-#ifndef __KERNEL__
- mib_mib *mib;
-#endif
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
-
- plcp_lock(unit);
-
- unit->used_bands = mask;
-
-#ifndef __KERNEL__
- mib = mibGetCopy();
- memcpy(mib->plc.plcTable[0].systemCarrierTab.groupNotch, plcp_notchs_bitmap,sizeof(plcp_notchs_bitmap));
- /* If a whole band is notched then don't notch this band BUT don't used it */
- for(band=1;band<PMD_MAX_BANDS;band++) {
- if(!(unit->used_bands & (1<<band))) {
- memset(&(mib->plc.plcTable[0].systemCarrierTab.groupNotch[band*PMD_GROUPS_PER_BAND]), 0xFF,PMD_GROUPS_PER_BAND);
- }
- else {
- memset(&(mib->plc.plcTable[0].systemCarrierTab.groupNotch[band*PMD_GROUPS_PER_BAND]), 0,PMD_GROUPS_PER_BAND);
- mib->plc.plcTable[0].systemCarrierTab.groupNotch[band*PMD_GROUPS_PER_BAND] = 0xFF;
- mib->plc.plcTable[0].systemCarrierTab.groupNotch[((band+1)*PMD_GROUPS_PER_BAND) -1] = 0xFF;
- }
- }
- memcpy(plcp_notchs_bitmap, mib->plc.plcTable[0].systemCarrierTab.groupNotch,sizeof(plcp_notchs_bitmap));
- mibCommit(mib);
-#endif
-
- pmd_set_notchs(plcp_notchs_bitmap);
- plcp_unlock(unit);
- return 0;
-}
-
-int plcp_setNotchs(struct system_carrier_tab *systemCarrierTab)
-{
- int band;
- int group;
- int mask = 0;
- int nbNotchPerBand;
- struct plc_drv_unit *unit = plc_drv_get_unit(0); /* FIXME */
- plcp_lock(unit);
-
- /* If a whole band is notched then don't notch this band BUT don't used it */
- for(band=1;band<PMD_MAX_BANDS;band++) {
- nbNotchPerBand = 0;
- for(group=0;group<PMD_GROUPS_PER_BAND;group++)
- nbNotchPerBand += systemCarrierTab->groupNotch[band*PMD_GROUPS_PER_BAND+group];
- if (nbNotchPerBand != (PMD_GROUPS_PER_BAND*255)) /* Band not all notched */
- mask |= (1<<band); /* band is used */
- }
- unit->used_bands = mask;
-
- memcpy(plcp_notchs_bitmap, systemCarrierTab->groupNotch,sizeof(plcp_notchs_bitmap));
- pmd_set_notchs(plcp_notchs_bitmap);
- plcp_unlock(unit);
- return 0;
-}
-
-int plcp_setAck(bool mode) { return 0; }
-bool shell_plcGetAck(int argc, char *argv[]) { return 0; }
-
-
-int plcp_get_group_carriers_count(int band, int group)
-{
- uint8_t notch;
- notch = plcp_notchs_bitmap[band][group] | plcp_pilots_bitmap[band][group];
-#if 0
- RT_PRINTM(TRACE_PLCP,TRACE_INFO,
- "band=%d group=%d notch bitmap=%x "
- "pilots bitmap=%x combined=%x carriers=%d\n",
- band, group,
- plcp_notchs_bitmap[band][group],
- plcp_pilots_bitmap[band][group],
- notch, byte_zeroes(notch));
-#endif
- return byte_zeroes(notch);
-#if 0
- n = PMD_CARRIERS_PER_GROUP;
- for (i=0;i<PMD_CARRIERS_PER_GROUP;i++) {
- n = n - (notch & 1);
- notch = (notch >> 1);
- }
- return n;
-#endif
-}
-
-/*
- * Compute the number of bits per slot
- */
-int plcp_get_control_bits_per_slot(struct plc_drv_unit *unit) {
-
- int b, n, band, group;
- int bits_per_slot;
-
- /* build bitmap */
- plcp_set_pilots_bitmap(plcp_pilots);
-
- b = pmd_get_mod_bits_per_slot(unit->control_modulation);
- bits_per_slot = 0;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (!band_is_used(unit,band))
- continue;
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- n = plcp_get_group_carriers_count(band, group);
- bits_per_slot += ( b * n );
- }
- }
- return bits_per_slot;
-}
-
-
-/*
- * Compute the number of slots for RX/TX control
- *
- * Figure 1. PLCP Frame with 2 control slots.
- *
- * slot 1 slot 2 slot 3 slot 4 slot 5
- *
- * band 1 ref header header ref payload
- * symbol symbol 1 symbol 4 symbol symbol 1
- *
- * band 2 ref header header ref payload
- * symbol symbol 2 symbol 5 symbol symbol 2
- *
- * band 3 ref header header ref payload
- * symbol symbol 3 symbol 6 symbol symbol 3
- *
- * A frame always starts at slot 1 (no slot 0).
- *
- */
-
-int plcp_get_control_slots(
- struct plc_drv_unit *unit,
- int control_len, /* bytes */
- int *control_symbols,
- uint16_t *control_slots,
- int *dsp_rpr /* position of second reference symbol */ )
-{
- int mod, b, n, band, group, bits, control_bits;
- int bits_per_slot;
- int symbols_per_band[PMD_MAX_BANDS];
- int slots;
- int min_bits_per_symbol = 255;
-
- /* Compute size of control data in bits (PHLIC triplicates control data) */
- control_bits = control_len * 8 * (unit->plcp.config.vote ? 3 : 1);
-
- /* build bitmap */
- plcp_set_pilots_bitmap(plcp_pilots);
-
- /* Compute the number of bits that each band can send in one symbol */
- slots = 0;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- bits = 0;
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- mod = unit->control_modulation;
- b = pmd_get_mod_bits_per_slot(mod);
- n = plcp_get_group_carriers_count(band, group);
- bits += (b * n);
- RT_PRINTM(TRACE_PLCP,TRACE_INFO,
- "(control) band %d, group %d, "
- "mod = %d (%d bits), carriers=%d\n",
- band, group, mod, b, n );
- }
-
- if (bits) {
- unit->control_bits_per_band[band] = bits;
- if (bits<min_bits_per_symbol) {
- min_bits_per_symbol = bits;
- }
- symbols_per_band[band] = (control_bits + bits - 1) / bits;
- if (symbols_per_band[band]>slots) {
- slots = symbols_per_band[band];
- }
- }
- } /* band_is_used */
- }
- *control_slots = slots;
-
- /*
- * Compute number of symbols required to transmit an ARABICA block
- */
- unit->block_slots = unit->plcp.config.vote ?
- ((3*PLCP_BLOCK_SIZE*8+min_bits_per_symbol-1)/min_bits_per_symbol):
- ((PLCP_BLOCK_SIZE*8+min_bits_per_symbol-1)/min_bits_per_symbol);
-
- control_bits = control_len * 8 * (unit->plcp.config.vote ? 3 : 1);
-
- if (force_ctrl_slots) {
- *control_slots = force_ctrl_slots;
- }
- /*
- * For each band, PHLIC decrements a counter to know if enough
- * symbols have been sent/received. Therefore, we need to
- * multiply the control_symbols (which is a duration), by the
- * number of bands.
- */
- *control_symbols = *control_slots * unit->nb_bands;
-
- /* PHLIC inserts one reference symbol before and after control data. */
- /* *dsp_rpr = 1 + *control_slots + 1; */
- *dsp_rpr = unit->plcp.config.nb_ref_head;
-
-
- RT_PRINTM(TRACE_PLCP,TRACE_DEBUG,
- "control: %d bits (%d bytes) %d bits/slots "
- "(%d bytes) %d slots x %d bands = %d symbols, dsp_rpr = %d\n",
- control_bits, control_len, bits_per_slot, bits_per_slot/8,
- *control_slots, unit->nb_bands, *control_symbols, *dsp_rpr);
-
- return 0;
-}
-
-void plcp_build_lookup(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel ) {
-
- int mod, b, n, band, group, bits, bits_per_slot;
-
- bits_per_slot=0;
-
- /* build bitmap */
- //plcp_set_pilots_bitmap(uchannel->pilots); uchannel->pilots are only for DSP
- plcp_set_pilots_bitmap(plcp_pilots);
-
- /* Compute the number of bits that each band can send in one symbol */
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- bits = 0;
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- mod = plcp_get_group_modulation(
- &uchannel->quality[band], group);
- b = pmd_get_mod_bits_per_slot(mod);
- n = plcp_get_group_carriers_count(band, group);
- bits += (b * n);
- RT_PRINTM(TRACE_PLCP,TRACE_INFO,
- "band %d, group %d, mod = %d (%d bits), carriers=%d\n",
- band, group, mod, b, n );
- }
- uchannel->bits_per_band[band] = bits;
- bits_per_slot += bits;
- RT_PRINTM(TRACE_PLCP,TRACE_INFO,
- "bits_per_band[%d] = %d\n",
- band, uchannel->bits_per_band[band]);
- }
- }
-
- uchannel->lookup.bits_per_slot = bits_per_slot;
- uchannel->ops->build_lookup(unit, uchannel);
-}
-
-void plcp_rebuild_channels(struct plc_drv_unit *unit) {
-
- int i;
- struct plcp_uchannel *uchannel;
-
- for(i=0; i<PLCP_MAX_UCHANNEL; i++) {
- uchannel = &uchannels_pool[i];
-
-#ifndef HOST_UNUSED_BANDS
- if (i<PLCP_NB_PREFIXED_CHANNEL) {
- /* used bands */
- uchannel->unused_bands = 0;
- uchannel->nb_used_bands = unit->nb_bands;
- }
-#endif
-
- if (uchannel->used){
- /* apply current pilots */
- /*memcpy(uchannel->pilots, plcp_pilots, sizeof(plcp_pilots));*/
- plcp_build_lookup(unit, uchannel);
- }
- }
-}
-
-#define RATE(rate) \
- (rate<1024?rate:\
- (rate<(1024*1024)?(rate/1024):\
- (rate/(1024*1024)) \
- )),\
- (rate<1024?"bps":\
- (rate<(1024*1024)?"Kbps":\
- "Mbps"))
-
-
-char band_str[2048];
-
-void plcp_dump_uchannel(
- struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel )
-{
- int band, group;
- int mod;
- int slice, payload_slots, control_slots, slots;
- float phy_rate, avail_phy_rate, plcp_rate;
- int notchs, pilots;
-
- char *b = band_str;
-
- /* build bitmap */
- plcp_set_pilots_bitmap(uchannel->pilots);
-
- printf("mode ........... %d (%s)\n", uchannel->mode,
- ((uchannel->mode == PLCP_MODE_CONTROL) ? "control" :
- (uchannel->mode == PLCP_MODE_FEC) ? "FEC" :
- (uchannel->mode == PLCP_MODE_ROBUST_FEC) ? "robust FEC" :
- (uchannel->mode == PLCP_MODE_3FEC) ? "3FEC" :
- "unknown"));
-
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (!band_is_used(unit,band))
- continue;
-
- b += sprintf(b, "b%d:", band);
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- mod = plcp_get_group_modulation(
- &uchannel->quality[band], group);
-
- notchs = plcp_notchs_bitmap[band][group];
- pilots = plcp_pilots_bitmap[band][group];
-
- if (((notchs+pilots)==0xff) || (mod==0)) {
- *b++ = '-';
- } else {
- *b++ = '0'+mod;
- }
-
- if (notchs) {
- *b++ = 'n';
- } else {
- *b++ = ' ';
- }
-
- if (pilots) {
- *b++ = 'p';
- } else {
- *b++ = ' ';
- }
- *b++ = ' ';
- }
- b += sprintf(b, " (%d bits)\r\n", uchannel->bits_per_band[band]);
- }
- printf("%s",band_str);
- printf("bits/symbols = %d\r\n", uchannel->lookup.bits_per_slot);
-
- phy_rate = ((float)units->nb_bands*8*PMD_CARRIERS_PER_BAND*1000000)/36;
- printf("theorical PHY rate = %.2f %s "
- "(%d bands, no notch, all carriers QAM256)\r\n",
- RATE(phy_rate), unit->nb_bands);
-
- avail_phy_rate = (float)uchannel->lookup.bits_per_slot*1000000/36;
- avail_phy_rate = (avail_phy_rate * 224 * 8) / (241 * 12);
- printf("available PHY rate = %.2f %s "
- "(%d bands, with notchs, modulations, FEC)\r\n",
- RATE(avail_phy_rate), unit->nb_bands);
-
-
- printf("\n%12s%12s%12s%12s%12s\r\n",
- "slices","bytes","symbols","payload slots", "raw rate", "plcp rate");
-
- for (slice=0; slice<=PLCP_MAX_SLICES; slice ++) {
- control_slots = unit->plcp.config.n_slots;
- payload_slots = uchannel->lookup.payload_slots[slice] +
- uchannel->lookup.periodic_ref_slots[slice];
- /* FIXME : should be slots */
- slots = plcp_get_fmode(unit)->fm_efr(unit, 0, uchannel, slice);
- slots += unit->plcp.config.nb_calibrate;
- plcp_rate = (avail_phy_rate * uchannel->lookup.payload_slots[slice]) / slots;
- printf("%12d%12d%12d%12d%12.2f %s\r\n",
- slice,
- slice*PMD_SLICE_SIZE,
- uchannel->lookup.payload_slots[slice] * uchannel->nb_used_bands,
- payload_slots,
- RATE(plcp_rate));
- }
-}
-
-
-void plcp_Xdump_uchannel(
- struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel,
- int mix )
-{
- int band, group;
- int mod;
- int notchs, pilots;
-
- char *b = band_str;
-
- /* build bitmap */
- plcp_set_pilots_bitmap(uchannel->pilots);
-
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (!band_is_used(unit,band))
- continue;
-
- b += sprintf(b, "b%d:", band);
- for (group=0;group<PMD_GROUPS_PER_BAND;group++) {
- mod = plcp_get_group_modulation(
- &uchannel->quality[band], group);
-
- notchs = plcp_notchs_bitmap[band][group];
- pilots = plcp_pilots_bitmap[band][group];
-
- if (((notchs+pilots)==0xff) || (mod==0)) {
- *b++ = '-';
- } else {
- *b++ = '0'+mod;
- }
-
- if (notchs) {
- *b++ = 'n';
- }
-
- if (pilots) {
- *b++ = 'p';
- }
- *b++ = ' ';
-
-#if 0
- for (carrier=0;carrier<PMD_CARRIERS_PER_GROUP;
- carrier++) {
- if ((notch&1) || (!band_is_used(unit,band))){
- *b++ = '-';
- } else {
- *b++ = '0' + bits;
- }
- notch = (notch >> 1);
- }
-
- if ((group%8)==7) {
- b += sprintf(b, "\n ", band);
- } else {
- *b++ = ' ';
- }
-#endif
- }
- b += sprintf(b, " (%d bits)\r\n", uchannel->bits_per_band[band]);
- }
-
-#if 0
- printf("%s",band_str);
- printf("bits/symbols = %d\r\n", uchannel->lookup.bits_per_slot);
-
- phy_rate =
- ((float)units->nb_bands*8
- *PMD_CARRIERS_PER_BAND*1000000)/36;
-
- printf("theorical PHY rate = %.2f %s "
- "(%d bands, no notch, all carriers QAM256)\r\n",
- RATE(phy_rate), unit->nb_bands);
-
- avail_phy_rate = (float)uchannel->lookup.bits_per_slot*1000000/36;
- avail_phy_rate = (avail_phy_rate * 224 * 8) / (241 * 12);
- printf("available PHY rate = %.2f %s "
- "(%d bands, with notchs, modulations, FEC)\r\n",
- RATE(avail_phy_rate), unit->nb_bands);
-
- slice = (1514*mix+223)/224;
- payload_slots = uchannel->lookup.slice_slots[slice];
- control_slots =
- slots = uchannel->lookup.slice_slots[slice] + 1;
- plcp_rate = (avail_phy_rate * payload_slots) / slots;
-
- printf("PLCP rate = %.2f %s "
- "(%d bands, with PLCP overhead, average of %d frames)\r\n",
- RATE(plcp_rate), unit->nb_bands, mix);
-
- slice = (((1514+32)*mix)+223)/224;
- payload_slots = (uchannel->lookup.slice_slots[slice]-unit->plcp.config.n_slots);
-
- slice_ack = (32*mix+223)/224;
- slots =
- ((uchannel->lookup.slice_slots[slice]+1)+(uchannel->lookup.slice_slots[slice_ack]+1));
-
- mac_rate = (avail_phy_rate * payload_slots) / slots;
- printf("MAC rate = %.2f %s "
- "(%d bands, with MAC overhead, average of mix frames, 1 symbol gap)\r\n",
- RATE(mac_rate), unit->nb_bands);
-
- printf("\n%12s%12s%12s%12s%12s\r\n",
- "slices","bytes","symbols","efr","plcp rate");
-
- for (slice=0; slice<=PLCP_MAX_SLICES; slice ++) {
- plcp_rate = (avail_phy_rate *
- (uchannel->lookup.slice_slots[slice]-unit->plcp.config.n_slots))
- / uchannel->lookup.slice_slots[slice];
- printf("%12d%12d%12d%12d%12.2f %s\r\n",
- slice,
- slice*PMD_SLICE_SIZE,
- uchannel->lookup.symbols[slice],
- uchannel->lookup.slice_slots[slice],
- RATE(plcp_rate));
- }
-#endif
-}
-
-
-void plcp_set_group_notchs(int band, int group, uint8_t notchs) {
- plcp_notchs_bitmap[band][group] = notchs;
- pmd_set_group_notchs(band, group, notchs);
-}
-
-void mib_set_channel(enum channel_type type, int hostNb, struct plc_channel *channel)
-{
- struct plcp_host * host;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- int i;
- uint8_t *qual_ptrTx = 0;
- uint8_t *qual_ptrRx1 = 0;
- uint8_t *qual_ptrRx2 = 0;
- uint8_t *qual_ptrRx3 = 0;
-
- host = plcp_get_host_by_pos(unit, hostNb);
- if (host != NULL) {
- if (type == TX_CHANNEL){
- memcpy(host->uchannel->quality, channel->modulation, PMD_MAX_BANDS*PMD_GROUPS_PER_BAND/2);
- qual_ptrTx = (uint8_t*)host->uchannel->quality;
- }
- else {
- memcpy(channels[host->id1]->quality, channel->modulation, PMD_MAX_BANDS*PMD_GROUPS_PER_BAND/2);
- memcpy(channels[host->id2]->quality, channel->modulation, PMD_MAX_BANDS*PMD_GROUPS_PER_BAND/2);
- memcpy(channels[host->id3]->quality, channel->modulation, PMD_MAX_BANDS*PMD_GROUPS_PER_BAND/2);
- qual_ptrRx1 = (uint8_t*)channels[host->id1]->quality;
- qual_ptrRx2 = (uint8_t*)channels[host->id2]->quality;
- qual_ptrRx3 = (uint8_t*)channels[host->id3]->quality;
- }
-
- for (i=0;i<sizeof(channel->modulation);i++) {
- if (qual_ptrTx) {
- qual_ptrTx[i] = ((qual_ptrTx[i] & 0xF0)>>4) |
- ((qual_ptrTx[i] & 0x0F)<<4);
- }
- if (qual_ptrRx1) {
- qual_ptrRx1[i] = ((qual_ptrRx1[i] & 0xF0)>>4) |
- ((qual_ptrRx1[i] & 0x0F)<<4);
- }
- if (qual_ptrRx2) {
- qual_ptrRx2[i] = ((qual_ptrRx2[i] & 0xF0)>>4) |
- ((qual_ptrRx2[i] & 0x0F)<<4);
- }
- if (qual_ptrRx3) {
- qual_ptrRx3[i] = ((qual_ptrRx3[i] & 0xF0)>>4) |
- ((qual_ptrRx3[i] & 0x0F)<<4);
- }
- }
- plcp_build_lookup(unit, host->uchannel);
- plcp_build_lookup(unit, channels[host->id1]);
- plcp_build_lookup(unit, channels[host->id2]);
- plcp_build_lookup(unit, channels[host->id3]);
- }
-}
-
-uint8_t dataRateFromBytePerSlot(uint32_t byte_per_slot)
-{
- uint32_t data_rate;
-
- data_rate = (66.118*byte_per_slot) + 408.55;
- data_rate /= 1024;
- if (data_rate > 100)
- data_rate = 99;
-
- return (uint8_t)data_rate;
-}
-
-#ifndef __KERNEL__
-void mib_get_channel(enum channel_type type, struct plcp_host *host, struct plcp_uchannel *uchannel, struct plc_channel *channel)
-{
- int i,j;
- uint32_t byte_per_slot;
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- channel->type = type;
- channel->index = host->index;
-
- memcpy(channel->modulation, uchannel->quality, PMD_MAX_BANDS*PMD_GROUPS_PER_BAND/2);
-
- byte_per_slot = plcp_estim_quality(unit,uchannel->quality);
- channel->bandwidth = dataRateFromBytePerSlot(byte_per_slot);
-
- for (i=0;i<sizeof(channel->modulation);i++) {
- channel->modulation[i] = ((channel->modulation[i] & 0xF0)>>4) |
- ((channel->modulation[i] & 0x0F)<<4);
- }
-
-
- /* if band is not used */
- for (i=0;i<PMD_MAX_BANDS;i++)
- if (!band_is_used(unit, i))
- memset(&channel->modulation[i*PMD_GROUPS_PER_BAND/2], 0, PMD_GROUPS_PER_BAND/2);
-
-
- memset(channel->pilots,0,sizeof(channel->pilots));
- for (i=0,j=0;i<PMD_MAX_BANDS*2;i+=2,j++) {
- /* channel->pilots[i] = plcp_pilots[j][0];*/
- /* channel->pilots[i+1] = plcp_pilots[j][1];*/
- /* if(uchannel->pilots[j][0]==10)*/
- /* RT_PRINTM(ALWAYS_PRINTED,TRACE_ERROR,"GET on BAND %d:%d\n",j,i);*/
- channel->pilots[i] = (uchannel->pilots[j][0])?uchannel->pilots[j][0]:2;
- channel->pilots[i+1] = (uchannel->pilots[j][1])?uchannel->pilots[j][1]:126;
- }
-}
-
-int mib_ce_host(int hostNb, struct plc_host *plcHost)
-{
- int band, group, carrier;
- struct plcp_host * host;
- struct plcp_uchannel *uchannel;
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
-
- host = plcp_get_host_by_pos(unit, hostNb);
-
- if (host != NULL) {
- memcpy(plcHost->mac_address, host->mac_addr,6);
- plcHost->gain = host->data_gain;
- plcHost->avgNoise = (uint16_t)host->glomer;
- plcHost->mtu = host->mtu;
- plcHost->automatic = unit->neighbour.started;
-
- /* TX channel*/
- mib_get_channel(TX_CHANNEL, host, host->uchannel, &plcHost->tx_channel);
-
- /* RX channel*/
- mib_get_channel(RX_CHANNEL, host, plcp_get_uchannel_by_id(host->id1), &plcHost->rx_channel);
-
- /* RX last channel*/
- uchannel = plcp_get_uchannel_by_id(host->id2);
- if(uchannel)
- mib_get_channel(RX_LAST_CHANNEL, host, uchannel, &plcHost->rx_last_channel);
- else
- mib_get_channel(RX_LAST_CHANNEL, host, plcp_get_uchannel_by_id(host->id1), &plcHost->rx_last_channel);
-
-
- for(band=0; band<PMD_MAX_BANDS; band++)
- for(carrier=0; carrier<PMD_CARRIERS_PER_BAND; carrier++) {
- if ((unit->stats.ber.payload_invalid[band][carrier] + unit->stats.ber.payload_valid[band][carrier])!= 0)
- plcHost->ber[band*PMD_CARRIERS_PER_BAND+carrier] =
- ((unit->stats.ber.payload_invalid[band][carrier] * 10000) /
- (unit->stats.ber.payload_invalid[band][carrier] + unit->stats.ber.payload_valid[band][carrier]));
- else
- plcHost->ber[band*PMD_CARRIERS_PER_BAND+carrier] = 0;
- if ((plcp_notchs_bitmap[band][group] & (1<<carrier)) || (!band_is_used(unit, band))) {
- plcHost->noise[band*PMD_CARRIERS_PER_BAND+carrier] = 0;
- plcHost->ber[band*PMD_CARRIERS_PER_BAND+carrier] = 0;
- plcHost->signal[band*PMD_CARRIERS_PER_BAND+carrier] = 0;
- }
- else {
- plcHost->noise[band*PMD_CARRIERS_PER_BAND+carrier] = unit->stats.ce.noise[band][carrier/8];
-#ifdef SPIDMONITOR_173_USED
- plcHost->signal[band*PMD_CARRIERS_PER_BAND+carrier] = unit->stats.ce.amp[band][carrier] * 100;
-#else
- plcHost->signal[band*PMD_CARRIERS_PER_BAND+carrier] = unit->stats.ce.amp[band][carrier];
-#endif
- }
- }
- return 0;
- }
- else {
- RT_PRINTM(TRACE_SNMP,TRACE_ERROR,"TOTO\n");
- return 0;
- }
-}
-#endif
-
-int plcp_isPilot(int band, int carrier)
-{
- return((plcp_pilots[band][0] == carrier) || (plcp_pilots[band][1] == carrier));
-}
-
-int plcp_isNotch(int band, int carrier)
-{
- return ((((plcp_notchs_bitmap[band][carrier/PMD_CARRIERS_PER_GROUP]) & (1<<carrier))!=0)?1:0);
-}
-
-int plcp_channel_open(struct plc_drv_unit *unit) {
-
- struct plcp_uchannel * uchannel;
- uint16_t cid, id;
- int mode;
- int band, group, modulation;
-
- /* prefixed channels */
- for(cid=0; cid<PLCP_NB_PREFIXED_CHANNEL; cid++)
- {
- /* allocate an identifier */
- id=plcp_id_alloc();
- ASSERT(id == cid);
- mode = PLCP_MODE_FEC;
- /* allocate a uchannel */
- uchannel=plcp_uchannel_alloc(mode);
- /* create an association between the uchannel and the id */
- plcp_link_uchannel_to_id(uchannel, cid);
-
- uchannel->used = true;
- /* modulation for each carrier group */
- for (band=0;band<PMD_MAX_BANDS;band++) {
- uchannel->quality[band] = plcp_prefixed_uchannel[cid].quality[band];
- }
-
- /* pilots for each band */
- if(cid > 2){ /* qam16, qam64, qam256 */
- for(band=0; band<PMD_MAX_BANDS;band++) {
- uchannel->pilots[band][0]=plcp_pilots[band][0];
- uchannel->pilots[band][1]=plcp_pilots[band][1];
- }
- } else { /* none, bpsk, qpsk */
- for(band=0; band<PMD_MAX_BANDS;band++) {
- uchannel->pilots[band][0]=plcp_pilots[band][0];
- uchannel->pilots[band][1]=plcp_pilots[band][0];
- }
- }
- }
- return 0;
-}
-
-/* estimate the quality of a band */
-int plcp_estim_band_quality(struct pmd_band_quality *quality, int band_no)
-{
- int group, bits, mod;
- int b;
- uint8_t notchs;
-
- bits = 0;
- for (group=0; group<PMD_GROUPS_PER_BAND; group++)
- {
- mod = plcp_get_group_modulation(quality, group);
- b = pmd_get_mod_bits_per_slot(mod);
-
- /* vérifier si le groupe contient que des notch */
- notchs =plcp_notchs_bitmap[band_no][group];
- bits += (byte_zeroes(notchs)*b);
- }
-#if 0
- if(notchs != 0xff){
- if(mod == PLC_MOD_QAM256)
- estim += 8;
- else if(mod == PLC_MOD_QAM64)
- estim += 6;
- else if(mod == PLC_MOD_QAM16)
- estim += 4;
- else if(mod == PLC_MOD_QPSK)
- estim += 2;
- else if(mod == PLC_MOD_BPSK)
- estim += 1;
- }
- }
-#endif
- return bits;
-}
-
-/* estimate quality */
-int plcp_estim_quality(struct plc_drv_unit * unit, struct pmd_band_quality qual[PMD_MAX_BANDS])
-{
- int band, bits;
-
- bits=0;
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- bits += plcp_estim_band_quality(&qual[band], band);
- }
- }
- return (bits/8);
-}
-
diff --git a/app/sm-emac-drv/src/plcp_fmode.c b/app/sm-emac-drv/src/plcp_fmode.c
deleted file mode 100755
index 7acf39d644..0000000000
--- a/app/sm-emac-drv/src/plcp_fmode.c
+++ /dev/null
@@ -1,1609 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#include "time.h"
-#endif
-
-#include "platform.h"
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-#ifndef softOSE
-#include "gpio.h"
-#endif
-#include "lib_if.h"
-#include "math.h"
-
-static int __cap_start(struct plc_drv_unit *unit);
-static int __p_start(struct plc_drv_unit *unit);
-static int __ener_start(struct plc_drv_unit *unit);
-
-static int __cap_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices);
-static int __p_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices);
-
-static int __write(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-static int __ener_write(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-
-static int __ener_tx_start(struct plc_drv_unit *, struct plcp_frame *, uint16_t);
-static void __tx_more_isr(int proto, int flow);
-static void __p_tx_more_isr(int proto, int flow);
-static int __tx_more(struct plc_drv_unit *unit, uint16_t date);
-
-static void __tx_data_isr(int proto, int flow);
-
-static void __tx_end_isr(int proto, int flow);
-static void __ener_tx_end_isr(int proto, int flow);
-
-static void __tx_end(struct plc_drv_unit *unit);
-
-static bool __start_tmo(struct plc_drv_unit *unit, uint16_t date);
-static bool __stop_tmo(struct plc_drv_unit *unit);
-
-static void __cap_status(struct plc_drv_unit *unit);
-static void __scap_status(struct plc_drv_unit *unit);
-static void __p_status(struct plc_drv_unit *unit);
-static void __ener_status(struct plc_drv_unit *unit);
-
-static void __ener_idle(struct plc_drv_unit *unit);
-
-static void __busy_isr(int proto, int flow);
-static void __p_busy_isr(int proto, int flow);
-static int __cap_busy(struct plc_drv_unit *unit, uint16_t date);
-static int __scap_busy(struct plc_drv_unit *unit, uint16_t date);
-static int __scap_busy_freeze_agc(struct plc_drv_unit *unit, uint16_t date);
-static int __p_busy(struct plc_drv_unit *unit, uint16_t date);
-
-static void __rx_start_isr(int proto, int flow);
-static void __rx_data_isr(int proto, int flow);
-
-static int __cap_rx_more(struct plc_drv_unit *unit, uint16_t date);
-static int __scap_rx_more(struct plc_drv_unit *unit, uint16_t date);
-static int __no_rx_more(struct plc_drv_unit *unit, uint16_t date);
-
-static void __rx_end_isr(int proto, int flow);
-static int __rx_end(struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static int __p_rx_end(struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static int __ener_rx_end(struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static void __fake_rx_end(struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-
-static void __eof_isr(int proto, int flow);
-static void __tmo1_isr(int proto, int flow);
-static void __tmo2_isr(int proto, int flow);
-
-static int __mtu(struct plc_drv_unit *unit,
- struct plcp_uchannel * uchannel, int slots);
-static int __p_mtu(struct plc_drv_unit *unit,
- struct plcp_uchannel * uchannel, int slots);
-
-static void __write_control(struct plc_drv_unit *, struct plcp_frame *);
-static void __ener_write_control(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-
-static void __drop(struct plc_drv_unit *unit, uint16_t date);
-static void __scap_drop(struct plc_drv_unit *unit, uint16_t date);
-static void __p_drop(struct plc_drv_unit *unit, uint16_t date);
-
-
-static void __set_leds(struct plc_drv_unit *unit) {
-
- static int __leds[PLCP_NB_STATE][5] = {
- /* 0, 0, 0, 0, RED */
- { 0, 0, 0, 0, 0 }, /* PLCP_STATE_IDLE */
- { 0, 0, 0, 0, 1 }, /* PLCP_STATE_TX_REQ */
- { 0, 1, 0, 0, 1 }, /* PLCP_STATE_TX_CTRL */
- { 0, 0, 1, 0, 1 }, /* PLCP_STATE_TX_BLOCK */
- { 0, 0, 0, 1, 1 }, /* PLCP_STATE_TX_DATA */
- { 0, 1, 0, 0, 0 }, /* PLCP_STATE_RX_CTRL */
- { 0, 0, 1, 0, 0 }, /* PLCP_STATE_RX_BLOCK */
- { 0, 0, 0, 1, 0 }, /* PLCP_STATE_RX_DATA */
- { 0, 1, 1, 0, 0 }, /* PLCP_STATE_DROP */
- { 0, 0, 1, 1, 0 } /* PLCP_STATE_DROP_DATA */
- };
-
- led(1, __leds[unit->plcp.state][1]);
- led(2, __leds[unit->plcp.state][2]);
- led(3, __leds[unit->plcp.state][3]);
- led(4, __leds[unit->plcp.state][4]);
-}
-
-static void __set_state(struct plc_drv_unit *unit, int state) {
- unit->plcp.state = state;
- //__set_leds(unit);
-}
-
-int __p_last_efr = PMD_MAX_FRAME_SLOTS;
-struct plcp_frame *plcp_pending_tx_frame = NULL;
-
-struct plcp_fmode plcp_fmodes[PLCP_NB_FMODE] = {
- { /* PLCP_FMODE_ENER */
- "ENER",
- __ener_start,
- __p_efr,
- __ener_write,
- __start_tmo,
- __stop_tmo,
- {
- __rx_start_isr,
- __rx_data_isr,
- __rx_end_isr,
- __tx_data_isr,
- __ener_tx_end_isr,
- __p_tx_more_isr,
- __p_busy_isr,
- __eof_isr,
- __tmo1_isr,
- __tmo2_isr
- },
- __ener_status,
- __ener_idle, /* idle */
- __p_busy, /* busy is handled as an rx_start */
- NULL,
- __no_rx_more, /* no rx_more */
- __ener_rx_end,
- __ener_tx_start,
- __ener_write_control,
- __p_mtu,
- __p_drop
- }
-};
-
-void __set_control_power(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- uint8_t mask;
- uint8_t ctrl_mask;
- int band;
- uint16_t gain;
-
- double power_ref;
- double power_ctrl;
- struct plcp_uchannel *control_uchannel;
-
-
- mask = unit->used_bands;
-
- control_uchannel = plcp_get_uchannel_by_id(unit->control_modulation);
-
-#ifdef FEATURE_ENERVATION
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if ((1<<band) & mask) {
- pmd_enable_mod(band,unit->control_modulation);
- } else {
- pmd_disable_mod(band,unit->control_modulation);
- }
- }
- gain = pframe->ctrl_gain;
- PLCP_LOG(0, "control gain (all bands) ", gain);
-#else
- /* power on all bands */
- switch (unit->plcp.config.control_power) {
- case POWER_SINGLE_BAND :
- mask &= ~(pframe->uchannel->unused_bands);
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if ((1<<band) & mask) {
- pmd_enable_mod(band,unit->control_modulation);
- mask = 0;
- ctrl_mask = (1<<band);
- } else {
- pmd_disable_mod(band,unit->control_modulation);
- }
- }
- power_ref = ce_estim_power(control_uchannel->quality, unit->used_bands);
- power_ctrl = ce_estim_power(control_uchannel->quality, ctrl_mask);
- if ((double)power_ctrl>(double)0) {
- gain=(uint16_t)((double)pframe->ctrl_gain*sqrt(power_ref/power_ctrl));
- PLCP_LOG(0, "control gain adjusted (single band)", gain);
- } else {
- gain=max_gain_per_band[1];
- PLCP_LOG(0, "control gain defaulted to max (single band)", gain);
- }
- break;
-
- case POWER_USED_BANDS :
- mask &= ~(pframe->uchannel->unused_bands);
- ctrl_mask = mask;
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if ((1<<band) & mask) {
- pmd_enable_mod(band,unit->control_modulation);
- } else {
- pmd_disable_mod(band,unit->control_modulation);
- }
- }
- power_ref = ce_estim_power(control_uchannel->quality, unit->used_bands);
- power_ctrl = ce_estim_power(control_uchannel->quality, ctrl_mask);
- if ((double)power_ctrl>(double)0) {
- gain = (uint16_t)((double)pframe->ctrl_gain*sqrt(power_ref/power_ctrl));
- PLCP_LOG(0, "control gain adjusted (used bands)", gain);
- } else {
- gain = pframe->data_gain;
- PLCP_LOG(0, "control gain defaulted to data gain (used bands)", gain);
- }
- break;
-
- case POWER_ALL_BANDS :
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if ((1<<band) & mask) {
- pmd_enable_mod(band,unit->control_modulation);
- } else {
- pmd_disable_mod(band,unit->control_modulation);
- }
- }
- gain = pframe->ctrl_gain;
- PLCP_LOG(0, "control gain (all bands) ", gain);
- break;
- }
-#endif /* FEATURE_ENERVATION */
- pmd_set_tx_gain(gain);
-}
-
-static struct plcp_fmode *fm; /* current frame mode */
-
-char *plcp_fmode_name(int fmode) {
- static char *__unknown = "UNKNOWN";
- if ((fmode>=0) && (fmode<PLCP_NB_FMODE)) {
- return plcp_fmodes[fmode].name;
- } else {
- return __unknown;
- }
-}
-void plcp_fmode_status(struct plc_drv_unit *unit) {
-
- extern int coef_corr;
- int band;
-
- printf("early_tx ........... %d\n", unit->plcp.config.early_tx_start);
- printf("plcp mode ...........%s|%s|%s\n",
- unit->plcp.config.fcs ? "fcs" : "no fcs",
- unit->plcp.config.vote ? "voted" : "no vote",
- unit->plcp.config.scramble ? "scrambling" : "no scrambling");
- printf("plcp frame mode .... %s\n",
- plcp_fmode_name(unit->plcp.config.fmode));
- printf("control power ...... %s\n",
- (unit->plcp.config.control_power==POWER_ALL_BANDS) ? "ALL" :
- (unit->plcp.config.control_power==POWER_SINGLE_BAND) ? "SINGLE" : "USED");
- printf("check all CRC ...... %s\n",
- unit->plcp.config.check_all_crc ? "enabled" : "disabled");
- fm->__status(unit);
-#ifdef SOFIA
- printf("ctrl modulation .... %d\n",unit->control_modulation);
- printf("bands together ..... %s\n",unit->together?"yes":"no");
- printf("new shaker ......... %s\n",unit->new_shaker?"yes":"no");
- printf("new tx filters ..... %s\n",unit->new_txFilter?"yes":"no");
- printf("new rx filters ..... %s\n",unit->new_rxFilter?"yes":"no");
-#endif
- printf("calibrate .......... %d (not part of EFR)\n",
- unit->plcp.config.nb_calibrate);
- printf("start .............. %d slots\n", unit->plcp.config.nb_start);
- printf("ref (head) ......... %d slots\n", unit->plcp.config.nb_ref_head);
- printf("ref interval ....... %d slots\n", unit->plcp.config.ref_interval);
- printf("nb periodic ref .... %d slots\n", unit->plcp.config.nb_periodic_ref);
- printf("coef_corr .......... %d\n", coef_corr);
- printf("tmo_drop ........... %d\n", unit->plcp.config.n_drop_slots);
- printf("rxEof .............. %d slots\n", unit->plcp.config.rx_nb_eof);
- printf("txEof .............. %d symbols\n", unit->plcp.config.tx_nb_eof);
- printf("bands .............. ");
- for (band=0;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- printf("%d ", band);
- }
- }
- printf("\n");
-}
-
-
-void __cap_status(struct plc_drv_unit *unit) {
- printf("control ........... %d slots\n", unit->plcp.config.nb_control);
- printf("wait control ....... %d slots\n", unit->plcp.config.nb_wait_control);
- printf("wait block ......... %d slots\n", unit->plcp.config.nb_wait_block);
- printf("block slots ........ %d slots\n", unit->block_slots);
-}
-
-void __scap_status(struct plc_drv_unit *unit) {
- __cap_status(unit);
-}
-
-void __p_status(struct plc_drv_unit *unit) {
- printf("channel id ......... %d\n", unit->emac.cid);
- printf("rx slices .......... %d\n", unit->emac.slices);
- printf("tx slices .......... %d\n", unit->emac.slices);
-}
-
-void __ener_status(struct plc_drv_unit *unit) {
- __p_status(unit);
-}
-
-
-int plcp_fmode_open(struct plc_drv_unit *unit) {
- /*
- * set default configuration
- */
- unit->plcp.config.nb_calibrate = 2;
-
- /* early_tx feature is unsafe, disable it by default */
- unit->plcp.config.early_tx_start = 0;
- unit->plcp.config.nb_start = 1;
- unit->plcp.config.nb_ref_head = 3; /* need 3 for a stable AGC */
- unit->plcp.config.nb_wait_control = 4; // CHRIS FIX: rx_start just with 3
- unit->plcp.config.rx_nb_eof = 0; /* slots !! */
- unit->plcp.config.tx_nb_eof = 0; /* symbols !!! */
- unit->plcp.config.nb_wait_block = unit->plcp.config.nb_wait_control;
- unit->plcp.config.n_drop_slots = 100;
- unit->plcp.config.vote = false;
-
- /* add no checksum on payload by default */
- unit->plcp.config.fcs = false;
- unit->plcp.config.scramble = false;
- unit->plcp.config.check_all_crc = false;
-
- unit->plcp.config.fmode = PLCP_FMODE_ENER;
-
- fm = &plcp_fmodes[unit->plcp.config.fmode];
-
- unit->plcp.config.control_power = POWER_ALL_BANDS;
-
- /*
- * Number of symbols between two reference symbols
- * (for the payload part of the PLCP frame)
- * Note that DSP_RSR = ref_interval + 1;
- */
- unit->plcp.config.ref_interval = 24;
- unit->plcp.config.nb_periodic_ref = 1;
-
- /*
- * 2005-30-06 / TF / FR0126 ref_inteval set to 24 to get a REF symbol
- * on symbol 128
- *
- * 1 2 3 4 5 6 7 ........ 27 28 29 127 128
- * K K S R R R P P P P ........ P R P ....... P R
- */
-
- __set_state(unit, PLCP_STATE_IDLE);
- return 0;
-}
-
-int plcp_fmode_start(struct plc_drv_unit *unit) {
- pmd_register(PMD_PROTO_PLCP, &fm->fm_ind);
- return fm->fm_start(unit);
-}
-
-int plcp_write(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- extern int plcp_locked;
- if (plcp_locked==1) {
- return -1;
- }
- return fm->fm_write(unit, pframe);
-}
-
-bool plcp_start_tmo(struct plc_drv_unit *unit, uint16_t date) {
- return fm->fm_start_tmo(unit, date);
-}
-
-bool plcp_stop_tmo(struct plc_drv_unit *unit) {
- return fm->fm_stop_tmo(unit);
-}
-
-static int __ener_start(struct plc_drv_unit *unit) {
-
- int srr, rpr;
- struct plcp_uchannel *uchannel;
- int nb_bands = unit->nb_bands;
- int min, max;
- int band, last_band = 0;
-
-
- /* patch PHLIC code */
- pmd_set_tx_loop_done(1);
- pmd_set_spy_off();
- pmd_set_control_off();
- pmd_set_tx_trigger_on();
-
- pmd_set_tx_slices_interval(PLCP_TX_SLICE_INTERVAL);
- pmd_set_rx_slices_interval(PLCP_RX_SLICE_INTERVAL);
-
- /* configure vote in PHLIC */
- unit->PMD->vote_wanted = unit->plcp.config.vote ? 1 : 0;
- unit->PMD->only_start = 0;
-
- /* Configure FEC memory range for TX/RX */
- min = unit->id * PMD_FEC_MEM_NB_SLICES * PMD_FEC_SLICE_SIZE;
- max = min + (PMD_FEC_MEM_NB_SLICES-1) * PMD_FEC_SLICE_SIZE;
-
- unit->PMD->tx_min=min;
- unit->PMD->tx_max=max;
-
- unit->PMD->rx_spy_refs = unit->plcp.config.nb_ref_head
- - unit->plcp.config.nb_start;
- unit->PMD->rx_spy_ctrls = unit->plcp.config.nb_control;
-
- plcp_set_periodic_ref(unit,
- unit->plcp.config.ref_interval,
- unit->plcp.config.nb_periodic_ref, unit->nb_bands);
-
- unit->PMD->nb_bands = nb_bands;
- unit->PMD->tx_nb_calibrate = nb_bands * unit->plcp.config.nb_calibrate;
- unit->PMD->tx_nb_refs = nb_bands * unit->plcp.config.nb_ref_head;
- unit->PMD->tx_nb_wait_ose = nb_bands * unit->plcp.config.nb_wait_control;
- unit->PMD->tx_nb_eof = unit->plcp.config.tx_nb_eof;
-
- for (band=1; band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit, band)) {
- last_band = band;
- }
- }
- unit->PMD->last_band = 0x1000 + (0x100*last_band);
-
-
- rpr = unit->plcp.config.nb_ref_head;
- srr = unit->plcp.config.nb_ref_head + unit->plcp.config.ref_interval + 1;
-
- pmd_link_bands(unit->used_bands);
- plcp_set_rx_nb_bands(unit,unit->nb_bands);
-
- plcp_set_rpr(rpr);
- plcp_set_srr(srr);
-
- pmd_set_aspro_pilots(plcp_pilots);
-
- /* we do not have any PLCP header (in BPSK mode) */
- unit->PMD->rx_header = 0;
- unit->PMD->rx_control_nb_words = 0;
- unit->PMD->rx_control_nb_symbols = 0;
- unit->PMD->rx_more_ctl = 0;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_junk >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_junk & 0x0000ffff;
-
- /* indicate number of words used for control */
- unit->PMD->tx_control_nb_words = 0;
- unit->PMD->tx_control_nb_symbols = 0;
-
- /* do we have additional control blocks ? */
- unit->PMD->tx_more_ctl = 0;
- unit->PMD->tx_nb_wait_ose =
- unit->plcp.config.nb_wait_control * unit->nb_bands;
-
- uchannel = plcp_get_uchannel_by_id(unit->emac.cid);
- ASSERT(uchannel);
- unit->emac.frame_slots = plcp_get_efr(unit, 0, uchannel, unit->emac.slices);
-
- __ener_idle(unit);
-
- if (unit->emac.slave_no>0) {
- /* do not want to receive anything in SLAVE mode */
- *(uint16_t*)DSP_CHMR_ADDR = 0;
- } else {
- *(uint16_t*)DSP_CHMR_ADDR = unit->used_bands;
- }
-
- return 0;
-}
-
-static int __cap_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices) {
-
- return unit->plcp.config.nb_ref_head
- + unit->plcp.config.nb_control
- + unit->plcp.config.nb_wait_control
- + blocks * (unit->block_slots+unit->plcp.config.nb_wait_block)
- + uchannel->lookup.payload_slots[slices]
- + uchannel->lookup.periodic_ref_slots[slices];
-// + unit->plcp.config.rx_nb_eof;
-}
-
-static int __scap_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices) {
- return unit->plcp.config.nb_ref_head
- + blocks * (unit->block_slots+unit->plcp.config.nb_wait_block)
- + uchannel->lookup.payload_slots[slices]
- + uchannel->lookup.periodic_ref_slots[slices];
-// + unit->plcp.config.rx_nb_eof;
-}
-
-static int __p_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices) {
- return unit->plcp.config.nb_ref_head
- + uchannel->lookup.payload_slots[slices]
- + uchannel->lookup.periodic_ref_slots[slices];
-// + unit->plcp.config.rx_nb_eof;
-}
-
-static void __ener_idle(struct plc_drv_unit *unit) {
-
- int slices;
-
- plcp_set_rpr(unit->plcp.config.nb_ref_head);
- pmd_cancel_timer1(unit->id);
-
- /* PHLIC code is evaluating the "to_drop" parameter as soon as
- * the rx_start interrupt has been sent. Setting to_drop to a
- * default value of 1 would lead to dropping all frames due to
- * rx_start_isr handling latency.
- * to_drop MUST be set to 0 by default.
- */
- unit->PMD->to_drop = 0;
- if (unit->emac.slave_no>0) {
- /* slave do not care about EOF */
- unit->PMD->eof_irq_mask=0;
- } else {
- unit->PMD->eof_irq_mask=1;
- }
-
- /* allocate a new frame if required */
- if (plcp_rx_frame) {
- /* we already own a frame descriptor (previous drop) */
- PLCP_LOG(0, "reuse plcp_rx_frame", plcp_rx_frame);
- } else {
- /* allocate a new frame */
- plcp_rx_frame = plcp_alloc_rx_frame();
- if (!plcp_rx_frame) {
- unit->stats.plcp.no_buffer++;
- RT_PRINTM(TRACE_PLCP,TRACE_ERROR,"plcp_rx_start: no buffer\n");
- PLCP_LOG(0, "*** NO BUFFER ** ", 0);
- return;
- } else {
- PLCP_LOG(0, "alloc plcp_rx_frame", plcp_rx_frame);
- }
- }
-
- plcp_rx_frame->uchannel = plcp_get_uchannel_by_id(unit->emac.cid);
- ASSERT(plcp_rx_frame->uchannel);
-
- plcp_rx_bands = unit->used_bands
- & ~plcp_rx_frame->uchannel->unused_bands;
-
- memset(plcp_rx_frame->control, 0, sizeof(struct plcp_control));
- plcp_rx_frame->control->slices = unit->emac.slices;
-
- plcp_rx_frame->rx_bands = plcp_rx_bands;
- plcp_rx_frame->nb_rx_bands = unit->nb_bands;
- plcp_rx_frame->c_len = 0;
- plcp_rx_frame->d_len = (slices * PMD_SLICE_SIZE);
- __p_last_efr = __p_efr(unit, 0, plcp_rx_frame->uchannel, unit->emac.slices);
- plcp_set_efr(unit, __p_last_efr);
-
- /* keep efr for future reuse */
- plcp_rx_frame->control->efr = __p_last_efr;
-
- pmd_set_dsp_pilots(plcp_rx_frame->uchannel->pilots);
- slices = unit->emac.slices;
-
- PB_ZERO(&plcp_rx_frame->pb_mask);
- plcp_rx_frame->pb_errors = 0;
- plcp_rx_frame->pb_count = 0;
- plcp_rx_frame->pb_done_dma = 0;
-
- unit->PMD->rx_broadcast = 0;
- if (slices > 0) {
- /* compute payload symbols */
- unit->PMD->rx_payload_nb_symbols =
- plcp_rx_frame->uchannel->lookup.payload_slots[slices] * plcp_rx_frame->nb_rx_bands;
- unit->PMD->rx_slices_number = slices;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_frame->d_buf >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_frame->d_buf & 0x0000ffff;
- plcp_set_rx_quality(unit, plcp_rx_frame->uchannel);
- PLCP_LOG(unit->plcp.rxstart_date, "slices", slices);
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols",
- plcp_rx_frame->uchannel->lookup.payload_slots[slices] * plcp_rx_frame->nb_rx_bands);
- PLCP_LOG(unit->plcp.rxstart_date, "d_buf", plcp_rx_frame->d_buf);
- } else {
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols", 0);
- unit->PMD->rx_payload_nb_symbols = 0;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_junk >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_junk & 0x0000ffff;
- }
-}
-
-int plcp_set_fmode(struct plc_drv_unit *unit, int fmode) {
- unit->plcp.config.fmode = fmode;
- fm = &plcp_fmodes[fmode];
- return fmode;
-}
-
-/* ------------------------------------------------------- GENERIC ACTIONS */
-/*
- * WARNING: There should be *no* state change in these actions
- */
-
-static void __tx_end(struct plc_drv_unit *unit) {
-
- uint32_t addr;
- addr = (((uint32_t)unit->PMD->tx_high_slice_ad)<<16)
- + ((uint32_t)unit->PMD->tx_low_slice_ad);
- if (addr) {
- pkt_log_add(&pmd_plog, PKT_LOG_TX, 0, (char*)addr);
- }
-
- if (plcp_callbacks_fn->tx_end) {
- plcp_callbacks_fn->tx_end(unit, plcp_tx_frame);
- }
-}
-
-
-static void __fake_tx_end(struct plc_drv_unit *unit) {
-
- unit->stats.plcp.transmit_error++;
- unit->PMD->tx_start=0;
- unit->PMD->tx_more_ctl = 0;
- led_off(4);
- pmd_set_dsp_pilots(dsp_pilots);
- if (plcp_callbacks_fn->tx_status) {
- plcp_callbacks_fn->tx_status(unit, plcp_tx_frame);
- }
-}
-
-static int __p_busy(struct plc_drv_unit *unit, uint16_t date) {
-
- uint16_t tmo;
-
- PLCP_LOG(date,"plcp_rx_frame", plcp_rx_frame);
- if (plcp_rx_frame) {
- __set_state(unit, PLCP_STATE_RX_DATA);
- unit->plcp.rxstart_date = date;
- unit->plcp.rxend_date = unit->plcp.busy_date
- + plcp_rx_frame->control->efr
- + PLCP_FEC_LATENCY;
- unit->PMD->eof_irq_mask = 0;
- } else {
- __set_state(unit, PLCP_STATE_DROP);
- unit->plcp.rxend_date = unit->plcp.busy_date
- + __p_last_efr
- + PLCP_FEC_LATENCY;
- unit->PMD->eof_irq_mask = 1;
- }
- tmo = unit->plcp.rxend_date + PLCP_FEC_LATENCY /* MARGIN */;
- pmd_request_timer1(unit->id, tmo);
- PLCP_LOG(date,"requested tmo1", tmo);
- return 0;
-}
-
-static void __drop(struct plc_drv_unit *unit, uint16_t date) {
- unit->PMD->to_drop = 1;
- unit->PMD->eof_irq_mask=1;
- unit->stats.plcp.rx_drop++;
- pmd_request_timer1(unit->id, unit->plcp.config.n_drop_slots + date);
-}
-
-static void __scap_drop(struct plc_drv_unit *unit, uint16_t date) {
-
- fm->__idle(unit);
- unit->PMD->to_drop = 1;
- unit->PMD->eof_irq_mask=1;
- unit->stats.plcp.rx_drop++;
- pmd_request_timer1(unit->id, unit->plcp.config.n_drop_slots + date);
-}
-
-
-static void __p_drop(struct plc_drv_unit *unit, uint16_t date) {
- unit->stats.plcp.rx_drop++;
- /* just return to IDLE state */
- __set_state(unit, PLCP_STATE_IDLE);
-}
-
-static void __fake_rx_end(struct plc_drv_unit *unit, uint16_t date,
- struct plcp_frame *pframe) {
-
- PB_ZERO(&pframe->pb_mask);
- pframe->pb_errors = pframe->control->slices;
-
- // CHRIS: force rx_end date
- unit->plcp.rxend_date = plcp_get_timer(unit);
-
- if (plcp_callbacks_fn->rx_end) {
- plcp_callbacks_fn->rx_end(unit, pframe);
- }
-}
-
-static void __idle(struct plc_drv_unit *unit) {
-
- pmd_set_dsp_pilots(dsp_pilots);
- /* PHLIC code is evaluating the "to_drop" parameter as soon as
- * the rx_start interrupt has been sent. Setting to_drop to a
- * default value of 1 would lead to dropping all frames due to
- * rx_start_isr handling latency.
- * to_drop MUST be set to 0 by default.
- */
- unit->PMD->to_drop = 0;
- unit->PMD->eof_irq_mask=1;
-
- unit->PMD->rx_payload_nb_symbols = 1;
- unit->PMD->rx_slices_number = 0;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_junk >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_junk & 0x0000ffff;
-
- /* prepare number of words for control */
- unit->PMD->rx_control_nb_words = unit->control_len/2;
- unit->PMD->rx_control_nb_symbols = unit->control_symbols;
-
- pmd_cancel_timer1(unit->id);
-}
-
-/* ----------------------------------------------------- STATE MACHINE */
-
-static void __write_control(struct plc_drv_unit *unit,
- struct plcp_frame *pframe)
-{
- int blocks;
- struct plcp_control *control;
-
- blocks = ( pframe->c_len + PLCP_BLOCK_PAYLOAD_SIZE - 1 )
- / PLCP_BLOCK_PAYLOAD_SIZE;
-
- control = pframe->control;
-#ifdef PLCP_DEBUG
- if (force_tx_cid) {
- control->channel_id = force_tx_cid;
- } else {
- control->channel_id = (uint8_t)(*pframe->channel_id);
- }
-#else
- control->channel_id = (uint8_t)(*pframe->channel_id);
-#endif
- control->TEI = pframe->TEI;
- control->slices = pframe->uchannel->ops->tx_start(unit, pframe);
- control->dlen = pframe->d_len;
- control->clen = pframe->c_len;
- control->efr = fm->fm_efr(unit, blocks, pframe->uchannel, control->slices);
- control->crc = control_crc(control);
-
-#if 0
- RT_PRINTM(TRACE_PLCP, TRACE_ERROR,
- "send: cid=%d slices=%d (%d slots) efr=%d\n",
- control->channel_id,
- control->slices,
- pframe->uchannel->lookup.payload_slots[pframe->control->slices],
- control->efrRT_); M
-#endif
-
- /* indicate number of words used for control */
- unit->PMD->tx_control_nb_words = unit->control_len/2;
- unit->PMD->tx_control_nb_symbols = unit->control_symbols;
-
- /* do we have additional control blocks ? */
- if (pframe->c_len>0) {
- unit->PMD->tx_more_ctl = 1;
- unit->PMD->tx_nb_wait_ose =
- unit->plcp.config.nb_wait_control * unit->nb_bands;
- } else {
- unit->PMD->tx_more_ctl = 0;
- if (pframe->d_len==0) {
- /* FIXME: PHLIC does not support 0 wait_ose... */
- unit->PMD->tx_nb_wait_ose = unit->nb_bands;
- } else {
- unit->PMD->tx_nb_wait_ose =
- unit->plcp.config.nb_wait_control * unit->nb_bands;
- }
- }
-
- unit->plcp.tx.c_block_addr = pframe->c_buf;
- unit->plcp.tx.c_blocks = blocks;
-
- plcp_write_control((int)pmd_tx_control(1), (int)(pframe->control));
-}
-
-static void __ener_write_control(struct plc_drv_unit *unit,
- struct plcp_frame *pframe)
-{
- struct plcp_control *control;
-
- control = pframe->control;
- control->channel_id = unit->emac.cid;
- control->TEI = pframe->TEI;
- control->dlen = pframe->d_len;
-
- /* force the d_len to the effective size of the frame */
- pframe->d_len = unit->emac.slices * PMD_SLICE_SIZE;
- control->slices = pframe->uchannel->ops->tx_start(unit, pframe);
-
- /* restore d_len to the useful size */
- pframe->d_len = control->dlen;
- control->clen = pframe->c_len;
- control->efr = fm->fm_efr(unit, 0, pframe->uchannel, control->slices);
-}
-
-static int __ener_tx_start(struct plc_drv_unit *unit,
- struct plcp_frame *pframe, uint16_t date) {
-
- unit->stats.plcp.tx_start++;
-
- pframe->uchannel = plcp_get_uchannel_by_id(unit->emac.cid);
- pframe->c_len = 0;
-
- unit->plcp.txstart_date = date;
- __ener_write_control(unit, pframe);
- PLCP_LOG(0, "transmit gain ", unit->emac.gain);
- pmd_set_tx_gain(unit->emac.gain);
- plcp_data_power(unit, pframe->uchannel->unused_bands);
- led_on(4);
-
- return 0;
-}
-
-static int __tx_more(struct plc_drv_unit *unit, uint16_t date) {
-
- struct plcp_frame *pframe = plcp_tx_frame;
- struct plcp_block *block;
- uint32_t crc;
-#ifdef softOSE
- int band;
-#endif
-
- if(unit->plcp.tx.c_blocks == 0) {
- __set_state(unit, PLCP_STATE_TX_DATA);
- /* set power only on used bands (pilots are disabled so) */
- PLCP_LOG(0, "data gain = ", pframe->data_gain);
- pmd_set_tx_gain(pframe->data_gain);
- plcp_data_power(unit, pframe->uchannel->unused_bands);
-
- /* PILOTS: set pilots for data */
- //pmd_set_dsp_pilots(pframe->uchannel->pilots);
-
- led_on(4);
- } else {
- unit->plcp.tx.c_blocks--;
-
- /* write the whole block */
- unit->PMD->tx_control_nb_words = PLCP_BLOCK_SIZE/2;
- unit->PMD->tx_control_nb_symbols = unit->block_slots*unit->nb_bands;
- unit->PMD->tx_nb_wait_ose = unit->plcp.config.nb_wait_block*unit->nb_bands;
-
- block = (struct plcp_block*)unit->plcp.tx.c_block_addr;
- crc = block_crc(block);
-#ifdef softOSE
- for (band=1;band<PMD_MAX_BANDS;band++) {
- if (band_is_used(unit,band)) {
- memcpy((void*)pmd_tx_control(band),
- unit->plcp.tx.c_block_addr,
- PLCP_BLOCK_PAYLOAD_SIZE);
- ((struct plcp_block*)pmd_tx_control(band))->crc = crc;
- }
- }
-#else
-#ifndef __KERNEL__
- __asm {
- mov r1, block
- mov r0, pmd_tx_control(1)
-
- /* read 28 bytes of payload in r5-r11 */
- ldmia r1!,{r5-r11}
-
- /* store 4-byte crc in r13*/
- mov r12,crc
-
- /* store 28 bytes of payload + 4-byte crc on each band */
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- add r0,r0,(PMD_BAND_SIZE-PLCP_BLOCK_SIZE)
- stmia r0!,{r5-r12}
- }
-#else
- printf("asm code not implemented in KERNEL mode\n");
-#endif
-#endif /* softOSE */
- /* transition */
- if (unit->plcp.tx.c_blocks>0) {
- unit->PMD->tx_more_ctl = 1;
- unit->plcp.tx.c_block_addr += PLCP_BLOCK_PAYLOAD_SIZE;
- } else {
- unit->PMD->tx_more_ctl = 0;
- }
- __set_state(unit, PLCP_STATE_TX_BLOCK);
- }
- return 0;
-}
-
-static int __no_rx_more(struct plc_drv_unit *unit, uint16_t date) {
- PLCP_LOG(date, "*** unexpected rx_more ***", 0);
- return -1;
-}
-
-static int __ener_rx_end(struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe) {
-
- uint32_t addr;
-
- addr = (((uint32_t)unit->PMD->rx_high_slice_ad)<<16)
- + ((uint32_t)unit->PMD->rx_low_slice_ad);
-
- pmd_cancel_timer1(unit->id);
-
- PLCP_LOG(date, "__ener_rx_end pframe", pframe);
- if (!pframe) {
- PLCP_LOG(date, "*** pframe is NULL", 0);
- return -1;
- }
- PLCP_LOG(date, "__ener_rx_end pframe->d_buf", pframe->d_buf);
-
- plcp_rx_frame->cac = (struct cac_header*)((int)pframe->control+8);
-
- pkt_log_add(&pmd_plog, PKT_LOG_RX, 0, (char*)addr);
-
- if (pframe->uchannel->ops->rx_end) {
- /* call channel specific method for rx_end */
- if (pframe->uchannel->ops->rx_end(unit, pframe)<0) {
- unit->stats.plcp.rx_bad_payload++;
- }
- }
-
- pkt_log_add(&plcp_plog, PKT_LOG_RX, 0, (char*)pframe->d_buf);
-
- if (plcp_callbacks_fn->rx_end) {
- plcp_callbacks_fn->rx_end(unit, pframe);
- }
-
- return 0;
-}
-/* --------------------------------------------- UPPER INTERFACE (MAC) */
-
-#if defined(PLCP_DEBUG) && !defined(__KERNEL__)
-INLINE void plcp_event(struct plc_drv_unit *unit, struct plcp_frame *pframe, int event, int date) {
- int state = unit->plcp.state;
- int tail;
- unit->stats.plcp.event[event][state]++;
- PLCP_LOG(date, "------> EVENT <----- ", 0);
- PLCP_LOG(date, plcp_event_name[event], event);
- PLCP_LOG(date, plcp_state_name[state], state);
- PLCP_LOG(date, "PHLIC nextstate", pmd_get_nextstate());
- PLCP_LOG(date, "PHLIC counter", pmd_get_counter());
- if (plcp_save) {
- tail = unit->stats.plcp.tail;
- unit->stats.plcp.tail = (tail+1)%PLCP_MAX_REG;
- if(unit->stats.plcp.tail == unit->stats.plcp.head){
- unit->stats.plcp.head=(unit->stats.plcp.head+1)%PLCP_MAX_REG;
- }
- unit->stats.plcp.reg[tail].state_source = state;
- unit->stats.plcp.reg[tail].event = event;
- unit->stats.plcp.reg[tail].date = date;
- }
-}
-#else
-INLINE void plcp_event(struct plc_drv_unit *unit, struct plcp_frame *pframe, int event, int date) {
-}
-#endif
-
-static int __ener_write(struct plc_drv_unit *unit, struct plcp_frame *pframe)
-{
- int date;
- uint32_t msr;
- date = plcp_get_timer(unit);
-
- LOCK_SAVE(msr);
- plcp_event(unit, pframe, PLCP_EVENT_TX_START, date);
- switch (unit->plcp.state) {
- case PLCP_STATE_IDLE:
- __set_state(unit, PLCP_STATE_TX_DATA);
- plcp_tx_frame = pframe;
- LOCK_RESTORE(msr);
- return __ener_tx_start(unit, pframe, date);
-
- default:
- LOCK_RESTORE(msr);
- return -1;
- }
-}
-
-bool __start_tmo(struct plc_drv_unit *unit, uint16_t date)
-{
- pmd_request_timer2(unit->id,date);
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_START_TMO, plcp_get_timer(unit));
- return true;
-}
-
-bool __stop_tmo(struct plc_drv_unit *unit)
-{
- pmd_cancel_timer2(unit->id);
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_STOP_TMO, plcp_get_timer(unit));
- return true;
-}
-
-/* --------------------------------------------- LOWER INTERFACE (PMD) */
-
-static void __tx_more_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->stats.plcp.tx_more_isr++;
- plcp_event(unit, plcp_tx_frame, PLCP_EVENT_TX_MORE, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- __tx_more(unit, date);
- break;
-
- case PLCP_STATE_TX_REQ:
- unit->stats.plcp.tx_more_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_TX_DATA:
- unit->stats.plcp.tx_more_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- __fake_tx_end(unit);
- break;
-
- case PLCP_STATE_IDLE:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- unit->stats.plcp.tx_more_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
- }
- PLCP_LOG_PMD_TX(unit);
-}
-
-static void __p_tx_more_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->stats.plcp.tx_more_isr++;
-
- plcp_event(unit, plcp_tx_frame, PLCP_EVENT_TX_MORE, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_TX_DATA:
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- __fake_tx_end(unit);
- break;
-
- case PLCP_STATE_TX_REQ:
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_IDLE:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- unit->stats.plcp.tx_more_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
- }
- PLCP_LOG_PMD_TX(unit);
-}
-
-static void __tx_data_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- struct plcp_frame *pframe = plcp_tx_frame;
-
- unit->stats.plcp.tx_data_isr++;
- plcp_event(unit, pframe, PLCP_EVENT_TX_DATA, date);
- if (unit->plcp.state == PLCP_STATE_TX_DATA) {
- if (pframe->uchannel->ops->tx_data) {
- pframe->uchannel->ops->tx_data(unit, pframe);
- }
- } else {
- unit->stats.plcp.tx_data_error++;
- }
-}
-
-static void __tx_end_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->plcp.txend_date = date;
- unit->stats.plcp.tx_end_isr++;
- plcp_event(unit, plcp_tx_frame, PLCP_EVENT_TX_END, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_TX_DATA:
- led_off(4);
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- __tx_end(unit);
- break;
-
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- unit->stats.plcp.tx_end_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- __fake_tx_end(unit);
- break;
-
- case PLCP_STATE_TX_REQ:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- case PLCP_STATE_IDLE:
- unit->stats.plcp.tx_end_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
- }
- PLCP_LOG_PMD_TX(unit);
-}
-
-static void __ener_tx_end_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->plcp.txend_date = date;
- unit->stats.plcp.tx_end_isr++;
- plcp_event(unit, plcp_tx_frame, PLCP_EVENT_TX_END, date);
- switch (unit->plcp.state) {
-
- case PLCP_STATE_TX_DATA:
- led_off(4);
- __set_state(unit, PLCP_STATE_IDLE);
- __tx_end(unit);
- break;
-
- case PLCP_STATE_TX_REQ:
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- case PLCP_STATE_IDLE:
- unit->stats.plcp.tx_end_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- __tx_end(unit); /* tx_end anyway... */
- }
- PLCP_LOG_PMD_TX(unit);
-}
-
-static void __busy_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->plcp.busy_date = date;
- unit->stats.plcp.busy_isr++;
-
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_BUSY, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_IDLE:
- __set_state(unit, PLCP_STATE_RX_CTRL);
- fm->__busy(unit, date);
- break;
-
- case PLCP_STATE_TX_REQ:
- __set_state(unit, PLCP_STATE_RX_CTRL);
- fm->__busy(unit,date);
- break;
-
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_TX_DATA:
- unit->stats.plcp.busy_error++;
- __set_state(unit, PLCP_STATE_RX_CTRL);
- __fake_tx_end(unit);
- fm->__busy(unit,date);
- break;
-
- case PLCP_STATE_RX_CTRL:
- unit->stats.plcp.busy_error++;
- __set_state(unit, PLCP_STATE_DROP);
- fm->__idle(unit);
- fm->__drop(unit, date);
- break;
-
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- unit->stats.plcp.busy_error++;
- __set_state(unit, PLCP_STATE_RX_CTRL);
- fm->__idle(unit);
- fm->__busy(unit,date);
- break;
-
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- __set_state(unit, PLCP_STATE_RX_CTRL);
- fm->__idle(unit);
- fm->__busy(unit,date);
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-
-static void __p_busy_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- unit->plcp.busy_date = date;
- unit->stats.plcp.busy_isr++;
-
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_BUSY, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_IDLE:
- case PLCP_STATE_TX_REQ:
- __set_state(unit, PLCP_STATE_RX_DATA);
- __p_busy(unit, date);
- break;
-
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_TX_DATA:
- unit->stats.plcp.busy_error++;
- __set_state(unit, PLCP_STATE_RX_DATA);
- __fake_tx_end(unit);
- __p_busy(unit, date);
- break;
-
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- case PLCP_STATE_DROP:
- case PLCP_STATE_DROP_DATA:
- unit->stats.plcp.busy_error++;
- __set_state(unit, PLCP_STATE_RX_DATA);
- __p_busy(unit, date);
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-
-
-static void __rx_start_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
-
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_RX_START, date);
- unit->stats.plcp.rx_start_error++;
-}
-
-static void __rx_data_isr(int proto, int flow)
-{
-static int change_rpr = 0;
-
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- struct plcp_frame *pframe = plcp_rx_frame;
-
-
- /* 2005-06-27 / TF / FR00126 workaround for signed library
- * set DSP_RPR to 128 (which is -127 in signed), so that
- * symbol_no is always greater. There is still a problem
- * with symbol_no 128...
- */
- *(uint16_t*)DSP_RPR_ADDR = 128;
-
- unit->stats.plcp.rx_data_isr++;
- plcp_event(unit, pframe, PLCP_EVENT_RX_DATA, date);
- if (unit->plcp.state == PLCP_STATE_RX_DATA) {
- if (pframe->uchannel->ops->rx_data) {
- pframe->uchannel->ops->rx_data(unit, pframe);
- }
- } else {
- unit->stats.plcp.rx_data_error++;
- }
-}
-
-static void __rx_end_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- struct plcp_frame *pframe;
- uint32_t msr;
-
- unit->stats.plcp.rx_end_isr++;
-
- LOCK_SAVE(msr);
- /* plcp_event must be called under LOCK_SAVE for consistent state */
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_RX_END, date);
- unit->plcp.rxend_date = date;
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_RX_DATA:
- __set_state(unit, PLCP_STATE_IDLE);
- pframe = plcp_rx_frame;
- plcp_rx_frame = NULL;
- fm->__idle(unit);
- LOCK_RESTORE(msr);
- fm->__rx_end(unit, date, pframe);
- break;
-
- case PLCP_STATE_IDLE:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- LOCK_RESTORE(msr);
- unit->stats.plcp.rx_end_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_DROP:
- LOCK_RESTORE(msr);
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_TX_REQ: /* 1 */
- case PLCP_STATE_TX_CTRL: /* 1 */
- case PLCP_STATE_DROP_DATA: /* 2 */
- /*
- * (1) RX_END may occur if previous frame has been
- * dropped with enough symbols for the FEC to
- * process the initial number of slices.
- * (2) wait for EOF, or TMO1 to return to IDLE
- */
- LOCK_RESTORE(msr);
- break;
-
- case PLCP_STATE_TX_BLOCK: /* 1 */
- case PLCP_STATE_TX_DATA: /* 1 */
- LOCK_RESTORE(msr);
- unit->stats.plcp.rx_end_error++;
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-
-#if 0
-static void __p_rx_end_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- uint32_t msr;
-
- unit->stats.plcp.rx_end_isr++;
-
- LOCK_SAVE(msr);
- /* plcp_event must be called under LOCK_SAVE for consistent state */
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_RX_END, date);
- unit->plcp.rxend_date = date;
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_RX_DATA:
- __set_state(unit, PLCP_STATE_IDLE;
- LOCK_RESTORE(msr);
- fm->__rx_end(unit, date);
- /*
- * __idle MUST be after __rx_end in PMODE,
- * in order to allocate plcp_rx_frame
- */
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_IDLE:
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- LOCK_RESTORE(msr);
- unit->stats.plcp.rx_end_error++;
- __set_state(unit, PLCP_STATE_IDLE;
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_DROP:
- LOCK_RESTORE(msr);
- __set_state(unit, PLCP_STATE_IDLE;
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_TX_REQ: /* 1 */
- case PLCP_STATE_TX_CTRL: /* 1 */
- case PLCP_STATE_DROP_DATA: /* 2 */
- /*
- * (1) RX_END may occur if previous frame has been
- * dropped with enough symbols for the FEC to
- * process the initial number of slices.
- * (2) wait for EOF, or TMO1 to return to IDLE
- */
- LOCK_RESTORE(msr);
- break;
-
- case PLCP_STATE_TX_BLOCK: /* 1 */
- case PLCP_STATE_TX_DATA: /* 1 */
- LOCK_RESTORE(msr);
- unit->stats.plcp.rx_end_error++;
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-#endif
-
-static void __eof_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- struct plcp_frame *pframe;
-
- unit->plcp.eof_date = date + 1/* ajust to rx_end if DATA */;
-
- unit->stats.plcp.eof_isr++;
-
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_EOF, date);
-
- switch (unit->plcp.state) {
-
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- unit->stats.plcp.eof_error++;
- case PLCP_STATE_IDLE:
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
-
- /* after busy we must give MAC once of rx_end, eof event */
- if (plcp_callbacks_fn->eof) {
- plcp_callbacks_fn->eof(unit);
- }
- break;
-
- case PLCP_STATE_TX_REQ:
- case PLCP_STATE_TX_CTRL:
- break;
-
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_TX_DATA:
- unit->stats.plcp.eof_error++;
- unit->stats.plcp.eof_fake_tx_end++;
- __set_state(unit, PLCP_STATE_IDLE);
- if (plcp_callbacks_fn->eof) {
- plcp_callbacks_fn->eof(unit);
- }
- fm->__idle(unit);
- __fake_tx_end(unit);
- break;
-
- case PLCP_STATE_RX_DATA:
- /* wait for RX_END or TMO1 to return to IDLE state */
- unit->stats.plcp.eof_error++;
- break;
-
- case PLCP_STATE_DROP:
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- if (plcp_callbacks_fn->rx_drop) {
- plcp_callbacks_fn->rx_drop(unit);
- }
- break;
-
- case PLCP_STATE_DROP_DATA:
- __set_state(unit, PLCP_STATE_IDLE);
- pframe = plcp_rx_frame;
- plcp_rx_frame = NULL;
- fm->__idle(unit);
- __fake_rx_end(unit, date, pframe);
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-
-static void __tmo1_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- int date = plcp_get_timer(unit);
- struct plcp_frame *pframe;
-
- unit->plcp.eof_date = date;
- unit->stats.plcp.tmo_isr1++;
-
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_TMO_DROP, date);
- switch (unit->plcp.state) {
-
- case PLCP_STATE_IDLE:
- unit->stats.plcp.tmo_drop_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- break;
-
- case PLCP_STATE_TX_REQ:
- unit->stats.plcp.tmo_drop_error++;
- break;
-
- case PLCP_STATE_TX_CTRL:
- case PLCP_STATE_TX_BLOCK:
- case PLCP_STATE_TX_DATA:
- unit->stats.plcp.tmo_drop_error++;
- __set_state(unit, PLCP_STATE_IDLE);
- __fake_tx_end(unit);
- break;
-
- case PLCP_STATE_RX_CTRL:
- case PLCP_STATE_RX_BLOCK:
- case PLCP_STATE_RX_DATA:
- unit->stats.plcp.tmo_drop_error++;
- __set_state(unit, PLCP_STATE_DROP);
- fm->__idle(unit);
- fm->__drop(unit, date);
- break;
-
- case PLCP_STATE_DROP:
- __set_state(unit, PLCP_STATE_IDLE);
- fm->__idle(unit);
- if (plcp_callbacks_fn->rx_drop) {
- plcp_callbacks_fn->rx_drop(unit);
- }
- break;
-
- case PLCP_STATE_DROP_DATA:
- __set_state(unit, PLCP_STATE_IDLE);
- pframe = plcp_rx_frame;
- plcp_rx_frame = NULL;
- fm->__idle(unit);
- __fake_rx_end(unit, date, pframe);
- break;
- }
- PLCP_LOG_PMD_RX(unit);
-}
-
-static void __tmo2_isr(int proto, int flow)
-{
- struct plc_drv_unit *unit = plc_drv_get_unit(flow);
- unit->stats.plcp.tmo_isr2++;
- pmd_cancel_timer2(unit->id);
- if (plcp_callbacks_fn->tmo) {
- plcp_callbacks_fn->tmo(unit);
- }
- plcp_event(unit, plcp_rx_frame, PLCP_EVENT_TMO_MAC, plcp_get_timer(unit));
-}
-/* en fonction d'un uchannel et du nombre de slots, on veut connaître
- * jusqu'à combien d'octets on peut envoyer exactement */
-/* NB: slots includes DATA and periodic REF slots */
-int plcp_get_max_data_len(struct plc_drv_unit *unit,
- struct plcp_uchannel * uchannel, int slots) {
- return fm->__mtu(unit, uchannel, slots);
-}
-
-int plcp_get_efr(struct plc_drv_unit *unit, int blocks,
- struct plcp_uchannel *uchannel, int slices) {
- return fm->fm_efr(unit, blocks, uchannel, slices);
-}
-
-static int __mtu(struct plc_drv_unit *unit,
- struct plcp_uchannel * uchannel,int slots) {
- return uchannel->ops->mtu(unit, uchannel, slots);
-}
-
-static int __p_mtu(struct plc_drv_unit *unit,
- struct plcp_uchannel * uchannel,int slots) {
- int mtu = unit->emac.slices * PMD_SLICE_SIZE;
- uchannel = plcp_get_uchannel_by_id(unit->emac.cid);
- if (mtu > uchannel->ops->mtu(unit, uchannel, slots)) {
- return 0;
- } else {
- return mtu - sizeof(struct plcp_control);
- }
-}
-
diff --git a/app/sm-emac-drv/src/plcp_frame.c b/app/sm-emac-drv/src/plcp_frame.c
deleted file mode 100755
index dcfc95dcf9..0000000000
--- a/app/sm-emac-drv/src/plcp_frame.c
+++ /dev/null
@@ -1,217 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#include "osedef.h"
-#include "inet.h"
-#include "tosv.h"
-#include "time.h"
-#include "shell.h"
-#endif
-#include "platform.h"
-#include "plc_dbg.h"
-#include "ose.h"
-#include "shell_if.h"
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_dbg.h"
-#include "plcp_core.h"
-
-struct plcp_frame plcp_tx_frames[PLCP_TX_RING_SIZE];
-struct plcp_frame plcp_rx_frames[PLCP_RX_RING_SIZE];
-
-uint8_t plcp_rx_c_buf[PLCP_RX_RING_SIZE][PLCP_PAYLOAD_CSIZE];
-uint8_t plcp_tx_c_buf[PLCP_TX_RING_SIZE][PLCP_PAYLOAD_CSIZE];
-
-struct plcp_control plcp_rx_control[PLCP_RX_RING_SIZE];
-struct plcp_control plcp_tx_control[PLCP_TX_RING_SIZE];
-
-static struct plcp_frame *__alloc_frame(struct list_head *queue);
-static void __free_frame(struct plcp_frame *frame, struct list_head *queue);
-
-LIST_HEAD(plcp_tx_free_queue);
-LIST_HEAD(plcp_rx_free_queue);
-LIST_HEAD(plcp_tx_queue);
-LIST_HEAD(plcp_tx_done_queue);
-LIST_HEAD(plcp_rx_queue);
-
-int plcp_pending_tx_frames = 0;
-
-uint8_t DEFAULT_NHA[6] = {0,0,0,0,0,0};
-
-static struct plcp_frame *__alloc_frame(struct list_head *queue) {
-
- struct plcp_frame *frame;
- uint32_t msr;
- LOCK_SAVE(msr);
- if (list_empty(queue)) {
- frame = 0;
- LOCK_RESTORE(msr);
- } else {
- frame = list_entry(queue->next, struct plcp_frame, link);
- list_del_init(&frame->link);
-#ifndef FEATURE_ENERVATION
- list_del_init(&frame->inq);
-#endif
- LOCK_RESTORE(msr);
- frame->d_len = 0;
- frame->c_len = 0;
-#ifndef FEATURE_ENERVATION
- memcpy(frame->NHA,DEFAULT_NHA,6);
-#endif
- frame->d_buf = frame->head;
- }
- return frame;
-}
-
-static INLINE void __free_frame(struct plcp_frame *frame, struct list_head *queue){
- uint32_t msr;
- LOCK_SAVE(msr);
- ASSERT(list_empty(&frame->link));
- list_add_tail(&frame->link, queue);
- LOCK_RESTORE(msr);
-}
-
-struct plcp_frame *plcp_alloc_tx_frame() {
- struct plcp_frame *pframe;
-
- pframe = __alloc_frame(&plcp_tx_free_queue);
- if (pframe) {
- /* reserve space for header */
- pframe->d_buf += PMD_SLICE_SIZE;
- }
- return pframe;
-}
-
-struct plcp_frame *plcp_alloc_rx_frame() {
- return __alloc_frame(&plcp_rx_free_queue);
-}
-
-void plcp_free_tx_frame(struct plcp_frame *frame) {
- __free_frame(frame, &plcp_tx_free_queue);
-}
-
-void plcp_free_rx_frame(struct plcp_frame *frame) {
- __free_frame(frame, &plcp_rx_free_queue);
-}
-
-
-void plcp_init_frames() {
-
- int i;
- struct plcp_frame *pframe;
-
- INIT_LIST_HEAD(&plcp_tx_free_queue);
- INIT_LIST_HEAD(&plcp_rx_free_queue);
- INIT_LIST_HEAD(&plcp_tx_queue);
- INIT_LIST_HEAD(&plcp_tx_done_queue);
- INIT_LIST_HEAD(&plcp_rx_queue);
-
- for (i=0;i<PLCP_RX_RING_SIZE;i++) {
- pframe = &plcp_rx_frames[i];
- pframe->no = i;
- memset(pframe, 0, sizeof(struct plcp_frame));
- pframe->control = &plcp_rx_control[i];
- pframe->c_buf = plcp_rx_c_buf[i];
- pframe->head = plcp_rx_d_buf[i];
- INIT_LIST_HEAD(&pframe->link);
-#ifndef FEATURE_ENERVATION
- INIT_LIST_HEAD(&pframe->inq);
- INIT_LIST_HEAD(&pframe->mac_frames);
-#endif
- pframe->debug.is_tx_frame = false;
- plcp_free_rx_frame(pframe);
- }
-
- for (i=0;i<PLCP_TX_RING_SIZE;i++) {
- pframe = &plcp_tx_frames[i];
- memset(pframe, 0, sizeof(struct plcp_frame));
- pframe->no = i;
- pframe->control = &plcp_tx_control[i];
- pframe->c_buf = plcp_tx_c_buf[i];
- pframe->head = plcp_tx_d_buf[i];
- INIT_LIST_HEAD(&pframe->link);
-#ifndef FEATURE_ENERVATION
- INIT_LIST_HEAD(&pframe->inq);
- INIT_LIST_HEAD(&pframe->mac_frames);
-#endif
- pframe->debug.is_tx_frame = true;
- plcp_free_tx_frame(pframe);
- }
-}
-
-int plcp_list_snapshot(char *buffer, struct list_head *head) {
- int n = 0;
- char *p = buffer;
- struct list_head *q;
- struct plcp_frame *pframe;
-
- list_for_each(q, head) {
- if (++n > (PLCP_TX_RING_SIZE+PLCP_RX_RING_SIZE+10)) {
- p += sprintf(p, "*** CORRUPTED ***\r\n");
- goto done;
- }
- pframe = list_entry(q, struct plcp_frame, link);
- p += sprintf(p,"%08x ", pframe);
- }
- p += sprintf(p,"\r\n");
-
-done:
- return (p - buffer);
-}
-
-
-int plcp_ring_snapshot(char *buffer, struct plcp_frame *ring, int n) {
-
- char *p = buffer;
- struct plcp_frame *pframe;
-#ifndef FEATURE_ENERVATION
- struct mac_frame *frame;
- struct list_head *q;
-#endif
- int i;
-
- p += sprintf(p," ADDRESS CONTROL C_BUF C_LEN D_BUF D_LEN MAC_FRAMES\n");
- for (i=0, pframe=ring;i<n;i++, pframe++) {
- p += sprintf(p,"%c %08x %08x %08x %5d %08x %5d",
- pframe->debug.is_tx_frame ? 'T' : 'R',
- pframe, pframe->control,
- pframe->c_buf, pframe->c_len,
- pframe->d_buf, pframe->d_len);
-#ifndef FEATURE_ENERVATION
- list_for_each(q, &pframe->mac_frames) {
- frame = list_entry(q, struct mac_frame, link);
- p += sprintf(p,"%d ", frame->idx);
- }
-#endif
- p += sprintf(p, "\r\n");
- }
- return (p - buffer);
-}
-int plcp_snapshot(char *buffer) {
- char *p = buffer;
-
- p += sprintf(p, "PLCP frames\r\n");
- p += plcp_ring_snapshot(p, plcp_tx_frames, PLCP_TX_RING_SIZE);
- p += plcp_ring_snapshot(p, plcp_rx_frames, PLCP_RX_RING_SIZE);
-
- p += sprintf(p, "plcp_tx_free_queue: ");
- p += plcp_list_snapshot(p,&plcp_tx_free_queue);
- p += sprintf(p, "plcp_tx_queue: ");
- p += plcp_list_snapshot(p,&plcp_tx_queue);
- p += sprintf(p, "plcp_tx_done_queue: ");
- p += plcp_list_snapshot(p,&plcp_tx_done_queue);
-
- p += sprintf(p, "plcp_rx_free_queue: ");
- p += plcp_list_snapshot(p,&plcp_rx_free_queue);
- p += sprintf(p, "plcp_rx_queue: ");
- p += plcp_list_snapshot(p,&plcp_rx_queue);
-
- return (p - buffer);
-}
-
-
diff --git a/app/sm-emac-drv/src/plcp_mode_3fec.c b/app/sm-emac-drv/src/plcp_mode_3fec.c
deleted file mode 100644
index d7001a7d3c..0000000000
--- a/app/sm-emac-drv/src/plcp_mode_3fec.c
+++ /dev/null
@@ -1,227 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-
-#define PLCP_3FEC_RATIO 3
-
-static void *__slice_addr[PLCP_MAX_SLICES];
-
-int plcp_mtu_3fec(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots) {
-
- int bits, slices;
- int mtu;
- int refs; /* number of periodic ref */
- if (unit->plcp.config.ref_interval) {
- refs = (slots / unit->plcp.config.ref_interval)
- * unit->plcp.config.nb_periodic_ref;
- slots -= refs;
- if (slots<=0) {
- return 0;
- }
- }
-
- bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits/(PMD_BYTE_SIZE_WITH_VITERBI*PMD_SLICE_SIZE_WITH_REED_SOLOMON);
- if(slices > PLCP_MAX_SLICES) {
- slices = PLCP_MAX_SLICES;
- }
-
- slices = slices/PLCP_3FEC_RATIO;
-
- if (unit->plcp.config.fcs) {
- if (slices>0) {
- mtu = (slices*PMD_SLICE_SIZE) - 4;
- } else {
- mtu = 0;
- }
- } else {
- mtu = (slices*PMD_SLICE_SIZE);
- }
- return mtu;
-}
-
-int plcp_rx_start_3fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int slices = pframe->control->slices;
- struct plcp_uchannel *uchannel = pframe->uchannel;
-
- PLCP_LOG(unit->plcp.rxstart_date, "RX_START 3FEC MODE", 0);
-
- memset(__slice_addr, 0, sizeof(__slice_addr));
-
- PB_ZERO(&pframe->pb_mask);
- pframe->pb_errors = 0;
- pframe->pb_count = 0;
- pframe->pb_done_dma = 0;
-
- unit->PMD->rx_broadcast = 0;
- if (slices > 0) {
- /* compute payload symbols */
- unit->PMD->rx_payload_nb_symbols =
- uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands;
- unit->PMD->rx_slices_number = slices;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_robust_fec >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_robust_fec & 0x0000ffff;
- plcp_set_rx_quality(unit, uchannel);
-
- PLCP_LOG(unit->plcp.rxstart_date, "real slices", slices);
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols",
- uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands);
- PLCP_LOG(unit->plcp.rxstart_date, "d_buf", pframe->d_buf);
- } else {
- unit->PMD->rx_payload_nb_symbols = 0;
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols", 0);
- }
- return slices;
-}
-
-
-static int __rx_slice(struct plc_drv_unit *unit,
- struct plcp_frame *pframe, int n) {
-
- int slice = n / PLCP_3FEC_RATIO;
- int src, dst;
-
- if (__slice_addr[slice]==NULL) {
- /* we do not have a valid copy of this slice yet... */
- if (plcp_slice_valid(n)) {
- src = ((uint32_t)plcp_rx_robust_fec) +(n*PMD_SLICE_SIZE);
- dst = ((uint32_t)pframe->d_buf) + (slice*PMD_SLICE_SIZE);
- PLCP_LOG(n,"slice", slice);
- PLCP_LOG(n,"slice @", src);
- __slice_addr[slice] = (void*)src;
- /* ...and this one is valid: copy it to pframe->d_buf */
- memcpy((void*)dst, (void*)src, PMD_SLICE_SIZE);
- }
- }
- return 0;
-}
-
-
-int plcp_rx_data_3fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int m;
- PLCP_LOG(0, "RX_DATA 3FEC MODE", pframe->pb_done_dma);
- if (pframe->pb_done_dma==0) {
- m = (PLCP_RX_SLICE_INTERVAL/2);
- } else {
- m = pframe->pb_done_dma + PLCP_RX_SLICE_INTERVAL;
- }
- while (pframe->pb_done_dma<m) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
- return 0;
-}
-
-int plcp_rx_end_3fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int slice;
-
- PLCP_LOG(unit->plcp.rxend_date, "RX_END 3FEC MODE",
- pframe->pb_done_dma);
-
- PLCP_LOG(unit->plcp.rxend_date, "control->slices",
- pframe->control->slices);
-
- while (pframe->pb_done_dma<pframe->control->slices) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
-
- /* get valid slices */
- pframe->pb_count = pframe->control->slices / PLCP_3FEC_RATIO;
- for(slice=0;slice<pframe->pb_count;slice++) {
- if (__slice_addr[slice]==NULL) {
- unit->stats.plcp.invalid_slice[slice]++;
- pframe->pb_errors++;
- } else { /* at least one valid slice found */
- unit->stats.plcp.valid_slice[slice]++;
- PB_SET(slice , &pframe->pb_mask);
- }
- }
-
- return (plcp_check_fcs(unit, pframe));
-}
-
-int plcp_tx_start_3fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int slices;
- int symbols;
- int slots;
- int src_offset;
- int dst_offset;
- int slice, i;
-
- PLCP_LOG(unit->plcp.txstart_date, "TX_START 3FEC MODE", 0);
- PLCP_LOG(unit->plcp.txstart_date, "tx_broadcast", 0);
- unit->PMD->tx_broadcast = 0;
-
- pframe->pb_done_dma = 0;
-
- if (pframe->d_len>0) {
-
- plcp_add_fcs(unit, pframe);
-
- slices = (pframe->d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
- for (slice=0; slice<slices; slice++) {
- src_offset = slice*PMD_SLICE_SIZE;
- for (i=0;i<PLCP_3FEC_RATIO;i++) {
- dst_offset = ((slice*PLCP_3FEC_RATIO)+i)*PMD_SLICE_SIZE;
- memcpy(plcp_rx_robust_fec+dst_offset,
- pframe->d_buf+src_offset, PMD_SLICE_SIZE);
- }
- }
-
- slices = slices * PLCP_3FEC_RATIO;
- PLCP_LOG(unit->plcp.txstart_date, "real slices", slices);
-
- slots = pframe->uchannel->lookup.payload_slots[slices];
- PLCP_LOG(unit->plcp.txstart_date, "lookup slots", slots);
- if (slots) {
- plcp_set_tx_quality(unit, pframe->uchannel);
- symbols = unit->nb_bands * slots;
- } else {
- PLCP_LOG(unit->plcp.txstart_date, "no bandwidth -> slices", slices);
- slices = 0;
- symbols = 0;
- }
- pkt_log_add(&plcp_plog, PKT_LOG_TX, 0, (char*)pframe->d_buf);
- } else {
- slices = 0;
- symbols = 0;
- }
-
- PLCP_LOG(unit->plcp.txstart_date, "tx_slices_number", slices);
- PLCP_LOG(unit->plcp.txstart_date, "tx_payload_nb_symbols", symbols);
- unit->PMD->tx_payload_nb_symbols = symbols;
- unit->PMD->tx_slices_number = slices;
- unit->PMD->tx_high_slice_ad = (uint32_t)plcp_rx_robust_fec >> 16;
- unit->PMD->tx_low_slice_ad = (uint32_t)plcp_rx_robust_fec;
-
- return slices;
-}
diff --git a/app/sm-emac-drv/src/plcp_mode_common.c b/app/sm-emac-drv/src/plcp_mode_common.c
deleted file mode 100644
index f6ce8d5c54..0000000000
--- a/app/sm-emac-drv/src/plcp_mode_common.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-
-int plcp_check_control_common(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- int slices;
- struct plcp_control *control = pframe->control;
-
- /* check slices, payload len */
- slices=control->slices;
- if (slices>0)
- {
- /* check slices */
- if (slices>PLCP_MAX_SLICES) {
- unit->stats.plcp.rx_control_bad_slices++;
- return -1;
- }
- /* check payload len */
- pframe->d_len = control->dlen;
- if (pframe->d_len>PLCP_PAYLOAD_SIZE) {
- unit->stats.plcp.rx_control_bad_dlen++;
- return -1;
- }
- } else {
- pframe->d_len=0;
- }
-
- return 0;
-}
diff --git a/app/sm-emac-drv/src/plcp_mode_control.c b/app/sm-emac-drv/src/plcp_mode_control.c
deleted file mode 100644
index 14063b0f9c..0000000000
--- a/app/sm-emac-drv/src/plcp_mode_control.c
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-
-int plcp_check_control_only(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- struct plcp_control *control = pframe->control;
-
- /* do not check payload part (it will be dropped anyway). In addition
- * we cannot check EFR, since we use this channel to receive control
- * part of frames with unknown channel_id.
- */
- pframe->d_len = control->dlen;
-
- return 0;
-}
-void plcp_build_lookup_control(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel) {
-
- int slice;
- for (slice=0; slice<=PLCP_MAX_SLICES; slice++) {
- uchannel->lookup.payload_slots[slice] = 0;
- uchannel->lookup.periodic_ref_slots[slice] = 0;
- }
-}
-
-int plcp_mtu_control(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots) {
- return 0;
-}
-
-int plcp_rx_start_control(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- PLCP_LOG(unit->plcp.rxstart_date, "RX_START CONTROL MODE", 0);
- unit->PMD->rx_broadcast = 0;
- unit->PMD->rx_payload_nb_symbols = 0;
- pframe->pb_errors = 0;
- pframe->pb_count = 0;
- pframe->pb_done_dma = 0;
-
- return 0;
-}
-
-int plcp_rx_more_control(struct plc_drv_unit *unit, struct plcp_frame *pframe)
-{
- PLCP_LOG(unit->plcp.rxstart_date, "RX_MORE CONTROL MODE", 0);
- return -1;
-}
-
-int plcp_rx_end_control(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
- /* should never occur */
- PLCP_LOG(unit->plcp.rxend_date, "*** RX_END CONTROL MODE ***", 0);
- return -1;
-}
-
-
-
-
-
diff --git a/app/sm-emac-drv/src/plcp_mode_fec.c b/app/sm-emac-drv/src/plcp_mode_fec.c
deleted file mode 100644
index f878b24bed..0000000000
--- a/app/sm-emac-drv/src/plcp_mode_fec.c
+++ /dev/null
@@ -1,247 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-
-
-void plcp_scramble_slice(uint32_t *addr) {
- int i;
- extern unsigned long crc32_table[256];
- uint32_t *mask = (uint32_t*)crc32_table;
- for (i=0;i<PMD_SLICE_SIZE/4;i++,addr++, mask++) {
- *addr = (*addr) ^ *(mask);
- }
-}
-
-void plcp_scramble(struct plcp_frame *pframe, int slices) {
-
- int slice;
- uint32_t *addr = (uint32_t*)pframe->d_buf;
- for (slice = 0; slice<slices; slice++) {
- plcp_scramble_slice(addr);
- addr += (PMD_SLICE_SIZE/4);
- }
-}
-
-void plcp_build_lookup_fec(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel) {
-
- int slice, bits, slots;
-
- if (uchannel->lookup.bits_per_slot>0) {
- for (slice=0; slice<=PLCP_MAX_SLICES; slice++) {
- bits = slice*PMD_SLICE_SIZE_WITH_REED_SOLOMON*12;
- slots = (bits + uchannel->lookup.bits_per_slot - 1) /
- uchannel->lookup.bits_per_slot;
- uchannel->lookup.payload_slots[slice] = slots;
- if (unit->plcp.config.ref_interval) {
- uchannel->lookup.periodic_ref_slots[slice] =
- (slots / unit->plcp.config.ref_interval) *
- unit->plcp.config.nb_periodic_ref;
- } else {
- uchannel->lookup.periodic_ref_slots[slice] = 0;
- }
- }
- } else {
- for (slice=0; slice<=PLCP_MAX_SLICES; slice++) {
- uchannel->lookup.payload_slots[slice] = 0;
- uchannel->lookup.periodic_ref_slots[slice] = 0;
- }
- }
-}
-
-int plcp_mtu_fec(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots) {
-
- int bits, slices;
- int mtu;
- int refs; /* number of periodic ref */
- if (unit->plcp.config.ref_interval) {
- refs = (slots / unit->plcp.config.ref_interval)
- * unit->plcp.config.nb_periodic_ref;
- slots -= refs;
- if (slots<=0) {
- return 0;
- }
- }
-
- bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits/(PMD_BYTE_SIZE_WITH_VITERBI*PMD_SLICE_SIZE_WITH_REED_SOLOMON);
- if(slices > PLCP_MAX_SLICES) {
- slices = PLCP_MAX_SLICES;
- }
- if (unit->plcp.config.fcs) {
- if (slices>0) {
- mtu = (slices*PMD_SLICE_SIZE) - 4;
- } else {
- mtu = 0;
- }
- } else {
- mtu = (slices*PMD_SLICE_SIZE);
- }
- return mtu;
-}
-
-int plcp_rx_start_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- return unit->emac.slices;
-}
-
-
-int plcp_rx_more_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- return 0;
-}
-
-
-static int __rx_slice(struct plc_drv_unit *unit,
- struct plcp_frame *pframe, int slice) {
-
- if (plcp_slice_valid(slice)) {
- unit->stats.plcp.valid_slice[slice]++;
- PB_SET(slice , &pframe->pb_mask);
- return 0;
- } else {
- unit->stats.plcp.invalid_slice[slice]++;
- pframe->pb_errors++;
- return -1;
- }
-}
-
-
-int plcp_rx_data_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int m;
- PLCP_LOG(0, "RX_DATA FEC MODE", pframe->pb_done_dma);
- if (pframe->pb_done_dma==0) {
- m = (PLCP_RX_SLICE_INTERVAL/2);
- } else {
- m = pframe->pb_done_dma + PLCP_RX_SLICE_INTERVAL;
- }
- while (pframe->pb_done_dma<m) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
- return 0;
-}
-
-int plcp_rx_end_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- PLCP_LOG(unit->plcp.rxend_date, "RX_END FEC MODE",
- pframe->pb_done_dma);
-
- while (pframe->pb_done_dma<unit->emac.slices) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
-
- pframe->pb_count = unit->emac.slices;
-
- return (plcp_check_fcs(unit, pframe));
-}
-
-int plcp_add_fcs(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- uint32_t fcs;
- if ((pframe->d_len>0) && (unit->plcp.config.fcs)) {
- fcs = plcp_fcs(pframe->d_buf, pframe->d_len);
- PLCP_LOG(0,"fcs",fcs);
- memcpy(pframe->d_buf + pframe->d_len, &fcs, sizeof(fcs));
- pframe->d_len += sizeof(fcs);
- }
- return 0;
-}
-
-int plcp_check_fcs(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- uint32_t fcs1, fcs2;
- if (unit->plcp.config.fcs) {
- if (pframe->d_len<4) {
- unit->stats.plcp.rx_control_bad_dlen++;
- FD_ZERO(&pframe->pb_mask);
- } else {
- pframe->d_len -= sizeof(fcs1);
- memcpy(&fcs1, pframe->d_buf+pframe->d_len, sizeof(fcs1));
- fcs2 = plcp_fcs(pframe->d_buf, pframe->d_len);
- PLCP_LOG(0,"fcs1",fcs1);
- PLCP_LOG(0,"fcs2",fcs2);
- if(fcs1 != fcs2) {
- // discard the frame if the crc is not valid
- unit->stats.plcp.bad_fcs++;
- FD_ZERO(&pframe->pb_mask);
- pframe->pb_errors++;
- }
- }
- }
- return (pframe->pb_errors ? -1 : 0);
-}
-
-int plcp_tx_start_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int slices;
- int symbols;
- int slots;
-
- PLCP_LOG(unit->plcp.txstart_date, "tx_broadcast", 0);
- unit->PMD->tx_broadcast = 0;
-
- pframe->pb_done_dma = 0;
-
- if (pframe->d_len>0) {
-
- plcp_add_fcs(unit, pframe);
-
- slices = (pframe->d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
- PLCP_LOG(unit->plcp.txstart_date, "slices", slices);
-
- slots = pframe->uchannel->lookup.payload_slots[slices];
- PLCP_LOG(unit->plcp.txstart_date, "lookup slots", slots);
- if (slots) {
- plcp_set_tx_quality(unit, pframe->uchannel);
- symbols = unit->nb_bands * slots;
- } else {
- PLCP_LOG(unit->plcp.txstart_date, "no bandwidth -> slices", slices);
- slices = 0;
- symbols = 0;
- }
- pkt_log_add(&plcp_plog, PKT_LOG_TX, 0, (char*)pframe->d_buf);
- } else {
- slices = 0;
- symbols = 0;
- }
-
- PLCP_LOG(unit->plcp.txstart_date, "tx_slices_number", slices);
- PLCP_LOG(unit->plcp.txstart_date, "tx_payload_nb_symbols", symbols);
- unit->PMD->tx_payload_nb_symbols = symbols;
- unit->PMD->tx_slices_number = slices;
- unit->PMD->tx_high_slice_ad = (uint32_t)pframe->d_buf >> 16;
- unit->PMD->tx_low_slice_ad = (uint32_t)pframe->d_buf;
-
- return slices;
-}
-
-int plcp_tx_data_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- pframe->pb_done_dma += PLCP_TX_SLICE_INTERVAL;
- return 0;
-}
-
diff --git a/app/sm-emac-drv/src/plcp_mode_robust_fec.c b/app/sm-emac-drv/src/plcp_mode_robust_fec.c
deleted file mode 100644
index 7f9dd70748..0000000000
--- a/app/sm-emac-drv/src/plcp_mode_robust_fec.c
+++ /dev/null
@@ -1,302 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#endif
-
-#include "plc_dbg.h"
-
-#include "plc_drv.h"
-#include "plc_pmd.h"
-#include "plc_plcp.h"
-#include "plc_mac.h"
-#include "plc_rx_buffer.h"
-#include "plc_tx_buffer.h"
-#include "plc_dbg.h"
-#include "plc_test.h"
-#include "plc_ber.h"
-#include "list.h"
-#ifndef __KERNEL__
-#include "time.h"
-#endif
-#include "pkt_log_if.h"
-#include "plc_ce.h"
-#include "plcp_core.h"
-
-int robust_fec_slice_count[PMD_MAX_BANDS];
-void *robust_fec_slice_addr[PMD_MAX_SLICES];
-int robust_fec_slice_band[PMD_MAX_SLICES];
-int robust_fec_slices = 0;
-
-void plcp_build_lookup_robust_fec(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel) {
-
- int slice, slots, band, bits, bits_per_slot;
-
- /* get band with lowest bits per symbol */
- bits_per_slot = PMD_MAX_BANDS*PMD_CARRIERS_PER_BAND*8 /* QAM256 */;
- for (band=1; band<PMD_MAX_BANDS; band++) {
- if (band_is_used(unit, band) && !((band<<1)&uchannel->unused_bands)) {
- if (uchannel->bits_per_band[band]<bits_per_slot) {
- bits_per_slot = uchannel->bits_per_band[band];
- }
- }
- }
-
- /* for each slice count, compute related symbols and efr */
- bits = 0;
- band = 0;
- slots = 0;
- slice = 0;
-
- uchannel->lookup.bits_per_slot = bits_per_slot;
- if (bits_per_slot>0) {
- for (slice=0; slice<= PLCP_MAX_SLICES; slice++) {
- bits = slice*PMD_SLICE_SIZE_WITH_REED_SOLOMON*12;
- slots = (bits + bits_per_slot - 1) / bits_per_slot;
- uchannel->lookup.payload_slots[slice] = slots;
- if (unit->plcp.config.ref_interval) {
- uchannel->lookup.periodic_ref_slots[slice] =
- (slots / unit->plcp.config.ref_interval) *
- unit->plcp.config.nb_periodic_ref;
- } else {
- uchannel->lookup.periodic_ref_slots[slice] = 0;
- }
- }
- } else {
- for (slice=0; slice<= PLCP_MAX_SLICES; slice++) {
- uchannel->lookup.payload_slots[slice] = 0;
- uchannel->lookup.periodic_ref_slots[slice] = 0;
- }
- }
-}
-
-int plcp_mtu_robust_fec(struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots) {
-
- int bits, slices, slices_n;
- int mtu;
- int refs; /* number of periodic ref */
- if (unit->plcp.config.ref_interval) {
- refs = (slots / unit->plcp.config.ref_interval)
- * unit->plcp.config.nb_periodic_ref;
- slots -= refs;
- if (slots<=0) {
- return 0;
- }
- }
-
- bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits/(PMD_BYTE_SIZE_WITH_VITERBI*PMD_SLICE_SIZE_WITH_REED_SOLOMON);
- slices_n = unit->nb_bands * slices;
-
- /*
- * PHLIC is dimensionned to keep track of PMD_MAX_SLICES only.
- * we cannot use as many slices as in extended frames
- * (PLCP_MAX_SLICES)
- */
- if(slices_n > PMD_MAX_SLICES) {
- slices = PMD_MAX_SLICES / unit->nb_bands;
- }
- if (unit->plcp.config.fcs) {
- if (slices>0) {
- mtu = (slices*PMD_SLICE_SIZE) - 4;
- } else {
- mtu = 0;
- }
- } else {
- mtu = (slices*PMD_SLICE_SIZE);
- }
- return mtu;
-}
-
-int plcp_rx_start_robust_fec(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- int slices = pframe->control->slices;
- struct plcp_uchannel *uchannel = pframe->uchannel;
-
- unit->PMD->rx_broadcast = 1;
-
- PB_ZERO(&pframe->pb_mask);
- pframe->pb_errors = 0;
- pframe->pb_done_dma = 0;
- pframe->pb_count = 0;
-
- memset(robust_fec_slice_count,0,sizeof(robust_fec_slice_count));
- memset(robust_fec_slice_addr,0,sizeof(robust_fec_slice_addr));
-
-
- if (slices > 0) {
- /* compute payload symbols */
- unit->PMD->rx_payload_nb_symbols =
- uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands;
- unit->PMD->rx_slices_number = slices * pframe->nb_rx_bands;
- unit->PMD->rx_high_slice_ad = (uint32_t)plcp_rx_robust_fec >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t)plcp_rx_robust_fec & 0x0000ffff;
- plcp_set_rx_quality(unit, uchannel);
-
- PLCP_LOG(unit->plcp.rxstart_date, "slices", slices);
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols",
- uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands);
- PLCP_LOG(unit->plcp.rxstart_date, "d_buf", pframe->d_buf);
- PLCP_LOG(unit->plcp.rxstart_date, "nb_rx_bands", pframe->nb_rx_bands);
-
- } else {
- unit->PMD->rx_payload_nb_symbols = 0;
- PLCP_LOG(unit->plcp.rxstart_date, "rx_payload_nb_symbols", 0);
-
- }
-
- return 0;
-}
-
-int plcp_rx_more_robust_fec(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- /* even if some starts were not detected, we can receive data
- * correctly in robust FEC mode.
- */
- pmd_set_dsp_pilots(pframe->uchannel->pilots);
- unit->plcp.state = PLCP_STATE_RX_DATA;
- return 0;
-}
-
-static int __rx_slice(struct plc_drv_unit *unit,
- struct plcp_frame *pframe, int n) {
-
- int band;
- uint32_t src; /* slice copy address in robust FEC buffer */
- uint32_t dst; /* slice address in the target frame */
- int slice; /* slice number in the target frame */
-
- /* check on which band the slice was received */
- band = pmd_get_slice_band(n);
-
- /* get the slice number for this band */
- slice = robust_fec_slice_count[band];
- robust_fec_slice_count[band]++;
-
- if (robust_fec_slice_addr[slice]==NULL) {
- /* we do not have a valid copy of this slice yet... */
- if (plcp_slice_valid(n)) {
- src = ((uint32_t)plcp_rx_robust_fec) +(n*PMD_SLICE_SIZE);
- dst = ((uint32_t)pframe->d_buf) + (slice*PMD_SLICE_SIZE);
- PLCP_LOG(n,"slice", slice);
- PLCP_LOG(n,"slice @", src);
- PLCP_LOG(n,"band", band);
- robust_fec_slice_addr[slice] = (void*)src;
- robust_fec_slice_band[slice] = band;
- /* ...and this one is valid: copy it to pframe->d_buf */
- memcpy((void*)dst, (void*)src, PMD_SLICE_SIZE);
- }
- }
- return 0;
-}
-
-int plcp_rx_data_robust_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- int m;
- PLCP_LOG(0, "RX_DATA ROBUST FEC MODE", pframe->pb_done_dma);
- if (pframe->pb_done_dma==0) {
- m = (PLCP_RX_SLICE_INTERVAL/2);
- } else {
- m = pframe->pb_done_dma + PLCP_RX_SLICE_INTERVAL;
- }
- while (pframe->pb_done_dma<m) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
- return 0;
-}
-
-int plcp_rx_end_robust_fec(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- int slice;
- int status = 0;
- int m = pframe->control->slices * pframe->nb_rx_bands;
-
- PLCP_LOG(0, "RX_END ROBUST FEC MODE", pframe->pb_done_dma);
- while (pframe->pb_done_dma<m) {
- __rx_slice(unit, pframe, pframe->pb_done_dma);
- pframe->pb_done_dma++;
- }
-
- /* get valid slices */
- for(slice=0;slice<pframe->control->slices;slice++) {
- if (robust_fec_slice_addr[slice]==NULL) {
- unit->stats.plcp.invalid_slice[slice]++;
- pframe->pb_errors++;
- status = -1;
- } else { /* at least one valid slice found */
- unit->stats.plcp.valid_slice[slice]++;
- PB_SET(slice , &pframe->pb_mask);
- }
- }
- robust_fec_slices = pframe->control->slices;
- pframe->pb_count = pframe->control->slices;
-
- return (plcp_check_fcs(unit, pframe));
-}
-
-void plcp_robust_fec_status(struct plc_drv_unit *unit) {
-
- int slice;
- for (slice=0; slice<robust_fec_slices; slice++) {
- printf("slice %d ......... band %d / addr 0x%08x\n",
- slice,
- robust_fec_slice_band[slice],
- robust_fec_slice_addr[slice]);
- }
-}
-
-int robust_fec_slice_count[PMD_MAX_BANDS];
-
- /*
- * robust FEC using a single band, can contains at most
- * PMD_MAX_SLICES (the maximum handled by PHLIC for in "Broadcast"
- * mode
- */
-void *robust_fec_slice_addr[PMD_MAX_SLICES];
-
-int plcp_tx_start_robust_fec(struct plc_drv_unit *unit,
- struct plcp_frame *pframe) {
-
- int slices;
-
- PLCP_LOG(unit->plcp.txstart_date, "tx_broadcast", 1);
- unit->PMD->tx_broadcast = 1;
- pframe->pb_done_dma = 0;
-
- if (pframe->d_len>0) {
-
- plcp_add_fcs(unit, pframe);
-
- slices = (pframe->d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
-
- pkt_log_add(&plcp_plog, PKT_LOG_TX, 0, (char*)pframe->d_buf);
- plcp_set_tx_quality(unit, pframe->uchannel);
-
- unit->PMD->tx_payload_nb_symbols = unit->nb_bands
- * pframe->uchannel->lookup.payload_slots[slices];
- } else {
- slices = 0;
- unit->PMD->tx_payload_nb_symbols = 0;
- }
- unit->PMD->tx_slices_number = slices;
- unit->PMD->tx_high_slice_ad = (uint32_t)pframe->d_buf >> 16;
- unit->PMD->tx_low_slice_ad = (uint32_t)pframe->d_buf;
-
- return slices;
-}
-
-int plcp_tx_data_robust_fec(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
-
- pframe->pb_done_dma += PLCP_TX_SLICE_INTERVAL;
- return 0;
-}
-
-
diff --git a/app/sm-emac-drv/src/plcp_patterns.c b/app/sm-emac-drv/src/plcp_patterns.c
deleted file mode 100644
index 42a209b610..0000000000
--- a/app/sm-emac-drv/src/plcp_patterns.c
+++ /dev/null
@@ -1,5157 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#endif
-#include "platform.h"
-#include "plcp_core.h"
-
-uint32_t plcp_shrinked_patterns[BER_PATTERN_MAX+1][FEC_SHRINKED_MEMSIZE] = {
- { /* BER_PATTERN_00 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 0-15 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 16-31 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 32-47 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 48-63 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 64-79 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 80-95 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 96-111 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 112-127 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 128-143 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 144-159 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 160-175 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 176-191 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 192-207 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 208-223 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 224-239 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 240-255 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 256-271 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 272-287 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 288-303 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 304-319 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 320-335 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 336-351 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 352-367 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 368-383 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 384-399 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 400-415 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 416-431 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 432-447 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 448-463 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 464-479 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 480-495 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 496-511 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 512-527 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 528-543 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 544-559 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 560-575 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 576-591 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 592-607 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 608-623 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 624-639 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 640-655 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 656-671 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 672-687 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 688-703 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 704-719 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 720-735 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 736-751 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 752-767 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 768-783 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 784-799 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 800-815 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 816-831 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 832-847 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 848-863 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 864-879 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 880-895 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 896-911 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 912-927 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 928-943 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 944-959 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 960-975 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 976-991 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 992-1007 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1008-1023 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1024-1039 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1040-1055 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1056-1071 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1072-1087 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1088-1103 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1104-1119 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1120-1135 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1136-1151 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1152-1167 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1168-1183 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1184-1199 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1200-1215 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1216-1231 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1232-1247 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1248-1263 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1264-1279 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1280-1295 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1296-1311 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1312-1327 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1328-1343 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1344-1359 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1360-1375 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1376-1391 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1392-1407 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1408-1423 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1424-1439 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1440-1455 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1456-1471 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1472-1487 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1488-1503 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1504-1519 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1520-1535 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1536-1551 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1552-1567 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1568-1583 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1584-1599 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1600-1615 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1616-1631 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1632-1647 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1648-1663 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1664-1679 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1680-1695 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1696-1711 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1712-1727 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1728-1743 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1744-1759 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1760-1775 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1776-1791 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1792-1807 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1808-1823 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1824-1839 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1840-1855 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1856-1871 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1872-1887 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1888-1903 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1904-1919 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1920-1935 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1936-1951 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1952-1967 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1968-1983 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 1984-1999 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2000-2015 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2016-2031 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2032-2047 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2048-2063 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2064-2079 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2080-2095 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2096-2111 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2112-2127 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2128-2143 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2144-2159 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2160-2175 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2176-2191 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2192-2207 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2208-2223 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2224-2239 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2240-2255 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2256-2271 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2272-2287 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2288-2303 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2304-2319 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2320-2335 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2336-2351 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2352-2367 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2368-2383 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2384-2399 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2400-2415 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2416-2431 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2432-2447 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2448-2463 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2464-2479 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2480-2495 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2496-2511 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2512-2527 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2528-2543 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2544-2559 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2560-2575 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2576-2591 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2592-2607 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2608-2623 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2624-2639 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2640-2655 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2656-2671 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2672-2687 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2688-2703 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2704-2719 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2720-2735 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2736-2751 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2752-2767 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2768-2783 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2784-2799 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2800-2815 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2816-2831 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2832-2847 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2848-2863 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2864-2879 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2880-2895 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2896-2911 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2912-2927 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2928-2943 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2944-2959 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2960-2975 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2976-2991 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 2992-3007 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3008-3023 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3024-3039 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3040-3055 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3056-3071 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3072-3087 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3088-3103 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3104-3119 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3120-3135 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3136-3151 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3152-3167 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3168-3183 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3184-3199 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3200-3215 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3216-3231 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3232-3247 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3248-3263 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3264-3279 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3280-3295 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3296-3311 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3312-3327 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3328-3343 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3344-3359 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3360-3375 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3376-3391 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3392-3407 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3408-3423 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3424-3439 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3440-3455 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3456-3471 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3472-3487 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3488-3503 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3504-3519 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3520-3535 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3536-3551 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3552-3567 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3568-3583 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3584-3599 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3600-3615 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3616-3631 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3632-3647 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3648-3663 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3664-3679 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3680-3695 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3696-3711 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3712-3727 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3728-3743 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3744-3759 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3760-3775 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3776-3791 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3792-3807 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3808-3823 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3824-3839 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3840-3855 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3856-3871 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3872-3887 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3888-3903 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3904-3919 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3920-3935 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3936-3951 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3952-3967 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3968-3983 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 3984-3999 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4000-4015 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4016-4031 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4032-4047 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4048-4063 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4064-4079 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4080-4095 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4096-4111 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4112-4127 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4128-4143 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4144-4159 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4160-4175 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4176-4191 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4192-4207 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4208-4223 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4224-4239 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4240-4255 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4256-4271 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4272-4287 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4288-4303 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4304-4319 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4320-4335 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4336-4351 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4352-4367 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4368-4383 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4384-4399 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4400-4415 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4416-4431 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4432-4447 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4448-4463 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4464-4479 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4480-4495 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4496-4511 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4512-4527 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4528-4543 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4544-4559 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4560-4575 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4576-4591 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4592-4607 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4608-4623 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4624-4639 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4640-4655 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4656-4671 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4672-4687 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4688-4703 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4704-4719 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4720-4735 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4736-4751 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4752-4767 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4768-4783 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4784-4799 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4800-4815 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4816-4831 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4832-4847 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4848-4863 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4864-4879 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4880-4895 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4896-4911 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4912-4927 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4928-4943 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4944-4959 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4960-4975 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4976-4991 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 4992-5007 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5008-5023 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5024-5039 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5040-5055 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5056-5071 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5072-5087 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5088-5103 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5104-5119 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5120-5135 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5136-5151 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5152-5167 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5168-5183 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5184-5199 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5200-5215 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5216-5231 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5232-5247 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5248-5263 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5264-5279 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5280-5295 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5296-5311 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5312-5327 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5328-5343 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5344-5359 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5360-5375 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5376-5391 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5392-5407 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5408-5423 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5424-5439 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5440-5455 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5456-5471 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5472-5487 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5488-5503 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5504-5519 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5520-5535 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5536-5551 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5552-5567 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5568-5583 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5584-5599 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5600-5615 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5616-5631 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5632-5647 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5648-5663 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5664-5679 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5680-5695 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5696-5711 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5712-5727 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5728-5743 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5744-5759 */
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 5760-5775 */
- 0x00000000, 0x00000000
- },
- { /* BER_PATTERN_FF */
- 0xfffffa9b, 0xffffffff, 0xffffffff, 0xffffffff, /* 0-15 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 16-31 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 32-47 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 48-63 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 64-79 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 80-95 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 96-111 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 112-127 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 128-143 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 144-159 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 160-175 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 176-191 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 192-207 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 208-223 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 224-239 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 240-255 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 256-271 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 272-287 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 288-303 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 304-319 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 320-335 */
- 0x9f584dc8, 0xd7435226, 0x1bed4573, 0xdf0e859b, /* 336-351 */
- 0x69fe66b1, 0x05cd79e3, 0xffa9b3b4, 0xffffffff, /* 352-367 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 368-383 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 384-399 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 400-415 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 416-431 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 432-447 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 448-463 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 464-479 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 480-495 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 496-511 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 512-527 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 528-543 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 544-559 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 560-575 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 576-591 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 592-607 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 608-623 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 624-639 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 640-655 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 656-671 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 672-687 */
- 0xffffffff, 0xffffffff, 0x84dc8fff, 0x352269f5, /* 688-703 */
- 0xd4573d74, 0xe859b1be, 0xe66b1df0, 0xd79e369f, /* 704-719 */
- 0x9b3b405c, 0xfffffffa, 0xffffffff, 0xffffffff, /* 720-735 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 736-751 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 752-767 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 768-783 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 784-799 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 800-815 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 816-831 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 832-847 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 848-863 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 864-879 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 880-895 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 896-911 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 912-927 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 928-943 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 944-959 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 960-975 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 976-991 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 992-1007 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1008-1023 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1024-1039 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1040-1055 */
- 0xc8ffffff, 0x269f584d, 0x73d74352, 0x9b1bed45, /* 1056-1071 */
- 0xb1df0e85, 0xe369fe66, 0xb405cd79, 0xffffa9b3, /* 1072-1087 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1088-1103 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1104-1119 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1120-1135 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1136-1151 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1152-1167 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1168-1183 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1184-1199 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1200-1215 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1216-1231 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1232-1247 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1248-1263 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1264-1279 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1280-1295 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1296-1311 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1312-1327 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1328-1343 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1344-1359 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1360-1375 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1376-1391 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1392-1407 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xf584dc8f, /* 1408-1423 */
- 0x74352269, 0xbed4573d, 0xf0e859b1, 0x9fe66b1d, /* 1424-1439 */
- 0x5cd79e36, 0xfa9b3b40, 0xffffffff, 0xffffffff, /* 1440-1455 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1456-1471 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1472-1487 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1488-1503 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1504-1519 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1520-1535 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1536-1551 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1552-1567 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1568-1583 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1584-1599 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1600-1615 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1616-1631 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1632-1647 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1648-1663 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1664-1679 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1680-1695 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1696-1711 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1712-1727 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1728-1743 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1744-1759 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1760-1775 */
- 0xffffffff, 0x4dc8ffff, 0x52269f58, 0x4573d743, /* 1776-1791 */
- 0x859b1bed, 0x66b1df0e, 0x79e369fe, 0xb3b405cd, /* 1792-1807 */
- 0xffffffa9, 0xffffffff, 0xffffffff, 0xffffffff, /* 1808-1823 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1824-1839 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1840-1855 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1856-1871 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1872-1887 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1888-1903 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1904-1919 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1920-1935 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1936-1951 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1952-1967 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1968-1983 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 1984-1999 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2000-2015 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2016-2031 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2032-2047 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2048-2063 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2064-2079 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2080-2095 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2096-2111 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2112-2127 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0x8fffffff, /* 2128-2143 */
- 0x69f584dc, 0x3d743522, 0xb1bed457, 0x1df0e859, /* 2144-2159 */
- 0x369fe66b, 0x405cd79e, 0xfffa9b3b, 0xffffffff, /* 2160-2175 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2176-2191 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2192-2207 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2208-2223 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2224-2239 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2240-2255 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2256-2271 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2272-2287 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2288-2303 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2304-2319 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2320-2335 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2336-2351 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2352-2367 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2368-2383 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2384-2399 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2400-2415 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2416-2431 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2432-2447 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2448-2463 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2464-2479 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2480-2495 */
- 0xffffffff, 0xffffffff, 0x584dc8ff, 0x4352269f, /* 2496-2511 */
- 0xed4573d7, 0x0e859b1b, 0xfe66b1df, 0xcd79e369, /* 2512-2527 */
- 0xa9b3b405, 0xffffffff, 0xffffffff, 0xffffffff, /* 2528-2543 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2544-2559 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2560-2575 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2576-2591 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2592-2607 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2608-2623 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2624-2639 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2640-2655 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2656-2671 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2672-2687 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2688-2703 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2704-2719 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2720-2735 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2736-2751 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2752-2767 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2768-2783 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2784-2799 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2800-2815 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2816-2831 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2832-2847 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2848-2863 */
- 0xdc8fffff, 0x2269f584, 0x573d7435, 0x59b1bed4, /* 2864-2879 */
- 0x6b1df0e8, 0x9e369fe6, 0x3b405cd7, 0xfffffa9b, /* 2880-2895 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2896-2911 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2912-2927 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2928-2943 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2944-2959 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2960-2975 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2976-2991 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 2992-3007 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3008-3023 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3024-3039 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3040-3055 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3056-3071 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3072-3087 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3088-3103 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3104-3119 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3120-3135 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3136-3151 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3152-3167 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3168-3183 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3184-3199 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3200-3215 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0x9f584dc8, /* 3216-3231 */
- 0xd7435226, 0x1bed4573, 0xdf0e859b, 0x69fe66b1, /* 3232-3247 */
- 0x05cd79e3, 0xffa9b3b4, 0xffffffff, 0xffffffff, /* 3248-3263 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3264-3279 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3280-3295 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3296-3311 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3312-3327 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3328-3343 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3344-3359 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3360-3375 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3376-3391 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3392-3407 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3408-3423 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3424-3439 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3440-3455 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3456-3471 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3472-3487 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3488-3503 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3504-3519 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3520-3535 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3536-3551 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3552-3567 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3568-3583 */
- 0xffffffff, 0x84dc8fff, 0x352269f5, 0xd4573d74, /* 3584-3599 */
- 0xe859b1be, 0xe66b1df0, 0xd79e369f, 0x9b3b405c, /* 3600-3615 */
- 0xfffffffa, 0xffffffff, 0xffffffff, 0xffffffff, /* 3616-3631 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3632-3647 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3648-3663 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3664-3679 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3680-3695 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3696-3711 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3712-3727 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3728-3743 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3744-3759 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3760-3775 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3776-3791 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3792-3807 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3808-3823 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3824-3839 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3840-3855 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3856-3871 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3872-3887 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3888-3903 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3904-3919 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3920-3935 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xc8ffffff, /* 3936-3951 */
- 0x269f584d, 0x73d74352, 0x9b1bed45, 0xb1df0e85, /* 3952-3967 */
- 0xe369fe66, 0xb405cd79, 0xffffa9b3, 0xffffffff, /* 3968-3983 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 3984-3999 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4000-4015 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4016-4031 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4032-4047 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4048-4063 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4064-4079 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4080-4095 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4096-4111 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4112-4127 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4128-4143 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4144-4159 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4160-4175 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4176-4191 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4192-4207 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4208-4223 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4224-4239 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4240-4255 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4256-4271 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4272-4287 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4288-4303 */
- 0xffffffff, 0xffffffff, 0xf584dc8f, 0x74352269, /* 4304-4319 */
- 0xbed4573d, 0xf0e859b1, 0x9fe66b1d, 0x5cd79e36, /* 4320-4335 */
- 0xfa9b3b40, 0xffffffff, 0xffffffff, 0xffffffff, /* 4336-4351 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4352-4367 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4368-4383 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4384-4399 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4400-4415 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4416-4431 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4432-4447 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4448-4463 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4464-4479 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4480-4495 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4496-4511 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4512-4527 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4528-4543 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4544-4559 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4560-4575 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4576-4591 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4592-4607 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4608-4623 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4624-4639 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4640-4655 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4656-4671 */
- 0x4dc8ffff, 0x52269f58, 0x4573d743, 0x859b1bed, /* 4672-4687 */
- 0x66b1df0e, 0x79e369fe, 0xb3b405cd, 0xffffffa9, /* 4688-4703 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4704-4719 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4720-4735 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4736-4751 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4752-4767 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4768-4783 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4784-4799 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4800-4815 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4816-4831 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4832-4847 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4848-4863 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4864-4879 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4880-4895 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4896-4911 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4912-4927 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4928-4943 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4944-4959 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4960-4975 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4976-4991 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 4992-5007 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5008-5023 */
- 0xffffffff, 0xffffffff, 0x8fffffff, 0x69f584dc, /* 5024-5039 */
- 0x3d743522, 0xb1bed457, 0x1df0e859, 0x369fe66b, /* 5040-5055 */
- 0x405cd79e, 0xfffa9b3b, 0xffffffff, 0xffffffff, /* 5056-5071 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5072-5087 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5088-5103 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5104-5119 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5120-5135 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5136-5151 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5152-5167 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5168-5183 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5184-5199 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5200-5215 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5216-5231 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5232-5247 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5248-5263 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5264-5279 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5280-5295 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5296-5311 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5312-5327 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5328-5343 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5344-5359 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5360-5375 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5376-5391 */
- 0xffffffff, 0x584dc8ff, 0x4352269f, 0xed4573d7, /* 5392-5407 */
- 0x0e859b1b, 0xfe66b1df, 0xcd79e369, 0xa9b3b405, /* 5408-5423 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5424-5439 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5440-5455 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5456-5471 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5472-5487 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5488-5503 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5504-5519 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5520-5535 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5536-5551 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5552-5567 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5568-5583 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5584-5599 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5600-5615 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5616-5631 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5632-5647 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5648-5663 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5664-5679 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5680-5695 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5696-5711 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5712-5727 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, /* 5728-5743 */
- 0xffffffff, 0xffffffff, 0xffffffff, 0xdc8fffff, /* 5744-5759 */
- 0x2269f584, 0x573d7435, 0x59b1bed4, 0x6b1df0e8, /* 5760-5775 */
- 0x9e369fe6, 0x3b405cd7
- },
- { /* BER_PATTERN_0F */
- 0x9619619b, 0x61961961, 0x19619619, 0x96196196, /* 0-15 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 16-31 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 32-47 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 48-63 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 64-79 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 80-95 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 96-111 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 112-127 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 128-143 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 144-159 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 160-175 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 176-191 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 192-207 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 208-223 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 224-239 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 240-255 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 256-271 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 272-287 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 288-303 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 304-319 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 320-335 */
- 0x519b34a1, 0x4f7538bc, 0xe988f33b, 0xf0d6d181, /* 336-351 */
- 0x224d502f, 0xf878a461, 0x9619b003, 0x61961961, /* 352-367 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 368-383 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 384-399 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 400-415 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 416-431 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 432-447 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 448-463 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 464-479 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 480-495 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 496-511 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 512-527 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 528-543 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 544-559 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 560-575 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 576-591 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 592-607 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 608-623 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 624-639 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 640-655 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 656-671 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 672-687 */
- 0x61961961, 0x19619619, 0xb34a1196, 0x538bc519, /* 688-703 */
- 0x8f33b4f7, 0x6d181e98, 0xd502ff0d, 0x8a461224, /* 704-719 */
- 0x9b003f87, 0x61961961, 0x19619619, 0x96196196, /* 720-735 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 736-751 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 752-767 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 768-783 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 784-799 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 800-815 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 816-831 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 832-847 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 848-863 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 864-879 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 880-895 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 896-911 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 912-927 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 928-943 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 944-959 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 960-975 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 976-991 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 992-1007 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1008-1023 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1024-1039 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1040-1055 */
- 0xa1196196, 0xbc519b34, 0x3b4f7538, 0x81e988f3, /* 1056-1071 */
- 0x2ff0d6d1, 0x61224d50, 0x03f878a4, 0x619619b0, /* 1072-1087 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1088-1103 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1104-1119 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1120-1135 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1136-1151 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1152-1167 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1168-1183 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1184-1199 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1200-1215 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1216-1231 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1232-1247 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1248-1263 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1264-1279 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1280-1295 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1296-1311 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1312-1327 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1328-1343 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1344-1359 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1360-1375 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1376-1391 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1392-1407 */
- 0x61961961, 0x19619619, 0x96196196, 0x19b34a11, /* 1408-1423 */
- 0xf7538bc5, 0x988f33b4, 0x0d6d181e, 0x24d502ff, /* 1424-1439 */
- 0x878a4612, 0x619b003f, 0x19619619, 0x96196196, /* 1440-1455 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1456-1471 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1472-1487 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1488-1503 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1504-1519 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1520-1535 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1536-1551 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1552-1567 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1568-1583 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1584-1599 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1600-1615 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1616-1631 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1632-1647 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1648-1663 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1664-1679 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1680-1695 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1696-1711 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1712-1727 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1728-1743 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1744-1759 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1760-1775 */
- 0x96196196, 0x34a11961, 0x38bc519b, 0xf33b4f75, /* 1776-1791 */
- 0xd181e988, 0x502ff0d6, 0xa461224d, 0xb003f878, /* 1792-1807 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1808-1823 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1824-1839 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1840-1855 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1856-1871 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1872-1887 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1888-1903 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1904-1919 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1920-1935 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1936-1951 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 1952-1967 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 1968-1983 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 1984-1999 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2000-2015 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2016-2031 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2032-2047 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2048-2063 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2064-2079 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2080-2095 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2096-2111 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2112-2127 */
- 0x61961961, 0x19619619, 0x96196196, 0x11961961, /* 2128-2143 */
- 0xc519b34a, 0xb4f7538b, 0x1e988f33, 0xff0d6d18, /* 2144-2159 */
- 0x1224d502, 0x3f878a46, 0x19619b00, 0x96196196, /* 2160-2175 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2176-2191 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2192-2207 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2208-2223 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2224-2239 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2240-2255 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2256-2271 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2272-2287 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2288-2303 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2304-2319 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2320-2335 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2336-2351 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2352-2367 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2368-2383 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2384-2399 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2400-2415 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2416-2431 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2432-2447 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2448-2463 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2464-2479 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2480-2495 */
- 0x96196196, 0x61961961, 0x9b34a119, 0x7538bc51, /* 2496-2511 */
- 0x88f33b4f, 0xd6d181e9, 0x4d502ff0, 0x78a46122, /* 2512-2527 */
- 0x19b003f8, 0x96196196, 0x61961961, 0x19619619, /* 2528-2543 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2544-2559 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2560-2575 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2576-2591 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2592-2607 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2608-2623 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2624-2639 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2640-2655 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2656-2671 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2672-2687 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2688-2703 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2704-2719 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2720-2735 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2736-2751 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2752-2767 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2768-2783 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2784-2799 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2800-2815 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2816-2831 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2832-2847 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2848-2863 */
- 0x4a119619, 0x8bc519b3, 0x33b4f753, 0x181e988f, /* 2864-2879 */
- 0x02ff0d6d, 0x461224d5, 0x003f878a, 0x9619619b, /* 2880-2895 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2896-2911 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2912-2927 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2928-2943 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2944-2959 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 2960-2975 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 2976-2991 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 2992-3007 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3008-3023 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3024-3039 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3040-3055 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3056-3071 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3072-3087 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3088-3103 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3104-3119 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3120-3135 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3136-3151 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3152-3167 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3168-3183 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3184-3199 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3200-3215 */
- 0x96196196, 0x61961961, 0x19619619, 0x519b34a1, /* 3216-3231 */
- 0x4f7538bc, 0xe988f33b, 0xf0d6d181, 0x224d502f, /* 3232-3247 */
- 0xf878a461, 0x9619b003, 0x61961961, 0x19619619, /* 3248-3263 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3264-3279 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3280-3295 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3296-3311 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3312-3327 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3328-3343 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3344-3359 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3360-3375 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3376-3391 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3392-3407 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3408-3423 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3424-3439 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3440-3455 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3456-3471 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3472-3487 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3488-3503 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3504-3519 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3520-3535 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3536-3551 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3552-3567 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3568-3583 */
- 0x19619619, 0xb34a1196, 0x538bc519, 0x8f33b4f7, /* 3584-3599 */
- 0x6d181e98, 0xd502ff0d, 0x8a461224, 0x9b003f87, /* 3600-3615 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3616-3631 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3632-3647 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3648-3663 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3664-3679 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3680-3695 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3696-3711 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3712-3727 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3728-3743 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3744-3759 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3760-3775 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3776-3791 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3792-3807 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3808-3823 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3824-3839 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3840-3855 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3856-3871 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3872-3887 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3888-3903 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 3904-3919 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 3920-3935 */
- 0x96196196, 0x61961961, 0x19619619, 0xa1196196, /* 3936-3951 */
- 0xbc519b34, 0x3b4f7538, 0x81e988f3, 0x2ff0d6d1, /* 3952-3967 */
- 0x61224d50, 0x03f878a4, 0x619619b0, 0x19619619, /* 3968-3983 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 3984-3999 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4000-4015 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4016-4031 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4032-4047 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4048-4063 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4064-4079 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4080-4095 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4096-4111 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4112-4127 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4128-4143 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4144-4159 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4160-4175 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4176-4191 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4192-4207 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4208-4223 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4224-4239 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4240-4255 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4256-4271 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4272-4287 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4288-4303 */
- 0x19619619, 0x96196196, 0x19b34a11, 0xf7538bc5, /* 4304-4319 */
- 0x988f33b4, 0x0d6d181e, 0x24d502ff, 0x878a4612, /* 4320-4335 */
- 0x619b003f, 0x19619619, 0x96196196, 0x61961961, /* 4336-4351 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4352-4367 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4368-4383 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4384-4399 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4400-4415 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4416-4431 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4432-4447 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4448-4463 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4464-4479 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4480-4495 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4496-4511 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4512-4527 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4528-4543 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4544-4559 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4560-4575 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4576-4591 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4592-4607 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4608-4623 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4624-4639 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4640-4655 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4656-4671 */
- 0x34a11961, 0x38bc519b, 0xf33b4f75, 0xd181e988, /* 4672-4687 */
- 0x502ff0d6, 0xa461224d, 0xb003f878, 0x19619619, /* 4688-4703 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4704-4719 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4720-4735 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4736-4751 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4752-4767 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4768-4783 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4784-4799 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4800-4815 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4816-4831 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4832-4847 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4848-4863 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4864-4879 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4880-4895 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4896-4911 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4912-4927 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4928-4943 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4944-4959 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 4960-4975 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 4976-4991 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 4992-5007 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5008-5023 */
- 0x19619619, 0x96196196, 0x11961961, 0xc519b34a, /* 5024-5039 */
- 0xb4f7538b, 0x1e988f33, 0xff0d6d18, 0x1224d502, /* 5040-5055 */
- 0x3f878a46, 0x19619b00, 0x96196196, 0x61961961, /* 5056-5071 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5072-5087 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5088-5103 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5104-5119 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5120-5135 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5136-5151 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5152-5167 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5168-5183 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5184-5199 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5200-5215 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5216-5231 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5232-5247 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5248-5263 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5264-5279 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5280-5295 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5296-5311 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5312-5327 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5328-5343 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5344-5359 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5360-5375 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5376-5391 */
- 0x61961961, 0x9b34a119, 0x7538bc51, 0x88f33b4f, /* 5392-5407 */
- 0xd6d181e9, 0x4d502ff0, 0x78a46122, 0x19b003f8, /* 5408-5423 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5424-5439 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5440-5455 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5456-5471 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5472-5487 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5488-5503 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5504-5519 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5520-5535 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5536-5551 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5552-5567 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5568-5583 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5584-5599 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5600-5615 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5616-5631 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5632-5647 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5648-5663 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5664-5679 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5680-5695 */
- 0x19619619, 0x96196196, 0x61961961, 0x19619619, /* 5696-5711 */
- 0x96196196, 0x61961961, 0x19619619, 0x96196196, /* 5712-5727 */
- 0x61961961, 0x19619619, 0x96196196, 0x61961961, /* 5728-5743 */
- 0x19619619, 0x96196196, 0x61961961, 0x4a119619, /* 5744-5759 */
- 0x8bc519b3, 0x33b4f753, 0x181e988f, 0x02ff0d6d, /* 5760-5775 */
- 0x461224d5, 0x003f878a
- },
- { /* BER_PATTERN_0123 */
- 0xf7bdcb2b, 0xf45b0000, 0xf73f844a, 0x39e12ee8, /* 0-15 */
- 0x11955ce5, 0xabda4a16, 0xcf4e4426, 0x7b63f38f, /* 16-31 */
- 0x04b0bcb9, 0x0112a1d0, 0x9eadaf6a, 0x585572e5, /* 32-47 */
- 0x1473f71e, 0xc8b8ce3c, 0x39036784, 0xda2f120b, /* 48-63 */
- 0x2d7692d9, 0x65e6a9d8, 0x2c8078c5, 0x47803db3, /* 64-79 */
- 0xca8c5f77, 0xe2dc9d33, 0xa24e6156, 0x9669912b, /* 80-95 */
- 0x78853bfd, 0x07d438f3, 0xcfcc0b72, 0xb6d9dd67, /* 96-111 */
- 0xe21a6416, 0x9329c52e, 0x4076b7a9, 0x88eccb7c, /* 112-127 */
- 0x3c433381, 0x8e2a525f, 0x6d229799, 0x60a6fddd, /* 128-143 */
- 0x9b4b0491, 0x3b37f6cf, 0x01f0e8bc, 0x5517e184, /* 144-159 */
- 0xdef9aa2a, 0x5d1526e0, 0xa3b88b4a, 0xb40f0540, /* 160-175 */
- 0xf27fd04f, 0x6de46ebc, 0x51c159a5, 0xae9a1e13, /* 176-191 */
- 0xca5e1072, 0x2a66e3de, 0x14e1b9a9, 0x0402f0d5, /* 192-207 */
- 0xcfa8bf3b, 0x480477f5, 0xf2ad9a1b, 0xa55e1051, /* 208-223 */
- 0xe76e815a, 0x3cf17fed, 0x40904cb4, 0xbb8b4f06, /* 224-239 */
- 0x29902923, 0x16852de2, 0xdadd5a67, 0xe7cccc36, /* 240-255 */
- 0xf34b7107, 0x8638943b, 0x1163a6f8, 0x99bdde6d, /* 256-271 */
- 0x29526294, 0xdf3f430e, 0x7c738288, 0x75b7acc8, /* 272-287 */
- 0x4566e5c0, 0xd9e9db2d, 0x2c123691, 0x8b3a035a, /* 288-303 */
- 0x3c2787c8, 0x70f7f8cd, 0x7d956994, 0x56d128a2, /* 304-319 */
- 0xdf9d0e62, 0xb3c98c62, 0xb31f7447, 0x8378c03e, /* 320-335 */
- 0x83755b9b, 0x056c2f3b, 0x79043189, 0x2da55211, /* 336-351 */
- 0x49a31741, 0x3eef7c2e, 0x8df2b6e8, 0xa1511a6a, /* 352-367 */
- 0xed55fe50, 0x43fb9e22, 0x449f468f, 0xb1b0300c, /* 368-383 */
- 0xb5577bec, 0x2e69e9e5, 0x1edac6a3, 0x7b08111a, /* 384-399 */
- 0xcba7b500, 0x423f08ff, 0xdce4f4d4, 0xb0000f7b, /* 400-415 */
- 0xf844af45, 0x12ee8f73, 0x55ce539e, 0xa4a16119, /* 416-431 */
- 0xe4426abd, 0x3f38fcf4, 0x0bcb97b6, 0x2a1d004b, /* 432-447 */
- 0xdaf6a011, 0x572e59ea, 0x3f71e585, 0x8ce3c147, /* 448-463 */
- 0x36784c8b, 0xf120b390, 0x692d9da2, 0x6a9d82d7, /* 464-479 */
- 0x078c565e, 0x03db32c8, 0xc5f77478, 0xc9d33ca8, /* 480-495 */
- 0xe6156e2d, 0x9912ba24, 0x53bfd966, 0x438f3788, /* 496-511 */
- 0xc0b7207d, 0x9dd67cfc, 0xa6416b6d, 0x9c52ee21, /* 512-527 */
- 0x6b7a9932, 0xccb7c407, 0x3338188e, 0xa525f3c4, /* 528-543 */
- 0x297998e2, 0x6fddd6d2, 0xb049160a, 0x7f6cf9b4, /* 544-559 */
- 0x0e8bc3b3, 0x7e18401f, 0x9aa2a551, 0x526e0def, /* 560-575 */
- 0x88b4a5d1, 0xf0540a3b, 0xfd04fb40, 0x46ebcf27, /* 576-591 */
- 0x159a56de, 0xa1e1351c, 0xe1072ae9, 0x6e3deca5, /* 592-607 */
- 0x1b9a92a6, 0x2f0d514e, 0x8bf3b040, 0x477f5cfa, /* 608-623 */
- 0xd9a1b480, 0xe1051f2a, 0xe815aa55, 0x17fede76, /* 624-639 */
- 0x04cb43cf, 0xb4f06409, 0x02923bb8, 0x52de2299, /* 640-655 */
- 0xd5a67168, 0xccc36dad, 0xb7107e7c, 0x8943bf34, /* 656-671 */
- 0x3a6f8863, 0xdde6d116, 0x2629499b, 0xf430e295, /* 672-687 */
- 0x38288df3, 0x7acc87c7, 0x93c7075b, 0x6a8ef661, /* 688-703 */
- 0x5fdf078c, 0x10b63179, 0x57127750, 0x542b36c2, /* 704-719 */
- 0x2b359cd9, 0x2d4566e3, 0x91d9e9db, 0x5a2c1236, /* 720-735 */
- 0xc88b3a03, 0xcd3c2787, 0x9470f7f8, 0xa27d9569, /* 736-751 */
- 0x6256d128, 0x62df9d0e, 0x47b3c98c, 0x3eb31f74, /* 752-767 */
- 0xac8378c0, 0x11a6a8da, 0x5fe50a15, 0xb9e22ed5, /* 768-783 */
- 0xf468f43f, 0x0300c449, 0x77becb1b, 0x9e9e5b55, /* 784-799 */
- 0xac6a32e6, 0x8111a1ed, 0x7b5007b0, 0xf08ffcba, /* 800-815 */
- 0x4f4d4423, 0x00f7bdce, 0x4af45b00, 0xe8f73f84, /* 816-831 */
- 0xe539e12e, 0x1611955c, 0x26abda4a, 0x8fcf4e44, /* 832-847 */
- 0xb97b63f3, 0xd004b0bc, 0x6a0112a1, 0xe59eadaf, /* 848-863 */
- 0x1e585572, 0x3c1473f7, 0x84c8b8ce, 0x0b390367, /* 864-879 */
- 0xd9da2f12, 0xd82d7692, 0xc565e6a9, 0xb32c8078, /* 880-895 */
- 0x7747803d, 0x33ca8c5f, 0x56e2dc9d, 0x2ba24e61, /* 896-911 */
- 0xfd966991, 0xf378853b, 0x7207d438, 0x67cfcc0b, /* 912-927 */
- 0x16b6d9dd, 0x2ee21a64, 0xa99329c5, 0x7c4076b7, /* 928-943 */
- 0x8188eccb, 0x5f3c4333, 0x998e2a52, 0xdd6d2297, /* 944-959 */
- 0x9160a6fd, 0xcf9b4b04, 0xbc3b37f6, 0x8401f0e8, /* 960-975 */
- 0x2a5517e1, 0xe0def9aa, 0x4a5d1526, 0x40a3b88b, /* 976-991 */
- 0x4fb40f05, 0xbcf27fd0, 0xa56de46e, 0x1351c159, /* 992-1007 */
- 0x72ae9a1e, 0xdeca5e10, 0xa92a66e3, 0xd514e1b9, /* 1008-1023 */
- 0x3b0402f0, 0xf5cfa8bf, 0x1b480477, 0x51f2ad9a, /* 1024-1039 */
- 0x5aa55e10, 0xede76e81, 0xb43cf17f, 0x0640904c, /* 1040-1055 */
- 0x64bb8b4f, 0xe7989ca4, 0xb73fabbb, 0xd9f72c15, /* 1056-1071 */
- 0x06ded38e, 0xc1fab18a, 0xed9f8a48, 0x9902f2b0, /* 1072-1087 */
- 0x6852de22, 0xadd5a671, 0x7cccc36d, 0x34b7107e, /* 1088-1103 */
- 0x638943bf, 0x163a6f88, 0x9bdde6d1, 0x95262949, /* 1104-1119 */
- 0xf3f430e2, 0xc738288d, 0x5b7acc87, 0x566e5c07, /* 1120-1135 */
- 0x9e9db2d4, 0xc123691d, 0xb3a035a2, 0xc2787c88, /* 1136-1151 */
- 0x0f7f8cd3, 0xd9569947, 0x6d128a27, 0xf9d0e625, /* 1152-1167 */
- 0x3c98c62d, 0x31f7447b, 0x378c03eb, 0x6a8daac8, /* 1168-1183 */
- 0x50a1511a, 0x22ed55fe, 0x8f43fb9e, 0x0c449f46, /* 1184-1199 */
- 0xecb1b030, 0xe5b5577b, 0xa32e69e9, 0x1a1edac6, /* 1200-1215 */
- 0x007b0811, 0xffcba7b5, 0xd4423f08, 0x7bdce4f4, /* 1216-1231 */
- 0x45b0000f, 0x73f844af, 0x9e12ee8f, 0x1955ce53, /* 1232-1247 */
- 0xbda4a161, 0xf4e4426a, 0xb63f38fc, 0x4b0bcb97, /* 1248-1263 */
- 0x112a1d00, 0xeadaf6a0, 0x85572e59, 0x473f71e5, /* 1264-1279 */
- 0x8b8ce3c1, 0x9036784c, 0xa2f120b3, 0xd7692d9d, /* 1280-1295 */
- 0x5e6a9d82, 0xc8078c56, 0x7803db32, 0xa8c5f774, /* 1296-1311 */
- 0x2dc9d33c, 0x24e6156e, 0x669912ba, 0x8853bfd9, /* 1312-1327 */
- 0x7d438f37, 0xfcc0b720, 0x6d9dd67c, 0x21a6416b, /* 1328-1343 */
- 0x329c52ee, 0x076b7a99, 0x8eccb7c4, 0xc4333818, /* 1344-1359 */
- 0xe2a525f3, 0xd2297998, 0x0a6fddd6, 0xb4b04916, /* 1360-1375 */
- 0xb37f6cf9, 0x1f0e8bc3, 0x517e1840, 0xef9aa2a5, /* 1376-1391 */
- 0xd1526e0d, 0x3b88b4a5, 0x40f0540a, 0x27fd04fb, /* 1392-1407 */
- 0xde46ebcf, 0x1c159a56, 0xe9a1e135, 0x4a7b029a, /* 1408-1423 */
- 0x029821cd, 0xc52d852c, 0xe3912eb2, 0x6281804f, /* 1424-1439 */
- 0xec5a0681, 0x132b3ba0, 0xe3deca5e, 0xb9a92a66, /* 1440-1455 */
- 0xf0d514e1, 0xbf3b0402, 0x77f5cfa8, 0x9a1b4804, /* 1456-1471 */
- 0x1051f2ad, 0x815aa55e, 0x7fede76e, 0x4cb43cf1, /* 1472-1487 */
- 0x4f064090, 0x2923bb8b, 0x2de22990, 0x5a671685, /* 1488-1503 */
- 0xcc36dadd, 0x7107e7cc, 0x943bf34b, 0xa6f88638, /* 1504-1519 */
- 0xde6d1163, 0x629499bd, 0x430e2952, 0x8288df3f, /* 1520-1535 */
- 0xacc87c73, 0xe5c075b7, 0xdb2d4566, 0x3691d9e9, /* 1536-1551 */
- 0x035a2c12, 0x87c88b3a, 0xf8cd3c27, 0x699470f7, /* 1552-1567 */
- 0x28a27d95, 0x0e6256d1, 0x8c62df9d, 0x7447b3c9, /* 1568-1583 */
- 0xc03eb31f, 0xdaac8378, 0x1511a6a8, 0xd55fe50a, /* 1584-1599 */
- 0x3fb9e22e, 0x49f468f4, 0x1b0300c4, 0x5577becb, /* 1600-1615 */
- 0xe69e9e5b, 0xedac6a32, 0xb08111a1, 0xba7b5007, /* 1616-1631 */
- 0x23f08ffc, 0xce4f4d44, 0x0000f7bd, 0x844af45b, /* 1632-1647 */
- 0x2ee8f73f, 0x5ce539e1, 0x4a161195, 0x4426abda, /* 1648-1663 */
- 0xf38fcf4e, 0xbcb97b63, 0xa1d004b0, 0xaf6a0112, /* 1664-1679 */
- 0x72e59ead, 0xf71e5855, 0xce3c1473, 0x6784c8b8, /* 1680-1695 */
- 0x120b3903, 0x92d9da2f, 0xa9d82d76, 0x78c565e6, /* 1696-1711 */
- 0x3db32c80, 0x5f774780, 0x9d33ca8c, 0x6156e2dc, /* 1712-1727 */
- 0x912ba24e, 0x3bfd9669, 0x38f37885, 0x0b7207d4, /* 1728-1743 */
- 0xdd67cfcc, 0x6416b6d9, 0xc52ee21a, 0xb7a99329, /* 1744-1759 */
- 0xcb7c4076, 0x338188ec, 0x525f3c43, 0x97998e2a, /* 1760-1775 */
- 0xfddd6d22, 0x789160a6, 0x9f401164, 0x6acd4e4f, /* 1776-1791 */
- 0x84398939, 0xb65334dc, 0xf78b3617, 0xb0e3c000, /* 1792-1807 */
- 0xf9b4b072, 0xc3b37f6c, 0x401f0e8b, 0xa5517e18, /* 1808-1823 */
- 0x0def9aa2, 0xa5d1526e, 0x0a3b88b4, 0xfb40f054, /* 1824-1839 */
- 0xcf27fd04, 0x56de46eb, 0x351c159a, 0x2ae9a1e1, /* 1840-1855 */
- 0xeca5e107, 0x92a66e3d, 0x514e1b9a, 0xb0402f0d, /* 1856-1871 */
- 0x5cfa8bf3, 0xb480477f, 0x1f2ad9a1, 0xaa55e105, /* 1872-1887 */
- 0xde76e815, 0x43cf17fe, 0x640904cb, 0x3bb8b4f0, /* 1888-1903 */
- 0x22990292, 0x716852de, 0x6dadd5a6, 0x7e7cccc3, /* 1904-1919 */
- 0xbf34b710, 0x88638943, 0xd1163a6f, 0x499bdde6, /* 1920-1935 */
- 0xe2952629, 0x8df3f430, 0x87c73828, 0x075b7acc, /* 1936-1951 */
- 0xd4566e5c, 0x1d9e9db2, 0xa2c12369, 0x88b3a035, /* 1952-1967 */
- 0xd3c2787c, 0x470f7f8c, 0x27d95699, 0x256d128a, /* 1968-1983 */
- 0x2df9d0e6, 0x7b3c98c6, 0xeb31f744, 0xc8378c03, /* 1984-1999 */
- 0x1a6a8daa, 0xfe50a151, 0x9e22ed55, 0x468f43fb, /* 2000-2015 */
- 0x300c449f, 0x7becb1b0, 0xe9e5b557, 0xc6a32e69, /* 2016-2031 */
- 0x111a1eda, 0xb5007b08, 0x08ffcba7, 0xf4d4423f, /* 2032-2047 */
- 0x0f7bdce4, 0xaf45b000, 0x8f73f844, 0x539e12ee, /* 2048-2063 */
- 0x611955ce, 0x6abda4a1, 0xfcf4e442, 0x97b63f38, /* 2064-2079 */
- 0x004b0bcb, 0xa0112a1d, 0x59eadaf6, 0xe585572e, /* 2080-2095 */
- 0xc1473f71, 0x4c8b8ce3, 0xb3903678, 0x9da2f120, /* 2096-2111 */
- 0x82d7692d, 0x565e6a9d, 0x32c8078c, 0x747803db, /* 2112-2127 */
- 0x3ca8c5f7, 0x6e2dc9d3, 0xba24e615, 0xa9669912, /* 2128-2143 */
- 0x4f4081f7, 0x433e5189, 0xbe7a8a6b, 0x56c78dd4, /* 2144-2159 */
- 0x61391d03, 0x2337ac91, 0x853b2b55, 0xd438f378, /* 2160-2175 */
- 0xcc0b7207, 0xd9dd67cf, 0x1a6416b6, 0x29c52ee2, /* 2176-2191 */
- 0x76b7a993, 0xeccb7c40, 0x43338188, 0x2a525f3c, /* 2192-2207 */
- 0x2297998e, 0xa6fddd6d, 0x4b049160, 0x37f6cf9b, /* 2208-2223 */
- 0xf0e8bc3b, 0x17e18401, 0xf9aa2a55, 0x1526e0de, /* 2224-2239 */
- 0xb88b4a5d, 0x0f0540a3, 0x7fd04fb4, 0xe46ebcf2, /* 2240-2255 */
- 0xc159a56d, 0x9a1e1351, 0x5e1072ae, 0x66e3deca, /* 2256-2271 */
- 0xe1b9a92a, 0x02f0d514, 0xa8bf3b04, 0x0477f5cf, /* 2272-2287 */
- 0xad9a1b48, 0x5e1051f2, 0x6e815aa5, 0xf17fede7, /* 2288-2303 */
- 0x904cb43c, 0x8b4f0640, 0x902923bb, 0x852de229, /* 2304-2319 */
- 0xdd5a6716, 0xcccc36da, 0x4b7107e7, 0x38943bf3, /* 2320-2335 */
- 0x63a6f886, 0xbdde6d11, 0x52629499, 0x3f430e29, /* 2336-2351 */
- 0x738288df, 0xb7acc87c, 0x66e5c075, 0xe9db2d45, /* 2352-2367 */
- 0x123691d9, 0x3a035a2c, 0x2787c88b, 0xf7f8cd3c, /* 2368-2383 */
- 0x95699470, 0xd128a27d, 0x9d0e6256, 0xc98c62df, /* 2384-2399 */
- 0x1f7447b3, 0x78c03eb3, 0xa8daac83, 0x0a1511a6, /* 2400-2415 */
- 0x2ed55fe5, 0xf43fb9e2, 0xc449f468, 0xcb1b0300, /* 2416-2431 */
- 0x5b5577be, 0x32e69e9e, 0xa1edac6a, 0x07b08111, /* 2432-2447 */
- 0xfcba7b50, 0x4423f08f, 0xbdce4f4d, 0x5b0000f7, /* 2448-2463 */
- 0x3f844af4, 0xe12ee8f7, 0x955ce539, 0xda4a1611, /* 2464-2479 */
- 0x4e4426ab, 0x63f38fcf, 0xb0bcb97b, 0x12a1d004, /* 2480-2495 */
- 0xadaf6a01, 0x5572e59e, 0x8d876e58, 0x880b9c0a, /* 2496-2511 */
- 0x114ef374, 0xaa58f107, 0x052b14c7, 0x65c36485, /* 2512-2527 */
- 0x72b6e661, 0xe3c1473f, 0x784c8b8c, 0x20b39036, /* 2528-2543 */
- 0x2d9da2f1, 0x9d82d769, 0x8c565e6a, 0xdb32c807, /* 2544-2559 */
- 0xf7747803, 0xd33ca8c5, 0x156e2dc9, 0x12ba24e6, /* 2560-2575 */
- 0xbfd96699, 0x8f378853, 0xb7207d43, 0xd67cfcc0, /* 2576-2591 */
- 0x416b6d9d, 0x52ee21a6, 0x7a99329c, 0xb7c4076b, /* 2592-2607 */
- 0x38188ecc, 0x25f3c433, 0x7998e2a5, 0xddd6d229, /* 2608-2623 */
- 0x49160a6f, 0x6cf9b4b0, 0x8bc3b37f, 0x18401f0e, /* 2624-2639 */
- 0xa2a5517e, 0x6e0def9a, 0xb4a5d152, 0x540a3b88, /* 2640-2655 */
- 0x04fb40f0, 0xebcf27fd, 0x9a56de46, 0xe1351c15, /* 2656-2671 */
- 0x072ae9a1, 0x3deca5e1, 0x9a92a66e, 0x0d514e1b, /* 2672-2687 */
- 0xf3b0402f, 0x7f5cfa8b, 0xa1b48047, 0x051f2ad9, /* 2688-2703 */
- 0x15aa55e1, 0xfede76e8, 0xcb43cf17, 0xf0640904, /* 2704-2719 */
- 0x923bb8b4, 0xde229902, 0xa6716852, 0xc36dadd5, /* 2720-2735 */
- 0x107e7ccc, 0x43bf34b7, 0x6f886389, 0xe6d1163a, /* 2736-2751 */
- 0x29499bdd, 0x30e29526, 0x288df3f4, 0xcc87c738, /* 2752-2767 */
- 0x5c075b7a, 0xb2d4566e, 0x691d9e9d, 0x35a2c123, /* 2768-2783 */
- 0x7c88b3a0, 0x8cd3c278, 0x99470f7f, 0x8a27d956, /* 2784-2799 */
- 0xe6256d12, 0xc62df9d0, 0x447b3c98, 0x03eb31f7, /* 2800-2815 */
- 0xaac8378c, 0x511a6a8d, 0x55fe50a1, 0xfb9e22ed, /* 2816-2831 */
- 0x9f468f43, 0xb0300c44, 0x577becb1, 0x69e9e5b5, /* 2832-2847 */
- 0xdac6a32e, 0x08111a1e, 0xa7b5007b, 0x3f08ffcb, /* 2848-2863 */
- 0x3234d442, 0x26746b69, 0x3168b0a3, 0x4c3dc6f8, /* 2864-2879 */
- 0x916e740c, 0xbcd699cb, 0x5b1f02a2, 0xf7bdcb2b, /* 2880-2895 */
- 0xf45b0000, 0xf73f844a, 0x39e12ee8, 0x11955ce5, /* 2896-2911 */
- 0xabda4a16, 0xcf4e4426, 0x7b63f38f, 0x04b0bcb9, /* 2912-2927 */
- 0x0112a1d0, 0x9eadaf6a, 0x585572e5, 0x1473f71e, /* 2928-2943 */
- 0xc8b8ce3c, 0x39036784, 0xda2f120b, 0x2d7692d9, /* 2944-2959 */
- 0x65e6a9d8, 0x2c8078c5, 0x47803db3, 0xca8c5f77, /* 2960-2975 */
- 0xe2dc9d33, 0xa24e6156, 0x9669912b, 0x78853bfd, /* 2976-2991 */
- 0x07d438f3, 0xcfcc0b72, 0xb6d9dd67, 0xe21a6416, /* 2992-3007 */
- 0x9329c52e, 0x4076b7a9, 0x88eccb7c, 0x3c433381, /* 3008-3023 */
- 0x8e2a525f, 0x6d229799, 0x60a6fddd, 0x9b4b0491, /* 3024-3039 */
- 0x3b37f6cf, 0x01f0e8bc, 0x5517e184, 0xdef9aa2a, /* 3040-3055 */
- 0x5d1526e0, 0xa3b88b4a, 0xb40f0540, 0xf27fd04f, /* 3056-3071 */
- 0x6de46ebc, 0x51c159a5, 0xae9a1e13, 0xca5e1072, /* 3072-3087 */
- 0x2a66e3de, 0x14e1b9a9, 0x0402f0d5, 0xcfa8bf3b, /* 3088-3103 */
- 0x480477f5, 0xf2ad9a1b, 0xa55e1051, 0xe76e815a, /* 3104-3119 */
- 0x3cf17fed, 0x40904cb4, 0xbb8b4f06, 0x29902923, /* 3120-3135 */
- 0x16852de2, 0xdadd5a67, 0xe7cccc36, 0xf34b7107, /* 3136-3151 */
- 0x8638943b, 0x1163a6f8, 0x99bdde6d, 0x29526294, /* 3152-3167 */
- 0xdf3f430e, 0x7c738288, 0x75b7acc8, 0x4566e5c0, /* 3168-3183 */
- 0xd9e9db2d, 0x2c123691, 0x8b3a035a, 0x3c2787c8, /* 3184-3199 */
- 0x70f7f8cd, 0x7d956994, 0x56d128a2, 0xdf9d0e62, /* 3200-3215 */
- 0xb3c98c62, 0xb31f7447, 0x8378c03e, 0x83755b9b, /* 3216-3231 */
- 0x056c2f3b, 0x79043189, 0x2da55211, 0x49a31741, /* 3232-3247 */
- 0x3eef7c2e, 0x8df2b6e8, 0xa1511a6a, 0xed55fe50, /* 3248-3263 */
- 0x43fb9e22, 0x449f468f, 0xb1b0300c, 0xb5577bec, /* 3264-3279 */
- 0x2e69e9e5, 0x1edac6a3, 0x7b08111a, 0xcba7b500, /* 3280-3295 */
- 0x423f08ff, 0xdce4f4d4, 0xb0000f7b, 0xf844af45, /* 3296-3311 */
- 0x12ee8f73, 0x55ce539e, 0xa4a16119, 0xe4426abd, /* 3312-3327 */
- 0x3f38fcf4, 0x0bcb97b6, 0x2a1d004b, 0xdaf6a011, /* 3328-3343 */
- 0x572e59ea, 0x3f71e585, 0x8ce3c147, 0x36784c8b, /* 3344-3359 */
- 0xf120b390, 0x692d9da2, 0x6a9d82d7, 0x078c565e, /* 3360-3375 */
- 0x03db32c8, 0xc5f77478, 0xc9d33ca8, 0xe6156e2d, /* 3376-3391 */
- 0x9912ba24, 0x53bfd966, 0x438f3788, 0xc0b7207d, /* 3392-3407 */
- 0x9dd67cfc, 0xa6416b6d, 0x9c52ee21, 0x6b7a9932, /* 3408-3423 */
- 0xccb7c407, 0x3338188e, 0xa525f3c4, 0x297998e2, /* 3424-3439 */
- 0x6fddd6d2, 0xb049160a, 0x7f6cf9b4, 0x0e8bc3b3, /* 3440-3455 */
- 0x7e18401f, 0x9aa2a551, 0x526e0def, 0x88b4a5d1, /* 3456-3471 */
- 0xf0540a3b, 0xfd04fb40, 0x46ebcf27, 0x159a56de, /* 3472-3487 */
- 0xa1e1351c, 0xe1072ae9, 0x6e3deca5, 0x1b9a92a6, /* 3488-3503 */
- 0x2f0d514e, 0x8bf3b040, 0x477f5cfa, 0xd9a1b480, /* 3504-3519 */
- 0xe1051f2a, 0xe815aa55, 0x17fede76, 0x04cb43cf, /* 3520-3535 */
- 0xb4f06409, 0x02923bb8, 0x52de2299, 0xd5a67168, /* 3536-3551 */
- 0xccc36dad, 0xb7107e7c, 0x8943bf34, 0x3a6f8863, /* 3552-3567 */
- 0xdde6d116, 0x2629499b, 0xf430e295, 0x38288df3, /* 3568-3583 */
- 0x7acc87c7, 0x93c7075b, 0x6a8ef661, 0x5fdf078c, /* 3584-3599 */
- 0x10b63179, 0x57127750, 0x542b36c2, 0x2b359cd9, /* 3600-3615 */
- 0x2d4566e3, 0x91d9e9db, 0x5a2c1236, 0xc88b3a03, /* 3616-3631 */
- 0xcd3c2787, 0x9470f7f8, 0xa27d9569, 0x6256d128, /* 3632-3647 */
- 0x62df9d0e, 0x47b3c98c, 0x3eb31f74, 0xac8378c0, /* 3648-3663 */
- 0x11a6a8da, 0x5fe50a15, 0xb9e22ed5, 0xf468f43f, /* 3664-3679 */
- 0x0300c449, 0x77becb1b, 0x9e9e5b55, 0xac6a32e6, /* 3680-3695 */
- 0x8111a1ed, 0x7b5007b0, 0xf08ffcba, 0x4f4d4423, /* 3696-3711 */
- 0x00f7bdce, 0x4af45b00, 0xe8f73f84, 0xe539e12e, /* 3712-3727 */
- 0x1611955c, 0x26abda4a, 0x8fcf4e44, 0xb97b63f3, /* 3728-3743 */
- 0xd004b0bc, 0x6a0112a1, 0xe59eadaf, 0x1e585572, /* 3744-3759 */
- 0x3c1473f7, 0x84c8b8ce, 0x0b390367, 0xd9da2f12, /* 3760-3775 */
- 0xd82d7692, 0xc565e6a9, 0xb32c8078, 0x7747803d, /* 3776-3791 */
- 0x33ca8c5f, 0x56e2dc9d, 0x2ba24e61, 0xfd966991, /* 3792-3807 */
- 0xf378853b, 0x7207d438, 0x67cfcc0b, 0x16b6d9dd, /* 3808-3823 */
- 0x2ee21a64, 0xa99329c5, 0x7c4076b7, 0x8188eccb, /* 3824-3839 */
- 0x5f3c4333, 0x998e2a52, 0xdd6d2297, 0x9160a6fd, /* 3840-3855 */
- 0xcf9b4b04, 0xbc3b37f6, 0x8401f0e8, 0x2a5517e1, /* 3856-3871 */
- 0xe0def9aa, 0x4a5d1526, 0x40a3b88b, 0x4fb40f05, /* 3872-3887 */
- 0xbcf27fd0, 0xa56de46e, 0x1351c159, 0x72ae9a1e, /* 3888-3903 */
- 0xdeca5e10, 0xa92a66e3, 0xd514e1b9, 0x3b0402f0, /* 3904-3919 */
- 0xf5cfa8bf, 0x1b480477, 0x51f2ad9a, 0x5aa55e10, /* 3920-3935 */
- 0xede76e81, 0xb43cf17f, 0x0640904c, 0x64bb8b4f, /* 3936-3951 */
- 0xe7989ca4, 0xb73fabbb, 0xd9f72c15, 0x06ded38e, /* 3952-3967 */
- 0xc1fab18a, 0xed9f8a48, 0x9902f2b0, 0x6852de22, /* 3968-3983 */
- 0xadd5a671, 0x7cccc36d, 0x34b7107e, 0x638943bf, /* 3984-3999 */
- 0x163a6f88, 0x9bdde6d1, 0x95262949, 0xf3f430e2, /* 4000-4015 */
- 0xc738288d, 0x5b7acc87, 0x566e5c07, 0x9e9db2d4, /* 4016-4031 */
- 0xc123691d, 0xb3a035a2, 0xc2787c88, 0x0f7f8cd3, /* 4032-4047 */
- 0xd9569947, 0x6d128a27, 0xf9d0e625, 0x3c98c62d, /* 4048-4063 */
- 0x31f7447b, 0x378c03eb, 0x6a8daac8, 0x50a1511a, /* 4064-4079 */
- 0x22ed55fe, 0x8f43fb9e, 0x0c449f46, 0xecb1b030, /* 4080-4095 */
- 0xe5b5577b, 0xa32e69e9, 0x1a1edac6, 0x007b0811, /* 4096-4111 */
- 0xffcba7b5, 0xd4423f08, 0x7bdce4f4, 0x45b0000f, /* 4112-4127 */
- 0x73f844af, 0x9e12ee8f, 0x1955ce53, 0xbda4a161, /* 4128-4143 */
- 0xf4e4426a, 0xb63f38fc, 0x4b0bcb97, 0x112a1d00, /* 4144-4159 */
- 0xeadaf6a0, 0x85572e59, 0x473f71e5, 0x8b8ce3c1, /* 4160-4175 */
- 0x9036784c, 0xa2f120b3, 0xd7692d9d, 0x5e6a9d82, /* 4176-4191 */
- 0xc8078c56, 0x7803db32, 0xa8c5f774, 0x2dc9d33c, /* 4192-4207 */
- 0x24e6156e, 0x669912ba, 0x8853bfd9, 0x7d438f37, /* 4208-4223 */
- 0xfcc0b720, 0x6d9dd67c, 0x21a6416b, 0x329c52ee, /* 4224-4239 */
- 0x076b7a99, 0x8eccb7c4, 0xc4333818, 0xe2a525f3, /* 4240-4255 */
- 0xd2297998, 0x0a6fddd6, 0xb4b04916, 0xb37f6cf9, /* 4256-4271 */
- 0x1f0e8bc3, 0x517e1840, 0xef9aa2a5, 0xd1526e0d, /* 4272-4287 */
- 0x3b88b4a5, 0x40f0540a, 0x27fd04fb, 0xde46ebcf, /* 4288-4303 */
- 0x1c159a56, 0xe9a1e135, 0x4a7b029a, 0x029821cd, /* 4304-4319 */
- 0xc52d852c, 0xe3912eb2, 0x6281804f, 0xec5a0681, /* 4320-4335 */
- 0x132b3ba0, 0xe3deca5e, 0xb9a92a66, 0xf0d514e1, /* 4336-4351 */
- 0xbf3b0402, 0x77f5cfa8, 0x9a1b4804, 0x1051f2ad, /* 4352-4367 */
- 0x815aa55e, 0x7fede76e, 0x4cb43cf1, 0x4f064090, /* 4368-4383 */
- 0x2923bb8b, 0x2de22990, 0x5a671685, 0xcc36dadd, /* 4384-4399 */
- 0x7107e7cc, 0x943bf34b, 0xa6f88638, 0xde6d1163, /* 4400-4415 */
- 0x629499bd, 0x430e2952, 0x8288df3f, 0xacc87c73, /* 4416-4431 */
- 0xe5c075b7, 0xdb2d4566, 0x3691d9e9, 0x035a2c12, /* 4432-4447 */
- 0x87c88b3a, 0xf8cd3c27, 0x699470f7, 0x28a27d95, /* 4448-4463 */
- 0x0e6256d1, 0x8c62df9d, 0x7447b3c9, 0xc03eb31f, /* 4464-4479 */
- 0xdaac8378, 0x1511a6a8, 0xd55fe50a, 0x3fb9e22e, /* 4480-4495 */
- 0x49f468f4, 0x1b0300c4, 0x5577becb, 0xe69e9e5b, /* 4496-4511 */
- 0xedac6a32, 0xb08111a1, 0xba7b5007, 0x23f08ffc, /* 4512-4527 */
- 0xce4f4d44, 0x0000f7bd, 0x844af45b, 0x2ee8f73f, /* 4528-4543 */
- 0x5ce539e1, 0x4a161195, 0x4426abda, 0xf38fcf4e, /* 4544-4559 */
- 0xbcb97b63, 0xa1d004b0, 0xaf6a0112, 0x72e59ead, /* 4560-4575 */
- 0xf71e5855, 0xce3c1473, 0x6784c8b8, 0x120b3903, /* 4576-4591 */
- 0x92d9da2f, 0xa9d82d76, 0x78c565e6, 0x3db32c80, /* 4592-4607 */
- 0x5f774780, 0x9d33ca8c, 0x6156e2dc, 0x912ba24e, /* 4608-4623 */
- 0x3bfd9669, 0x38f37885, 0x0b7207d4, 0xdd67cfcc, /* 4624-4639 */
- 0x6416b6d9, 0xc52ee21a, 0xb7a99329, 0xcb7c4076, /* 4640-4655 */
- 0x338188ec, 0x525f3c43, 0x97998e2a, 0xfddd6d22, /* 4656-4671 */
- 0x789160a6, 0x9f401164, 0x6acd4e4f, 0x84398939, /* 4672-4687 */
- 0xb65334dc, 0xf78b3617, 0xb0e3c000, 0xf9b4b072, /* 4688-4703 */
- 0xc3b37f6c, 0x401f0e8b, 0xa5517e18, 0x0def9aa2, /* 4704-4719 */
- 0xa5d1526e, 0x0a3b88b4, 0xfb40f054, 0xcf27fd04, /* 4720-4735 */
- 0x56de46eb, 0x351c159a, 0x2ae9a1e1, 0xeca5e107, /* 4736-4751 */
- 0x92a66e3d, 0x514e1b9a, 0xb0402f0d, 0x5cfa8bf3, /* 4752-4767 */
- 0xb480477f, 0x1f2ad9a1, 0xaa55e105, 0xde76e815, /* 4768-4783 */
- 0x43cf17fe, 0x640904cb, 0x3bb8b4f0, 0x22990292, /* 4784-4799 */
- 0x716852de, 0x6dadd5a6, 0x7e7cccc3, 0xbf34b710, /* 4800-4815 */
- 0x88638943, 0xd1163a6f, 0x499bdde6, 0xe2952629, /* 4816-4831 */
- 0x8df3f430, 0x87c73828, 0x075b7acc, 0xd4566e5c, /* 4832-4847 */
- 0x1d9e9db2, 0xa2c12369, 0x88b3a035, 0xd3c2787c, /* 4848-4863 */
- 0x470f7f8c, 0x27d95699, 0x256d128a, 0x2df9d0e6, /* 4864-4879 */
- 0x7b3c98c6, 0xeb31f744, 0xc8378c03, 0x1a6a8daa, /* 4880-4895 */
- 0xfe50a151, 0x9e22ed55, 0x468f43fb, 0x300c449f, /* 4896-4911 */
- 0x7becb1b0, 0xe9e5b557, 0xc6a32e69, 0x111a1eda, /* 4912-4927 */
- 0xb5007b08, 0x08ffcba7, 0xf4d4423f, 0x0f7bdce4, /* 4928-4943 */
- 0xaf45b000, 0x8f73f844, 0x539e12ee, 0x611955ce, /* 4944-4959 */
- 0x6abda4a1, 0xfcf4e442, 0x97b63f38, 0x004b0bcb, /* 4960-4975 */
- 0xa0112a1d, 0x59eadaf6, 0xe585572e, 0xc1473f71, /* 4976-4991 */
- 0x4c8b8ce3, 0xb3903678, 0x9da2f120, 0x82d7692d, /* 4992-5007 */
- 0x565e6a9d, 0x32c8078c, 0x747803db, 0x3ca8c5f7, /* 5008-5023 */
- 0x6e2dc9d3, 0xba24e615, 0xa9669912, 0x4f4081f7, /* 5024-5039 */
- 0x433e5189, 0xbe7a8a6b, 0x56c78dd4, 0x61391d03, /* 5040-5055 */
- 0x2337ac91, 0x853b2b55, 0xd438f378, 0xcc0b7207, /* 5056-5071 */
- 0xd9dd67cf, 0x1a6416b6, 0x29c52ee2, 0x76b7a993, /* 5072-5087 */
- 0xeccb7c40, 0x43338188, 0x2a525f3c, 0x2297998e, /* 5088-5103 */
- 0xa6fddd6d, 0x4b049160, 0x37f6cf9b, 0xf0e8bc3b, /* 5104-5119 */
- 0x17e18401, 0xf9aa2a55, 0x1526e0de, 0xb88b4a5d, /* 5120-5135 */
- 0x0f0540a3, 0x7fd04fb4, 0xe46ebcf2, 0xc159a56d, /* 5136-5151 */
- 0x9a1e1351, 0x5e1072ae, 0x66e3deca, 0xe1b9a92a, /* 5152-5167 */
- 0x02f0d514, 0xa8bf3b04, 0x0477f5cf, 0xad9a1b48, /* 5168-5183 */
- 0x5e1051f2, 0x6e815aa5, 0xf17fede7, 0x904cb43c, /* 5184-5199 */
- 0x8b4f0640, 0x902923bb, 0x852de229, 0xdd5a6716, /* 5200-5215 */
- 0xcccc36da, 0x4b7107e7, 0x38943bf3, 0x63a6f886, /* 5216-5231 */
- 0xbdde6d11, 0x52629499, 0x3f430e29, 0x738288df, /* 5232-5247 */
- 0xb7acc87c, 0x66e5c075, 0xe9db2d45, 0x123691d9, /* 5248-5263 */
- 0x3a035a2c, 0x2787c88b, 0xf7f8cd3c, 0x95699470, /* 5264-5279 */
- 0xd128a27d, 0x9d0e6256, 0xc98c62df, 0x1f7447b3, /* 5280-5295 */
- 0x78c03eb3, 0xa8daac83, 0x0a1511a6, 0x2ed55fe5, /* 5296-5311 */
- 0xf43fb9e2, 0xc449f468, 0xcb1b0300, 0x5b5577be, /* 5312-5327 */
- 0x32e69e9e, 0xa1edac6a, 0x07b08111, 0xfcba7b50, /* 5328-5343 */
- 0x4423f08f, 0xbdce4f4d, 0x5b0000f7, 0x3f844af4, /* 5344-5359 */
- 0xe12ee8f7, 0x955ce539, 0xda4a1611, 0x4e4426ab, /* 5360-5375 */
- 0x63f38fcf, 0xb0bcb97b, 0x12a1d004, 0xadaf6a01, /* 5376-5391 */
- 0x5572e59e, 0x8d876e58, 0x880b9c0a, 0x114ef374, /* 5392-5407 */
- 0xaa58f107, 0x052b14c7, 0x65c36485, 0x72b6e661, /* 5408-5423 */
- 0xe3c1473f, 0x784c8b8c, 0x20b39036, 0x2d9da2f1, /* 5424-5439 */
- 0x9d82d769, 0x8c565e6a, 0xdb32c807, 0xf7747803, /* 5440-5455 */
- 0xd33ca8c5, 0x156e2dc9, 0x12ba24e6, 0xbfd96699, /* 5456-5471 */
- 0x8f378853, 0xb7207d43, 0xd67cfcc0, 0x416b6d9d, /* 5472-5487 */
- 0x52ee21a6, 0x7a99329c, 0xb7c4076b, 0x38188ecc, /* 5488-5503 */
- 0x25f3c433, 0x7998e2a5, 0xddd6d229, 0x49160a6f, /* 5504-5519 */
- 0x6cf9b4b0, 0x8bc3b37f, 0x18401f0e, 0xa2a5517e, /* 5520-5535 */
- 0x6e0def9a, 0xb4a5d152, 0x540a3b88, 0x04fb40f0, /* 5536-5551 */
- 0xebcf27fd, 0x9a56de46, 0xe1351c15, 0x072ae9a1, /* 5552-5567 */
- 0x3deca5e1, 0x9a92a66e, 0x0d514e1b, 0xf3b0402f, /* 5568-5583 */
- 0x7f5cfa8b, 0xa1b48047, 0x051f2ad9, 0x15aa55e1, /* 5584-5599 */
- 0xfede76e8, 0xcb43cf17, 0xf0640904, 0x923bb8b4, /* 5600-5615 */
- 0xde229902, 0xa6716852, 0xc36dadd5, 0x107e7ccc, /* 5616-5631 */
- 0x43bf34b7, 0x6f886389, 0xe6d1163a, 0x29499bdd, /* 5632-5647 */
- 0x30e29526, 0x288df3f4, 0xcc87c738, 0x5c075b7a, /* 5648-5663 */
- 0xb2d4566e, 0x691d9e9d, 0x35a2c123, 0x7c88b3a0, /* 5664-5679 */
- 0x8cd3c278, 0x99470f7f, 0x8a27d956, 0xe6256d12, /* 5680-5695 */
- 0xc62df9d0, 0x447b3c98, 0x03eb31f7, 0xaac8378c, /* 5696-5711 */
- 0x511a6a8d, 0x55fe50a1, 0xfb9e22ed, 0x9f468f43, /* 5712-5727 */
- 0xb0300c44, 0x577becb1, 0x69e9e5b5, 0xdac6a32e, /* 5728-5743 */
- 0x08111a1e, 0xa7b5007b, 0x3f08ffcb, 0x3234d442, /* 5744-5759 */
- 0x26746b69, 0x3168b0a3, 0x4c3dc6f8, 0x916e740c, /* 5760-5775 */
- 0xbcd699cb, 0x5b1f02a2
- },
- { /* BER_PATTERN_NOT_0123 */
- 0x084231b0, 0x0ba4ffff, 0x08c07bb5, 0xc61ed117, /* 0-15 */
- 0xee6aa31a, 0x5425b5e9, 0x30b1bbd9, 0x849c0c70, /* 16-31 */
- 0xfb4f4346, 0xfeed5e2f, 0x61525095, 0xa7aa8d1a, /* 32-47 */
- 0xeb8c08e1, 0x374731c3, 0xc6fc987b, 0x25d0edf4, /* 48-63 */
- 0xd2896d26, 0x9a195627, 0xd37f873a, 0xb87fc24c, /* 64-79 */
- 0x3573a088, 0x1d2362cc, 0x5db19ea9, 0x69966ed4, /* 80-95 */
- 0x877ac402, 0xf82bc70c, 0x3033f48d, 0x49262298, /* 96-111 */
- 0x1de59be9, 0x6cd63ad1, 0xbf894856, 0x77133483, /* 112-127 */
- 0xc3bccc7e, 0x71d5ada0, 0x92dd6866, 0x9f590222, /* 128-143 */
- 0x64b4fb6e, 0xc4c80930, 0xfe0f1743, 0xaae81e7b, /* 144-159 */
- 0x210655d5, 0xa2ead91f, 0x5c4774b5, 0x4bf0fabf, /* 160-175 */
- 0x0d802fb0, 0x921b9143, 0xae3ea65a, 0x5165e1ec, /* 176-191 */
- 0x35a1ef8d, 0xd5991c21, 0xeb1e4656, 0xfbfd0f2a, /* 192-207 */
- 0x305740c4, 0xb7fb880a, 0x0d5265e4, 0x5aa1efae, /* 208-223 */
- 0x18917ea5, 0xc30e8012, 0xbf6fb34b, 0x4474b0f9, /* 224-239 */
- 0xd66fd6dc, 0xe97ad21d, 0x2522a598, 0x183333c9, /* 240-255 */
- 0x0cb48ef8, 0x79c76bc4, 0xee9c5907, 0x66422192, /* 256-271 */
- 0xd6ad9d6b, 0x20c0bcf1, 0x838c7d77, 0x8a485337, /* 272-287 */
- 0xba991a3f, 0x261624d2, 0xd3edc96e, 0x74c5fca5, /* 288-303 */
- 0xc3d87837, 0x8f080732, 0x826a966b, 0xa92ed75d, /* 304-319 */
- 0x2062f19d, 0x4c36739d, 0x4ce08bb8, 0x7c873fc1, /* 320-335 */
- 0x1c2d1653, 0xd22f7d1d, 0x62e974fa, 0xf2abd78a, /* 336-351 */
- 0x205d71f0, 0x3b2205cd, 0x725b055c, 0x5eaee595, /* 352-367 */
- 0x12aa01af, 0xbc0461dd, 0xbb60b970, 0x4e4fcff3, /* 368-383 */
- 0x4aa88413, 0xd196161a, 0xe125395c, 0x84f7eee5, /* 384-399 */
- 0x34584aff, 0xbdc0f700, 0x231b0b2b, 0x4ffff084, /* 400-415 */
- 0x07bb50ba, 0xed11708c, 0xaa31ac61, 0x5b5e9ee6, /* 416-431 */
- 0x1bbd9542, 0xc0c7030b, 0xf4346849, 0xd5e2ffb4, /* 432-447 */
- 0x25095fee, 0xa8d1a615, 0xc08e1a7a, 0x731c3eb8, /* 448-463 */
- 0xc987b374, 0x0edf4c6f, 0x96d2625d, 0x95627d28, /* 464-479 */
- 0xf873a9a1, 0xfc24cd37, 0x3a088b87, 0x362cc357, /* 480-495 */
- 0x19ea91d2, 0x66ed45db, 0xac402699, 0xbc70c877, /* 496-511 */
- 0x3f48df82, 0x62298303, 0x59be9492, 0x63ad11de, /* 512-527 */
- 0x948566cd, 0x33483bf8, 0xccc7e771, 0x5ada0c3b, /* 528-543 */
- 0xd686671d, 0x9022292d, 0x4fb6e9f5, 0x8093064b, /* 544-559 */
- 0xf1743c4c, 0x81e7bfe0, 0x655d5aae, 0xad91f210, /* 560-575 */
- 0x774b5a2e, 0x0fabf5c4, 0x02fb04bf, 0xb91430d8, /* 576-591 */
- 0xea65a921, 0x5e1ecae3, 0x1ef8d516, 0x91c2135a, /* 592-607 */
- 0xe4656d59, 0xd0f2aeb1, 0x740c4fbf, 0xb880a305, /* 608-623 */
- 0x265e4b7f, 0x1efae0d5, 0x17ea55aa, 0xe8012189, /* 624-639 */
- 0xfb34bc30, 0x4b0f9bf6, 0xfd6dc447, 0xad21dd66, /* 640-655 */
- 0x2a598e97, 0x333c9252, 0x48ef8183, 0x76bc40cb, /* 656-671 */
- 0xc590779c, 0x22192ee9, 0xd9d6b664, 0x0bcf1d6a, /* 672-687 */
- 0xc7d7720c, 0x85337838, 0x171b88a4, 0x5fac9f94, /* 688-703 */
- 0x8b883af8, 0xf8ef80c7, 0xb1796aa0, 0x83b5005d, /* 704-719 */
- 0xb00edc85, 0xd2ba9919, 0x6e261624, 0xa5d3edc9, /* 720-735 */
- 0x3774c5fc, 0x32c3d878, 0x6b8f0807, 0x5d826a96, /* 736-751 */
- 0x9da92ed7, 0x9d2062f1, 0xb84c3673, 0xc14ce08b, /* 752-767 */
- 0x537c873f, 0xee595725, 0xa01af5ea, 0x461dd12a, /* 768-783 */
- 0x0b970bc0, 0xfcff3bb6, 0x884134e4, 0x6161a4aa, /* 784-799 */
- 0x5395cd19, 0x7eee5e12, 0x84aff84f, 0x0f700345, /* 800-815 */
- 0xb0b2bbdc, 0xff084231, 0xb50ba4ff, 0x1708c07b, /* 816-831 */
- 0x1ac61ed1, 0xe9ee6aa3, 0xd95425b5, 0x7030b1bb, /* 832-847 */
- 0x46849c0c, 0x2ffb4f43, 0x95feed5e, 0x1a615250, /* 848-863 */
- 0xe1a7aa8d, 0xc3eb8c08, 0x7b374731, 0xf4c6fc98, /* 864-879 */
- 0x2625d0ed, 0x27d2896d, 0x3a9a1956, 0x4cd37f87, /* 880-895 */
- 0x88b87fc2, 0xcc3573a0, 0xa91d2362, 0xd45db19e, /* 896-911 */
- 0x0269966e, 0x0c877ac4, 0x8df82bc7, 0x983033f4, /* 912-927 */
- 0xe9492622, 0xd11de59b, 0x566cd63a, 0x83bf8948, /* 928-943 */
- 0x7e771334, 0xa0c3bccc, 0x6671d5ad, 0x2292dd68, /* 944-959 */
- 0x6e9f5902, 0x3064b4fb, 0x43c4c809, 0x7bfe0f17, /* 960-975 */
- 0xd5aae81e, 0x1f210655, 0xb5a2ead9, 0xbf5c4774, /* 976-991 */
- 0xb04bf0fa, 0x430d802f, 0x5a921b91, 0xecae3ea6, /* 992-1007 */
- 0x8d5165e1, 0x2135a1ef, 0x56d5991c, 0x2aeb1e46, /* 1008-1023 */
- 0xc4fbfd0f, 0x0a305740, 0xe4b7fb88, 0xae0d5265, /* 1024-1039 */
- 0xa55aa1ef, 0x1218917e, 0x4bc30e80, 0xf9bf6fb3, /* 1040-1055 */
- 0xac4474b0, 0xc107c4e9, 0xc4e8e8e9, 0x42ecc150, /* 1056-1071 */
- 0xb701dd0b, 0x22934fec, 0x599a4731, 0x66fd5b03, /* 1072-1087 */
- 0x97ad21dd, 0x522a598e, 0x83333c92, 0xcb48ef81, /* 1088-1103 */
- 0x9c76bc40, 0xe9c59077, 0x6422192e, 0x6ad9d6b6, /* 1104-1119 */
- 0x0c0bcf1d, 0x38c7d772, 0xa4853378, 0xa991a3f8, /* 1120-1135 */
- 0x61624d2b, 0x3edc96e2, 0x4c5fca5d, 0x3d878377, /* 1136-1151 */
- 0xf080732c, 0x26a966b8, 0x92ed75d8, 0x062f19da, /* 1152-1167 */
- 0xc36739d2, 0xce08bb84, 0xc873fc14, 0x95725537, /* 1168-1183 */
- 0xaf5eaee5, 0xdd12aa01, 0x70bc0461, 0xf3bb60b9, /* 1184-1199 */
- 0x134e4fcf, 0x1a4aa884, 0x5cd19616, 0xe5e12539, /* 1200-1215 */
- 0xff84f7ee, 0x0034584a, 0x2bbdc0f7, 0x84231b0b, /* 1216-1231 */
- 0xba4ffff0, 0x8c07bb50, 0x61ed1170, 0xe6aa31ac, /* 1232-1247 */
- 0x425b5e9e, 0x0b1bbd95, 0x49c0c703, 0xb4f43468, /* 1248-1263 */
- 0xeed5e2ff, 0x1525095f, 0x7aa8d1a6, 0xb8c08e1a, /* 1264-1279 */
- 0x74731c3e, 0x6fc987b3, 0x5d0edf4c, 0x2896d262, /* 1280-1295 */
- 0xa195627d, 0x37f873a9, 0x87fc24cd, 0x573a088b, /* 1296-1311 */
- 0xd2362cc3, 0xdb19ea91, 0x9966ed45, 0x77ac4026, /* 1312-1327 */
- 0x82bc70c8, 0x033f48df, 0x92622983, 0xde59be94, /* 1328-1343 */
- 0xcd63ad11, 0xf8948566, 0x7133483b, 0x3bccc7e7, /* 1344-1359 */
- 0x1d5ada0c, 0x2dd68667, 0xf5902229, 0x4b4fb6e9, /* 1360-1375 */
- 0x4c809306, 0xe0f1743c, 0xae81e7bf, 0x10655d5a, /* 1376-1391 */
- 0x2ead91f2, 0xc4774b5a, 0xbf0fabf5, 0xd802fb04, /* 1392-1407 */
- 0x21b91430, 0xe3ea65a9, 0x165e1eca, 0xbfffde15, /* 1408-1423 */
- 0x76ad03a4, 0x7bf9d211, 0x13797703, 0xfd67eb52, /* 1424-1439 */
- 0xb08d98b7, 0xe9b000e0, 0x1c2135a1, 0x4656d599, /* 1440-1455 */
- 0x0f2aeb1e, 0x40c4fbfd, 0x880a3057, 0x65e4b7fb, /* 1456-1471 */
- 0xefae0d52, 0x7ea55aa1, 0x80121891, 0xb34bc30e, /* 1472-1487 */
- 0xb0f9bf6f, 0xd6dc4474, 0xd21dd66f, 0xa598e97a, /* 1488-1503 */
- 0x33c92522, 0x8ef81833, 0x6bc40cb4, 0x590779c7, /* 1504-1519 */
- 0x2192ee9c, 0x9d6b6642, 0xbcf1d6ad, 0x7d7720c0, /* 1520-1535 */
- 0x5337838c, 0x1a3f8a48, 0x24d2ba99, 0xc96e2616, /* 1536-1551 */
- 0xfca5d3ed, 0x783774c5, 0x0732c3d8, 0x966b8f08, /* 1552-1567 */
- 0xd75d826a, 0xf19da92e, 0x739d2062, 0x8bb84c36, /* 1568-1583 */
- 0x3fc14ce0, 0x25537c87, 0xeaee5957, 0x2aa01af5, /* 1584-1599 */
- 0xc0461dd1, 0xb60b970b, 0xe4fcff3b, 0xaa884134, /* 1600-1615 */
- 0x196161a4, 0x125395cd, 0x4f7eee5e, 0x4584aff8, /* 1616-1631 */
- 0xdc0f7003, 0x31b0b2bb, 0xffff0842, 0x7bb50ba4, /* 1632-1647 */
- 0xd11708c0, 0xa31ac61e, 0xb5e9ee6a, 0xbbd95425, /* 1648-1663 */
- 0x0c7030b1, 0x4346849c, 0x5e2ffb4f, 0x5095feed, /* 1664-1679 */
- 0x8d1a6152, 0x08e1a7aa, 0x31c3eb8c, 0x987b3747, /* 1680-1695 */
- 0xedf4c6fc, 0x6d2625d0, 0x5627d289, 0x873a9a19, /* 1696-1711 */
- 0xc24cd37f, 0xa088b87f, 0x62cc3573, 0x9ea91d23, /* 1712-1727 */
- 0x6ed45db1, 0xc4026996, 0xc70c877a, 0xf48df82b, /* 1728-1743 */
- 0x22983033, 0x9be94926, 0x3ad11de5, 0x48566cd6, /* 1744-1759 */
- 0x3483bf89, 0xcc7e7713, 0xada0c3bc, 0x686671d5, /* 1760-1775 */
- 0x022292dd, 0x35599f59, 0xcd668e3c, 0x2fbe990c, /* 1776-1791 */
- 0x01a292d4, 0xd0e2ebd2, 0x8e685fe9, 0x0357c5cd, /* 1792-1807 */
- 0x064b4fdb, 0x3c4c8093, 0xbfe0f174, 0x5aae81e7, /* 1808-1823 */
- 0xf210655d, 0x5a2ead91, 0xf5c4774b, 0x04bf0fab, /* 1824-1839 */
- 0x30d802fb, 0xa921b914, 0xcae3ea65, 0xd5165e1e, /* 1840-1855 */
- 0x135a1ef8, 0x6d5991c2, 0xaeb1e465, 0x4fbfd0f2, /* 1856-1871 */
- 0xa305740c, 0x4b7fb880, 0xe0d5265e, 0x55aa1efa, /* 1872-1887 */
- 0x218917ea, 0xbc30e801, 0x9bf6fb34, 0xc4474b0f, /* 1888-1903 */
- 0xdd66fd6d, 0x8e97ad21, 0x92522a59, 0x8183333c, /* 1904-1919 */
- 0x40cb48ef, 0x779c76bc, 0x2ee9c590, 0xb6642219, /* 1920-1935 */
- 0x1d6ad9d6, 0x720c0bcf, 0x7838c7d7, 0xf8a48533, /* 1936-1951 */
- 0x2ba991a3, 0xe261624d, 0x5d3edc96, 0x774c5fca, /* 1952-1967 */
- 0x2c3d8783, 0xb8f08073, 0xd826a966, 0xda92ed75, /* 1968-1983 */
- 0xd2062f19, 0x84c36739, 0x14ce08bb, 0x37c873fc, /* 1984-1999 */
- 0xe5957255, 0x01af5eae, 0x61dd12aa, 0xb970bc04, /* 2000-2015 */
- 0xcff3bb60, 0x84134e4f, 0x161a4aa8, 0x395cd196, /* 2016-2031 */
- 0xeee5e125, 0x4aff84f7, 0xf7003458, 0x0b2bbdc0, /* 2032-2047 */
- 0xf084231b, 0x50ba4fff, 0x708c07bb, 0xac61ed11, /* 2048-2063 */
- 0x9ee6aa31, 0x95425b5e, 0x030b1bbd, 0x6849c0c7, /* 2064-2079 */
- 0xffb4f434, 0x5feed5e2, 0xa6152509, 0x1a7aa8d1, /* 2080-2095 */
- 0x3eb8c08e, 0xb374731c, 0x4c6fc987, 0x625d0edf, /* 2096-2111 */
- 0x7d2896d2, 0xa9a19562, 0xcd37f873, 0x8b87fc24, /* 2112-2127 */
- 0xc3573a08, 0x91d2362c, 0x45db19ea, 0x269966ed, /* 2128-2143 */
- 0x26b5052b, 0x7e4a64ab, 0x0fc45e3c, 0x4b37658d, /* 2144-2159 */
- 0x57a6fb68, 0x636b7b0f, 0x7ac1b06e, 0x2bc70c87, /* 2160-2175 */
- 0x33f48df8, 0x26229830, 0xe59be949, 0xd63ad11d, /* 2176-2191 */
- 0x8948566c, 0x133483bf, 0xbccc7e77, 0xd5ada0c3, /* 2192-2207 */
- 0xdd686671, 0x59022292, 0xb4fb6e9f, 0xc8093064, /* 2208-2223 */
- 0x0f1743c4, 0xe81e7bfe, 0x0655d5aa, 0xead91f21, /* 2224-2239 */
- 0x4774b5a2, 0xf0fabf5c, 0x802fb04b, 0x1b91430d, /* 2240-2255 */
- 0x3ea65a92, 0x65e1ecae, 0xa1ef8d51, 0x991c2135, /* 2256-2271 */
- 0x1e4656d5, 0xfd0f2aeb, 0x5740c4fb, 0xfb880a30, /* 2272-2287 */
- 0x5265e4b7, 0xa1efae0d, 0x917ea55a, 0x0e801218, /* 2288-2303 */
- 0x6fb34bc3, 0x74b0f9bf, 0x6fd6dc44, 0x7ad21dd6, /* 2304-2319 */
- 0x22a598e9, 0x3333c925, 0xb48ef818, 0xc76bc40c, /* 2320-2335 */
- 0x9c590779, 0x422192ee, 0xad9d6b66, 0xc0bcf1d6, /* 2336-2351 */
- 0x8c7d7720, 0x48533783, 0x991a3f8a, 0x1624d2ba, /* 2352-2367 */
- 0xedc96e26, 0xc5fca5d3, 0xd8783774, 0x080732c3, /* 2368-2383 */
- 0x6a966b8f, 0x2ed75d82, 0x62f19da9, 0x36739d20, /* 2384-2399 */
- 0xe08bb84c, 0x873fc14c, 0x5725537c, 0xf5eaee59, /* 2400-2415 */
- 0xd12aa01a, 0x0bc0461d, 0x3bb60b97, 0x34e4fcff, /* 2416-2431 */
- 0xa4aa8841, 0xcd196161, 0x5e125395, 0xf84f7eee, /* 2432-2447 */
- 0x034584af, 0xbbdc0f70, 0x4231b0b2, 0xa4ffff08, /* 2448-2463 */
- 0xc07bb50b, 0x1ed11708, 0x6aa31ac6, 0x25b5e9ee, /* 2464-2479 */
- 0xb1bbd954, 0x9c0c7030, 0x4f434684, 0xed5e2ffb, /* 2480-2495 */
- 0x525095fe, 0xaa8d1a61, 0xd5caa6a7, 0xcb59ba95, /* 2496-2511 */
- 0xfc0b80a3, 0xa4dd6a1c, 0xfb4da518, 0xa8ba87ec, /* 2512-2527 */
- 0xdb055264, 0x1c3eb8c0, 0x87b37473, 0xdf4c6fc9, /* 2528-2543 */
- 0xd2625d0e, 0x627d2896, 0x73a9a195, 0x24cd37f8, /* 2544-2559 */
- 0x088b87fc, 0x2cc3573a, 0xea91d236, 0xed45db19, /* 2560-2575 */
- 0x40269966, 0x70c877ac, 0x48df82bc, 0x2983033f, /* 2576-2591 */
- 0xbe949262, 0xad11de59, 0x8566cd63, 0x483bf894, /* 2592-2607 */
- 0xc7e77133, 0xda0c3bcc, 0x86671d5a, 0x22292dd6, /* 2608-2623 */
- 0xb6e9f590, 0x93064b4f, 0x743c4c80, 0xe7bfe0f1, /* 2624-2639 */
- 0x5d5aae81, 0x91f21065, 0x4b5a2ead, 0xabf5c477, /* 2640-2655 */
- 0xfb04bf0f, 0x1430d802, 0x65a921b9, 0x1ecae3ea, /* 2656-2671 */
- 0xf8d5165e, 0xc2135a1e, 0x656d5991, 0xf2aeb1e4, /* 2672-2687 */
- 0x0c4fbfd0, 0x80a30574, 0x5e4b7fb8, 0xfae0d526, /* 2688-2703 */
- 0xea55aa1e, 0x01218917, 0x34bc30e8, 0x0f9bf6fb, /* 2704-2719 */
- 0x6dc4474b, 0x21dd66fd, 0x598e97ad, 0x3c92522a, /* 2720-2735 */
- 0xef818333, 0xbc40cb48, 0x90779c76, 0x192ee9c5, /* 2736-2751 */
- 0xd6b66422, 0xcf1d6ad9, 0xd7720c0b, 0x337838c7, /* 2752-2767 */
- 0xa3f8a485, 0x4d2ba991, 0x96e26162, 0xca5d3edc, /* 2768-2783 */
- 0x83774c5f, 0x732c3d87, 0x66b8f080, 0x75d826a9, /* 2784-2799 */
- 0x19da92ed, 0x39d2062f, 0xbb84c367, 0xfc14ce08, /* 2800-2815 */
- 0x5537c873, 0xaee59572, 0xaa01af5e, 0x0461dd12, /* 2816-2831 */
- 0x60b970bc, 0x4fcff3bb, 0xa884134e, 0x96161a4a, /* 2832-2847 */
- 0x25395cd1, 0xf7eee5e1, 0x584aff84, 0xc0f70034, /* 2848-2863 */
- 0xeebb2bbd, 0x041d9eed, 0x6655c496, 0x158c782c, /* 2864-2879 */
- 0xfa7384e4, 0x22e0062d, 0x605f5e75, 0x084231b0, /* 2880-2895 */
- 0x0ba4ffff, 0x08c07bb5, 0xc61ed117, 0xee6aa31a, /* 2896-2911 */
- 0x5425b5e9, 0x30b1bbd9, 0x849c0c70, 0xfb4f4346, /* 2912-2927 */
- 0xfeed5e2f, 0x61525095, 0xa7aa8d1a, 0xeb8c08e1, /* 2928-2943 */
- 0x374731c3, 0xc6fc987b, 0x25d0edf4, 0xd2896d26, /* 2944-2959 */
- 0x9a195627, 0xd37f873a, 0xb87fc24c, 0x3573a088, /* 2960-2975 */
- 0x1d2362cc, 0x5db19ea9, 0x69966ed4, 0x877ac402, /* 2976-2991 */
- 0xf82bc70c, 0x3033f48d, 0x49262298, 0x1de59be9, /* 2992-3007 */
- 0x6cd63ad1, 0xbf894856, 0x77133483, 0xc3bccc7e, /* 3008-3023 */
- 0x71d5ada0, 0x92dd6866, 0x9f590222, 0x64b4fb6e, /* 3024-3039 */
- 0xc4c80930, 0xfe0f1743, 0xaae81e7b, 0x210655d5, /* 3040-3055 */
- 0xa2ead91f, 0x5c4774b5, 0x4bf0fabf, 0x0d802fb0, /* 3056-3071 */
- 0x921b9143, 0xae3ea65a, 0x5165e1ec, 0x35a1ef8d, /* 3072-3087 */
- 0xd5991c21, 0xeb1e4656, 0xfbfd0f2a, 0x305740c4, /* 3088-3103 */
- 0xb7fb880a, 0x0d5265e4, 0x5aa1efae, 0x18917ea5, /* 3104-3119 */
- 0xc30e8012, 0xbf6fb34b, 0x4474b0f9, 0xd66fd6dc, /* 3120-3135 */
- 0xe97ad21d, 0x2522a598, 0x183333c9, 0x0cb48ef8, /* 3136-3151 */
- 0x79c76bc4, 0xee9c5907, 0x66422192, 0xd6ad9d6b, /* 3152-3167 */
- 0x20c0bcf1, 0x838c7d77, 0x8a485337, 0xba991a3f, /* 3168-3183 */
- 0x261624d2, 0xd3edc96e, 0x74c5fca5, 0xc3d87837, /* 3184-3199 */
- 0x8f080732, 0x826a966b, 0xa92ed75d, 0x2062f19d, /* 3200-3215 */
- 0x4c36739d, 0x4ce08bb8, 0x7c873fc1, 0x1c2d1653, /* 3216-3231 */
- 0xd22f7d1d, 0x62e974fa, 0xf2abd78a, 0x205d71f0, /* 3232-3247 */
- 0x3b2205cd, 0x725b055c, 0x5eaee595, 0x12aa01af, /* 3248-3263 */
- 0xbc0461dd, 0xbb60b970, 0x4e4fcff3, 0x4aa88413, /* 3264-3279 */
- 0xd196161a, 0xe125395c, 0x84f7eee5, 0x34584aff, /* 3280-3295 */
- 0xbdc0f700, 0x231b0b2b, 0x4ffff084, 0x07bb50ba, /* 3296-3311 */
- 0xed11708c, 0xaa31ac61, 0x5b5e9ee6, 0x1bbd9542, /* 3312-3327 */
- 0xc0c7030b, 0xf4346849, 0xd5e2ffb4, 0x25095fee, /* 3328-3343 */
- 0xa8d1a615, 0xc08e1a7a, 0x731c3eb8, 0xc987b374, /* 3344-3359 */
- 0x0edf4c6f, 0x96d2625d, 0x95627d28, 0xf873a9a1, /* 3360-3375 */
- 0xfc24cd37, 0x3a088b87, 0x362cc357, 0x19ea91d2, /* 3376-3391 */
- 0x66ed45db, 0xac402699, 0xbc70c877, 0x3f48df82, /* 3392-3407 */
- 0x62298303, 0x59be9492, 0x63ad11de, 0x948566cd, /* 3408-3423 */
- 0x33483bf8, 0xccc7e771, 0x5ada0c3b, 0xd686671d, /* 3424-3439 */
- 0x9022292d, 0x4fb6e9f5, 0x8093064b, 0xf1743c4c, /* 3440-3455 */
- 0x81e7bfe0, 0x655d5aae, 0xad91f210, 0x774b5a2e, /* 3456-3471 */
- 0x0fabf5c4, 0x02fb04bf, 0xb91430d8, 0xea65a921, /* 3472-3487 */
- 0x5e1ecae3, 0x1ef8d516, 0x91c2135a, 0xe4656d59, /* 3488-3503 */
- 0xd0f2aeb1, 0x740c4fbf, 0xb880a305, 0x265e4b7f, /* 3504-3519 */
- 0x1efae0d5, 0x17ea55aa, 0xe8012189, 0xfb34bc30, /* 3520-3535 */
- 0x4b0f9bf6, 0xfd6dc447, 0xad21dd66, 0x2a598e97, /* 3536-3551 */
- 0x333c9252, 0x48ef8183, 0x76bc40cb, 0xc590779c, /* 3552-3567 */
- 0x22192ee9, 0xd9d6b664, 0x0bcf1d6a, 0xc7d7720c, /* 3568-3583 */
- 0x85337838, 0x171b88a4, 0x5fac9f94, 0x8b883af8, /* 3584-3599 */
- 0xf8ef80c7, 0xb1796aa0, 0x83b5005d, 0xb00edc85, /* 3600-3615 */
- 0xd2ba9919, 0x6e261624, 0xa5d3edc9, 0x3774c5fc, /* 3616-3631 */
- 0x32c3d878, 0x6b8f0807, 0x5d826a96, 0x9da92ed7, /* 3632-3647 */
- 0x9d2062f1, 0xb84c3673, 0xc14ce08b, 0x537c873f, /* 3648-3663 */
- 0xee595725, 0xa01af5ea, 0x461dd12a, 0x0b970bc0, /* 3664-3679 */
- 0xfcff3bb6, 0x884134e4, 0x6161a4aa, 0x5395cd19, /* 3680-3695 */
- 0x7eee5e12, 0x84aff84f, 0x0f700345, 0xb0b2bbdc, /* 3696-3711 */
- 0xff084231, 0xb50ba4ff, 0x1708c07b, 0x1ac61ed1, /* 3712-3727 */
- 0xe9ee6aa3, 0xd95425b5, 0x7030b1bb, 0x46849c0c, /* 3728-3743 */
- 0x2ffb4f43, 0x95feed5e, 0x1a615250, 0xe1a7aa8d, /* 3744-3759 */
- 0xc3eb8c08, 0x7b374731, 0xf4c6fc98, 0x2625d0ed, /* 3760-3775 */
- 0x27d2896d, 0x3a9a1956, 0x4cd37f87, 0x88b87fc2, /* 3776-3791 */
- 0xcc3573a0, 0xa91d2362, 0xd45db19e, 0x0269966e, /* 3792-3807 */
- 0x0c877ac4, 0x8df82bc7, 0x983033f4, 0xe9492622, /* 3808-3823 */
- 0xd11de59b, 0x566cd63a, 0x83bf8948, 0x7e771334, /* 3824-3839 */
- 0xa0c3bccc, 0x6671d5ad, 0x2292dd68, 0x6e9f5902, /* 3840-3855 */
- 0x3064b4fb, 0x43c4c809, 0x7bfe0f17, 0xd5aae81e, /* 3856-3871 */
- 0x1f210655, 0xb5a2ead9, 0xbf5c4774, 0xb04bf0fa, /* 3872-3887 */
- 0x430d802f, 0x5a921b91, 0xecae3ea6, 0x8d5165e1, /* 3888-3903 */
- 0x2135a1ef, 0x56d5991c, 0x2aeb1e46, 0xc4fbfd0f, /* 3904-3919 */
- 0x0a305740, 0xe4b7fb88, 0xae0d5265, 0xa55aa1ef, /* 3920-3935 */
- 0x1218917e, 0x4bc30e80, 0xf9bf6fb3, 0xac4474b0, /* 3936-3951 */
- 0xc107c4e9, 0xc4e8e8e9, 0x42ecc150, 0xb701dd0b, /* 3952-3967 */
- 0x22934fec, 0x599a4731, 0x66fd5b03, 0x97ad21dd, /* 3968-3983 */
- 0x522a598e, 0x83333c92, 0xcb48ef81, 0x9c76bc40, /* 3984-3999 */
- 0xe9c59077, 0x6422192e, 0x6ad9d6b6, 0x0c0bcf1d, /* 4000-4015 */
- 0x38c7d772, 0xa4853378, 0xa991a3f8, 0x61624d2b, /* 4016-4031 */
- 0x3edc96e2, 0x4c5fca5d, 0x3d878377, 0xf080732c, /* 4032-4047 */
- 0x26a966b8, 0x92ed75d8, 0x062f19da, 0xc36739d2, /* 4048-4063 */
- 0xce08bb84, 0xc873fc14, 0x95725537, 0xaf5eaee5, /* 4064-4079 */
- 0xdd12aa01, 0x70bc0461, 0xf3bb60b9, 0x134e4fcf, /* 4080-4095 */
- 0x1a4aa884, 0x5cd19616, 0xe5e12539, 0xff84f7ee, /* 4096-4111 */
- 0x0034584a, 0x2bbdc0f7, 0x84231b0b, 0xba4ffff0, /* 4112-4127 */
- 0x8c07bb50, 0x61ed1170, 0xe6aa31ac, 0x425b5e9e, /* 4128-4143 */
- 0x0b1bbd95, 0x49c0c703, 0xb4f43468, 0xeed5e2ff, /* 4144-4159 */
- 0x1525095f, 0x7aa8d1a6, 0xb8c08e1a, 0x74731c3e, /* 4160-4175 */
- 0x6fc987b3, 0x5d0edf4c, 0x2896d262, 0xa195627d, /* 4176-4191 */
- 0x37f873a9, 0x87fc24cd, 0x573a088b, 0xd2362cc3, /* 4192-4207 */
- 0xdb19ea91, 0x9966ed45, 0x77ac4026, 0x82bc70c8, /* 4208-4223 */
- 0x033f48df, 0x92622983, 0xde59be94, 0xcd63ad11, /* 4224-4239 */
- 0xf8948566, 0x7133483b, 0x3bccc7e7, 0x1d5ada0c, /* 4240-4255 */
- 0x2dd68667, 0xf5902229, 0x4b4fb6e9, 0x4c809306, /* 4256-4271 */
- 0xe0f1743c, 0xae81e7bf, 0x10655d5a, 0x2ead91f2, /* 4272-4287 */
- 0xc4774b5a, 0xbf0fabf5, 0xd802fb04, 0x21b91430, /* 4288-4303 */
- 0xe3ea65a9, 0x165e1eca, 0xbfffde15, 0x76ad03a4, /* 4304-4319 */
- 0x7bf9d211, 0x13797703, 0xfd67eb52, 0xb08d98b7, /* 4320-4335 */
- 0xe9b000e0, 0x1c2135a1, 0x4656d599, 0x0f2aeb1e, /* 4336-4351 */
- 0x40c4fbfd, 0x880a3057, 0x65e4b7fb, 0xefae0d52, /* 4352-4367 */
- 0x7ea55aa1, 0x80121891, 0xb34bc30e, 0xb0f9bf6f, /* 4368-4383 */
- 0xd6dc4474, 0xd21dd66f, 0xa598e97a, 0x33c92522, /* 4384-4399 */
- 0x8ef81833, 0x6bc40cb4, 0x590779c7, 0x2192ee9c, /* 4400-4415 */
- 0x9d6b6642, 0xbcf1d6ad, 0x7d7720c0, 0x5337838c, /* 4416-4431 */
- 0x1a3f8a48, 0x24d2ba99, 0xc96e2616, 0xfca5d3ed, /* 4432-4447 */
- 0x783774c5, 0x0732c3d8, 0x966b8f08, 0xd75d826a, /* 4448-4463 */
- 0xf19da92e, 0x739d2062, 0x8bb84c36, 0x3fc14ce0, /* 4464-4479 */
- 0x25537c87, 0xeaee5957, 0x2aa01af5, 0xc0461dd1, /* 4480-4495 */
- 0xb60b970b, 0xe4fcff3b, 0xaa884134, 0x196161a4, /* 4496-4511 */
- 0x125395cd, 0x4f7eee5e, 0x4584aff8, 0xdc0f7003, /* 4512-4527 */
- 0x31b0b2bb, 0xffff0842, 0x7bb50ba4, 0xd11708c0, /* 4528-4543 */
- 0xa31ac61e, 0xb5e9ee6a, 0xbbd95425, 0x0c7030b1, /* 4544-4559 */
- 0x4346849c, 0x5e2ffb4f, 0x5095feed, 0x8d1a6152, /* 4560-4575 */
- 0x08e1a7aa, 0x31c3eb8c, 0x987b3747, 0xedf4c6fc, /* 4576-4591 */
- 0x6d2625d0, 0x5627d289, 0x873a9a19, 0xc24cd37f, /* 4592-4607 */
- 0xa088b87f, 0x62cc3573, 0x9ea91d23, 0x6ed45db1, /* 4608-4623 */
- 0xc4026996, 0xc70c877a, 0xf48df82b, 0x22983033, /* 4624-4639 */
- 0x9be94926, 0x3ad11de5, 0x48566cd6, 0x3483bf89, /* 4640-4655 */
- 0xcc7e7713, 0xada0c3bc, 0x686671d5, 0x022292dd, /* 4656-4671 */
- 0x35599f59, 0xcd668e3c, 0x2fbe990c, 0x01a292d4, /* 4672-4687 */
- 0xd0e2ebd2, 0x8e685fe9, 0x0357c5cd, 0x064b4fdb, /* 4688-4703 */
- 0x3c4c8093, 0xbfe0f174, 0x5aae81e7, 0xf210655d, /* 4704-4719 */
- 0x5a2ead91, 0xf5c4774b, 0x04bf0fab, 0x30d802fb, /* 4720-4735 */
- 0xa921b914, 0xcae3ea65, 0xd5165e1e, 0x135a1ef8, /* 4736-4751 */
- 0x6d5991c2, 0xaeb1e465, 0x4fbfd0f2, 0xa305740c, /* 4752-4767 */
- 0x4b7fb880, 0xe0d5265e, 0x55aa1efa, 0x218917ea, /* 4768-4783 */
- 0xbc30e801, 0x9bf6fb34, 0xc4474b0f, 0xdd66fd6d, /* 4784-4799 */
- 0x8e97ad21, 0x92522a59, 0x8183333c, 0x40cb48ef, /* 4800-4815 */
- 0x779c76bc, 0x2ee9c590, 0xb6642219, 0x1d6ad9d6, /* 4816-4831 */
- 0x720c0bcf, 0x7838c7d7, 0xf8a48533, 0x2ba991a3, /* 4832-4847 */
- 0xe261624d, 0x5d3edc96, 0x774c5fca, 0x2c3d8783, /* 4848-4863 */
- 0xb8f08073, 0xd826a966, 0xda92ed75, 0xd2062f19, /* 4864-4879 */
- 0x84c36739, 0x14ce08bb, 0x37c873fc, 0xe5957255, /* 4880-4895 */
- 0x01af5eae, 0x61dd12aa, 0xb970bc04, 0xcff3bb60, /* 4896-4911 */
- 0x84134e4f, 0x161a4aa8, 0x395cd196, 0xeee5e125, /* 4912-4927 */
- 0x4aff84f7, 0xf7003458, 0x0b2bbdc0, 0xf084231b, /* 4928-4943 */
- 0x50ba4fff, 0x708c07bb, 0xac61ed11, 0x9ee6aa31, /* 4944-4959 */
- 0x95425b5e, 0x030b1bbd, 0x6849c0c7, 0xffb4f434, /* 4960-4975 */
- 0x5feed5e2, 0xa6152509, 0x1a7aa8d1, 0x3eb8c08e, /* 4976-4991 */
- 0xb374731c, 0x4c6fc987, 0x625d0edf, 0x7d2896d2, /* 4992-5007 */
- 0xa9a19562, 0xcd37f873, 0x8b87fc24, 0xc3573a08, /* 5008-5023 */
- 0x91d2362c, 0x45db19ea, 0x269966ed, 0x26b5052b, /* 5024-5039 */
- 0x7e4a64ab, 0x0fc45e3c, 0x4b37658d, 0x57a6fb68, /* 5040-5055 */
- 0x636b7b0f, 0x7ac1b06e, 0x2bc70c87, 0x33f48df8, /* 5056-5071 */
- 0x26229830, 0xe59be949, 0xd63ad11d, 0x8948566c, /* 5072-5087 */
- 0x133483bf, 0xbccc7e77, 0xd5ada0c3, 0xdd686671, /* 5088-5103 */
- 0x59022292, 0xb4fb6e9f, 0xc8093064, 0x0f1743c4, /* 5104-5119 */
- 0xe81e7bfe, 0x0655d5aa, 0xead91f21, 0x4774b5a2, /* 5120-5135 */
- 0xf0fabf5c, 0x802fb04b, 0x1b91430d, 0x3ea65a92, /* 5136-5151 */
- 0x65e1ecae, 0xa1ef8d51, 0x991c2135, 0x1e4656d5, /* 5152-5167 */
- 0xfd0f2aeb, 0x5740c4fb, 0xfb880a30, 0x5265e4b7, /* 5168-5183 */
- 0xa1efae0d, 0x917ea55a, 0x0e801218, 0x6fb34bc3, /* 5184-5199 */
- 0x74b0f9bf, 0x6fd6dc44, 0x7ad21dd6, 0x22a598e9, /* 5200-5215 */
- 0x3333c925, 0xb48ef818, 0xc76bc40c, 0x9c590779, /* 5216-5231 */
- 0x422192ee, 0xad9d6b66, 0xc0bcf1d6, 0x8c7d7720, /* 5232-5247 */
- 0x48533783, 0x991a3f8a, 0x1624d2ba, 0xedc96e26, /* 5248-5263 */
- 0xc5fca5d3, 0xd8783774, 0x080732c3, 0x6a966b8f, /* 5264-5279 */
- 0x2ed75d82, 0x62f19da9, 0x36739d20, 0xe08bb84c, /* 5280-5295 */
- 0x873fc14c, 0x5725537c, 0xf5eaee59, 0xd12aa01a, /* 5296-5311 */
- 0x0bc0461d, 0x3bb60b97, 0x34e4fcff, 0xa4aa8841, /* 5312-5327 */
- 0xcd196161, 0x5e125395, 0xf84f7eee, 0x034584af, /* 5328-5343 */
- 0xbbdc0f70, 0x4231b0b2, 0xa4ffff08, 0xc07bb50b, /* 5344-5359 */
- 0x1ed11708, 0x6aa31ac6, 0x25b5e9ee, 0xb1bbd954, /* 5360-5375 */
- 0x9c0c7030, 0x4f434684, 0xed5e2ffb, 0x525095fe, /* 5376-5391 */
- 0xaa8d1a61, 0xd5caa6a7, 0xcb59ba95, 0xfc0b80a3, /* 5392-5407 */
- 0xa4dd6a1c, 0xfb4da518, 0xa8ba87ec, 0xdb055264, /* 5408-5423 */
- 0x1c3eb8c0, 0x87b37473, 0xdf4c6fc9, 0xd2625d0e, /* 5424-5439 */
- 0x627d2896, 0x73a9a195, 0x24cd37f8, 0x088b87fc, /* 5440-5455 */
- 0x2cc3573a, 0xea91d236, 0xed45db19, 0x40269966, /* 5456-5471 */
- 0x70c877ac, 0x48df82bc, 0x2983033f, 0xbe949262, /* 5472-5487 */
- 0xad11de59, 0x8566cd63, 0x483bf894, 0xc7e77133, /* 5488-5503 */
- 0xda0c3bcc, 0x86671d5a, 0x22292dd6, 0xb6e9f590, /* 5504-5519 */
- 0x93064b4f, 0x743c4c80, 0xe7bfe0f1, 0x5d5aae81, /* 5520-5535 */
- 0x91f21065, 0x4b5a2ead, 0xabf5c477, 0xfb04bf0f, /* 5536-5551 */
- 0x1430d802, 0x65a921b9, 0x1ecae3ea, 0xf8d5165e, /* 5552-5567 */
- 0xc2135a1e, 0x656d5991, 0xf2aeb1e4, 0x0c4fbfd0, /* 5568-5583 */
- 0x80a30574, 0x5e4b7fb8, 0xfae0d526, 0xea55aa1e, /* 5584-5599 */
- 0x01218917, 0x34bc30e8, 0x0f9bf6fb, 0x6dc4474b, /* 5600-5615 */
- 0x21dd66fd, 0x598e97ad, 0x3c92522a, 0xef818333, /* 5616-5631 */
- 0xbc40cb48, 0x90779c76, 0x192ee9c5, 0xd6b66422, /* 5632-5647 */
- 0xcf1d6ad9, 0xd7720c0b, 0x337838c7, 0xa3f8a485, /* 5648-5663 */
- 0x4d2ba991, 0x96e26162, 0xca5d3edc, 0x83774c5f, /* 5664-5679 */
- 0x732c3d87, 0x66b8f080, 0x75d826a9, 0x19da92ed, /* 5680-5695 */
- 0x39d2062f, 0xbb84c367, 0xfc14ce08, 0x5537c873, /* 5696-5711 */
- 0xaee59572, 0xaa01af5e, 0x0461dd12, 0x60b970bc, /* 5712-5727 */
- 0x4fcff3bb, 0xa884134e, 0x96161a4a, 0x25395cd1, /* 5728-5743 */
- 0xf7eee5e1, 0x584aff84, 0xc0f70034, 0xeebb2bbd, /* 5744-5759 */
- 0x041d9eed, 0x6655c496, 0x158c782c, 0xfa7384e4, /* 5760-5775 */
- 0x22e0062d, 0x605f5e75
- },
- { /* BER_PATTERN_ALT_0123 */
- 0xf7bdcb2b, 0xf45b0000, 0xf73f844a, 0x39e12ee8, /* 0-15 */
- 0x11955ce5, 0xabda4a16, 0xcf4e4426, 0x7b63f38f, /* 16-31 */
- 0x04b0bcb9, 0x0112a1d0, 0x9eadaf6a, 0x585572e5, /* 32-47 */
- 0x1473f71e, 0xc8b8ce3c, 0x39036784, 0xda2f120b, /* 48-63 */
- 0x2d7692d9, 0x65e6a9d8, 0x2c8078c5, 0x47803db3, /* 64-79 */
- 0xca8c5f77, 0xe2dc9d33, 0xa24e6156, 0x9669912b, /* 80-95 */
- 0x78853bfd, 0x07d438f3, 0xcfcc0b72, 0xb6d9dd67, /* 96-111 */
- 0xe21a6416, 0x9329c52e, 0x4076b7a9, 0x88eccb7c, /* 112-127 */
- 0x3c433381, 0x8e2a525f, 0x6d229799, 0x60a6fddd, /* 128-143 */
- 0x9b4b0491, 0x3b37f6cf, 0x01f0e8bc, 0x5517e184, /* 144-159 */
- 0xdef9aa2a, 0x5d1526e0, 0xa3b88b4a, 0xb40f0540, /* 160-175 */
- 0xf27fd04f, 0x6de46ebc, 0x51c159a5, 0xae9a1e13, /* 176-191 */
- 0xca5e1072, 0x2a66e3de, 0x14e1b9a9, 0x0402f0d5, /* 192-207 */
- 0xcfa8bf3b, 0x480477f5, 0xf2ad9a1b, 0xa55e1051, /* 208-223 */
- 0xe76e815a, 0x3cf17fed, 0x40904cb4, 0xbb8b4f06, /* 224-239 */
- 0x29902923, 0x16852de2, 0xdadd5a67, 0xe7cccc36, /* 240-255 */
- 0xf34b7107, 0x8638943b, 0x1163a6f8, 0x99bdde6d, /* 256-271 */
- 0x29526294, 0xdf3f430e, 0x7c738288, 0x75b7acc8, /* 272-287 */
- 0x4566e5c0, 0xd9e9db2d, 0x2c123691, 0x8b3a035a, /* 288-303 */
- 0x3c2787c8, 0x70f7f8cd, 0x7d956994, 0x56d128a2, /* 304-319 */
- 0xdf9d0e62, 0xb3c98c62, 0xb31f7447, 0x8378c03e, /* 320-335 */
- 0x83755b9b, 0x056c2f3b, 0x79043189, 0x2da55211, /* 336-351 */
- 0x49a31741, 0x3eef7c2e, 0x8df2b6e8, 0xa1511a6a, /* 352-367 */
- 0xed55fe50, 0x43fb9e22, 0x449f468f, 0xb1b0300c, /* 368-383 */
- 0xb5577bec, 0x2e69e9e5, 0x1edac6a3, 0x7b08111a, /* 384-399 */
- 0xcba7b500, 0x423f08ff, 0xdce4f4d4, 0xb0000f7b, /* 400-415 */
- 0xf844af45, 0x12ee8f73, 0x55ce539e, 0xa4a16119, /* 416-431 */
- 0xe4426abd, 0x3f38fcf4, 0x0bcb97b6, 0x2a1d004b, /* 432-447 */
- 0xdaf6a011, 0x572e59ea, 0x3f71e585, 0x8ce3c147, /* 448-463 */
- 0x36784c8b, 0xf120b390, 0x692d9da2, 0x6a9d82d7, /* 464-479 */
- 0x078c565e, 0x03db32c8, 0xc5f77478, 0xc9d33ca8, /* 480-495 */
- 0xe6156e2d, 0x9912ba24, 0x53bfd966, 0x438f3788, /* 496-511 */
- 0xc0b7207d, 0x9dd67cfc, 0xa6416b6d, 0x9c52ee21, /* 512-527 */
- 0x6b7a9932, 0xccb7c407, 0x3338188e, 0xa525f3c4, /* 528-543 */
- 0x297998e2, 0x6fddd6d2, 0xb049160a, 0x7f6cf9b4, /* 544-559 */
- 0x0e8bc3b3, 0x7e18401f, 0x9aa2a551, 0x526e0def, /* 560-575 */
- 0x88b4a5d1, 0xf0540a3b, 0xfd04fb40, 0x46ebcf27, /* 576-591 */
- 0x159a56de, 0xa1e1351c, 0xe1072ae9, 0x6e3deca5, /* 592-607 */
- 0x1b9a92a6, 0x2f0d514e, 0x8bf3b040, 0x477f5cfa, /* 608-623 */
- 0xd9a1b480, 0xe1051f2a, 0xe815aa55, 0x17fede76, /* 624-639 */
- 0x04cb43cf, 0xb4f06409, 0x02923bb8, 0x52de2299, /* 640-655 */
- 0xd5a67168, 0xccc36dad, 0xb7107e7c, 0x8943bf34, /* 656-671 */
- 0x3a6f8863, 0xdde6d116, 0x2629499b, 0xf430e295, /* 672-687 */
- 0x38288df3, 0x7acc87c7, 0x93c7075b, 0x6a8ef661, /* 688-703 */
- 0x5fdf078c, 0x10b63179, 0x57127750, 0x542b36c2, /* 704-719 */
- 0x2b359cd9, 0x2d4566e3, 0x91d9e9db, 0x5a2c1236, /* 720-735 */
- 0xc88b3a03, 0xcd3c2787, 0x9470f7f8, 0xa27d9569, /* 736-751 */
- 0x6256d128, 0x62df9d0e, 0x47b3c98c, 0x3eb31f74, /* 752-767 */
- 0xac8378c0, 0x11a6a8da, 0x5fe50a15, 0xb9e22ed5, /* 768-783 */
- 0xf468f43f, 0x0300c449, 0x77becb1b, 0x9e9e5b55, /* 784-799 */
- 0xac6a32e6, 0x8111a1ed, 0x7b5007b0, 0xf08ffcba, /* 800-815 */
- 0x4f4d4423, 0x00f7bdce, 0x4af45b00, 0xe8f73f84, /* 816-831 */
- 0xe539e12e, 0x1611955c, 0x26abda4a, 0x8fcf4e44, /* 832-847 */
- 0xb97b63f3, 0xd004b0bc, 0x6a0112a1, 0xe59eadaf, /* 848-863 */
- 0x1e585572, 0x3c1473f7, 0x84c8b8ce, 0x0b390367, /* 864-879 */
- 0xd9da2f12, 0xd82d7692, 0xc565e6a9, 0xb32c8078, /* 880-895 */
- 0x7747803d, 0x33ca8c5f, 0x56e2dc9d, 0x2ba24e61, /* 896-911 */
- 0xfd966991, 0xf378853b, 0x7207d438, 0x67cfcc0b, /* 912-927 */
- 0x16b6d9dd, 0x2ee21a64, 0xa99329c5, 0x7c4076b7, /* 928-943 */
- 0x8188eccb, 0x5f3c4333, 0x998e2a52, 0xdd6d2297, /* 944-959 */
- 0x9160a6fd, 0xcf9b4b04, 0xbc3b37f6, 0x8401f0e8, /* 960-975 */
- 0x2a5517e1, 0xe0def9aa, 0x4a5d1526, 0x40a3b88b, /* 976-991 */
- 0x4fb40f05, 0xbcf27fd0, 0xa56de46e, 0x1351c159, /* 992-1007 */
- 0x72ae9a1e, 0xdeca5e10, 0xa92a66e3, 0xd514e1b9, /* 1008-1023 */
- 0x3b0402f0, 0xf5cfa8bf, 0x1b480477, 0x51f2ad9a, /* 1024-1039 */
- 0x5aa55e10, 0xede76e81, 0xb43cf17f, 0x0640904c, /* 1040-1055 */
- 0x64bb8b4f, 0xe7989ca4, 0xb73fabbb, 0xd9f72c15, /* 1056-1071 */
- 0x06ded38e, 0xc1fab18a, 0xed9f8a48, 0x9902f2b0, /* 1072-1087 */
- 0x6852de22, 0xadd5a671, 0x7cccc36d, 0x34b7107e, /* 1088-1103 */
- 0x638943bf, 0x163a6f88, 0x9bdde6d1, 0x95262949, /* 1104-1119 */
- 0xf3f430e2, 0xc738288d, 0x5b7acc87, 0x566e5c07, /* 1120-1135 */
- 0x9e9db2d4, 0xc123691d, 0xb3a035a2, 0xc2787c88, /* 1136-1151 */
- 0x0f7f8cd3, 0xd9569947, 0x6d128a27, 0xf9d0e625, /* 1152-1167 */
- 0x3c98c62d, 0x31f7447b, 0x378c03eb, 0x6a8daac8, /* 1168-1183 */
- 0x50a1511a, 0x22ed55fe, 0x8f43fb9e, 0x0c449f46, /* 1184-1199 */
- 0xecb1b030, 0xe5b5577b, 0xa32e69e9, 0x1a1edac6, /* 1200-1215 */
- 0x007b0811, 0xffcba7b5, 0xd4423f08, 0x7bdce4f4, /* 1216-1231 */
- 0x45b0000f, 0x73f844af, 0x9e12ee8f, 0x1955ce53, /* 1232-1247 */
- 0xbda4a161, 0xf4e4426a, 0xb63f38fc, 0x4b0bcb97, /* 1248-1263 */
- 0x112a1d00, 0xeadaf6a0, 0x85572e59, 0x473f71e5, /* 1264-1279 */
- 0x8b8ce3c1, 0x9036784c, 0xa2f120b3, 0xd7692d9d, /* 1280-1295 */
- 0x5e6a9d82, 0xc8078c56, 0x7803db32, 0xa8c5f774, /* 1296-1311 */
- 0x2dc9d33c, 0x24e6156e, 0x669912ba, 0x8853bfd9, /* 1312-1327 */
- 0x7d438f37, 0xfcc0b720, 0x6d9dd67c, 0x21a6416b, /* 1328-1343 */
- 0x329c52ee, 0x076b7a99, 0x8eccb7c4, 0xc4333818, /* 1344-1359 */
- 0xe2a525f3, 0xd2297998, 0x0a6fddd6, 0xb4b04916, /* 1360-1375 */
- 0xb37f6cf9, 0x1f0e8bc3, 0x517e1840, 0xef9aa2a5, /* 1376-1391 */
- 0xd1526e0d, 0x3b88b4a5, 0x40f0540a, 0x27fd04fb, /* 1392-1407 */
- 0xde46ebcf, 0x1c159a56, 0xe9a1e135, 0x4a7b029a, /* 1408-1423 */
- 0x029821cd, 0xc52d852c, 0xe3912eb2, 0x6281804f, /* 1424-1439 */
- 0xec5a0681, 0x132b3ba0, 0xe3deca5e, 0xb9a92a66, /* 1440-1455 */
- 0xf0d514e1, 0xbf3b0402, 0x77f5cfa8, 0x9a1b4804, /* 1456-1471 */
- 0x1051f2ad, 0x815aa55e, 0x7fede76e, 0x4cb43cf1, /* 1472-1487 */
- 0x4f064090, 0x2923bb8b, 0x2de22990, 0x5a671685, /* 1488-1503 */
- 0xcc36dadd, 0x7107e7cc, 0x943bf34b, 0xa6f88638, /* 1504-1519 */
- 0xde6d1163, 0x629499bd, 0x430e2952, 0x8288df3f, /* 1520-1535 */
- 0xacc87c73, 0xe5c075b7, 0xdb2d4566, 0x3691d9e9, /* 1536-1551 */
- 0x035a2c12, 0x87c88b3a, 0xf8cd3c27, 0x699470f7, /* 1552-1567 */
- 0x28a27d95, 0x0e6256d1, 0x8c62df9d, 0x7447b3c9, /* 1568-1583 */
- 0xc03eb31f, 0xdaac8378, 0x1511a6a8, 0xd55fe50a, /* 1584-1599 */
- 0x3fb9e22e, 0x49f468f4, 0x1b0300c4, 0x5577becb, /* 1600-1615 */
- 0xe69e9e5b, 0xedac6a32, 0xb08111a1, 0xba7b5007, /* 1616-1631 */
- 0x23f08ffc, 0xce4f4d44, 0x0000f7bd, 0x844af45b, /* 1632-1647 */
- 0x2ee8f73f, 0x5ce539e1, 0x4a161195, 0x4426abda, /* 1648-1663 */
- 0xf38fcf4e, 0xbcb97b63, 0xa1d004b0, 0xaf6a0112, /* 1664-1679 */
- 0x72e59ead, 0xf71e5855, 0xce3c1473, 0x6784c8b8, /* 1680-1695 */
- 0x120b3903, 0x92d9da2f, 0xa9d82d76, 0x78c565e6, /* 1696-1711 */
- 0x3db32c80, 0x5f774780, 0x9d33ca8c, 0x6156e2dc, /* 1712-1727 */
- 0x912ba24e, 0x3bfd9669, 0x38f37885, 0x0b7207d4, /* 1728-1743 */
- 0xdd67cfcc, 0x6416b6d9, 0xc52ee21a, 0xb7a99329, /* 1744-1759 */
- 0xcb7c4076, 0x338188ec, 0x525f3c43, 0x97998e2a, /* 1760-1775 */
- 0xfddd6d22, 0x789160a6, 0x9f401164, 0x6acd4e4f, /* 1776-1791 */
- 0x84398939, 0xb65334dc, 0xf78b3617, 0xb0e3c000, /* 1792-1807 */
- 0xf9b4b072, 0xc3b37f6c, 0x401f0e8b, 0xa5517e18, /* 1808-1823 */
- 0x0def9aa2, 0xa5d1526e, 0x0a3b88b4, 0xfb40f054, /* 1824-1839 */
- 0xcf27fd04, 0x56de46eb, 0x351c159a, 0x2ae9a1e1, /* 1840-1855 */
- 0xeca5e107, 0x92a66e3d, 0x514e1b9a, 0xb0402f0d, /* 1856-1871 */
- 0x5cfa8bf3, 0xb480477f, 0x1f2ad9a1, 0xaa55e105, /* 1872-1887 */
- 0xde76e815, 0x43cf17fe, 0x640904cb, 0x3bb8b4f0, /* 1888-1903 */
- 0x22990292, 0x716852de, 0x6dadd5a6, 0x7e7cccc3, /* 1904-1919 */
- 0xbf34b710, 0x88638943, 0xd1163a6f, 0x499bdde6, /* 1920-1935 */
- 0xe2952629, 0x8df3f430, 0x87c73828, 0x075b7acc, /* 1936-1951 */
- 0xd4566e5c, 0x1d9e9db2, 0xa2c12369, 0x88b3a035, /* 1952-1967 */
- 0xd3c2787c, 0x470f7f8c, 0x27d95699, 0x256d128a, /* 1968-1983 */
- 0x2df9d0e6, 0x7b3c98c6, 0xeb31f744, 0xc8378c03, /* 1984-1999 */
- 0x1a6a8daa, 0xfe50a151, 0x9e22ed55, 0x468f43fb, /* 2000-2015 */
- 0x300c449f, 0x7becb1b0, 0xe9e5b557, 0xc6a32e69, /* 2016-2031 */
- 0x111a1eda, 0xb5007b08, 0x08ffcba7, 0xf4d4423f, /* 2032-2047 */
- 0x0f7bdce4, 0xaf45b000, 0x8f73f844, 0x539e12ee, /* 2048-2063 */
- 0x611955ce, 0x6abda4a1, 0xfcf4e442, 0x97b63f38, /* 2064-2079 */
- 0x004b0bcb, 0xa0112a1d, 0x59eadaf6, 0xe585572e, /* 2080-2095 */
- 0xc1473f71, 0x4c8b8ce3, 0xb3903678, 0x9da2f120, /* 2096-2111 */
- 0x82d7692d, 0x565e6a9d, 0x32c8078c, 0x747803db, /* 2112-2127 */
- 0x3ca8c5f7, 0x6e2dc9d3, 0xba24e615, 0xa9669912, /* 2128-2143 */
- 0x4f4081f7, 0x433e5189, 0xbe7a8a6b, 0x56c78dd4, /* 2144-2159 */
- 0x61391d03, 0x2337ac91, 0x853b2b55, 0xd438f378, /* 2160-2175 */
- 0xcc0b7207, 0xd9dd67cf, 0x1a6416b6, 0x29c52ee2, /* 2176-2191 */
- 0x76b7a993, 0xeccb7c40, 0x43338188, 0x2a525f3c, /* 2192-2207 */
- 0x2297998e, 0xa6fddd6d, 0x4b049160, 0x37f6cf9b, /* 2208-2223 */
- 0xf0e8bc3b, 0x17e18401, 0xf9aa2a55, 0x1526e0de, /* 2224-2239 */
- 0xb88b4a5d, 0x0f0540a3, 0x7fd04fb4, 0xe46ebcf2, /* 2240-2255 */
- 0xc159a56d, 0x9a1e1351, 0x5e1072ae, 0x66e3deca, /* 2256-2271 */
- 0xe1b9a92a, 0x02f0d514, 0xa8bf3b04, 0x0477f5cf, /* 2272-2287 */
- 0xad9a1b48, 0x5e1051f2, 0x6e815aa5, 0xf17fede7, /* 2288-2303 */
- 0x904cb43c, 0x8b4f0640, 0x902923bb, 0x852de229, /* 2304-2319 */
- 0xdd5a6716, 0xcccc36da, 0x4b7107e7, 0x38943bf3, /* 2320-2335 */
- 0x63a6f886, 0xbdde6d11, 0x52629499, 0x3f430e29, /* 2336-2351 */
- 0x738288df, 0xb7acc87c, 0x66e5c075, 0xe9db2d45, /* 2352-2367 */
- 0x123691d9, 0x3a035a2c, 0x2787c88b, 0xf7f8cd3c, /* 2368-2383 */
- 0x95699470, 0xd128a27d, 0x9d0e6256, 0xc98c62df, /* 2384-2399 */
- 0x1f7447b3, 0x78c03eb3, 0xa8daac83, 0x0a1511a6, /* 2400-2415 */
- 0x2ed55fe5, 0xf43fb9e2, 0xc449f468, 0xcb1b0300, /* 2416-2431 */
- 0x5b5577be, 0x32e69e9e, 0xa1edac6a, 0x07b08111, /* 2432-2447 */
- 0xfcba7b50, 0x4423f08f, 0xbdce4f4d, 0x5b0000f7, /* 2448-2463 */
- 0x3f844af4, 0xe12ee8f7, 0x955ce539, 0xda4a1611, /* 2464-2479 */
- 0x4e4426ab, 0x63f38fcf, 0xb0bcb97b, 0x12a1d004, /* 2480-2495 */
- 0xadaf6a01, 0x5572e59e, 0x8d876e58, 0x880b9c0a, /* 2496-2511 */
- 0x114ef374, 0xaa58f107, 0x052b14c7, 0x65c36485, /* 2512-2527 */
- 0x72b6e661, 0xe3c1473f, 0x784c8b8c, 0x20b39036, /* 2528-2543 */
- 0x2d9da2f1, 0x9d82d769, 0x8c565e6a, 0xdb32c807, /* 2544-2559 */
- 0xf7747803, 0xd33ca8c5, 0x156e2dc9, 0x12ba24e6, /* 2560-2575 */
- 0xbfd96699, 0x8f378853, 0xb7207d43, 0xd67cfcc0, /* 2576-2591 */
- 0x416b6d9d, 0x52ee21a6, 0x7a99329c, 0xb7c4076b, /* 2592-2607 */
- 0x38188ecc, 0x25f3c433, 0x7998e2a5, 0xddd6d229, /* 2608-2623 */
- 0x49160a6f, 0x6cf9b4b0, 0x8bc3b37f, 0x18401f0e, /* 2624-2639 */
- 0xa2a5517e, 0x6e0def9a, 0xb4a5d152, 0x540a3b88, /* 2640-2655 */
- 0x04fb40f0, 0xebcf27fd, 0x9a56de46, 0xe1351c15, /* 2656-2671 */
- 0x072ae9a1, 0x3deca5e1, 0x9a92a66e, 0x0d514e1b, /* 2672-2687 */
- 0xf3b0402f, 0x7f5cfa8b, 0xa1b48047, 0x051f2ad9, /* 2688-2703 */
- 0x15aa55e1, 0xfede76e8, 0xcb43cf17, 0xf0640904, /* 2704-2719 */
- 0x923bb8b4, 0xde229902, 0xa6716852, 0xc36dadd5, /* 2720-2735 */
- 0x107e7ccc, 0x43bf34b7, 0x6f886389, 0xe6d1163a, /* 2736-2751 */
- 0x29499bdd, 0x30e29526, 0x288df3f4, 0xcc87c738, /* 2752-2767 */
- 0x5c075b7a, 0xb2d4566e, 0x691d9e9d, 0x35a2c123, /* 2768-2783 */
- 0x7c88b3a0, 0x8cd3c278, 0x99470f7f, 0x8a27d956, /* 2784-2799 */
- 0xe6256d12, 0xc62df9d0, 0x447b3c98, 0x03eb31f7, /* 2800-2815 */
- 0xaac8378c, 0x511a6a8d, 0x55fe50a1, 0xfb9e22ed, /* 2816-2831 */
- 0x9f468f43, 0xb0300c44, 0x577becb1, 0x69e9e5b5, /* 2832-2847 */
- 0xdac6a32e, 0x08111a1e, 0xa7b5007b, 0x3f08ffcb, /* 2848-2863 */
- 0x3234d442, 0x26746b69, 0x3168b0a3, 0x4c3dc6f8, /* 2864-2879 */
- 0x916e740c, 0xbcd699cb, 0x5b1f02a2, 0xf7bdcb2b, /* 2880-2895 */
- 0xf45b0000, 0xf73f844a, 0x39e12ee8, 0x11955ce5, /* 2896-2911 */
- 0xabda4a16, 0xcf4e4426, 0x7b63f38f, 0x04b0bcb9, /* 2912-2927 */
- 0x0112a1d0, 0x9eadaf6a, 0x585572e5, 0x1473f71e, /* 2928-2943 */
- 0xc8b8ce3c, 0x39036784, 0xda2f120b, 0x2d7692d9, /* 2944-2959 */
- 0x65e6a9d8, 0x2c8078c5, 0x47803db3, 0xca8c5f77, /* 2960-2975 */
- 0xe2dc9d33, 0xa24e6156, 0x9669912b, 0x78853bfd, /* 2976-2991 */
- 0x07d438f3, 0xcfcc0b72, 0xb6d9dd67, 0xe21a6416, /* 2992-3007 */
- 0x9329c52e, 0x4076b7a9, 0x88eccb7c, 0x3c433381, /* 3008-3023 */
- 0x8e2a525f, 0x6d229799, 0x60a6fddd, 0x9b4b0491, /* 3024-3039 */
- 0x3b37f6cf, 0x01f0e8bc, 0x5517e184, 0xdef9aa2a, /* 3040-3055 */
- 0x5d1526e0, 0xa3b88b4a, 0xb40f0540, 0xf27fd04f, /* 3056-3071 */
- 0x6de46ebc, 0x51c159a5, 0xae9a1e13, 0xca5e1072, /* 3072-3087 */
- 0x2a66e3de, 0x14e1b9a9, 0x0402f0d5, 0xcfa8bf3b, /* 3088-3103 */
- 0x480477f5, 0xf2ad9a1b, 0xa55e1051, 0xe76e815a, /* 3104-3119 */
- 0x3cf17fed, 0x40904cb4, 0xbb8b4f06, 0x29902923, /* 3120-3135 */
- 0x16852de2, 0xdadd5a67, 0xe7cccc36, 0xf34b7107, /* 3136-3151 */
- 0x8638943b, 0x1163a6f8, 0x99bdde6d, 0x29526294, /* 3152-3167 */
- 0xdf3f430e, 0x7c738288, 0x75b7acc8, 0x4566e5c0, /* 3168-3183 */
- 0xd9e9db2d, 0x2c123691, 0x8b3a035a, 0x3c2787c8, /* 3184-3199 */
- 0x70f7f8cd, 0x7d956994, 0x56d128a2, 0xdf9d0e62, /* 3200-3215 */
- 0xb3c98c62, 0xb31f7447, 0x8378c03e, 0x83755b9b, /* 3216-3231 */
- 0x056c2f3b, 0x79043189, 0x2da55211, 0x49a31741, /* 3232-3247 */
- 0x3eef7c2e, 0x8df2b6e8, 0xa1511a6a, 0xed55fe50, /* 3248-3263 */
- 0x43fb9e22, 0x449f468f, 0xb1b0300c, 0xb5577bec, /* 3264-3279 */
- 0x2e69e9e5, 0x1edac6a3, 0x7b08111a, 0xcba7b500, /* 3280-3295 */
- 0x423f08ff, 0xdce4f4d4, 0xb0000f7b, 0xf844af45, /* 3296-3311 */
- 0x12ee8f73, 0x55ce539e, 0xa4a16119, 0xe4426abd, /* 3312-3327 */
- 0x3f38fcf4, 0x0bcb97b6, 0x2a1d004b, 0xdaf6a011, /* 3328-3343 */
- 0x572e59ea, 0x3f71e585, 0x8ce3c147, 0x36784c8b, /* 3344-3359 */
- 0xf120b390, 0x692d9da2, 0x6a9d82d7, 0x078c565e, /* 3360-3375 */
- 0x03db32c8, 0xc5f77478, 0xc9d33ca8, 0xe6156e2d, /* 3376-3391 */
- 0x9912ba24, 0x53bfd966, 0x438f3788, 0xc0b7207d, /* 3392-3407 */
- 0x9dd67cfc, 0xa6416b6d, 0x9c52ee21, 0x6b7a9932, /* 3408-3423 */
- 0xccb7c407, 0x3338188e, 0xa525f3c4, 0x297998e2, /* 3424-3439 */
- 0x6fddd6d2, 0xb049160a, 0x7f6cf9b4, 0x0e8bc3b3, /* 3440-3455 */
- 0x7e18401f, 0x9aa2a551, 0x526e0def, 0x88b4a5d1, /* 3456-3471 */
- 0xf0540a3b, 0xfd04fb40, 0x46ebcf27, 0x159a56de, /* 3472-3487 */
- 0xa1e1351c, 0xe1072ae9, 0x6e3deca5, 0x1b9a92a6, /* 3488-3503 */
- 0x2f0d514e, 0x8bf3b040, 0x477f5cfa, 0xd9a1b480, /* 3504-3519 */
- 0xe1051f2a, 0xe815aa55, 0x17fede76, 0x04cb43cf, /* 3520-3535 */
- 0xb4f06409, 0x02923bb8, 0x52de2299, 0xd5a67168, /* 3536-3551 */
- 0xccc36dad, 0xb7107e7c, 0x8943bf34, 0x3a6f8863, /* 3552-3567 */
- 0xdde6d116, 0x2629499b, 0xf430e295, 0x38288df3, /* 3568-3583 */
- 0x7acc87c7, 0x93c7075b, 0x6a8ef661, 0x5fdf078c, /* 3584-3599 */
- 0x10b63179, 0x57127750, 0x542b36c2, 0x2b359cd9, /* 3600-3615 */
- 0x2d4566e3, 0x91d9e9db, 0x5a2c1236, 0xc88b3a03, /* 3616-3631 */
- 0xcd3c2787, 0x9470f7f8, 0xa27d9569, 0x6256d128, /* 3632-3647 */
- 0x62df9d0e, 0x47b3c98c, 0x3eb31f74, 0xac8378c0, /* 3648-3663 */
- 0x11a6a8da, 0x5fe50a15, 0xb9e22ed5, 0xf468f43f, /* 3664-3679 */
- 0x0300c449, 0x77becb1b, 0x9e9e5b55, 0xac6a32e6, /* 3680-3695 */
- 0x8111a1ed, 0x7b5007b0, 0xf08ffcba, 0x4f4d4423, /* 3696-3711 */
- 0x00f7bdce, 0x4af45b00, 0xe8f73f84, 0xe539e12e, /* 3712-3727 */
- 0x1611955c, 0x26abda4a, 0x8fcf4e44, 0xb97b63f3, /* 3728-3743 */
- 0xd004b0bc, 0x6a0112a1, 0xe59eadaf, 0x1e585572, /* 3744-3759 */
- 0x3c1473f7, 0x84c8b8ce, 0x0b390367, 0xd9da2f12, /* 3760-3775 */
- 0xd82d7692, 0xc565e6a9, 0xb32c8078, 0x7747803d, /* 3776-3791 */
- 0x33ca8c5f, 0x56e2dc9d, 0x2ba24e61, 0xfd966991, /* 3792-3807 */
- 0xf378853b, 0x7207d438, 0x67cfcc0b, 0x16b6d9dd, /* 3808-3823 */
- 0x2ee21a64, 0xa99329c5, 0x7c4076b7, 0x8188eccb, /* 3824-3839 */
- 0x5f3c4333, 0x998e2a52, 0xdd6d2297, 0x9160a6fd, /* 3840-3855 */
- 0xcf9b4b04, 0xbc3b37f6, 0x8401f0e8, 0x2a5517e1, /* 3856-3871 */
- 0xe0def9aa, 0x4a5d1526, 0x40a3b88b, 0x4fb40f05, /* 3872-3887 */
- 0xbcf27fd0, 0xa56de46e, 0x1351c159, 0x72ae9a1e, /* 3888-3903 */
- 0xdeca5e10, 0xa92a66e3, 0xd514e1b9, 0x3b0402f0, /* 3904-3919 */
- 0xf5cfa8bf, 0x1b480477, 0x51f2ad9a, 0x5aa55e10, /* 3920-3935 */
- 0xede76e81, 0xb43cf17f, 0x0640904c, 0x64bb8b4f, /* 3936-3951 */
- 0xe7989ca4, 0xb73fabbb, 0xd9f72c15, 0x06ded38e, /* 3952-3967 */
- 0xc1fab18a, 0xed9f8a48, 0x9902f2b0, 0x6852de22, /* 3968-3983 */
- 0xadd5a671, 0x7cccc36d, 0x34b7107e, 0x638943bf, /* 3984-3999 */
- 0x163a6f88, 0x9bdde6d1, 0x95262949, 0xf3f430e2, /* 4000-4015 */
- 0xc738288d, 0x5b7acc87, 0x566e5c07, 0x9e9db2d4, /* 4016-4031 */
- 0xc123691d, 0xb3a035a2, 0xc2787c88, 0x0f7f8cd3, /* 4032-4047 */
- 0xd9569947, 0x6d128a27, 0xf9d0e625, 0x3c98c62d, /* 4048-4063 */
- 0x31f7447b, 0x378c03eb, 0x6a8daac8, 0x50a1511a, /* 4064-4079 */
- 0x22ed55fe, 0x8f43fb9e, 0x0c449f46, 0xecb1b030, /* 4080-4095 */
- 0xe5b5577b, 0xa32e69e9, 0x1a1edac6, 0x007b0811, /* 4096-4111 */
- 0xffcba7b5, 0xd4423f08, 0x7bdce4f4, 0x45b0000f, /* 4112-4127 */
- 0x73f844af, 0x9e12ee8f, 0x1955ce53, 0xbda4a161, /* 4128-4143 */
- 0xf4e4426a, 0xb63f38fc, 0x4b0bcb97, 0x112a1d00, /* 4144-4159 */
- 0xeadaf6a0, 0x85572e59, 0x473f71e5, 0x8b8ce3c1, /* 4160-4175 */
- 0x9036784c, 0xa2f120b3, 0xd7692d9d, 0x5e6a9d82, /* 4176-4191 */
- 0xc8078c56, 0x7803db32, 0xa8c5f774, 0x2dc9d33c, /* 4192-4207 */
- 0x24e6156e, 0x669912ba, 0x8853bfd9, 0x7d438f37, /* 4208-4223 */
- 0xfcc0b720, 0x6d9dd67c, 0x21a6416b, 0x329c52ee, /* 4224-4239 */
- 0x076b7a99, 0x8eccb7c4, 0xc4333818, 0xe2a525f3, /* 4240-4255 */
- 0xd2297998, 0x0a6fddd6, 0xb4b04916, 0xb37f6cf9, /* 4256-4271 */
- 0x1f0e8bc3, 0x517e1840, 0xef9aa2a5, 0xd1526e0d, /* 4272-4287 */
- 0x3b88b4a5, 0x40f0540a, 0x27fd04fb, 0xde46ebcf, /* 4288-4303 */
- 0x1c159a56, 0xe9a1e135, 0x4a7b029a, 0x029821cd, /* 4304-4319 */
- 0xc52d852c, 0xe3912eb2, 0x6281804f, 0xec5a0681, /* 4320-4335 */
- 0x132b3ba0, 0xe3deca5e, 0xb9a92a66, 0xf0d514e1, /* 4336-4351 */
- 0xbf3b0402, 0x77f5cfa8, 0x9a1b4804, 0x1051f2ad, /* 4352-4367 */
- 0x815aa55e, 0x7fede76e, 0x4cb43cf1, 0x4f064090, /* 4368-4383 */
- 0x2923bb8b, 0x2de22990, 0x5a671685, 0xcc36dadd, /* 4384-4399 */
- 0x7107e7cc, 0x943bf34b, 0xa6f88638, 0xde6d1163, /* 4400-4415 */
- 0x629499bd, 0x430e2952, 0x8288df3f, 0xacc87c73, /* 4416-4431 */
- 0xe5c075b7, 0xdb2d4566, 0x3691d9e9, 0x035a2c12, /* 4432-4447 */
- 0x87c88b3a, 0xf8cd3c27, 0x699470f7, 0x28a27d95, /* 4448-4463 */
- 0x0e6256d1, 0x8c62df9d, 0x7447b3c9, 0xc03eb31f, /* 4464-4479 */
- 0xdaac8378, 0x1511a6a8, 0xd55fe50a, 0x3fb9e22e, /* 4480-4495 */
- 0x49f468f4, 0x1b0300c4, 0x5577becb, 0xe69e9e5b, /* 4496-4511 */
- 0xedac6a32, 0xb08111a1, 0xba7b5007, 0x23f08ffc, /* 4512-4527 */
- 0xce4f4d44, 0x0000f7bd, 0x844af45b, 0x2ee8f73f, /* 4528-4543 */
- 0x5ce539e1, 0x4a161195, 0x4426abda, 0xf38fcf4e, /* 4544-4559 */
- 0xbcb97b63, 0xa1d004b0, 0xaf6a0112, 0x72e59ead, /* 4560-4575 */
- 0xf71e5855, 0xce3c1473, 0x6784c8b8, 0x120b3903, /* 4576-4591 */
- 0x92d9da2f, 0xa9d82d76, 0x78c565e6, 0x3db32c80, /* 4592-4607 */
- 0x5f774780, 0x9d33ca8c, 0x6156e2dc, 0x912ba24e, /* 4608-4623 */
- 0x3bfd9669, 0x38f37885, 0x0b7207d4, 0xdd67cfcc, /* 4624-4639 */
- 0x6416b6d9, 0xc52ee21a, 0xb7a99329, 0xcb7c4076, /* 4640-4655 */
- 0x338188ec, 0x525f3c43, 0x97998e2a, 0xfddd6d22, /* 4656-4671 */
- 0x789160a6, 0x9f401164, 0x6acd4e4f, 0x84398939, /* 4672-4687 */
- 0xb65334dc, 0xf78b3617, 0xb0e3c000, 0xf9b4b072, /* 4688-4703 */
- 0xc3b37f6c, 0x401f0e8b, 0xa5517e18, 0x0def9aa2, /* 4704-4719 */
- 0xa5d1526e, 0x0a3b88b4, 0xfb40f054, 0xcf27fd04, /* 4720-4735 */
- 0x56de46eb, 0x351c159a, 0x2ae9a1e1, 0xeca5e107, /* 4736-4751 */
- 0x92a66e3d, 0x514e1b9a, 0xb0402f0d, 0x5cfa8bf3, /* 4752-4767 */
- 0xb480477f, 0x1f2ad9a1, 0xaa55e105, 0xde76e815, /* 4768-4783 */
- 0x43cf17fe, 0x640904cb, 0x3bb8b4f0, 0x22990292, /* 4784-4799 */
- 0x716852de, 0x6dadd5a6, 0x7e7cccc3, 0xbf34b710, /* 4800-4815 */
- 0x88638943, 0xd1163a6f, 0x499bdde6, 0xe2952629, /* 4816-4831 */
- 0x8df3f430, 0x87c73828, 0x075b7acc, 0xd4566e5c, /* 4832-4847 */
- 0x1d9e9db2, 0xa2c12369, 0x88b3a035, 0xd3c2787c, /* 4848-4863 */
- 0x470f7f8c, 0x27d95699, 0x256d128a, 0x2df9d0e6, /* 4864-4879 */
- 0x7b3c98c6, 0xeb31f744, 0xc8378c03, 0x1a6a8daa, /* 4880-4895 */
- 0xfe50a151, 0x9e22ed55, 0x468f43fb, 0x300c449f, /* 4896-4911 */
- 0x7becb1b0, 0xe9e5b557, 0xc6a32e69, 0x111a1eda, /* 4912-4927 */
- 0xb5007b08, 0x08ffcba7, 0xf4d4423f, 0x0f7bdce4, /* 4928-4943 */
- 0xaf45b000, 0x8f73f844, 0x539e12ee, 0x611955ce, /* 4944-4959 */
- 0x6abda4a1, 0xfcf4e442, 0x97b63f38, 0x004b0bcb, /* 4960-4975 */
- 0xa0112a1d, 0x59eadaf6, 0xe585572e, 0xc1473f71, /* 4976-4991 */
- 0x4c8b8ce3, 0xb3903678, 0x9da2f120, 0x82d7692d, /* 4992-5007 */
- 0x565e6a9d, 0x32c8078c, 0x747803db, 0x3ca8c5f7, /* 5008-5023 */
- 0x6e2dc9d3, 0xba24e615, 0xa9669912, 0x4f4081f7, /* 5024-5039 */
- 0x433e5189, 0xbe7a8a6b, 0x56c78dd4, 0x61391d03, /* 5040-5055 */
- 0x2337ac91, 0x853b2b55, 0xd438f378, 0xcc0b7207, /* 5056-5071 */
- 0xd9dd67cf, 0x1a6416b6, 0x29c52ee2, 0x76b7a993, /* 5072-5087 */
- 0xeccb7c40, 0x43338188, 0x2a525f3c, 0x2297998e, /* 5088-5103 */
- 0xa6fddd6d, 0x4b049160, 0x37f6cf9b, 0xf0e8bc3b, /* 5104-5119 */
- 0x17e18401, 0xf9aa2a55, 0x1526e0de, 0xb88b4a5d, /* 5120-5135 */
- 0x0f0540a3, 0x7fd04fb4, 0xe46ebcf2, 0xc159a56d, /* 5136-5151 */
- 0x9a1e1351, 0x5e1072ae, 0x66e3deca, 0xe1b9a92a, /* 5152-5167 */
- 0x02f0d514, 0xa8bf3b04, 0x0477f5cf, 0xad9a1b48, /* 5168-5183 */
- 0x5e1051f2, 0x6e815aa5, 0xf17fede7, 0x904cb43c, /* 5184-5199 */
- 0x8b4f0640, 0x902923bb, 0x852de229, 0xdd5a6716, /* 5200-5215 */
- 0xcccc36da, 0x4b7107e7, 0x38943bf3, 0x63a6f886, /* 5216-5231 */
- 0xbdde6d11, 0x52629499, 0x3f430e29, 0x738288df, /* 5232-5247 */
- 0xb7acc87c, 0x66e5c075, 0xe9db2d45, 0x123691d9, /* 5248-5263 */
- 0x3a035a2c, 0x2787c88b, 0xf7f8cd3c, 0x95699470, /* 5264-5279 */
- 0xd128a27d, 0x9d0e6256, 0xc98c62df, 0x1f7447b3, /* 5280-5295 */
- 0x78c03eb3, 0xa8daac83, 0x0a1511a6, 0x2ed55fe5, /* 5296-5311 */
- 0xf43fb9e2, 0xc449f468, 0xcb1b0300, 0x5b5577be, /* 5312-5327 */
- 0x32e69e9e, 0xa1edac6a, 0x07b08111, 0xfcba7b50, /* 5328-5343 */
- 0x4423f08f, 0xbdce4f4d, 0x5b0000f7, 0x3f844af4, /* 5344-5359 */
- 0xe12ee8f7, 0x955ce539, 0xda4a1611, 0x4e4426ab, /* 5360-5375 */
- 0x63f38fcf, 0xb0bcb97b, 0x12a1d004, 0xadaf6a01, /* 5376-5391 */
- 0x5572e59e, 0x8d876e58, 0x880b9c0a, 0x114ef374, /* 5392-5407 */
- 0xaa58f107, 0x052b14c7, 0x65c36485, 0x72b6e661, /* 5408-5423 */
- 0xe3c1473f, 0x784c8b8c, 0x20b39036, 0x2d9da2f1, /* 5424-5439 */
- 0x9d82d769, 0x8c565e6a, 0xdb32c807, 0xf7747803, /* 5440-5455 */
- 0xd33ca8c5, 0x156e2dc9, 0x12ba24e6, 0xbfd96699, /* 5456-5471 */
- 0x8f378853, 0xb7207d43, 0xd67cfcc0, 0x416b6d9d, /* 5472-5487 */
- 0x52ee21a6, 0x7a99329c, 0xb7c4076b, 0x38188ecc, /* 5488-5503 */
- 0x25f3c433, 0x7998e2a5, 0xddd6d229, 0x49160a6f, /* 5504-5519 */
- 0x6cf9b4b0, 0x8bc3b37f, 0x18401f0e, 0xa2a5517e, /* 5520-5535 */
- 0x6e0def9a, 0xb4a5d152, 0x540a3b88, 0x04fb40f0, /* 5536-5551 */
- 0xebcf27fd, 0x9a56de46, 0xe1351c15, 0x072ae9a1, /* 5552-5567 */
- 0x3deca5e1, 0x9a92a66e, 0x0d514e1b, 0xf3b0402f, /* 5568-5583 */
- 0x7f5cfa8b, 0xa1b48047, 0x051f2ad9, 0x15aa55e1, /* 5584-5599 */
- 0xfede76e8, 0xcb43cf17, 0xf0640904, 0x923bb8b4, /* 5600-5615 */
- 0xde229902, 0xa6716852, 0xc36dadd5, 0x107e7ccc, /* 5616-5631 */
- 0x43bf34b7, 0x6f886389, 0xe6d1163a, 0x29499bdd, /* 5632-5647 */
- 0x30e29526, 0x288df3f4, 0xcc87c738, 0x5c075b7a, /* 5648-5663 */
- 0xb2d4566e, 0x691d9e9d, 0x35a2c123, 0x7c88b3a0, /* 5664-5679 */
- 0x8cd3c278, 0x99470f7f, 0x8a27d956, 0xe6256d12, /* 5680-5695 */
- 0xc62df9d0, 0x447b3c98, 0x03eb31f7, 0xaac8378c, /* 5696-5711 */
- 0x511a6a8d, 0x55fe50a1, 0xfb9e22ed, 0x9f468f43, /* 5712-5727 */
- 0xb0300c44, 0x577becb1, 0x69e9e5b5, 0xdac6a32e, /* 5728-5743 */
- 0x08111a1e, 0xa7b5007b, 0x3f08ffcb, 0x3234d442, /* 5744-5759 */
- 0x26746b69, 0x3168b0a3, 0x4c3dc6f8, 0x916e740c, /* 5760-5775 */
- 0xbcd699cb, 0x5b1f02a2
- },
- { /* BER_PATTERN_ALT_NOT_0123 */
- 0x084231b0, 0x0ba4ffff, 0x08c07bb5, 0xc61ed117, /* 0-15 */
- 0xee6aa31a, 0x5425b5e9, 0x30b1bbd9, 0x849c0c70, /* 16-31 */
- 0xfb4f4346, 0xfeed5e2f, 0x61525095, 0xa7aa8d1a, /* 32-47 */
- 0xeb8c08e1, 0x374731c3, 0xc6fc987b, 0x25d0edf4, /* 48-63 */
- 0xd2896d26, 0x9a195627, 0xd37f873a, 0xb87fc24c, /* 64-79 */
- 0x3573a088, 0x1d2362cc, 0x5db19ea9, 0x69966ed4, /* 80-95 */
- 0x877ac402, 0xf82bc70c, 0x3033f48d, 0x49262298, /* 96-111 */
- 0x1de59be9, 0x6cd63ad1, 0xbf894856, 0x77133483, /* 112-127 */
- 0xc3bccc7e, 0x71d5ada0, 0x92dd6866, 0x9f590222, /* 128-143 */
- 0x64b4fb6e, 0xc4c80930, 0xfe0f1743, 0xaae81e7b, /* 144-159 */
- 0x210655d5, 0xa2ead91f, 0x5c4774b5, 0x4bf0fabf, /* 160-175 */
- 0x0d802fb0, 0x921b9143, 0xae3ea65a, 0x5165e1ec, /* 176-191 */
- 0x35a1ef8d, 0xd5991c21, 0xeb1e4656, 0xfbfd0f2a, /* 192-207 */
- 0x305740c4, 0xb7fb880a, 0x0d5265e4, 0x5aa1efae, /* 208-223 */
- 0x18917ea5, 0xc30e8012, 0xbf6fb34b, 0x4474b0f9, /* 224-239 */
- 0xd66fd6dc, 0xe97ad21d, 0x2522a598, 0x183333c9, /* 240-255 */
- 0x0cb48ef8, 0x79c76bc4, 0xee9c5907, 0x66422192, /* 256-271 */
- 0xd6ad9d6b, 0x20c0bcf1, 0x838c7d77, 0x8a485337, /* 272-287 */
- 0xba991a3f, 0x261624d2, 0xd3edc96e, 0x74c5fca5, /* 288-303 */
- 0xc3d87837, 0x8f080732, 0x826a966b, 0xa92ed75d, /* 304-319 */
- 0x2062f19d, 0x4c36739d, 0x4ce08bb8, 0x7c873fc1, /* 320-335 */
- 0x1c2d1653, 0xd22f7d1d, 0x62e974fa, 0xf2abd78a, /* 336-351 */
- 0x205d71f0, 0x3b2205cd, 0x725b055c, 0x5eaee595, /* 352-367 */
- 0x12aa01af, 0xbc0461dd, 0xbb60b970, 0x4e4fcff3, /* 368-383 */
- 0x4aa88413, 0xd196161a, 0xe125395c, 0x84f7eee5, /* 384-399 */
- 0x34584aff, 0xbdc0f700, 0x231b0b2b, 0x4ffff084, /* 400-415 */
- 0x07bb50ba, 0xed11708c, 0xaa31ac61, 0x5b5e9ee6, /* 416-431 */
- 0x1bbd9542, 0xc0c7030b, 0xf4346849, 0xd5e2ffb4, /* 432-447 */
- 0x25095fee, 0xa8d1a615, 0xc08e1a7a, 0x731c3eb8, /* 448-463 */
- 0xc987b374, 0x0edf4c6f, 0x96d2625d, 0x95627d28, /* 464-479 */
- 0xf873a9a1, 0xfc24cd37, 0x3a088b87, 0x362cc357, /* 480-495 */
- 0x19ea91d2, 0x66ed45db, 0xac402699, 0xbc70c877, /* 496-511 */
- 0x3f48df82, 0x62298303, 0x59be9492, 0x63ad11de, /* 512-527 */
- 0x948566cd, 0x33483bf8, 0xccc7e771, 0x5ada0c3b, /* 528-543 */
- 0xd686671d, 0x9022292d, 0x4fb6e9f5, 0x8093064b, /* 544-559 */
- 0xf1743c4c, 0x81e7bfe0, 0x655d5aae, 0xad91f210, /* 560-575 */
- 0x774b5a2e, 0x0fabf5c4, 0x02fb04bf, 0xb91430d8, /* 576-591 */
- 0xea65a921, 0x5e1ecae3, 0x1ef8d516, 0x91c2135a, /* 592-607 */
- 0xe4656d59, 0xd0f2aeb1, 0x740c4fbf, 0xb880a305, /* 608-623 */
- 0x265e4b7f, 0x1efae0d5, 0x17ea55aa, 0xe8012189, /* 624-639 */
- 0xfb34bc30, 0x4b0f9bf6, 0xfd6dc447, 0xad21dd66, /* 640-655 */
- 0x2a598e97, 0x333c9252, 0x48ef8183, 0x76bc40cb, /* 656-671 */
- 0xc590779c, 0x22192ee9, 0xd9d6b664, 0x0bcf1d6a, /* 672-687 */
- 0xc7d7720c, 0x85337838, 0x171b88a4, 0x5fac9f94, /* 688-703 */
- 0x8b883af8, 0xf8ef80c7, 0xb1796aa0, 0x83b5005d, /* 704-719 */
- 0xb00edc85, 0xd2ba9919, 0x6e261624, 0xa5d3edc9, /* 720-735 */
- 0x3774c5fc, 0x32c3d878, 0x6b8f0807, 0x5d826a96, /* 736-751 */
- 0x9da92ed7, 0x9d2062f1, 0xb84c3673, 0xc14ce08b, /* 752-767 */
- 0x537c873f, 0xee595725, 0xa01af5ea, 0x461dd12a, /* 768-783 */
- 0x0b970bc0, 0xfcff3bb6, 0x884134e4, 0x6161a4aa, /* 784-799 */
- 0x5395cd19, 0x7eee5e12, 0x84aff84f, 0x0f700345, /* 800-815 */
- 0xb0b2bbdc, 0xff084231, 0xb50ba4ff, 0x1708c07b, /* 816-831 */
- 0x1ac61ed1, 0xe9ee6aa3, 0xd95425b5, 0x7030b1bb, /* 832-847 */
- 0x46849c0c, 0x2ffb4f43, 0x95feed5e, 0x1a615250, /* 848-863 */
- 0xe1a7aa8d, 0xc3eb8c08, 0x7b374731, 0xf4c6fc98, /* 864-879 */
- 0x2625d0ed, 0x27d2896d, 0x3a9a1956, 0x4cd37f87, /* 880-895 */
- 0x88b87fc2, 0xcc3573a0, 0xa91d2362, 0xd45db19e, /* 896-911 */
- 0x0269966e, 0x0c877ac4, 0x8df82bc7, 0x983033f4, /* 912-927 */
- 0xe9492622, 0xd11de59b, 0x566cd63a, 0x83bf8948, /* 928-943 */
- 0x7e771334, 0xa0c3bccc, 0x6671d5ad, 0x2292dd68, /* 944-959 */
- 0x6e9f5902, 0x3064b4fb, 0x43c4c809, 0x7bfe0f17, /* 960-975 */
- 0xd5aae81e, 0x1f210655, 0xb5a2ead9, 0xbf5c4774, /* 976-991 */
- 0xb04bf0fa, 0x430d802f, 0x5a921b91, 0xecae3ea6, /* 992-1007 */
- 0x8d5165e1, 0x2135a1ef, 0x56d5991c, 0x2aeb1e46, /* 1008-1023 */
- 0xc4fbfd0f, 0x0a305740, 0xe4b7fb88, 0xae0d5265, /* 1024-1039 */
- 0xa55aa1ef, 0x1218917e, 0x4bc30e80, 0xf9bf6fb3, /* 1040-1055 */
- 0xac4474b0, 0xc107c4e9, 0xc4e8e8e9, 0x42ecc150, /* 1056-1071 */
- 0xb701dd0b, 0x22934fec, 0x599a4731, 0x66fd5b03, /* 1072-1087 */
- 0x97ad21dd, 0x522a598e, 0x83333c92, 0xcb48ef81, /* 1088-1103 */
- 0x9c76bc40, 0xe9c59077, 0x6422192e, 0x6ad9d6b6, /* 1104-1119 */
- 0x0c0bcf1d, 0x38c7d772, 0xa4853378, 0xa991a3f8, /* 1120-1135 */
- 0x61624d2b, 0x3edc96e2, 0x4c5fca5d, 0x3d878377, /* 1136-1151 */
- 0xf080732c, 0x26a966b8, 0x92ed75d8, 0x062f19da, /* 1152-1167 */
- 0xc36739d2, 0xce08bb84, 0xc873fc14, 0x95725537, /* 1168-1183 */
- 0xaf5eaee5, 0xdd12aa01, 0x70bc0461, 0xf3bb60b9, /* 1184-1199 */
- 0x134e4fcf, 0x1a4aa884, 0x5cd19616, 0xe5e12539, /* 1200-1215 */
- 0xff84f7ee, 0x0034584a, 0x2bbdc0f7, 0x84231b0b, /* 1216-1231 */
- 0xba4ffff0, 0x8c07bb50, 0x61ed1170, 0xe6aa31ac, /* 1232-1247 */
- 0x425b5e9e, 0x0b1bbd95, 0x49c0c703, 0xb4f43468, /* 1248-1263 */
- 0xeed5e2ff, 0x1525095f, 0x7aa8d1a6, 0xb8c08e1a, /* 1264-1279 */
- 0x74731c3e, 0x6fc987b3, 0x5d0edf4c, 0x2896d262, /* 1280-1295 */
- 0xa195627d, 0x37f873a9, 0x87fc24cd, 0x573a088b, /* 1296-1311 */
- 0xd2362cc3, 0xdb19ea91, 0x9966ed45, 0x77ac4026, /* 1312-1327 */
- 0x82bc70c8, 0x033f48df, 0x92622983, 0xde59be94, /* 1328-1343 */
- 0xcd63ad11, 0xf8948566, 0x7133483b, 0x3bccc7e7, /* 1344-1359 */
- 0x1d5ada0c, 0x2dd68667, 0xf5902229, 0x4b4fb6e9, /* 1360-1375 */
- 0x4c809306, 0xe0f1743c, 0xae81e7bf, 0x10655d5a, /* 1376-1391 */
- 0x2ead91f2, 0xc4774b5a, 0xbf0fabf5, 0xd802fb04, /* 1392-1407 */
- 0x21b91430, 0xe3ea65a9, 0x165e1eca, 0xbfffde15, /* 1408-1423 */
- 0x76ad03a4, 0x7bf9d211, 0x13797703, 0xfd67eb52, /* 1424-1439 */
- 0xb08d98b7, 0xe9b000e0, 0x1c2135a1, 0x4656d599, /* 1440-1455 */
- 0x0f2aeb1e, 0x40c4fbfd, 0x880a3057, 0x65e4b7fb, /* 1456-1471 */
- 0xefae0d52, 0x7ea55aa1, 0x80121891, 0xb34bc30e, /* 1472-1487 */
- 0xb0f9bf6f, 0xd6dc4474, 0xd21dd66f, 0xa598e97a, /* 1488-1503 */
- 0x33c92522, 0x8ef81833, 0x6bc40cb4, 0x590779c7, /* 1504-1519 */
- 0x2192ee9c, 0x9d6b6642, 0xbcf1d6ad, 0x7d7720c0, /* 1520-1535 */
- 0x5337838c, 0x1a3f8a48, 0x24d2ba99, 0xc96e2616, /* 1536-1551 */
- 0xfca5d3ed, 0x783774c5, 0x0732c3d8, 0x966b8f08, /* 1552-1567 */
- 0xd75d826a, 0xf19da92e, 0x739d2062, 0x8bb84c36, /* 1568-1583 */
- 0x3fc14ce0, 0x25537c87, 0xeaee5957, 0x2aa01af5, /* 1584-1599 */
- 0xc0461dd1, 0xb60b970b, 0xe4fcff3b, 0xaa884134, /* 1600-1615 */
- 0x196161a4, 0x125395cd, 0x4f7eee5e, 0x4584aff8, /* 1616-1631 */
- 0xdc0f7003, 0x31b0b2bb, 0xffff0842, 0x7bb50ba4, /* 1632-1647 */
- 0xd11708c0, 0xa31ac61e, 0xb5e9ee6a, 0xbbd95425, /* 1648-1663 */
- 0x0c7030b1, 0x4346849c, 0x5e2ffb4f, 0x5095feed, /* 1664-1679 */
- 0x8d1a6152, 0x08e1a7aa, 0x31c3eb8c, 0x987b3747, /* 1680-1695 */
- 0xedf4c6fc, 0x6d2625d0, 0x5627d289, 0x873a9a19, /* 1696-1711 */
- 0xc24cd37f, 0xa088b87f, 0x62cc3573, 0x9ea91d23, /* 1712-1727 */
- 0x6ed45db1, 0xc4026996, 0xc70c877a, 0xf48df82b, /* 1728-1743 */
- 0x22983033, 0x9be94926, 0x3ad11de5, 0x48566cd6, /* 1744-1759 */
- 0x3483bf89, 0xcc7e7713, 0xada0c3bc, 0x686671d5, /* 1760-1775 */
- 0x022292dd, 0x35599f59, 0xcd668e3c, 0x2fbe990c, /* 1776-1791 */
- 0x01a292d4, 0xd0e2ebd2, 0x8e685fe9, 0x0357c5cd, /* 1792-1807 */
- 0x064b4fdb, 0x3c4c8093, 0xbfe0f174, 0x5aae81e7, /* 1808-1823 */
- 0xf210655d, 0x5a2ead91, 0xf5c4774b, 0x04bf0fab, /* 1824-1839 */
- 0x30d802fb, 0xa921b914, 0xcae3ea65, 0xd5165e1e, /* 1840-1855 */
- 0x135a1ef8, 0x6d5991c2, 0xaeb1e465, 0x4fbfd0f2, /* 1856-1871 */
- 0xa305740c, 0x4b7fb880, 0xe0d5265e, 0x55aa1efa, /* 1872-1887 */
- 0x218917ea, 0xbc30e801, 0x9bf6fb34, 0xc4474b0f, /* 1888-1903 */
- 0xdd66fd6d, 0x8e97ad21, 0x92522a59, 0x8183333c, /* 1904-1919 */
- 0x40cb48ef, 0x779c76bc, 0x2ee9c590, 0xb6642219, /* 1920-1935 */
- 0x1d6ad9d6, 0x720c0bcf, 0x7838c7d7, 0xf8a48533, /* 1936-1951 */
- 0x2ba991a3, 0xe261624d, 0x5d3edc96, 0x774c5fca, /* 1952-1967 */
- 0x2c3d8783, 0xb8f08073, 0xd826a966, 0xda92ed75, /* 1968-1983 */
- 0xd2062f19, 0x84c36739, 0x14ce08bb, 0x37c873fc, /* 1984-1999 */
- 0xe5957255, 0x01af5eae, 0x61dd12aa, 0xb970bc04, /* 2000-2015 */
- 0xcff3bb60, 0x84134e4f, 0x161a4aa8, 0x395cd196, /* 2016-2031 */
- 0xeee5e125, 0x4aff84f7, 0xf7003458, 0x0b2bbdc0, /* 2032-2047 */
- 0xf084231b, 0x50ba4fff, 0x708c07bb, 0xac61ed11, /* 2048-2063 */
- 0x9ee6aa31, 0x95425b5e, 0x030b1bbd, 0x6849c0c7, /* 2064-2079 */
- 0xffb4f434, 0x5feed5e2, 0xa6152509, 0x1a7aa8d1, /* 2080-2095 */
- 0x3eb8c08e, 0xb374731c, 0x4c6fc987, 0x625d0edf, /* 2096-2111 */
- 0x7d2896d2, 0xa9a19562, 0xcd37f873, 0x8b87fc24, /* 2112-2127 */
- 0xc3573a08, 0x91d2362c, 0x45db19ea, 0x269966ed, /* 2128-2143 */
- 0x26b5052b, 0x7e4a64ab, 0x0fc45e3c, 0x4b37658d, /* 2144-2159 */
- 0x57a6fb68, 0x636b7b0f, 0x7ac1b06e, 0x2bc70c87, /* 2160-2175 */
- 0x33f48df8, 0x26229830, 0xe59be949, 0xd63ad11d, /* 2176-2191 */
- 0x8948566c, 0x133483bf, 0xbccc7e77, 0xd5ada0c3, /* 2192-2207 */
- 0xdd686671, 0x59022292, 0xb4fb6e9f, 0xc8093064, /* 2208-2223 */
- 0x0f1743c4, 0xe81e7bfe, 0x0655d5aa, 0xead91f21, /* 2224-2239 */
- 0x4774b5a2, 0xf0fabf5c, 0x802fb04b, 0x1b91430d, /* 2240-2255 */
- 0x3ea65a92, 0x65e1ecae, 0xa1ef8d51, 0x991c2135, /* 2256-2271 */
- 0x1e4656d5, 0xfd0f2aeb, 0x5740c4fb, 0xfb880a30, /* 2272-2287 */
- 0x5265e4b7, 0xa1efae0d, 0x917ea55a, 0x0e801218, /* 2288-2303 */
- 0x6fb34bc3, 0x74b0f9bf, 0x6fd6dc44, 0x7ad21dd6, /* 2304-2319 */
- 0x22a598e9, 0x3333c925, 0xb48ef818, 0xc76bc40c, /* 2320-2335 */
- 0x9c590779, 0x422192ee, 0xad9d6b66, 0xc0bcf1d6, /* 2336-2351 */
- 0x8c7d7720, 0x48533783, 0x991a3f8a, 0x1624d2ba, /* 2352-2367 */
- 0xedc96e26, 0xc5fca5d3, 0xd8783774, 0x080732c3, /* 2368-2383 */
- 0x6a966b8f, 0x2ed75d82, 0x62f19da9, 0x36739d20, /* 2384-2399 */
- 0xe08bb84c, 0x873fc14c, 0x5725537c, 0xf5eaee59, /* 2400-2415 */
- 0xd12aa01a, 0x0bc0461d, 0x3bb60b97, 0x34e4fcff, /* 2416-2431 */
- 0xa4aa8841, 0xcd196161, 0x5e125395, 0xf84f7eee, /* 2432-2447 */
- 0x034584af, 0xbbdc0f70, 0x4231b0b2, 0xa4ffff08, /* 2448-2463 */
- 0xc07bb50b, 0x1ed11708, 0x6aa31ac6, 0x25b5e9ee, /* 2464-2479 */
- 0xb1bbd954, 0x9c0c7030, 0x4f434684, 0xed5e2ffb, /* 2480-2495 */
- 0x525095fe, 0xaa8d1a61, 0xd5caa6a7, 0xcb59ba95, /* 2496-2511 */
- 0xfc0b80a3, 0xa4dd6a1c, 0xfb4da518, 0xa8ba87ec, /* 2512-2527 */
- 0xdb055264, 0x1c3eb8c0, 0x87b37473, 0xdf4c6fc9, /* 2528-2543 */
- 0xd2625d0e, 0x627d2896, 0x73a9a195, 0x24cd37f8, /* 2544-2559 */
- 0x088b87fc, 0x2cc3573a, 0xea91d236, 0xed45db19, /* 2560-2575 */
- 0x40269966, 0x70c877ac, 0x48df82bc, 0x2983033f, /* 2576-2591 */
- 0xbe949262, 0xad11de59, 0x8566cd63, 0x483bf894, /* 2592-2607 */
- 0xc7e77133, 0xda0c3bcc, 0x86671d5a, 0x22292dd6, /* 2608-2623 */
- 0xb6e9f590, 0x93064b4f, 0x743c4c80, 0xe7bfe0f1, /* 2624-2639 */
- 0x5d5aae81, 0x91f21065, 0x4b5a2ead, 0xabf5c477, /* 2640-2655 */
- 0xfb04bf0f, 0x1430d802, 0x65a921b9, 0x1ecae3ea, /* 2656-2671 */
- 0xf8d5165e, 0xc2135a1e, 0x656d5991, 0xf2aeb1e4, /* 2672-2687 */
- 0x0c4fbfd0, 0x80a30574, 0x5e4b7fb8, 0xfae0d526, /* 2688-2703 */
- 0xea55aa1e, 0x01218917, 0x34bc30e8, 0x0f9bf6fb, /* 2704-2719 */
- 0x6dc4474b, 0x21dd66fd, 0x598e97ad, 0x3c92522a, /* 2720-2735 */
- 0xef818333, 0xbc40cb48, 0x90779c76, 0x192ee9c5, /* 2736-2751 */
- 0xd6b66422, 0xcf1d6ad9, 0xd7720c0b, 0x337838c7, /* 2752-2767 */
- 0xa3f8a485, 0x4d2ba991, 0x96e26162, 0xca5d3edc, /* 2768-2783 */
- 0x83774c5f, 0x732c3d87, 0x66b8f080, 0x75d826a9, /* 2784-2799 */
- 0x19da92ed, 0x39d2062f, 0xbb84c367, 0xfc14ce08, /* 2800-2815 */
- 0x5537c873, 0xaee59572, 0xaa01af5e, 0x0461dd12, /* 2816-2831 */
- 0x60b970bc, 0x4fcff3bb, 0xa884134e, 0x96161a4a, /* 2832-2847 */
- 0x25395cd1, 0xf7eee5e1, 0x584aff84, 0xc0f70034, /* 2848-2863 */
- 0xeebb2bbd, 0x041d9eed, 0x6655c496, 0x158c782c, /* 2864-2879 */
- 0xfa7384e4, 0x22e0062d, 0x605f5e75, 0x084231b0, /* 2880-2895 */
- 0x0ba4ffff, 0x08c07bb5, 0xc61ed117, 0xee6aa31a, /* 2896-2911 */
- 0x5425b5e9, 0x30b1bbd9, 0x849c0c70, 0xfb4f4346, /* 2912-2927 */
- 0xfeed5e2f, 0x61525095, 0xa7aa8d1a, 0xeb8c08e1, /* 2928-2943 */
- 0x374731c3, 0xc6fc987b, 0x25d0edf4, 0xd2896d26, /* 2944-2959 */
- 0x9a195627, 0xd37f873a, 0xb87fc24c, 0x3573a088, /* 2960-2975 */
- 0x1d2362cc, 0x5db19ea9, 0x69966ed4, 0x877ac402, /* 2976-2991 */
- 0xf82bc70c, 0x3033f48d, 0x49262298, 0x1de59be9, /* 2992-3007 */
- 0x6cd63ad1, 0xbf894856, 0x77133483, 0xc3bccc7e, /* 3008-3023 */
- 0x71d5ada0, 0x92dd6866, 0x9f590222, 0x64b4fb6e, /* 3024-3039 */
- 0xc4c80930, 0xfe0f1743, 0xaae81e7b, 0x210655d5, /* 3040-3055 */
- 0xa2ead91f, 0x5c4774b5, 0x4bf0fabf, 0x0d802fb0, /* 3056-3071 */
- 0x921b9143, 0xae3ea65a, 0x5165e1ec, 0x35a1ef8d, /* 3072-3087 */
- 0xd5991c21, 0xeb1e4656, 0xfbfd0f2a, 0x305740c4, /* 3088-3103 */
- 0xb7fb880a, 0x0d5265e4, 0x5aa1efae, 0x18917ea5, /* 3104-3119 */
- 0xc30e8012, 0xbf6fb34b, 0x4474b0f9, 0xd66fd6dc, /* 3120-3135 */
- 0xe97ad21d, 0x2522a598, 0x183333c9, 0x0cb48ef8, /* 3136-3151 */
- 0x79c76bc4, 0xee9c5907, 0x66422192, 0xd6ad9d6b, /* 3152-3167 */
- 0x20c0bcf1, 0x838c7d77, 0x8a485337, 0xba991a3f, /* 3168-3183 */
- 0x261624d2, 0xd3edc96e, 0x74c5fca5, 0xc3d87837, /* 3184-3199 */
- 0x8f080732, 0x826a966b, 0xa92ed75d, 0x2062f19d, /* 3200-3215 */
- 0x4c36739d, 0x4ce08bb8, 0x7c873fc1, 0x1c2d1653, /* 3216-3231 */
- 0xd22f7d1d, 0x62e974fa, 0xf2abd78a, 0x205d71f0, /* 3232-3247 */
- 0x3b2205cd, 0x725b055c, 0x5eaee595, 0x12aa01af, /* 3248-3263 */
- 0xbc0461dd, 0xbb60b970, 0x4e4fcff3, 0x4aa88413, /* 3264-3279 */
- 0xd196161a, 0xe125395c, 0x84f7eee5, 0x34584aff, /* 3280-3295 */
- 0xbdc0f700, 0x231b0b2b, 0x4ffff084, 0x07bb50ba, /* 3296-3311 */
- 0xed11708c, 0xaa31ac61, 0x5b5e9ee6, 0x1bbd9542, /* 3312-3327 */
- 0xc0c7030b, 0xf4346849, 0xd5e2ffb4, 0x25095fee, /* 3328-3343 */
- 0xa8d1a615, 0xc08e1a7a, 0x731c3eb8, 0xc987b374, /* 3344-3359 */
- 0x0edf4c6f, 0x96d2625d, 0x95627d28, 0xf873a9a1, /* 3360-3375 */
- 0xfc24cd37, 0x3a088b87, 0x362cc357, 0x19ea91d2, /* 3376-3391 */
- 0x66ed45db, 0xac402699, 0xbc70c877, 0x3f48df82, /* 3392-3407 */
- 0x62298303, 0x59be9492, 0x63ad11de, 0x948566cd, /* 3408-3423 */
- 0x33483bf8, 0xccc7e771, 0x5ada0c3b, 0xd686671d, /* 3424-3439 */
- 0x9022292d, 0x4fb6e9f5, 0x8093064b, 0xf1743c4c, /* 3440-3455 */
- 0x81e7bfe0, 0x655d5aae, 0xad91f210, 0x774b5a2e, /* 3456-3471 */
- 0x0fabf5c4, 0x02fb04bf, 0xb91430d8, 0xea65a921, /* 3472-3487 */
- 0x5e1ecae3, 0x1ef8d516, 0x91c2135a, 0xe4656d59, /* 3488-3503 */
- 0xd0f2aeb1, 0x740c4fbf, 0xb880a305, 0x265e4b7f, /* 3504-3519 */
- 0x1efae0d5, 0x17ea55aa, 0xe8012189, 0xfb34bc30, /* 3520-3535 */
- 0x4b0f9bf6, 0xfd6dc447, 0xad21dd66, 0x2a598e97, /* 3536-3551 */
- 0x333c9252, 0x48ef8183, 0x76bc40cb, 0xc590779c, /* 3552-3567 */
- 0x22192ee9, 0xd9d6b664, 0x0bcf1d6a, 0xc7d7720c, /* 3568-3583 */
- 0x85337838, 0x171b88a4, 0x5fac9f94, 0x8b883af8, /* 3584-3599 */
- 0xf8ef80c7, 0xb1796aa0, 0x83b5005d, 0xb00edc85, /* 3600-3615 */
- 0xd2ba9919, 0x6e261624, 0xa5d3edc9, 0x3774c5fc, /* 3616-3631 */
- 0x32c3d878, 0x6b8f0807, 0x5d826a96, 0x9da92ed7, /* 3632-3647 */
- 0x9d2062f1, 0xb84c3673, 0xc14ce08b, 0x537c873f, /* 3648-3663 */
- 0xee595725, 0xa01af5ea, 0x461dd12a, 0x0b970bc0, /* 3664-3679 */
- 0xfcff3bb6, 0x884134e4, 0x6161a4aa, 0x5395cd19, /* 3680-3695 */
- 0x7eee5e12, 0x84aff84f, 0x0f700345, 0xb0b2bbdc, /* 3696-3711 */
- 0xff084231, 0xb50ba4ff, 0x1708c07b, 0x1ac61ed1, /* 3712-3727 */
- 0xe9ee6aa3, 0xd95425b5, 0x7030b1bb, 0x46849c0c, /* 3728-3743 */
- 0x2ffb4f43, 0x95feed5e, 0x1a615250, 0xe1a7aa8d, /* 3744-3759 */
- 0xc3eb8c08, 0x7b374731, 0xf4c6fc98, 0x2625d0ed, /* 3760-3775 */
- 0x27d2896d, 0x3a9a1956, 0x4cd37f87, 0x88b87fc2, /* 3776-3791 */
- 0xcc3573a0, 0xa91d2362, 0xd45db19e, 0x0269966e, /* 3792-3807 */
- 0x0c877ac4, 0x8df82bc7, 0x983033f4, 0xe9492622, /* 3808-3823 */
- 0xd11de59b, 0x566cd63a, 0x83bf8948, 0x7e771334, /* 3824-3839 */
- 0xa0c3bccc, 0x6671d5ad, 0x2292dd68, 0x6e9f5902, /* 3840-3855 */
- 0x3064b4fb, 0x43c4c809, 0x7bfe0f17, 0xd5aae81e, /* 3856-3871 */
- 0x1f210655, 0xb5a2ead9, 0xbf5c4774, 0xb04bf0fa, /* 3872-3887 */
- 0x430d802f, 0x5a921b91, 0xecae3ea6, 0x8d5165e1, /* 3888-3903 */
- 0x2135a1ef, 0x56d5991c, 0x2aeb1e46, 0xc4fbfd0f, /* 3904-3919 */
- 0x0a305740, 0xe4b7fb88, 0xae0d5265, 0xa55aa1ef, /* 3920-3935 */
- 0x1218917e, 0x4bc30e80, 0xf9bf6fb3, 0xac4474b0, /* 3936-3951 */
- 0xc107c4e9, 0xc4e8e8e9, 0x42ecc150, 0xb701dd0b, /* 3952-3967 */
- 0x22934fec, 0x599a4731, 0x66fd5b03, 0x97ad21dd, /* 3968-3983 */
- 0x522a598e, 0x83333c92, 0xcb48ef81, 0x9c76bc40, /* 3984-3999 */
- 0xe9c59077, 0x6422192e, 0x6ad9d6b6, 0x0c0bcf1d, /* 4000-4015 */
- 0x38c7d772, 0xa4853378, 0xa991a3f8, 0x61624d2b, /* 4016-4031 */
- 0x3edc96e2, 0x4c5fca5d, 0x3d878377, 0xf080732c, /* 4032-4047 */
- 0x26a966b8, 0x92ed75d8, 0x062f19da, 0xc36739d2, /* 4048-4063 */
- 0xce08bb84, 0xc873fc14, 0x95725537, 0xaf5eaee5, /* 4064-4079 */
- 0xdd12aa01, 0x70bc0461, 0xf3bb60b9, 0x134e4fcf, /* 4080-4095 */
- 0x1a4aa884, 0x5cd19616, 0xe5e12539, 0xff84f7ee, /* 4096-4111 */
- 0x0034584a, 0x2bbdc0f7, 0x84231b0b, 0xba4ffff0, /* 4112-4127 */
- 0x8c07bb50, 0x61ed1170, 0xe6aa31ac, 0x425b5e9e, /* 4128-4143 */
- 0x0b1bbd95, 0x49c0c703, 0xb4f43468, 0xeed5e2ff, /* 4144-4159 */
- 0x1525095f, 0x7aa8d1a6, 0xb8c08e1a, 0x74731c3e, /* 4160-4175 */
- 0x6fc987b3, 0x5d0edf4c, 0x2896d262, 0xa195627d, /* 4176-4191 */
- 0x37f873a9, 0x87fc24cd, 0x573a088b, 0xd2362cc3, /* 4192-4207 */
- 0xdb19ea91, 0x9966ed45, 0x77ac4026, 0x82bc70c8, /* 4208-4223 */
- 0x033f48df, 0x92622983, 0xde59be94, 0xcd63ad11, /* 4224-4239 */
- 0xf8948566, 0x7133483b, 0x3bccc7e7, 0x1d5ada0c, /* 4240-4255 */
- 0x2dd68667, 0xf5902229, 0x4b4fb6e9, 0x4c809306, /* 4256-4271 */
- 0xe0f1743c, 0xae81e7bf, 0x10655d5a, 0x2ead91f2, /* 4272-4287 */
- 0xc4774b5a, 0xbf0fabf5, 0xd802fb04, 0x21b91430, /* 4288-4303 */
- 0xe3ea65a9, 0x165e1eca, 0xbfffde15, 0x76ad03a4, /* 4304-4319 */
- 0x7bf9d211, 0x13797703, 0xfd67eb52, 0xb08d98b7, /* 4320-4335 */
- 0xe9b000e0, 0x1c2135a1, 0x4656d599, 0x0f2aeb1e, /* 4336-4351 */
- 0x40c4fbfd, 0x880a3057, 0x65e4b7fb, 0xefae0d52, /* 4352-4367 */
- 0x7ea55aa1, 0x80121891, 0xb34bc30e, 0xb0f9bf6f, /* 4368-4383 */
- 0xd6dc4474, 0xd21dd66f, 0xa598e97a, 0x33c92522, /* 4384-4399 */
- 0x8ef81833, 0x6bc40cb4, 0x590779c7, 0x2192ee9c, /* 4400-4415 */
- 0x9d6b6642, 0xbcf1d6ad, 0x7d7720c0, 0x5337838c, /* 4416-4431 */
- 0x1a3f8a48, 0x24d2ba99, 0xc96e2616, 0xfca5d3ed, /* 4432-4447 */
- 0x783774c5, 0x0732c3d8, 0x966b8f08, 0xd75d826a, /* 4448-4463 */
- 0xf19da92e, 0x739d2062, 0x8bb84c36, 0x3fc14ce0, /* 4464-4479 */
- 0x25537c87, 0xeaee5957, 0x2aa01af5, 0xc0461dd1, /* 4480-4495 */
- 0xb60b970b, 0xe4fcff3b, 0xaa884134, 0x196161a4, /* 4496-4511 */
- 0x125395cd, 0x4f7eee5e, 0x4584aff8, 0xdc0f7003, /* 4512-4527 */
- 0x31b0b2bb, 0xffff0842, 0x7bb50ba4, 0xd11708c0, /* 4528-4543 */
- 0xa31ac61e, 0xb5e9ee6a, 0xbbd95425, 0x0c7030b1, /* 4544-4559 */
- 0x4346849c, 0x5e2ffb4f, 0x5095feed, 0x8d1a6152, /* 4560-4575 */
- 0x08e1a7aa, 0x31c3eb8c, 0x987b3747, 0xedf4c6fc, /* 4576-4591 */
- 0x6d2625d0, 0x5627d289, 0x873a9a19, 0xc24cd37f, /* 4592-4607 */
- 0xa088b87f, 0x62cc3573, 0x9ea91d23, 0x6ed45db1, /* 4608-4623 */
- 0xc4026996, 0xc70c877a, 0xf48df82b, 0x22983033, /* 4624-4639 */
- 0x9be94926, 0x3ad11de5, 0x48566cd6, 0x3483bf89, /* 4640-4655 */
- 0xcc7e7713, 0xada0c3bc, 0x686671d5, 0x022292dd, /* 4656-4671 */
- 0x35599f59, 0xcd668e3c, 0x2fbe990c, 0x01a292d4, /* 4672-4687 */
- 0xd0e2ebd2, 0x8e685fe9, 0x0357c5cd, 0x064b4fdb, /* 4688-4703 */
- 0x3c4c8093, 0xbfe0f174, 0x5aae81e7, 0xf210655d, /* 4704-4719 */
- 0x5a2ead91, 0xf5c4774b, 0x04bf0fab, 0x30d802fb, /* 4720-4735 */
- 0xa921b914, 0xcae3ea65, 0xd5165e1e, 0x135a1ef8, /* 4736-4751 */
- 0x6d5991c2, 0xaeb1e465, 0x4fbfd0f2, 0xa305740c, /* 4752-4767 */
- 0x4b7fb880, 0xe0d5265e, 0x55aa1efa, 0x218917ea, /* 4768-4783 */
- 0xbc30e801, 0x9bf6fb34, 0xc4474b0f, 0xdd66fd6d, /* 4784-4799 */
- 0x8e97ad21, 0x92522a59, 0x8183333c, 0x40cb48ef, /* 4800-4815 */
- 0x779c76bc, 0x2ee9c590, 0xb6642219, 0x1d6ad9d6, /* 4816-4831 */
- 0x720c0bcf, 0x7838c7d7, 0xf8a48533, 0x2ba991a3, /* 4832-4847 */
- 0xe261624d, 0x5d3edc96, 0x774c5fca, 0x2c3d8783, /* 4848-4863 */
- 0xb8f08073, 0xd826a966, 0xda92ed75, 0xd2062f19, /* 4864-4879 */
- 0x84c36739, 0x14ce08bb, 0x37c873fc, 0xe5957255, /* 4880-4895 */
- 0x01af5eae, 0x61dd12aa, 0xb970bc04, 0xcff3bb60, /* 4896-4911 */
- 0x84134e4f, 0x161a4aa8, 0x395cd196, 0xeee5e125, /* 4912-4927 */
- 0x4aff84f7, 0xf7003458, 0x0b2bbdc0, 0xf084231b, /* 4928-4943 */
- 0x50ba4fff, 0x708c07bb, 0xac61ed11, 0x9ee6aa31, /* 4944-4959 */
- 0x95425b5e, 0x030b1bbd, 0x6849c0c7, 0xffb4f434, /* 4960-4975 */
- 0x5feed5e2, 0xa6152509, 0x1a7aa8d1, 0x3eb8c08e, /* 4976-4991 */
- 0xb374731c, 0x4c6fc987, 0x625d0edf, 0x7d2896d2, /* 4992-5007 */
- 0xa9a19562, 0xcd37f873, 0x8b87fc24, 0xc3573a08, /* 5008-5023 */
- 0x91d2362c, 0x45db19ea, 0x269966ed, 0x26b5052b, /* 5024-5039 */
- 0x7e4a64ab, 0x0fc45e3c, 0x4b37658d, 0x57a6fb68, /* 5040-5055 */
- 0x636b7b0f, 0x7ac1b06e, 0x2bc70c87, 0x33f48df8, /* 5056-5071 */
- 0x26229830, 0xe59be949, 0xd63ad11d, 0x8948566c, /* 5072-5087 */
- 0x133483bf, 0xbccc7e77, 0xd5ada0c3, 0xdd686671, /* 5088-5103 */
- 0x59022292, 0xb4fb6e9f, 0xc8093064, 0x0f1743c4, /* 5104-5119 */
- 0xe81e7bfe, 0x0655d5aa, 0xead91f21, 0x4774b5a2, /* 5120-5135 */
- 0xf0fabf5c, 0x802fb04b, 0x1b91430d, 0x3ea65a92, /* 5136-5151 */
- 0x65e1ecae, 0xa1ef8d51, 0x991c2135, 0x1e4656d5, /* 5152-5167 */
- 0xfd0f2aeb, 0x5740c4fb, 0xfb880a30, 0x5265e4b7, /* 5168-5183 */
- 0xa1efae0d, 0x917ea55a, 0x0e801218, 0x6fb34bc3, /* 5184-5199 */
- 0x74b0f9bf, 0x6fd6dc44, 0x7ad21dd6, 0x22a598e9, /* 5200-5215 */
- 0x3333c925, 0xb48ef818, 0xc76bc40c, 0x9c590779, /* 5216-5231 */
- 0x422192ee, 0xad9d6b66, 0xc0bcf1d6, 0x8c7d7720, /* 5232-5247 */
- 0x48533783, 0x991a3f8a, 0x1624d2ba, 0xedc96e26, /* 5248-5263 */
- 0xc5fca5d3, 0xd8783774, 0x080732c3, 0x6a966b8f, /* 5264-5279 */
- 0x2ed75d82, 0x62f19da9, 0x36739d20, 0xe08bb84c, /* 5280-5295 */
- 0x873fc14c, 0x5725537c, 0xf5eaee59, 0xd12aa01a, /* 5296-5311 */
- 0x0bc0461d, 0x3bb60b97, 0x34e4fcff, 0xa4aa8841, /* 5312-5327 */
- 0xcd196161, 0x5e125395, 0xf84f7eee, 0x034584af, /* 5328-5343 */
- 0xbbdc0f70, 0x4231b0b2, 0xa4ffff08, 0xc07bb50b, /* 5344-5359 */
- 0x1ed11708, 0x6aa31ac6, 0x25b5e9ee, 0xb1bbd954, /* 5360-5375 */
- 0x9c0c7030, 0x4f434684, 0xed5e2ffb, 0x525095fe, /* 5376-5391 */
- 0xaa8d1a61, 0xd5caa6a7, 0xcb59ba95, 0xfc0b80a3, /* 5392-5407 */
- 0xa4dd6a1c, 0xfb4da518, 0xa8ba87ec, 0xdb055264, /* 5408-5423 */
- 0x1c3eb8c0, 0x87b37473, 0xdf4c6fc9, 0xd2625d0e, /* 5424-5439 */
- 0x627d2896, 0x73a9a195, 0x24cd37f8, 0x088b87fc, /* 5440-5455 */
- 0x2cc3573a, 0xea91d236, 0xed45db19, 0x40269966, /* 5456-5471 */
- 0x70c877ac, 0x48df82bc, 0x2983033f, 0xbe949262, /* 5472-5487 */
- 0xad11de59, 0x8566cd63, 0x483bf894, 0xc7e77133, /* 5488-5503 */
- 0xda0c3bcc, 0x86671d5a, 0x22292dd6, 0xb6e9f590, /* 5504-5519 */
- 0x93064b4f, 0x743c4c80, 0xe7bfe0f1, 0x5d5aae81, /* 5520-5535 */
- 0x91f21065, 0x4b5a2ead, 0xabf5c477, 0xfb04bf0f, /* 5536-5551 */
- 0x1430d802, 0x65a921b9, 0x1ecae3ea, 0xf8d5165e, /* 5552-5567 */
- 0xc2135a1e, 0x656d5991, 0xf2aeb1e4, 0x0c4fbfd0, /* 5568-5583 */
- 0x80a30574, 0x5e4b7fb8, 0xfae0d526, 0xea55aa1e, /* 5584-5599 */
- 0x01218917, 0x34bc30e8, 0x0f9bf6fb, 0x6dc4474b, /* 5600-5615 */
- 0x21dd66fd, 0x598e97ad, 0x3c92522a, 0xef818333, /* 5616-5631 */
- 0xbc40cb48, 0x90779c76, 0x192ee9c5, 0xd6b66422, /* 5632-5647 */
- 0xcf1d6ad9, 0xd7720c0b, 0x337838c7, 0xa3f8a485, /* 5648-5663 */
- 0x4d2ba991, 0x96e26162, 0xca5d3edc, 0x83774c5f, /* 5664-5679 */
- 0x732c3d87, 0x66b8f080, 0x75d826a9, 0x19da92ed, /* 5680-5695 */
- 0x39d2062f, 0xbb84c367, 0xfc14ce08, 0x5537c873, /* 5696-5711 */
- 0xaee59572, 0xaa01af5e, 0x0461dd12, 0x60b970bc, /* 5712-5727 */
- 0x4fcff3bb, 0xa884134e, 0x96161a4a, 0x25395cd1, /* 5728-5743 */
- 0xf7eee5e1, 0x584aff84, 0xc0f70034, 0xeebb2bbd, /* 5744-5759 */
- 0x041d9eed, 0x6655c496, 0x158c782c, 0xfa7384e4, /* 5760-5775 */
- 0x22e0062d, 0x605f5e75
- }
-};
-
-#if 0
-__ALIGN(512) static uint16_t __payload_pattern_00[] =
-{
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-__ALIGN(512) static uint16_t __payload_pattern_FF[] =
-{
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0a9b, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x0fff,
- 0x0dc8, 0x0584, 0x069f, 0x0522, 0x0743, 0x073d, 0x0d45, 0x01be,
- 0x059b, 0x00e8, 0x01df, 0x066b, 0x09fe, 0x0e36, 0x0d79, 0x005c,
- 0x03b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-__ALIGN(512) static uint16_t __payload_pattern_0F[] =
-{
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x019b, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196,
- 0x04a1, 0x09b3, 0x0c51, 0x038b, 0x0f75, 0x03b4, 0x08f3, 0x0e98,
- 0x0181, 0x0d6d, 0x0ff0, 0x0502, 0x024d, 0x0612, 0x08a4, 0x0f87,
- 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-__ALIGN(512) static uint16_t __payload_pattern_0123[] =
-{
- 0x0b2b, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
-
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0b9b, 0x0755, 0x0b83, 0x02f3, 0x056c, 0x0890, 0x0431, 0x0790,
- 0x0211, 0x0a55, 0x012d, 0x0174, 0x09a3, 0x02e4, 0x0f7c, 0x03ee,
- 0x06e8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- 0x0f2b, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
-
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x0c70, 0x0193, 0x0f66, 0x0a8e, 0x08c6, 0x0f07, 0x05fd, 0x0179,
- 0x0b63, 0x0010, 0x0775, 0x0712, 0x0c25, 0x0b36, 0x0542, 0x0cd9,
- 0x0359, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- 0x032b, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
-
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0464, 0x09ca, 0x0798, 0x0bbe, 0x0fab, 0x0b73, 0x0c15, 0x0f72,
- 0x0ed9, 0x0d38, 0x06de, 0x08a0, 0x0ab1, 0x0c1f, 0x0a48, 0x09f8,
- 0x00ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- 0x0f2b, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0029, 0x0a7b, 0x0cd4, 0x0821, 0x0029, 0x052c, 0x02d8, 0x02c5,
- 0x02eb, 0x0391, 0x04fe, 0x0180, 0x0628, 0x0681, 0x05a0, 0x00ec,
- 0x03ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x032b, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0891, 0x0647, 0x0011, 0x09f4, 0x0e4f, 0x0cd4, 0x096a, 0x0893,
- 0x0439, 0x0dc8, 0x0334, 0x0b65, 0x0617, 0x08b3, 0x00f7, 0x0c00,
- 0x00e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x072b, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0f7a, 0x0081, 0x04f4, 0x0189, 0x03e5, 0x0b43, 0x08a6, 0x0e7a,
- 0x0d4b, 0x078d, 0x056c, 0x0d03, 0x0391, 0x0161, 0x0ac9, 0x0337,
- 0x0552, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0b2b, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x076e, 0x08d8, 0x0c0a, 0x00b9, 0x0488, 0x0f37, 0x014e, 0x0071,
- 0x08f1, 0x0aa5, 0x04c7, 0x02b1, 0x0505, 0x0648, 0x05c3, 0x0616,
- 0x06e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x072b, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0323, 0x0b69, 0x0746, 0x0326, 0x0b0a, 0x0168, 0x0f83, 0x0dc6,
- 0x04c3, 0x040c, 0x06e7, 0x0b91, 0x099c, 0x0cd6, 0x0a2b, 0x0f02,
- 0x05b1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0b2b, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0b9b, 0x0755, 0x0b83, 0x02f3, 0x056c, 0x0890, 0x0431, 0x0790,
- 0x0211, 0x0a55, 0x012d, 0x0174, 0x09a3, 0x02e4, 0x0f7c, 0x03ee,
- 0x06e8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0f2b, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x0c70, 0x0193, 0x0f66, 0x0a8e, 0x08c6, 0x0f07, 0x05fd, 0x0179,
- 0x0b63, 0x0010, 0x0775, 0x0712, 0x0c25, 0x0b36, 0x0542, 0x0cd9,
- 0x0359, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x032b, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0464, 0x09ca, 0x0798, 0x0bbe, 0x0fab, 0x0b73, 0x0c15, 0x0f72,
- 0x0ed9, 0x0d38, 0x06de, 0x08a0, 0x0ab1, 0x0c1f, 0x0a48, 0x09f8,
- 0x00ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0f2b, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0029, 0x0a7b, 0x0cd4, 0x0821, 0x0029, 0x052c, 0x02d8, 0x02c5,
- 0x02eb, 0x0391, 0x04fe, 0x0180, 0x0628, 0x0681, 0x05a0, 0x00ec,
- 0x03ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x032b, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0891, 0x0647, 0x0011, 0x09f4, 0x0e4f, 0x0cd4, 0x096a, 0x0893,
- 0x0439, 0x0dc8, 0x0334, 0x0b65, 0x0617, 0x08b3, 0x00f7, 0x0c00,
- 0x00e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x072b, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x071e, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0f7a, 0x0081, 0x04f4, 0x0189, 0x03e5, 0x0b43, 0x08a6, 0x0e7a,
- 0x0d4b, 0x078d, 0x056c, 0x0d03, 0x0391, 0x0161, 0x0ac9, 0x0337,
- 0x0552, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0b2b, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0e4f, 0x0bdc, 0x00f7, 0x0000, 0x045b, 0x04af, 0x0f84, 0x0f73,
- 0x0ee8, 0x0e12, 0x0539, 0x05ce, 0x0195, 0x0161, 0x0a4a, 0x0abd,
- 0x0426, 0x04e4, 0x0fcf, 0x0f38, 0x0b63, 0x0b97, 0x00bc, 0x004b,
- 0x01d0, 0x012a, 0x0a01, 0x0af6, 0x0ead, 0x0e59, 0x0572, 0x0585,
- 0x076e, 0x08d8, 0x0c0a, 0x00b9, 0x0488, 0x0f37, 0x014e, 0x0071,
- 0x08f1, 0x0aa5, 0x04c7, 0x02b1, 0x0505, 0x0648, 0x05c3, 0x0616,
- 0x06e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x072b, 0x073f, 0x0c14, 0x0ce3, 0x08b8, 0x084c, 0x0367, 0x0390,
- 0x020b, 0x02f1, 0x09da, 0x092d, 0x0d76, 0x0d82, 0x06a9, 0x065e,
- 0x08c5, 0x0807, 0x032c, 0x03db, 0x0780, 0x0774, 0x0c5f, 0x0ca8,
- 0x0d33, 0x0dc9, 0x06e2, 0x0615, 0x024e, 0x02ba, 0x0991, 0x0966,
- 0x0bfd, 0x0853, 0x0378, 0x038f, 0x07d4, 0x0720, 0x0c0b, 0x0cfc,
- 0x0d67, 0x0d9d, 0x06b6, 0x0641, 0x021a, 0x02ee, 0x09c5, 0x0932,
- 0x07a9, 0x076b, 0x0c40, 0x0cb7, 0x08ec, 0x0818, 0x0333, 0x03c4,
- 0x025f, 0x02a5, 0x098e, 0x0979, 0x0d22, 0x0dd6, 0x06fd, 0x060a,
- 0x0491, 0x04b0, 0x0f9b, 0x0f6c, 0x0b37, 0x0bc3, 0x00e8, 0x001f,
- 0x0184, 0x017e, 0x0a55, 0x0aa2, 0x0ef9, 0x0e0d, 0x0526, 0x05d1,
- 0x0b4a, 0x0b88, 0x00a3, 0x0054, 0x040f, 0x04fb, 0x0fd0, 0x0f27,
- 0x0ebc, 0x0e46, 0x056d, 0x059a, 0x01c1, 0x0135, 0x0a1e, 0x0ae9,
- 0x0072, 0x05e1, 0x0eca, 0x0e3d, 0x0a66, 0x0a92, 0x01b9, 0x014e,
- 0x00d5, 0x002f, 0x0b04, 0x0bf3, 0x0fa8, 0x0f5c, 0x0477, 0x0480,
- 0x0a1b, 0x0ad9, 0x01f2, 0x0105, 0x055e, 0x05aa, 0x0e81, 0x0e76,
- 0x0fed, 0x0f17, 0x043c, 0x04cb, 0x0090, 0x0064, 0x0b4f, 0x0bb8,
- 0x0923, 0x0902, 0x0229, 0x02de, 0x0685, 0x0671, 0x0d5a, 0x0dad,
- 0x0c36, 0x0ccc, 0x07e7, 0x0710, 0x034b, 0x03bf, 0x0894, 0x0863,
- 0x06f8, 0x063a, 0x0d11, 0x0de6, 0x09bd, 0x0949, 0x0262, 0x0295,
- 0x030e, 0x03f4, 0x08df, 0x0828, 0x0c73, 0x0c87, 0x07ac, 0x075b,
- 0x05c0, 0x066e, 0x0d45, 0x0db2, 0x09e9, 0x091d, 0x0236, 0x02c1,
- 0x035a, 0x03a0, 0x088b, 0x087c, 0x0c27, 0x0cd3, 0x07f8, 0x070f,
- 0x0994, 0x0956, 0x027d, 0x028a, 0x06d1, 0x0625, 0x0d0e, 0x0df9,
- 0x0c62, 0x0c98, 0x07b3, 0x0744, 0x031f, 0x03eb, 0x08c0, 0x0837,
- 0x0aac, 0x0a8d, 0x01a6, 0x0151, 0x050a, 0x05fe, 0x0ed5, 0x0e22,
- 0x0fb9, 0x0f43, 0x0468, 0x049f, 0x00c4, 0x0030, 0x0b1b, 0x0bec,
- 0x0577, 0x05b5, 0x0e9e, 0x0e69, 0x0a32, 0x0ac6, 0x01ed, 0x011a,
- 0x0081, 0x007b, 0x0b50, 0x0ba7, 0x0ffc, 0x0f08, 0x0423, 0x04d4,
- 0x0323, 0x0b69, 0x0746, 0x0326, 0x0b0a, 0x0168, 0x0f83, 0x0dc6,
- 0x04c3, 0x040c, 0x06e7, 0x0b91, 0x099c, 0x0cd6, 0x0a2b, 0x0f02,
- 0x05b1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-__ALIGN(512) static uint16_t __payload_pattern_not_0123[] = {
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0653, 0x02d1, 0x0d1c, 0x07d1, 0x022f, 0x0fad, 0x0974, 0x062e,
- 0x078a, 0x0abd, 0x00f2, 0x071f, 0x005d, 0x0cd2, 0x0205, 0x03b2,
- 0x055c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- 0x05b0, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x01b8, 0x0417, 0x09f9, 0x0fac, 0x0f85, 0x083a, 0x08b8, 0x00c7,
- 0x0ef8, 0x00f8, 0x06aa, 0x0179, 0x05db, 0x0500, 0x083b, 0x0c85,
- 0x00ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x09b0, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x09ac, 0x0c4e, 0x0107, 0x0e9c, 0x08e8, 0x0c4e, 0x0150, 0x0ecc,
- 0x0b42, 0x0dd0, 0x0701, 0x0ecb, 0x034f, 0x0229, 0x0731, 0x09a4,
- 0x0359, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x05b0, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0de1, 0x0fff, 0x0a4b, 0x0d03, 0x076a, 0x0211, 0x0f9d, 0x037b,
- 0x0770, 0x0379, 0x0521, 0x07eb, 0x0fd6, 0x08b7, 0x08d9, 0x00b0,
- 0x000e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x09b0, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0559, 0x03c3, 0x068e, 0x0cd6, 0x090c, 0x0be9, 0x042f, 0x092d,
- 0x01a2, 0x0d20, 0x02eb, 0x0d0e, 0x0fe9, 0x0685, 0x0d8e, 0x0c5c,
- 0x0357, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0db0, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x02b2, 0x0505, 0x026b, 0x04ab, 0x04a6, 0x0c7e, 0x05e3, 0x0fc4,
- 0x08d0, 0x0765, 0x04b3, 0x0b68, 0x0a6f, 0x0f57, 0x07b0, 0x036b,
- 0x06e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x01b0, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x0aa6, 0x0d5c, 0x0a95, 0x059b, 0x03cb, 0x080a, 0x0c0b, 0x01cf,
- 0x0d6a, 0x0a4d, 0x0518, 0x04da, 0x0cfb, 0x087e, 0x08ba, 0x064a,
- 0x0552, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0db0, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x0eeb, 0x0eed, 0x01d9, 0x0604, 0x0c49, 0x0655, 0x02c6, 0x0c78,
- 0x0158, 0x04e4, 0x0738, 0x0dfa, 0x0062, 0x02e0, 0x0752, 0x0f5e,
- 0x0605, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0653, 0x02d1, 0x0d1c, 0x07d1, 0x022f, 0x0fad, 0x0974, 0x062e,
- 0x078a, 0x0abd, 0x00f2, 0x071f, 0x005d, 0x0cd2, 0x0205, 0x03b2,
- 0x055c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x05b0, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x01b8, 0x0417, 0x09f9, 0x0fac, 0x0f85, 0x083a, 0x08b8, 0x00c7,
- 0x0ef8, 0x00f8, 0x06aa, 0x0179, 0x05db, 0x0500, 0x083b, 0x0c85,
- 0x00ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x09b0, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x09ac, 0x0c4e, 0x0107, 0x0e9c, 0x08e8, 0x0c4e, 0x0150, 0x0ecc,
- 0x0b42, 0x0dd0, 0x0701, 0x0ecb, 0x034f, 0x0229, 0x0731, 0x09a4,
- 0x0359, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x05b0, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0de1, 0x0fff, 0x0a4b, 0x0d03, 0x076a, 0x0211, 0x0f9d, 0x037b,
- 0x0770, 0x0379, 0x0521, 0x07eb, 0x0fd6, 0x08b7, 0x08d9, 0x00b0,
- 0x000e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x09b0, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0559, 0x03c3, 0x068e, 0x0cd6, 0x090c, 0x0be9, 0x042f, 0x092d,
- 0x01a2, 0x0d20, 0x02eb, 0x0d0e, 0x0fe9, 0x0685, 0x0d8e, 0x0c5c,
- 0x0357, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0db0, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x08e1, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x02b2, 0x0505, 0x026b, 0x04ab, 0x04a6, 0x0c7e, 0x05e3, 0x0fc4,
- 0x08d0, 0x0765, 0x04b3, 0x0b68, 0x0a6f, 0x0f57, 0x07b0, 0x036b,
- 0x06e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x01b0, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x01b0, 0x0423, 0x0f08, 0x0fff, 0x0ba4, 0x0b50, 0x007b, 0x008c,
- 0x0117, 0x01ed, 0x0ac6, 0x0a31, 0x0e6a, 0x0e9e, 0x05b5, 0x0542,
- 0x0bd9, 0x0b1b, 0x0030, 0x00c7, 0x049c, 0x0468, 0x0f43, 0x0fb4,
- 0x0e2f, 0x0ed5, 0x05fe, 0x0509, 0x0152, 0x01a6, 0x0a8d, 0x0a7a,
- 0x0aa6, 0x0d5c, 0x0a95, 0x059b, 0x03cb, 0x080a, 0x0c0b, 0x01cf,
- 0x0d6a, 0x0a4d, 0x0518, 0x04da, 0x0cfb, 0x087e, 0x08ba, 0x064a,
- 0x0552, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0db0, 0x08c0, 0x03eb, 0x031c, 0x0747, 0x07b3, 0x0c98, 0x0c6f,
- 0x0df4, 0x0d0e, 0x0625, 0x06d2, 0x0289, 0x027d, 0x0956, 0x09a1,
- 0x073a, 0x07f8, 0x0cd3, 0x0c24, 0x087f, 0x088b, 0x03a0, 0x0357,
- 0x02cc, 0x0236, 0x091d, 0x09ea, 0x0db1, 0x0d45, 0x066e, 0x0699,
- 0x0402, 0x07ac, 0x0c87, 0x0c70, 0x082b, 0x08df, 0x03f4, 0x0303,
- 0x0298, 0x0262, 0x0949, 0x09be, 0x0de5, 0x0d11, 0x063a, 0x06cd,
- 0x0856, 0x0894, 0x03bf, 0x0348, 0x0713, 0x07e7, 0x0ccc, 0x0c3b,
- 0x0da0, 0x0d5a, 0x0671, 0x0686, 0x02dd, 0x0229, 0x0902, 0x09f5,
- 0x0b6e, 0x0b4f, 0x0064, 0x0093, 0x04c8, 0x043c, 0x0f17, 0x0fe0,
- 0x0e7b, 0x0e81, 0x05aa, 0x055d, 0x0106, 0x01f2, 0x0ad9, 0x0a2e,
- 0x04b5, 0x0477, 0x0f5c, 0x0fab, 0x0bf0, 0x0b04, 0x002f, 0x00d8,
- 0x0143, 0x01b9, 0x0a92, 0x0a65, 0x0e3e, 0x0eca, 0x05e1, 0x0516,
- 0x0f8d, 0x0a1e, 0x0135, 0x01c2, 0x0599, 0x056d, 0x0e46, 0x0eb1,
- 0x0f2a, 0x0fd0, 0x04fb, 0x040c, 0x0057, 0x00a3, 0x0b88, 0x0b7f,
- 0x05e4, 0x0526, 0x0e0d, 0x0efa, 0x0aa1, 0x0a55, 0x017e, 0x0189,
- 0x0012, 0x00e8, 0x0bc3, 0x0b34, 0x0f6f, 0x0f9b, 0x04b0, 0x0447,
- 0x06dc, 0x06fd, 0x0dd6, 0x0d21, 0x097a, 0x098e, 0x02a5, 0x0252,
- 0x03c9, 0x0333, 0x0818, 0x08ef, 0x0cb4, 0x0c40, 0x076b, 0x079c,
- 0x0907, 0x09c5, 0x02ee, 0x0219, 0x0642, 0x06b6, 0x0d9d, 0x0d6a,
- 0x0cf1, 0x0c0b, 0x0720, 0x07d7, 0x038c, 0x0378, 0x0853, 0x08a4,
- 0x0a3f, 0x0991, 0x02ba, 0x024d, 0x0616, 0x06e2, 0x0dc9, 0x0d3e,
- 0x0ca5, 0x0c5f, 0x0774, 0x0783, 0x03d8, 0x032c, 0x0807, 0x08f0,
- 0x066b, 0x06a9, 0x0d82, 0x0d75, 0x092e, 0x09da, 0x02f1, 0x0206,
- 0x039d, 0x0367, 0x084c, 0x08bb, 0x0ce0, 0x0c14, 0x073f, 0x07c8,
- 0x0553, 0x0572, 0x0e59, 0x0eae, 0x0af5, 0x0a01, 0x012a, 0x01dd,
- 0x0046, 0x00bc, 0x0b97, 0x0b60, 0x0f3b, 0x0fcf, 0x04e4, 0x0413,
- 0x0a88, 0x0a4a, 0x0161, 0x0196, 0x05cd, 0x0539, 0x0e12, 0x0ee5,
- 0x0f7e, 0x0f84, 0x04af, 0x0458, 0x0003, 0x00f7, 0x0bdc, 0x0b2b,
- 0x0eeb, 0x0eed, 0x01d9, 0x0604, 0x0c49, 0x0655, 0x02c6, 0x0c78,
- 0x0158, 0x04e4, 0x0738, 0x0dfa, 0x0062, 0x02e0, 0x0752, 0x0f5e,
- 0x0605, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-#define NB_PATTERNS 7
-
-uint16_t *__payload_patterns[NB_PATTERNS] = {
- __payload_pattern_00, /* BER_PATTERN_00 */
- __payload_pattern_FF, /* BER_PATTERN_FF */
- __payload_pattern_0F, /* BER_PATTERN_0F */
- __payload_pattern_0123, /* BER_PATTERN_0123 */
- __payload_pattern_not_0123, /* BER_PATTERN_NOT_0123 */
- __payload_pattern_0123, /* BER_PATTERN_ALT_0123 */
- __payload_pattern_not_0123 /* BER_PATTERN_ALT_NOT_0123 */
-};
-#endif
diff --git a/app/sm-emac-drv/src/plcp_test.c b/app/sm-emac-drv/src/plcp_test.c
deleted file mode 100755
index ff085fbcc9..0000000000
--- a/app/sm-emac-drv/src/plcp_test.c
+++ /dev/null
@@ -1,261 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include "plc_dbg.h"
-#include "ose.h"
-#include "plc_drv.h"
-#include "plc_mac.h"
-#include "plc_test.h"
-#include "plc_rx_buffer.h"
-#include "plc_ber.h"
-#include <shell.h>
-#include "ui.h"
-#include "lib_if.h"
-
-extern struct plcp_callbacks *plcp_callbacks_fn;
-static struct plcp_callbacks __callbacks;
-
-/* buffer aligné sur 32 bits pour arm (header test sur 32 bits) */
-static __ALIGN(32) uint8_t __dbuf[PLCP_MAX_SLICES*PMD_SLICE_SIZE];
-static __ALIGN(32) uint8_t __cbuf[PLCP_MAX_SLICES*PMD_SLICE_SIZE];
-
-static void __send(struct plc_drv_unit *unit, struct plcp_frame *pframe);
-
-struct test_info {
- int clen;
- int dlen;
- int nb_frames;
- int remain;
- uint16_t cid;
- int TEI;
- struct plcp_frame *pframe;
- int data_gain;
- int ctrl_gain;
-};
-
-static struct test_info __info;
-
-static int in_range(int from, int val, int to, int org) {
-
- if ((val<from) || (val>to)) {
- printf("must be in [%d..%d] range\n");
- return org;
- } else {
- return val;
- }
-}
-
-
-static void __set_pattern(int start, int incr, int modulo) {
-
- int i, n, p;
- int slice;
-
- n = 0;
- p = 0;
- if (modulo==0) {
- modulo = PMD_SLICE_SIZE;
- }
- for (slice = 0; slice < PLCP_MAX_SLICES; slice++) {
- for (i=0; i<PMD_SLICE_SIZE; i++) {
- __dbuf[n++] = ((p+start)%modulo);
- p += incr;
- }
- }
-}
-
-static void __tx_end(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- *plcp_callbacks_fn = __callbacks;
- __send(unit, pframe);
-}
-
-static void __send(struct plc_drv_unit *unit, struct plcp_frame *pframe) {
- struct cac_header *cac;
-
- int len;
- if (__info.remain) {
- /* FIXME: we should handle several protos at PLCP level
- * each proto with its own callbacks...
- */
- plcp_callbacks_fn->tx_end = __tx_end;
- plcp_callbacks_fn->tx_status = __tx_end;
- __info.remain--;
-
- /* fill all frame fields (PLCP may alter some of these) */
- cac=(struct cac_header *)((int)pframe->control+8);
- memset(cac, 0, sizeof(struct cac_header));
- cac->DTEI = __info.TEI;
- cac->flags = 0; /* no ACK needed (MA_BIT_NEEDACK) */
- pframe->cac = cac;
-
- pframe->c_len = __info.clen;
- memcpy(pframe->c_buf, __cbuf, PLCP_PAYLOAD_CSIZE);
- pframe->d_len = __info.dlen;
- memcpy(pframe->d_buf, __dbuf, PLCP_PAYLOAD_DSIZE);
- pframe->channel_id = &__info.cid;
- pframe->uchannel = plcp_get_uchannel_by_id(__info.cid);
- pframe->TEI = __info.TEI;
- pframe->data_gain = __info.data_gain;
- pframe->ctrl_gain = __info.ctrl_gain;
-
- len = plcp_get_max_data_len(unit, pframe->uchannel,
- PMD_MAX_FRAME_SLOTS);
- if (pframe->d_len > len) {
- pframe->d_len = len;
- }
- plcp_write(unit, pframe);
- } else {
- plcp_free_tx_frame(pframe);
- }
-}
-
-
-static void __start(struct plc_drv_unit *unit) {
- struct plcp_frame *pframe;
- pframe = plcp_alloc_tx_frame();
- if (pframe) {
- __callbacks = *plcp_callbacks_fn;
- printf("starting test for %d frames\n",
- __info.nb_frames);
- __info.remain = __info.nb_frames;
- __info.pframe = pframe;
-
- __send(unit, pframe);
- } else {
- printf("could not allocate pframe\n");
- }
-}
-
-int shell_plcp_test_pattern(int argc, char *argv[]) {
- __set_pattern(strtoul(argv[1],NULL,0), /* start */
- strtoul(argv[2],NULL,0), /* incr */
- strtoul(argv[3],NULL,0) /* modulo */);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_start(int argc, char *argv[]) {
- __start(plc_drv_get_unit(0));
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_stop(int argc, char *argv[]) {
- __info.remain = 0;
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_cid(int argc, char *argv[]) {
- __info.cid = plcp_get_cid_by_name(argv[1]);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_num(int argc, char *argv[]) {
- __info.nb_frames = strtoul(argv[1],NULL,0);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_ctrl_gain(int argc, char *argv[]) {
- __info.ctrl_gain =
- in_range(0, strtoul(argv[1],NULL,0), 0xffff, __info.ctrl_gain);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_data_gain(int argc, char *argv[]) {
- __info.data_gain =
- in_range(0, strtoul(argv[1],NULL,0), 0xffff, __info.data_gain);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_dlen(int argc, char *argv[]) {
- __info.dlen =
- in_range(0, strtoul(argv[1],NULL,0), PMD_SLICE_SIZE*PLCP_MAX_SLICES, __info.dlen);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_clen(int argc, char *argv[]) {
- __info.clen =
- in_range(0, strtoul(argv[1],NULL,0), PLCP_PAYLOAD_CSIZE, __info.clen);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_tei(int argc, char *argv[]) {
- __info.TEI =
- in_range(0, strtoul(argv[1],NULL,0), 2^10, __info.TEI);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_dump(int argc, char *argv[]) {
-
- char *addr;
- int slices;
- int slice;
-
- if (argc!=3)
- goto usage;
-
- addr = (char*)strtoul(argv[1], NULL, 0);
- slices = strtoul(argv[2], NULL, 0);
-
- for (slice=0; slice<slices; slice++) {
- printf("slice %d\n", slice);
- dump8(addr, PMD_SLICE_SIZE, 16);
- addr += PMD_SLICE_SIZE;
- }
- return RET_SUCCESS;
-
-usage:
- printf("%s <addr> <slices>\n",argv[0]);
- return RET_SUCCESS;
-}
-
-int shell_plcp_test_info(int argc, char *argv[]) {
-
- printf("clen ............. %d\n", __info.clen);
- printf("dlen ............. %d\n", __info.dlen);
- printf("cid .............. %d\n", __info.cid);
- printf("nb frames ........ %d\n", __info.nb_frames);
- printf("TEI .............. %d\n", __info.TEI);
- printf("ctrl gain ........ %d (0x%08x)\n",
- __info.ctrl_gain, __info.ctrl_gain);
- printf("data gain ........ %d (0x%08x)\n",
- __info.data_gain, __info.data_gain);
- printf("pframe ........... 0x%08x\n", __info.pframe);
- if (__info.pframe) {
- printf("pframe->c_buf .... 0x%08x\n", __info.pframe->c_buf);
- printf("pframe->d_buf .... 0x%08x\n", __info.pframe->d_buf);
- }
- return RET_SUCCESS;
-}
-
-
-void plcp_test_open(struct plc_drv_unit * unit) {
- __info.clen = 0;
- __info.dlen = PLCP_MAX_SLICES*PMD_SLICE_SIZE;
- __info.cid = PLCP_CID_QAM256;
- __info.nb_frames = 1000;
- __info.TEI = 0;
- __set_pattern(1, 1, PMD_SLICE_SIZE);
- __info.ctrl_gain = 0;
- __info.data_gain = 0;
-
- ui_add_cmd2("t pattern", shell_plcp_test_pattern, "set tx pattern for ", UI_SPV);
- ui_add_cmd2("t start", shell_plcp_test_start, "start plcp test", UI_SPV);
- ui_add_cmd2("t stop", shell_plcp_test_stop, "stop plcp test", UI_SPV);
- ui_add_cmd2("t cid", shell_plcp_test_cid, "set CID for plcp test", UI_SPV);
- ui_add_cmd2("t info", shell_plcp_test_info, "get plcp test info", UI_SPV);
- ui_add_cmd2("t num", shell_plcp_test_num, "set number of frames", UI_SPV);
- ui_add_cmd2("t dump", shell_plcp_test_dump, "dump payload", UI_SPV);
- ui_add_cmd2("t ctrl gain", shell_plcp_test_ctrl_gain, "set control gain", UI_SPV);
- ui_add_cmd2("t data gain", shell_plcp_test_data_gain, "set control gain", UI_SPV);
- ui_add_cmd2("t dlen", shell_plcp_test_dlen, "set dlen", UI_SPV);
- ui_add_cmd2("t clen", shell_plcp_test_clen, "set clen", UI_SPV);
- ui_add_cmd2("t tei", shell_plcp_test_tei, "set TEI", UI_SPV);
-}
-
-void plcp_test_start(struct plc_drv_unit * unit) {
- if (__info.ctrl_gain==0) {
- __info.ctrl_gain = max_gain_per_band[unit->nb_bands] / 2;
- }
-
- if (__info.data_gain==0) {
- __info.data_gain = max_gain_per_band[unit->nb_bands] / 2;
- }
-}
diff --git a/app/sm-emac-drv/src/plcp_ui.c b/app/sm-emac-drv/src/plcp_ui.c
deleted file mode 100755
index 20251238d7..0000000000
--- a/app/sm-emac-drv/src/plcp_ui.c
+++ /dev/null
@@ -1,271 +0,0 @@
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include "hal.h"
-#else
-#include <stdio.h>
-#include <string.h>
-#include "osedef.h"
-#include "shell.h"
-#endif
-#include "shell_if.h"
-#include "ui.h"
-#ifndef softOSE
-#include <getopt.h>
-#endif
-#include "mib.h"
-#include "plc_drv.h"
-#include "plc_plcp.h"
-#include "plcp_core.h"
-
-char *plcp_state_name[PLCP_NB_STATE]={
- "IDLE",
- "TX_REQ",
- "TX_CTRL",
- "TX_BLOCK",
- "TX_DATA",
- "RX_CTRL",
- "RX_BLOCK",
- "RX_DATA",
- "DROP",
- "DROP_PAYLOAD"
-};
-
-char *plcp_event_name[PLCP_NB_EVENT]={
- "tx_start",
- "tx_more",
- "tx_data",
- "tx_end",
- "busy",
- "rx_start",
- "rx_data",
- "rx_end",
- "eof",
- "tmo_drop",
- "start_tmo",
- "stop_tmo",
- "tmo_mac"
-};
-
-void cac_dump_header(struct cac_header *cac) {
- printf("%08x CAC\n"
- " type ........... 0x%02x\n"
- " seqno .......... 0x%02x\n"
- " flags .......... 0x%02x\n"
- " subtype ........ 0x%02x\n"
- " stei ........... 0x%02x\n"
- " dtei ........... 0x%02x\n"
- " DA ............. %02x:%02x:%02x:%02x:%02x:%02x\n"
- " SA ............. %02x:%02x:%02x:%02x:%02x:%02x\n",
- cac,
- cac->type,
- cac->seqno,
- cac->flags,
- cac->subtype,
- cac->STEI,
- cac->DTEI,
- cac->DA[0],cac->DA[1],cac->DA[2],cac->DA[3],cac->DA[4],cac->DA[5],
- cac->SA[0],cac->SA[1],cac->SA[2],cac->SA[3],cac->SA[4],cac->SA[5]);
-}
-
-void plcp_dump_control(struct plcp_control *control) {
- printf("%08x PLCP control\n"
- "channel_id ..... 0x%04x\n"
- "clen ........... 0x%04x\n"
- "dlen ........... 0x%04x\n"
- "efr ............ 0x%02x\n"
- "slices ......... 0x%02x\n",
- control,
- control->channel_id,
- control->clen,
- control->dlen,
- control->efr,
- control->slices);
- cac_dump_header(&control->cac);
- printf( "crc ............ 0x%08x (%s)\n",
- control->crc,
- control_crc(control)==control->crc ? "valid" : "invalid");
-}
-
-void plcp_display_events(struct plc_drv_unit * unit)
-{
- int event, state;
-
-#ifdef PLCP_DEBUG
- printf("%8s ","");
- for (state=0;state<PLCP_NB_STATE;state++) {
- printf("%7s ",plcp_state_name[state]);
- }
- printf("\n");
-
- for (event=0;event<PLCP_NB_EVENT;event++) {
- printf("%8s ",plcp_event_name[event]);
- for (state=0;state<PLCP_NB_STATE;state++) {
- printf("%7d ", unit->stats.plcp.event[event][state]);
- }
- printf("\n");
- }
- printf("\n");
- printf("PLCP_DEBUG .................. defined (compile time)\n");
-#else
- printf("\n");
- printf("PLCP_DEBUG .................. not defined (compile time)\n");
-#endif
- printf("PLCP current state .......... %s\n",
- plcp_state_name[unit->plcp.state]);
-}
-
-int shell_plcp_get_events(int argc, char **argv) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- plcp_display_events(unit);
- return 0;
-}
-
-int shell_plcp_hdump(int argc, char **argv) {
- struct plcp_control *control;
- if (argc!=2) {
- printf("usage: %s <addr>\n", argv[0]);
- } else {
- control = (struct plcp_control *)strtoul(argv[1],NULL,0);
- plcp_dump_control(control);
- }
- return 0;
-}
-
-int shell_plcp_robust_fec_status(int argc, char **argv) {
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- plcp_robust_fec_status(unit);
- return 0;
-}
-
-static int __set_fmode(struct plc_drv_unit *unit, int fmode) {
-
- mac_lock(unit);
- plcp_lock(unit);
- printf("now setting %s frame mode\n", plcp_fmode_name(fmode));
- plcp_set_fmode(unit, fmode);
- plcp_fmode_start(unit);
- plcp_unlock(unit);
- mac_unlock(unit);
- return 0;
-}
-
-
-int shell_plcp_stop(int argc, char *argv[]) {
- plcp_lock(plc_drv_get_unit(0));
- return 0;
-}
-
-int shell_plcp_start(int argc, char *argv[]) {
- plcp_unlock(plc_drv_get_unit(0));
- return 0;
-}
-
-int shell_plcp_rebuild_channels(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- drv_lock(unit);
- plcp_rebuild_channels(unit);
- drv_unlock(unit);
- return RET_SUCCESS;
-}
-
-int shell_plcp_scramble_on(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- drv_lock(unit);
- unit->plcp.config.scramble = true;
- drv_unlock(unit);
- return RET_SUCCESS;
-}
-
-int shell_plcp_scramble_off(int argc, char *argv[]) {
-
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- drv_lock(unit);
- unit->plcp.config.scramble = false;
- drv_unlock(unit);
- return RET_SUCCESS;
-}
-
-int shell_plcp_check_all_crc_on(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.check_all_crc = true;
- return RET_SUCCESS;
-}
-
-int shell_plcp_check_all_crc_off(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.check_all_crc = false;
- return RET_SUCCESS;
-}
-
-void plcp_dump_conf(struct plc_drv_unit *unit) {
- plcp_fmode_status(unit);
-}
-
-int shell_plcp_control_power_all(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.control_power = POWER_ALL_BANDS;
- return RET_SUCCESS;
-}
-
-int shell_plcp_control_power_used(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.control_power = POWER_USED_BANDS;
- return RET_SUCCESS;
-}
-
-int shell_plcp_control_power_single(int argc, char *argv[]) {
- struct plc_drv_unit *unit = plc_drv_get_unit(0);
- unit->plcp.config.control_power = POWER_SINGLE_BAND;
- return RET_SUCCESS;
-}
-
-static char *__cid_name[PLCP_NB_PREFIXED_CHANNEL] = {
- "none", /* PLCP_CID_NONE 0 */
- "bpsk", /* PLCP_CID_BPSK 1 */
- "qpsk", /* PLCP_CID_QPSK 2 */
- "qam16", /* PLCP_CID_QAM16 3 */
- "qam64", /* PLCP_CID_QAM64 4 */
- "qam256", /* PLCP_CID_QAM256 5 */
- "optimal"
-};
-
-/* convertion du nom de la modulation en level */
-uint16_t plcp_get_cid_by_name(char *name)
-{
- uint16_t cid;
- int len;
- ASSERT(name);
- for (cid=0; cid<PLCP_NB_PREFIXED_CHANNEL; cid++) {
- if (strcmp(name, __cid_name[cid])==0) {
- return cid;
- }
- }
- return (uint16_t)strtoul(name, NULL, 0);
-}
-
-void plcp_init_ui() {
- ui_add_cmd2("plcp get events", shell_plcp_get_events,
- "get plcp state machine transition statistics", UI_SPV );
- ui_add_cmd2("plcp hdump", shell_plcp_hdump, "dump PLCP frame control", 0);
- ui_add_cmd2("plcp robust fec status", shell_plcp_robust_fec_status, "dumps robust FEC status", 0);
- ui_add_cmd2("plcp stop", shell_plcp_stop, "stop PLCP layer", 0);
- ui_add_cmd2("plcp start", shell_plcp_start, "start PLCP layer", 0);
- ui_add_cmd2("plcp rebuild channels", shell_plcp_rebuild_channels, "rebuild PLCP channels", 0);
- ui_add_cmd2("plcp scramble on",
- shell_plcp_scramble_on, "enable payload scrambling", 0);
- ui_add_cmd2("plcp scramble off",
- shell_plcp_scramble_off, "disable payload scrambling", 0);
- ui_add_cmd2("plc check all crc on",
- shell_plcp_check_all_crc_on, "enable CRC control for all bands", 0);
- ui_add_cmd2("plc check all crc off",
- shell_plcp_check_all_crc_off, "enable CRC control for all bands", 0);
- ui_add_cmd2("plc set ctrl power all",
- shell_plcp_control_power_all, "transmit control on all bands", 0);
- ui_add_cmd2("plc set ctrl power used",
- shell_plcp_control_power_used, "transmit control only on bands used for payload", 0);
- ui_add_cmd2("plc set ctrl power single", shell_plcp_control_power_single,
- "transmit control only on the first band used for payload", 0);
-
-}
-
diff --git a/app/sm-mib/.cdtbuild b/app/sm-mib/.cdtbuild
index a7fb052ef8..17c8503bba 100644
--- a/app/sm-mib/.cdtbuild
+++ b/app/sm-mib/.cdtbuild
@@ -6,7 +6,7 @@
<configuration artifactExtension="a" artifactName="sm-mib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.lib.debug.701109285" name="Debug" parent="cdt.managedbuild.config.gnu.lib.debug">
<toolChain id="cdt.managedbuild.toolchain.gnu.lib.debug.565776726" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.lib.debug">
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug.1798203120" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug"/>
-<tool command="gcc-3.4" id="cdt.managedbuild.tool.gnu.c.compiler.lib.debug.546811468" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.lib.debug.546811468" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.lib.debug">
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1002051039" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="FEATURE_AGENT"/>
<listOptionValue builtIn="false" value="_NO_THREADS"/>
diff --git a/app/sm-mib/Makefile_x86 b/app/sm-mib/Makefile_x86
new file mode 100644
index 0000000000..d309e6e64f
--- /dev/null
+++ b/app/sm-mib/Makefile_x86
@@ -0,0 +1,58 @@
+#-------------------------#
+# Makefile for SNMP agent #
+# ******* LINUX ******* #
+# =====< x86-linux >===== #
+# ( sm-mib ) #
+#-------------------------#
+# by Dušan Stefanović #
+# based on Makefile_polux #
+# by Alexandre Poullain #
+# "Spidcom Technologies" #
+# Date : 11 Dec 2007 #
+#-------------------------#
+
+
+OBJS = $(OBJDIR)/mib_lib.o
+OBJS += $(OBJDIR)/mib-interface.o
+
+#************************************************************
+
+GCCROOT = $(COMPILERROOT)
+GCCBIN = $(GCCROOT)/bin
+
+GCCTARGET = x86-linux
+#GCCTOOLS = /usr/local/toolchains/arm-uclinux/bin
+#COMPILERROOT = /usr/local/toolchains/arm-uclinux/
+
+CC = gcc
+AR = ar
+CFLAGS=$(DEFINES) $(INCLUDE) -c -fomit-frame-pointer -Os
+INCLUDE = -I./inc -I../../include -I../sm-flash -I. -I../sm-plc-drv -I../sm-plc-drv/inc
+
+DEFINES = -DFEATURE_AGENT -D_NO_THREADS -DSP_CRISTINA -D__LINUX__ -DSIMULATION_TEST
+
+DEP_H =
+#mib.h mib-interface.h rfc1213.h mib_lib.h
+
+#************************************************************
+
+OBJPARENT = ./obj
+OBJDIR = $(OBJPARENT)/$(GCCTARGET)
+SRCDIR = ./src
+
+$(OBJDIR)/sm-mib.a : $(OBJDIR) $(OBJS)
+ $(AR) -r $@ $(OBJS)
+
+$(OBJPARENT) :
+ -mkdir $(OBJPARENT)
+
+$(OBJDIR) : $(OBJPARENT)
+ -mkdir $(OBJDIR)
+
+$(OBJDIR)/%.o : $(SRCDIR)/%.c $(DEP_H)
+ $(CC) $(CFLAGS) -o $@ $<
+
+clean :
+ -rm -rf $(OBJDIR)
+ -rm -rf $(OBJPARENT)
+
diff --git a/app/sm-mib/mib-interface.h b/app/sm-mib/mib-interface.h
index 5884b4c18f..cfce5c1f67 100755
--- a/app/sm-mib/mib-interface.h
+++ b/app/sm-mib/mib-interface.h
@@ -3,9 +3,9 @@
* PROGRAM MODULE
*
* $Workfile: mib-interface.c $
- * Document no: @(#) Dictionary of data $Revision: 1.48.2.7.2.2 $
+ * Document no: @(#) Dictionary of data $Revision: 1.48.2.7.2.6 $
* $Author: carre $
- * $Date: 2007/09/04 12:37:56 $
+ * $Date: 2007/11/26 09:18:09 $
*
* Copyright (C) 2003 by SPiDCOM Technologies All rights reserved.
*
@@ -21,11 +21,11 @@ extern "C" {
#ifndef __KERNEL__
#include "stdint.h"
#endif
-#include "platform.h"
+#include "../../include/platform.h"
typedef int BOOL;
#include "../sm-bootTable/boottable.h"
-
+//#include "../sm-plc-drv/plc_drv_if.h"
/***************************************************************************
*
* Define/constante
@@ -37,12 +37,15 @@ typedef int BOOL;
#define PMD_CARRIERS_PER_GROUP 8
#define PMD_CARRIERS_PER_BAND (PMD_CARRIERS_PER_GROUP*PMD_GROUPS_PER_BAND)
-#define MAX_AGC_SAMPLES 2000
+#define MAX_AGC_SAMPLES 2000
+
+#define PLCP_MAX_HOST_BROADCAST 1
+#define PLCP_MAX_HOST_UNICAST 64
+#define PLCP_MAX_HOST_MULTICAST 4
-#define PLCP_MAX_HOST_UNICAST 64
-#define PLCP_MAX_HOST_MULTICAST 6
-#define PLCP_MAX_HOST (PLCP_MAX_HOST_UNICAST + PLCP_MAX_HOST_MULTICAST)
+#define PLCP_MAX_HOST (PLCP_MAX_HOST_UNICAST + PLCP_MAX_HOST_MULTICAST + PLCP_MAX_HOST_BROADCAST)
+#define MAX_COMMUNITY_NAME_SIZE 128 //(definition corresponiding to ASN_MAX_NAME_LEN defined in asn1.h)
/***************************************************************************
*
* Structure/Enum
@@ -250,7 +253,7 @@ struct plc_analyser {
struct agc_analyser {
BOOL enable; /* true if the modem should turn to "AGC analyser mode" */
- int period; /* sampling period in 36-µs units */
+ int period; /* sampling period in 36-�s units */
int samples; /* number of samples to be collected [0..MAX_AGC_SAMPLES] */
uint8_t agc[MAX_AGC_SAMPLES]; /* consecutive AGC values */
};
@@ -397,6 +400,23 @@ int mib_getHostNb(void);
int mib_getPlcHost(int hostNb, struct plc_host *);
int mib_setPlcHost(int hostNb, struct plc_host *);
+//light hosts
+/**
+ * Get the plc host using the index
+ * @param hostNb input: host index
+ * @param aHost output: the info of the host for this index (if success)
+ *
+ * @return 0 if success (there is a plchost for this index), -1 otherwise
+ */
+int mib_getPlcLightHost(int hostNb, struct plc_host* aHost);
+
+/**
+ * Get the index where a given mac address is stored
+ * @param iMacAddress input : the mac address to look for
+ * @return the index found, or -1 if the mac address is not found
+ */
+int mib_getIndexByMac(const unsigned char iMacAddress[6]);
+
/* No context for the system_carrier_tab, as the system, it's unique */
int mib_getSystemCarrier(struct system_carrier_tab *);
int mib_setSystemCarrier(struct system_carrier_tab *);
diff --git a/app/sm-mib/src/mib-interface.c b/app/sm-mib/src/mib-interface.c
index 5d7d3f077c..76df4ba115 100755
--- a/app/sm-mib/src/mib-interface.c
+++ b/app/sm-mib/src/mib-interface.c
@@ -3,8 +3,8 @@
* PROGRAM MODULE
*
* $Workfile: mib-interface.c $
- * $Author: maleval $
- * $Date: 2007/08/02 16:29:50 $
+ * $Author: paris $
+ * $Date: 2007/11/16 15:45:16 $
*
* Copyright (C) 2003 by SPiDCOM Technologies All rights reserved.
*
@@ -12,6 +12,13 @@
*/
#include "mib-interface.h"
+#include "assert.h"
+
+
+#include <stdio.h>
+#include <string.h>
+
+
#ifdef __KERNEL__
//#include <linux/module.h>
@@ -32,6 +39,7 @@
#include <stdio.h> //---- FD01: SNMP community
+
#ifndef softOSE
#include "boottable.h"
#include "fftp_server.h"
@@ -147,10 +155,32 @@ static eth_config_t eth_mode;
//---- FD01: BEGIN SNMP community
//agent config
-static char* pLocal_snmp_GET_community_name = NULL;
-static char* pLocal_snmp_SET_community_name = NULL;
+static char pLocal_snmp_GET_community_name [MAX_COMMUNITY_NAME_SIZE];
+static char pLocal_snmp_SET_community_name [MAX_COMMUNITY_NAME_SIZE];
//---- FD01: END SNMP community
+//static unsigned char aIndexTable [70] [6];
+
+// don't use the socket direcly, use socket_get_instance()
+#define NO_SOCKET -1
+static int mib_interface_socket = NO_SOCKET;
+// function to get the socket. create the socket if it doesn't exist
+int socket_get_instance() {
+ if ( NO_SOCKET == mib_interface_socket ) {
+ //printf("NEW SOCKET INITIALIZED");
+ mib_interface_socket = socket(AF_INET, SOCK_DGRAM, 0);
+ }
+ //printf("mib_interface_socket: %d\n", mib_interface_socket);
+ return mib_interface_socket;
+}
+
+void socket_close() {
+ if ( NO_SOCKET != mib_interface_socket ) {
+ close(mib_interface_socket);
+ mib_interface_socket = NO_SOCKET;
+ }
+}
+
void parse_interfaces(void)
{
FILE *f;
@@ -263,25 +293,25 @@ void parse_interfaces(void)
// fill macs with current if not set
if (strlen(eth_iface.mac)==0)
{
- int skfd=socket(AF_INET, SOCK_DGRAM, 0);
+ int skfd= socket_get_instance(); //socket(AF_INET, SOCK_DGRAM, 0);
struct ifreq ifr;
bzero(&ifr,sizeof(ifr));
strcpy(ifr.ifr_name, ETH_DEV);
ioctl(skfd, SIOCGIFHWADDR, &ifr);
memcpy(eth_iface.mac,ifr.ifr_hwaddr.sa_data,6);
- close(skfd);
+ //close(skfd);
}
if (strlen(plc_iface.mac)==0)
{
- int skfd=socket(AF_INET, SOCK_DGRAM, 0);
+ int skfd= socket_get_instance(); //socket(AF_INET, SOCK_DGRAM, 0);
struct ifreq ifr;
bzero(&ifr,sizeof(ifr));
strcpy(ifr.ifr_name, PLC_DEV);
ioctl(skfd, SIOCGIFHWADDR, &ifr);
memcpy(plc_iface.mac,ifr.ifr_hwaddr.sa_data,6);
- close(skfd);
+ //close(skfd);
}
// fill br unset with eth
@@ -446,6 +476,9 @@ void parse_agent_config(void)
char * pToken;
int state;
+ memset(pLocal_snmp_GET_community_name, 0, MAX_COMMUNITY_NAME_SIZE);
+ memset(pLocal_snmp_SET_community_name, 0, MAX_COMMUNITY_NAME_SIZE);
+
pFile = fopen( AGENT_CONFIG_FILE,"r");
if (NULL != pFile)
{
@@ -468,17 +501,17 @@ void parse_agent_config(void)
pToken=strtok(NULL," \n");
if (NULL == pToken)
break;
- pLocal_snmp_GET_community_name= malloc(strlen(pToken)+1);
+ //pLocal_snmp_GET_community_name= malloc(strlen(pToken)+1);
if ( NULL != pLocal_snmp_GET_community_name)
- strcpy( pLocal_snmp_GET_community_name ,pToken);
+ strncpy( pLocal_snmp_GET_community_name ,pToken,MAX_COMMUNITY_NAME_SIZE-1);
/* ------ get SET Community*/
pToken=strtok(NULL," \n");
if (NULL == pToken)
break;
- pLocal_snmp_SET_community_name= malloc(strlen(pToken)+1);
+ //pLocal_snmp_SET_community_name= malloc(strlen(pToken)+1);
if ( NULL != pLocal_snmp_SET_community_name)
- strcpy( pLocal_snmp_SET_community_name ,pToken);
+ strncpy( pLocal_snmp_SET_community_name ,pToken,MAX_COMMUNITY_NAME_SIZE-1);
break;
}
@@ -750,6 +783,7 @@ int init_socket(void) {
}
void close_socket(void) {
+ socket_close();
}
@@ -768,13 +802,13 @@ bool bridgeOn()
int skfd;
bool result;
- skfd = socket(AF_INET, SOCK_DGRAM, 0);
+ skfd = socket_get_instance(); //socket(AF_INET, SOCK_DGRAM, 0);
// try to get bridge ip
bzero(&ifr,sizeof(ifr));
strcpy(ifr.ifr_name, BRIDGE_DEV);
result = (ioctl(skfd, SIOCGIFADDR, &ifr)>=0);
- close(skfd);
+ //close(skfd);
return result;
}
@@ -828,6 +862,9 @@ int mib_getPlcSystem(struct plc_system * plcSystem)
{
int buf_len=128;
char buffer[128];
+ memset (buffer,0,buf_len);
+
+ assert (0 != plcSystem);
int sysctl_name[]={CTL_KERN,KERN_NODENAME}; //hostname
read_sysctl(sysctl_name,buffer,buf_len);
@@ -861,6 +898,9 @@ int mib_getSysname(char *sysname)
{
int buf_len=64;
char buffer[64];
+ memset(buffer,0,buf_len);
+
+ assert (0 != sysname);
int sysctl_name[]={CTL_KERN,KERN_NODENAME}; //hostname
read_sysctl(sysctl_name,buffer,buf_len);
@@ -877,6 +917,8 @@ int mib_getSysname(char *sysname)
******************************************************************************/
int mib_setSysname(char *sysname)
{
+ assert (0 != sysname);
+
int sysctl_name[]={CTL_KERN,KERN_NODENAME}; //hostname
write_sysctl(sysctl_name,sysname,strlen(sysname));
@@ -897,9 +939,12 @@ int mib_getBridgeMac(struct bridge_mac * bridgeMac)
struct ifreq ifr;
int skfd;
+ assert (0 != bridgeMac);
+
+
// get bridge mac
- skfd=socket(AF_INET, SOCK_DGRAM, 0);
+ skfd= socket_get_instance(); //socket(AF_INET, SOCK_DGRAM, 0);
bzero(&ifr,sizeof(ifr));
strcpy(ifr.ifr_name, BRIDGE_DEV);
ioctl(skfd, SIOCGIFHWADDR, &ifr);
@@ -951,7 +996,7 @@ int mib_getBridgeMac(struct bridge_mac * bridgeMac)
// Gateway
bridgeMac->ipGateway=strIP_to_intIP(br_iface.gw);
- close(skfd);
+ //close(skfd);
return 0;
}
@@ -965,6 +1010,8 @@ int mib_getBridgeMac(struct bridge_mac * bridgeMac)
int mib_setBridgeMac(struct bridge_mac * bridgeMac)
{
unsigned char i;
+
+ assert (0 != bridgeMac);
// ifGeneralInformationGroup structure
for(i=0;i<6;i++)
@@ -1002,6 +1049,8 @@ int mib_getEthMac(struct eth_mac * ethMac)
//union plcbox_t *plcbox;
//struct ifreq ifr;
//int skfd;
+
+ assert (0 != ethMac);
// ifGeneralInformationGroup structure
ethMac->ifGeneralInformationGroup.ifType=IF_MIB_IFTYPE_ETHERNETCSMACD;
@@ -1017,6 +1066,9 @@ int mib_getEthMac(struct eth_mac * ethMac)
// ifHCPacketGroup structure
getStats(ETH_DEV,&ife); // Get stats from /proc/net/ -> fixme (use ioctl implementation instead)
+
+ assert (0 != ife);
+
ethMac->ifHCPacketGroup.ifInOctets=ife->stats.rx_bytes;;
ethMac->ifHCPacketGroup.ifOutOctets=ife->stats.tx_bytes;;
ethMac->ifHCPacketGroup.ifInUnknownProtos=0;
@@ -1085,6 +1137,8 @@ int mib_setEthMac(struct eth_mac * ethMac)
{
unsigned char i;
+ assert(0 != ethMac);
+
// ifGeneralInformationGroup structure
for(i=0;i<6;i++)
eth_iface.mac[i]=ethMac->ifGeneralInformationGroup.ifPhysicalAddress[i];
@@ -1122,6 +1176,8 @@ int mib_getPlcMac(struct plc_mac * plcMac)
struct ifreq ifr;
int skfd;
+ assert(0 != plcMac);
+
// ifGeneralInformationGroup structure
plcMac->ifGeneralInformationGroup.ifType=IF_MIB_IFTYPE_PLC;
for(i=0;i<6;i++)
@@ -1145,7 +1201,7 @@ int mib_getPlcMac(struct plc_mac * plcMac)
plcMac->mode=current_mode;
// Get stats from ioctl (not yet implemented)
- if((skfd=socket(AF_INET,SOCK_DGRAM,0))<0)
+ if((skfd= socket_get_instance())<0) // socket(AF_INET,SOCK_DGRAM,0))<0)
{
perror("socket");
return -1;
@@ -1157,7 +1213,7 @@ int mib_getPlcMac(struct plc_mac * plcMac)
ifr.ifr_data=(caddr_t)&plcbox;
if(ioctl(skfd,SIOCPLCBOX,&ifr)<0) // Send ifr to driver module
{
- close(skfd);
+ //close(skfd);
perror("SIOCPLCBOX getPlcMac");
return (-1);
}
@@ -1179,7 +1235,7 @@ int mib_getPlcMac(struct plc_mac * plcMac)
plcMac->ifHCPacketGroup.ifPromiscuousMode = IF_MIB_IFPROMISCUOUSMODE_TRUE;
plcMac->ifHCPacketGroup.ifMtu = 0;
- close(skfd);
+ //close(skfd);
return 0;
}
@@ -1194,6 +1250,8 @@ int mib_setPlcMac(struct plc_mac * plcMac)
{
unsigned char i;
+ assert(0 != plcMac);
+
// ifGeneralInformationGroup structure
for(i=0;i<6;i++)
plc_iface.mac[i]=plcMac->ifGeneralInformationGroup.ifPhysicalAddress[i];
@@ -1287,41 +1345,207 @@ int mib_getHostNb(void)
******************************************************************************/
int mib_getPlcHost(int hostNb, struct plc_host * plcHost)
{
- struct pass_host passHost;
+ struct user_host aUserHost;
struct ifreq ifr;
int skfd;
//int sysctl_name[]={CTL_NET,NET_PLC,PLC_CE,PLCCE_ENABLE};
//int buf_len=32;
//char buffer[buf_len];
- passHost.hostNb=hostNb;
+ assert(0 != plcHost);
- if((skfd=socket(AF_INET,SOCK_DGRAM,0))<0)
+ aUserHost.index=hostNb;
+ aUserHost.iocmd = 1;
+
+ if((skfd= socket_get_instance())<0) // socket(AF_INET,SOCK_DGRAM,0))<0)
{
perror("socket");
return -1;
}
bzero(&ifr,sizeof(ifr));
- strcpy(ifr.ifr_name,PLC_DEV);
- ifr.ifr_data=(caddr_t)&passHost;
+ strcpy(ifr.ifr_name,"plc0");
+ ifr.ifr_data=(caddr_t)&aUserHost;
+
+ // printf("adress of user host given in ifr data is: %x\n", &aUserHost);
+
+
+ //printf("before ioctl heavy called\n");
+ //fflush(stdout);
if(ioctl(skfd,SIOCGHOST,&ifr)<0) // Send ifr to driver module
{
- close(skfd);
+ //close(skfd);
return -1;
}
-
+ // printf("after ioctl heavy called\n");
+ //fflush(stdout);
+
+
+
+ //printf("ca avance pas, Thierry deprime \n");
+ //printf("Thiewrry a mal au coude \n");
+ //fflush(stdout);
+
// internally done in SIOCGHOST
// read_sysctl(sysctl_name, buffer, buf_len);
//passHost.plcHost.automatic = strcmp(buffer,"0")?1:0;
- memcpy(plcHost,&(passHost.plcHost),sizeof(struct plc_host));
+ memcpy(plcHost,&(aUserHost.plcHost),sizeof(struct plc_host));
+
+ //printf("After memcopy of aUserHost.plchost in heavy\n");
+ //close(skfd);
- close(skfd);
+/*
+ //TEST64SLAVES: simulate iocet
+ int myAddIndex;
+ //printf("add an entry at %d in table\n",hostNb );
+ for ( myAddIndex=0; myAddIndex<6; myAddIndex++ )
+ {
+ aIndexTable[hostNb][myAddIndex] = (unsigned char)plcHost->macAddress[myAddIndex];
+ //printf("Mac add at [%d] is: %d\n", myAddIndex, plcHost->macAddress[myAddIndex]);
+
+ }
+ //TEST64SLAVES: simulate ioctl
+*/
return 0;
}
+
+//light hosts
+int mib_getPlcLightHost(int hostNb, struct plc_host * aLightHost)
+{
+ //SIOCGHOSTLIGHT
+ struct user_host aUserHost;
+ struct ifreq ifr;
+ int skfd;
+
+ assert(0 != aLightHost);
+
+ aUserHost.index=hostNb;
+ aUserHost.iocmd = 2;
+
+ if((skfd= socket_get_instance())<0) // socket(AF_INET,SOCK_DGRAM,0))<0)
+ {
+ perror("socket");
+ return -1;
+ }
+
+ bzero(&ifr,sizeof(ifr));
+ strcpy(ifr.ifr_name,"plc0");
+ ifr.ifr_data=(caddr_t)&aUserHost;
+
+ // printf("adress of user host given in ifr data is: %x\n", &aUserHost);
+
+ // printf("before ioctl light called\n");
+ //fflush(stdout);
+ if(ioctl(skfd,SIOCGHOST,&ifr)<0) // Send ifr to driver module
+ {
+ //close(skfd);
+ return -1;
+ }
+ // printf("After ioctl light called\n");
+ //fflush(stdout);
+
+ // printf("ca avance pas, Thierry deprime\n ");
+ // printf("Thiewrry a mal au coude \n");
+ //fflush(stdout);
+
+ //memcpy(aLightHost,&passHost,sizeof(struct pass_host));
+ memcpy(aLightHost,&(aUserHost.plcHost),sizeof(struct plc_host));
+ // printf("After memcopy of aUserHost.plchost in aLightHost\n");
+ // fflush(stdout);
+ ///memcpy(&aLightHost->plcHost,&(passHost.plcHost),sizeof(struct plc_host));
+ //close(skfd);
+
+ return 0;
+}
+
+
+int mib_getIndexByMac(const unsigned char iMacAddress[6])
+{
+ struct user_host aUserHost;
+ struct ifreq ifr;
+ int skfd;
+
+
+//printf("MAC add [0] is: %d\n", iMacAddress[0]);
+//printf("MAC add [1] is: %d\n", iMacAddress[1]);
+//printf("MAC add [2] is: %d\n", iMacAddress[2]);
+//printf("MAC add [3] is: %d\n", iMacAddress[3]);
+//printf("MAC add [4] is: %d\n", iMacAddress[4]);
+//printf("MAC add [5] is: %d\n", iMacAddress[5]);
+
+/*
+aPassMac.mac[0]=(unsigned char)0;
+aPassMac.mac[1]=(unsigned char)19;
+aPassMac.mac[2]=(unsigned char)215;
+aPassMac.mac[3]=(unsigned char)35;
+aPassMac.mac[4]=(unsigned char)0;
+aPassMac.mac[5]=(unsigned char)39;
+*/
+
+ assert(0 != iMacAddress);
+ // Fill the mac address
+ int k=0;
+ for ( k=0;k<6;++k)
+ {
+ aUserHost.macAddress[k] = iMacAddress[k];
+ }
+ aUserHost.iocmd = 3;
+
+
+
+ if((skfd= socket_get_instance())<0) //socket(AF_INET,SOCK_DGRAM,0))<0)
+ {
+ perror("socket");
+ return -1;
+ }
+
+ bzero(&ifr,sizeof(ifr));
+ strcpy(ifr.ifr_name,"plc0");
+ ifr.ifr_data=(caddr_t)&aUserHost;
+
+ // printf("adress of user host given in ifr data is: %x\n", &aUserHost);
+
+ // printf("before ioctl index called\n");
+ // fflush(stdout);
+ int resultIoctl;
+ resultIoctl = ioctl(skfd,SIOCGHOST,&ifr);
+ // printf("After ioctl index called\n");
+ // fflush(stdout);
+
+
+
+// printf("ca avance pas, Thierry deprime\n ");
+// printf("Thiewrry a mal au coude\n ");
+// fflush(stdout);
+
+ if( resultIoctl<0) // Send ifr to driver module
+ {
+
+ // printf("result ioctl: %d\n",resultIoctl );
+ // fflush(stdout);
+ //close(skfd);
+ return -1;
+ }
+
+ //SIOCGHOSTIDBYMAC
+ int aIndex = aUserHost.index;
+ //memcpy(aMacToIdx,&aPassMac,sizeof(struct pass_mac));
+ //close(skfd);
+
+ /* int aIndex ;
+ aIndex = aPassMac.id;*/
+ if (aIndex>=0)
+ return aIndex;
+ else
+ return -1;
+
+
+}
+
+
/******************************************************************************
*
* mib_setPlcHost: set host data
@@ -1332,12 +1556,15 @@ int mib_setPlcHost(int hostNb, struct plc_host * plcHost)
struct pass_host passHost;
struct ifreq ifr;
int skfd;
+
+ assert (0 != plcHost);
+
//int sysctl_name[]={CTL_NET,NET_PLC,PLC_CE,PLCCE_ENABLE};
passHost.hostNb=hostNb;
memcpy(&(passHost.plcHost),plcHost, sizeof(struct plc_host));
- if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ if ((skfd = socket_get_instance())<0) //socket(AF_INET, SOCK_DGRAM, 0)) < 0)
{
perror("socket");
return -1;
@@ -1374,6 +1601,9 @@ int mib_getPlcAnalyser(struct plc_analyser * plcAnalyser)
char saved_period[10];
int result = 0;
+ assert (0!= plcAnalyser);
+
+
if(plcAnalyser->enable==0)
return 0;
@@ -1394,9 +1624,9 @@ int mib_getPlcAnalyser(struct plc_analyser * plcAnalyser)
write_sysctl(sysctl_name_period,buffer,sizeof(buffer));
// SN Analyser data
- if((skfd=socket(AF_INET,SOCK_DGRAM,0))<0)
+ if((skfd= socket_get_instance())<0) // socket(AF_INET,SOCK_DGRAM,0))<0)
{
- close(skfd);
+ //close(skfd);
perror("socket");
result = -1;
}
@@ -1411,7 +1641,7 @@ int mib_getPlcAnalyser(struct plc_analyser * plcAnalyser)
result = -1;
}
- close(skfd);
+ //close(skfd);
}
write_sysctl(sysctl_name_samples,saved_samples,sizeof(saved_samples));
@@ -1430,6 +1660,9 @@ int mib_setPlcAnalyser(struct plc_analyser * plcAnalyser)
{
int sysctl_name[] = {CTL_NET, NET_PLC, PLC_ANALYSER};
+ assert (0 != plcAnalyser);
+
+
if (plcAnalyser->enable)
{
analyser_level++;
@@ -1465,6 +1698,10 @@ int mib_getAgcAnalyser(struct agc_analyser * agcAnalyser)
char saved_period[10];
int result = 0;
+ memset(buffer,0,10);
+
+ assert ( 0!= agcAnalyser);
+
if(agcAnalyser->enable==0)
return 0;
@@ -1485,10 +1722,10 @@ int mib_getAgcAnalyser(struct agc_analyser * agcAnalyser)
write_sysctl(sysctl_name_period,buffer,sizeof(buffer));
// AGC Samples
- if((skfd=socket(AF_INET,SOCK_DGRAM,0))<0)
+ if((skfd= socket_get_instance())<0) //socket(AF_INET,SOCK_DGRAM,0))<0)
{
perror("socket");
- close(skfd);
+ //close(skfd);
result = -1;
}
else
@@ -1502,7 +1739,7 @@ int mib_getAgcAnalyser(struct agc_analyser * agcAnalyser)
result = -1;
}
- close(skfd);
+ //close(skfd);
}
write_sysctl(sysctl_name_samples,saved_samples,sizeof(saved_samples));
@@ -1521,6 +1758,8 @@ int mib_setAgcAnalyser(struct agc_analyser * agcAnalyser)
{
int sysctl_name[] = {CTL_NET, NET_PLC, PLC_ANALYSER};
+ assert(0 != agcAnalyser);
+
if (agcAnalyser->enable)
{
analyser_level++;
@@ -1553,7 +1792,9 @@ int mib_getSystemCarrier(struct system_carrier_tab *systemCarrierTab) {
struct ifreq ifr; //will contain all the interface parameters
int skfd;
- if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ assert( 0 != systemCarrierTab);
+
+ if ((skfd = socket_get_instance())<0) //socket(AF_INET, SOCK_DGRAM, 0)) < 0)
{
perror("socket");
return -1;
@@ -1565,26 +1806,26 @@ int mib_getSystemCarrier(struct system_carrier_tab *systemCarrierTab) {
// plcp_getPilots(systemCarrierTab)
if (ioctl(skfd, SIOCGPILOTS, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCGPILOTS getSystemCarrier");
return (-1);
}
// plcp_getNotchs(systemCarrierTab)
if (ioctl(skfd, SIOCGNOTCHES, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCGNOTCHES getSystemCarrier");
return (-1);
} //printf("groupNotch[0] : %d\n", (*systemCarrierTab).groupNotch[0]);
// plcp_getAdapts(systemCarrierTab)
if (ioctl(skfd, SIOCGADAPTS, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCGADAPTS getSystemCarrier");
return (-1);
}
- close(skfd);
+ //close(skfd);
return 0;
}
@@ -1600,7 +1841,9 @@ int mib_setSystemCarrier(struct system_carrier_tab *systemCarrierTab) {
struct ifreq ifr; //will contain all the interface parameters
int skfd;
- if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ assert ( 0 != systemCarrierTab);
+
+ if ((skfd = socket_get_instance())<0) //socket(AF_INET, SOCK_DGRAM, 0)) < 0)
{
perror("socket");
return -1;
@@ -1612,21 +1855,21 @@ int mib_setSystemCarrier(struct system_carrier_tab *systemCarrierTab) {
// plcp_setPilots(systemCarrierTab)
if (ioctl(skfd, SIOCSPILOTS, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCSPILOTS setSystemCarrier");
return (-1);
}
// plcp_setNotchs(systemCarrierTab)
if (ioctl(skfd, SIOCSNOTCHES, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCSNOTCHES setSystemCarrier");
return (-1);
}
// plcp_setAdapts(systemCarrierTab)
if (ioctl(skfd, SIOCSADAPTS, &ifr) < 0) {//send ifr to driver module
- close(skfd);
+ //close(skfd);
perror("SIOCSADAPTS setSystemCarrier");
return (-1);
}
@@ -1899,14 +2142,14 @@ int mib_getEthSetupSpeed()
struct ifreq ifr;
int fd;
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0);
strcpy(ifr.ifr_name, "eth0");
if(ioctl(fd, SIOCGGETLINKSETUPSPEED, &ifr) < 0) {
perror("SIOCGGETLINKSETUPSPEED");
return -1;
}
result = (int)ifr.ifr_data;
- close(fd);
+ //close(fd);
#endif
if ( (result != ETH_SPEED_10) && (result != ETH_SPEED_100) && (result != ETH_SPEED_AUTO) )
return -1;
@@ -1921,14 +2164,14 @@ int mib_getEthCurrentSpeed(enumSpeed_t* aSpeed)
struct ifreq ifr;
int fd;
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0)
strcpy(ifr.ifr_name, "eth0");
if(ioctl(fd, SIOCGGETLINKCURRENTSPEED, &ifr) < 0) {
perror("SIOCGGETLINKCURRENTSPEED");
return -1;
}
result = (int)ifr.ifr_data;
- close(fd);
+ //close(fd);
#endif
@@ -1988,14 +2231,14 @@ int mib_getEthSetupMode()
struct ifreq ifr;
int fd;
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0);
strcpy(ifr.ifr_name, "eth0");
if(ioctl(fd, SIOCGGETLINKSETUPMODE, &ifr) < 0) {
perror("SIOCGGETLINKSETUPMODE");
return -1;
}
result = (int)ifr.ifr_data;
- close(fd);
+ //close(fd);
#endif
if ( (result != ETH_MODE_HD) && (result != ETH_MODE_FD) && (result != ETH_MODE_AUTO) )
return -1;
@@ -2010,14 +2253,14 @@ int mib_getEthCurrentMode(enumDuplex_t* aDuplexMode)
struct ifreq ifr;
int fd;
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0);
strcpy(ifr.ifr_name, "eth0");
if(ioctl(fd, SIOCGGETLINKCURRENTMODE, &ifr) < 0) {
perror("SIOCGGETLINKCURRENTMODE");
return -1;
}
result = (int)ifr.ifr_data;
- close(fd);
+ //close(fd);
#endif
if (result == ETH_MODE_FD)
@@ -2064,7 +2307,7 @@ int mib_getSTPMode(void)
unsigned long args[4] = { BRCTL_GET_BRIDGE_INFO,
(unsigned long) &i, 0, 0 };
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0);
strcpy(ifr.ifr_name, "br0");
ifr.ifr_data = (char *) &args;
@@ -2085,7 +2328,7 @@ int mib_setSTPMode(int mode)
struct ifreq ifr;
unsigned long args[4] = {BRCTL_SET_BRIDGE_STP_STATE, mode, 0, 0 };
- fd = socket(AF_INET,SOCK_DGRAM,0);
+ fd = socket_get_instance(); //socket(AF_INET,SOCK_DGRAM,0);
strcpy(ifr.ifr_name, "br0");
ifr.ifr_data = (char *) &args;
ioctl(fd, SIOCDEVPRIVATE, &ifr);
@@ -2093,7 +2336,7 @@ int mib_setSTPMode(int mode)
perror("BRCTL_SET_BRIDGE_PRIORITY");
return -1;
}
- close(fd);
+ //close(fd);
#endif
//save the stp mode to save it in flash if it is asked
@@ -2126,6 +2369,7 @@ int mib_getBridgeForwarding()
{
int buf_len=64;
char buffer[64];
+ memset(buffer,0,buf_len);
int sysctl_name[]={CTL_NET,NET_BRIDGE,BRIDGE_FORWARDING}; //hostname
read_sysctl(sysctl_name,buffer,buf_len);
@@ -2137,6 +2381,7 @@ int mib_setBridgeForwarding(int mode)
{
int buf_len=64;
char buffer[64];
+ memset(buffer,0,buf_len);
int sysctl_name[]={CTL_NET,NET_BRIDGE,BRIDGE_FORWARDING}; //hostname
sprintf(buffer,"%d",mode);
@@ -2222,11 +2467,11 @@ void mib_set_plc_preferred_bssid(unsigned int iBssid) {
int mib_get_SNMP_community(char * pSnmp_GET_community_name, char * pSnmp_SET_community_name) {
/* if problem */
- if ((NULL == pLocal_snmp_GET_community_name) || (NULL == pLocal_snmp_SET_community_name))
+ if ( ('0' == pLocal_snmp_GET_community_name[0]) || ('0' == pLocal_snmp_SET_community_name[0]) )
return 1;
- strcpy(pSnmp_GET_community_name, pLocal_snmp_GET_community_name);
- strcpy(pSnmp_SET_community_name ,pLocal_snmp_SET_community_name);
+ strncpy(pSnmp_GET_community_name, pLocal_snmp_GET_community_name, MAX_COMMUNITY_NAME_SIZE-1);
+ strncpy(pSnmp_SET_community_name ,pLocal_snmp_SET_community_name, MAX_COMMUNITY_NAME_SIZE-1);
return 0;
}
diff --git a/app/sm-plc-drv/inc/linux_drv.h b/app/sm-plc-drv/inc/linux_drv.h
index 7c49b581f4..55424af948 100755
--- a/app/sm-plc-drv/inc/linux_drv.h
+++ b/app/sm-plc-drv/inc/linux_drv.h
@@ -5,19 +5,21 @@
#ifndef _LINUX_DRV_H_
#define _LINUX_DRV_H_
+#include "plc_ioctl.h"
+
#define PLC_INIT_MSG 123
-#define PLC_RX_MSG 124
-#define PLC_TX_MSG 125
+#define PLC_RX_MSG 124
+#define PLC_TX_MSG 125
#if 0
-#define PLC_WRITE_MSG 126
+#define PLC_WRITE_MSG 126
#endif
-#define PLC_CE_MSG 127
-#define PLC_LOCKUNLOCK_MSG 129
-#define PLC_TOKEN_MSG 130
-#define PLC_CE_START_HOST_MSG 131
+#define PLC_CE_MSG 127
+#define PLC_LOCKUNLOCK_MSG 129
+#define PLC_TOKEN_MSG 130
+#define PLC_CE_START_HOST_MSG 131
#if 0
-#define PLC_TEST_CLEAR_MSG 131
-#define PLC_TEST_TX_MSG 132
+#define PLC_TEST_CLEAR_MSG 131
+#define PLC_TEST_TX_MSG 132
#endif
#define PLC_SIOC_MSG 133
#define PLC_GETM_SN_MSG 134
@@ -25,10 +27,23 @@
#define PLC_MLME_CONFIRM_MSG 137
#define PLC_VPORT_MSG 138
#define PLC_SCAN_NETWORK_MSG 139
-//#define PLC_ADD_MEMBER_MSG 140
-//#define PLC_DEL_MEMBER_MSG 141
-//#define PLC_CFN_MEMBER_MSG 142
-#define PLC_MIB_EVENT 143
+//#define PLC_ADD_MEMBER_MSG 140
+//#define PLC_DEL_MEMBER_MSG 141
+//#define PLC_CFN_MEMBER_MSG 142
+#define PLC_MIB_EVENT 143
+
+#ifdef CONFIG_PLC_PPC
+#define PPC_HOST_CREATE 144
+#define PPC_HOST_DELETE 145
+#define PPC_HOST_UPDATE 146
+#endif
+
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+#define PLC_EN_HOST_CREATE 147
+#define PLC_EN_HOST_DESTROY 148
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
+#define PLC_HOST_AUTH 149
struct vport_msg_ {
char mac_addr[6];
@@ -62,4 +77,37 @@ extern void send_mcast_l2r_sig (int type, void *data);
extern void send_r2l_sig (int type, void *data);
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+
+/* Structure plc_en_func holds pointers to functions
+ * that are to be called when connection with host
+ * is established or terminated. */
+struct plc_en_func {
+ void (*new_host) (unsigned char *, int);
+ void (*del_host) (unsigned char *, int);
+};
+
+extern void plc_en_register (struct plc_en_func *cb_funcs);
+extern struct plc_en_func *callbacks;
+
+struct plc_en_host {
+ int TEI;
+ unsigned char mac_addr[ETH_ALEN];
+};
+
+void plc_en_work_func (void *arg);
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
+#ifdef PLC_RECOVERY
+extern int RECOVERY_FLAG; // set to 1 if some host have been created or destroyed
+
+ // set to 0 after writeing in the recovery.conf file
+#endif
+
+struct authentication_8021x {
+ struct plc_drv_unit *unit;
+ struct plcp_host *host;
+ struct sk_buff *skb;
+};
+
#endif // _LINUX_DRV_H_
diff --git a/app/sm-plc-drv/inc/mac_carp.h b/app/sm-plc-drv/inc/mac_carp.h
index 9af0066619..06ef3a0fc2 100644
--- a/app/sm-plc-drv/inc/mac_carp.h
+++ b/app/sm-plc-drv/inc/mac_carp.h
@@ -40,7 +40,7 @@ extern struct plcp_host *carp_lookup (uint8_t DA[6]);
extern int getDTEI (uint8_t DA[6], uint8_t * dtei);
#endif
-extern void carp_insert (uint8_t DA[6], struct plcp_host *host);
+extern bool carp_insert (uint8_t DA[6], struct plcp_host *host);
extern void carp_remove (uint8_t DA[6]);
extern void carp_remove_host (struct plcp_host *host);
diff --git a/app/sm-plc-drv/inc/mac_signals.h b/app/sm-plc-drv/inc/mac_signals.h
index 7739031662..8d82c561d4 100644
--- a/app/sm-plc-drv/inc/mac_signals.h
+++ b/app/sm-plc-drv/inc/mac_signals.h
@@ -18,6 +18,10 @@ enum {
PHY_TX_STATUS_INDICATION,
RIFS_TMO,
RX_ACK,
+#ifdef CONFIG_PLC_RTSCTS
+ RX_RTS,
+ RX_CTS,
+#endif
ACCESS,
POLLED,
TX_CFACK,
@@ -66,6 +70,7 @@ enum {
CE_STOP_CONFIRM,
CE_TIMEOUT_REPLY,
CE_TIMEOUT_WAIT,
+ CE_TIMEOUT_EST,
CE_STATUS_INDICATE,
CE_UPDATE,
CE_UPDATE_MCAST,
@@ -80,9 +85,6 @@ enum {
MLME_ASSOC_CONFIRM,
MLME_DISASSOC_REQUEST,
MLME_DISASSOC_CONFIRM,
-#ifdef CONFIG_PLC_PPC
- MLME_REASSOC_REQUEST,
-#endif
MLME_BEACON_INDICATE,
ND_TIMEOUT,
@@ -101,6 +103,15 @@ enum {
MCAST_ADD_MEMBER,
MCAST_DEL_MEMBER,
+ // Additional network discovery signals.
+ // Placed here to ensure compatibility.
+ #ifdef CONFIG_PLC_PPC
+ MLME_REASSOC_REQUEST,
+ #endif
+ #ifdef PLC_RECOVERY
+ MLME_RECOVERY_REQUEST,
+ #endif
+
// DO NOT REMOVE it cause it defines the number of signals.
MAX_SIGNALS
};
@@ -155,6 +166,22 @@ struct RxAck {
char pb_pos[10]; // should be less than S_FRM_RESERVED
};
+#ifdef CONFIG_PLC_RTSCTS
+struct RxRts {
+ SIGSELECT sig_no;
+ char STEI;
+ char DTEI;
+ uint16_t efr;
+};
+
+struct RxCts {
+ SIGSELECT sig_no;
+ char STEI;
+ char DTEI;
+ uint16_t efr;
+};
+#endif
+
struct TxCfAck {
SIGSELECT sig_no;
char STEI;
@@ -362,6 +389,7 @@ struct TokenStop {
struct ChannelTmo {
SIGSELECT sig_no;
struct plcp_host *host; /* 64 bits of the signal are used to cancel the host properly */
+ unsigned short num_retry; /* for host destroy after 100 retry forcely kill host */
};
struct ChannelCtl {
@@ -454,6 +482,18 @@ struct MlmeDisassocConfirm {
int status;
};
+#ifdef PLC_RECOVERY
+struct MlmeRecoveryRequest {
+ SIGSELECT sig_no;
+ PROCESS sender;
+ int nb_sent;
+ struct mac_addr mac_addr[PLCP_MAX_HOST - 1]; // list of mac addresses of attached hosts
+ char recovery_flag;
+ char nb_hosts; // number of attached hosts
+ short pad16;
+};
+#endif
+
struct MlmeBeaconIndicate {
SIGSELECT sig_no;
struct beacon bc;
@@ -479,6 +519,9 @@ union nd_signal {
struct MlmeAssocConfirm MlmeAssocConfirm;
struct MlmeDisassocRequest MlmeDisassocRequest;
struct MlmeDisassocConfirm MlmeDisassocConfirm;
+#ifdef PLC_RECOVERY
+ struct MlmeRecoveryRequest MlmeRecoveryRequest;
+#endif
struct MlmeBeaconIndicate MlmeBeaconIndicate;
struct MmduRequest MmduRequest;
struct MmduConfirm MmduConfirm;
@@ -507,6 +550,10 @@ union mac_signal {
struct MpduRequest MpduRequest;
struct Polled Polled;
struct RxAck RxAck;
+#ifdef CONFIG_PLC_RTSCTS
+ struct RxRts RxRts;
+ struct RxCts RxCts;
+#endif
struct RxOther RxOther;
struct Tbtt Tbtt;
struct TmoToken TmoToken;
diff --git a/app/sm-plc-drv/inc/mac_states.h b/app/sm-plc-drv/inc/mac_states.h
index 8c3ea9a739..c446bc342f 100644
--- a/app/sm-plc-drv/inc/mac_states.h
+++ b/app/sm-plc-drv/inc/mac_states.h
@@ -5,12 +5,18 @@ enum {
/* rx_coordination State machine */
RX_COORD_IDLE = 0,
RX_COORD_ACK,
+#ifdef CONFIG_PLC_RTSCTS
+ RX_COORD_CTS,
+#endif
/* dcf service (ad-hoc mode) */
DCF_IDLE,
DCF_CP,
DCF_TX,
DCF_WAIT_ACK,
+#ifdef CONFIG_PLC_RTSCTS
+ DCF_WAIT_CTS,
+#endif
/* pcf service (if a repeater) */
PCF_CP_END,
diff --git a/app/sm-plc-drv/inc/pb_list.h b/app/sm-plc-drv/inc/pb_list.h
index f80a7c8d1f..af41d9aa90 100755
--- a/app/sm-plc-drv/inc/pb_list.h
+++ b/app/sm-plc-drv/inc/pb_list.h
@@ -9,6 +9,10 @@
#include "plcp_core.h"
#include "mac_frame.h"
+#ifdef CONFIG_PLC_PPC
+#include "plc_ppc.h"
+#endif
+
/***********************************************************
* DEFINES
*/
@@ -53,12 +57,19 @@ struct pb_desc *pb_alloc (void); /* Allocate and initialize a PB and return it
void pb_free (struct pb_desc *); /* free a pb */
struct pb_desc *pb_rx_alloc (void); /* Allocate and initialize a PB and return it */
void pb_rx_free (struct pb_desc *); /* free a pb */
-struct plcp_frame *pb_build_pframe (struct plcp_host *host); /* Build a pframe (host->pframe) with the PBs in queue */
-int pb_merge_data (uint8_t * data, struct list_head *list, int len);
+struct plcp_frame *pb_build_pframe (struct plcp_host *host); /* Build a pframe int (host->pframe) with the PBs in queue */
+extern int pframe_pb_free (struct plcp_frame *pframe, struct pb_set *pb_nack);
-/*void mac_pb_free(struct mac_frame* frame);*/
+#ifdef CONFIG_PLC_PPC
+int pb_split_data (uint8_t * data, int len, struct list_head *list, struct ppc_Header *ppc_header);
+#else
int pb_split_data (uint8_t * data, int len, struct list_head *list);
-int pframe_pb_free (struct plcp_frame *pframe, struct pb_set *pb_nack);
+#endif
+#ifdef CONFIG_PLC_PPC
+int pb_merge_data (uint8_t * data, struct list_head *list, int dlen, struct ppc_Header *ppc_header);
+#else
+int pb_merge_data (uint8_t * data, struct list_head *list, int dlen);
+#endif
struct mac_frame *pb_link_jigsaw (struct pb *pb);
void pb_age_jigsaw (int purge);
int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struct mac_frame *frame);
diff --git a/app/sm-plc-drv/inc/plc_ce.h b/app/sm-plc-drv/inc/plc_ce.h
index 2db797efa8..1ea2ee6bdc 100644
--- a/app/sm-plc-drv/inc/plc_ce.h
+++ b/app/sm-plc-drv/inc/plc_ce.h
@@ -76,6 +76,7 @@ enum {
#define CE_MAX_UHOST 32
#define DEFAULT_GLOMER 22
+#define CE_MAX_NUM_RETRY 100 /* num of retry before host is killed forcely */
enum {
NO_SAVA = 0,
@@ -234,6 +235,8 @@ extern void ce_analyse_band_spectrum (double *band_sp, int band);
extern void ce_analyse_host_spectrum (struct plcp_host *host);
+extern void ce_analyse_host_spectrum_sm (struct plcp_host *host, uint16_t *spectrum);
+
extern int ce_start_host (struct plc_drv_unit *unit, struct plcp_host *host);
extern int ce_start_hosts (struct plc_drv_unit *unit);
@@ -254,8 +257,6 @@ extern void ce_get_band_spectrum (int band);
extern void ce_update_mcast (struct plc_drv_unit *unit, struct plcp_host *host);
-extern void ce_update_mcast (struct plc_drv_unit *unit, struct plcp_host *host);
-
extern void ce_kill_host (struct plc_drv_unit *unit, struct plcp_host *host);
extern int ce_config (struct plc_drv_unit *unit);
diff --git a/app/sm-plc-drv/inc/plc_common.h b/app/sm-plc-drv/inc/plc_common.h
index 73ca679aa8..a03b76744d 100755
--- a/app/sm-plc-drv/inc/plc_common.h
+++ b/app/sm-plc-drv/inc/plc_common.h
@@ -16,39 +16,19 @@
#define PLCP_LEVEL_HARDENING 8 /* WARNING: STOPS ON ERROR ! */
/*
- * - define DISPLAY_STATS to have mac level statistics (usefull)
* - define DEBUG_MULTIPOINT to have /proc/net/plc/internals/mac/log and perf
- * - define SAFE_ACCESS to handle access_error after MAC_ACCESS_LIMIT dur. Needed to resynchronize the medium
* - define DEBUG_SEQNO to capture sequence number and display its in a proc file
* - define DEBUG_PB to debug sar module. DEBUG_MULTIPOINT must be set
- * - define BUFFER_ISOLATION estimate dynamically the number or active stations and share the memory fairly between them
* - define PLCP_DEBUG_LEVEL is level debug level of messages in the PLCP layer
* - define DEBUG_TEST to debug testraw and ber
- * - define EXTRA_STATS to display additive statistics with the macro ESTAT(..)
- * - define STATIC_MESURE_ALLOCATION to statically allocate the host->info structure
- * - define RAFALE_WITH_NR to calculate the NR on sound frame. Otherwise the BER is used
- * - define CE_ITERATIF to build iterative channel estimation code over the existing one
- * - define SAR_OPT compile the sar module in optimised code.
-#define DISPLAY_STATS
#define DEBUG_MULTIPOINT
#define DEBUG_SEQNO
#define DEBUG_PB
#define DEBUG_TEST
-#define STATIC_MESURE_ALLOCATION
*/
-#define SAR_OPT
-#define CE_ITERATIF
-#define RAFALE_WITH_NR
-#define EXTRA_STATS
-#define DISPLAY_STATS
-#define SAFE_ACCESS
-#define BUFFER_ISOLATION
-//#define VERBOSE_MULTICAST
-
-
#ifdef CONFIG_PLC_DEBUG
#define DEBUG_MULTIPOINT
#define DEBUG_PB
@@ -65,7 +45,6 @@
#define TEST_PRINTK(args...) /* args... */
#endif
-#ifdef EXTRA_STATS
struct e_status {
u32 valid;
u32 invalid;
@@ -83,9 +62,4 @@ struct estats {
extern struct estats estats;
#define ESTAT(a) (estats.a)
-#else
-#define ESTAT(a) /* a */
-#endif
-
-
#endif /* PLC_COMMON_H */
diff --git a/app/sm-plc-drv/inc/plc_dbg.h b/app/sm-plc-drv/inc/plc_dbg.h
index d37020b017..acb2cc9fdd 100755
--- a/app/sm-plc-drv/inc/plc_dbg.h
+++ b/app/sm-plc-drv/inc/plc_dbg.h
@@ -124,13 +124,13 @@ extern char *module_list[32];
#define TRACE_I2C 1<<21 // 0x200000
#define TRACE_VPORT 1<<22 // 0x400000
#define TRACE_SNMP 1<<23 // 0x800000
-#define TRACE_PMD 1<<24 // 0x1000000
-#define TRACE_E2E 1<<25 //0x2000000 TRACE END to END
-#define TRACE_PCI 1<<26
-#define TRACE_FTP 1<<27
-#define TRACE_PB 1<<28
-#define TRACE_MCAST 1<<29 // 0x10000000
-
+#define TRACE_PMD 1<<24 // 0x1000000
+#define TRACE_E2E 1<<25 // 0x2000000 TRACE END to END
+#define TRACE_PCI 1<<26 // 0x4000000
+#define TRACE_FTP 1<<27 // 0x8000000
+#define TRACE_PB 1<<28 // 0x10000000
+#define TRACE_MCAST 1<<29 // 0x20000000
+#define TRACE_RTSCTS 1<<30 // 0x40000000
/* severity list */
#define TRACE_DEBUG 1<<0
#define TRACE_INFO 1<<1
diff --git a/app/sm-plc-drv/inc/plc_drv.h b/app/sm-plc-drv/inc/plc_drv.h
index 29c1ec4630..a0bc928aed 100644
--- a/app/sm-plc-drv/inc/plc_drv.h
+++ b/app/sm-plc-drv/inc/plc_drv.h
@@ -26,6 +26,7 @@
#include "platform.h"
#include "plc_common.h"
+#include "plc_ioctl.h"
#include "plc_mac.h"
#include "tosv.h"
@@ -67,7 +68,7 @@ struct plc_drv {
extern int max_gain_per_band[];
-/* nombre d'unit� PLC au max */
+/* nombre d'unité PLC au max */
#define PLC_DRV_MAX_UNITS 1
/* Ethernet link compatibility */
@@ -128,10 +129,12 @@ struct plc_drv_unit {
} expert_config;
+ u8 carp_limit_per_host;
u8 config_medium; // will be removed in futur ( see check_ce_configuration function).
+ uint8_t auth_8021x; /* not 0 if 802.1x authentication is turn on. */
- /********************* donn�es driver ****************************/
+ /********************* données driver ****************************/
bool polled; /* true if the device is in polled mode. */
bool init; /* true if the device has been found and initialized */
bool opened; /* true if the device is already opened by a client */
@@ -147,10 +150,17 @@ struct plc_drv_unit {
uint8_t TEI;
#ifdef CONFIG_PLC_PPC
uint8_t NID;
+ uint8_t PPC_repeater;
#endif
uint8_t BSSID;
int agc_cal;
+#ifdef CONFIG_PLC_RTSCTS
+ unsigned int rts_threshold; /* efr threshold for RTSCTS handshake */
+ int nav_offset; /* configurable offset for NAV timer in �s */
+ unsigned int max_rts_retrans; /* maximum number of RTS retransmissions */
+#endif
+
uint8_t attachBSSID; /* BSSID of the attached master (0 in case of the HE) */
uint8_t localTEI; /* TEI of the current host in the master's cell */
uint8_t defaultBSSID; /* static BSSID to be used when attached */
@@ -169,11 +179,11 @@ struct plc_drv_unit {
struct proc_dir_entry *hostDir;
struct workqueue_struct *mcast_wq;
- /********************* donn�es interface mode *********************/
+ /********************* données interface mode *********************/
plc_if_mode_t mode;
int analyser;
- /********************* donn�es plcp *******************************/
+ /********************* données plcp *******************************/
int id; /* [0..7] */
int used_bands;
int nb_bands;
@@ -222,6 +232,12 @@ struct plc_drv_unit {
uint8_t limit;
} entropy;
} hamming;
+ struct {
+ uint8_t enable;
+ uint8_t fast;
+ uint8_t band_votes;
+ } stat_rx;
+
uint16_t tx_more_slots;
int fmode;
uint16_t p_cid;
@@ -260,16 +276,16 @@ struct plc_drv_unit {
} plcp;
- /******************* donn�es MAC ************************************/
- /* addresse non align�es sur 32 bits */
+ /******************* données MAC ************************************/
+ /* addresse non alignées sur 32 bits */
- struct {
- /* specific to csma */
- uint16_t busy_date;
- uint16_t idle_date;
- bool reg_errors;
- uint16_t used_ifs;
- uint16_t padd;
+ struct {
+ /* specific to csma */
+ uint16_t busy_date;
+ uint16_t idle_date;
+ bool reg_errors;
+ uint16_t used_ifs;
+ uint16_t padd;
struct {
int cap_queue;
@@ -333,7 +349,6 @@ struct plc_drv_unit {
int min_mtu; /* fix minimum mtu to deliver hosts */
int default_cid; /* default cid if mtu is below min_mtu */
int pilots_threshold; /* choice between single pilots or double pilots */
-#ifdef CE_ITERATIF
int coefnoise; /* Noise smoothing value [1..255] */
int oneshot; /* CE will be started just once */
int iteratif;
@@ -343,7 +358,6 @@ struct plc_drv_unit {
int nb_slices_per_frame_min; /* nb slices to use linear command */
int rate_error_target; /* target error over nb_frames_min */
int rate_error_max; /* maximum error in nb_frames_min */
-#endif
uint32_t origine; /* phlic start of mesures */
uint32_t start_date; /* OS start date of mesures */
bool power_on; /* ajust power on control depending of att */
@@ -434,7 +448,7 @@ struct plc_drv_unit {
*/
struct {
struct {
- /* informations g�n�rales sur le protocole */
+ /* informations générales sur le protocole */
int tx_probe_request;
int tx_probe_reply;
int tx_assoc_request;
@@ -463,6 +477,7 @@ struct plc_drv_unit {
/* protocol messages logs */
int nb_send_request;
int nb_tmo_request;
+ int nb_tmo_est;
int nb_error_reply;
int nb_restart;
int nb_send_reply;
@@ -481,10 +496,8 @@ struct plc_drv_unit {
int bad_session;
int bad_current_id;
int drop_ber;
-#ifdef CE_ITERATIF
int rx_unicast;
int rx_unicast_bad;
-#endif
int nb_host_unknown;
int nb_update;
int nb_update_mcast;
@@ -533,6 +546,7 @@ struct plc_drv_unit {
#ifdef CONFIG_PLC_PPC
int tx_rcm;
int rx_rcm;
+ int tx_rcm_failed;
#endif
} drv;
diff --git a/app/sm-plc-drv/inc/plc_mac.h b/app/sm-plc-drv/inc/plc_mac.h
index 0fab58045e..247f97ad0e 100755
--- a/app/sm-plc-drv/inc/plc_mac.h
+++ b/app/sm-plc-drv/inc/plc_mac.h
@@ -1,5 +1,3 @@
-#ifndef MAC_H
-#define MAC_H
/* ---------------------------------------------------------------------------------
* OBJECT : need to be writed
*
@@ -13,6 +11,9 @@
* | | - Change CONFIG_PLC_CABLE by sysctl (net.plc.config_medium)
* --------------------------------------------------------------------------------- */
+#ifndef MAC_H
+#define MAC_H
+
#include "platform.h"
#include "ose.h"
@@ -34,6 +35,7 @@
#include "plc_sms.h"
#include "plc_common.h"
#include "utmo_if.h"
+#include "plc_ioctl.h"
#include "hal.h"
@@ -71,9 +73,6 @@ enum {
MA_SUBTYPE_PROBE_REPLY,
MA_SUBTYPE_ASSOC_REQUEST,
MA_SUBTYPE_ASSOC_REPLY,
-#ifdef CONFIG_PLC_PPC
- MA_SUBTYPE_REASSOC_REQUEST,
-#endif
MA_SUBTYPE_DISASSOC_REQUEST,
MA_SUBTYPE_DISASSOC_REPLY,
MA_SUBTYPE_TEST,
@@ -111,8 +110,14 @@ enum {
#ifdef CONFIG_PLC_PPC
MA_SUBTYPE_PEPSI,
+ MA_SUBTYPE_REASSOC_REQUEST,
#endif
- // added some spare to ensure future compatibility
+#ifdef PLC_RECOVERY
+ MA_SUBTYPE_RECOVERY_REQUEST,
+ MA_SUBTYPE_RECOVERY_REPLY,
+#endif
+
+ // added some spare to ensure future compatibility
MA_SUBTYPE_CE_SPARE = 63,
// INSERT NEW SUBTYPE HERE!! Then change ma_subtype_name (file mac_interface.c) and is_channel_estimation_XXX (file ce_core.c)
MA_SUBTYPE_MAX
@@ -123,9 +128,7 @@ enum {
#endif
-#ifdef EXTRA_STATS
extern struct e_status stats_subtype[MA_SUBTYPE_MAX];
-#endif
extern char *ma_type_name[MA_TYPE_MAX];
extern char *ma_subtype_name[MA_SUBTYPE_MAX];
@@ -146,6 +149,14 @@ extern char *mac_event_name[];
#define MA_BIT_TOKEN 0 // prevent MA_BIT_TOKEN utilisation (flag always unset).
#endif
+/*--------------------------------- MAC DATA (mac_tx, mac_rx) ---------------------------------------*/
+#ifdef CONFIG_PLC_PPC
+struct ppc_Header {
+ uint16_t len; // payload len (without header)
+ uint8_t STEI; // original sender of the msdu
+ uint8_t DTEI; // original destination of the msdu
+} __attribute__ ((packed));
+#endif
/*--------------------------------- MAC DATA (mac_tx, mac_rx) ---------------------------------------*/
struct mac_header {
@@ -153,6 +164,10 @@ struct mac_header {
uint32_t magic:6; // magic number
uint32_t flags:2; // see blow
uint32_t TEI:8; // orignal sender of the msdu (forward possible by cco)
+#ifdef CONFIG_PLC_PPC
+ struct ppc_Header ppc_header;
+#endif
+
};
struct tasklet {
@@ -185,12 +200,10 @@ struct tasklet {
extern int max_recv_skb;
extern int max_xmit_skb;
-#ifdef BUFFER_ISOLATION
extern int xmit_host;
extern int xmit_host_min;
extern int xmit_host_thr;
extern int xmit_host_skb;
-#endif /* BUFFER_ISOLATION */
//TODO
@@ -204,9 +217,14 @@ extern DevErr mac_set_defaults (struct plc_drv_unit *unit);
extern DevErr mac_open (struct plc_drv_unit *unit);
extern DevErr mac_start (struct plc_drv_unit *unit);
extern DevErr mm_write (struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_len,
- int subtype, int flags, int prio, uint8_t TEI, void *skb);
+#ifdef CONFIG_PLC_PPC
+extern int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_len, int subtype, int flags,
+ int prio, uint8_t TEI, void *priv, unsigned int dtei);
+#else
+extern int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_len, int subtype, int flags,
+ int prio, uint8_t TEI, void *priv);
+#endif
extern void mac_set_qsize (int prio, int size);
extern void mac_print_header (struct mac_header *header);
extern void mac_start_tmo_token (struct plc_drv_unit *unit);
@@ -281,6 +299,13 @@ extern int default_ogain;
#define TX_COORD_REQUEST 1
#define RX_COORD_REQUEST 2
+#ifdef CONFIG_PLC_CABLE
+#define BEACON_CHANNEL_ID PLCP_CID_ROBUST_BPSK
+#else
+// BUG: corrupted beacon payloads with chunk mode. see crc16 bits
+#define BEACON_CHANNEL_ID PLCP_CID_CBPSK
+#endif
+
EXTERN_OS_PROCESS (tx_coordination);
EXTERN_OS_PROCESS (ce_process);
EXTERN_OS_PROCESS (network_discovery);
@@ -416,11 +441,7 @@ extern void mac_register_perf (uint8_t DA, uint16_t in_date, uint16_t dlen, uint
#define mac_register_perf(DA, in_date, dlen, retries) do; while(0)
#endif
-#ifdef DISPLAY_STATS
#define csma_stats(x) x
-#else
-#define csma_stats(x)
-#endif
// proc fs for Linux
extern int proc_r_mac_log (char *buf, char **start, off_t offset, int count, int *eof, void *data);
@@ -455,6 +476,11 @@ extern int proc_r_mac_samples (char *buf, char **start, off_t offset, int count,
extern int is_multicast_mac (char *addr);
extern int is_flooding_multicast (char *addr);
+#ifdef CONFIG_IPV6
+extern int is_multicast_mac_ipv6 (char *addr);
+extern int is_multicast_mac_ipv6_ok (char *addr);
+#endif
+
#ifdef CONFIG_PLC_MCAST
// this is an entry added when plc_add_mcast_member is called
struct mc_link {
diff --git a/app/sm-plc-drv/inc/plc_nd.h b/app/sm-plc-drv/inc/plc_nd.h
index 6128b438fe..13f3f5b5cf 100644
--- a/app/sm-plc-drv/inc/plc_nd.h
+++ b/app/sm-plc-drv/inc/plc_nd.h
@@ -54,4 +54,8 @@ extern int mlme_probe (struct probe_req_t *probe_req, struct probe_cfn_t *probe_
extern int mlme_assoc (struct assoc_req_t *assoc_req, struct assoc_cfn_t *assoc_cfn);
extern int mlme_disassoc (struct disassoc_req_t *disassoc_req, struct disassoc_cfn_t *disassoc_cfn);
+#ifdef PLC_RECOVERY
+extern int mlme_start_recovery (struct recovery_t *recovery_req);
+#endif
+
#endif
diff --git a/app/sm-plc-drv/inc/plc_plcp.h b/app/sm-plc-drv/inc/plc_plcp.h
index e7e265a987..2f1a81c3c2 100644
--- a/app/sm-plc-drv/inc/plc_plcp.h
+++ b/app/sm-plc-drv/inc/plc_plcp.h
@@ -23,6 +23,7 @@
#include "ose.h"
#include "plc_common.h"
#include "mib.h"
+#include "plc_ioctl.h"
#ifdef CONFIG_PLC_PPC
#include "plc_ppc.h"
@@ -346,6 +347,11 @@ extern struct plcp_callbacks *plcp_callbacks_fn;
#define PLCP_MAX_CHANNEL_ID (PLCP_MAX_HOST*4)
#define PLCP_MAX_UCHANNEL (PLCP_MAX_HOST*5)
#define PLCP_NB_GLOBAL_TMI 50
+#define PLCP_NB_LOCAL_TMI (PLCP_MAX_CHANNEL_ID-PLCP_NB_GLOBAL_TMI)
+
+/* TMI reservations */
+#define is_local_tmi(tmi) ((tmi >= PLCP_NB_GLOBAL_TMI) && (tmi <= PLCP_MAX_CHANNEL_ID-1))
+#define is_global_tmi(tmi) ((tmi >= 0) && (tmi <= PLCP_NB_GLOBAL_TMI-1))
#define PLCP_DEFAULT_OGAIN 800
#define PLCP_DEFAULT_CHANNEL_ID 0
@@ -444,18 +450,20 @@ struct host_info {
int tot_valid[PLC_MOD_MAX + 1][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
int tot_invalid[PLC_MOD_MAX + 1][PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
#endif
-#ifdef RAFALE_WITH_NR
// during sound step: average NR for one group in a particular band
uint16_t bpsk_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
uint16_t qam16_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
int bpsk_num;
int qam16_num;
-#endif
// last amplitude calculated on POWER_REQUEST frame
+#ifdef INCLUDE_HOST_MEMO
double spectrum[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
double __all_spectrum[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
+#endif
uint16_t fft_mult[PMD_MAX_BANDS];
- double spectrum_inv[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND]; /**TT**/
+#ifdef INCLUDE_HOST_MEMO
+ double spectrum_inv[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND]; /**TT**/
+#endif
int16_t __safe_real[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
int16_t __safe_imag[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
int agc_data1;
@@ -485,15 +493,16 @@ struct plcp_host {
int att; /* average attenuation of the link */
double glomer; /* average noise on the link */
-#ifdef CONFIG_PLC_8021X
int authenticated; /* indicates if the station is authenticated or not */
-#endif // CONFIG_PLC_8021X
#ifdef CONFIG_PLC_CRYPTO
uint32_t pexpk[32];
uint8_t pek[8];
#endif // CONFIG_PLC_CRYPTO
+#ifdef PLC_RECOVERY
+ uint8_t in_recovery;
+#endif
/*--------------------- transmission parameters -------------------------- */
uint16_t id; /* remote tone map index of the current frame in transmit */
uint16_t data_gain; /* gain de transmit */
@@ -542,7 +551,7 @@ struct plcp_host {
struct host_info *info;
bool clean_table; // clean sound synthesis
uint8_t next_band;
- short msdu_queued; // number of msdu queued for thios host
+ short msdu_queued; // number of msdu queued for this host
/*-----------------------tested channel------------------------------------ */
struct plcp_uchannel *test_uchannel; // channel used for testing
@@ -558,6 +567,7 @@ struct plcp_host {
/*------------------------ ce internal -------------------------------------*/
CANCEL_INFO tx_timer;
CANCEL_INFO rx_timer;
+ CANCEL_INFO ce_timer;
uint8_t step; /* current step */
uint8_t seqno; /* current seqno */
uint8_t data_seqno; /* seqno for traffic */
@@ -567,6 +577,8 @@ struct plcp_host {
uint8_t nb_quick_pass_of_ce;
int ce_state;
int no_response;
+ int ce_nsuccess;
+ int ce_ns_retry;
PROCESS sender;
bool need_sync;
bool pollable; // true if the sta is pollable
@@ -627,6 +639,7 @@ struct plcp_host {
/*------------------------------ host internal--------------------------- */
int index; // index of the struct in the pool
+ u8 mac_adress_recorded;
/* transmit queue */
struct list_head tx_queue[PLCP_NB_PRIO];
@@ -634,10 +647,7 @@ struct plcp_host {
/* pending mac_frames */
struct list_head mac_tx_queue[MAC_NB_PRIO];
int mac_queued[MAC_NB_PRIO];
-
-#ifdef BUFFER_ISOLATION
int xmit_active;
-#endif
/*------------------------------ sar internal--------------------------- */
OSTICK last_remote_renew;
@@ -739,6 +749,19 @@ extern struct plcp_uchannel uchannels_pool[PLCP_MAX_UCHANNEL]; // uchannel struc
extern struct plcp_uchannel *channels[PLCP_MAX_CHANNEL_ID]; // channels_id association
extern bool id_pool[PLCP_MAX_CHANNEL_ID]; // id pool
+/* retrieve the host by TEI */
+static inline struct plcp_host *plcp_get_host_by_TEI (uint8_t TEI)
+{
+ int index;
+
+ for (index = 0; index < PLCP_MAX_HOST; index++)
+ if (likely (hosts_pool[index].used && hosts_pool[index].init))
+ if (hosts_pool[index].TEI == TEI)
+ return &hosts_pool[index];
+
+ return NULL;
+}
+
/* retrieve the host by this position in the list */
static inline struct plcp_host *plcp_get_host_by_index (int index)
{
@@ -899,7 +922,7 @@ extern int plcp_setAdapts (struct system_carrier_tab *systemCarrierTab);
extern int plcp_getNotchs (struct system_carrier_tab *systemCarrierTab);
extern int plcp_setNotchs (struct system_carrier_tab *systemCarrierTab);
extern int plcp_setAck (bool mode);
-extern int plcp_ce_host (int hostNb, struct plc_host *plcHost);
+extern int plcp_ce_host (int hostNb, struct plc_host *plcHost, bool spectrum_analyse);
#else
extern int plcp_setPilots (struct system_carrier_tab *systemCarrierTab);
extern int plcp_getPilots (struct system_carrier_tab *systemCarrierTab);
@@ -913,4 +936,5 @@ extern int plcp_band_bit_rate (struct pmd_band_quality *q, int band, struct pmd_
extern int plcp_overhead (struct plc_drv_unit *unit);
extern void plcp_dump_host (struct plcp_host *host);
+extern uint8_t is_host_empty(struct plcp_host * host);
#endif /* PLCP_H */
diff --git a/app/sm-plc-drv/inc/plc_ppc.h b/app/sm-plc-drv/inc/plc_ppc.h
index d311ca39ea..920c2398f9 100644
--- a/app/sm-plc-drv/inc/plc_ppc.h
+++ b/app/sm-plc-drv/inc/plc_ppc.h
@@ -34,7 +34,8 @@ struct stat_mac {
int tx_rcm; /* Number of successfully sent RCM packets. */
int nb_retries; /* Number of retransmitions of successfully sent packets. */
int tx_data_failed; /* Number of unsuccessfully sent data packets. */
- int tx_mng_failed; /* Numeber of unsuccessfully sent managment packets. */
+ int tx_mng_failed; /* Number of unsuccessfully sent managment packets. */
+ int tx_rcm_failed; /* Number of unsuccessfully sent RCM packets. */
int tx_ack; /* Number of sent acknowledgments packet. */
int tx_nack; /* Number of sent not_acknowledgments packet. */
int tx_sack; /* Number of sent selective_acknowledgments packet. */
@@ -67,11 +68,11 @@ struct l1_client_ops {
*/
struct l2_client_ops {
int (*l2_carp_resolve) (struct sk_buff * skb, tei_t * dtei);
- int (*l2_carp_update) (mac_t hw_addr, tei_t * stei);
- int (*l2_route_next_hop) (tei_t dtei, nid_t nid, tei_t * hop_dtei, int len);
- int (*l2_sched_packet_fail) (tei_t dtei, nid_t nid, tei_t hop_dtei, int len);
- int (*l2_sched_packet_succeed) (tei_t dtei, nid_t nid, tei_t hop_dtei, int len);
- int (*l2_sched_next_host) (tei_t * tei, nid_t * nid);
+ int (*l2_carp_update) (struct sk_buff * skb, tei_t * stei);
+ int (*l2_route_next_hop) (tei_t dtei, tei_t * hop_dtei, int len);
+ int (*l2_sched_packet_fail) (tei_t dtei, tei_t hop_dtei, int len);
+ int (*l2_sched_packet_succeed) (tei_t dtei, tei_t hop_dtei, int len, __u8 tries_count);
+ int (*l2_sched_next_host) (tei_t * tei);
int (*l2_host_create) (struct l2_host * host);
int (*l2_host_update) (struct l2_host * host);
int (*l2_host_delete) (struct l2_host * host);
@@ -118,7 +119,7 @@ int l2_client_register (struct l2_client_ops *client_ops, struct l2_ops **ops);
extern struct l2_client_ops *l2_ppc;
extern struct l1_client_ops *l1_ppc;
-#ifdef DEBUG
+#ifdef CONFIG_PLC_DEBUG
#define PPC_PRINTK printk
#define PPC_RT_PRINTK rt_printk
#else
@@ -126,6 +127,7 @@ extern struct l1_client_ops *l1_ppc;
#define PPC_RT_PRINTK(...)
#endif
+#define PPC_RETRY_LIMIT 9
// >>>>> l1_proto_xmit & l1_proto_recv implementation
#define PEPSI_R2L_IRQ TEST_IRQ
#define PPC_L1_HDR_LEN 12
@@ -135,6 +137,7 @@ extern struct l1_client_ops *l1_ppc;
#define INVALID_SLOT SAVE_BUFFER_LEN
extern SEMAPHORE *ppc_r2l_lock;
+extern SEMAPHORE *ppc_r2l_host_lock;
struct ppc_l1_packet {
char header[PPC_L1_HDR_LEN];
@@ -143,9 +146,11 @@ struct ppc_l1_packet {
extern struct ppc_l1_packet ppc_l1_packet_buff[];
-enum ppc_r2l_req { PPCR2LREQ_PROTO_RECV, PPCR2LREQ_CONFLICT };
+enum ppc_r2l_req_t { PPCR2LREQ_PROTO_RECV, PPCR2LREQ_CONFLICT, PPCR2LREQ_TST, PPCR2LREQ_HOST_CREATE,
+ PPCR2LREQ_HOST_DELETE, PPCR2LREQ_HOST_UPDATE
+};
-void ppc_r2l_pend (enum ppc_r2l_req, void *arg); // RTAI to linux main dispatcher
+void ppc_r2l_pend (enum ppc_r2l_req_t, void *arg); // RTAI to linux main dispatcher
void ppc_l1_reset_packet_buff (void);
struct ppc_l1_packet *ppc_l1_get_first_packet (void); // initialize l1 packet iterator
@@ -168,15 +173,16 @@ void dump_pepsi_frame_payload (struct plcp_frame *pframe);
void fill_pepsi_ctrl_as_custom (union plcp_control *control);
void fill_pepsi_ctrl_as_mng (union plcp_control *control);
+void dump_skb (unsigned char *ad);
extern volatile int pepsi_hlp_int;
+extern int ppc_update_all_route;
#define SHARED_IRQ_PPC 1
#define SHARED_IRQ_TEST 2
extern struct work_struct ppc_work;
extern char *foostr;
void ppc_work_func (void *);
-
-// <<<<< l1_proto_xmit & l1_proto_recv implementation
-
+extern struct l2_host *ppc_host;
+extern enum ppc_r2l_req_t ppc_r2l_req;
#endif
diff --git a/app/sm-plc-drv/inc/plc_sysctl.h b/app/sm-plc-drv/inc/plc_sysctl.h
index 246749d874..6300445fe6 100644
--- a/app/sm-plc-drv/inc/plc_sysctl.h
+++ b/app/sm-plc-drv/inc/plc_sysctl.h
@@ -1,5 +1,3 @@
-#ifndef _PLC_SYSCTL_H_
-#define _PLC_SYSCTL_H_
/* ---------------------------------------------------------------------------------
* OBJECT : PLC linux system control interface
*
@@ -7,14 +5,19 @@
* ---------------------------------------------------------------------------------
* DATE | AUTHOR | COMMENT
* ---------------------------------------------------------------------------------
- * 2007-08-14 | T.C | Merge dev-3-9-5 branch into branch-3-9 :
- * | | - Add config parameter :
- * | | * net.plc.config_medium
- * | | * net.sar.dynasar.level
- * | | * net.sar.dynasar.delta
+ * 2007-08-14 | T.C | Merge dev-3-9-5 branch into branch-3-9 :
+ * | | - Add config parameter :
+ * | | * net.plc.config_medium
+ * | | * net.sar.dynasar.level
+ * | | * net.sar.dynasar.delta
* ---------------------------------------------------------------------------------
- * 2007-08-27 | T.C | Add new sysctl PLCCE_CONFIG (net.plc.ce.config).
+ * 2007-08-27 | T.C | Add new sysctl PLCCE_CONFIG (net.plc.ce.config).
+ * ---------------------------------------------------------------------------------
+ * 2007-12-11 | T.C | Restore some error from merge. Bugzilla #103
* --------------------------------------------------------------------------------- */
+#ifndef _PLC_SYSCTL_H_
+#define _PLC_SYSCTL_H_
+
#ifdef __KERNEL__
#include <linux/sysctl.h> // for CTL_KERN,... symbolic names
@@ -25,6 +28,10 @@ enum {
NET_IGMP_FILTER
};
+enum {
+ CARP_GLOBAL_LIMITATION_PER_HOST = 1
+};
+
#ifdef CONFIG_PLC_MCAST
/* items in igmp directory */
enum {
@@ -101,7 +108,6 @@ enum {
PLC_WANA_GAIN,
PLC_CONTROL_POWER,
PLC_SNID,
- /* 3.8 features */
PLC_CORR,
PLC_DET,
PLC_SYNC,
@@ -112,13 +118,22 @@ enum {
PLC_BER_CONTROL,
PLC_REED_SOLOMON,
PLC_NEW_SCRAMBLER,
- /* 3.9 additions */
PLC_AGC_CAL,
PLC_MEDIUM,
+ PLC_STAT_RX_CTRL,
+ PLC_8021X_AUTH,
+ NET_CARP,
+#ifdef CONFIG_PLC_RTSCTS
+ PLC_RTS_THRESHOLD,
+ PLC_NAV_OFFSET,
+ PLC_MAX_RTS_RETRANS
+#endif
#ifdef CONFIG_PLC_PPC
- PLC_TEINID
+ PLC_PPC_TEST_1,
+ PLC_TEINID,
+ PLC_PPC_LR
#endif
- // Always insert on the end list.
+// Always insert on the end list.
};
/* items in plcp directory */
@@ -292,7 +307,6 @@ enum {
/* items in crypto directory */
enum {
-
PLCCRYPTO_NEK = 1,
PLCCRYPTO_CONTROL_ENABLE,
PLCCONFIG_PLC_CRYPTO_ENABLE
@@ -335,7 +349,6 @@ enum {
/* items in hamming directory */
enum {
-
PLCHAMMING_ENABLE = 1,
PLCHAMMING_ALL_HAMMING,
PLCHAMMING_ENTROPY
@@ -343,11 +356,17 @@ enum {
/* items in entropy directory */
enum {
-
PLCENTROPY_ENABLE = 1,
PLCENTROPY_LIMIT
};
+/* items in stat_rx_ctrl directory */
+enum {
+ STAT_RX_ENABLE = 1,
+ STAT_RX_FAST,
+ STAT_RX_BAND_VOTES
+};
+
#ifdef CONFIG_PLAB
#define CTL_LED (80)
#endif /* CONFIG_PLAB */
diff --git a/app/sm-plc-drv/inc/ppc_tst.h b/app/sm-plc-drv/inc/ppc_tst.h
index 49daab0a0d..26de0eedc8 100644
--- a/app/sm-plc-drv/inc/ppc_tst.h
+++ b/app/sm-plc-drv/inc/ppc_tst.h
@@ -2,5 +2,5 @@
#define HDR_PPC_TST
int tst_fun (void *arg);
-
+void tst_fun_ppc_mj (char *msg);
#endif
diff --git a/app/sm-plc-drv/inc/test_core.h b/app/sm-plc-drv/inc/test_core.h
index 18919be7e4..6e3d7a04fd 100755
--- a/app/sm-plc-drv/inc/test_core.h
+++ b/app/sm-plc-drv/inc/test_core.h
@@ -32,7 +32,6 @@ struct control_usr {
uint32_t STEI:8; // source terminal equipement identifier
uint32_t DTEI:8; // destination terminal equipement identifier
uint32_t channel_id:8; // tone map index
-
uint32_t flags:5; // mac frame flags
uint32_t bssid:3; // short network id
uint32_t seqno:8; // mac frame sequence number
@@ -50,7 +49,6 @@ struct testusr {
uint16_t payloadLen;
uint8_t pattern;
-
uint8_t host_id;
uint16_t data_gain;
uint16_t ctrl_gain;
diff --git a/app/sm-plc-drv/plc_drv_if.h b/app/sm-plc-drv/plc_drv_if.h
index b4e4be06eb..6965cbaf09 100644
--- a/app/sm-plc-drv/plc_drv_if.h
+++ b/app/sm-plc-drv/plc_drv_if.h
@@ -13,7 +13,6 @@
#endif
-
#define PLC_DEVICE_TAGC_TYPE 0x4100
/*
@@ -95,6 +94,18 @@ struct pass_host {
int hostNb;
struct plc_host plcHost;
};
+
+struct user_host {
+ int iocmd;
+ int index;
+ unsigned char macAddress[6];
+ struct plc_host plcHost;
+};
+
+#define IOCHOSTCMD_NONE 0
+#define IOCHOSTCMD_GET 1
+#define IOCHOSTCMD_GETLIGHT 2
+#define IOCHOSTCMD_GETIDBYMAC 3
#endif
#endif /* PLC_DRV_IF_H */
diff --git a/app/sm-plc-drv/plc_ioctl.h b/app/sm-plc-drv/plc_ioctl.h
index 13a2320850..905751e6d7 100644
--- a/app/sm-plc-drv/plc_ioctl.h
+++ b/app/sm-plc-drv/plc_ioctl.h
@@ -9,6 +9,8 @@
#ifndef __PLC_IOCTL__
#define __PLC_IOCTL__
+#include "../sm-mib/mib-interface.h"
+
#define SIOCPLCBOX (SIOCDEVPRIVATE + 10)
#define SIOCTEST (SIOCDEVPRIVATE + 11)
@@ -21,9 +23,9 @@
#define SIOCGAGCANALYSER (SIOCDEVPRIVATE + 15)
//PR51 END:
-#ifdef CONFIG_PLC_PPC
-#define SIOCPEPSI (SIOCDEVPRIVATE + 16)
-#endif
+//#ifdef CONFIG_PLC_PPC
+//#define SIOCPEPSI (SIOCDEVPRIVATE + 16)
+//#endif
// plcbox ioctl is divided into subcommands
#define IOCCMD_UTMO 1
@@ -45,6 +47,12 @@
#define IOCCMD_HOST_SET_PEXPK_BY_ADDR 17
#define IOCCMD_ADAPTS_DEL_HOST 18
+//#define PLC_RECOVERY // Define to build recovery option
+#ifdef PLC_RECOVERY
+#define IOCCMD_WRITE_RECOVERY 19
+#define IOCCMD_NEED_RECOVERY 20
+#define IOCCMD_START_RECOVERY 21
+#endif
struct device_stats_t {
unsigned long rx_packets; /* total packets received */
@@ -217,6 +225,16 @@ struct plc_mcast_member {
#endif
+#ifdef PLC_RECOVERY
+struct recovery_t {
+ int iocmd;
+ int nb_sent;
+ char mac_addr[PLCP_MAX_HOST - 1][6]; // mac addresses of all attached hosts
+ char recovery_flag;
+ char nb_hosts; // number of attached hosts
+};
+#endif
+
struct stats_t {
struct device_stats_t netstats;
struct packet_stats_t packetstats;
@@ -243,6 +261,9 @@ union plcbox_t {
struct host_set_auth_by_addr_t host_set_auth_by_addr;
struct host_set_pek_by_addr_t host_set_pek_by_addr;
struct host_set_pexpk_by_addr_t host_set_pexpk_by_addr;
+#ifdef PLC_RECOVERY
+ struct recovery_t recovery;
+#endif
};
extern int send_ioctl (union plcbox_t *plcbox);
diff --git a/app/sm-plc-drv/src/ce_core.c b/app/sm-plc-drv/src/ce_core.c
index 1aa465fffa..98de1ff781 100644
--- a/app/sm-plc-drv/src/ce_core.c
+++ b/app/sm-plc-drv/src/ce_core.c
@@ -42,10 +42,13 @@
#include "plc_nd.h"
#include "plc_neighbour.h"
#include "linux/crc-ccitt.h"
+#include "linux_drv.h"
+
#include "utmo_if.h"
extern int plcp_get_first_band (int bands);
extern void wd_trigger (void);
+extern void empty_plcp_host (struct plcp_host *host, int status);
/*********************************************************************************
*
@@ -78,6 +81,9 @@ extern void wd_trigger (void);
// How many times we execute a complete CE at INIT state.
#define NB_QUICK_CE_ON_STARTING 1
+#ifdef CONFIG_PLC_MCAST
+extern int igmp_query_enable;
+#endif
#define kAmpMax 5120
#define BER_TABLE_SIZE PMD_GROUPS_PER_BAND*PMD_MAX_BANDS*4
@@ -216,6 +222,11 @@ static uint8_t subtype_request[CE_NB_STEPS] =
[CE_STEP_KEEPALIVE] = MA_SUBTYPE_KEEPALIVE_REQUEST,
};
+/*
+ a lookup to select the reply subtype using request subtype.
+CAREFUL: the subtype must stay compatible
+*/
+
static uint8_t subtype_reply[MA_SUBTYPE_MAX] =
{
[MA_SUBTYPE_POWER_REQUEST] = MA_SUBTYPE_POWER_REPLY,
@@ -278,10 +289,6 @@ union indication {
static union indication list_indicate[CE_MAX_INDICATION];
-#ifdef STATIC_MESURE_ALLOCATION
-static struct host_info info_pool[PLCP_MAX_HOST]; // host_info structs
-#endif
-
// PREEQUALIZATION
double __sp_min = 0.12; // ignore values if sp is less than __sp_min during sp_quad calc
double __target_pow = 0; // targetted receive power. 0 means get the quad moy of the spectrum
@@ -377,7 +384,6 @@ uint16_t ce_levels[6] = {
9 /* QAM256 */
};
-#ifdef CE_ITERATIF
uint16_t ce_gaps[6] = {
0, /* none */
2, /* BPSK */
@@ -395,7 +401,6 @@ int ce_len[6] = {
15, /* QAM64 */
15 /* QAM256 */
};
-#endif
#ifdef CONFIG_PLC_MCAST
/* noise concentrated levels [for step 0] */
@@ -446,16 +451,22 @@ uint16_t fec_mcast_limit[] = {
double step_power[MAX_AFE][9] = {
- 8368901, 23246948, 23246948, 23246948, 23246948, 63277027, 220485286, 220485286, 220485286,
- 42000000, 170000000, 240000000, 240000000, 430000000, 680000000, 970000000, 1240000000, 1240000000,
- 800000000, 800000000, 3000000000ll, 9000000000ll, 12900000000ll, 20200000000ll, 39500000000ll, 51600000000ll,
+ 8368901, 23246948, 23246948, 23246948, 23246948, 63277027, 220485286,
+ 220485286, 220485286,
+ 42000000, 170000000, 240000000, 240000000, 430000000, 680000000,
+ 970000000, 1240000000, 1240000000,
+ 800000000, 800000000, 3000000000ll, 9000000000ll, 12900000000ll,
+ 20200000000ll, 39500000000ll, 51600000000ll,
142400000000ll,
- 46000000ll, 374000000ll, 913000000ll, 1430000000ll, 2050000000ll, 2800000000ll, 3650000000ll, 4620000000ll,
+ 46000000ll, 374000000ll, 913000000ll, 1430000000ll, 2050000000ll,
+ 2800000000ll, 3650000000ll, 4620000000ll,
5700000000ll,
/* NS/DR added 4/4/2006 for sava_30v and sava_mb */
- 800000000, 800000000, 3000000000ll, 9000000000ll, 12900000000ll, 20200000000ll, 39500000000ll, 51600000000ll,
+ 800000000, 800000000, 3000000000ll, 9000000000ll, 12900000000ll,
+ 20200000000ll, 39500000000ll, 51600000000ll,
142400000000ll,
- 42000000, 170000000, 240000000, 240000000, 430000000, 680000000, 970000000, 1240000000, 1240000000,
+ 42000000, 170000000, 240000000, 240000000, 430000000, 680000000,
+ 970000000, 1240000000, 1240000000,
};
double max_power = 13600000000ll;
@@ -473,7 +484,6 @@ static int __ber_invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
// NR retreived uppon rx_end interrupt for SOUND_REQUEST
static uint16_t __log_noise[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-#ifdef CE_ITERATIF
struct noise_t {
int band;
int group;
@@ -484,7 +494,7 @@ struct noise_t {
};
struct noise_t noiseDistance[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-#endif
+
// number of slots used for the last received sound frame
int nb_bpsk_slots = 27;
int nb_qam16_slots = 15;
@@ -618,7 +628,8 @@ uint32_t ce_delay (int duration)
*
*********************************************************************************/
-static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *ChannelTmo);
+static void ce_event_timeout (struct plc_drv_unit *unit,
+ struct ChannelTmo *ChannelTmo);
static void ce_destroy_timeout (struct ChannelTmo *ChannelTmo);
static struct ChannelTmo *ce_cancel_timeout (CANCEL_INFO * cancel_info);
@@ -640,7 +651,8 @@ void dump_qual (struct pmd_band_quality qual[PMD_MAX_BANDS])
}
#ifdef DEBUG_CE_INTERATIF
-void display_list (struct noise_t noiseDistanceDisp[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
+void display_list (struct noise_t
+ noiseDistanceDisp[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
{
int i, j, n = 0;
struct noise_t *nd1, *nd2, *nd3, *nd4;
@@ -696,7 +708,8 @@ void display_list (struct noise_t noiseDistanceDisp[PMD_MAX_BANDS][PMD_GROUPS_PE
}
#endif
-static void ce_apply_default_uchannel (struct plc_drv_unit *unit, struct plcp_host *host)
+static void ce_apply_default_uchannel (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
// new channel to register
struct plcp_uchannel *uchannel;
@@ -709,7 +722,9 @@ static void ce_apply_default_uchannel (struct plc_drv_unit *unit, struct plcp_ho
ASSERT (uchannel);
mtu = plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots);
- host->uchannel = (host->uchannel == host->uchannel1) ? host->uchannel2 : host->uchannel1;
+ host->uchannel =
+ (host->uchannel ==
+ host->uchannel1) ? host->uchannel2 : host->uchannel1;
plcp_copy_channel (host->uchannel, uchannel);
if (mtu > unit->ce.max_mtu)
{
@@ -731,8 +746,10 @@ static void ce_apply_default_uchannel (struct plc_drv_unit *unit, struct plcp_ho
* -----------------------------------------------------------------------
* @RETURN : none
* ----------------------------------------------------------------------- */
-static void ce_apply_uchannel (struct plc_drv_unit *unit, struct plcp_host *host)
+static void ce_apply_uchannel (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
+ // new channel to register
int mtu;
int slices;
int bps;
@@ -774,12 +791,15 @@ static void ce_apply_uchannel (struct plc_drv_unit *unit, struct plcp_host *host
}
// Permute channel 1 and channel 2
- host->uchannel = (host->uchannel == host->uchannel1) ? host->uchannel2 : host->uchannel1;
+ host->uchannel =
+ (host->uchannel ==
+ host->uchannel1) ? host->uchannel2 : host->uchannel1;
plcp_copy_channel (host->uchannel, host->test_uchannel);
// now copy the uchannel regardless of the mtu, cause use of chunk or
// rbpsk is automatically done in mac. ce.min_mtu become obsolete.
- mtu = plcp_get_max_data_len (unit, host->test_uchannel, unit->ce.max_slots);
+ mtu =
+ plcp_get_max_data_len (unit, host->test_uchannel, unit->ce.max_slots);
if (mtu > unit->ce.max_mtu)
{
mtu = unit->ce.max_mtu;
@@ -790,9 +810,11 @@ static void ce_apply_uchannel (struct plc_drv_unit *unit, struct plcp_host *host
host->max_slots = host->uchannel->lookup.payload_slots[slices];
host->id = host->test_id;
- if (unit->ce.steps[CE_STEP_UNUSED] && unit->plcp.config.fmode == PLCP_FMODE_SCAP)
+ if (unit->ce.steps[CE_STEP_UNUSED] &&
+ unit->plcp.config.fmode == PLCP_FMODE_SCAP)
{
- host->data_gain = unit->ce.unused_data_gain[host->uchannel->nb_used_bands];
+ host->data_gain =
+ unit->ce.unused_data_gain[host->uchannel->nb_used_bands];
}
else
{
@@ -803,7 +825,9 @@ static void ce_apply_uchannel (struct plc_drv_unit *unit, struct plcp_host *host
}
/* charge quality into header */
-static void ce_save_quality (struct plc_drv_unit *unit, struct pmd_band_quality to[], struct pmd_band_quality from[])
+static void ce_save_quality (struct plc_drv_unit *unit,
+ struct pmd_band_quality to[],
+ struct pmd_band_quality from[])
{
int band;
@@ -819,7 +843,9 @@ static void ce_save_quality (struct plc_drv_unit *unit, struct pmd_band_quality
* -----------------------------------------------------------------------
* @RETURN : none
* ----------------------------------------------------------------------- */
-static void ce_load_quality (struct plc_drv_unit *unit, struct pmd_band_quality to[], struct pmd_band_quality from[])
+static void ce_load_quality (struct plc_drv_unit *unit,
+ struct pmd_band_quality to[],
+ struct pmd_band_quality from[])
{
int band;
@@ -852,7 +878,8 @@ uint32_t date_offset (uint32_t origine)
* -----------------------------------------------------------------------
* @RETURN : none
* ----------------------------------------------------------------------- */
-static bool ce_check_band_integrity (struct pmd_band_quality *quality, int band_no)
+static bool ce_check_band_integrity (struct pmd_band_quality *quality,
+ int band_no)
{
int group, mod;
uint8_t notchs;
@@ -861,7 +888,7 @@ static bool ce_check_band_integrity (struct pmd_band_quality *quality, int band_
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
mod = plcp_get_group_modulation (quality, group);
- /* v�rifier si le groupe contient que des notch */
+ /* vérifier si le groupe contient que des notch */
notchs = CM_GROUP (band_no, group, &notches[NOTCHES_DEFAULT]);
if (notchs != 0xff)
{
@@ -878,7 +905,9 @@ static bool ce_check_band_integrity (struct pmd_band_quality *quality, int band_
struct pmd_band_quality ce_quality[PMD_MAX_BANDS];
/* check integrity of the quality */
-static bool ce_check_integrity (struct plc_drv_unit *unit, struct pmd_band_quality qual[PMD_MAX_BANDS] /*output */ )
+static bool ce_check_integrity (struct plc_drv_unit *unit,
+ struct pmd_band_quality qual[PMD_MAX_BANDS]
+ /*output */ )
{
bool ok = true;
int band;
@@ -889,7 +918,8 @@ static bool ce_check_integrity (struct plc_drv_unit *unit, struct pmd_band_quali
{
unit->stats.ce.corrupted_qual++;
ok = false;
- memcpy (ce_quality, qual, sizeof (struct pmd_band_quality) * PMD_MAX_BANDS);
+ memcpy (ce_quality, qual,
+ sizeof (struct pmd_band_quality) * PMD_MAX_BANDS);
break;
}
}
@@ -935,12 +965,14 @@ int ce_stop_hosts (struct plc_drv_unit *unit)
}
// To be called by CE process only
-static int ce_real_stop_host (struct plc_drv_unit *unit, struct plcp_host *host)
+static int ce_real_stop_host (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
struct ChannelTmo *ChannelTmo;
int status;
- if (host->ce_state == CE_STATE_IDLE || host->ce_state == CE_STATE_STOPPING)
+ if (host->ce_state == CE_STATE_IDLE ||
+ host->ce_state == CE_STATE_STOPPING)
{
status = CE_STATUS_ALREADY_STOPPED;
}
@@ -970,6 +1002,15 @@ static int ce_real_stop_host (struct plc_drv_unit *unit, struct plcp_host *host)
return status;
}
+void ce_destroy_pro (struct plcp_host *host)
+{
+ struct ChannelTmo *ChannelTmo;
+
+ ChannelTmo = ce_cancel_timeout (&host->ce_timer);
+ if (ChannelTmo)
+ ce_destroy_timeout (ChannelTmo);
+}
+
/*********************************************************************************
*
* analyse mesures
@@ -1071,7 +1112,8 @@ double ce_get_power (struct plc_drv_unit *unit, double *signal)
#ifndef CONFIG_VERSION_16M
/* get signal noise mesures */
-void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual, uint16_t agc_gain)
+void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual,
+ uint16_t agc_gain)
{
int band;
int phlic_state;
@@ -1122,8 +1164,10 @@ void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual, uint16_t agc
#ifdef CONFIG_PLC_DEBUG
if (band >= 28000)
{
- printk ("Oups. pmd_state before was %02x, pmd_rx_start=%02x, pmd_state is %02x\n", phlic_state,
- (uint16_t *) & unit->PMD->rx_start, pmd_get_nextstate ());
+ printk
+ ("Oups. pmd_state before was %02x, pmd_rx_start=%02x, pmd_state is %02x\n",
+ phlic_state, (uint16_t *) & unit->PMD->rx_start,
+ pmd_get_nextstate ());
}
#endif
@@ -1156,16 +1200,16 @@ void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual, uint16_t agc
/* wait for measure */
rt_busy_sleep (10 * 1000 * 1000);
- /* r�cup�ration des fft mult */
+ /* récupération des fft mult */
for (band = 1; band < PMD_MAX_BANDS; band++)
{
/* lecture du facteur de mult de la FFT */
__log_fft[sample][band] = pmd_get_fft_gain (band);
}
- /* r�cup�ration du bruit */
+ /* récupération du bruit */
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- /* lecture des parties r�elles */
+ /* lecture des parties réelles */
memcpy16 (&__safe_real[band][0], pmd_get_safe_real (band), 256);
/* lecture des parties imaginaires */
@@ -1181,10 +1225,10 @@ void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual, uint16_t agc
/* enable RX */
unit->PMD->rx_start = 1; /* because phlic is at idle, rx_start to 1 validate nb_bands */
- /* r�cup�ration du gain agc */
+ /* récupération du gain agc */
__log_agc[sample] = pmd_get_agc_gain ();
- /* r�cup�ration de l'heure */
+ /* récupération de l'heure */
__log_date_off[sample] = date_offset (unit->ce.origine);
/* automatic AGC */
@@ -1203,8 +1247,9 @@ void ce_get_sn (struct plc_drv_unit *unit, int sample, bool manual, uint16_t agc
/* get a mask of unused bands of a uchannel */
-static uint8_t ce_get_unused_bands (struct plc_drv_unit *unit, struct pmd_band_quality qual[PMD_MAX_BANDS],
- uint8_t * res)
+static uint8_t ce_get_unused_bands (struct plc_drv_unit *unit,
+ struct pmd_band_quality
+ qual[PMD_MAX_BANDS], uint8_t * res)
{
int band, bits;
uint8_t nb_used_bands = unit->nb_bands;
@@ -1219,7 +1264,9 @@ static uint8_t ce_get_unused_bands (struct plc_drv_unit *unit, struct pmd_band_q
if (band_is_used (unit, band))
{
// get the number of bits, not the number of bytes, cause under 7 bits capacity, the band is removed
- bits = plcp_band_bit_rate (&qual[band], band, &notches[NOTCHES_DEFAULT]);
+ bits =
+ plcp_band_bit_rate (&qual[band], band,
+ &notches[NOTCHES_DEFAULT]);
if (bits <= unit->ce.band_min /*in bits */ )
{
/* skip that band */
@@ -1244,7 +1291,8 @@ static int plcp_slot_bit_rate (struct pmd_band_quality qual[PMD_MAX_BANDS])
for (band = 0; band < PMD_MAX_BANDS; band++)
{
// get the number of bits, not the number of bytes, cause under 7 bits capacity, the band is removed
- bits += plcp_band_bit_rate (&qual[band], band, &notches[NOTCHES_DEFAULT]);
+ bits +=
+ plcp_band_bit_rate (&qual[band], band, &notches[NOTCHES_DEFAULT]);
}
return bits;
@@ -1252,8 +1300,11 @@ static int plcp_slot_bit_rate (struct pmd_band_quality qual[PMD_MAX_BANDS])
/* ajust quality of a channel depending of ber and source quality */
static void ce_analyse_test (struct plc_drv_unit *unit,
- struct pmd_band_quality in_qual[PMD_MAX_BANDS] /*input quality */ ,
- uint8_t unused_bands, struct pmd_band_quality out_qual[PMD_MAX_BANDS] /*output quality */ )
+ struct pmd_band_quality in_qual[PMD_MAX_BANDS]
+ /*input quality */ ,
+ uint8_t unused_bands,
+ struct pmd_band_quality out_qual[PMD_MAX_BANDS]
+ /*output quality */ )
{
int band, group;
int mod;
@@ -1280,13 +1331,16 @@ static void ce_analyse_test (struct plc_drv_unit *unit,
if (notchs == 0xff)
{
/* dont use this group */
- plcp_set_group_modulation (&out_qual[band], group, PLC_MOD_NONE);
+ plcp_set_group_modulation (&out_qual[band], group,
+ PLC_MOD_NONE);
}
else
{
/* check ber */
mod = plcp_get_group_modulation (&in_qual[band], group);
- limit = (__ber_invalid[band][group] + __ber_valid[band][group]) * fec_limit[mod];
+ limit =
+ (__ber_invalid[band][group] +
+ __ber_valid[band][group]) * fec_limit[mod];
errors = __ber_invalid[band][group] * FEC_LIMIT_TOTAL;
if (mod > 0 && (errors > limit) && !unit->ce.iteratif)
{
@@ -1300,27 +1354,31 @@ static void ce_analyse_test (struct plc_drv_unit *unit,
}
}
-#ifdef CE_ITERATIF
-
-extern void qsort (void *aa, size_t n, size_t es, int (*cmp) (const void *, const void *));
+extern void qsort (void *aa, size_t n, size_t es,
+ int (*cmp) (const void *, const void *));
/* fonction to return the worst group to decrease its modulation */
int DUp (const void *a, const void *b)
{
- return (((((struct noise_t *) a)->distance_up) < (((struct noise_t *) b)->distance_up)) ? -1 : 1);
+ return (((((struct noise_t *) a)->distance_up) <
+ (((struct noise_t *) b)->distance_up)) ? -1 : 1);
}
/* fonction to return the best group to increase its modulation */
int DDown (const void *a, const void *b)
{
- return (((((struct noise_t *) a)->distance) < (((struct noise_t *) b)->distance)) ? 1 : -1);
+ return (((((struct noise_t *) a)->distance) <
+ (((struct noise_t *) b)->distance)) ? 1 : -1);
}
static void ce_analyse_distance (struct plcp_host *host,
- struct plc_drv_unit *unit, uint16_t qam16_slots /* unused */ , uint8_t unused_bands,
- struct pmd_band_quality quality[PMD_MAX_BANDS] /*output */ )
+ struct plc_drv_unit *unit,
+ uint16_t qam16_slots /* unused */ ,
+ uint8_t unused_bands,
+ struct pmd_band_quality
+ quality[PMD_MAX_BANDS] /*output */ )
{
int band, group;
int nbGroupUp;
@@ -1337,54 +1395,69 @@ static void ce_analyse_distance (struct plcp_host *host,
}
/* sort the group to increase modulation */
- qsort (&noiseDistance[1][0], 7 * PMD_GROUPS_PER_BAND, sizeof (noiseDistance[1][0]), DUp);
+ qsort (&noiseDistance[1][0], 7 * PMD_GROUPS_PER_BAND,
+ sizeof (noiseDistance[1][0]), DUp);
/* increase the modulation of nbGroupUp */
for (band = 1; band < PMD_MAX_BANDS; band++)
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- if ((nbGroupUp > 0 && noiseDistance[band][group].distance_up < 1000) ||
+ if ((nbGroupUp > 0 &&
+ noiseDistance[band][group].distance_up < 1000) ||
(noiseDistance[band][group].distance_up < unit->ce.distMinUp))
{
/* increase modulation if band is used */
if ((1 << noiseDistance[band][group].band) & unused_bands)
continue;
nbGroupUp--;
- plcp_set_group_modulation (&quality[noiseDistance[band][group].band],
- noiseDistance[band][group].group, noiseDistance[band][group].mod + 1);
+ plcp_set_group_modulation (&quality
+ [noiseDistance[band][group].band],
+ noiseDistance[band][group].group,
+ noiseDistance[band][group].mod +
+ 1);
/*update the noiseDistance table */
- noiseDistance[band][group].mod = noiseDistance[band][group].mod + 1;
- noiseDistance[band][group].distance = noiseDistance[band][group].distance_up;
+ noiseDistance[band][group].mod =
+ noiseDistance[band][group].mod + 1;
+ noiseDistance[band][group].distance =
+ noiseDistance[band][group].distance_up;
}
}
}
/* sort the group to decrease the modulation from the new table */
- qsort (&noiseDistance[1][0], 7 * PMD_GROUPS_PER_BAND, sizeof (noiseDistance[1][0]), DDown);
+ qsort (&noiseDistance[1][0], 7 * PMD_GROUPS_PER_BAND,
+ sizeof (noiseDistance[1][0]), DDown);
for (band = 1; band < PMD_MAX_BANDS; band++)
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- if ((nbGroupDown > 0 && noiseDistance[band][group].distance > -1000) ||
+ if ((nbGroupDown > 0 &&
+ noiseDistance[band][group].distance > -1000) ||
(noiseDistance[band][group].distance > unit->ce.distMaxDown))
{
/* Decrease the modulation in iterative mode only if QAM16 mini */
/* otherwise leave unchanged */
nbGroupDown--;
/* decrease modulation */
- plcp_set_group_modulation (&quality[noiseDistance[band][group].band],
- noiseDistance[band][group].group, noiseDistance[band][group].mod - 1);
+ plcp_set_group_modulation (&quality
+ [noiseDistance[band][group].band],
+ noiseDistance[band][group].group,
+ noiseDistance[band][group].mod -
+ 1);
}
}
}
}
-#endif
/* channel estimation based on noise mesures */
static void ce_analyse_noise (struct plc_drv_unit *unit,
- uint16_t tab_bpsk[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- uint16_t tab_qam16[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- uint16_t bpsk_slots, uint16_t qam16_slots, uint8_t unused_bands,
- struct pmd_band_quality quality[PMD_MAX_BANDS] /*output */ ,
+ uint16_t
+ tab_bpsk[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+ uint16_t
+ tab_qam16[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+ uint16_t bpsk_slots, uint16_t qam16_slots,
+ uint8_t unused_bands,
+ struct pmd_band_quality quality[PMD_MAX_BANDS]
+ /*output */ ,
uint16_t * levels, int cid)
{
int band, group, noise_bpsk, noise_qam16;
@@ -1394,7 +1467,8 @@ static void ce_analyse_noise (struct plc_drv_unit *unit,
for (band = 1; band < PMD_MAX_BANDS; band++)
{
bit = 1 << band;
- if ((bit & unused_bands) || !(band_is_used (unit, band)) || (bpsk_slots == 0) || (qam16_slots == 0))
+ if ((bit & unused_bands) || !(band_is_used (unit, band)) ||
+ (bpsk_slots == 0) || (qam16_slots == 0))
{
/* disable this band because unused */
memset (&quality[band], 0, sizeof (struct pmd_band_quality));
@@ -1413,31 +1487,38 @@ static void ce_analyse_noise (struct plc_drv_unit *unit,
/* compute nb_errors on this group */
if (notchs == 0xff)
{ /* dont use this group */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_NONE);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_NONE);
}
else if (noise_bpsk > levels[1])
{ /* use NONE */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_NONE);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_NONE);
}
else if (noise_bpsk > levels[2])
{ /* use BPSK */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_BPSK);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_BPSK);
}
else if (noise_qam16 > levels[3] /*QAM16 */ )
{ /* use QPSK */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_QPSK);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_QPSK);
}
else if (noise_qam16 > levels[4] /*QAM64 */ )
{ /* use QAM16 */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_QAM16);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_QAM16);
}
else if (noise_qam16 > levels[5] /*QAM256 */ )
{ /* use QAM64 */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_QAM64);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_QAM64);
}
else
{ /* use QAM256 */
- plcp_set_group_modulation (&quality[band], group, PLC_MOD_QAM256);
+ plcp_set_group_modulation (&quality[band], group,
+ PLC_MOD_QAM256);
}
}
@@ -1446,13 +1527,15 @@ static void ce_analyse_noise (struct plc_drv_unit *unit,
}
/* calculate the quadratique moy of the spectrum on a given band, considering significative carriers */
-double get_quad_moy (struct plc_drv_unit *unit, struct plcp_host *host, int band)
+double get_quad_moy (struct plc_drv_unit *unit, struct plcp_host *host,
+ int band)
{
double amp, sp_quad = 0;
int carrier /*, band */ , num = 0;
/*for(band=1; band<PMD_MAX_BANDS; band++)
* { */
+#ifdef INCLUDE_HOST_MEMO
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
amp = host->info->__all_spectrum[band][carrier];
@@ -1463,6 +1546,7 @@ double get_quad_moy (struct plc_drv_unit *unit, struct plcp_host *host, int band
num++;
}
}
+#endif
//}
if (num == 0)
return __sp_min;
@@ -1472,7 +1556,9 @@ double get_quad_moy (struct plc_drv_unit *unit, struct plcp_host *host, int band
}
/* calculate the quadratique moy of the spectrum on a given band, considering significative carriers */
-void copy_band_spectrum (struct plc_drv_unit *unit, int band, double spectrum[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND])
+void copy_band_spectrum (struct plc_drv_unit *unit, int band,
+ double
+ spectrum[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND])
{
double amp;
int carrier;
@@ -1488,7 +1574,8 @@ void copy_band_spectrum (struct plc_drv_unit *unit, int band, double spectrum[PM
/* calculate the quadratique moy of the spectrum on a given band, considering significative carriers */
-void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *sp_quad)
+void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host,
+ double *sp_quad)
{
double db;
int band;
@@ -1519,6 +1606,7 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
double sp_q = 0;
int num = 0;
+#ifdef INCLUDE_HOST_MEMO
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
double amp = host->info->__all_spectrum[band][carrier];
@@ -1529,6 +1617,7 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
num++;
}
}
+#endif
if (!num)
sp_q = __sp_min;
else
@@ -1538,11 +1627,13 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
{
int numex = 0;
+#ifdef INCLUDE_HOST_MEMO
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
double amp = host->info->__all_spectrum[band][carrier];
- if (amp < __sp_min || fabs (sp_q - amp) / sp_q > __adapt_extreme)
+ if (amp < __sp_min ||
+ fabs (sp_q - amp) / sp_q > __adapt_extreme)
{
extremes[carrier] = 1;
numex++;
@@ -1554,11 +1645,13 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
if (max[band] < amp)
max[band] = amp;
}
+#endif
if (numex)
printk ("\tB[%d]: eliminated %d extremes\n", band, numex);
}
else
{
+#ifdef INCLUDE_HOST_MEMO
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
double amp = host->info->__all_spectrum[band][carrier];
@@ -1574,6 +1667,7 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
if (max[band] < amp)
max[band] = amp;
}
+#endif
}
if (min[band] / max[band] < cp)
@@ -1590,15 +1684,20 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
c1 = (nmax - srv) / kol;
c2 = srv * (max[band] - nmax) / kol;
}
- printk ("B[%d]: min=%f, max=%f, srv=%f => change\n", band, min[band], max[band], srv);
+ printk ("B[%d]: min=%f, max=%f, srv=%f => change\n", band,
+ min[band], max[band], srv);
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
if (extremes[carrier])
adapts[carrier] = 0;
else
{
- double amp = host->info->__all_spectrum[band][carrier];
- int adapt = (((double) host->mapA->tead[band - 1][carrier]) * ((amp * c1 + c2) / amp));
+#ifdef INCLUDE_HOST_MEMO
+ double amp =
+ host->info->__all_spectrum[band][carrier];
+ int adapt =
+ (((double) host->mapA->tead[band - 1][carrier]) *
+ ((amp * c1 + c2) / amp));
if (adapt < __adapt_min)
{
@@ -1618,6 +1717,7 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
if (adapt > ma[band])
ma[band] = adapt;
adapts[carrier] = adapt;
+#endif
}
}
if (cntover > __adapt_over_cnt)
@@ -1633,14 +1733,20 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
c1 = (nmax - srv) / kol;
c2 = srv * (max[band] - nmax) / kol;
}
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
{
if (extremes[carrier])
host->mapA->tead[band - 1][carrier] = 0;
else
{
- double amp = host->info->__all_spectrum[band][carrier];
- int adapt = (((double) host->mapA->tead[band - 1][carrier]) * ((amp * c1 + c2) / amp));
+#ifdef INCLUDE_HOST_MEMO
+ double amp =
+ host->info->__all_spectrum[band][carrier];
+ int adapt =
+ (((double) host->mapA->
+ tead[band - 1][carrier]) * ((amp * c1 +
+ c2) / amp));
if (adapt < __adapt_min)
{
@@ -1649,13 +1755,16 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
if (adapt > ma[band])
ma[band] = adapt;
host->mapA->tead[band - 1][carrier] = adapt;
+#endif
}
}
}
else
{
- memcpy (&host->mapA->tead[band - 1][0], adapts, PMD_CARRIERS_PER_BAND * sizeof (uint16_t));
- printk (" passed with sp_q eq with %d overflows\n", cntover);
+ memcpy (&host->mapA->tead[band - 1][0], adapts,
+ PMD_CARRIERS_PER_BAND * sizeof (uint16_t));
+ printk (" passed with sp_q eq with %d overflows\n",
+ cntover);
}
// set max to the value it SHOULD have
@@ -1664,7 +1773,8 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
}
else
{
- printk ("B[%d]: min=%f, max=%f => ok\n", band, min[band], max[band]);
+ printk ("B[%d]: min=%f, max=%f => ok\n", band, min[band],
+ max[band]);
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
if (host->mapA->tead[band - 1][carrier] > ma[band])
ma[band] = host->mapA->tead[band - 1][carrier];
@@ -1694,12 +1804,14 @@ void ce_adaptation (struct plc_drv_unit *unit, struct plcp_host *host, double *s
{
double rel = (mins / cps) / max[band];
- printk (" B[%1d] min: %f, max: %f, max should be: %f, newmax/max=%f\n", band, mins, max[band],
- mins / cps, rel);
+ printk
+ (" B[%1d] min: %f, max: %f, max should be: %f, newmax/max=%f\n",
+ band, mins, max[band], mins / cps, rel);
ma[band] = 0;
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
- int adapt = ((double) host->mapA->tead[band - 1][carrier]) * rel;
+ int adapt =
+ ((double) host->mapA->tead[band - 1][carrier]) * rel;
if (adapt < __adapt_min)
adapt = __adapt_min;
@@ -1776,7 +1888,11 @@ void ce_analyse_band_spectrum (double *band_sp, int band)
amp = 0;
else
{
- amp = (kAmpMax * fft_mult * agc_mult) / sqrt ((*real_c) * (*real_c) + (*imag_c) * (*imag_c));
+ amp =
+ (kAmpMax * fft_mult * agc_mult) / sqrt ((*real_c) *
+ (*real_c) +
+ (*imag_c) *
+ (*imag_c));
/* check amp overflow (for spidmonitor also) */
if (amp > CE_MAX_SPECTRUM)
amp = CE_MAX_SPECTRUM;
@@ -1839,7 +1955,11 @@ void ce_analyse_spectrum (double *spectrum)
amp = 0.0;
else
{
- amp = (kAmpMax * fft_mult) * agc_mult / sqrt ((*real_c) * (*real_c) + (*imag_c) * (*imag_c));
+ amp =
+ (kAmpMax * fft_mult) * agc_mult / sqrt ((*real_c) *
+ (*real_c) +
+ (*imag_c) *
+ (*imag_c));
/* check amp overflow (for spidmonitor also) */
if (amp > CE_MAX_SPECTRUM)
amp = CE_MAX_SPECTRUM;
@@ -1856,10 +1976,74 @@ void ce_analyse_spectrum (double *spectrum)
}
}
+// Analyse spectrum for SPidMonitor.
+void ce_analyse_host_spectrum_sm (struct plcp_host *host, uint16_t * spectrum)
+{
+ int band;
+ double agc_mult;
+
+ int16_t *real_c = &host->info->__safe_real[1][0];
+ int16_t *imag_c = &host->info->__safe_imag[1][0];
+ uint16_t *fft_c = &host->info->fft_mult[1];
+
+ if (afe_type != SAVA_MB)
+ {
+ register double pga = (double) host->info->agc_data1;
+
+ agc_mult = pow (10, (12 - pga) / 20);
+ }
+ {
+ unsigned pga = host->info->agc_data1;
+
+ agc_mult = pow (10, (10 - 3 * (double) (pga >> 2)) / 20); /* reversed due to amp calculation */
+ }
+
+ for (band = 1; band < PMD_MAX_BANDS; band++)
+ {
+ /* Build the real amplitude of REF on each carrier */
+ unsigned long fft_mult = 1 << (*(fft_c++));
+ register int carrier;
+
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ {
+ double amp;
+
+ if (is_notch (band, carrier))
+ {
+ amp = 0.0;
+ }
+ else
+ {
+ if (!*real_c && !*imag_c)
+ amp = 0.0;
+ else
+ {
+ amp =
+ (kAmpMax * fft_mult) * agc_mult / sqrt ((*real_c) *
+ (*real_c) +
+ (*imag_c) *
+ (*imag_c));
+ /* check amp overflow (for spidmonitor also) */
+ if (amp > CE_MAX_SPECTRUM)
+ amp = CE_MAX_SPECTRUM;
+ }
+ }
+
+ real_c++;
+ imag_c++;
+ /* store the result inside a table */
+ /* store on average */
+ *(spectrum++) = amp * 100;
+ }
+ }
+}
+
void ce_analyse_host_spectrum (struct plcp_host *host)
{
int band;
double agc_mult;
+
+#ifdef INCLUDE_HOST_MEMO
int16_t *real_c = &host->info->__safe_real[1][0];
int16_t *imag_c = &host->info->__safe_imag[1][0];
uint16_t *fft_c = &host->info->fft_mult[1];
@@ -1898,7 +2082,11 @@ void ce_analyse_host_spectrum (struct plcp_host *host)
amp = 0.0;
else
{
- amp = (kAmpMax * fft_mult) * agc_mult / sqrt ((*real_c) * (*real_c) + (*imag_c) * (*imag_c));
+ amp =
+ (kAmpMax * fft_mult) * agc_mult / sqrt ((*real_c) *
+ (*real_c) +
+ (*imag_c) *
+ (*imag_c));
/* check amp overflow (for spidmonitor also) */
if (amp > CE_MAX_SPECTRUM)
amp = CE_MAX_SPECTRUM;
@@ -1912,6 +2100,8 @@ void ce_analyse_host_spectrum (struct plcp_host *host)
*(spectrum++) = amp;
}
}
+#endif
+
}
#ifndef CONFIG_VERSION_16M
@@ -2045,7 +2235,8 @@ static void ce_compute_sn (struct plc_drv_unit *unit, int max_samples)
#ifndef CONFIG_VERSION_16M
/* get multiple signal noise mesures */
-void ce_getm_sn (struct plc_drv_unit *unit, int max_samples, int test_delay, bool manual, uint16_t agc_gain)
+void ce_getm_sn (struct plc_drv_unit *unit, int max_samples, int test_delay,
+ bool manual, uint16_t agc_gain)
{
int sample;
@@ -2080,12 +2271,14 @@ void ce_getm_sn (struct plc_drv_unit *unit, int max_samples, int test_delay, boo
/* create a timer, owning some informations */
-static struct ChannelTmo *ce_create_timeout (struct plcp_host *host, int sigNo)
+static struct ChannelTmo *ce_create_timeout (struct plcp_host *host,
+ int sigNo)
{
struct ChannelTmo *ChannelTmo;
/* signal allocation */
- ChannelTmo = (struct ChannelTmo *) alloc (sizeof (struct ChannelTmo), sigNo);
+ ChannelTmo =
+ (struct ChannelTmo *) alloc (sizeof (struct ChannelTmo), sigNo);
ASSERT (ChannelTmo);
ChannelTmo->host = host;
@@ -2099,13 +2292,14 @@ static void ce_destroy_timeout (struct ChannelTmo *ChannelTmo)
sig = (union SIGNAL *) ChannelTmo;
- /* lib�ration du signal */
+ /* libération du signal */
restore (sig);
free_buf (&sig);
}
/* request timer event for 'timer' milliseconds */
-static void ce_request_timeout (struct ChannelTmo *ChannelTmo, CANCEL_INFO * cancel_info, int timer)
+static void ce_request_timeout (struct ChannelTmo *ChannelTmo,
+ CANCEL_INFO * cancel_info, int timer)
{
union SIGNAL *sig;
@@ -2132,8 +2326,9 @@ static struct ChannelTmo *ce_cancel_timeout (CANCEL_INFO * cancel_info)
*********************************************************************************/
/* return the len of the sound frame, with data_slots. */
-static int sound_frame_parameters (struct plc_drv_unit *unit, struct plcp_uchannel *uch, int max_slices, int max_slots,
- int *data_slots)
+static int sound_frame_parameters (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uch, int max_slices,
+ int max_slots, int *data_slots)
{
int ref_slots, slices, len;
@@ -2142,7 +2337,9 @@ static int sound_frame_parameters (struct plc_drv_unit *unit, struct plcp_uchann
max_slots = unit->ce.max_slots;
// how many slices can be sent using uch
- slices = plcp_fit_nb_slices (unit, uch, max_slices, max_slots, data_slots, &ref_slots);
+ slices =
+ plcp_fit_nb_slices (unit, uch, max_slices, max_slots, data_slots,
+ &ref_slots);
// send at least one slice to have the NR
if (slices <= 0)
@@ -2156,7 +2353,8 @@ static int sound_frame_parameters (struct plc_drv_unit *unit, struct plcp_uchann
}
/* send a ce frame. */
-static bool ce_send_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static bool ce_send_frame (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
/* try to send the frame */
if (mm_write (unit, pframe) == DEVICE_EQUEUE_FULL)
@@ -2172,7 +2370,8 @@ static bool ce_send_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
/* write payload information for the request */
-static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t * d_buf)
+static int ce_write_request (struct plc_drv_unit *unit,
+ struct plcp_host *host, uint8_t * d_buf)
{
/* nombre de bits par symbols */
struct plcp_uchannel *test_uchannel;
@@ -2187,7 +2386,9 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
/* configure default unused bands (can change control behavoiur) */
host->test_uchannel->unused_bands = (1 << host->tx_sync_band) - 1;
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~host->test_uchannel->unused_bands));
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->
+ used_bands & (~host->test_uchannel->unused_bands));
/* begin at saturation gain for control data */
host->test_ctrl_gain = default_ogain;
@@ -2204,7 +2405,9 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
/* configure default unused bands (can change control behavoiur) */
host->test_uchannel->unused_bands = (1 << host->tx_sync_band) - 1;
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~host->test_uchannel->unused_bands));
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->
+ used_bands & (~host->test_uchannel->unused_bands));
len = 0;
}
else if (host->step == CE_STEP_UNUSED)
@@ -2218,9 +2421,13 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
test_uchannel = plcp_get_uchannel_by_id (host->test_id);
plcp_copy_channel (host->test_uchannel, test_uchannel);
host->test_uchannel->unused_bands = (1 << host->tx_sync_band) - 1;
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~host->test_uchannel->unused_bands));
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->
+ used_bands & (~host->test_uchannel->unused_bands));
max_slices = 64;
- len = sound_frame_parameters (unit, host->test_uchannel, 15, 99, &data_slots);
+ len =
+ sound_frame_parameters (unit, host->test_uchannel, 15, 99,
+ &data_slots);
/* copy the pattern into the payload */
memcpy (d_buf, ce_d_buf, len);
@@ -2232,12 +2439,14 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
/* if ce_iteratif is ON and step_unused used, then test_id is the result of the unused step */
/* So, save the test_id channel to get the unused band ! Then, the unused bands will be used in SOUND step */
- if ( /*unit->ce.iteratif && unit->ce.steps[CE_STEP_UNUSED] && */ host->test_id != CE_SOUND_BPSK &&
- host->test_id != CE_SOUND_QAM16)
+ if ( /*unit->ce.iteratif && unit->ce.steps[CE_STEP_UNUSED] && */
+ host->test_id != CE_SOUND_BPSK &&
+ host->test_id != CE_SOUND_QAM16)
{
host->test_id = CE_SOUND_BPSK;
}
- ASSERT (host->test_id == CE_SOUND_BPSK || host->test_id == CE_SOUND_QAM16);
+ ASSERT (host->test_id == CE_SOUND_BPSK ||
+ host->test_id == CE_SOUND_QAM16);
max_slices = 64;
/* 1->3->1->3->1 */
if (host->test_id == CE_SOUND_BPSK)
@@ -2253,23 +2462,32 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
plcp_copy_channel (host->test_uchannel, test_uchannel);
/* configure unused bands and gain to the output of step UNUSED_BANDS (if step is active) */
- if (unit->ce.steps[CE_STEP_UNUSED] && unit->plcp.config.fmode == PLCP_FMODE_SCAP)
+ if (unit->ce.steps[CE_STEP_UNUSED] &&
+ unit->plcp.config.fmode == PLCP_FMODE_SCAP)
{
host->test_uchannel->unused_bands =
- (host->tx_unused_bands | ((1 << host->tx_sync_band) - 1)) & ~(1 << host->tx_sync_band);
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~host->test_uchannel->unused_bands));
- host->test_data_gain = unit->ce.unused_data_gain[host->test_uchannel->nb_used_bands];
+ (host->
+ tx_unused_bands | ((1 << host->tx_sync_band) -
+ 1)) & ~(1 << host->tx_sync_band);
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->
+ used_bands & (~host->test_uchannel->unused_bands));
+ host->test_data_gain =
+ unit->ce.unused_data_gain[host->test_uchannel->nb_used_bands];
}
else
{
/* configure default unused bands */
host->test_uchannel->unused_bands = (1 << host->tx_sync_band) - 1;
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~host->test_uchannel->unused_bands));
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->
+ used_bands & (~host->test_uchannel->unused_bands));
host->test_data_gain = unit->ce.data_gain;
}
len = sound_frame_parameters (unit, host->test_uchannel, max_slices, /*unit->ce.ref_coef */
- unit->plcp.config.ref_interval, &data_slots);
+ unit->plcp.config.ref_interval,
+ &data_slots);
/* copy the pattern into the payload */
memcpy (d_buf, ce_d_buf, len);
@@ -2284,7 +2502,8 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
else if (host->step == CE_STEP_CHANNEL)
{
/* use the last channel */
- ASSERT ((host->test_id >= CE_SOUND_BPSK && host->test_id <= CE_SOUND_QAM16));
+ ASSERT ((host->test_id >= CE_SOUND_BPSK &&
+ host->test_id <= CE_SOUND_QAM16));
len = 0;
}
#ifdef CONFIG_PLC_MCAST
@@ -2300,7 +2519,9 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
// We limit at 2 slices, Otherwise we have Overrun on ethernet.
// Because the AHB bus is busy.
- len = sound_frame_parameters (unit, host->test_uchannel, 2, 255, &data_slots);
+ len =
+ sound_frame_parameters (unit, host->test_uchannel, 2, 255,
+ &data_slots);
/* copy the pattern into the payload */
memcpy (d_buf, ce_d_buf, len);
@@ -2311,8 +2532,11 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
// immediately a channel with good modulation. So we send fake data.
/* test the last channel */
- len = sound_frame_parameters (unit, host->uchannel, unit->ce.nb_slices_per_frame_min,
- unit->plcp.config.ref_interval, &data_slots);
+ len =
+ sound_frame_parameters (unit, host->uchannel,
+ unit->ce.nb_slices_per_frame_min,
+ unit->plcp.config.ref_interval,
+ &data_slots);
/* copy the pattern into the payload */
memcpy (d_buf, ce_d_buf, len);
@@ -2332,13 +2556,15 @@ static int ce_write_request (struct plc_drv_unit *unit, struct plcp_host *host,
}
/* write reply information in the payload */
-static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t subtype, uint8_t * d_buf)
+static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host,
+ uint8_t subtype, uint8_t * d_buf)
{
struct plcp_uchannel *uchannel;
uint8_t nb_used_bands;
int len = 0;
- if ((subtype == MA_SUBTYPE_POWER_REPLY) || (subtype == MA_SUBTYPE_POWER_INV_REPLY))
+ if ((subtype == MA_SUBTYPE_POWER_REPLY) ||
+ (subtype == MA_SUBTYPE_POWER_INV_REPLY))
{ /* pilots */
struct ce_rep_power *rep = (struct ce_rep_power *) d_buf;
@@ -2386,7 +2612,7 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
encrypt_tablemap (rep->quality);
}
#endif
- /* indication du channel id qui doit �tre utilis� par le host pour transmettre */
+ /* indication du channel id qui doit être utilisé par le host pour transmettre */
rep->channel_id = (uint8_t) __channel_id;
rep->sync_band = __sync_band;
len = sizeof (struct ce_rep_channel);
@@ -2410,7 +2636,7 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
encrypt_tablemap (rep->quality);
}
#endif
- /* channel 0 car non utilis� */
+ /* channel 0 car non utilisé */
rep->channel_id = (uint8_t) __channel_id;
rep->sync_band = __sync_band;
len = sizeof (struct ce_rep_channel);
@@ -2418,13 +2644,14 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
rep->cksum16 = crc16 (d_buf, len - 2);
}
#endif
- else if ((subtype == MA_SUBTYPE_TEST_REPLY) || (subtype == MA_SUBTYPE_UNUSED_TEST_REPLY))
+ else if ((subtype == MA_SUBTYPE_TEST_REPLY) ||
+ (subtype == MA_SUBTYPE_UNUSED_TEST_REPLY))
{ /* tests on channel channel */
struct ce_rep_test *rep = (struct ce_rep_test *) d_buf;
/* save quality into frame */
ce_save_quality (unit, rep->quality, __quality);
- /* indication du channel id qui doit �tre utilis� par le host pour transmettre */
+ /* indication du channel id qui doit être utilisé par le host pour transmettre */
rep->channel_id = (uint8_t) __channel_id;
rep->sync_band = __sync_band;
len = sizeof (struct ce_rep_test);
@@ -2434,7 +2661,9 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
{
/* save unused bands */
uchannel = plcp_get_uchannel_by_id (host->rx_channel);
- host->rx_unused_bands = ce_get_unused_bands (unit, __quality, &nb_used_bands) & uchannel->unused_bands;
+ host->rx_unused_bands =
+ ce_get_unused_bands (unit, __quality,
+ &nb_used_bands) & uchannel->unused_bands;
}
}
@@ -2447,7 +2676,8 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
nb_frame_err = host->stats.tx_sack + host->stats.tx_nack;
nb_frame_rx = nb_frame_err + host->stats.tx_ack;
- if ((nb_frame_rx > (unit->ce.nb_frames_min)) || (nb_frame_err > host->stats.rate_error_host))
+ if ((nb_frame_rx > (unit->ce.nb_frames_min)) ||
+ (nb_frame_err > host->stats.rate_error_host))
{
rep->send_fake_data = false;
}
@@ -2474,14 +2704,18 @@ static int ce_write_reply (struct plc_drv_unit *unit, struct plcp_host *host, ui
}
/* get available channel */
-struct plcp_uchannel *ce_get_channel (struct plc_drv_unit *unit, struct plcp_host *host, uint16_t used1, uint16_t used2,
- uint16_t * id3)
+struct plcp_uchannel *ce_get_channel (struct plc_drv_unit *unit,
+ struct plcp_host *host, uint16_t used1,
+ uint16_t used2, uint16_t * id3)
{
struct plcp_uchannel *uchannel;
uint16_t channel_id;
- ASSERT (host->id1 != host->id2 && host->id1 != host->id2 && host->id2 != host->id3);
- ASSERT (host->id1 != PLCP_ID_NOT_DEFINED && host->id2 != PLCP_ID_NOT_DEFINED && host->id3 != PLCP_ID_NOT_DEFINED);
+ ASSERT (host->id1 != host->id2 && host->id1 != host->id2 &&
+ host->id2 != host->id3);
+ ASSERT (host->id1 != PLCP_ID_NOT_DEFINED &&
+ host->id2 != PLCP_ID_NOT_DEFINED &&
+ host->id3 != PLCP_ID_NOT_DEFINED);
/* ALLOCATE RESSOURCES */
if (host->id1 != used1 && host->id1 != used2)
{
@@ -2521,7 +2755,8 @@ struct plcp_uchannel *ce_get_channel (struct plc_drv_unit *unit, struct plcp_hos
}
/* if modulation on the band is poor, use tha same pilots. Deals with pilots index (0 to 127)*/
-void uchannel_pilots (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void uchannel_pilots (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int bits, band, gp1, gp0, mod0, mod1;
@@ -2529,15 +2764,19 @@ void uchannel_pilots (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
{
if (band_is_used (unit, band))
{
- bits = plcp_band_bit_rate (&uchannel->quality[band], band, uchannel->notches);
+ bits =
+ plcp_band_bit_rate (&uchannel->quality[band], band,
+ uchannel->notches);
if (bits < unit->ce.pilots_threshold)
{
/* seek best pilot */
gp0 = plcp_pilots[band][0] / 8;
gp1 = plcp_pilots[band][1] / 8;
/* use single pilots */
- mod0 = plcp_get_group_modulation (&uchannel->quality[band], gp0);
- mod1 = plcp_get_group_modulation (&uchannel->quality[band], gp1);
+ mod0 =
+ plcp_get_group_modulation (&uchannel->quality[band], gp0);
+ mod1 =
+ plcp_get_group_modulation (&uchannel->quality[band], gp1);
if (mod0 >= mod1)
{
uchannel->pilots[band][0] = plcp_pilots[band][0];
@@ -2574,7 +2813,8 @@ void uchannel_pilots (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
}
/* complete host->max_noise using current noise */
-static void ce_change_syncband (struct plcp_host *host, struct plcp_uchannel *uchannel)
+static void ce_change_syncband (struct plcp_host *host,
+ struct plcp_uchannel *uchannel)
{
extern struct plc_drv_unit *ze_unit;
@@ -2590,7 +2830,8 @@ static void ce_change_syncband (struct plcp_host *host, struct plcp_uchannel *uc
// in case we gain a new band, check the less losted frames before switching
if (host->syncBandAdv < syncBand)
{
- if (host->startTrue[host->syncBandAdv] >= host->startTrue[syncBand])
+ if (host->startTrue[host->syncBandAdv] >=
+ host->startTrue[syncBand])
{
host->syncBand = host->syncBandAdv;
}
@@ -2605,17 +2846,21 @@ static void ce_change_syncband (struct plcp_host *host, struct plcp_uchannel *uc
BandBits = 0;
for (i = 1; i <= syncBand; i++)
{
- BandBits += plcp_band_bit_rate (&uchannel->quality[i], i, &notches[NOTCHES_DEFAULT]);
+ BandBits +=
+ plcp_band_bit_rate (&uchannel->quality[i], i,
+ &notches[NOTCHES_DEFAULT]);
}
BPS1 = plcp_slot_bit_rate (uchannel->quality);
BPS2 = BPS1 - BandBits;
TrueStart1 = host->startTrue[syncBand];
TrueStart2 = host->startTrue[host->syncBandAdv];
- if (BPS2 < 0 || uchannel->index == 13 || host->rx_channel == 13)
+ if (BPS2 < 0 || uchannel->index == 13 ||
+ host->rx_channel == 13)
{
- RT_PRINTK ("ERROR! uchannel index=%d, host->rx_channel=%d\n", uchannel->index,
- host->rx_channel);
+ RT_PRINTK
+ ("ERROR! uchannel index=%d, host->rx_channel=%d\n",
+ uchannel->index, host->rx_channel);
dump_qual (uchannel->quality);
}
// change of syncro band if we can improve the data rate.
@@ -2642,16 +2887,18 @@ static void ce_change_syncband (struct plcp_host *host, struct plcp_uchannel *uc
}
};
-
-
-#ifdef CE_ITERATIF
-static void ce_noise_distance (struct plc_drv_unit *unit, struct plcp_host *host,
- uint16_t noise_bpsk[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
- uint16_t noise_qam16[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
+static void ce_noise_distance (struct plc_drv_unit *unit,
+ struct plcp_host *host,
+ uint16_t
+ noise_bpsk[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+ uint16_t
+ noise_qam16[PMD_MAX_BANDS]
+ [PMD_GROUPS_PER_BAND])
{
int band, group;
uint16_t noiseBpsk, noiseQam16;
- uint16_t *noise_ref[] = { 0, &noiseBpsk, &noiseBpsk, &noiseQam16, &noiseQam16, &noiseQam16 };
+ uint16_t *noise_ref[] =
+ { 0, &noiseBpsk, &noiseBpsk, &noiseQam16, &noiseQam16, &noiseQam16 };
int mod;
struct plcp_uchannel *uchannel;
@@ -2679,14 +2926,16 @@ static void ce_noise_distance (struct plc_drv_unit *unit, struct plcp_host *host
if ((mod < 5) && !is_notch (band, group * 8))
{ // TODO check every carrier of the group for botches
noiseDistance[band][group].distance_up =
- (*(noise_ref[mod + 1]) - ce_levels[mod + 1]) * ce_gaps[mod + 1];
+ (*(noise_ref[mod + 1]) -
+ ce_levels[mod + 1]) * ce_gaps[mod + 1];
}
else
noiseDistance[band][group].distance_up = 1000; // notch OU qam256
/* distance to decrease modulation */
if (mod > 0)
{
- noiseDistance[band][group].distance = (*(noise_ref[mod]) - ce_levels[mod]) * ce_gaps[mod];
+ noiseDistance[band][group].distance =
+ (*(noise_ref[mod]) - ce_levels[mod]) * ce_gaps[mod];
}
else // NONE (et donc notch)
noiseDistance[band][group].distance = -1000;
@@ -2694,10 +2943,12 @@ static void ce_noise_distance (struct plc_drv_unit *unit, struct plcp_host *host
}
}
-#endif
-static void ce_noise_fonction (struct plc_drv_unit *unit, struct plcp_host *host,
- uint16_t noise_func[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND], int num, uint16_t max_noise)
+static void ce_noise_fonction (struct plc_drv_unit *unit,
+ struct plcp_host *host,
+ uint16_t
+ noise_func[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+ int num, uint16_t max_noise)
{
int band, group;
uint16_t noise;
@@ -2771,7 +3022,8 @@ double min_diff (double a, double b, double c, double d)
uint16_t pmd_get_agc_goal (void)
{
- return (*(uint16_t *) (PMD_V2_REGBASE + PMD_V2_SETUP_REGS_OFFSET + 0x088));
+ return (*(uint16_t *)
+ (PMD_V2_REGBASE + PMD_V2_SETUP_REGS_OFFSET + 0x088));
}
#define Mmin(a,b) ((a)<(b))?(a):(b)
@@ -2783,35 +3035,37 @@ uint16_t pmd_get_agc_goal (void)
* RETURN : 0 = Request accepted, success.
* -x = Request dropped, skip or try again this step.
* ----------------------------------------------------------------------- */
-static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *input)
+static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *input)
{
- struct ce_header *ch_input = (struct ce_header *) &input->control->l_frm.res[0];
+ struct ce_header *ch_input =
+ (struct ce_header *) &input->control->l_frm.res[0];
struct plcp_uchannel *uchannel = NULL;
/* allocate host info is not already done */
if (host->info == NULL)
{
-#ifdef STATIC_MESURE_ALLOCATION
- // TEMPORARY: static allocation of host_info structure
- host->info = &info_pool[host->index];
-#else
- host->info = (struct host_info *) rt_malloc (sizeof (struct host_info));
+ host->info =
+ (struct host_info *) rt_malloc (sizeof (struct host_info));
if (host->info == NULL)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "rt_malloc: unable to allocate %d byte in heap\n",
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "rt_malloc: unable to allocate %d byte in heap\n",
sizeof (struct host_info));
return EINVAL_ALLOC;
}
-#endif
memset (host->info, 0, sizeof (struct host_info));
}
/* in spy mode, the start symbol on ce_request_payload may not be
* detected, in that case */
- if (input->fake_rx_end && input->control->l_frm.subtype != MA_SUBTYPE_TEST_REQUEST)
+ if (input->fake_rx_end &&
+ input->control->l_frm.subtype != MA_SUBTYPE_TEST_REQUEST)
{
- PLCP_LOG (rxstart_isr_date, "CE_FAKE_SUBTYPE", input->control->l_frm.subtype);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "%s PAYLOAD not received (bad synchro)\n",
+ PLCP_LOG (rxstart_isr_date, "CE_FAKE_SUBTYPE",
+ input->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "%s PAYLOAD not received (bad synchro)\n",
ma_subtype_name[input->control->l_frm.subtype]);
return EINVAL_BAD_SYNC;
}
@@ -2831,7 +3085,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
host->rx_channel = ch_input->cur_id;
if (host->rx_channel == 13)
{
- RT_PRINTK ("%s ERROR\n", ma_subtype_name[input->control->l_frm.subtype]);
+ RT_PRINTK ("%s ERROR\n",
+ ma_subtype_name[input->control->l_frm.subtype]);
dump_qual (uchannel->quality);
}
}
@@ -2839,6 +3094,7 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
/* CHANNEL ANALYSIS */
if (input->control->l_frm.subtype == MA_SUBTYPE_POWER_REQUEST)
{
+#ifdef INCLUDE_HOST_MEMO
int band;
double agc_mult;
double pw = 0;
@@ -2860,7 +3116,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
if (afe_type != SAVA_MB)
{
- register double pga = (double) /*__data_agc*/ host->info->agc_data1;
+ register double pga =
+ (double) /*__data_agc*/ host->info->agc_data1;
agc_mult = pow (10, (12 - pga) / 20);
}
@@ -2873,7 +3130,7 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- /* calcul de l'amplitude r�elle du REF sur chaque porteuse */
+ /* calcul de l'amplitude réelle du REF sur chaque porteuse */
int bandused = band_is_used (unit, band);
unsigned long fft_mult = 1 << (*(fft_c++));
register int carrier;
@@ -2900,7 +3157,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
else
{
- A = sqrt ((*real_c) * (*real_c) + (*imag_c) * (*imag_c));
+ A = sqrt ((*real_c) * (*real_c) +
+ (*imag_c) * (*imag_c));
amp = K / A;
amp_sim = Ksim * A;
}
@@ -2918,15 +3176,20 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
}
+ __sp_power = pw;
+
+#endif
// FIX: we want to save the fft_mult on the first power request
memcpy (host->info->fft_mult, __fft_gain, sizeof (__fft_gain));
- __sp_power = pw;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "the average power of the signal R=S+B is %f\n", __sp_power);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "the average power of the signal R=S+B is %f\n",
+ __sp_power);
// REMOVED copy of the pilots amplitude
}
else if (input->control->l_frm.subtype == MA_SUBTYPE_POWER_INV_REQUEST)
{
+#ifdef INCLUDE_HOST_MEMO
int band;
double agc_mult;
double DIFF_AGC = 3;
@@ -2947,7 +3210,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
if (afe_type != SAVA_MB)
{
- register double pga = (double) /*__data_agc*/ host->info->agc_data2;
+ register double pga =
+ (double) /*__data_agc*/ host->info->agc_data2;
agc_mult = pow (10, (12 - pga) / 20);
}
@@ -2960,13 +3224,15 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
if (host->pow_req)
{
- DIFF_AGC = log10 ((double) unit->ce.agc_goal2 / (double) unit->ce.agc_goal1);
+ DIFF_AGC =
+ log10 ((double) unit->ce.agc_goal2 /
+ (double) unit->ce.agc_goal1);
if (DIFF_AGC < 0)
DIFF_AGC = -DIFF_AGC;
DIFF_AGC = 20 * DIFF_AGC - 1;
host->calculate_real_spectrum = (unit->ce.real_spectrum) &&
- (abs (host->info->agc_data1 - host->info->agc_data2) >= DIFF_AGC) &&
- (unit->ce.agc_goal1 != unit->ce.agc_goal2);
+ (abs (host->info->agc_data1 - host->info->agc_data2) >=
+ DIFF_AGC) && (unit->ce.agc_goal1 != unit->ce.agc_goal2);
}
else
host->calculate_real_spectrum = 0;
@@ -2999,7 +3265,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
else
{
- A = sqrt ((*real_c) * (*real_c) + (*imag_c) * (*imag_c));
+ A = sqrt ((*real_c) * (*real_c) +
+ (*imag_c) * (*imag_c));
amp = K / A;
amp_sim = Ksim * A;
}
@@ -3013,7 +3280,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
if (host->calculate_real_spectrum)
{
- ampc = min_diff (*spectrum, *spectrum_inv, amp, amp_sim);
+ ampc =
+ min_diff (*spectrum, *spectrum_inv, amp, amp_sim);
*spectrum = ampc;
}
@@ -3046,7 +3314,11 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
__sp_power = pw;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "the average power of the signal R=S+B is %f\n", __sp_power);
+#endif
+
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "the average power of the signal R=S+B is %f\n",
+ __sp_power);
// REMOVED copy of the pilots amplitude
}
@@ -3059,7 +3331,9 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
__band_no = band;
/* register info sp buffer for transmit */
+#ifdef INCLUDE_HOST_MEMO
copy_band_spectrum (unit, band, host->info->spectrum);
+#endif
}
else if (input->control->l_frm.subtype == MA_SUBTYPE_SOUND_REQUEST)
{
@@ -3070,64 +3344,54 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
// save data here when power step is disabled
host->info->agc_data1 = __data_agc;
- memcpy (host->info->__safe_real, __safe_real, sizeof (__safe_real));
- memcpy (host->info->__safe_imag, __safe_imag, sizeof (__safe_imag));
+ memcpy (host->info->__safe_real, __safe_real,
+ sizeof (__safe_real));
+ memcpy (host->info->__safe_imag, __safe_imag,
+ sizeof (__safe_imag));
memcpy (host->info->fft_mult, __fft_gain, sizeof (__fft_gain));
-#ifndef CE_ITERATIF
- /* in ce iteratif mode, the noise log is never cleaned, it is smoothed with an algorithm */
- if (!unit->ce.iteratif)
- {
- host->info->bpsk_num = 0;
- host->info->qam16_num = 0;
- }
-#endif
}
/* recover test channel */
if (input->control->l_frm.channel_id == CE_SOUND_BPSK)
{
-#ifndef CE_ITERATIF
- host->info->bpsk_num++;
- ce_noise_fonction (unit, host, host->info->bpsk_noise, host->info->bpsk_num,
- MAX_NOISE_FOR_BPSK * nb_bpsk_slots);
-#else
- ce_noise_fonction (unit, host, host->info->bpsk_noise, (host->info->bpsk_num > 0) ? unit->ce.coefnoise : 1,
+ ce_noise_fonction (unit, host, host->info->bpsk_noise,
+ (host->info->bpsk_num >
+ 0) ? unit->ce.coefnoise : 1,
MAX_NOISE_FOR_BPSK * nb_bpsk_slots);
host->info->bpsk_num = 1;
-#endif
}
else if (input->control->l_frm.channel_id == CE_SOUND_QAM16)
{
-#ifndef CE_ITERATIF
- host->info->qam16_num++;
- ce_noise_fonction (unit, host, host->info->qam16_noise, host->info->qam16_num,
- MAX_NOISE_FOR_QAM16 * nb_qam16_slots);
-#else
ce_noise_fonction (unit, host, host->info->qam16_noise,
- (host->info->qam16_num > 0) ? unit->ce.coefnoise : 1,
+ (host->info->qam16_num >
+ 0) ? unit->ce.coefnoise : 1,
MAX_NOISE_FOR_QAM16 * nb_qam16_slots);
host->info->qam16_num = 1;
-#endif
}
else
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "ERROR! rx sound on channel %d\n", input->control->l_frm.channel_id);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "ERROR! rx sound on channel %d\n",
+ input->control->l_frm.channel_id);
return EINVAL_SOUND;
}
-#ifdef CE_ITERATIF
if (unit->ce.iteratif)
{
u8 band;
- ce_analyse_noise (unit, host->info->bpsk_noise, host->info->qam16_noise, nb_bpsk_slots, nb_qam16_slots,
- (host->rx_unused_bands | ((1 << host->syncBand) - 1)) & ~(1 << host->syncBand), __quality,
- &ce_levels[0], host->id);
+ ce_analyse_noise (unit, host->info->bpsk_noise,
+ host->info->qam16_noise, nb_bpsk_slots,
+ nb_qam16_slots,
+ (host->
+ rx_unused_bands | ((1 << host->syncBand) -
+ 1)) & ~(1 << host->
+ syncBand),
+ __quality, &ce_levels[0], host->id);
host->fake_quality_rx = plcp_slot_bit_rate (__quality) / 8;
}
-#endif
}
else if (input->control->l_frm.subtype == MA_SUBTYPE_GET_CHANNEL_REQUEST)
@@ -3144,15 +3408,17 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
/* get number of bpsk data slots used previously */
bpsk = plcp_get_uchannel_by_id (CE_SOUND_BPSK);
- sound_frame_parameters (unit, bpsk, 64, /*unit->ce.ref_coef */ unit->plcp.config.ref_interval, &nb_bpsk_slots);
+ sound_frame_parameters (unit, bpsk, 64, /*unit->ce.ref_coef */
+ unit->plcp.config.ref_interval,
+ &nb_bpsk_slots);
/* get number of bpsk data slots used previously */
qam16 = plcp_get_uchannel_by_id (CE_SOUND_QAM16);
- sound_frame_parameters (unit, qam16, 64, /*unit->ce.ref_coef */ unit->plcp.config.ref_interval,
+ sound_frame_parameters (unit, qam16, 64, /*unit->ce.ref_coef */
+ unit->plcp.config.ref_interval,
&nb_qam16_slots);
/* noise analysis: calculate new quality */
-#ifdef CE_ITERATIF
// if host current channel is 0, use old channel estimation to get a first valid tone map
if (unit->ce.iteratif && (host->id != PLCP_CID_NONE))
{
@@ -3173,7 +3439,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
nb_frame_rx = nb_frame_err + host->stats.tx_ack;
/* Security too many error decrease channel */
- if ((nb_frame_err * unit->ce.nb_frames_min) > (host->stats.rate_error_host * nb_frame_rx))
+ if ((nb_frame_err * unit->ce.nb_frames_min) >
+ (host->stats.rate_error_host * nb_frame_rx))
{
host->nbGroupDown += 2; // incremental
host->nbGroupUp = 1;
@@ -3182,7 +3449,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
/* Else, changes occur only if enough stats are done */
- else if ((nb_frame_rx > unit->ce.nb_frames_min) || (nb_frame_err > host->stats.rate_error_host))
+ else if ((nb_frame_rx > unit->ce.nb_frames_min) ||
+ (nb_frame_err > host->stats.rate_error_host))
{
/* retrieve all the stats from the host transmition */
@@ -3198,13 +3466,16 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
nb_slices_per_frame = nb_slice_rx / nb_frame_rx;
/* good modulation and long frame used: linear adaptation */
- if (nb_slices_per_frame >= unit->ce.nb_slices_per_frame_min)
+ if (nb_slices_per_frame >=
+ unit->ce.nb_slices_per_frame_min)
{
/* Compare the target with the slice error (due to modulation error, and not due to bad frame START error) */
/* target_slice = nb_frame_rx*unit->ce.rate_error_target/unit->ce.nb_frames_min - (nb_slice_err - nb_frame_err)/(nb_slices_per_frame-1); */
target_slice =
- nb_frame_rx * unit->ce.rate_error_target / unit->ce.nb_frames_min -
- (nb_frame_err * nb_slices_per_frame - nb_slice_err) / (nb_slices_per_frame - 1);
+ nb_frame_rx * unit->ce.rate_error_target /
+ unit->ce.nb_frames_min -
+ (nb_frame_err * nb_slices_per_frame -
+ nb_slice_err) / (nb_slices_per_frame - 1);
/* calculate the coefficient between modulation evolution and error before RS */
nb_slot_in_slice = 342 / nb_bytes;
@@ -3221,7 +3492,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
if (host->stats.rs[8] != 0)
{
nb_RS = -target_slice / host->stats.rs[8];
- host->nbGroupDown = 1 + nb_RS / nb_slot_in_slice;
+ host->nbGroupDown =
+ 1 + nb_RS / nb_slot_in_slice;
host->stats.ce_evol_choice = -1;
}
/* If no correction RS with 8 octets => no change, should be START error */
@@ -3238,7 +3510,9 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
host->nbGroupDown = 1;
/* we need to add error on target_slice : we expected to have a continuity in RS corrections */
nb_RS = 0;
- target_slice = (unit->ce.rate_error_target * nb_frame_rx / unit->ce.nb_frames_min);
+ target_slice =
+ (unit->ce.rate_error_target * nb_frame_rx /
+ unit->ce.nb_frames_min);
while (target_slice > 0 && nb_RS < 8)
{
target_slice -= host->stats.rs[8 - nb_RS++];
@@ -3246,19 +3520,24 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
/* the rate error is reach in the slices with at least 1 error, near best modulation */
if (target_slice < 0)
{
- host->nbGroupUp = 1 + (nb_RS - 1) / nb_slot_in_slice;
+ host->nbGroupUp =
+ 1 + (nb_RS - 1) / nb_slot_in_slice;
host->stats.ce_evol_choice = 2;
}
/* the rate error is not reach with the frame with at least 1 error, we grow the modulation fast */
else if (10 * target_slice >
- (unit->ce.rate_error_target * host->stats.tx_ack / unit->ce.nb_frames_min))
+ (unit->ce.rate_error_target *
+ host->stats.tx_ack /
+ unit->ce.nb_frames_min))
{
host->nbGroupUp += 2;
host->stats.ce_evol_choice = 3;
}
/* the rate error is half reach with the frame with at least 1 error, we grow the modulation */
else if (2 * target_slice >
- (unit->ce.rate_error_target * host->stats.tx_ack / unit->ce.nb_frames_min))
+ (unit->ce.rate_error_target *
+ host->stats.tx_ack /
+ unit->ce.nb_frames_min))
{
host->nbGroupUp = 2;
host->stats.ce_evol_choice = 4;
@@ -3276,15 +3555,18 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
else
{
/* Low error, up */
- if ((nb_frame_err * unit->ce.nb_frames_min) < (unit->ce.rate_error_target * nb_frame_rx))
+ if ((nb_frame_err * unit->ce.nb_frames_min) <
+ (unit->ce.rate_error_target * nb_frame_rx))
{
host->nbGroupDown = 1;
host->nbGroupUp = 2;
host->stats.ce_evol_choice = 6;
}
/* low modulation and below error rate */
- else if ((nb_frame_err * unit->ce.nb_frames_min) < (host->stats.rate_error_host * nb_frame_rx)
- && (nb_bytes < 5 * unit->ce.nb_slices_per_frame_min))
+ else if ((nb_frame_err * unit->ce.nb_frames_min) <
+ (host->stats.rate_error_host * nb_frame_rx)
+ && (nb_bytes <
+ 5 * unit->ce.nb_slices_per_frame_min))
{
host->nbGroupDown = 1;
host->nbGroupUp = 2;
@@ -3343,33 +3625,47 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
{
if (host->nbGroupDown <= host->nbGroupUp)
host->stats.rate_error_host =
- unit->ce.rate_error_target + nb_frame_err * unit->ce.nb_frames_min / nb_frame_rx +
- (host->nbGroupUp - host->nbGroupDown) * unit->ce.nb_frames_min / nb_bytes;
+ unit->ce.rate_error_target +
+ nb_frame_err * unit->ce.nb_frames_min /
+ nb_frame_rx + (host->nbGroupUp -
+ host->nbGroupDown) *
+ unit->ce.nb_frames_min / nb_bytes;
else
host->stats.rate_error_host =
- host->stats.rate_error_host + (host->nbGroupUp -
- host->nbGroupDown) * unit->ce.nb_frames_min / nb_bytes;
+ host->stats.rate_error_host +
+ (host->nbGroupUp -
+ host->nbGroupDown) * unit->ce.nb_frames_min /
+ nb_bytes;
}
if (host->stats.rate_error_host < unit->ce.rate_error_max)
host->stats.rate_error_host = unit->ce.rate_error_max;
- if (2 * host->stats.rate_error_host > unit->ce.nb_frames_min)
- host->stats.rate_error_host = unit->ce.nb_frames_min / 2;
+ if (2 * host->stats.rate_error_host >
+ unit->ce.nb_frames_min)
+ host->stats.rate_error_host =
+ unit->ce.nb_frames_min / 2;
}
}
ce_change_syncband (host, uchannel);
- ce_noise_distance (unit, host, host->info->bpsk_noise, host->info->qam16_noise);
+ ce_noise_distance (unit, host, host->info->bpsk_noise,
+ host->info->qam16_noise);
/* The analize is on all the bands over the syncBand : unused are only set on TX to maximize the tx gain */
- ce_analyse_distance (host, unit, 0, ((1 << host->syncBand) - 1) & ~(1 << host->syncBand), __quality);
+ ce_analyse_distance (host, unit, 0,
+ ((1 << host->syncBand) -
+ 1) & ~(1 << host->syncBand), __quality);
}
else // old channel estimation behaviour
-#endif
{
ce_change_syncband (host, uchannel);
- ce_analyse_noise (unit, host->info->bpsk_noise, host->info->qam16_noise, nb_bpsk_slots, nb_qam16_slots,
- (host->rx_unused_bands | ((1 << host->syncBand) - 1)) & ~(1 << host->syncBand), __quality,
- &ce_levels[0], host->id);
+ ce_analyse_noise (unit, host->info->bpsk_noise,
+ host->info->qam16_noise, nb_bpsk_slots,
+ nb_qam16_slots,
+ (host->
+ rx_unused_bands | ((1 << host->syncBand) -
+ 1)) & ~(1 << host->
+ syncBand),
+ __quality, &ce_levels[0], host->id);
/* clean noise next time a sound is received, but dont clean history */
host->clean_table = true;
}
@@ -3378,13 +3674,16 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
ASSERT (ce_check_integrity (unit, __quality));
/* skip bad bands */
- __unused_bands = ce_get_unused_bands (unit, __quality, &__nb_used_bands);
+ __unused_bands =
+ ce_get_unused_bands (unit, __quality, &__nb_used_bands);
/* always set the syncBand as used */
__sync_band = host->syncBand;
/* configure new channel */
- uchannel = ce_get_channel (unit, host, ch_input->cur_id, 0 /*nothing */ , &__channel_id);
+ uchannel =
+ ce_get_channel (unit, host, ch_input->cur_id, 0 /*nothing */ ,
+ &__channel_id);
if (uchannel == NULL)
{
/* no memory for uchannel */
@@ -3393,7 +3692,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
uchannel->unused_bands = __unused_bands;
uchannel->nb_used_bands = __nb_used_bands;
- memcpy (uchannel->quality, __quality, PMD_MAX_BANDS * sizeof (struct pmd_band_quality));
+ memcpy (uchannel->quality, __quality,
+ PMD_MAX_BANDS * sizeof (struct pmd_band_quality));
uchannel_pilots (unit, uchannel);
// we suppose that the modulation has been calculated on host->syncBand for every sound frame
uchannel->robust = 0;
@@ -3403,7 +3703,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
host->rx_last_channel = __channel_id;
}
#ifdef CONFIG_PLC_MCAST
- else if (input->control->l_frm.subtype == MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST)
+ else if (input->control->l_frm.subtype ==
+ MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST)
{
uint16_t mcast_levels[5];
short i;
@@ -3411,35 +3712,45 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
/* get number of bpsk data slots used previously */
bpsk = plcp_get_uchannel_by_id (CE_SOUND_BPSK);
- sound_frame_parameters (unit, bpsk, 64, /*unit->ce.ref_coef */ unit->plcp.config.ref_interval, &nb_bpsk_slots);
+ sound_frame_parameters (unit, bpsk, 64, /*unit->ce.ref_coef */
+ unit->plcp.config.ref_interval,
+ &nb_bpsk_slots);
/* get number of bpsk data slots used previously */
qam16 = plcp_get_uchannel_by_id (CE_SOUND_QAM16);
- sound_frame_parameters (unit, qam16, 64, /*unit->ce.ref_coef */ unit->plcp.config.ref_interval,
+ sound_frame_parameters (unit, qam16, 64, /*unit->ce.ref_coef */
+ unit->plcp.config.ref_interval,
&nb_qam16_slots);
/* choose levels depending of wished robustness */
for (i = 0; i < 6; i++)
{
- if (ce_mcast_levels[i] + unit->ce.mcast_errors / ce_mcast_gap[i] < 0)
+ if (ce_mcast_levels[i] + unit->ce.mcast_errors / ce_mcast_gap[i] <
+ 0)
{
mcast_levels[i] = 0;
}
else
{
- mcast_levels[i] = ce_mcast_levels[i] + unit->ce.mcast_errors / ce_mcast_gap[i];
+ mcast_levels[i] =
+ ce_mcast_levels[i] +
+ unit->ce.mcast_errors / ce_mcast_gap[i];
}
}
/* noise analysis: calculate new quality. All bands lower than staticSpyBand are unused */
- ce_analyse_noise (unit, host->info->bpsk_noise, host->info->qam16_noise, nb_bpsk_slots, nb_qam16_slots,
- (1 << unit->plcp.config.static_spy_band) - 1, __quality, &mcast_levels[0], host->id);
+ ce_analyse_noise (unit, host->info->bpsk_noise,
+ host->info->qam16_noise, nb_bpsk_slots,
+ nb_qam16_slots,
+ (1 << unit->plcp.config.static_spy_band) - 1,
+ __quality, &mcast_levels[0], host->id);
/* copy the noise into a buffer for spidmonitoring */
ASSERT (ce_check_integrity (unit, __quality));
/* skip bad bands */
- __unused_bands = ce_get_unused_bands (unit, __quality, &__nb_used_bands);
+ __unused_bands =
+ ce_get_unused_bands (unit, __quality, &__nb_used_bands);
/* always set the syncBand as used */
__sync_band = host->syncBand;
@@ -3450,13 +3761,15 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
#endif
else if ((input->control->l_frm.subtype == MA_SUBTYPE_TEST_REQUEST) ||
- (input->control->l_frm.subtype == MA_SUBTYPE_UNUSED_TEST_REQUEST))
+ (input->control->l_frm.subtype ==
+ MA_SUBTYPE_UNUSED_TEST_REQUEST))
{
struct plcp_uchannel *test_uchannel, *uchannel;
int band, group, mod;
/* recover test channel */
- test_uchannel = plcp_get_uchannel_by_id (input->control->l_frm.channel_id);
+ test_uchannel =
+ plcp_get_uchannel_by_id (input->control->l_frm.channel_id);
if (test_uchannel == NULL)
return EINVAL_UCHANNEL;
@@ -3473,36 +3786,46 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
ce_change_syncband (host, test_uchannel);
/* remove every bands inferior to sync_band except this one */
test_uchannel->unused_bands =
- (test_uchannel->unused_bands | ((1 << host->syncBand) - 1)) & ~(1 << host->syncBand);
+ (test_uchannel->
+ unused_bands | ((1 << host->syncBand) -
+ 1)) & ~(1 << host->syncBand);
}
if (!(input->fake_rx_end))
{ /* on bad synchronisation for BER, let the syncband change but do not take BER measure in account */
/* analyse ber and estimate new quality (the sender has requested to do it) */
- plcp_update_group_ber (unit, input, BER_PATTERN_0123, __ber_valid, __ber_invalid);
+ plcp_update_group_ber (unit, input, BER_PATTERN_0123,
+ __ber_valid, __ber_invalid);
ce_delay (400);
}
else
{
RT_PRINTK ("BER special for fake_rx_end\n");
- PLCP_LOG (rxstart_isr_date, "CE_FAKE_BER", input->control->l_frm.subtype);
+ PLCP_LOG (rxstart_isr_date, "CE_FAKE_BER",
+ input->control->l_frm.subtype);
}
- ce_analyse_test (unit, test_uchannel->quality, test_uchannel->unused_bands, __quality);
+ ce_analyse_test (unit, test_uchannel->quality,
+ test_uchannel->unused_bands, __quality);
ASSERT (ce_check_integrity (unit, __quality));
/* skip bad bands */
- __unused_bands = ce_get_unused_bands (unit, __quality, &__nb_used_bands);
+ __unused_bands =
+ ce_get_unused_bands (unit, __quality, &__nb_used_bands);
/* always set the syncBand as used */
__sync_band = host->syncBand;
/* configure new channel (not test_id nor cur_id) */
- uchannel = ce_get_channel (unit, host, ch_input->cur_id, input->control->l_frm.channel_id, &__channel_id);
+ uchannel =
+ ce_get_channel (unit, host, ch_input->cur_id,
+ input->control->l_frm.channel_id,
+ &__channel_id);
if (uchannel == NULL)
return EINVAL_UCHANNEL;
uchannel->unused_bands = __unused_bands;
uchannel->nb_used_bands = __nb_used_bands;
- memcpy (uchannel->quality, __quality, PMD_MAX_BANDS * sizeof (struct pmd_band_quality));
+ memcpy (uchannel->quality, __quality,
+ PMD_MAX_BANDS * sizeof (struct pmd_band_quality));
uchannel_pilots (unit, uchannel);
// we suppose that the modulation has been calculated on host->syncBand for every sound frame
uchannel->robust = 0;
@@ -3517,10 +3840,13 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
extern struct plcp_uchannel *channels[PLCP_MAX_CHANNEL_ID]; // channels_id association
ASSERT (!(input->control->l_frm.channel_id < 0));
- ASSERT (!(input->control->l_frm.channel_id >= PLCP_MAX_CHANNEL_ID));
+ ASSERT (!
+ (input->control->l_frm.channel_id >=
+ PLCP_MAX_CHANNEL_ID));
RT_PRINTK ("DEBUG : channels[%d] : %x[%d]=%x\n",
+ input->control->l_frm.channel_id, channels,
input->control->l_frm.channel_id,
- channels, input->control->l_frm.channel_id, channels[input->control->l_frm.channel_id]);
+ channels[input->control->l_frm.channel_id]);
return EINVAL_UCHANNEL;
}
}
@@ -3539,7 +3865,8 @@ static int ce_read_request (struct plc_drv_unit *unit, struct plcp_host *host, s
}
/* calculate the transmitted power, depending on adapts, and notch */
-static double transmit_power (struct plc_drv_unit *unit, struct plcp_host *host, uint16_t tx_gain)
+static double transmit_power (struct plc_drv_unit *unit,
+ struct plcp_host *host, uint16_t tx_gain)
{
// for the moment we work on 7 bands
double pow, ref_pow, sum_adapt;
@@ -3613,7 +3940,8 @@ static int get_attenuation (double tx_power, double rx_power)
// we know the transmit power whatever the adapts, for the calibration gain
// we also know what should be the transmit power for this attenutation
// so we can calculate what should be the dgain to reach this targeted power.
-static int targeted_dgain (struct plc_drv_unit *unit, struct plcp_host *host, int nb_bands, int att)
+static int targeted_dgain (struct plc_drv_unit *unit, struct plcp_host *host,
+ int nb_bands, int att)
{
double p0, p1, ref_pow, power, gain;
int i, j;
@@ -3645,7 +3973,8 @@ static int targeted_dgain (struct plc_drv_unit *unit, struct plcp_host *host, in
return (int) (gain);
}
-static int targeted_dgain1 (struct plc_drv_unit *unit, struct plcp_host *host, int nb_bands, int att)
+static int targeted_dgain1 (struct plc_drv_unit *unit, struct plcp_host *host,
+ int nb_bands, int att)
{
double gain, c;
uint8_t br_used_bands;
@@ -3669,19 +3998,23 @@ static int targeted_dgain1 (struct plc_drv_unit *unit, struct plcp_host *host, i
}
/* read channel reply */
-static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *input)
+static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *input)
{
uint8_t subtype = input->control->l_frm.subtype;
bool ok = false;
- if ((subtype == MA_SUBTYPE_POWER_REPLY) || (subtype == MA_SUBTYPE_POWER_INV_REPLY))
+ if ((subtype == MA_SUBTYPE_POWER_REPLY) ||
+ (subtype == MA_SUBTYPE_POWER_INV_REPLY))
{
struct ce_rep_power *rep = (struct ce_rep_power *) input->d_buf;
- double tx_power, rx_power, tx_pow_dbm, rx_pow_dbm, tx_pow_dbmhz, rx_pow_dbmhz, n_dbm, n_dbmhz;
+ double tx_power, rx_power, tx_pow_dbm, rx_pow_dbm, tx_pow_dbmhz,
+ rx_pow_dbmhz, n_dbm, n_dbmhz;
int att, target;
double snr = 0;
- if (crc16 (input->d_buf, sizeof (struct ce_rep_power) - 2) == rep->cksum16)
+ if (crc16 (input->d_buf, sizeof (struct ce_rep_power) - 2) ==
+ rep->cksum16)
{
// rx_power is calculated on the second ref symbol, transmitted with test_data_gain
tx_power = transmit_power (unit, host, host->test_data_gain);
@@ -3693,19 +4026,26 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
att = get_attenuation (tx_power, rx_power);
tx_pow_dbm = POWER_TO_DBM (tx_power);
rx_pow_dbm = POWER_TO_DBM (rx_power);
- tx_pow_dbmhz = POWER_TO_DBM (tx_power / BANDWITH (unit->nb_bands));
- rx_pow_dbmhz = POWER_TO_DBM (rx_power / BANDWITH (unit->nb_bands));
+ tx_pow_dbmhz =
+ POWER_TO_DBM (tx_power / BANDWITH (unit->nb_bands));
+ rx_pow_dbmhz =
+ POWER_TO_DBM (rx_power / BANDWITH (unit->nb_bands));
if (host->glomer)
snr = 10 * log10 (rx_power / (host->glomer));
host->att = att;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "dgain = %d\n", host->test_data_gain);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "tx_power: %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "dgain = %d\n",
+ host->test_data_gain);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "tx_power: %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
tx_power, tx_pow_dbm, tx_pow_dbmhz);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "rx_power: %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "rx_power: %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
rx_power, rx_pow_dbm, rx_pow_dbmhz);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "agc = %d\n", rep->gain_agc);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "noise on the receiver = %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "agc = %d\n",
+ rep->gain_agc);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "noise on the receiver = %.1f glom^2, %.1f dBm, %.1f dBm/hz\n",
host->glomer, n_dbm, n_dbmhz);
RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "snr = %.1f dB\n", snr);
RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "att ~= %d dB\n", att);
@@ -3716,10 +4056,14 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
if (unit->ce.power_on)
{
target = targeted_dgain (unit, host, unit->nb_bands, att);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "target dgain = %d\n", target);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "target dgain = %d\n",
+ target);
/* evaluate the snr using the target OGAIN */
- host->snr = snr + 20 * log10 (((double) target) / ((double) host->test_data_gain));
+ host->snr =
+ snr +
+ 20 * log10 (((double) target) /
+ ((double) host->test_data_gain));
host->test_data_gain = target;
}
else
@@ -3733,8 +4077,10 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
else
{
RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
- "corrupted received quality in step power channel. pframe=%p, dbuf=%p\n ", input, input->d_buf);
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ "corrupted received quality in step power channel. pframe=%p, dbuf=%p\n ",
+ input, input->d_buf);
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
else if (subtype == MA_SUBTYPE_ADAPT_REPLY)
@@ -3744,9 +4090,11 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
// double sp_quad[PMD_MAX_BANDS];
int target;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "receive adapt reply for band %d\n", rep->band_no);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "receive adapt reply for band %d\n", rep->band_no);
- if (crc16 (input->d_buf, sizeof (struct ce_rep_adapt) - 2) == rep->cksum16)
+ if (crc16 (input->d_buf, sizeof (struct ce_rep_adapt) - 2) ==
+ rep->cksum16)
{
/* check first that the response bandno is the same as request bandno */
if (rep->band_no == host->next_band)
@@ -3755,11 +4103,14 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
int i, band, b;
band = host->next_band;
+#ifdef INCLUDE_HOST_MEMO
for (i = 0; i < PMD_CARRIERS_PER_BAND; i++)
{
- host->info->__all_spectrum[band][i] = ((double) rep->band_sp[i]) / (double) DOUBLE_TO_UINT16;
+ host->info->__all_spectrum[band][i] =
+ ((double) rep->band_sp[i]) /
+ (double) DOUBLE_TO_UINT16;
}
-
+#endif
/* pass to next band */
host->next_band++;
if (host->next_band > (PMD_MAX_BANDS - 1))
@@ -3769,12 +4120,15 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
{
int band;
int carrier;
- host->mapA = rt_malloc (sizeof (struct pmd_adapt_map));
+ host->mapA =
+ rt_malloc (sizeof (struct pmd_adapt_map));
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
{
- host->mapA->tead[band - 1][carrier] = pmd_get_control_adapt (band, carrier);
+ host->mapA->tead[band - 1][carrier] =
+ pmd_get_control_adapt (band, carrier);
}
}
}
@@ -3793,8 +4147,10 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
else
{
RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
- "corrupted received quality in step power channel. pframe=%p, dbuf=%p\n ", input, input->d_buf);
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ "corrupted received quality in step power channel. pframe=%p, dbuf=%p\n ",
+ input, input->d_buf);
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
@@ -3803,7 +4159,9 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
struct ce_rep_sound *rep = (struct ce_rep_sound *) input->d_buf;
bool cksum_ok;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_sound) - 2) == rep->cksum16) ? true : false;
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_sound) - 2) ==
+ rep->cksum16) ? true : false;
if (cksum_ok)
{
@@ -3818,8 +4176,11 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
uint8_t nb_used_bands;
bool cksum_ok;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_channel) - 2) == rep->cksum16) ? true : false;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n", rep->channel_id);
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_channel) - 2) ==
+ rep->cksum16) ? true : false;
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n",
+ rep->channel_id);
#ifdef CONFIG_PLC_CRYPTO
if (crypto_map_enable)
{
@@ -3833,16 +4194,19 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
/* use channel reply as test channel */
host->test_id = rep->channel_id;
/* current pilots are already registered */
- ce_load_quality (unit, host->test_uchannel->quality, rep->quality);
+ ce_load_quality (unit, host->test_uchannel->quality,
+ rep->quality);
/* always register unused bands, cause of pilots */
host->test_uchannel->unused_bands =
- ce_get_unused_bands (unit, host->test_uchannel->quality, &nb_used_bands);
+ ce_get_unused_bands (unit, host->test_uchannel->quality,
+ &nb_used_bands);
host->test_uchannel->nb_used_bands = nb_used_bands;
if (unit->plcp.config.fmode == PLCP_FMODE_SCAP)
{
/* always use sync_band for spy mode */
- host->test_uchannel->unused_bands &= ~(1 << (rep->sync_band - 1));
+ host->test_uchannel->unused_bands &=
+ ~(1 << (rep->sync_band - 1));
/* save the TX sync band */
host->tx_sync_band = rep->sync_band;
}
@@ -3852,7 +4216,8 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
}
if (nb_used_bands == 0)
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "reply for get_channel, no used bands\r\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "reply for get_channel, no used bands\r\n");
/* configure data pilots (useless for tx) */
uchannel_pilots (unit, host->test_uchannel);
@@ -3861,7 +4226,8 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
host->test_uchannel->mode = PLCP_MODE_FEC;
host->test_uchannel->ops = &plcp_uchannel_ops[PLCP_MODE_FEC];
/* and rebuild a lookup tables */
- host->test_uchannel->ops->build_lookup (unit, host->test_uchannel);
+ host->test_uchannel->ops->build_lookup (unit,
+ host->test_uchannel);
/* jump to next step */
#ifdef CONFIG_PLC_MCAST
/* stay in the same step but indicate that now we want a multicast channel */
@@ -3883,8 +4249,10 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
else
{
RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
- "corrupted received quality in step get channel. pframe=%p, dbuf=%p\n ", input, input->d_buf);
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ "corrupted received quality in step get channel. pframe=%p, dbuf=%p\n ",
+ input, input->d_buf);
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
#ifdef CONFIG_PLC_MCAST
@@ -3894,7 +4262,9 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
uint8_t nb_used_bands;
bool cksum_ok;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_channel) - 2) == rep->cksum16) ? true : false;
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_channel) - 2) ==
+ rep->cksum16) ? true : false;
#ifdef CONFIG_PLC_CRYPTO
if (crypto_map_enable)
{
@@ -3916,9 +4286,10 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
else
{
RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
- "corrupted received quality in step get mcast channel. pframe=%p, dbuf=%p\n ", input,
- input->d_buf);
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ "corrupted received quality in step get mcast channel. pframe=%p, dbuf=%p\n ",
+ input, input->d_buf);
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
#endif
@@ -3929,21 +4300,28 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
bool cksum_ok;
int band, group, mod;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_test) - 2) == rep->cksum16) ? true : false;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n", rep->channel_id);
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_test) - 2) ==
+ rep->cksum16) ? true : false;
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n",
+ rep->channel_id);
/* check integrity of the channel to avoid corrupted registering */
if (cksum_ok && ce_check_integrity (unit, rep->quality))
{
host->tx_unused_bands =
- ce_get_unused_bands (unit, rep->quality, &nb_used_bands) & host->uchannel->unused_bands;
+ ce_get_unused_bands (unit, rep->quality,
+ &nb_used_bands) & host->uchannel->
+ unused_bands;
host->step++;
ok = true;
}
else
{
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "corrupted received quality in step unused\n ");
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "corrupted received quality in step unused\n ");
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
else if (subtype == MA_SUBTYPE_TEST_REPLY)
@@ -3953,8 +4331,11 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
bool cksum_ok;
int band, group, mod;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_test) - 2) == rep->cksum16) ? true : false;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n", rep->channel_id);
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_test) - 2) ==
+ rep->cksum16) ? true : false;
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "RX_CHANNEL new_cid=%d\n",
+ rep->channel_id);
/* check integrity of the channel to avoid corrupted registering */
if (cksum_ok && ce_check_integrity (unit, rep->quality))
@@ -3963,16 +4344,19 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
/* use channel reply as test channel */
host->test_id = rep->channel_id;
/* current pilots are already registered */
- ce_load_quality (unit, host->test_uchannel->quality, rep->quality);
+ ce_load_quality (unit, host->test_uchannel->quality,
+ rep->quality);
/* always register unused bands, cause of pilots */
host->test_uchannel->unused_bands =
- ce_get_unused_bands (unit, host->test_uchannel->quality, &nb_used_bands);
+ ce_get_unused_bands (unit, host->test_uchannel->quality,
+ &nb_used_bands);
/* always use sync_band for spy mode */
if (unit->plcp.config.fmode == PLCP_FMODE_SCAP)
{
/* always use sync_band for spy mode */
- host->test_uchannel->unused_bands &= ~(1 << (rep->sync_band - 1));
+ host->test_uchannel->unused_bands &=
+ ~(1 << (rep->sync_band - 1));
/* save the TX sync band */
host->tx_sync_band = rep->sync_band;
}
@@ -3984,7 +4368,8 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
host->test_uchannel->nb_used_bands = nb_used_bands;
/* TODO: here we can detect any change in the sync_band */
if (nb_used_bands == 0)
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "reply for ber_test, no used bands\r\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "reply for ber_test, no used bands\r\n");
/* configure data pilots (useless for tx) */
uchannel_pilots (unit, host->test_uchannel);
@@ -3992,7 +4377,8 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
host->test_uchannel->mode = PLCP_MODE_FEC;
host->test_uchannel->ops = &plcp_uchannel_ops[PLCP_MODE_FEC];
/* and rebuild a lookup tables */
- host->test_uchannel->ops->build_lookup (unit, host->test_uchannel);
+ host->test_uchannel->ops->build_lookup (unit,
+ host->test_uchannel);
/* stay at step 3 nb_ber_test times */
host->remain_ber_test--;
if (host->remain_ber_test <= 0)
@@ -4004,17 +4390,22 @@ static bool ce_read_reply (struct plc_drv_unit *unit, struct plcp_host *host, st
}
else
{
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "corrupted received quality in step test\n ");
- printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__, __LINE__);
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "corrupted received quality in step test\n ");
+ printk ("%s:%d Check Sum in CE frame invalid\n", __FILE__,
+ __LINE__);
}
}
else if (subtype == MA_SUBTYPE_FAKE_DATA_REPLY)
{
if (unit->ce.iteratif)
{
- struct ce_rep_fake_data *rep = (struct ce_rep_fake_data *) input->d_buf;
+ struct ce_rep_fake_data *rep =
+ (struct ce_rep_fake_data *) input->d_buf;
bool cksum_ok;
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_rep_fake_data) - 2) == rep->cksum16) ? true : false;
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_rep_fake_data) - 2) ==
+ rep->cksum16) ? true : false;
if (cksum_ok)
{
@@ -4084,15 +4475,18 @@ static void ce_skip_step (struct plc_drv_unit *unit, struct plcp_host *host)
{ // use the data channel
host->test_id = host->id;
plcp_copy_channel (host->test_uchannel, host->uchannel);
- unused_bands = host->test_uchannel->unused_bands | unit->ce.unused_bands;
+ unused_bands =
+ host->test_uchannel->unused_bands | unit->ce.unused_bands;
host->test_uchannel->unused_bands = unused_bands;
- host->test_uchannel->nb_used_bands = byte_ones (unit->used_bands & (~unused_bands));
+ host->test_uchannel->nb_used_bands =
+ byte_ones (unit->used_bands & (~unused_bands));
}
#ifdef CONFIG_PLC_MCAST
else if (host->step == CE_STEP_MCAST_CHANNEL)
{
// consider the temp_quality is the last one (see CE_VALIDATE_STEP)
- memcpy (host->temp_quality, host->test_uchannel->quality, sizeof (__quality));
+ memcpy (host->temp_quality, host->test_uchannel->quality,
+ sizeof (__quality));
}
#endif
// else CE_STEP_UNUSED; CE_STEP_TEST; CE_STEP_VALIDATE; => nothing to skip
@@ -4102,7 +4496,9 @@ static void ce_skip_step (struct plc_drv_unit *unit, struct plcp_host *host)
}
/* validate the step and return the canceled timer */
-static struct ChannelTmo *ce_validate_step (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *input,
+static struct ChannelTmo *ce_validate_step (struct plc_drv_unit *unit,
+ struct plcp_host *host,
+ struct plcp_frame *input,
bool * ok)
{
struct ChannelTmo *ChannelTmo = NULL;
@@ -4111,7 +4507,8 @@ static struct ChannelTmo *ce_validate_step (struct plc_drv_unit *unit, struct pl
ChannelTmo = ce_cancel_timeout (&host->tx_timer);
if (ChannelTmo == NULL)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "cancel_timeout failed. tmo NOT IN msg queue\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "cancel_timeout failed. tmo NOT IN msg queue\n");
}
// this function should return ok=false is MA_SUBTYPE_ERROR_REPLY
@@ -4130,7 +4527,8 @@ static struct ChannelTmo *ce_validate_step (struct plc_drv_unit *unit, struct pl
* - True = doesn't need a answers.
* - False = need a reply... give the order to wait.
* ----------------------------------------------------------------------- */
-static bool ce_entry_step (struct plc_drv_unit *unit, struct plcp_host *host, struct ChannelTmo *ChannelTmo)
+static bool ce_entry_step (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct ChannelTmo *ChannelTmo)
{
/* get next frame in transmit pool */
struct plcp_frame *pframe;
@@ -4157,12 +4555,17 @@ static bool ce_entry_step (struct plc_drv_unit *unit, struct plcp_host *host, st
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- mod1 = plcp_get_group_modulation (&host->temp_quality[band], group);
- mod2 = plcp_get_group_modulation (&host->uchannel->quality[band], group);
+ mod1 =
+ plcp_get_group_modulation (&host->temp_quality[band],
+ group);
+ mod2 =
+ plcp_get_group_modulation (&host->uchannel->
+ quality[band], group);
// update group using the MIN
if (mod2 < mod1)
mod1 = mod2;
- plcp_set_group_modulation (&host->mcast_quality[band], group, mod1);
+ plcp_set_group_modulation (&host->mcast_quality[band],
+ group, mod1);
}
}
}
@@ -4215,8 +4618,10 @@ static bool ce_entry_step (struct plc_drv_unit *unit, struct plcp_host *host, st
pframe->ctrl_gain = host->test_ctrl_gain;
pframe->priv = ChannelTmo;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "send request [step %d, seqno %d, dlen %d, bssid= %d dtei = %d]\n", step,
- ch->seqno, pframe->d_len, ctl->l_frm.bssid, ctl->l_frm.DTEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "send request [step %d, seqno %d, dlen %d, bssid= %d dtei = %d]\n",
+ step, ch->seqno, pframe->d_len, ctl->l_frm.bssid,
+ ctl->l_frm.DTEI);
/* send the pframe. If queue full, the timeout will expire */
sent = ce_send_frame (unit, pframe);
@@ -4247,7 +4652,8 @@ static int is_active (struct plc_drv_unit *unit, struct plcp_host *host)
ce_inactivity = get_ticks () - host->tx_data_date;
/* station become inactive if ce_inactivity is long */
- if ((unit->mac.config.ce_inactivity == 0) || (ce_inactivity < unit->mac.config.ce_inactivity)
+ if ((unit->mac.config.ce_inactivity == 0) ||
+ (ce_inactivity < unit->mac.config.ce_inactivity)
#ifdef CONFIG_PLC_MCAST
|| is_multicast_tei (host->TEI)
#endif
@@ -4263,7 +4669,8 @@ static int is_active (struct plc_drv_unit *unit, struct plcp_host *host)
#ifdef CONFIG_PLC_MCAST
/* special step for multicast channels */
-static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, struct ChannelTmo *ChannelTmo)
+static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct ChannelTmo *ChannelTmo)
{
struct plcp_host *uhost_table[PLCP_MAX_HOST];
struct plcp_host *worst_host = NULL;
@@ -4277,10 +4684,12 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
struct ce_header *ch;
int msr, bps, worst_bps = 0;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "renew channel for multicast group" IEEE802_FMT "\n",
- IEEE802_VAL (host->mac_addr));
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "send mcast_indication with TEI %d in group" IEEE802_FMT "\n", host->TEI,
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "renew channel for multicast group" IEEE802_FMT "\n",
IEEE802_VAL (host->mac_addr));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "send mcast_indication with TEI %d in group" IEEE802_FMT "\n",
+ host->TEI, IEEE802_VAL (host->mac_addr));
// allocate a plcp frame for sending
pframe = plcp_alloc_tx_frame (sizeof (struct ce_ind_channel));
@@ -4320,7 +4729,8 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
if (!mc->uhost->used || !mc->uhost->init)
{
// host structure freed. This can happen if the host has been removed and the carp entry not updated
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "no link to join multicast memeber" IEEE802_FMT "\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "no link to join multicast memeber" IEEE802_FMT "\n",
IEEE802_VAL (mc->mac_addr));
continue;
}
@@ -4370,7 +4780,8 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
host->ctrl_gain = default_ogain;
// initialize modulations to QAM256
- plcp_copy_channel (host->uchannel, plcp_get_uchannel_by_id (PLCP_CID_QAM256));
+ plcp_copy_channel (host->uchannel,
+ plcp_get_uchannel_by_id (PLCP_CID_QAM256));
// calculate the tone map depending on unicast host associated
for (i = 0; i < nb_uhost && i < CE_MAX_UHOST; i++)
@@ -4379,11 +4790,18 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- mod1 = plcp_get_group_modulation (&host->uchannel->quality[band], group);
- mod2 = plcp_get_group_modulation (&uhost_table[i]->mcast_quality[band], group);
+ mod1 =
+ plcp_get_group_modulation (&host->uchannel->
+ quality[band], group);
+ mod2 =
+ plcp_get_group_modulation (&uhost_table[i]->
+ mcast_quality[band],
+ group);
// update group using the MIN
if (mod2 < mod1)
- plcp_set_group_modulation (&host->uchannel->quality[band], group, mod2);
+ plcp_set_group_modulation (&host->uchannel->
+ quality[band], group,
+ mod2);
}
}
}
@@ -4395,9 +4813,13 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- mod1 = plcp_get_group_modulation (&host->uchannel->quality[band], group);
+ mod1 =
+ plcp_get_group_modulation (&host->uchannel->
+ quality[band], group);
if (mod1 > 0)
- plcp_set_group_modulation (&host->uchannel->quality[band], group, mod1 - 1);
+ plcp_set_group_modulation (&host->uchannel->
+ quality[band], group,
+ mod1 - 1);
}
}
}
@@ -4408,7 +4830,8 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
// now copy the uchannel regardless of the mtu, cause use of chunk or
// rbpsk is automatically done in mac. ce.min_mtu become obsolete.
- mtu = plcp_get_max_data_len (unit, host->uchannel, unit->ce.max_slots);
+ mtu =
+ plcp_get_max_data_len (unit, host->uchannel, unit->ce.max_slots);
if (mtu > unit->ce.max_mtu)
{
@@ -4434,7 +4857,8 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
#ifdef CONFIG_PLC_ASSERT
if (nb_uhost > CE_MAX_UHOST)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "WARNING : tei_table too small detected\n");
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "WARNING : tei_table too small detected\n");
}
#endif
ind->cksum16 = crc16 (pframe->d_buf, pframe->d_len - 2);
@@ -4473,8 +4897,9 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
pframe->priv = ChannelTmo;
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "send mcast indication [step %d, seqno %d, dlen %d, bssid= %d dtei = %d]\n", host->step, ch->seqno,
- pframe->d_len, ctl->l_frm.bssid, ctl->l_frm.DTEI);
+ "send mcast indication [step %d, seqno %d, dlen %d, bssid= %d dtei = %d]\n",
+ host->step, ch->seqno, pframe->d_len, ctl->l_frm.bssid,
+ ctl->l_frm.DTEI);
/* send the pframe. If queue full, the timeout will expire */
sent = ce_send_frame (unit, pframe);
@@ -4497,7 +4922,8 @@ static void ce_mcast_step (struct plc_drv_unit *unit, struct plcp_host *host, st
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
plcp_free_tx_frame (pframe);
/* retreive the ChannelTmo */
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.mcast_period);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.mcast_period);
}
}
@@ -4519,18 +4945,24 @@ uint32_t ce_dataRateFromBytePerSlot (uint32_t byte_per_slot)
#endif
/* jump to next step */
-static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, struct ChannelTmo *ChannelTmo)
+static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct ChannelTmo *ChannelTmo)
{
while (host->step < CE_NB_STEPS)
{
// bypass SOUND frames if link state is unstable, or no remaining sound
- if ((host->step == CE_STEP_SOUND && ((host->link_state == LINK_STATE_UNSTABLE) || (host->remain_sound == 0)))
+ if ((host->step == CE_STEP_SOUND &&
+ ((host->link_state == LINK_STATE_UNSTABLE) ||
+ (host->remain_sound == 0)))
// bypass TEST frames if remain_ber_test is set o zero, or no remaining ber frame s// BER is use for stats in ce iteratif
|| (host->step == CE_STEP_TEST
- && ((unit->ce.iteratif) || (host->remain_ber_test == 0 || host->test_uchannel->nb_used_bands == 0)))
+ && ((unit->ce.iteratif) ||
+ (host->remain_ber_test == 0 ||
+ host->test_uchannel->nb_used_bands == 0)))
#ifdef CONFIG_PLC_MCAST
// bypass MCAST_GET_CHANNEL is multicast disabled, or board is not a master
- || ((host->step == CE_STEP_MCAST_CHANNEL) && (!igmp_query_enable || (unit->mode != repeater)))
+ || ((host->step == CE_STEP_MCAST_CHANNEL) &&
+ (!igmp_query_enable || (unit->mode != repeater)))
#endif
// bypass KEEPALIVE step is remote station is active
|| ((unit->config_medium == MEDIUM_CABLE) &&
@@ -4538,11 +4970,13 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
((host->step == CE_STEP_POWER && host->id != PLCP_CID_NONE)
// Real spectrum can only be calculated in spy mode
|| (host->step == CE_STEP_POWER_INV
- && (host->id != PLCP_CID_NONE || unit->plcp.config.fmode != PLCP_FMODE_SCAP))))
+ && (host->id != PLCP_CID_NONE ||
+ unit->plcp.config.fmode != PLCP_FMODE_SCAP))))
// bypass TEST frames if remain_ber_test is set o zero
|| (host->step == CE_STEP_KEEPALIVE && is_active (unit, host))
|| (host->step == CE_STEP_FAKE_DATA
- && (host->nb_quick_pass_of_ce <= 0 || host->uchannel->mode != PLCP_MODE_FEC)))
+ && (host->nb_quick_pass_of_ce <= 0 ||
+ host->uchannel->mode != PLCP_MODE_FEC)))
{
ce_skip_step (unit, host);
}
@@ -4578,10 +5012,12 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
}
}
+ host->ce_nsuccess = 0; // CE is working..
#ifdef CONFIG_PLC_PPC
/* If new channel is calculated call the l2_host_update function. */
- if (host->chg_tx_uchannel != host->uchannel || host->chg_rx_channel != host->rx_channel)
+ if (host->chg_tx_uchannel != host->uchannel ||
+ host->chg_rx_channel != host->rx_channel)
{
host->chg_tx_uchannel = host->uchannel;
host->chg_rx_channel = host->rx_channel;
@@ -4594,16 +5030,20 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
memcpy (host->ppc_host.hw_addr, host->mac_addr, ETH_ALEN);
host->ppc_host.tx_link_quality.raw_bandwidth =
- ce_dataRateFromBytePerSlot (plcp_slot_rate (unit, host->uchannel));
+ ce_dataRateFromBytePerSlot (plcp_slot_rate
+ (unit, host->uchannel));
host->ppc_host.rx_link_quality.raw_bandwidth =
- ce_dataRateFromBytePerSlot (plcp_slot_rate (unit, plcp_get_uchannel_by_id (host->rx_channel)));
+ ce_dataRateFromBytePerSlot (plcp_slot_rate
+ (unit,
+ plcp_get_uchannel_by_id
+ (host->rx_channel)));
- l2_ppc->l2_host_update (&host->ppc_host);
+ // Function l2_host_update will be called in linux context.
+ send_r2l_sig (PPC_HOST_UPDATE, &host->ppc_host);
}
}
#endif
-#ifdef CE_ITERATIF
if (unit->ce.oneshot)
{
ce_destroy_timeout (ChannelTmo);
@@ -4611,7 +5051,6 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
host->link_state = LINK_STATE_MANUAL;
return;
}
-#endif
#ifdef ONESHOT_PREEQUALIZATION
/* ce is one shot during adaptation */
@@ -4633,7 +5072,8 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
{
host->ce_state = CE_STATE_I_STEP;
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.period);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.period);
}
else
{
@@ -4659,7 +5099,8 @@ static void ce_next_step (struct plc_drv_unit *unit, struct plcp_host *host, str
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-static void ce_execute_step (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *input)
+static void ce_execute_step (struct plc_drv_unit *unit,
+ struct plcp_host *host, struct plcp_frame *input)
{
struct plcp_frame *pframe;
union plcp_control *ctl;
@@ -4687,7 +5128,8 @@ static void ce_execute_step (struct plc_drv_unit *unit, struct plcp_host *host,
rep_subtype = subtype_reply[input->control->l_frm.subtype];
/* fill frame payload (depends of input subtype) */
- pframe->d_len = ce_write_reply (unit, host, rep_subtype, pframe->d_buf);
+ pframe->d_len =
+ ce_write_reply (unit, host, rep_subtype, pframe->d_buf);
}
else
{
@@ -4721,7 +5163,8 @@ static void ce_execute_step (struct plc_drv_unit *unit, struct plcp_host *host,
pframe->host = host;
pframe->priv = NULL;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "send reply with subtype %d\n", ctl->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "send reply with subtype %d\n",
+ ctl->l_frm.subtype);
/* send the frame. Dont care about queue full cause sender will have tmo anyway */
if (!ce_send_frame (unit, pframe))
@@ -4741,7 +5184,8 @@ static void ce_execute_step (struct plc_drv_unit *unit, struct plcp_host *host,
*
*********************************************************************************/
-static void ce_status_update (struct plc_drv_unit *unit, struct plcp_host *host)
+static void ce_status_update (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
struct ChannelTmo *ChannelTmo;
@@ -4762,7 +5206,8 @@ static void ce_status_update (struct plc_drv_unit *unit, struct plcp_host *host)
ChannelTmo = ce_cancel_timeout (&host->tx_timer);
if (ChannelTmo == NULL)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "unchreq: cancel_tmo failed.\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "unchreq: cancel_tmo failed.\n");
}
host->link_state = LINK_STATE_UNSTABLE;
/* continue (increment seqno into this function) */
@@ -4780,7 +5225,8 @@ static void ce_status_update (struct plc_drv_unit *unit, struct plcp_host *host)
#ifdef CONFIG_PLC_MCAST
-static void ce_event_update_mcast (struct plc_drv_unit *unit, struct plcp_host *host)
+static void ce_event_update_mcast (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
struct ChannelTmo *ChannelTmo;
@@ -4789,7 +5235,8 @@ static void ce_event_update_mcast (struct plc_drv_unit *unit, struct plcp_host *
{
case CE_STATE_SENDING:
// ok do nothing cause an indication has just been sent
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "IGN: ce_event_update_mcast at state %s\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "IGN: ce_event_update_mcast at state %s\n",
mac_state_name[host->ce_state]);
break;
@@ -4803,7 +5250,8 @@ static void ce_event_update_mcast (struct plc_drv_unit *unit, struct plcp_host *
break;
default:
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "ERR: ce_event_update_mcast at state %s\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "ERR: ce_event_update_mcast at state %s\n",
mac_state_name[host->ce_state]);
break;
}
@@ -4817,7 +5265,8 @@ static void ce_event_update_mcast (struct plc_drv_unit *unit, struct plcp_host *
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-static void ce_event_request (struct plc_drv_unit *unit, struct MmduIndicate *mm_ind)
+static void ce_event_request (struct plc_drv_unit *unit,
+ struct MmduIndicate *mm_ind)
{
struct plcp_frame *pframe;
struct plcp_host *host;
@@ -4832,7 +5281,8 @@ static void ce_event_request (struct plc_drv_unit *unit, struct MmduIndicate *mm
host->stats.nb_recv_request++;
/* whatever host state, make the response */
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "recv request of subtype %d\n", pframe->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "recv request of subtype %d\n",
+ pframe->control->l_frm.subtype);
/* handle the request */
ce_execute_step (unit, host, pframe);
@@ -4842,7 +5292,8 @@ static void ce_event_request (struct plc_drv_unit *unit, struct MmduIndicate *mm
}
/* handle channel indications */
-static void ce_event_indicate (struct plc_drv_unit *unit, struct MmduIndicate *mm_ind)
+static void ce_event_indicate (struct plc_drv_unit *unit,
+ struct MmduIndicate *mm_ind)
{
struct plcp_frame *input = (struct plcp_frame *) mm_ind->pframe;
@@ -4857,10 +5308,15 @@ static void ce_event_indicate (struct plc_drv_unit *unit, struct MmduIndicate *m
if (input->control->l_frm.subtype == MA_SUBTYPE_MCAST_INDICATION)
{
- cksum_ok = (crc16 (input->d_buf, sizeof (struct ce_ind_channel) - 2) == ind->cksum16) ? true : false;
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "RX_MCAST_CHANNEL new_cid=%d, mcast_tei=%d, tei_num=%d, ch->seqno=%d\n",
+ cksum_ok =
+ (crc16 (input->d_buf, sizeof (struct ce_ind_channel) - 2) ==
+ ind->cksum16) ? true : false;
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "RX_MCAST_CHANNEL new_cid=%d, mcast_tei=%d, tei_num=%d, ch->seqno=%d\n",
ind->channel_id, ind->mcast_tei, ind->tei_num, ch->seqno);
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "recv mcast_indication with TEI %d\n", input->control->l_frm.DTEI);
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "recv mcast_indication with TEI %d\n",
+ input->control->l_frm.DTEI);
/* check integrity of the channel to avoid corrupted registering */
if (cksum_ok && ce_check_integrity (unit, ind->quality))
@@ -4876,7 +5332,8 @@ static void ce_event_indicate (struct plc_drv_unit *unit, struct MmduIndicate *m
/* current pilots are already registered */
ce_load_quality (unit, uchannel->quality, ind->quality);
/* always register unused bands, cause of pilots */
- uchannel->unused_bands = ce_get_unused_bands (unit, uchannel->quality, &nb_used_bands);
+ uchannel->unused_bands =
+ ce_get_unused_bands (unit, uchannel->quality, &nb_used_bands);
uchannel->nb_used_bands = nb_used_bands;
/* configure data pilots (useless for tx) */
uchannel_pilots (unit, uchannel);
@@ -4912,16 +5369,21 @@ static void ce_event_indicate (struct plc_drv_unit *unit, struct MmduIndicate *m
}
if (own)
status_back =
- add_to_multicast_stream (ind->mcast_tei, ind->mc_group, ind->proxy_tei, ind->channel_id,
+ add_to_multicast_stream (ind->mcast_tei, ind->mc_group,
+ ind->proxy_tei, ind->channel_id,
uchannel->index);
else
status_back = del_from_multicast_stream (ind->mcast_tei);
- RT_PRINTM (TRACE_MCAST, TRACE_ERROR, "MCAST_INDICATION : status_back (own=%d) = %d \n", own, status_back);
+ RT_PRINTM (TRACE_MCAST, TRACE_ERROR,
+ "MCAST_INDICATION : status_back (own=%d) = %d \n", own,
+ status_back);
}
else
{
- RT_PRINTM (TRACE_MCAST, TRACE_ERROR, "MCAST_INDICATION : check integrity fail (%d) \n", cksum_ok);
+ RT_PRINTM (TRACE_MCAST, TRACE_ERROR,
+ "MCAST_INDICATION : check integrity fail (%d) \n",
+ cksum_ok);
}
}
else
@@ -4951,17 +5413,22 @@ static void ce_event_indicate (struct plc_drv_unit *unit, struct MmduIndicate *m
}
/* -----------------------------------------------------------------------
- * DESCRIPTION :
+ * DESCRIPTION : Message received. Decide what to do on reply
+ * 1. Msg is ok. Prepare next CE step. LINK_UNSTABLE -> next_step directly
+ * else delay next step for ce.period ms
+ * if msg is not for this CE restart the CE completely. MJ 22.01.2008
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_ind)
+static void ce_event_reply (struct plc_drv_unit *unit,
+ struct MmduIndicate *mm_ind)
{
struct plcp_frame *pframe;
struct ce_header *ch;
struct plcp_host *host;
- struct ChannelTmo *ChannelTmo;
+ struct ChannelTmo *ChannelTmo = 0;
bool ok;
+ uint8_t reset_proc = 0;
/* if process has been stopped, ignore received frame */
/* TODO: this test must be done during handle_rx */
@@ -4973,9 +5440,12 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
if (ch->session == (unit->ce.session & 0xf))
{
/* skip this frame if step is not the good. */
- if ((host->ce_state == CE_STATE_W_REPLY) && (ch->seqno == (host->seqno & 0xf)))
+ if ((host->ce_state == CE_STATE_W_REPLY) &&
+ (ch->seqno == (host->seqno & 0xf)))
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "recv reply of subtype %d\n", pframe->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "recv reply of subtype %d\n",
+ pframe->control->l_frm.subtype);
/* consider this frame has a response */
host->no_response = 0;
@@ -4995,7 +5465,9 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
{
int status = (int) ch->cur_id;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "received error_reply with status=%d\n", status);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "received error_reply with status=%d\n",
+ status);
unit->stats.ce.nb_error_reply++;
// the status is hidden in the control header, cur_id field
switch (status)
@@ -5011,7 +5483,8 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
// restart later the same step
host->ce_state = CE_STATE_I_STEP;
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.period);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.period);
break;
case EINVAL_BAD_SYNC:
@@ -5019,7 +5492,8 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
// restart later the same step
host->ce_state = CE_STATE_I_STEP;
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.period);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.period);
// enter next step immediately
break;
@@ -5042,11 +5516,14 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
else
{
/* start timer for next step */
- if (host->link_state == LINK_STATE_STABLE && unit->ce.period > 0)
+ if (host->link_state == LINK_STATE_STABLE &&
+ unit->ce.period > 0)
{
host->ce_state = CE_STATE_I_STEP;
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.period);
+ host->ce_nsuccess = 0; // CE is working..
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.period);
}
else
{
@@ -5058,14 +5535,36 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
{ /* probably due to timer expiration */
RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
"recv ignored [subtype=%d, host->seqno=%d, reply->seqno=%d] at state %d\n",
- pframe->control->l_frm.subtype, (host->seqno & 0xf), ch->seqno, host->ce_state);
+ pframe->control->l_frm.subtype, (host->seqno & 0xf),
+ ch->seqno, host->ce_state);
host->stats.bad_step++;
unit->stats.ce.bad_step++;
+ reset_proc = 1; /* reset whole CE process and start from step=0; */
}
}
else
{
unit->stats.ce.bad_session++;
+ reset_proc = 1; /* reset whole CE process and start from step=0; */
+ }
+
+ /* Bad result, reset the whole CE process for that host.. */
+ if (reset_proc)
+ {
+ ce_init_step (unit, host);
+ if (!ChannelTmo)
+ ChannelTmo = ce_cancel_timeout (&host->tx_timer);
+ if (ChannelTmo)
+ {
+ ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
+ ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.period);
+ }
+ else
+ RT_PRINTK
+ ("REALY BED, NO TIMER IN CE PROCESS, RESET THE HOST AND CE PROCESS\n");
+
+ RT_PRINTK
+ ("RESETING THE CE PROCESS DUE TO BAD CE PARAMETERS, SESSION OR STEP\n");
}
/* free received frame */
@@ -5073,7 +5572,8 @@ static void ce_event_reply (struct plc_drv_unit *unit, struct MmduIndicate *mm_i
}
/* the frame has been sent */
-static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn)
+static void ce_event_sent (struct plc_drv_unit *unit,
+ struct MmduConfirm *mm_cfn)
{
struct plcp_frame *pframe;
struct ChannelTmo *ChannelTmo;
@@ -5102,7 +5602,8 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
if (host == NULL)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "ce_event_sent: host is NULL \n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "ce_event_sent: host is NULL \n");
}
else
{
@@ -5136,7 +5637,9 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
{
if (host->ce_state != CE_STATE_SENDING)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "ce_event_sent: host tmo at state %d\n", host->ce_state);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "ce_event_sent: host tmo at state %d\n",
+ host->ce_state);
}
#ifdef CONFIG_PLC_MCAST
else if (is_multicast_tei (host->TEI))
@@ -5147,7 +5650,8 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
host->ce_state = CE_STATE_I_STEP;
ChannelTmo->sig_no = CE_TIMEOUT_WAIT;
host->link_state = LINK_STATE_STABLE;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.mcast_period);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.mcast_period);
}
else
{
@@ -5166,7 +5670,8 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
host->ce_state = CE_STATE_W_REPLY;
/* start timeout */
ChannelTmo->sig_no = CE_TIMEOUT_REPLY;
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.timeout);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.timeout);
}
}
else
@@ -5183,7 +5688,8 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
ASSERT (ChannelTmo->host == host);
ChannelTmo->sig_no = CE_TIMEOUT_REPLY;
// CG: now insert a timeout to avoid consecutif frames spamming.
- ce_request_timeout (ChannelTmo, &host->tx_timer, unit->ce.timeout);
+ ce_request_timeout (ChannelTmo, &host->tx_timer,
+ unit->ce.timeout);
return;
}
}
@@ -5194,7 +5700,8 @@ static void ce_event_sent (struct plc_drv_unit *unit, struct MmduConfirm *mm_cfn
/* Manage timeout events */
-static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *ChannelTmo)
+static void ce_event_timeout (struct plc_drv_unit *unit,
+ struct ChannelTmo *ChannelTmo)
{
struct plcp_host *host; // host destination
@@ -5206,11 +5713,14 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
}
#ifdef CONFIG_PLC_ASSERT
- if (!(host->ce_state == CE_STATE_W_REPLY || host->ce_state == CE_STATE_EXITING))
+ if (!
+ (host->ce_state == CE_STATE_W_REPLY ||
+ host->ce_state == CE_STATE_EXITING))
{
- rt_printk ("timeout at state %d. host: index=%d, MAC=%02x, link=%d, step=%d, ChannelTmo=%p, tmo->signo=%d\n",
- host->ce_state, host->index, host->mac_addr[5], host->link_state, host->step, ChannelTmo,
- ChannelTmo->sig_no);
+ rt_printk
+ ("timeout at state %d. host: index=%d, MAC=%02x, link=%d, step=%d, ChannelTmo=%p, tmo->signo=%d\n",
+ host->ce_state, host->index, host->mac_addr[5], host->link_state,
+ host->step, ChannelTmo, ChannelTmo->sig_no);
}
#endif
if (host->ce_state == CE_STATE_W_REPLY)
@@ -5220,9 +5730,11 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
host->stats.nb_tmo_request++;
/* first check if link restart */
if (host->link_state == LINK_STATE_RESTART ||
- (!unit->ce.removing_enabled && host->no_response > unit->ce.no_response))
+ (!unit->ce.removing_enabled &&
+ host->no_response > unit->ce.no_response))
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d RESTARTED!!\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "host TEI %d RESTARTED!!\n", host->TEI);
/* redo all the steps quickly cause the remote side want it */
host->link_state = LINK_STATE_INIT;
@@ -5240,7 +5752,9 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
/* else check if remove the host */
else if (host->no_response > unit->ce.no_response)
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d unreacheable: removing host\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "host TEI %d unreacheable: removing host\n",
+ host->TEI);
host->ce_state = CE_STATE_EXITING;
ce_real_stop_host (unit, host);
@@ -5251,7 +5765,8 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
/* otherwise retry the frame */
else
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "tmo_reply => retry for host TEI = %d\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "tmo_reply => retry for host TEI = %d\n", host->TEI);
ce_next_step (unit, host, ChannelTmo);
}
}
@@ -5260,7 +5775,8 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
int host_free = 1;
int prio;
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d: checking host\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d: checking host\n",
+ host->TEI);
// check if all mac frames have been transmitted
for (prio = 0; prio < MAC_NB_PRIO; prio++)
{
@@ -5287,10 +5803,34 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
host_free = 0;
}
+ // forcely kill host ...
+ if (!host_free)
+ {
+ if (++ChannelTmo->num_retry > CE_MAX_NUM_RETRY * 8)
+ {
+ host_free = 1;
+ //empty_plcp_host (host, 0);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_WARNING,
+ "host TEI %d: FORCELY EMPTIED & KILLED ",
+ host->TEI);
+ }
+ else
+ {
+ if ((ChannelTmo->num_retry & 0xF) == 1)
+ {
+ //empty_plcp_host (host, 1);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_WARNING,
+ "host TEI %d: RETRY %d ", host->TEI,
+ ChannelTmo->num_retry);
+ }
+ }
+ }
+
if (host_free)
{
// remove carp entries for this host
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d: FREE, now destroy\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "host TEI %d: FREE, now destroy\n", host->TEI);
if (unit->mode == station && host->TEI == TEI_MASTER)
{
struct plcp_host *bhost;
@@ -5305,26 +5845,31 @@ static void ce_event_timeout (struct plc_drv_unit *unit, struct ChannelTmo *Chan
bhost->BSSID = unit->BSSID;
}
+ ce_destroy_pro (host);
nd_free_host (unit, host);
}
else
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d: NOT FREE, wait again\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "host TEI %d: NOT FREE, wait again\n", host->TEI);
// if not, re-request timeout
ce_request_timeout (ChannelTmo, &host->tx_timer, 100);
}
}
else
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "tmo_reply error: host index=%d, state=%d, step=%d, rem_ber=%d\n",
- host->index, host->ce_state, host->step, host->remain_ber_test);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "tmo_reply error: host index=%d, state=%d, step=%d, rem_ber=%d\n",
+ host->index, host->ce_state, host->step,
+ host->remain_ber_test);
/* timeout is probably late */
ce_destroy_timeout (ChannelTmo);
}
}
/* Manage timeout events */
-static void ce_event_tmo_wait (struct plc_drv_unit *unit, struct ChannelTmo *ChannelTmo)
+static void ce_event_tmo_wait (struct plc_drv_unit *unit,
+ struct ChannelTmo *ChannelTmo)
{
struct plcp_host *host; // host destination
@@ -5350,12 +5895,71 @@ static void ce_event_tmo_wait (struct plc_drv_unit *unit, struct ChannelTmo *Cha
}
else
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "tmo_wait at state %d\n", host->ce_state);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "tmo_wait at state %d\n",
+ host->ce_state);
ce_next_step (unit, host, ChannelTmo);
}
}
-static void ce_event_status_indicate (struct plc_drv_unit *unit, struct ChannelCtl *ChannelCtl)
+// global management of CE timer process
+static void ce_event_tmo_est (struct plc_drv_unit *unit,
+ struct ChannelTmo *ChannelTmo)
+{
+ struct plcp_host *host = ChannelTmo->host;
+ int set_tim = 1, kill_host = 0, big_retry = 1;
+
+ if (host->ce_nsuccess < 4)
+ host->ce_nsuccess++;
+
+ if (host->ce_nsuccess == 3)
+ {
+ host->ce_state = CE_STATE_EXITING;
+ ce_real_stop_host (unit, host);
+ empty_plcp_host (host, 1);
+ host->ce_ns_retry = 0;
+ big_retry = 0;
+ }
+
+ if (host->ce_nsuccess >= 4)
+ {
+ if (is_host_empty (host) || host->ce_ns_retry++ > 100)
+ kill_host = 1;
+ big_retry = 0;
+ }
+
+ if (kill_host)
+ {
+ // error ce is stalled
+ //rt_printk("rusim host namerno = 10s\n");
+ host->ce_state = CE_STATE_EXITING;
+ ce_destroy_timeout (ChannelTmo);
+ if (!is_host_empty (host))
+ empty_plcp_host (host, 0);
+ set_tim = 0;
+ if (unit->mode == station && host->TEI == TEI_MASTER)
+ {
+ struct plcp_host *bhost;
+
+ unit->TEI = TEI_UNDEF;
+ unit->BSSID = BSSID_UNDEF;
+ unit->attachBSSID = BSSID_UNDEF;
+ unit->defaultBSSID = BSSID_UNDEF;
+ unit->localTEI = TEI_UNDEF;
+ // update broadcast host bssid
+ bhost = plcp_get_host_by_index (0);
+ bhost->BSSID = unit->BSSID;
+ }
+ unit->stats.ce.nb_tmo_est++;
+ nd_free_host (unit, host);
+ }
+
+ if (set_tim)
+ ce_request_timeout (ChannelTmo, &host->ce_timer,
+ (big_retry) ? unit->ce.period : 100);
+}
+
+static void ce_event_status_indicate (struct plc_drv_unit *unit,
+ struct ChannelCtl *ChannelCtl)
{
struct plcp_host *host;
union SIGNAL *sig;
@@ -5403,8 +6007,9 @@ static void ce_event_status_indicate (struct plc_drv_unit *unit, struct ChannelC
pframe->ctrl_gain = host->ctrl_gain;
pframe->priv = NULL;
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "send remote error [step %d, dlen %d, bssid= %d dtei = %d]\n", host->step,
- pframe->d_len, ctl->l_frm.bssid, ctl->l_frm.DTEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "send remote error [step %d, dlen %d, bssid= %d dtei = %d]\n",
+ host->step, pframe->d_len, ctl->l_frm.bssid, ctl->l_frm.DTEI);
/* send the pframe. If queue full, the timeout will expire */
if (!ce_send_frame (unit, pframe))
@@ -5416,7 +6021,8 @@ static void ce_event_status_indicate (struct plc_drv_unit *unit, struct ChannelC
}
/* start link to a host */
-static void ce_event_start (struct plc_drv_unit *unit, struct ChannelCtl *ChannelCtl)
+static void ce_event_start (struct plc_drv_unit *unit,
+ struct ChannelCtl *ChannelCtl)
{
struct plcp_host *host;
struct ChannelTmo *ChannelTmo;
@@ -5435,13 +6041,20 @@ static void ce_event_start (struct plc_drv_unit *unit, struct ChannelCtl *Channe
/* init host sequence number for all the session */
host->seqno = 0;
host->data_seqno = 0;
+ host->ce_nsuccess = 0;
/* at the start of the link we are in rafale mode */
host->link_state = LINK_STATE_INIT;
host->nb_quick_pass_of_ce = NB_QUICK_CE_ON_STARTING;
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "received CE_START_REQUEST for host %d\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "received CE_START_REQUEST for host %d\n", host->TEI);
/* allocate ressource for timer */
+ ChannelTmo = ce_create_timeout (host, 1);
+ ASSERT (ChannelTmo);
+ ChannelTmo->sig_no = CE_TIMEOUT_EST;
+ ce_request_timeout (ChannelTmo, &host->ce_timer, unit->ce.period);
+
ChannelTmo = ce_create_timeout (host, 0);
ASSERT (ChannelTmo);
@@ -5486,7 +6099,8 @@ static void ce_event_start (struct plc_drv_unit *unit, struct ChannelCtl *Channe
/* stop a link to a host */
-static void ce_event_stop (struct plc_drv_unit *unit, struct ChannelCtl *ChannelCtl)
+static void ce_event_stop (struct plc_drv_unit *unit,
+ struct ChannelCtl *ChannelCtl)
{
/* stop event */
struct plcp_host *host;
@@ -5533,11 +6147,7 @@ void ce_init (struct plc_drv_unit *unit)
* [1] Global config (Used by check function)
*/
unit->expert_config.ce.config_medium = MEDIUM_CABLE;
-#ifdef CE_ITERATIF
unit->expert_config.ce.mode = CE_ITERATIVE_CONFIG;
-#else
- unit->expert_config.ce.mode = CE_CLASSIC_CONFIG;
-#endif
/*
* [2] Config when we are in Expert mode (look sysctl for more information)
@@ -5552,13 +6162,8 @@ void ce_init (struct plc_drv_unit *unit)
unit->expert_config.ce.levels[3] = 19; // QAM16
unit->expert_config.ce.levels[4] = 10; // QAM64
unit->expert_config.ce.levels[5] = 7; // QAM256
-#ifdef CE_ITERATIF
unit->expert_config.ce.iteratif = true;
unit->expert_config.ce.auto_correct = RX_AUTO_CORRECT;
-#else
- unit->expert_config.ce.iteratif = false;
- unit->expert_config.ce.auto_correct = TX_AUTO_CORRECT;
-#endif
/*
@@ -5588,7 +6193,6 @@ void ce_init (struct plc_drv_unit *unit)
unit->ce.agc_goal1 = 64;
unit->ce.agc_goal2 = 96;
unit->ce.mcast_errors = 0;
-#ifdef CE_ITERATIF
unit->ce.oneshot = 0;
unit->ce.coefnoise = 32; /* the noise window is 9 measures for average */
unit->ce.auto_ajust = 1;
@@ -5599,7 +6203,8 @@ void ce_init (struct plc_drv_unit *unit)
unit->ce.rate_error_max = unit->ce.nb_frames_min / 10; // 10 %
unit->ce.distMinUp = -50;
unit->ce.distMaxDown = 200;
-#endif
+
+ unit->stats.ce.nb_tmo_est = 0; // Number of forced killing of host..
/*------------------- patch for EC --------------------------------*/
unit->ce.data_power = DATA_POWER_MANUAL;
@@ -5711,7 +6316,8 @@ void ce_restart_host (struct plc_drv_unit *unit, struct plcp_host *host)
ce_stop_host (unit, host);
/* reset host current ID */
ce_apply_default_uchannel (unit, host);
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d RESETED!!\n", host->TEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "host TEI %d RESETED!!\n",
+ host->TEI);
unit->stats.ce.nb_restart++;
ce_start_host (unit, host);
}
@@ -5735,6 +6341,8 @@ void ce_event_kill_host (struct plc_drv_unit *unit, struct plcp_host *host)
case CE_STATE_SENDING:
// here we can do nothing
host->kill = 1;
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "kill host [HOW!!!!!!!!!!] TEI %d\n", host->TEI);
return;
case CE_STATE_I_STEP:
case CE_STATE_W_REPLY:
@@ -5750,12 +6358,14 @@ void ce_event_kill_host (struct plc_drv_unit *unit, struct plcp_host *host)
// Set a 100 ms timer waiting for Rx frames and CCO for the current host
ChannelTmo->sig_no = CE_TIMEOUT_REPLY;
+ ChannelTmo->num_retry = 0;
ce_request_timeout (ChannelTmo, &host->tx_timer, 100);
}
/* interrupt handler for mesure storage. Assert is_channel_estimation_request */
-void ce_rx_data_isr (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe)
+void ce_rx_data_isr (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe)
{
uint16_t tmp;
uint16_t gain_agc;
@@ -5782,8 +6392,9 @@ void ce_rx_data_isr (struct plc_drv_unit *unit, struct plcp_host *host, struct p
/* get spectrum only to eligibled bands, else set zero */
ce_get_spectrum (__ce_rx_bands);
}
- else if ((pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_REQUEST) ||
- (pframe->control->l_frm.subtype == MA_SUBTYPE_UNUSED_TEST_REQUEST))
+ else if ((pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_REQUEST)
+ || (pframe->control->l_frm.subtype ==
+ MA_SUBTYPE_UNUSED_TEST_REQUEST))
{
plcp_prepare_payload_ber (unit, pframe);
}
@@ -5794,7 +6405,9 @@ void ce_rx_data_isr (struct plc_drv_unit *unit, struct plcp_host *host, struct p
/*****************new_gain********/
if (host->smooth_factorAGC < 8)
host->smooth_factorAGC++;
- host->data_agc_av += (uint16_t) ((8 * __data_agc - host->data_agc_av) / host->smooth_factorAGC);
+ host->data_agc_av +=
+ (uint16_t) ((8 * __data_agc -
+ host->data_agc_av) / host->smooth_factorAGC);
host->new_gain = host->data_agc_av / 8 + unit->agc_cal;
/* recover noise mesures from phlic component */
@@ -5847,7 +6460,8 @@ int ce_stop (struct plc_drv_unit *unit)
/* the frame has been sent */
-void ce_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void ce_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
union SIGNAL *sig;
extern PROCESS ce_process_;
@@ -5865,7 +6479,8 @@ void ce_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plc
}
/* the frame have been received */
-void ce_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void ce_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
union SIGNAL *sig;
extern PROCESS ce_process_;
@@ -5875,13 +6490,16 @@ void ce_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plc
if ((host == NULL) || (host->index <= 0))
{
/* no control buffer, drop */
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "ce_recv: no host. subtype type=%d\n", pframe->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "ce_recv: no host. subtype type=%d\n",
+ pframe->control->l_frm.subtype);
unit->stats.ce.nb_host_unknown++;
plcp_free_rx_frame (pframe);
}
else
{ /* send a signal to the ce_process */
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "ce_recv: host %d subtype type=%d\n", host->index,
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "ce_recv: host %d subtype type=%d\n", host->index,
pframe->control->l_frm.subtype);
sig = alloc (sizeof (struct MmduIndicate), MMDU_INDICATE);
ASSERT (sig);
@@ -5901,21 +6519,26 @@ void ce_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plc
int is_channel_estimation_request (int subtype)
{
- if ((subtype >= MA_SUBTYPE_POWER_REQUEST && subtype <= MA_SUBTYPE_KEEPALIVE_REQUEST)
- || (subtype == MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST) || (subtype == MA_SUBTYPE_UNUSED_TEST_REQUEST)
+ if ((subtype >= MA_SUBTYPE_POWER_REQUEST &&
+ subtype <= MA_SUBTYPE_KEEPALIVE_REQUEST) ||
+ (subtype == MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST) ||
+ (subtype == MA_SUBTYPE_UNUSED_TEST_REQUEST)
/* we added some spare on channel estimation to ensure future compatibility with messages */
|| (subtype == MA_SUBTYPE_POWER_INV_REQUEST)
- || ((subtype > MA_SUBTYPE_ERROR_REPLY) && (subtype < MA_SUBTYPE_CE_SPARE)))
+ || ((subtype > MA_SUBTYPE_ERROR_REPLY) &&
+ (subtype < MA_SUBTYPE_CE_SPARE)))
return 1;
else
return 0;
}
int is_channel_estimation_reply (int subtype)
{
- if ((subtype >= MA_SUBTYPE_POWER_REPLY && subtype <= MA_SUBTYPE_KEEPALIVE_REPLY)
- || (subtype == MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY)
- || (subtype == MA_SUBTYPE_UNUSED_TEST_REPLY)
- || (subtype == MA_SUBTYPE_ERROR_REPLY) || (subtype == MA_SUBTYPE_POWER_INV_REPLY))
+ if ((subtype >= MA_SUBTYPE_POWER_REPLY &&
+ subtype <= MA_SUBTYPE_KEEPALIVE_REPLY) ||
+ (subtype == MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY) ||
+ (subtype == MA_SUBTYPE_UNUSED_TEST_REPLY) ||
+ (subtype == MA_SUBTYPE_ERROR_REPLY) ||
+ (subtype == MA_SUBTYPE_POWER_INV_REPLY))
return 1;
else
return 0;
@@ -5926,7 +6549,8 @@ int is_channel_estimation_measure (int subtype)
if ((subtype == MA_SUBTYPE_POWER_REQUEST)
|| (subtype == MA_SUBTYPE_POWER_INV_REQUEST)
|| (subtype == MA_SUBTYPE_UNUSED_TEST_REQUEST)
- || (subtype == MA_SUBTYPE_SOUND_REQUEST) || (subtype == MA_SUBTYPE_TEST_REQUEST))
+ || (subtype == MA_SUBTYPE_SOUND_REQUEST) ||
+ (subtype == MA_SUBTYPE_TEST_REQUEST))
return 1;
else
return 0;
@@ -5934,7 +6558,8 @@ int is_channel_estimation_measure (int subtype)
int is_channel_estimation_indication (int subtype)
{
- if (subtype == MA_SUBTYPE_STATUS_INDICATION || subtype == MA_SUBTYPE_MCAST_INDICATION)
+ if (subtype == MA_SUBTYPE_STATUS_INDICATION ||
+ subtype == MA_SUBTYPE_MCAST_INDICATION)
return 1;
else
return 0;
@@ -5959,10 +6584,13 @@ OS_PROCESS (ce_process)
switch (sig->sigNo)
{
case MMDU_INDICATE:
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "MMDU_INDICATE subtype is %d\n",
- sig->ce_signal.MmduIndicate.pframe->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "MMDU_INDICATE subtype is %d\n",
+ sig->ce_signal.MmduIndicate.pframe->control->l_frm.
+ subtype);
// separate requests from replies
- subtype = sig->ce_signal.MmduIndicate.pframe->control->l_frm.subtype;
+ subtype =
+ sig->ce_signal.MmduIndicate.pframe->control->l_frm.subtype;
switch (subtype)
{
case MA_SUBTYPE_POWER_REQUEST:
@@ -6062,9 +6690,11 @@ OS_PROCESS (ce_process)
#ifdef CONFIG_PLC_MCAST
case MA_SUBTYPE_MCAST_INDICATION:
- GPIO_WRITE (GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION, 1);
+ GPIO_WRITE (GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION,
+ 1);
ce_event_indicate (unit, &sig->ce_signal.MmduIndicate);
- GPIO_WRITE (GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION, 0);
+ GPIO_WRITE (GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION,
+ 0);
break;
case MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST:
@@ -6098,17 +6728,27 @@ OS_PROCESS (ce_process)
}
else
{
- struct plcp_frame *pframe = sig->ce_signal.MmduIndicate.pframe;
-
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, "MMDU_INDICATE ignored:\n");
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " subtype=%d\n", pframe->control->l_frm.subtype);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " STEI=%d\n", pframe->control->l_frm.STEI);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " DTEI=%d\n", pframe->control->l_frm.DTEI);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " host=%d\n", pframe->host->index);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " slices=%d\n", pframe->control->l_frm.slices);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " efr=%d\n", pframe->control->l_frm.efr);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " flags=%d\n", pframe->control->l_frm.flags);
- RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " channel=%d\n", pframe->control->l_frm.channel_id);
+ struct plcp_frame *pframe =
+ sig->ce_signal.MmduIndicate.pframe;
+
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG,
+ "MMDU_INDICATE ignored:\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " subtype=%d\n",
+ pframe->control->l_frm.subtype);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " STEI=%d\n",
+ pframe->control->l_frm.STEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " DTEI=%d\n",
+ pframe->control->l_frm.DTEI);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " host=%d\n",
+ pframe->host->index);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " slices=%d\n",
+ pframe->control->l_frm.slices);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " efr=%d\n",
+ pframe->control->l_frm.efr);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " flags=%d\n",
+ pframe->control->l_frm.flags);
+ RT_PRINTM (TRACE_CHANNEL, TRACE_DEBUG, " channel=%d\n",
+ pframe->control->l_frm.channel_id);
plcp_free_rx_frame (pframe);
}
break;
@@ -6140,6 +6780,12 @@ OS_PROCESS (ce_process)
signal_sem (ce_lock_sem);
}
continue;
+ case CE_TIMEOUT_EST:
+ {
+ ce_event_tmo_est (unit, &sig->ce_signal.ChannelTmo);
+ signal_sem (ce_lock_sem);
+ }
+ continue;
#ifdef CONFIG_PLC_MCAST
case CE_UPDATE_MCAST:
@@ -6184,11 +6830,12 @@ OS_PROCESS (ce_process)
default:
{
- RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR, "channel sig unknown\r\n");
+ RT_PRINTM (TRACE_CHANNEL, TRACE_ERROR,
+ "channel sig unknown\r\n");
}
}
- /* lib�ration du signal */
+ /* libération du signal */
restore (sig);
free_buf (&sig);
signal_sem (ce_lock_sem);
@@ -6202,7 +6849,8 @@ OS_PROCESS (ce_process)
* The caller can be interrupt process
*/
-void throw_channel_indication (struct plc_drv_unit *unit, struct plcp_host *host, int sig_no, int status)
+void throw_channel_indication (struct plc_drv_unit *unit,
+ struct plcp_host *host, int sig_no, int status)
{
union SIGNAL *sig;
struct ChannelCtl *ctl;
@@ -6283,7 +6931,8 @@ void ce_kill_host (struct plc_drv_unit *unit, struct plcp_host *host)
}
/* ask ce_process to send an indication to the other ce to do a job indicated by status */
-void ce_status_indicate (struct plc_drv_unit *unit, struct plcp_host *host, int status)
+void ce_status_indicate (struct plc_drv_unit *unit, struct plcp_host *host,
+ int status)
{
throw_channel_indication (unit, host, CE_STATUS_INDICATE, status);
}
@@ -6293,8 +6942,9 @@ void ce_status_indicate (struct plc_drv_unit *unit, struct plcp_host *host, int
void ce_update_mcast (struct plc_drv_unit *unit, struct plcp_host *host)
{
throw_channel_indication (unit, host, CE_UPDATE_MCAST, 0);
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "ce_update_mcast TEI=%d" IEEE802_FMT "\n", IEEE802_VAL (host->mac_addr),
- host->TEI);
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "ce_update_mcast TEI=%d" IEEE802_FMT "\n",
+ IEEE802_VAL (host->mac_addr), host->TEI);
}
#endif
@@ -6318,7 +6968,8 @@ OS_PROCESS (ce_indicate)
{
// copy the structure
ind = list_indicate[list_indicate_tail];
- list_indicate_tail = (list_indicate_tail + 1) & (CE_MAX_INDICATION - 1);
+ list_indicate_tail =
+ (list_indicate_tail + 1) & (CE_MAX_INDICATION - 1);
LOCK_RESTORE (msr);
sig_no = ind.sig_no;
diff --git a/app/sm-plc-drv/src/crc.c b/app/sm-plc-drv/src/crc.c
index 4c2fc9dcdd..899c2fc7cc 100755
--- a/app/sm-plc-drv/src/crc.c
+++ b/app/sm-plc-drv/src/crc.c
@@ -106,7 +106,8 @@ uint16_t crc_control_unroll (uint8_t * buffer)
}
/* encode an input buffer into a message. input_len must be 2/3 of msg_len */
-void hamming_encode (unsigned char *input, unsigned char *message, int msg_len)
+void hamming_encode (unsigned char *input, unsigned char *message,
+ int msg_len)
{
int i, j;
unsigned char a, b;
@@ -184,7 +185,8 @@ void hamming_unroll_encode (u8 * dst, u32 * src)
/* decode a message into an output buffer. output_len must be 2/3 of msg_len */
-void hamming_decode (unsigned char *message, unsigned char *output, int msg_len)
+void hamming_decode (unsigned char *message, unsigned char *output,
+ int msg_len)
{
int i, j;
unsigned char a, b, c;
@@ -202,7 +204,8 @@ void hamming_decode (unsigned char *message, unsigned char *output, int msg_len)
}
}
-static inline char *__decode_u8 (unsigned char a, unsigned char b, unsigned char c, unsigned char *dst)
+static inline char *__decode_u8 (unsigned char a, unsigned char b,
+ unsigned char c, unsigned char *dst)
{
*dst++ = a ^ corrections[hamming[a] ^ (c & 0xf0) >> 4];
*dst++ = b ^ corrections[hamming[b] ^ (c & 0x0f)];
@@ -219,32 +222,42 @@ static inline u16 *__decode_u16 (u8 a, u8 b, u8 c, u16 * dst)
void hamming_unroll_decode (u16 * dst, u32 * src)
{
- dst = __decode_u16 ((unsigned char) (*src), (unsigned char) ((*src) >> 8), (unsigned char) ((*src) >> 16), dst);
dst =
- __decode_u16 ((unsigned char) ((*src) >> 24), (unsigned char) (*(src + 1)), (unsigned char) ((*(src + 1)) >> 8),
- dst);
+ __decode_u16 ((unsigned char) (*src), (unsigned char) ((*src) >> 8),
+ (unsigned char) ((*src) >> 16), dst);
dst =
- __decode_u16 ((unsigned char) ((*(src + 1)) >> 16), (unsigned char) ((*(src + 1)) >> 24),
+ __decode_u16 ((unsigned char) ((*src) >> 24),
+ (unsigned char) (*(src + 1)),
+ (unsigned char) ((*(src + 1)) >> 8), dst);
+ dst =
+ __decode_u16 ((unsigned char) ((*(src + 1)) >> 16),
+ (unsigned char) ((*(src + 1)) >> 24),
(unsigned char) (*(src + 2)), dst);
dst =
- __decode_u16 ((unsigned char) ((*(src + 2)) >> 8), (unsigned char) ((*(src + 2)) >> 16),
+ __decode_u16 ((unsigned char) ((*(src + 2)) >> 8),
+ (unsigned char) ((*(src + 2)) >> 16),
(unsigned char) ((*(src + 2)) >> 24), dst);
dst =
- __decode_u16 ((unsigned char) (*(src + 3)), (unsigned char) ((*(src + 3)) >> 8),
+ __decode_u16 ((unsigned char) (*(src + 3)),
+ (unsigned char) ((*(src + 3)) >> 8),
(unsigned char) ((*(src + 3)) >> 16), dst);
dst =
- __decode_u16 ((unsigned char) ((*(src + 3)) >> 24), (unsigned char) (*(src + 4)),
+ __decode_u16 ((unsigned char) ((*(src + 3)) >> 24),
+ (unsigned char) (*(src + 4)),
(unsigned char) ((*(src + 4)) >> 8), dst);
// if used with rs...
dst =
- __decode_u16 ((unsigned char) ((*(src + 4)) >> 16), (unsigned char) ((*(src + 4)) >> 24),
+ __decode_u16 ((unsigned char) ((*(src + 4)) >> 16),
+ (unsigned char) ((*(src + 4)) >> 24),
(unsigned char) (*(src + 5)), dst);
dst =
- __decode_u16 ((unsigned char) ((*(src + 5)) >> 8), (unsigned char) ((*(src + 5)) >> 16),
+ __decode_u16 ((unsigned char) ((*(src + 5)) >> 8),
+ (unsigned char) ((*(src + 5)) >> 16),
(unsigned char) ((*(src + 5)) >> 24), dst);
}
-static u16 *__all_vote_u16 (struct u16HammingChoice *u16Choice, u16 * dst, u8 nbU16Choices)
+static u16 *__all_vote_u16 (struct u16HammingChoice *u16Choice, u16 * dst,
+ u8 nbU16Choices)
{
//WARNING : u16Choice[3] must be the vote result !!!!
u8 i, j, k;
@@ -259,8 +272,12 @@ static u16 *__all_vote_u16 (struct u16HammingChoice *u16Choice, u16 * dst, u8 nb
{
for (i = 0; i < nbU16Choices + 1; i++) //store bytes choices
{
- choice[i].octet = ((u16Choice[i % nbU16Choices].mot & (0x00FF << (8 * k))) >> (8 * k));
- choice[i].proba = ((u16Choice[i % nbU16Choices].proba & (0x00FF << (8 * k))) >> (8 * k));
+ choice[i].octet =
+ ((u16Choice[i % nbU16Choices].
+ mot & (0x00FF << (8 * k))) >> (8 * k));
+ choice[i].proba =
+ ((u16Choice[i % nbU16Choices].
+ proba & (0x00FF << (8 * k))) >> (8 * k));
}
//gathering probabilities according to bytes
fin = nbU16Choices;
@@ -307,7 +324,8 @@ static u16 *__all_vote_u16 (struct u16HammingChoice *u16Choice, u16 * dst, u8 nb
if (nbU16Choices > 4)
finalWord |= (choice[rang_max_proba].octet << (8 * k));
else
- finalWord |= u16Choice[nbU16Choices - 1].mot & (0x00FF << (8 * k));
+ finalWord |=
+ u16Choice[nbU16Choices - 1].mot & (0x00FF << (8 * k));
}
}
*dst++ = finalWord;
@@ -355,43 +373,50 @@ void all_hamming_unroll_decode (u16 * dst, u32 src[8][6], u8 end)
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) (*src[i]), (u8) ((*src[i]) >> 8), (u8) ((*src[i]) >> 16), &choice[i].proba);
+ __all_decode_u16 ((u8) (*src[i]), (u8) ((*src[i]) >> 8),
+ (u8) ((*src[i]) >> 16), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*src[i]) >> 24), (u8) (*(src[i] + 1)), (u8) ((*(src[i] + 1)) >> 8),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*src[i]) >> 24), (u8) (*(src[i] + 1)),
+ (u8) ((*(src[i] + 1)) >> 8), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*(src[i] + 1)) >> 16), (u8) ((*(src[i] + 1)) >> 24), (u8) (*(src[i] + 2)),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*(src[i] + 1)) >> 16),
+ (u8) ((*(src[i] + 1)) >> 24),
+ (u8) (*(src[i] + 2)), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*(src[i] + 2)) >> 8), (u8) ((*(src[i] + 2)) >> 16), (u8) ((*(src[i] + 2)) >> 24),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*(src[i] + 2)) >> 8),
+ (u8) ((*(src[i] + 2)) >> 16),
+ (u8) ((*(src[i] + 2)) >> 24), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) (*(src[i] + 3)), (u8) ((*(src[i] + 3)) >> 8), (u8) ((*(src[i] + 3)) >> 16),
- &choice[i].proba);
+ __all_decode_u16 ((u8) (*(src[i] + 3)),
+ (u8) ((*(src[i] + 3)) >> 8),
+ (u8) ((*(src[i] + 3)) >> 16), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*(src[i] + 3)) >> 24), (u8) (*(src[i] + 4)), (u8) ((*(src[i] + 4)) >> 8),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*(src[i] + 3)) >> 24),
+ (u8) (*(src[i] + 4)),
+ (u8) ((*(src[i] + 4)) >> 8), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
// if used with rs...
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*(src[i] + 4)) >> 16), (u8) ((*(src[i] + 4)) >> 24), (u8) (*(src[i] + 5)),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*(src[i] + 4)) >> 16),
+ (u8) ((*(src[i] + 4)) >> 24),
+ (u8) (*(src[i] + 5)), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
for (i = 0; i < end; i++)
choice[i].mot =
- __all_decode_u16 ((u8) ((*(src[i] + 5)) >> 8), (u8) ((*(src[i] + 5)) >> 16), (u8) ((*(src[i] + 5)) >> 24),
- &choice[i].proba);
+ __all_decode_u16 ((u8) ((*(src[i] + 5)) >> 8),
+ (u8) ((*(src[i] + 5)) >> 16),
+ (u8) ((*(src[i] + 5)) >> 24), &choice[i].proba);
dst = __all_vote_u16 (choice, dst, end);
}
@@ -414,10 +439,20 @@ u8 entropy (u32 * src1, u32 * src2, u32 * src3, u32 * srcV)
u8 value;
value = __entropy_algo_u32 (*src1, *src2, *src3, *srcV);
- value += __entropy_algo_u32 (*(src1 + 1), *(src2 + 1), *(src3 + 1), *(srcV + 1));
- value += __entropy_algo_u32 (*(src1 + 2), *(src2 + 2), *(src3 + 2), *(srcV + 2));
- value += __entropy_algo_u32 (*(src1 + 3), *(src2 + 3), *(src3 + 3), *(srcV + 3));
- value += __entropy_algo_u32 (*(src1 + 4), *(src2 + 4), *(src3 + 4), *(srcV + 4));
- value += __entropy_algo_u32 (*(src1 + 5), *(src2 + 5), *(src3 + 5), *(srcV + 5));
+ value +=
+ __entropy_algo_u32 (*(src1 + 1), *(src2 + 1), *(src3 + 1),
+ *(srcV + 1));
+ value +=
+ __entropy_algo_u32 (*(src1 + 2), *(src2 + 2), *(src3 + 2),
+ *(srcV + 2));
+ value +=
+ __entropy_algo_u32 (*(src1 + 3), *(src2 + 3), *(src3 + 3),
+ *(srcV + 3));
+ value +=
+ __entropy_algo_u32 (*(src1 + 4), *(src2 + 4), *(src3 + 4),
+ *(srcV + 4));
+ value +=
+ __entropy_algo_u32 (*(src1 + 5), *(src2 + 5), *(src3 + 5),
+ *(srcV + 5));
return value;
}
diff --git a/app/sm-plc-drv/src/linux_crypto.c b/app/sm-plc-drv/src/linux_crypto.c
index c0d6faa4f2..e3e9227bd8 100644
--- a/app/sm-plc-drv/src/linux_crypto.c
+++ b/app/sm-plc-drv/src/linux_crypto.c
@@ -231,19 +231,28 @@ static const uint8_t rotors[] = {
};
static const uint8_t parity[] = {
- 8, 1, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 2, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 3,
- 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8,
- 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8,
- 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0,
- 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8,
- 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0,
- 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0,
- 4, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 5, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 6, 8,
+ 8, 1, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 2, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8,
+ 0, 0, 8, 0, 8, 8, 3,
+ 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0,
+ 8, 8, 0, 8, 0, 0, 8,
+ 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0,
+ 8, 8, 0, 8, 0, 0, 8,
+ 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8,
+ 0, 0, 8, 0, 8, 8, 0,
+ 0, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 0,
+ 8, 8, 0, 8, 0, 0, 8,
+ 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8,
+ 0, 0, 8, 0, 8, 8, 0,
+ 8, 0, 0, 8, 0, 8, 8, 0, 0, 8, 8, 0, 8, 0, 0, 8, 0, 8, 8, 0, 8, 0, 0, 8, 8,
+ 0, 0, 8, 0, 8, 8, 0,
+ 4, 8, 8, 0, 8, 0, 0, 8, 8, 0, 0, 8, 0, 8, 8, 0, 8, 5, 0, 8, 0, 8, 8, 0, 0,
+ 8, 8, 0, 8, 0, 6, 8,
};
-static int setkey (uint32_t * expkey, const uint8_t * key, unsigned int keylen)
+static int setkey (uint32_t * expkey, const uint8_t * key,
+ unsigned int keylen)
{
const uint8_t *k;
uint8_t *b0, *b1;
@@ -333,7 +342,8 @@ static int setkey (uint32_t * expkey, const uint8_t * key, unsigned int keylen)
return 0;
}
-static void des_encrypt (uint32_t * expkey, uint8_t * dst, const uint8_t * src)
+static void des_encrypt (uint32_t * expkey, uint8_t * dst,
+ const uint8_t * src)
{
uint32_t x, y, z;
@@ -705,7 +715,8 @@ static void des_encrypt (uint32_t * expkey, uint8_t * dst, const uint8_t * src)
dst[7] = y;
}
-static void des_decrypt (uint32_t * expkey, uint8_t * dst, const uint8_t * src)
+static void des_decrypt (uint32_t * expkey, uint8_t * dst,
+ const uint8_t * src)
{
uint32_t x, y, z;
diff --git a/app/sm-plc-drv/src/linux_drv.c b/app/sm-plc-drv/src/linux_drv.c
index e3947bc28b..269c8cf437 100644
--- a/app/sm-plc-drv/src/linux_drv.c
+++ b/app/sm-plc-drv/src/linux_drv.c
@@ -1,6 +1,18 @@
-/*
- * Copyright (C) 2003 by SPiDCOM Technologies. All rights reserved.
- */
+/* ---------------------------------------------------------------------------------
+ * Main file of the PLC driver
+ * ---------------------------------------------------------------------------------
+ * OBJECT :
+ *
+ * Copyright (C) 2007 by SPiDCOM Technologies. All rights reserved.
+ * ---------------------------------------------------------------------------------
+ * DATE | AUTHOR | COMMENT
+ * ---------------------------------------------------------------------------------
+ * 2007-11-20 | T.C | - Change some variable from stack to global
+ * | | memory. Because we have an overflow of the
+ * | | kernel stack (4K max)
+ * | | - Remove all "#if 0" and "#if 1". (cleaning)
+ * --------------------------------------------------------------------------------- */
+
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ipc.h>
@@ -69,6 +81,12 @@
#include "utmo_if.h"
#include "lib_if.h"
#include "plc_common.h"
+#include "plc_ioctl.h"
+
+#ifdef PLC_RECOVERY
+#include "mib-interface.h"
+#endif
+
/*
* MODULE DESCRIPTION
@@ -95,7 +113,7 @@ LIST_HEAD (skb_free_queue);
* DRIVER DEFINES
*/
#define DRV_NAME "PLC_DRV"
-#define DRV_VERSION "0.1.0"
+#define DRV_VERSION "3.9.8"
#define DRV_RELDATE __DATE__
@@ -104,25 +122,44 @@ LIST_HEAD (skb_free_queue);
/*
* GLOBAL VAR
*/
-/* Device driver structure */
-/*static struct net_device plc_dev = {.name="plc%d", .mtu=1540};*/
+spinlock_t lock_SIOCGHOST = SPIN_LOCK_UNLOCKED;
+
+#ifndef CONFIG_VERSION_16M
+static struct user_host global_user_host;
+#endif
+
static struct net_device plc_dev = {.name = "plc%d" };
struct net_device *p_dev = &plc_dev;
-#ifdef EXTRA_STATS
struct estats estats;
-#endif
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+SEMAPHORE *plc_en_hostreq_lock;
+void *plc_en_host;
+int plc_en_req;
+struct work_struct plc_en_work;
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
DECLARE_WAIT_QUEUE_HEAD (mlme_wait_queue);
DECLARE_WAIT_QUEUE_HEAD (scan_wait_queue);
DECLARE_WAIT_QUEUE_HEAD (sn_wait_queue);
+#ifdef PLC_RECOVERY
+int RECOVERY_FLAG; // set to 1 if some host have been created or destroyed
+
+ // set to 0 after writeing in the recovery.conf file
+#endif
+
+struct authentication_8021x *auth;
+struct work_struct auth_work;
+
int mlme_sleep;
int scan_sleep;
int sn_sleep;
/* These identify the driver base version and may not be removed. */
-static char version[] __devinitdata = KERN_INFO DRV_NAME " 224Mbps PLC driver v" DRV_VERSION " (" DRV_RELDATE ")\n";
+static char version[] __devinitdata =
+ KERN_INFO DRV_NAME " 224Mbps PLC driver v" DRV_VERSION " (" DRV_RELDATE
+ ")\n";
/* RT_PRINTMODULE MASK */
/*long DEBUG_MOD = ALWAYS_PRINTED|TRACE_CHANNEL|TRACE_NEIGHBOUR;*/
@@ -172,7 +209,8 @@ void rt_neighbour_kthrd_isr (void)
{
printk ("HAAAAAAAAAAAAAAAAAAAAAA ERRRROR\n");
}
-extern irqreturn_t neighbour_kthrd_isr (int irq, void *dev_id, struct pt_regs *regs);
+extern irqreturn_t neighbour_kthrd_isr (int irq, void *dev_id,
+ struct pt_regs *regs);
#endif
#ifdef CONFIG_PLC_KTHRD
PROCESS ce_kthrd_isr_;
@@ -226,20 +264,6 @@ void send_r2l_sig (int type, void *data)
* DRIVER CODE
*/
-#if 0
-struct plc_drv_unit *plc_drv_get_unit (int id)
-{
- if (id > PLC_DRV_MAX_UNITS)
- {
- return NULL;
- }
- else
- {
- return ze_unit;
- }
-}
-#endif
-
/*****************************************************************
*
* IOCTL Privates
@@ -253,7 +277,9 @@ void ioc_utmo (union plcbox_t *plcbox)
sig = rt_malloc (sizeof (struct plc_msg_));
sig->type = PLC_SIOC_MSG;
sig->buf = (char *) plcbox;
- err = rt_mbx_send (((hal_tcb *) (plc_mm_l2r_))->mbx_active, (void *) &sig, sizeof (struct plc_msg_ *));
+ err =
+ rt_mbx_send (((hal_tcb *) (plc_mm_l2r_))->mbx_active, (void *) &sig,
+ sizeof (struct plc_msg_ *));
if (err)
RT_PRINTK ("Sent failed : %d!\n", err);
}
@@ -307,10 +333,8 @@ void ioc_clean (union plcbox_t *plcbox)
mac_nb_samples = 0;
}
#endif
-#ifdef EXTRA_STATS
memset (&estats, 0, sizeof (estats));
memset (&stats_subtype, 0, sizeof (stats_subtype));
-#endif
hard_local_irq_restore (flags);
plcp_clean_stats (unit);
#if defined(CONFIG_PLC_CRYPTO) || defined(CONFIG_PLC_CRYPTO)
@@ -370,16 +394,15 @@ int ioc_host_set_cid (struct host_set_cid_t *h)
host->id = h->cid;
plcp_copy_channel (host->uchannel, uchannel);
- host->mtu = plcp_get_max_data_len (ze_unit, host->uchannel, PLCP_MAX_SLOTS);
+ host->mtu =
+ plcp_get_max_data_len (ze_unit, host->uchannel, PLCP_MAX_SLOTS);
return 0;
}
-#ifdef CONFIG_PLC_8021X
int ioc_host_set_auth (struct host_set_auth_t *h)
{
struct plcp_host *host;
- printk ("set auth %d %d\n", h->host_id, h->auth);
host = plcp_get_host_by_index (h->host_id);
if (host == NULL)
{
@@ -396,13 +419,12 @@ int ioc_host_set_auth_by_addr (struct host_set_auth_by_addr_t *h)
{
struct plcp_host *host;
- printk ("set auth %02x:%02x:%02x:%02x:%02x:%02x %d\n", h->host_addr[0], h->host_addr[1], h->host_addr[2],
- h->host_addr[3], h->host_addr[4], h->host_addr[5], h->auth);
host = plcp_get_host_by_addr (h->host_addr);
if (host == NULL)
{
- printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n", h->host_addr[0], h->host_addr[1],
- h->host_addr[2], h->host_addr[3], h->host_addr[4], h->host_addr[5]);
+ printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n",
+ h->host_addr[0], h->host_addr[1], h->host_addr[2],
+ h->host_addr[3], h->host_addr[4], h->host_addr[5]);
return -EINVAL;
}
@@ -410,7 +432,6 @@ int ioc_host_set_auth_by_addr (struct host_set_auth_by_addr_t *h)
return 0;
}
-#endif // CONFIG_PLC_8021X
#ifdef CONFIG_PLC_CRYPTO
int ioc_host_set_pek_by_addr (struct host_set_pek_by_addr_t *h)
@@ -418,14 +439,17 @@ int ioc_host_set_pek_by_addr (struct host_set_pek_by_addr_t *h)
int i;
struct plcp_host *host;
- printk ("set pek %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", h->host_addr[0],
- h->host_addr[1], h->host_addr[2], h->host_addr[3], h->host_addr[4], h->host_addr[5], h->pek[0], h->pek[1],
- h->pek[2], h->pek[3], h->pek[4], h->pek[5], h->pek[6], h->pek[7]);
+ printk
+ ("set pek %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ h->host_addr[0], h->host_addr[1], h->host_addr[2], h->host_addr[3],
+ h->host_addr[4], h->host_addr[5], h->pek[0], h->pek[1], h->pek[2],
+ h->pek[3], h->pek[4], h->pek[5], h->pek[6], h->pek[7]);
host = plcp_get_host_by_addr (h->host_addr);
if (host == NULL)
{
- printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n", h->host_addr[0], h->host_addr[1],
- h->host_addr[2], h->host_addr[3], h->host_addr[4], h->host_addr[5]);
+ printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n",
+ h->host_addr[0], h->host_addr[1], h->host_addr[2],
+ h->host_addr[3], h->host_addr[4], h->host_addr[5]);
return -EINVAL;
}
@@ -442,14 +466,18 @@ int ioc_host_set_pexpk_by_addr (struct host_set_pexpk_by_addr_t *h)
int i;
struct plcp_host *host;
- printk ("set pexpectedkey %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", h->host_addr[0],
- h->host_addr[1], h->host_addr[2], h->host_addr[3], h->host_addr[4], h->host_addr[5], h->pexpk[0],
- h->pexpk[1], h->pexpk[2], h->pexpk[3], h->pexpk[4], h->pexpk[5], h->pexpk[6], h->pexpk[7]);
+ printk
+ ("set pexpectedkey %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ h->host_addr[0], h->host_addr[1], h->host_addr[2], h->host_addr[3],
+ h->host_addr[4], h->host_addr[5], h->pexpk[0], h->pexpk[1],
+ h->pexpk[2], h->pexpk[3], h->pexpk[4], h->pexpk[5], h->pexpk[6],
+ h->pexpk[7]);
host = plcp_get_host_by_addr (h->host_addr);
if (host == NULL)
{
- printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n", h->host_addr[0], h->host_addr[1],
- h->host_addr[2], h->host_addr[3], h->host_addr[4], h->host_addr[5]);
+ printk ("host addr %02x:%02x:%02x:%02x:%02x:%02x unknown\r\n",
+ h->host_addr[0], h->host_addr[1], h->host_addr[2],
+ h->host_addr[3], h->host_addr[4], h->host_addr[5]);
return -EINVAL;
}
@@ -474,15 +502,6 @@ int ioc_set_adapts (struct set_adapts_t *set)
int carriers = PMD_CARRIERS_PER_BAND * bands;
int n = 0;
-#if 0
- printk ("start_band = %d\n", set->start_band);
- printk ("start_val = %d\n", set->start_val);
- printk ("end_band = %d\n", set->end_band);
- printk ("end_val = %d\n", set->end_val);
- printk ("range = %d\n", range);
- printk ("bands = %d\n", bands);
-#endif
-
for (band = set->start_band; band <= set->end_band; band++)
{
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
@@ -490,9 +509,6 @@ int ioc_set_adapts (struct set_adapts_t *set)
n++;
value = set->start_val + (n * range) / carriers;
pmd_set_control_adapt (band, carrier, value);
-#if 0
- printk ("band=%d carrier=%d value=%d n=%d\n", band, carrier, value, n);
-#endif
}
}
return 0;
@@ -589,7 +605,8 @@ void plcp_ce_sn_analyser (struct plc_analyser *snAnalyser)
snAnalyser->min_signal[indx] = __min_sn[band][carrier] * 100;
snAnalyser->avg_signal[indx] = __avg_sn[band][carrier] * 100;
snAnalyser->max_signal[indx] = __max_sn[band][carrier] * 100;
- snAnalyser->last_signal[indx] = __log_sn[0][band][carrier] * 100;
+ snAnalyser->last_signal[indx] =
+ __log_sn[0][band][carrier] * 100;
indx++;
}
@@ -604,29 +621,24 @@ void plcp_ce_sn_analyser (struct plc_analyser *snAnalyser)
int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
{
- //PR51 BEGIN:
struct plc_analyser *snAnalyser;
struct plc_analyser *user_ptr_snAnalyser;
struct agc_analyser *agcAnalyser;
struct agc_analyser *user_ptr_agcAnalyser;
struct plc_mac *plcMac;
struct plc_mac *user_ptr_plcMac;
-
- //PR51 END:
struct pass_host *user_ptr_host;
struct system_carrier_tab *user_ptr_SysCar;
struct pass_host *passHost;
+ struct user_host *user_host_ptr;
struct system_carrier_tab *systemCarrierTab;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
union plcbox_t *plcbox;
+ struct plcp_host *host = NULL;
int band;
int group;
-
- //PR51 BEGIN:
int carrier;
int indx;
-
- //PR51 END:
int mask = 0;
int nbNotchPerBand;
@@ -641,44 +653,91 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
extern int sleep_flag;
int msg;
uint32_t i;
+ int Iocmd;
switch (cmd)
{
#ifndef CONFIG_VERSION_16M
- case SIOCGHOST: //get host
- //allocating memory for the structure:
- passHost = kmalloc (sizeof (struct pass_host), GFP_KERNEL);
- if (passHost == NULL)
- return -ENOMEM;
+ case SIOCGHOST:
+ spin_lock (&lock_SIOCGHOST);
//get hostNb from user space:
- user_ptr_host = (struct pass_host *) ifr->ifr_data;
- if (copy_from_user (passHost, user_ptr_host, sizeof (struct pass_host)))
+ user_host_ptr = (struct user_host *) ifr->ifr_data;
+ if (copy_from_user
+ (&global_user_host, user_host_ptr, sizeof (struct user_host)))
{
+ spin_unlock (&lock_SIOCGHOST);
printk (KERN_WARNING "problem copy_from_user\n");
- kfree (passHost);
return -EINVAL;
}
- if (plcp_ce_host (passHost->hostNb, &(passHost->plcHost)))
+ Iocmd = global_user_host.iocmd;
+ switch (Iocmd)
{
- kfree (passHost);
+ default:
+ case IOCHOSTCMD_NONE:
+ spin_unlock (&lock_SIOCGHOST);
return -EINVAL;
- }
+ break;
- //return the data structure to user space:
- if (copy_to_user (user_ptr_host, passHost, sizeof (struct pass_host)))
- {
- printk (KERN_WARNING "problem copy_to_user\n");
- kfree (passHost);
- return -EINVAL;
+ case IOCHOSTCMD_GET:
+ if (plcp_ce_host
+ (global_user_host.index, &(global_user_host.plcHost), true))
+ {
+ spin_unlock (&lock_SIOCGHOST);
+ return -EINVAL;
+ }
+
+ if (copy_to_user
+ (user_host_ptr, &global_user_host, sizeof (struct user_host)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ spin_unlock (&lock_SIOCGHOST);
+ return -EINVAL;
+ }
+ break;
+
+ case IOCHOSTCMD_GETLIGHT:
+ if (plcp_ce_host
+ (global_user_host.index, &(global_user_host.plcHost), false))
+ {
+ spin_unlock (&lock_SIOCGHOST);
+ return -EINVAL;
+ }
+
+ if (copy_to_user
+ (user_host_ptr, &global_user_host, sizeof (struct user_host)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ spin_unlock (&lock_SIOCGHOST);
+ return -EINVAL;
+ }
+ break;
+ case IOCHOSTCMD_GETIDBYMAC:
+ host = plcp_get_host_by_addr (global_user_host.macAddress);
+ if (host)
+ {
+ global_user_host.index = host->index;
+ }
+ else
+ {
+ spin_unlock (&lock_SIOCGHOST);
+ return -ENOENT;
+ }
+
+ if (copy_to_user
+ (user_host_ptr, &global_user_host, sizeof (struct user_host)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ spin_unlock (&lock_SIOCGHOST);
+ return -EINVAL;
+ }
+ break;
}
- //freeing memory:
- kfree (passHost);
+ spin_unlock (&lock_SIOCGHOST);
break;
-
case SIOCSHOST: //set host
//allocating memory for the structure:
passHost = kmalloc (sizeof (struct pass_host), GFP_KERNEL);
@@ -687,7 +746,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
//get passHost structure from user space:
user_ptr_host = (struct pass_host *) ifr->ifr_data;
- if (copy_from_user (passHost, user_ptr_host, sizeof (struct pass_host)))
+ if (copy_from_user
+ (passHost, user_ptr_host, sizeof (struct pass_host)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (passHost);
@@ -695,13 +755,16 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
}
plcp_set_gain (passHost->hostNb, passHost->plcHost.gain);
- plcp_set_channel (TX_CHANNEL, passHost->hostNb, &(passHost->plcHost.tx_channel));
- plcp_setHostPilots (TX_CHANNEL, passHost->hostNb, &(passHost->plcHost.tx_channel));
- plcp_set_channel (RX_CHANNEL, passHost->hostNb, &(passHost->plcHost.rx_channel));
- plcp_setHostPilots (RX_CHANNEL, passHost->hostNb, &(passHost->plcHost.rx_channel));
+ plcp_set_channel (TX_CHANNEL, passHost->hostNb,
+ &(passHost->plcHost.tx_channel));
+ plcp_setHostPilots (TX_CHANNEL, passHost->hostNb,
+ &(passHost->plcHost.tx_channel));
+ plcp_set_channel (RX_CHANNEL, passHost->hostNb,
+ &(passHost->plcHost.rx_channel));
+ plcp_setHostPilots (RX_CHANNEL, passHost->hostNb,
+ &(passHost->plcHost.rx_channel));
plcp_ce_start_host (passHost->hostNb, passHost->plcHost.automatic);
- //return the data structure to user space:
if (copy_to_user (user_ptr_host, passHost, sizeof (struct pass_host)))
{
printk (KERN_WARNING "problem copy_to_user\n");
@@ -746,15 +809,17 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
plcp_getPilots (systemCarrierTab);
//return the data structure to user space:
- if (copy_to_user (&(user_ptr_SysCar->groupPilot), &(systemCarrierTab->groupPilot),
- sizeof (systemCarrierTab->groupPilot)))
+ if (copy_to_user
+ (&(user_ptr_SysCar->groupPilot), &(systemCarrierTab->groupPilot),
+ sizeof (systemCarrierTab->groupPilot)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (systemCarrierTab);
@@ -771,7 +836,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
@@ -784,13 +850,15 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
if (!(mask & (1 << band))) // unused band: notch all
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
- systemCarrierTab->groupNotch[band * PMD_GROUPS_PER_BAND + group] = 255;
+ systemCarrierTab->groupNotch[band * PMD_GROUPS_PER_BAND +
+ group] = 255;
}
}
//return the data structure to user space:
- if (copy_to_user (&(user_ptr_SysCar->groupNotch), &(systemCarrierTab->groupNotch),
- sizeof (systemCarrierTab->groupNotch)))
+ if (copy_to_user
+ (&(user_ptr_SysCar->groupNotch), &(systemCarrierTab->groupNotch),
+ sizeof (systemCarrierTab->groupNotch)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (systemCarrierTab);
@@ -807,15 +875,18 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
plcp_getAdapts (systemCarrierTab);
//return the data structure to user space:
- if (copy_to_user (&(user_ptr_SysCar->carrierAdapt), &(systemCarrierTab->carrierAdapt),
- sizeof (systemCarrierTab->carrierAdapt)))
+ if (copy_to_user
+ (&(user_ptr_SysCar->carrierAdapt),
+ &(systemCarrierTab->carrierAdapt),
+ sizeof (systemCarrierTab->carrierAdapt)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (systemCarrierTab);
@@ -832,12 +903,14 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
- if (copy_from_user (&(systemCarrierTab->groupPilot), &(user_ptr_SysCar->groupPilot),
- sizeof (systemCarrierTab->groupPilot)))
+ if (copy_from_user
+ (&(systemCarrierTab->groupPilot), &(user_ptr_SysCar->groupPilot),
+ sizeof (systemCarrierTab->groupPilot)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (systemCarrierTab);
@@ -858,12 +931,14 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
- if (copy_from_user (&(systemCarrierTab->groupNotch), &(user_ptr_SysCar->groupNotch),
- sizeof (systemCarrierTab->groupNotch)))
+ if (copy_from_user
+ (&(systemCarrierTab->groupNotch), &(user_ptr_SysCar->groupNotch),
+ sizeof (systemCarrierTab->groupNotch)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (systemCarrierTab);
@@ -875,7 +950,9 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
{
nbNotchPerBand = 0;
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
- nbNotchPerBand += systemCarrierTab->groupNotch[band * PMD_GROUPS_PER_BAND + group];
+ nbNotchPerBand +=
+ systemCarrierTab->groupNotch[band * PMD_GROUPS_PER_BAND +
+ group];
if (nbNotchPerBand != (PMD_GROUPS_PER_BAND * 255)) /* Band not all notched */
mask |= (1 << band); /* band is used */
}
@@ -895,12 +972,15 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
user_ptr_SysCar = (struct system_carrier_tab *) ifr->ifr_data;
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
- if (copy_from_user (&(systemCarrierTab->carrierAdapt), &(user_ptr_SysCar->carrierAdapt),
- sizeof (systemCarrierTab->carrierAdapt)))
+ if (copy_from_user
+ (&(systemCarrierTab->carrierAdapt),
+ &(user_ptr_SysCar->carrierAdapt),
+ sizeof (systemCarrierTab->carrierAdapt)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (systemCarrierTab);
@@ -939,19 +1019,18 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
case IOCCMD_HOST_SET_CID:
return ioc_host_set_cid (&plcbox->host_set_cid);
-#ifdef CONFIG_PLC_8021X
case IOCCMD_HOST_SET_AUTH:
return ioc_host_set_auth (&plcbox->host_set_auth);
case IOCCMD_HOST_SET_AUTH_BY_ADDR:
return ioc_host_set_auth_by_addr (&plcbox->host_set_auth_by_addr);
-#endif // CONFIG_PLC_8021X
#ifdef CONFIG_PLC_CRYPTO
case IOCCMD_HOST_SET_PEK_BY_ADDR:
return ioc_host_set_pek_by_addr (&plcbox->host_set_pek_by_addr);
case IOCCMD_HOST_SET_PEXPK_BY_ADDR:
- return ioc_host_set_pexpk_by_addr (&plcbox->host_set_pexpk_by_addr);
+ return ioc_host_set_pexpk_by_addr (&plcbox->
+ host_set_pexpk_by_addr);
#endif // CONFIG_PLC_CRYPTO
case IOCCMD_SET_ADAPTS:
@@ -996,7 +1075,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
}
// copy request from user space to kernel space
- if (copy_from_user (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
+ if (copy_from_user
+ (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (kernbox);
@@ -1010,7 +1090,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
rtnl_lock ();
// copy request from user space to kernel space
- if (copy_to_user (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
+ if (copy_to_user
+ (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (kernbox);
@@ -1035,25 +1116,31 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
}
// copy request from user space to kernel space
- if (copy_from_user (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
+ if (copy_from_user
+ (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (kernbox);
break;
}
- kernbox->stats.netstats.rx_packets = unit->netstats.rx_packets;
- kernbox->stats.netstats.tx_packets = unit->netstats.tx_packets;
+ kernbox->stats.netstats.rx_packets =
+ unit->netstats.rx_packets;
+ kernbox->stats.netstats.tx_packets =
+ unit->netstats.tx_packets;
kernbox->stats.netstats.rx_bytes = unit->netstats.rx_bytes;
kernbox->stats.netstats.tx_bytes = unit->netstats.tx_bytes;
kernbox->stats.netstats.rx_errors = unit->netstats.rx_errors;
kernbox->stats.netstats.tx_errors = unit->netstats.tx_errors;
- kernbox->stats.netstats.rx_dropped = unit->netstats.rx_dropped;
- kernbox->stats.netstats.tx_dropped = unit->netstats.tx_dropped;
+ kernbox->stats.netstats.rx_dropped =
+ unit->netstats.rx_dropped;
+ kernbox->stats.netstats.tx_dropped =
+ unit->netstats.tx_dropped;
kernbox->stats.packetstats = unit->packetstats;
// copy request from user space to kernel space
- if (copy_to_user (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
+ if (copy_to_user
+ (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (kernbox);
@@ -1065,6 +1152,139 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
}
break;
#endif
+
+#ifdef PLC_RECOVERY
+ case IOCCMD_WRITE_RECOVERY:
+ {
+ union plcbox_t *kernbox;
+ struct plcp_host *host;
+ int i;
+
+ kernbox = kmalloc (sizeof (union plcbox_t), GFP_KERNEL);
+ if (kernbox == NULL)
+ {
+ printk (KERN_WARNING "problem kmalloc\n");
+ break;
+ }
+
+ // copy request from user space to kernel space
+ if (copy_from_user
+ (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_from_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ kernbox->recovery.nb_hosts = 0;
+
+ // Send number of attached hosts and theirs mac addresses
+ // to be writen in the recovery.conf file.
+ for (i = 0; i < PLCP_MAX_HOST - 1; i++)
+ {
+ host = plcp_get_host_by_index (i + 1);
+
+ if (host != NULL)
+ {
+ kernbox->recovery.nb_hosts++;
+ memcpy (kernbox->recovery.mac_addr[i], host->mac_addr,
+ 6);
+ }
+ else
+ {
+ memset (kernbox->recovery.mac_addr[i], 0, 6);
+ }
+ }
+
+ // copy request from user space to kernel space
+ if (copy_to_user
+ (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ // freeing kernbox:
+ kfree (kernbox);
+ }
+ break;
+
+ case IOCCMD_NEED_RECOVERY:
+ {
+ union plcbox_t *kernbox;
+
+ kernbox = kmalloc (sizeof (union plcbox_t), GFP_KERNEL);
+ if (kernbox == NULL)
+ {
+ printk (KERN_WARNING "problem kmalloc\n");
+ break;
+ }
+
+ // copy request from user space to kernel space
+ if (copy_from_user
+ (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_from_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ // Send information about need for update recovery.conf file
+ kernbox->recovery.recovery_flag = RECOVERY_FLAG;
+ RECOVERY_FLAG = 0;
+
+ // copy request from user space to kernel space
+ if (copy_to_user
+ (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ // freeing kernbox:
+ kfree (kernbox);
+ }
+ break;
+
+ case IOCCMD_START_RECOVERY:
+ {
+ union plcbox_t *kernbox;
+
+ kernbox = kmalloc (sizeof (union plcbox_t), GFP_KERNEL);
+ if (kernbox == NULL)
+ {
+ printk (KERN_WARNING "problem kmalloc\n");
+ break;
+ }
+
+ // copy request from user space to kernel space
+ if (copy_from_user
+ (kernbox, plcbox /*user */ , sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_from_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ send_mm_l2r_sig (PLC_MLME_REQUEST_MSG, (void *) kernbox);
+
+ // copy request from user space to kernel space
+ if (copy_to_user
+ (plcbox /*user */ , kernbox, sizeof (union plcbox_t)))
+ {
+ printk (KERN_WARNING "problem copy_to_user\n");
+ kfree (kernbox);
+ break;
+ }
+
+ // freeing kernbox:
+ kfree (kernbox);
+ }
+ break;
+#endif // PLC_RECOVERY
+
}
break;
@@ -1082,7 +1302,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
//get hostNb from user space:
user_ptr_snAnalyser = (struct plc_analyser *) ifr->ifr_data;
- if (copy_from_user (snAnalyser, user_ptr_snAnalyser, sizeof (struct plc_analyser)))
+ if (copy_from_user
+ (snAnalyser, user_ptr_snAnalyser, sizeof (struct plc_analyser)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (snAnalyser);
@@ -1091,7 +1312,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
plcp_ce_sn_analyser (snAnalyser);
//return the data structure to user space:
- if (copy_to_user (user_ptr_snAnalyser, snAnalyser, sizeof (struct plc_analyser)))
+ if (copy_to_user
+ (user_ptr_snAnalyser, snAnalyser, sizeof (struct plc_analyser)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (snAnalyser);
@@ -1110,7 +1332,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
//get hostNb from user space:
user_ptr_agcAnalyser = (struct agc_analyser *) ifr->ifr_data;
- if (copy_from_user (agcAnalyser, user_ptr_agcAnalyser, sizeof (struct agc_analyser)))
+ if (copy_from_user
+ (agcAnalyser, user_ptr_agcAnalyser, sizeof (struct agc_analyser)))
{
printk (KERN_WARNING "problem copy_from_user\n");
kfree (agcAnalyser);
@@ -1119,7 +1342,8 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
plcp_ce_agc_analyser (agcAnalyser);
//return the data structure to user space:
- if (copy_to_user (user_ptr_agcAnalyser, agcAnalyser, sizeof (struct agc_analyser)))
+ if (copy_to_user
+ (user_ptr_agcAnalyser, agcAnalyser, sizeof (struct agc_analyser)))
{
printk (KERN_WARNING "problem copy_to_user\n");
kfree (agcAnalyser);
@@ -1129,11 +1353,13 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
//freeing memory:
kfree (agcAnalyser);
break;
-//PR51 END:
+ //PR51 END:
#endif
case SIOCTEST: //test mode RAW et mode BER
- if (copy_from_user (&test.usr, (struct testusr **) ifr->ifr_data, sizeof (struct testusr *)))
+ if (copy_from_user
+ (&test.usr, (struct testusr **) ifr->ifr_data,
+ sizeof (struct testusr *)))
{
printk ("ERROR copy_from_user\n");
return -1;
@@ -1145,37 +1371,12 @@ int plc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
printk ("ERROR make_test_frame\n");
return -1;
}
-#if 0
- printk ("IOCTL:\nframe =\n");
- printk ("\ttaille: %d\n", test.pframe->d_len);
- printk ("\tData_gain: %d\n", test.pframe->data_gain);
- printk ("\tCrtl_gain: %d\n", test.pframe->ctrl_gain);
- printk ("\tcontrol =\n");
- printk ("\t\tSTEI: %d\n", test.pframe->control->STEI);
- printk ("\t\tDTEI: %d\n", test.pframe->control->DTEI);
- printk ("\t\tChannel-id: %d\n", test.pframe->control->channel_id);
- printk ("\t\tSubtype: %d\n", test.pframe->control->subtype);
- printk ("\t\tBssid: %d\n", test.pframe->control->bssid);
- printk ("\t\tType: %d\n", test.pframe->control->type);
- printk ("\t\tRes[0]: %d\n", test.pframe->control->res[0]);
- printk ("\t\tRes[1]: %d\n", test.pframe->control->res[1]);
- printk ("\ndatas:");
- for (i = 0; i < test.pframe->d_len; i++)
- printk (" %02x", test.pframe->d_buf[i]);
- printk (" fin\n");
-#endif
mm_write (unit, test.pframe);
//attente de la synchro de fin de trame (tx_raw_handle_tx ou tx_ber_handle_tx)
wait_event_interruptible (wq, sleep_flag == 0);
sleep_flag = 1;
break;
-#ifdef CONFIG_PLC_PPC
- case SIOCPEPSI:
- //printk(KERN_ALERT "SIOCPEPSI\n");
- make_pepsi_frame (NULL);
- break;
-#endif
default:
return -EOPNOTSUPP;
@@ -1327,7 +1528,9 @@ __init plc_open (struct net_device *dev)
sig = rt_malloc (sizeof (struct plc_msg_));
sig->type = PLC_INIT_MSG;
- err = rt_mbx_send (((hal_tcb *) (plc_mm_l2r_))->mbx_active, (void *) &sig, sizeof (struct plc_msg_ *));
+ err =
+ rt_mbx_send (((hal_tcb *) (plc_mm_l2r_))->mbx_active, (void *) &sig,
+ sizeof (struct plc_msg_ *));
if (err)
PRINTK ("Sent failed : %d!\n", err);
@@ -1338,12 +1541,19 @@ __init plc_open (struct net_device *dev)
gpio_map[GPIO_EVENT_RX_END] = 18 - 16;
gpio_map[GPIO_EVENT_TX_START] = 19 - 16;
gpio_map[GPIO_EVENT_TX_END] = 20 - 16;
+#ifdef CONFIG_PLC_RTSCTS
+ gpio_map[GPIO_EVENT_TX_RTS] = 21 - 16;
+ gpio_map[GPIO_EVENT_RX_CTS] = 22 - 16;
+ gpio_map[GPIO_EVENT_RX_RTS] = 23 - 16;
+ gpio_map[GPIO_EVENT_TX_CTS] = 24 - 16;
+#else
gpio_map[GPIO_EVENT_APE110_RX_OVERRUN] = 21 - 16;
gpio_map[GPIO_EVENT_APE110_RX_POLL] = 22 - 16;
gpio_map[GPIO_EVENT_APE110_RX_COMPLETE] = 22 - 16;
gpio_map[GPIO_EVENT_APE110_TX_POLL] = 23 - 16;
gpio_map[GPIO_EVENT_APE110_TX_COMPLETE] = 23 - 16;
gpio_map[GPIO_EVENT_MAC_RX_COORD] = 24 - 16;
+#endif
gpio_map[GPIO_EVENT_MAC_TX_COORD] = 25 - 16;
gpio_map[GPIO_EVENT_MAC_RETRY_LIMIT] = 26 - 16;
gpio_map[GPIO_EVENT_RX_BAD_SLICE] = 28 - 16;
@@ -1392,19 +1602,16 @@ static inline void dcEthFree (void *dcObjects, void *buf);
*
*****************************************************************/
-void drv_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct sk_buff *skb, bool failed)
+void drv_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct sk_buff *skb, bool failed)
{
struct net_device *dev = &plc_dev;
int broadcast;
-#ifdef CONFIG_PLC_8021X
- int eth_type_pae = 0;
- uint16_t eth_type = *(uint16_t *) & skb->data[12];
-#endif /* CONFIG_PLC_8021X */
-
if (unlikely (skb->data[0] & 0x01))
{
- if (*((uint32_t *) skb->data) == 0xffffffff && *(((uint16_t *) skb->data) + 2) == 0xffff)
+ if (*((uint32_t *) skb->data) == 0xffffffff &&
+ *(((uint16_t *) skb->data) + 2) == 0xffff)
{
unit->packetstats.rx_bpackets++;
broadcast = 1;
@@ -1421,17 +1628,24 @@ void drv_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct sk
broadcast = 0;
}
-#ifdef CONFIG_PLC_8021X
- if (eth_type == htons (0x888e))
- eth_type_pae = 1;
-
- if ((host->authenticated == 0) && (broadcast == 0) && (eth_type_pae == 0))
+ // If 802.1x authentication is turned on and slave is not authenticated
+ // drop all packets except management messages.
+ if (unit->auth_8021x)
{
- unit->netstats.rx_dropped++;
- dev_kfree_skb (skb);
- return;
+ int eth_type_pae = 0;
+ uint16_t eth_type = *(uint16_t *) & skb->data[12];
+
+ if (eth_type == htons (0x888e))
+ eth_type_pae = 1;
+
+ if ((host->authenticated == 0) && (broadcast == 0) &&
+ (eth_type_pae == 0))
+ {
+ unit->netstats.rx_dropped++;
+ dev_kfree_skb (skb);
+ return;
+ }
}
-#endif // CONFIG_PLC_8021X
if (failed)
{
@@ -1473,7 +1687,8 @@ static int plc_write (struct sk_buff *skb, struct net_device *dev)
unit->netstats.tx_bytes += skb->len;
if (unlikely (skb->data[0] & 0x01))
{
- if (*((uint32_t *) skb->data) == 0xffffffff && *(((uint16_t *) skb->data) + 2) == 0xffff)
+ if (*((uint32_t *) skb->data) == 0xffffffff &&
+ *(((uint16_t *) skb->data) + 2) == 0xffff)
unit->packetstats.tx_bpackets++;
else
unit->packetstats.tx_mpackets++;
@@ -1502,7 +1717,16 @@ static int plc_write (struct sk_buff *skb, struct net_device *dev)
/* Only if not an ARP */
if (carp_needs_update (skb->data))
{
+#ifdef CONFIG_PLC_PPC
+ if (l2_ppc && l2_ppc->l2_carp_update)
+ {
+ //l2_ppc->l2_carp_update(&DA[6], &unit->TEI);
+ }
+ else
+ carp_insert (&DA[6], local_host); // as case for not loaded driver to preserve some functionality..
+#else
carp_insert (&DA[6], local_host);
+#endif
}
//GPIO_WRITE(MAC_WRITE,1);
@@ -1519,7 +1743,12 @@ static int plc_write (struct sk_buff *skb, struct net_device *dev)
prio = 0;
}
err =
- mac_write (unit, DA, (uint8_t *) (skb->data), skb->len, subtype, 0 /*flags */ , prio, unit->TEI, (void *) skb);
+ mac_write (unit, DA, (uint8_t *) (skb->data), skb->len, subtype,
+ 0 /*flags */ , prio, unit->TEI, (void *) skb
+#ifdef CONFIG_PLC_PPC
+ , 0
+#endif
+ );
//GPIO_WRITE(MAC_WRITE,0);
if (unlikely (err < 0))
{
@@ -1566,7 +1795,8 @@ static int plc_set_mac_address (struct net_device *dev, void *p)
* plc_drv_init
*
*****************************************************************/
-extern int (*mac_handle_rx) (struct plc_drv_unit * unit, struct plcp_frame * pframe);
+extern int (*mac_handle_rx) (struct plc_drv_unit * unit,
+ struct plcp_frame * pframe);
static int drv_poll_xmit_done (struct net_device *dev, int budget);
@@ -1587,7 +1817,9 @@ static int drv_poll_recv_done (struct net_device *dev, int *budget)
hard_local_irq_save (flags);
while ((n < quota) && (!(list_empty (&plcp_rx_queue[PLCP_PRIO_DATA]))))
{
- pframe = list_entry (plcp_rx_queue[PLCP_PRIO_DATA].next, struct plcp_frame, link);
+ pframe =
+ list_entry (plcp_rx_queue[PLCP_PRIO_DATA].next, struct plcp_frame,
+ link);
list_del_init (&pframe->link);
hard_local_irq_restore (flags);
@@ -1623,7 +1855,8 @@ static int drv_poll_recv_done (struct net_device *dev, int *budget)
unsigned long NAPI_FLAGS;
static int plc_poll (struct net_device *dev, int *budget)
{
- return (drv_poll_xmit_done (dev, *budget) || drv_poll_recv_done (dev, budget));
+ return (drv_poll_xmit_done (dev, *budget) ||
+ drv_poll_recv_done (dev, budget));
}
#ifdef CONFIG_PLC_MCAST
@@ -1694,7 +1927,8 @@ static void read_nvram (char *plcPhysAddress)
memcpy ((char *) &nvram, (char *) NVRAM_BASE_ADDRESS, sizeof (nvram));
hard_local_irq_restore (flags);
- if (nvram.magicWord1 == NVRAM_MAGIC_WORD1 && nvram.magicWord2 == NVRAM_MAGIC_WORD2)
+ if (nvram.magicWord1 == NVRAM_MAGIC_WORD1 &&
+ nvram.magicWord2 == NVRAM_MAGIC_WORD2)
{
char *p;
@@ -1702,12 +1936,14 @@ static void read_nvram (char *plcPhysAddress)
if ((p = strchr (nvram.serialNumber, ' ')))
*p = '\0';
- if (!strncmp (nvram.serialNumber, "SPR200-ETH-", 11) || !strncmp (nvram.serialNumber, "SPR200-eth-", 11))
+ if (!strncmp (nvram.serialNumber, "SPR200-ETH-", 11) ||
+ !strncmp (nvram.serialNumber, "SPR200-eth-", 11))
{
strcpy (serial_number, &nvram.serialNumber[11]);
strcpy (board_version, "SPR200-ETH");
}
- else if (!strncmp (nvram.serialNumber, "SPK200-e-", 9) || !strncmp (nvram.serialNumber, "SPK200-E-", 9))
+ else if (!strncmp (nvram.serialNumber, "SPK200-e-", 9) ||
+ !strncmp (nvram.serialNumber, "SPK200-E-", 9))
{
strcpy (serial_number, &nvram.serialNumber[9]);
strcpy (board_version, "SPK200-e");
@@ -1748,7 +1984,8 @@ static void read_nvram (char *plcPhysAddress)
}
board_version_set = 1;
serial_number_set = 1;
- memcpy (plcPhysAddress, nvram.plcPhysAddress, sizeof (nvram.plcPhysAddress));
+ memcpy (plcPhysAddress, nvram.plcPhysAddress,
+ sizeof (nvram.plcPhysAddress));
}
else
{
@@ -1801,6 +2038,11 @@ __init plc_drv_init (struct net_device *dev)
ze_unit->rx_int_enabled = 1;
ze_unit->tx_int_enabled = 1;
+#ifdef CONFIG_PLC_RTSCTS
+ ze_unit->rts_threshold = 40;
+ ze_unit->nav_offset = 36;
+ ze_unit->max_rts_retrans = 10;
+#endif
#ifdef SP_FCM3
strncpy (board_version, fcm3boardversion, 64);
strncpy (serial_number, fcm3serialnumber, 64);
@@ -1832,6 +2074,9 @@ __init plc_drv_init (struct net_device *dev)
ze_unit->id = 0;
ze_unit->dev = dev;
+#ifdef CONFIG_PLC_PPC
+ ze_unit->PPC_repeater = 0;
+#endif
// default: overriden by sysctl
/* ze_unit->mac.config.master = 0;*/
@@ -1875,7 +2120,8 @@ irqreturn_t plc_poll_irq (int irq, void *dev_id, struct pt_regs * regs)
return IRQ_HANDLED;
}
-void drv_xmit_done_skb (struct plc_drv_unit *unit, struct mac_frame *frame, int status)
+void drv_xmit_done_skb (struct plc_drv_unit *unit, struct mac_frame *frame,
+ int status)
{
int subtype, flags;
struct plcp_host *host;
@@ -1895,24 +2141,53 @@ void drv_xmit_done_skb (struct plc_drv_unit *unit, struct mac_frame *frame, int
/* must be decremented just after buffer has been freeded */
host->msdu_queued--;
ASSERT (host->msdu_queued >= 0);
-#ifdef BUFFER_ISOLATION
if ((host->msdu_queued == 0) && (host->xmit_active))
{
xmit_host--;
- xmit_host_skb = (xmit_host < xmit_host_min) ? max_xmit_skb / xmit_host_min : max_xmit_skb / xmit_host;
+ xmit_host_skb =
+ (xmit_host <
+ xmit_host_min) ? max_xmit_skb / xmit_host_min : max_xmit_skb /
+ xmit_host;
host->xmit_active = 0;
}
-#endif
LOCK_RESTORE (msr);
subtype = frame->subtype;
flags = frame->header->flags;
skb = frame->priv;
+
+#ifdef CONFIG_PLC_PPC
+ if (status == SEND_FAILED)
+ {
+ PPC_PRINTK ("SND_FAIL: DTEI=%d STEI=%d LEN=%d\n",
+ frame->header->ppc_header.DTEI, host->TEI,
+ frame->header->len);
+ if (l2_ppc && l2_ppc->l2_sched_packet_fail)
+ {
+ l2_ppc->l2_sched_packet_fail (frame->header->ppc_header.DTEI,
+ host->TEI, frame->header->len);
+ }
+ }
+ else
+ {
+ PPC_PRINTK ("SND_DONE: DTEI=%d STEI=%d LEN=%d\n",
+ frame->header->ppc_header.DTEI, host->TEI,
+ frame->header->len);
+ if (l2_ppc && l2_ppc->l2_sched_packet_succeed)
+ {
+ l2_ppc->l2_sched_packet_succeed (frame->header->ppc_header.DTEI,
+ host->TEI, frame->header->len,
+ frame->pbMissing + 1);
+ }
+ }
+#endif
+
mac_free_tx_frame (frame);
#ifdef CONFIG_PLC_VPORT
if ((unit->mode == repeater) && (subtype == MA_SUBTYPE_INTER_CELL))
{
- vport_handle_tx (vport_find (unit, (uint8_t *) & host->mac_addr), skb);
+ vport_handle_tx (vport_find (unit, (uint8_t *) & host->mac_addr),
+ skb);
return;
}
#endif
@@ -1922,10 +2197,12 @@ void drv_xmit_done_skb (struct plc_drv_unit *unit, struct mac_frame *frame, int
netif_wake_queue (&plc_dev);
GPIO_WRITE (GPIO_EVENT_PLC0_QUEUE_STOPPED, 0);
}
- dev_kfree_skb_any (skb);
+ if (skb)
+ dev_kfree_skb_any (skb);
}
-static int drv_xmit_done_pframe (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static int drv_xmit_done_pframe (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
struct mac_frame *frame;
int msr;
@@ -1950,7 +2227,13 @@ static int drv_xmit_done_pframe (struct plc_drv_unit *unit, struct plcp_frame *p
unit->stats.mac.tx_msdu++;
pframe->host->stats.tx_done_msdu++;
LOCK_RESTORE (msr);
+#ifdef CONFIG_PLC_PPC
+ frame->pbMissing = pframe->nb_retries;
+ drv_xmit_done_skb (unit, frame,
+ (pframe->pb_errors) ? SEND_FAILED : SEND_DONE);
+#else
drv_xmit_done_skb (unit, frame, SEND_DONE);
+#endif
n++;
}
else
@@ -1960,6 +2243,76 @@ static int drv_xmit_done_pframe (struct plc_drv_unit *unit, struct plcp_frame *p
}
}
}
+
+extern void release_pending_frames (int size);
+
+// force empty all frames from plcp_host
+void empty_plcp_host (struct plcp_host *host, int status)
+{
+ int prio, found = 0, posa = 3, size = 0;
+ struct list_head *entry, *temp;
+ struct plcp_frame *pframe = NULL;
+ struct mac_frame *frame = NULL;
+ uint32_t msr;
+
+ LOCK_SAVE (msr);
+
+ // release all plcp frames...
+ for (prio = 0; prio < PLCP_NB_PRIO; prio++)
+ if (!list_empty (&host->tx_queue[prio]))
+ list_for_each_safe (entry, temp, &host->tx_queue[prio])
+ {
+ pframe = list_entry (entry, struct plcp_frame, link);
+
+ if ((pframe->state == PLCP_READY || pframe->state == PLCP_XMIT ||
+ pframe->lock))
+ {
+ found = 1;
+ posa = prio;
+ if (status)
+ continue;
+ }
+
+ list_del_init (entry);
+ drv_xmit_done_pframe (ze_unit, pframe);
+ size++;
+ }
+
+ // check if all mac frames ...
+ for (prio = 0; prio < PLCP_NB_PRIO; prio++)
+ if (!list_empty (&host->mac_tx_queue[prio]))
+ list_for_each_safe (entry, temp, &host->mac_tx_queue[prio])
+ {
+ frame = list_entry (entry, struct mac_frame, link);
+
+ list_del_init (entry);
+ drv_xmit_done_skb (ze_unit, frame, SEND_FAILED);
+ }
+
+ // initialize empty structures..
+ host->msdu_queued = 0;
+ for (prio = 0; prio < PLCP_NB_PRIO; prio++)
+ {
+ INIT_LIST_HEAD (&host->mac_tx_queue[prio]);
+ host->mac_queued[prio] = 0;
+ if (found && posa == prio)
+ {
+ host->tx_queue_count[prio] = 1;
+ host->msdu_queued = 1;
+ }
+ else
+ {
+ INIT_LIST_HEAD (&host->tx_queue[prio]);
+ host->tx_queue_count[prio] = 0;
+ }
+ }
+
+ release_pending_frames (size);
+
+ LOCK_RESTORE (msr);
+}
+
+
extern void mac_poll_tx_queue (struct plc_drv_unit *unit);
static int drv_poll_xmit_done (struct net_device *dev, int budget)
@@ -1983,7 +2336,9 @@ static int drv_poll_xmit_done (struct net_device *dev, int budget)
break;
}
- pframe = list_entry (plcp_tx_done_queue[PLCP_PRIO_DATA].next, struct plcp_frame, link);
+ pframe =
+ list_entry (plcp_tx_done_queue[PLCP_PRIO_DATA].next,
+ struct plcp_frame, link);
list_del_init (&pframe->link);
hard_local_irq_restore (flags);
@@ -1997,21 +2352,6 @@ static int drv_poll_xmit_done (struct net_device *dev, int budget)
return more;
}
-#if 0
-/*
- * plc_tx_r2l : RTAI to LINUX
- * Handle the transmited packets
- */
-irqreturn_t plc_tx_r2l (int irq, void *dev_id, struct pt_regs * regs)
-{
- struct plc_drv_unit *priv = plc_dev.priv;
-
- priv->tx_int_enabled = 0;
- tasklet_schedule (&tx_r2l_tasklet);
- return IRQ_HANDLED;
-}
-#endif
-
#ifdef CONFIG_PLC_VPORT
static struct work_struct vport_wq;
static struct vport_msg_ *vport_msgs[8];
@@ -2041,6 +2381,11 @@ static void vport_work (void *unused)
#endif
+static void auth_work_func (void *unused)
+{
+ drv_handle_rx (auth->unit, auth->host, auth->skb, 0);
+}
+
irqreturn_t plc_r2l (int irq, void *dev_id, struct pt_regs *regs)
{
struct plc_msg_ *sig;
@@ -2076,14 +2421,6 @@ irqreturn_t plc_r2l (int irq, void *dev_id, struct pt_regs *regs)
wake_up_interruptible (&mlme_wait_queue);
break;
-#if 0
- ifdef CONFIG_PLC_MCAST case PLC_CFN_MEMBER_MSG:
- // change the condition of the wait_event_interruptible
- mcast = (struct plc_mcast_member *) sig->buf;
-
- kfree (mcast);
- break;
-#endif
case PLC_GETM_SN_MSG:
// change the condition of the wait_event_interruptible
@@ -2099,9 +2436,47 @@ irqreturn_t plc_r2l (int irq, void *dev_id, struct pt_regs *regs)
case PLC_MIB_EVENT:
event = (union mib_event *) sig->buf;
+ event->host_up.event_id;
nl_send_event (event);
break;
+#ifdef CONFIG_PLC_PPC
+ case PPC_HOST_CREATE:
+ wait_sem (ppc_r2l_host_lock);
+ ppc_host = (struct l2_host *) sig->buf;
+ ppc_r2l_req = PPCR2LREQ_HOST_CREATE;
+ schedule_work (&ppc_work);
+ break;
+
+ case PPC_HOST_DELETE:
+ wait_sem (ppc_r2l_host_lock);
+ ppc_host = (struct l2_host *) sig->buf;
+ ppc_r2l_req = PPCR2LREQ_HOST_DELETE;
+ schedule_work (&ppc_work);
+ break;
+
+ case PPC_HOST_UPDATE:
+ wait_sem (ppc_r2l_host_lock);
+ ppc_host = (struct l2_host *) sig->buf;
+ ppc_r2l_req = PPCR2LREQ_HOST_UPDATE;
+ schedule_work (&ppc_work);
+ break;
+#endif
+
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+ case PLC_EN_HOST_CREATE:
+ case PLC_EN_HOST_DESTROY:
+ wait_sem (plc_en_hostreq_lock);
+ plc_en_host = sig->buf;
+ plc_en_req = sig->type;
+ schedule_work (&plc_en_work);
+ break;
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
+ case PLC_HOST_AUTH:
+ auth = (struct authentication_8021x *) sig->buf;
+ schedule_work (&auth_work);
+
default:
break;
}
@@ -2149,7 +2524,8 @@ OS_PROCESS (plc_mm_l2r)
case PLC_CE_START_HOST_MSG:
{
// ce_start_host_msg_ is mapped on 32 bit data
- struct ce_start_host_msg_ *msg = (struct ce_start_host_msg_ *) &sig->data;
+ struct ce_start_host_msg_ *msg =
+ (struct ce_start_host_msg_ *) &sig->data;
struct plcp_host *host;
bool automatic;
@@ -2204,8 +2580,14 @@ OS_PROCESS (plc_mm_l2r)
mlme_assoc (&kernbox->assoc_req, &kernbox->assoc_cfn);
break;
case IOCCMD_MLME_DISASSOC:
- mlme_disassoc (&kernbox->disassoc_req, &kernbox->disassoc_cfn);
+ mlme_disassoc (&kernbox->disassoc_req,
+ &kernbox->disassoc_cfn);
+ break;
+#ifdef PLC_RECOVERY
+ case IOCCMD_START_RECOVERY:
+ mlme_start_recovery (&kernbox->recovery);
break;
+#endif
}
send_r2l_sig (PLC_MLME_CONFIRM_MSG, (void *) sig->data);
@@ -2216,7 +2598,8 @@ OS_PROCESS (plc_mm_l2r)
case PLC_SIOC_MSG:
#ifndef SP_FCM3
utmo = (struct utmo_t *) sig->buf;
- printk ("Starting test %d with %d and %d\n", utmo->test, utmo->t1, utmo->t2);
+ printk ("Starting test %d with %d and %d\n", utmo->test, utmo->t1,
+ utmo->t2);
switch (utmo->test)
{
case 0:
@@ -2334,84 +2717,115 @@ static int __init plc_init_module (void)
if (result)
printk (DRV_NAME ": Error %i registering driver\n", result);
- proc = create_process (OS_PRI_PROC, "tx_management_process", tx_management_process, 2048, 4, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "tx_management_process",
+ tx_management_process, 2048, 4, 0, 0, 0, 0, 0);
start (proc);
- proc = create_process (OS_PRI_PROC, "rx_management_process", rx_management_process, 2048, 5, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "rx_management_process",
+ rx_management_process, 2048, 5, 0, 0, 0, 0, 0);
start (proc);
#ifndef CONFIG_PLC_KTHRD
- proc = create_process (OS_PRI_PROC, "ce_process", ce_process, 2048, 3, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "ce_process", ce_process, 2048, 3, 0, 0,
+ 0, 0, 0);
start (proc);
- proc = create_process (OS_PRI_PROC, "ce_indicate", ce_indicate, 1024, 3, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "ce_indicate", ce_indicate, 1024, 3, 0,
+ 0, 0, 0, 0);
start (proc);
#else
- proc = create_process (KTHRD_INT_PROC, "ce_kthread", ce_kthrd_isr, PLC_DRV_ISR_STACK_SIZE, 9, 0, 0, 0, CE_IRQ, 0);
+ proc =
+ create_process (KTHRD_INT_PROC, "ce_kthread", ce_kthrd_isr,
+ PLC_DRV_ISR_STACK_SIZE, 9, 0, 0, 0, CE_IRQ, 0);
start (proc);
#endif
#ifndef CONFIG_PLC_KTHRD
- proc = create_process (OS_PRI_PROC, "network_discovery", network_discovery, 2048, 2, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "network_discovery", network_discovery,
+ 2048, 2, 0, 0, 0, 0, 0);
start (proc);
#else
proc =
- create_process (KTHRD_INT_PROC, "nd_kthread", neighbour_kthrd_isr, PLC_DRV_ISR_STACK_SIZE, 10, 0, 0, 0, ND_IRQ,
- 0);
+ create_process (KTHRD_INT_PROC, "nd_kthread", neighbour_kthrd_isr,
+ PLC_DRV_ISR_STACK_SIZE, 10, 0, 0, 0, ND_IRQ, 0);
start (proc);
#endif
#if CONFIG_PLC_IRQS && (CONFIG_TINA_C || SP_FCM3)
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr2", pmd_patch_phlic_isr2, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_2, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr2",
+ pmd_patch_phlic_isr2, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_2, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr3", pmd_patch_phlic_isr3, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_3, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr3",
+ pmd_patch_phlic_isr3, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_3, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr4", pmd_patch_phlic_isr4, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_4, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr4",
+ pmd_patch_phlic_isr4, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_4, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr5", pmd_patch_phlic_isr5, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_5, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr5",
+ pmd_patch_phlic_isr5, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_5, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr6", pmd_patch_phlic_isr6, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_6, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr6",
+ pmd_patch_phlic_isr6, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_6, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr8", pmd_patch_phlic_isr8, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_8, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr8",
+ pmd_patch_phlic_isr8, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_8, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr9", pmd_patch_phlic_isr9, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0, 0,
- 0, PLC_INT_PHLIC_9, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr9",
+ pmd_patch_phlic_isr9, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_9, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "pmd_patch_phlic_isr10", pmd_patch_phlic_isr10, 2 * PLC_DRV_ISR_STACK_SIZE, 3, 0,
- 0, 0, PLC_INT_PHLIC_10, 0);
+ create_process (OS_INT_PROC, "pmd_patch_phlic_isr10",
+ pmd_patch_phlic_isr10, 2 * PLC_DRV_ISR_STACK_SIZE, 3,
+ 0, 0, 0, PLC_INT_PHLIC_10, 0);
start (proc);
#else
proc =
- create_process (OS_INT_PROC, "pmd_phlic_isr", pmd_phlic_isr, 2 * PLC_DRV_ISR_STACK_SIZE,
- 3 /*PLC_PHLIC_INT_SW_PRIO */ , 0, 0, 0, PLC_INT_PHLIC_VECTOR, 0);
+ create_process (OS_INT_PROC, "pmd_phlic_isr", pmd_phlic_isr,
+ 2 * PLC_DRV_ISR_STACK_SIZE,
+ 3 /*PLC_PHLIC_INT_SW_PRIO */ , 0, 0, 0,
+ PLC_INT_PHLIC_VECTOR, 0);
start (proc);
#endif
proc =
- create_process (OS_INT_PROC, "pmd_dma_isr", pmd_dma_isr, 2 * PLC_DRV_ISR_STACK_SIZE,
- 4 /*PLC_DMA_INT_SW_PRIO */ , 0, 0, 0, PLC_INT_RX_VECTOR, 0);
+ create_process (OS_INT_PROC, "pmd_dma_isr", pmd_dma_isr,
+ 2 * PLC_DRV_ISR_STACK_SIZE,
+ 4 /*PLC_DMA_INT_SW_PRIO */ , 0, 0, 0,
+ PLC_INT_RX_VECTOR, 0);
start (proc);
proc =
- create_process (OS_INT_PROC, "tx_coordination", tx_coordination, 2 * PLC_DRV_ISR_STACK_SIZE,
- 4 /*PLC_DMA_INT_SW_PRIO */ , 0, 0, 0, TX_COORD_INT_VECTOR, 0);
+ create_process (OS_INT_PROC, "tx_coordination", tx_coordination,
+ 2 * PLC_DRV_ISR_STACK_SIZE,
+ 4 /*PLC_DMA_INT_SW_PRIO */ , 0, 0, 0,
+ TX_COORD_INT_VECTOR, 0);
start (proc);
- proc = create_process (OS_PRI_PROC, "plc_mm_l2r", plc_mm_l2r, 2048, 6, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "plc_mm_l2r", plc_mm_l2r, 2048, 6, 0, 0,
+ 0, 0, 0);
start (proc);
- proc = create_process (OS_PRI_PROC, "mac_timer_process", mac_timer_proc, 2048, 10, 0, 0, 0, 0, 0);
+ proc =
+ create_process (OS_PRI_PROC, "mac_timer_process", mac_timer_proc,
+ 2048, 10, 0, 0, 0, 0, 0);
start (proc);
- result = request_irq (POLL_IRQ, plc_poll_irq, SA_INTERRUPT, "plc_rx", NULL);
+ result =
+ request_irq (POLL_IRQ, plc_poll_irq, SA_INTERRUPT, "plc_rx", NULL);
if (result)
printk ("Can't assigned irq %d; error = %d\n", POLL_IRQ, result);
@@ -2438,11 +2852,14 @@ static int __init plc_init_module (void)
#ifdef CONFIG_PLC_PPC
ppc_r2l_lock = create_sem (1);
+ ppc_r2l_host_lock = create_sem (1);
INIT_WORK (&ppc_work, ppc_work_func, NULL);
#ifdef BUILD_PPC_TEST
kernel_thread (tst_fun, NULL, 0);
#endif
#endif
+
+ INIT_WORK (&auth_work, auth_work_func, NULL);
return result;
}
@@ -2485,5 +2902,73 @@ static void plc_cleanup_module (void)
}
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+
+struct plc_en_func *callbacks = 0;
+
+/* Function plc_en_hosts() saves plc_en_struture pointer that was passed as an argument,
+ * in variable callbacks, for future uses. If argument is not NULL, it then checks which hosts are
+ * connected and calls function new_host() from plc_en_func structure for every host. If argument is
+ * NULL, it sets callbacks, so that they can not be used in future. */
+void plc_en_register (struct plc_en_func *cb_funcs)
+{
+ int i;
+ struct plcp_host *host;
+
+ /* Saving callback functions for future use - when host
+ * connects or dissconnects these functions will be called. */
+ callbacks = cb_funcs;
+
+ /* Unregister if callbacks are NULL. */
+ if (!callbacks)
+ {
+ flush_scheduled_work ();
+ /* Delete semaphore previously created with create_sem(). */
+ rt_sem_delete (plc_en_hostreq_lock);
+ rt_free (plc_en_hostreq_lock);
+ return;
+ }
+
+ for (i = 1; i < PLCP_MAX_HOST; i++)
+ {
+ host = plcp_get_host_by_index (i);
+ /* check if host exists and if it is unicast. */
+ if (host && is_unicast_tei (host->TEI))
+ /* and if it is, callback new_host() to create it. */
+ if (callbacks->new_host)
+ callbacks->new_host (host->mac_addr, host->TEI);
+ }
+
+ /* Create semaphore that will protect plc_en_host and plc_en_req. */
+ plc_en_hostreq_lock = create_sem (1);
+ INIT_WORK (&plc_en_work, plc_en_work_func, NULL);
+}
+
+EXPORT_SYMBOL (plc_en_register);
+
+
+void plc_en_work_func (void *arg)
+{
+ switch (plc_en_req)
+ {
+ case PLC_EN_HOST_CREATE:
+ if (callbacks && callbacks->new_host)
+ callbacks->new_host (((struct plcp_host *) plc_en_host)->mac_addr,
+ ((struct plcp_host *) plc_en_host)->TEI);
+ break;
+ case PLC_EN_HOST_DESTROY:
+ if (callbacks && callbacks->del_host)
+ callbacks->del_host (((struct plc_en_host *) plc_en_host)->
+ mac_addr,
+ ((struct plc_en_host *) plc_en_host)->TEI);
+ rt_free (plc_en_host);
+ break;
+ }
+
+ signal_sem (plc_en_hostreq_lock);
+}
+
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
module_init (plc_init_module);
module_exit (plc_cleanup_module);
diff --git a/app/sm-plc-drv/src/linux_vport.c b/app/sm-plc-drv/src/linux_vport.c
index b9e890fefb..83ba7e9cdf 100755
--- a/app/sm-plc-drv/src/linux_vport.c
+++ b/app/sm-plc-drv/src/linux_vport.c
@@ -112,8 +112,11 @@ static int plc_vport_tx (struct sk_buff *skb, struct net_device *dev)
return -ENODEV;
}
- err = mac_write (p->master_unit, (uint8_t *) & p->peer_addr, (uint8_t *) (skb->data), skb->len,
- MA_SUBTYPE_INTER_CELL, 0 /*flags */ , MAC_PRIO_MSDU, p->master_unit->TEI, (void *) skb);
+ err =
+ mac_write (p->master_unit, (uint8_t *) & p->peer_addr,
+ (uint8_t *) (skb->data), skb->len, MA_SUBTYPE_INTER_CELL,
+ 0 /*flags */ , MAC_PRIO_MSDU, p->master_unit->TEI,
+ (void *) skb);
if (err >= 0)
{
dev->trans_start = jiffies;
@@ -180,6 +183,9 @@ struct plc_vport_unit *vport_new_vport (uint32_t master_unit_id)
result = kmalloc (sizeof (struct plc_vport_unit), GFP_KERNEL);
+ if (result == NULL)
+ return -ENOMEM;
+
memset (result, 0, sizeof (struct plc_vport_unit));
result->master_unit_id = master_unit_id;
@@ -194,15 +200,17 @@ void vport_free_vport (struct plc_vport_unit *vport)
kfree (vport);
}
-bool vport_set_peer_address (struct plc_vport_unit *vport, struct mac_addr *mac_addr)
+bool vport_set_peer_address (struct plc_vport_unit *vport,
+ struct mac_addr *mac_addr)
{
- memcpy ((char *) &vport->peer_addr, (char *) mac_addr, sizeof (struct mac_addr));
+ memcpy ((char *) &vport->peer_addr, (char *) mac_addr,
+ sizeof (struct mac_addr));
return true;
}
-int vport_desc (struct plc_vport_unit *vport, struct mac_addr *peer_addr, uint8_t * peer_bssid, uint8_t * peer_tei,
- uint8_t * localtei)
+int vport_desc (struct plc_vport_unit *vport, struct mac_addr *peer_addr,
+ uint8_t * peer_bssid, uint8_t * peer_tei, uint8_t * localtei)
{
if (vport)
{
@@ -245,7 +253,9 @@ static void vport_attach (struct plc_vport_unit *vport)
int err;
rtnl_lock ();
- err = br_add_if ((struct net_bridge *) netdev_priv (br_dev), plc_vport_dev);
+ err =
+ br_add_if ((struct net_bridge *) netdev_priv (br_dev),
+ plc_vport_dev);
dev_put (br_dev); // acquired by dev_get_by_name
rtnl_unlock ();
}
@@ -261,7 +271,9 @@ static void vport_detach (struct plc_vport_unit *vport)
int err;
rtnl_lock ();
- err = br_del_if ((struct net_bridge *) netdev_priv (br_dev), vport->dev);
+ err =
+ br_del_if ((struct net_bridge *) netdev_priv (br_dev),
+ vport->dev);
dev_put (br_dev); // acquired by dev_get_by_name
rtnl_unlock ();
}
@@ -284,7 +296,9 @@ int vport_create (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
// search existing vport for the same peer_addr
i = 0;
while (i < PLC_MAX_VPORTS &&
- (unit->vports[i] == NULL || !SAME_MAC ((uint8_t *) & (unit->vports[i]->peer_addr), (uint8_t *) peer_addr)))
+ (unit->vports[i] == NULL ||
+ !SAME_MAC ((uint8_t *) & (unit->vports[i]->peer_addr),
+ (uint8_t *) peer_addr)))
i++;
if (i < PLC_MAX_VPORTS)
@@ -322,7 +336,8 @@ int vport_create (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
vport_attach (unit->vports[i]);
- RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "CREATED vport " IEEE802_FMT "\n", IEEE802_VAL (peer_addr->addr));
+ RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "CREATED vport " IEEE802_FMT "\n",
+ IEEE802_VAL (peer_addr->addr));
return 0;
}
@@ -354,13 +369,15 @@ int vport_destroy (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
return 0;
}
-struct plc_vport_unit *vport_find (struct plc_drv_unit *unit, uint8_t * mac_addr)
+struct plc_vport_unit *vport_find (struct plc_drv_unit *unit,
+ uint8_t * mac_addr)
{
int i;
i = 0;
while (i < PLC_MAX_VPORTS &&
- (unit->vports[i] == NULL || !SAME_MAC (mac_addr, (uint8_t *) & unit->vports[i]->peer_addr)))
+ (unit->vports[i] == NULL ||
+ !SAME_MAC (mac_addr, (uint8_t *) & unit->vports[i]->peer_addr)))
i++;
if (i >= PLC_MAX_VPORTS)
diff --git a/app/sm-plc-drv/src/mac_backoff_proc.c b/app/sm-plc-drv/src/mac_backoff_proc.c
index 1a6eb5c9d8..a704f31a57 100644
--- a/app/sm-plc-drv/src/mac_backoff_proc.c
+++ b/app/sm-plc-drv/src/mac_backoff_proc.c
@@ -37,17 +37,19 @@
*
****************************************************************************************************/
-extern void mac_send_failed (struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern void mac_send_done (struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void mac_send_failed (struct plc_drv_unit *unit,
+ struct plcp_frame *frame);
+extern void mac_send_done (struct plc_drv_unit *unit,
+ struct plcp_frame *frame);
+extern bool phy_tx_data_request (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern bool plcp_stop_tresp (struct plc_drv_unit *unit, int signo);
-extern bool plcp_start_tresp (struct plc_drv_unit *unit, int obj, int signo, uint16_t date);
+extern bool plcp_start_tresp (struct plc_drv_unit *unit, int obj, int signo,
+ uint16_t date);
extern void phy_cca_request (struct plc_drv_unit *unit, uint16_t this_date);
// local function
-#ifdef SAFE_ACCESS
static void access_error (void *user_obj, void *ose_date);
-#endif
static int bp_state = BP_IDLE;
static uint16_t backoff = 0;
@@ -67,6 +69,9 @@ uint16_t bp_idle_date;
//#define trace(x) rt_printk x
#define trace(x)
+#ifdef CONFIG_PLC_RTSCTS
+extern struct plcp_frame *rtsd_pframe;
+#endif
/*********************************************************************************
*
@@ -91,7 +96,8 @@ static bool bp_enter_cw (struct plc_drv_unit *unit)
t2 = t1 + backoff * unit->mac.config.ts;
- trace (("idle: backoff is %d (t0=%d, t1=%d, t=%d)\n", backoff, t0, t1, t));
+ trace (("idle: backoff is %d (t0=%d, t1=%d, t=%d)\n", backoff, t0, t1,
+ t));
/* return 4 slots before to be sure t is taking into account */
t0 -= 4;
/* get duration since idle_date */
@@ -201,13 +207,16 @@ static void bp_defer_cw (struct plc_drv_unit *unit)
if (backoff < min)
{
/* this case is possible */
- csma_stats (csma_stats (unit->stats.access.slot_updated_min++));
+ csma_stats (csma_stats
+ (unit->stats.access.slot_updated_min++));
backoff = min;
}
else if (backoff > max)
{
- trace (("busy_up_max: boff=%d, t0=%d, t1=%d, t2=%d, t=%d\n", boff, t0, t1, t2, bp_busy_date));
- csma_stats (csma_stats (unit->stats.access.slot_updated_max++));
+ trace (("busy_up_max: boff=%d, t0=%d, t1=%d, t2=%d, t=%d\n",
+ boff, t0, t1, t2, bp_busy_date));
+ csma_stats (csma_stats
+ (unit->stats.access.slot_updated_max++));
backoff = max;
}
else
@@ -220,13 +229,15 @@ static void bp_defer_cw (struct plc_drv_unit *unit)
{
csma_stats (csma_stats (unit->stats.access.slot_kept++));
}
- trace (("busy: backoff changed to %d (t0=%d, t1=%d, t=%d)\n", backoff, t0, t1, bp_busy_date));
+ trace (("busy: backoff changed to %d (t0=%d, t1=%d, t=%d)\n", backoff,
+ t0, t1, bp_busy_date));
}
else
{
/* busy occured during IFS */
csma_stats (csma_stats (unit->stats.access.slot_kept++));
- trace (("busy: backoff not changed %d (t0=%d, t1=%d, t=%d)\n", backoff, t0, t1, bp_busy_date));
+ trace (("busy: backoff not changed %d (t0=%d, t1=%d, t=%d)\n",
+ backoff, t0, t1, bp_busy_date));
}
}
@@ -281,22 +292,19 @@ void set_ifs (uint16_t ifs)
used_ifs = ifs;
}
-#ifdef SAFE_ACCESS
/* start a timer to backoff bloking situation in case of busy without idle */
void start_backoff_timer (struct plc_drv_unit *unit)
{
hal_init_timer (&bp_timer);
- hal_start_timer (&bp_timer, MAC_ACCESS_LIMIT /*ms */ , access_error, (void *) 0, (void *) 0);
+ hal_start_timer (&bp_timer, MAC_ACCESS_LIMIT /*ms */ , access_error,
+ (void *) 0, (void *) 0);
}
-#endif
-#ifdef SAFE_ACCESS
/* stop backoff timer */
void stop_backoff_timer (void)
{
hal_stop_timer (&bp_timer);
}
-#endif
/* send ACCESS signal to tx_coordination, with a status */
@@ -311,12 +319,28 @@ void access_confirm (struct plc_drv_unit *unit, int status)
sig_send (&sig);
}
+#ifdef CONFIG_PLC_RTSCTS
+/* send ACCESS signal for rtsd_pframe to tx_coordination, with status */
+void access_rtsd_confirm (struct plc_drv_unit *unit, int status)
+{
+ union mac_signal sig;
+
+ /* tx_coord is allowed to send */
+ sig.sigNo = ACCESS;
+ sig.Access.pframe = (struct plcp_frame *) rtsd_pframe;
+ sig.Access.status = (int) status;
+ sig_send (&sig);
+}
+#endif
+
+
/* access is granted, send immediatly the bp_frame under interrupt */
void access_done (struct plc_drv_unit *unit)
{
if (bp_frame->lock)
{
- mac_register_call (bp_state, phy_transmitter_, backoff_procedure_, PHY_TX_DATA_REQUEST, MAC_STATUS_ERROR);
+ mac_register_call (bp_state, phy_transmitter_, backoff_procedure_,
+ PHY_TX_DATA_REQUEST, MAC_STATUS_ERROR);
access_confirm (unit, BP_ACCESS_FAILED);
return;
}
@@ -325,7 +349,8 @@ void access_done (struct plc_drv_unit *unit)
/* and in non-sar mode only */
if ((bp_frame->control->l_frm.type == MA_TYPE_DATA)
- && (bp_frame->control->l_frm.subtype != MA_SUBTYPE_NULL) && (!bp_frame->sar_enable)
+ && (bp_frame->control->l_frm.subtype != MA_SUBTYPE_NULL) &&
+ (!bp_frame->sar_enable)
#ifdef CONFIG_PLC_PPC
&& (bp_frame->control->ff != PPC_PROTO)
#endif
@@ -334,7 +359,8 @@ void access_done (struct plc_drv_unit *unit)
bp_frame->state = PLCP_XMIT; // do not touch to pframe during transmit
- mac_register_call (bp_state, phy_transmitter_, backoff_procedure_, PHY_TX_DATA_REQUEST, MAC_STATUS_OK);
+ mac_register_call (bp_state, phy_transmitter_, backoff_procedure_,
+ PHY_TX_DATA_REQUEST, MAC_STATUS_OK);
if (phy_tx_data_request (unit, bp_frame))
{
@@ -359,20 +385,20 @@ void bp_busy (struct plc_drv_unit *unit, uint16_t busy_date)
switch (bp_state)
{
case BP_IDLE:
- mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY,
+ MAC_STATUS_OK);
bp_state = BP_BUSY;
break;
case BP_BACKOFF:
/* stop previously armed timer */
- mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY,
+ MAC_STATUS_OK);
tresp_obj++;
plcp_stop_tresp (unit, BP_TMO);
if (no_backoff)
{
bp_state = BP_BUSY;
-#ifdef SAFE_ACCESS
stop_backoff_timer ();
-#endif
access_confirm (unit, BP_ACCESS_FAILED);
}
else
@@ -383,7 +409,8 @@ void bp_busy (struct plc_drv_unit *unit, uint16_t busy_date)
break;
case BP_DEFER:
case BP_BUSY:
- mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY, MAC_STATUS_IGNORED);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, BUSY,
+ MAC_STATUS_IGNORED);
/* strange but ignored */
break;
}
@@ -401,7 +428,8 @@ void bp_idle (struct plc_drv_unit *unit, uint16_t idle_date)
switch (bp_state)
{
case BP_IDLE:
- mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE, MAC_STATUS_IGNORED);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE,
+ MAC_STATUS_IGNORED);
/* ignore the event */
break;
case BP_BACKOFF:
@@ -410,7 +438,8 @@ void bp_idle (struct plc_drv_unit *unit, uint16_t idle_date)
plcp_stop_tresp (unit, BP_TMO);
/* continue... */
case BP_DEFER:
- mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE,
+ MAC_STATUS_OK);
/* return to contention window */
if (bp_enter_cw (unit) == false)
{
@@ -420,9 +449,7 @@ void bp_idle (struct plc_drv_unit *unit, uint16_t idle_date)
else
{
/* stop timer used for the request */
-#ifdef SAFE_ACCESS
stop_backoff_timer ();
-#endif
/* return to IDLE state before access done */
bp_state = BP_IDLE;
@@ -432,7 +459,8 @@ void bp_idle (struct plc_drv_unit *unit, uint16_t idle_date)
}
break;
case BP_BUSY:
- mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, channel_state_, IDLE,
+ MAC_STATUS_OK);
bp_state = BP_IDLE;
break;
}
@@ -452,31 +480,31 @@ void bp_backoff (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{
case BP_BACKOFF:
case BP_DEFER:
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, BACKOFF, MAC_STATUS_ERROR);
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "BP: BACKOFF already requested\n");
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ BACKOFF, MAC_STATUS_ERROR);
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "BP: BACKOFF already requested\n");
/* same state */
break;
case BP_BUSY:
/* start a timer for handling access errors */
-#ifdef SAFE_ACCESS
start_backoff_timer (unit);
-#endif
trace (("access req at busy. backoff is %d\n", backoff));
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, BACKOFF, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ BACKOFF, MAC_STATUS_OK);
bp_state = BP_DEFER;
break;
case BP_IDLE:
/* enter into contention window */
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, BACKOFF, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ BACKOFF, MAC_STATUS_OK);
trace (("access req at idle. backoff is %d\n", backoff));
if (bp_enter_cw (unit) == false)
{
-#ifdef SAFE_ACCESS
/* start a timer for handling access errors */
start_backoff_timer (unit);
-#endif
/* goto backoff state */
bp_state = BP_BACKOFF;
}
@@ -494,7 +522,6 @@ void bp_backoff (struct plc_drv_unit *unit, struct plcp_frame *pframe)
LOCK_RESTORE (msr);
}
-#ifdef SAFE_ACCESS
/* no physical indication since a long time, unlock backoff */
static void access_error (void *user_obj, void *ose_date)
{
@@ -507,7 +534,8 @@ static void access_error (void *user_obj, void *ose_date)
case BP_BACKOFF:
/* access is successfull */
access_confirm (unit, BP_ACCESS_LIMIT);
- mac_register_call (bp_state, backoff_procedure_, ose_tosv_, ACCESS_ERROR, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, ose_tosv_,
+ ACCESS_ERROR, MAC_STATUS_OK);
bp_state = BP_IDLE;
break;
@@ -516,19 +544,20 @@ static void access_error (void *user_obj, void *ose_date)
phy_cca_request (unit, plcp_get_timer (unit));
/* access is successfull */
access_confirm (unit, BP_ACCESS_LIMIT);
- mac_register_call (bp_state, backoff_procedure_, ose_tosv_, ACCESS_ERROR, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, ose_tosv_,
+ ACCESS_ERROR, MAC_STATUS_OK);
bp_state = BP_BUSY;
break;
case BP_IDLE:
case BP_BUSY:
- mac_register_call (bp_state, backoff_procedure_, ose_tosv_, ACCESS_ERROR, MAC_STATUS_ERROR);
+ mac_register_call (bp_state, backoff_procedure_, ose_tosv_,
+ ACCESS_ERROR, MAC_STATUS_ERROR);
/* possible cancelTmo whereas message was in the fifo. But should not happen with OSE */
break;
}
LOCK_RESTORE (msr);
}
-#endif
/* backoff access timeout */
void bp_timeout (struct plc_drv_unit *unit, int sig_tresp, uint16_t tmo_date)
@@ -545,10 +574,9 @@ void bp_timeout (struct plc_drv_unit *unit, int sig_tresp, uint16_t tmo_date)
{
case BP_BACKOFF:
/* stop timer used for the request */
-#ifdef SAFE_ACCESS
stop_backoff_timer ();
-#endif
- mac_register_call (bp_state, backoff_procedure_, phy_transmitter_, BP_TMO, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, phy_transmitter_,
+ BP_TMO, MAC_STATUS_OK);
/* return to IDLE state */
bp_state = BP_IDLE;
@@ -560,12 +588,14 @@ void bp_timeout (struct plc_drv_unit *unit, int sig_tresp, uint16_t tmo_date)
case BP_DEFER:
/* ignore this event cause timeout cancelled on busy event */
- mac_register_call (bp_state, backoff_procedure_, phy_transmitter_, BP_TMO, MAC_STATUS_IGNORED);
+ mac_register_call (bp_state, backoff_procedure_, phy_transmitter_,
+ BP_TMO, MAC_STATUS_IGNORED);
break;
case BP_BUSY:
case BP_IDLE:
- mac_register_call (bp_state, backoff_procedure_, phy_transmitter_, BP_TMO, MAC_STATUS_IGNORED);
+ mac_register_call (bp_state, backoff_procedure_, phy_transmitter_,
+ BP_TMO, MAC_STATUS_IGNORED);
/* same state */
break;
}
@@ -586,12 +616,11 @@ int bp_cancel (struct plc_drv_unit *unit)
tresp_obj++;
plcp_stop_tresp (unit, BP_TMO);
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, CANCEL, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ CANCEL, MAC_STATUS_OK);
/* stop timer used for the request */
-#ifdef SAFE_ACCESS
stop_backoff_timer ();
-#endif
bp_state = BP_IDLE;
status = 1;
break;
@@ -600,17 +629,17 @@ int bp_cancel (struct plc_drv_unit *unit)
tresp_obj++;
plcp_stop_tresp (unit, BP_TMO);
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, CANCEL, MAC_STATUS_OK);
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ CANCEL, MAC_STATUS_OK);
/* stop timer used for the request */
-#ifdef SAFE_ACCESS
stop_backoff_timer ();
-#endif
bp_state = BP_BUSY;
status = 1;
break;
default:
- mac_register_call (bp_state, backoff_procedure_, tx_coordination_, CANCEL, MAC_STATUS_IGNORED);
+ mac_register_call (bp_state, backoff_procedure_, tx_coordination_,
+ CANCEL, MAC_STATUS_IGNORED);
status = 0;
break;
}
diff --git a/app/sm-plc-drv/src/mac_carp.c b/app/sm-plc-drv/src/mac_carp.c
index 5b77349172..28318cb9bb 100755
--- a/app/sm-plc-drv/src/mac_carp.c
+++ b/app/sm-plc-drv/src/mac_carp.c
@@ -28,7 +28,8 @@ struct list_head carp_hash[CARP_HASHSIZE];
static inline int is_obsolete (struct carp_entry *entry, OSTICK timestamp)
{
- return ((timestamp < entry->timestamp) || ((timestamp - entry->timestamp) > MAX_AGE));
+ return ((timestamp < entry->timestamp) ||
+ ((timestamp - entry->timestamp) > MAX_AGE));
}
LIST_HEAD (carp_entries);
@@ -37,7 +38,7 @@ LIST_HEAD (mcast_entries);
void carp_init (void)
{
-
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
struct carp_entry *entry;
int i;
@@ -55,6 +56,7 @@ void carp_init (void)
{
INIT_LIST_HEAD (&carp_hash[i]);
}
+ unit->carp_limit_per_host = 0xFE;
}
/* seach a carp_entry with the given DA
@@ -74,7 +76,8 @@ static inline struct carp_entry *carp_find (uint8_t DA[6])
#if 0
RT_PRINTM (TRACE_CARP, TRACE_INFO,
"CARP find idx = %d, entry %08x, DA = " IEEE802_FMT " "
- "=> NHA = " IEEE802_FMT "\n ", index, entry, IEEE802_VAL (entry->DA), IEEE802_VAL (entry->NHA));
+ "=> NHA = " IEEE802_FMT "\n ", index, entry,
+ IEEE802_VAL (entry->DA), IEEE802_VAL (entry->NHA));
#endif
if (likely (plcp_same_mac (DA, entry->DA)))
{
@@ -115,7 +118,8 @@ struct plcp_host *carp_lookup (uint8_t DA[6])
entry->timestamp = timestamp;
LOCK_RESTORE (msr);
RT_PRINTM (TRACE_CARP, TRACE_INFO,
- "CARP lookup DA = " IEEE802_FMT " " " => host = %p\n", IEEE802_VAL (DA), entry->host);
+ "CARP lookup DA = " IEEE802_FMT " " " => host = %p\n",
+ IEEE802_VAL (DA), entry->host);
return entry->host;
}
else
@@ -128,15 +132,17 @@ struct plcp_host *carp_lookup (uint8_t DA[6])
return NULL;
}
}
-void carp_insert (uint8_t DA[6], struct plcp_host *host)
-{
+bool carp_insert (uint8_t DA[6], struct plcp_host * host)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
uint32_t msr;
- int index;
- struct carp_entry *entry;
+ int index, old_entry_refresh;
+ struct carp_entry *entry = NULL;
LOCK_SAVE (msr);
entry = carp_find (DA);
+
if (unlikely (!entry))
{
/* always use oldest entry */
@@ -146,49 +152,76 @@ void carp_insert (uint8_t DA[6], struct plcp_host *host)
/* this should not happened */
if (unlikely (entry->reserved))
{
- rt_printk ("CARP overwrite mcast DA = " IEEE802_FMT " => host = %p\n timestamp = %d\n",
- IEEE802_VAL (DA), entry->host, entry->timestamp);
+ rt_printk ("CARP overwrite mcast DA = " IEEE802_FMT
+ " => host = %p\n timestamp = %d\n", IEEE802_VAL (DA),
+ entry->host, entry->timestamp);
}
if (unlikely (is_multicast_mac (DA)))
{
entry->reserved = 1;
}
#endif
+ old_entry_refresh = 0;
+ }
+ else
+ {
+ old_entry_refresh = 1;
}
- list_del_init (&entry->l_age);
- list_del_init (&entry->l_hash);
- /* init or update entry fields */
- memcpy (entry->DA, DA, 6);
- entry->host = host;
+ // How many MAC adress have we on this host ?
+ // Becareful local_host is a fake (host = 0xDEADBEAF)
+ if ((host == local_host) || (old_entry_refresh == 1) ||
+ (host->mac_adress_recorded <
+ (unit->carp_limit_per_host + old_entry_refresh)))
+ {
+ if ((host != local_host) && (old_entry_refresh == 0))
+ {
+ host->mac_adress_recorded++;
+ }
+
+ list_del_init (&entry->l_age);
+ list_del_init (&entry->l_hash);
+
+ /* init or update entry fields */
+ memcpy (entry->DA, DA, 6);
+ entry->host = host;
#ifdef CONFIG_PLC_MCAST
- /* removeme */
- if (unlikely (entry->reserved))
- {
- /* add entry in a special queue to avoid ageing */
- list_add_tail (&entry->l_age, &mcast_entries);
- }
- else
+ /* removeme */
+ if (unlikely (entry->reserved))
+ {
+ /* add entry in a special queue to avoid ageing */
+ list_add_tail (&entry->l_age, &mcast_entries);
+ }
+ else
#endif
- {
- /* re-insert entry, at tail (youngest entry) */
- list_add_tail (&entry->l_age, &carp_entries);
- }
+ {
+ /* re-insert entry, at tail (youngest entry) */
+ list_add_tail (&entry->l_age, &carp_entries);
+ }
- /* insert entry in hash table (index may change if host has changed) */
- index = CARP_HASHFUNC (DA);
+ /* insert entry in hash table (index may change if host has changed) */
+ index = CARP_HASHFUNC (DA);
- list_add_tail (&entry->l_hash, &carp_hash[index]);
+ list_add_tail (&entry->l_hash, &carp_hash[index]);
- /* update timestamp for ageing */
- entry->timestamp = get_ticks ();
- LOCK_RESTORE (msr);
+ /* update timestamp for ageing */
+ entry->timestamp = get_ticks ();
+ LOCK_RESTORE (msr);
+
+ RT_PRINTM (TRACE_CARP, TRACE_INFO,
+ "CARP insert DA = " IEEE802_FMT " "
+ "=> host = %p\n (idx %d entry %08x, timestamp %d)",
+ IEEE802_VAL (DA), host, index, entry, entry->timestamp);
+ }
+ else
+ {
+ // Entry refused because the limit have been reach.
+ LOCK_RESTORE (msr);
+ return false;
+ }
- RT_PRINTM (TRACE_CARP, TRACE_INFO,
- "CARP insert DA = " IEEE802_FMT " "
- "=> host = %p\n (idx %d entry %08x, timestamp %d)",
- IEEE802_VAL (DA), host, index, entry, entry->timestamp);
+ return true;
}
void carp_remove_host (struct plcp_host *host)
@@ -207,6 +240,8 @@ void carp_remove_host (struct plcp_host *host)
if (entry->host == host)
{
+ if (entry->host != local_host)
+ entry->host->mac_adress_recorded--;
list_del_init (&entry->l_hash);
}
}
@@ -223,6 +258,9 @@ void carp_remove (uint8_t DA[6])
entry = carp_find (DA);
if (entry)
{
+ if ((entry->host) && (entry->host != local_host))
+ entry->host->mac_adress_recorded--;
+
list_del_init (&entry->l_hash);
#ifdef CONFIG_PLC_MCAST
// the two following lines are useful if entry->reserved
@@ -240,7 +278,8 @@ void carp_remove (uint8_t DA[6])
* see /proc/net/plc/carp
*
*/
-int proc_r_carp_entries (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_carp_entries (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct carp_entry *entry;
int index;
@@ -277,7 +316,10 @@ int proc_r_carp_entries (char *buf, char **start, off_t offset, int count, int *
#endif
len += sprintf (buf + len, IEEE802_FMT " %d %u %s\n",
IEEE802_VAL (entry->DA), id,
- entry->timestamp, (!mcast && is_obsolete (entry, timestamp)) ? "OBSOLETE" : "VALID");
+ entry->timestamp, (!mcast &&
+ is_obsolete (entry,
+ timestamp)) ?
+ "OBSOLETE" : "VALID");
}
}
hard_local_irq_restore (flags);
@@ -291,7 +333,8 @@ int proc_r_carp_entries (char *buf, char **start, off_t offset, int count, int *
* see /proc/net/plc/carp
*
*/
-int proc_r_carp_by_age (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_carp_by_age (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct carp_entry *entry;
unsigned long flags;
@@ -325,7 +368,10 @@ int proc_r_carp_by_age (char *buf, char **start, off_t offset, int count, int *e
#endif
len += sprintf (buf + len, IEEE802_FMT " %d %u %s\n",
IEEE802_VAL (entry->DA), id,
- entry->timestamp, (!mcast && is_obsolete (entry, timestamp)) ? "OBSOLETE" : "VALID");
+ entry->timestamp, (!mcast &&
+ is_obsolete (entry,
+ timestamp)) ?
+ "OBSOLETE" : "VALID");
}
len += sprintf (buf + len, "\n\nmulticast links\n");
@@ -349,7 +395,10 @@ int proc_r_carp_by_age (char *buf, char **start, off_t offset, int count, int *e
#endif
len += sprintf (buf + len, IEEE802_FMT " %d %u %s\n",
IEEE802_VAL (entry->DA), id,
- entry->timestamp, (!mcast && is_obsolete (entry, timestamp)) ? "OBSOLETE" : "VALID");
+ entry->timestamp, (!mcast &&
+ is_obsolete (entry,
+ timestamp)) ?
+ "OBSOLETE" : "VALID");
}
hard_local_irq_restore (flags);
@@ -365,7 +414,8 @@ int proc_r_carp_by_age (char *buf, char **start, off_t offset, int count, int *e
* echo 0 > /proc/net/plc/carp
*
*/
-int proc_w_carp_entries (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_carp_entries (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
struct carp_entry *entry;
int index;
@@ -379,6 +429,8 @@ int proc_w_carp_entries (struct file *file, const char *buffer, unsigned long co
{
entry = list_entry (p, struct carp_entry, l_hash);
+ if ((entry->host) && (entry->host != local_host))
+ entry->host->mac_adress_recorded--;
list_del_init (&entry->l_hash);
}
}
@@ -407,6 +459,7 @@ int getDTEI (uint8_t DA[6], uint8_t * dtei)
struct carp_entry *entry = NULL;
uint32_t lock;
OSTICK timestamp;
+ int val = 2;
LOCK_SAVE (lock);
entry = carp_find (DA);
@@ -417,12 +470,17 @@ int getDTEI (uint8_t DA[6], uint8_t * dtei)
*dtei = entry->dtei;
if (entry->reserved || (!is_obsolete (entry, timestamp)))
{
- return 0;
+ val = 0;
}
else
- return 1;
+ val = 1;
}
else
- return 2;
+ val = 2;
+
+ LOCK_RESTORE (lock);
+
+ return val;
+
}
#endif
diff --git a/app/sm-plc-drv/src/mac_cco.c b/app/sm-plc-drv/src/mac_cco.c
index 8d0a68675b..83f2985e62 100755
--- a/app/sm-plc-drv/src/mac_cco.c
+++ b/app/sm-plc-drv/src/mac_cco.c
@@ -75,7 +75,8 @@ static INLINE uint32_t cfp_remain_time (struct plc_drv_unit *unit)
/* send Mm frame to tx_coordination withing a MmRequest */
/* default configuration is no d_len nor c_len */
/* NULL host is broadcast */
-static INLINE void send_mm (struct plc_drv_unit *unit, int mm_type, struct plcp_host *host, int end_cp)
+static INLINE void send_mm (struct plc_drv_unit *unit, int mm_type,
+ struct plcp_host *host, int end_cp)
{
union mac_signal sig;
@@ -200,7 +201,8 @@ static void scheduler (struct plc_drv_unit *unit)
/* 2005-03-30 / TF / workaround for CE clearing the host (no pframe) */
// update sap queue. one pframe reserved for host 0
if (sched_actives > 0)
- unit->mac.config.sap_queue = (PLCP_TX_RING_SIZE - 2 + sched_actives) / sched_actives;
+ unit->mac.config.sap_queue =
+ (PLCP_TX_RING_SIZE - 2 + sched_actives) / sched_actives;
else
unit->mac.config.sap_queue = PLCP_TX_RING_SIZE - 1;
#endif
@@ -240,7 +242,8 @@ static struct plcp_host *cco_next_poll (struct plc_drv_unit *unit)
ASSERT (temp);
/* see if something to send whatever host type */
- if ((temp->tx_queue_count[PLCP_PRIO_DATA] > 0) || (temp->tx_queue_count[PLCP_PRIO_MM] > 0))
+ if ((temp->tx_queue_count[PLCP_PRIO_DATA] > 0) ||
+ (temp->tx_queue_count[PLCP_PRIO_MM] > 0))
{
/* in average, the tx is at the middle of the interval, so reduce it by two (=>4) is enough */
decrease_poll_inter (temp);
@@ -251,7 +254,8 @@ static struct plcp_host *cco_next_poll (struct plc_drv_unit *unit)
{ /* see if something to receive on unicast hosts only */
if ((short) (clock_poll_count - temp->poll_count) >= 0)
{
- temp->poll_count = clock_poll_count + temp->poll_inter;
+ temp->poll_count =
+ clock_poll_count + temp->poll_inter;
host = temp;
}
}
@@ -260,7 +264,8 @@ static struct plcp_host *cco_next_poll (struct plc_drv_unit *unit)
if ((short) (clock_poll_count - temp->poll_count) >= 0)
{ /* nothing happened since the last interval. increase it */
increase_poll_inter (temp);
- temp->poll_count = clock_poll_count + temp->poll_inter;
+ temp->poll_count =
+ clock_poll_count + temp->poll_inter;
}
}
@@ -342,7 +347,8 @@ static struct plcp_host *cco_next_hop (struct plc_drv_unit *unit)
}
if (j < 0 || j >= PLCP_MAX_HOST)
{
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "host corrupted prev_hop=%p next index=%d", prev_hop, j);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG,
+ "host corrupted prev_hop=%p next index=%d", prev_hop, j);
return NULL;
}
/* browse the list of hosts */
@@ -350,7 +356,8 @@ static struct plcp_host *cco_next_hop (struct plc_drv_unit *unit)
{
host = plcp_get_host_by_index (j);
j = (j + 1) % PLCP_MAX_HOST;
- if (host /* used */ && (host->vport != NULL) /* assoc with a vport */ )
+ if (host /* used */ &&
+ (host->vport != NULL) /* assoc with a vport */ )
{
elected = host;
break;
@@ -467,24 +474,29 @@ void mm_indicate (struct plc_drv_unit *unit, struct MmIndicate *mm_ind)
uint16_t t;
t = plcp_get_timer (unit);
- mac_register_call (nco_state, cco_, rx_coordination_, MM_INDICATE, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, rx_coordination_, MM_INDICATE,
+ MAC_STATUS_OK);
switch (mm_ind->mm_type)
{
case MM_BEACON:
/* now station become polled */
period_mode = SLAVE_MODE;
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "receive BEACON at %d (slot)\n", t);
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "receive BEACON at %d (slot)\n",
+ t);
break;
case MM_CFEND:
/* now station becom free */
period_mode = FREE_MODE;
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "receive CFEND at %d (slot)\n", t);
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "receive CFEND at %d (slot)\n",
+ t);
break;
#ifdef CONFIG_PLC_VPORT
case MM_TOKEN:
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "receive token from mac %d at %d(slot)", mm_ind->host->mac_addr[5], t);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG,
+ "receive token from mac %d at %d(slot)",
+ mm_ind->host->mac_addr[5], t);
if (unit->BSSID == BSSID_HEAD_END)
{ /* cancel timeout token */
/* now station becom free */
@@ -509,14 +521,16 @@ void mm_indicate (struct plc_drv_unit *unit, struct MmIndicate *mm_ind)
if (next_hop)
{ /* send a token to the hop */
send_mm (unit, MM_TOKEN, next_hop, 0 /*endcp */ );
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "sent token to mac %d\n", next_hop->mac_addr[5]);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "sent token to mac %d\n",
+ next_hop->mac_addr[5]);
nco_state = CCO_SEND_TOKEN;
}
else
{ /* start timeout token, then redo the tests */
if (unit->BSSID == BSSID_HEAD_END)
{
- start_date = start_tmo_token (unit, unit->mac.config.tmo_token);
+ start_date =
+ start_tmo_token (unit, unit->mac.config.tmo_token);
}
nco_state = CCO_CSMA_REGION;
}
@@ -532,10 +546,13 @@ void mm_indicate (struct plc_drv_unit *unit, struct MmIndicate *mm_ind)
/* if the cco is standby in CF_REGION and data is available, or has been */
void mm_wake (struct plc_drv_unit *unit, struct plcp_host *host)
{
- if ((nco_state == CCO_CF_REGION) && ((host->index == 0) || is_multicast_tei (host->TEI)))
+ if ((nco_state == CCO_CF_REGION) &&
+ ((host->index == 0) || is_multicast_tei (host->TEI)))
{
// restart the scheduler, sending cfpoll to host. host=sched_map[i];
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "CfPoll (wakeup) sent (slot) to host %02x\n", host->mac_addr[5]);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG,
+ "CfPoll (wakeup) sent (slot) to host %02x\n",
+ host->mac_addr[5]);
send_mm (unit, MM_CFPOLL, host, 0);
/* new contention free period */
nco_state = CCO_SEND_CFPOLL;
@@ -554,7 +571,8 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
{
#ifdef CONFIG_PLC_VPORT
case MM_TOKEN:
- mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM,
+ MAC_STATUS_OK);
if (unit->BSSID == BSSID_HEAD_END)
{
/* prevent token lost by startnig a timer */
@@ -573,7 +591,8 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
#endif
case MM_BEACON:
- mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM,
+ MAC_STATUS_OK);
RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Send beacon at %d (slot)\n", t);
/* register tihs date */
@@ -601,7 +620,9 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
}
else
{
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "CfPoll sent at %d (slot) to host %02x\n", t, host->mac_addr[5]);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG,
+ "CfPoll sent at %d (slot) to host %02x\n", t,
+ host->mac_addr[5]);
send_mm (unit, MM_CFPOLL, host, 0);
/* new contention free period */
nco_state = CCO_SEND_CFPOLL;
@@ -615,7 +636,8 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
break;
case MM_CFPOLL:
- mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM,
+ MAC_STATUS_OK);
/* if timer has already expired, end the CFP */
if (pending_tbtt)
{
@@ -636,7 +658,9 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
else
{
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "CfPoll sent at %d (slot) to host %02x\n", t, host->mac_addr[5]);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG,
+ "CfPoll sent at %d (slot) to host %02x\n", t,
+ host->mac_addr[5]);
send_mm (unit, MM_CFPOLL, host, 0 /*endcp */ );
/* new contention free period */
nco_state = CCO_SEND_CFPOLL;
@@ -645,7 +669,8 @@ void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status)
break;
case MM_CFEND:
- mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, MM_CONFIRM,
+ MAC_STATUS_OK);
RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Send CfEnd at %d (slot)\n", t);
@@ -680,7 +705,8 @@ void cco_start (struct plc_drv_unit *unit)
if (!cco_started)
{
cco_started = true;
- mac_register_call (nco_state, cco_, tx_coordination_, CCO_START, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, CCO_START,
+ MAC_STATUS_OK);
/* send beacon frame to tx_coordination process */
send_mm (unit, MM_BEACON, NULL, 1 /*endcp */ );
@@ -688,7 +714,8 @@ void cco_start (struct plc_drv_unit *unit)
}
else
{
- mac_register_call (nco_state, cco_, tx_coordination_, CCO_START, MAC_STATUS_IGNORED);
+ mac_register_call (nco_state, cco_, tx_coordination_, CCO_START,
+ MAC_STATUS_IGNORED);
}
}
@@ -697,12 +724,14 @@ void cco_stop (struct plc_drv_unit *unit)
{
if (cco_started && !cco_stopping)
{
- mac_register_call (nco_state, cco_, tx_coordination_, CCO_STOP, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, CCO_STOP,
+ MAC_STATUS_OK);
cco_stopping = true;
}
else
{
- mac_register_call (nco_state, cco_, tx_coordination_, CCO_STOP, MAC_STATUS_IGNORED);
+ mac_register_call (nco_state, cco_, tx_coordination_, CCO_STOP,
+ MAC_STATUS_IGNORED);
}
}
@@ -714,7 +743,8 @@ void token_start (struct plc_drv_unit *unit)
if ((unit->BSSID == BSSID_HEAD_END) && (tok_started == false))
{
- mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_START, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_START,
+ MAC_STATUS_OK);
prev_hop = NULL;
have_token = true;
tok_started = true;
@@ -723,7 +753,8 @@ void token_start (struct plc_drv_unit *unit)
if (next_hop)
{ /* send a token to the hop */
send_mm (unit, MM_TOKEN, next_hop, 1 /*endcp */ );
- RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "sent token to mac %d\n", next_hop->mac_addr[5]);
+ RT_PRINTM (TRACE_ACCESS, TRACE_DEBUG, "sent token to mac %d\n",
+ next_hop->mac_addr[5]);
nco_state = CCO_SEND_TOKEN;
}
else
@@ -734,7 +765,8 @@ void token_start (struct plc_drv_unit *unit)
}
else
{
- mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_START, MAC_STATUS_IGNORED);
+ mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_START,
+ MAC_STATUS_IGNORED);
}
#endif
}
@@ -743,14 +775,17 @@ void token_start (struct plc_drv_unit *unit)
void token_stop (struct plc_drv_unit *unit)
{
#ifdef CONFIG_PLC_VPORT
- if ((unit->BSSID == BSSID_HEAD_END) && (tok_stopping == false) && (tok_started == true))
+ if ((unit->BSSID == BSSID_HEAD_END) && (tok_stopping == false) &&
+ (tok_started == true))
{
tok_stopping = true;
- mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_STOP, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_STOP,
+ MAC_STATUS_OK);
}
else
{
- mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_STOP, MAC_STATUS_IGNORED);
+ mac_register_call (nco_state, cco_, tx_coordination_, TOKEN_STOP,
+ MAC_STATUS_IGNORED);
}
#endif
}
@@ -794,7 +829,8 @@ void tmo_token (struct plc_drv_unit *unit)
/* same job as tbtt */
if (unit->BSSID == BSSID_HEAD_END)
{
- mac_register_call (nco_state, cco_, ose_tosv_, TMO_TOKEN, MAC_STATUS_OK);
+ mac_register_call (nco_state, cco_, ose_tosv_, TMO_TOKEN,
+ MAC_STATUS_OK);
if (tok_stopping)
{
tok_stopping = false;
@@ -814,14 +850,16 @@ void tmo_token (struct plc_drv_unit *unit)
}
else
{ /* start timeout token, then redo the tests */
- start_date = start_tmo_token (unit, unit->mac.config.tmo_token);
+ start_date =
+ start_tmo_token (unit, unit->mac.config.tmo_token);
nco_state = CCO_CSMA_REGION;
}
}
}
else
{
- mac_register_call (nco_state, cco_, ose_tosv_, TMO_TOKEN, MAC_STATUS_IGNORED);
+ mac_register_call (nco_state, cco_, ose_tosv_, TMO_TOKEN,
+ MAC_STATUS_IGNORED);
nco_state = CCO_CSMA_REGION;
}
}
@@ -848,13 +886,15 @@ int nco_display_schedule (char *buf)
rx_inactivity = t - temp->rx_date;
tx_inactivity = t - temp->tx_date;
/* get the min */
- cfp_inactivity = (tx_inactivity > rx_inactivity) ? rx_inactivity : tx_inactivity;
+ cfp_inactivity =
+ (tx_inactivity > rx_inactivity) ? rx_inactivity : tx_inactivity;
#endif
p += sprintf (p, "host:%2d inter:%4d remaining:%5d"
#ifdef DEBUG_MULTIPOINT
" tx_inact:%4d rx_inact:%4d cfp_inact:%4d"
#endif
- "\n", temp->index, temp->poll_inter, (short) (temp->poll_count - clock_poll_count)
+ "\n", temp->index, temp->poll_inter,
+ (short) (temp->poll_count - clock_poll_count)
#ifdef DEBUG_MULTIPOINT
, tx_inactivity, rx_inactivity, cfp_inactivity
#endif
diff --git a/app/sm-plc-drv/src/mac_cs.c b/app/sm-plc-drv/src/mac_cs.c
index 0b406c1b4a..72ba018cbe 100755
--- a/app/sm-plc-drv/src/mac_cs.c
+++ b/app/sm-plc-drv/src/mac_cs.c
@@ -46,7 +46,8 @@ void phy_idle (struct plc_drv_unit *unit, uint16_t idle_date)
switch (cs_state)
{
case CS_VBUSY:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_IDLE, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_IDLE, MAC_STATUS_IGNORED);
break;
case CS_UBUSY:
/* cancel pending nav timer */
@@ -54,13 +55,15 @@ void phy_idle (struct plc_drv_unit *unit, uint16_t idle_date)
/* and do the following job */
case CS_IDLE: /* possible if collision */
case CS_PBUSY:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_IDLE, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_IDLE, MAC_STATUS_OK);
cs_state = CS_IDLE;
/* channel state changed */
bp_idle (unit, idle_date);
break;
case CS_PVBUSY:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_IDLE, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_IDLE, MAC_STATUS_OK);
cs_state = CS_VBUSY;
if (!nav_enable)
{
@@ -69,7 +72,8 @@ void phy_idle (struct plc_drv_unit *unit, uint16_t idle_date)
}
break;
default:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_IDLE, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_IDLE, MAC_STATUS_IGNORED);
break;
}
LOCK_RESTORE (msr);
@@ -84,19 +88,22 @@ void phy_busy (struct plc_drv_unit *unit, uint16_t busy_date)
switch (cs_state)
{
case CS_UBUSY:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_BUSY, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_BUSY, MAC_STATUS_OK);
/* now ASSERT the medium is in PBUSY state...dont warn backoffproc a second time */
cs_state = CS_PBUSY;
/* cancel pending nav timer */
nav_cancel ();
break;
case CS_IDLE:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_BUSY, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_BUSY, MAC_STATUS_OK);
cs_state = CS_PBUSY;
bp_busy (unit, busy_date);
break;
case CS_VBUSY:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_BUSY, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_BUSY, MAC_STATUS_OK);
cs_state = CS_PVBUSY;
if (!nav_enable)
{
@@ -108,10 +115,12 @@ void phy_busy (struct plc_drv_unit *unit, uint16_t busy_date)
/* possible if this station begins transmit and busy
* interrupt comming from phy_recv hasn't reached
* backoff_procedure */
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_BUSY, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_BUSY, MAC_STATUS_IGNORED);
break;
default:
- mac_register_call (cs_state, channel_state_, phy_transmitter_, PHY_CCA_BUSY, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, phy_transmitter_,
+ PHY_CCA_BUSY, MAC_STATUS_IGNORED);
break;
}
LOCK_RESTORE (msr);
@@ -131,21 +140,26 @@ int phy_timeout_nav (uint32_t user_obj, uint32_t ose_date)
{
case CS_IDLE:
case CS_PBUSY:
- mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV,
+ MAC_STATUS_IGNORED);
break;
case CS_UBUSY:
/* no channel state changed for eifs duration, ASSERT medium is idle */
case CS_VBUSY:
- mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV,
+ MAC_STATUS_OK);
cs_state = CS_IDLE;
/* should create IDLE signal */
bp_idle (unit, nav_date);
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense stopped on tmo_nav\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense stopped on tmo_nav\n");
break;
case CS_PVBUSY:
- mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, ose_tosv_, TMO_NAV,
+ MAC_STATUS_OK);
cs_state = CS_PBUSY;
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense stopped on tmo_nav\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense stopped on tmo_nav\n");
break;
}
LOCK_RESTORE (msr);
@@ -186,7 +200,8 @@ void phy_cca_request (struct plc_drv_unit *unit, uint16_t this_date)
//mac_register_event(cs_state, sig, MAC_STATUS_OK);
LOCK_SAVE (msr);
signal_sense = plcp_is_medium_busy (unit);
- mac_register_call (cs_state, channel_state_, ose_tosv_, CCA_REQUEST, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, ose_tosv_, CCA_REQUEST,
+ MAC_STATUS_OK);
if ((signal_sense == true) && (cs_state == CS_IDLE))
{
/* this state indicate a busy medium but for a maximum time of eifs */
@@ -206,7 +221,8 @@ void phy_cca_request (struct plc_drv_unit *unit, uint16_t this_date)
else if ((signal_sense == false) && (cs_state == CS_PBUSY))
{
/* check if CS has stayed busy for a long time */
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "cca_request: BUSY state cleared\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "cca_request: BUSY state cleared\n");
/* return to CS_IDLE state and warn backoff procedure */
cs_state = CS_IDLE;
bp_idle (unit, this_date);
@@ -225,14 +241,16 @@ void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur)
case CS_UBUSY:
/* no need to cancel pending nav timer */
case CS_IDLE:
- mac_register_call (cs_state, channel_state_, cco_, SET_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, cco_, SET_NAV,
+ MAC_STATUS_OK);
/* request Nav Timer for ms duration */
status = nav_request (unit, dur);
if (status == NAV_SUCCESS)
{
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense started on set_nav\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense started on set_nav\n");
cs_state = CS_VBUSY;
bp_busy (unit, this_date);
}
@@ -243,8 +261,10 @@ void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur)
break;
case CS_PBUSY:
- mac_register_call (cs_state, channel_state_, cco_, SET_NAV, MAC_STATUS_OK);
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense started on set_nav\n");
+ mac_register_call (cs_state, channel_state_, cco_, SET_NAV,
+ MAC_STATUS_OK);
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense started on set_nav\n");
/* request Nav Timer for ms duration */
status = nav_request (unit, dur);
@@ -260,8 +280,10 @@ void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur)
case CS_VBUSY:
case CS_PVBUSY:
/* update NAV and stay in the same state */
- mac_register_call (cs_state, channel_state_, cco_, SET_NAV, MAC_STATUS_OK);
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense updated on set_nav\n");
+ mac_register_call (cs_state, channel_state_, cco_, SET_NAV,
+ MAC_STATUS_OK);
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense updated on set_nav\n");
status = nav_request (unit, dur);
if (status == NAV_ERROR)
@@ -278,7 +300,8 @@ void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur)
}
break;
default:
- mac_register_call (cs_state, channel_state_, cco_, SET_NAV, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, cco_, SET_NAV,
+ MAC_STATUS_IGNORED);
break;
}
LOCK_RESTORE (msr);
@@ -295,21 +318,26 @@ void phy_clear_nav (struct plc_drv_unit *unit, uint16_t this_date)
case CS_IDLE:
case CS_PBUSY:
/* probably CLEAR_NAV event happen late */
- mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV, MAC_STATUS_IGNORED);
+ mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV,
+ MAC_STATUS_IGNORED);
break;
case CS_UBUSY:
case CS_VBUSY:
- mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV,
+ MAC_STATUS_OK);
cs_state = CS_IDLE;
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense stopped on clear_nav\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense stopped on clear_nav\n");
bp_idle (unit, this_date);
/* cancel pending nav timer */
nav_cancel ();
break;
case CS_PVBUSY:
- mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, cco_, CLEAR_NAV,
+ MAC_STATUS_OK);
cs_state = CS_PBUSY;
- RT_PRINTM (TRACE_ACCESS, TRACE_INFO, "Virtual Carrier Sense stopped on clear_nav\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_INFO,
+ "Virtual Carrier Sense stopped on clear_nav\n");
/* cancel pending nav timer */
nav_cancel ();
break;
@@ -333,7 +361,8 @@ void phy_disable_nav (struct plc_drv_unit *unit, uint16_t time)
LOCK_SAVE (msr);
if (nav_enable)
{
- mac_register_call (cs_state, channel_state_, cco_, NO_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, cco_, NO_NAV,
+ MAC_STATUS_OK);
nav_enable = 0;
if (cs_state == CS_VBUSY)
{
@@ -342,7 +371,8 @@ void phy_disable_nav (struct plc_drv_unit *unit, uint16_t time)
}
else
{
- mac_register_call (cs_state, channel_state_, cco_, NO_NAV, MAC_STATUS_ERROR);
+ mac_register_call (cs_state, channel_state_, cco_, NO_NAV,
+ MAC_STATUS_ERROR);
}
LOCK_RESTORE (msr);
}
@@ -357,11 +387,13 @@ void phy_enable_nav (struct plc_drv_unit *unit, uint16_t time)
LOCK_SAVE (msr);
if (nav_enable)
{
- mac_register_call (cs_state, channel_state_, cco_, USE_NAV, MAC_STATUS_ERROR);
+ mac_register_call (cs_state, channel_state_, cco_, USE_NAV,
+ MAC_STATUS_ERROR);
}
else
{
- mac_register_call (cs_state, channel_state_, cco_, USE_NAV, MAC_STATUS_OK);
+ mac_register_call (cs_state, channel_state_, cco_, USE_NAV,
+ MAC_STATUS_OK);
nav_enable = 1;
if (cs_state == CS_VBUSY)
{
diff --git a/app/sm-plc-drv/src/mac_dbg.c b/app/sm-plc-drv/src/mac_dbg.c
index 3967c0716b..ac0a5d40a2 100644
--- a/app/sm-plc-drv/src/mac_dbg.c
+++ b/app/sm-plc-drv/src/mac_dbg.c
@@ -32,6 +32,9 @@ char *mac_event_name[MAX_SIGNALS] = {
[PHY_TX_STATUS_INDICATION] = "tx_err",
[RIFS_TMO] = "rifs",
[RX_ACK] = "rx_ack",
+#ifdef CONFIG_PLC_RTSCTS
+ [RX_CTS] = "rx_cts",
+#endif
[ACCESS] = "access",
[POLLED] = "polled",
[TX_CFACK] = "tx_cfack",
@@ -92,10 +95,16 @@ char *mac_event_name[MAX_SIGNALS] = {
char *mac_state_name[MAX_STATES] = {
[RX_COORD_IDLE] = "rx_idle",
[RX_COORD_ACK] = "rx_send_ack",
+#ifdef CONFIG_PLC_RTSCTS
+ [RX_COORD_CTS] = "rx_send_cts",
+#endif
[DCF_IDLE] = "dcf_idle",
[DCF_CP] = "dcf_cp",
[DCF_TX] = "dcf_tx",
[DCF_WAIT_ACK] = "dcf_wack",
+#ifdef CONFIG_PLC_RTSCTS
+ [DCF_WAIT_CTS] = "dcf_wcts",
+#endif
[PCF_CP_END] = "pcf_cpend",
[PCF_IDLE] = "pcf_idle",
[PCF_TX] = "pcf_tx",
@@ -179,8 +188,10 @@ char *ma_subtype_name[MA_SUBTYPE_MAX] = {
[MA_SUBTYPE_INVAL] = "MA_SUBTYPE_INVAL",
[MA_SUBTYPE_TEST_RAW] = "MA_SUBTYPE_TEST_RAW",
[MA_SUBTYPE_TEST_BER] = "MA_SUBTYPE_TEST_BER",
- [MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST] = "MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST",
- [MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY] = "MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY",
+ [MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST] =
+ "MA_SUBTYPE_GET_MCAST_CHANNEL_REQUEST",
+ [MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY] =
+ "MA_SUBTYPE_GET_MCAST_CHANNEL_REPLY",
[MA_SUBTYPE_UNUSED_TEST_REQUEST] = "MA_SUBTYPE_UNUSED_TEST_REQUEST",
[MA_SUBTYPE_UNUSED_TEST_REPLY] = "MA_SUBTYPE_UNUSED_TEST_REPLY",
[MA_SUBTYPE_ERROR_REPLY] = "MA_SUBTYPE_ERROR_REPLY",
@@ -196,9 +207,7 @@ char *ma_subtype_name[MA_SUBTYPE_MAX] = {
/* The rest of this file is compiled if DEBUG_MULTIPOINT is defined in plc_mac.h (included in plc_drv.h) */
-#ifdef EXTRA_STATS
struct e_status stats_subtype[MA_SUBTYPE_MAX];
-#endif
/* This file is compiled if DEBUG_MULTIPOINT is defined in plc_mac.h (included in plc_drv.h) */
#ifdef DEBUG_MULTIPOINT
@@ -348,7 +357,8 @@ static PROCESS get_process_pid (char *proc_name)
/*----------------------------- kernel interface to register a message interface ----------------------------*/
/* register a message between two process in of the mac layer */
-void mac_register_call (int state, PROCESS receiver, PROCESS sender, int signo, int status)
+void mac_register_call (int state, PROCESS receiver, PROCESS sender,
+ int signo, int status)
{
struct plc_drv_unit *unit;
struct mac_history *hist;
@@ -428,7 +438,8 @@ int MAC_LATENCY = 1600;
extern int plcp_log_locked;
/* register perf for one frame */
-void mac_register_perf (uint8_t DA, uint16_t in_date, uint16_t dlen, uint16_t retries)
+void mac_register_perf (uint8_t DA, uint16_t in_date, uint16_t dlen,
+ uint16_t retries)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
struct perf *perf;
@@ -480,7 +491,8 @@ void mac_register_perf (uint8_t DA, uint16_t in_date, uint16_t dlen, uint16_t re
#define LOG_LENGTH_MAX 128
#define LOG_OFFSET_LIMIT (LOG_LENGTH_MAX * MAC_MAX_REG)
-int proc_r_mac_log (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_log (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
static int size;
static int head;
@@ -515,11 +527,13 @@ int proc_r_mac_log (char *buf, char **start, off_t offset, int count, int *eof,
sender_name = get_process_name (hist->reg[head].sender);
receiver_name = get_process_name (hist->reg[head].receiver);
size--;
- ret = snprintf (buf + len, LOG_LENGTH_MAX, "l=%-5d d=%-6d e=%-10s t=%-10s r=%-10s s=%-7s m=%-d\n",
- size,
- hist->reg[head].date,
- mac_event_name[hist->reg[head].sig],
- sender_name, receiver_name, mac_state_name[hist->reg[head].state], hist->reg[head].status);
+ ret =
+ snprintf (buf + len, LOG_LENGTH_MAX,
+ "l=%-5d d=%-6d e=%-10s t=%-10s r=%-10s s=%-7s m=%-d\n",
+ size, hist->reg[head].date,
+ mac_event_name[hist->reg[head].sig], sender_name,
+ receiver_name, mac_state_name[hist->reg[head].state],
+ hist->reg[head].status);
/* ret == -1 if output was truncated */
if (ret > 0)
{
@@ -545,7 +559,8 @@ int proc_r_mac_log (char *buf, char **start, off_t offset, int count, int *eof,
return len;
}
-int proc_w_mac_log (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_mac_log (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
int value;
@@ -559,7 +574,8 @@ int proc_w_mac_log (struct file *file, const char *buffer, unsigned long count,
#ifdef DEBUG_PB
-int proc_r_pb_log (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pb_log (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
static int size;
static int head;
@@ -593,8 +609,11 @@ int proc_r_pb_log (char *buf, char **start, off_t offset, int count, int *eof, v
{
sender_name = get_process_name (hist->reg[head].process);
size--;
- ret = snprintf (buf + len, LOG_LENGTH_MAX, "l=%-5d d=%-6d p=%-10s _PB_=%-s\n",
- size, hist->reg[head].date, sender_name, hist->reg[head].string);
+ ret =
+ snprintf (buf + len, LOG_LENGTH_MAX,
+ "l=%-5d d=%-6d p=%-10s _PB_=%-s\n", size,
+ hist->reg[head].date, sender_name,
+ hist->reg[head].string);
/* ret == -1 if output was truncated */
if (ret > 0)
{
@@ -620,7 +639,8 @@ int proc_r_pb_log (char *buf, char **start, off_t offset, int count, int *eof, v
return len;
}
-int proc_w_pb_log (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_pb_log (struct file *file, const char *buffer, unsigned long count,
+ void *data)
{
int value;
@@ -641,7 +661,8 @@ int proc_w_pb_log (struct file *file, const char *buffer, unsigned long count, v
* while ret value is not zero.
*
*/
-int proc_r_mac_perf (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_perf (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
/* static data for iterative call of this proc function */
static double length;
@@ -686,11 +707,12 @@ int proc_r_mac_perf (char *buf, char **start, off_t offset, int count, int *eof,
{
size--;
lat16 = perf->reg[head].out_date - perf->reg[head].in_date;
- ret = snprintf (buf + len, PERF_LENGTH_MAX, "l=%-5d in=%-6d out=%-6d lat=%-6u r=%-2d len=%-d DA=%-d\n",
- size,
- perf->reg[head].in_date,
- perf->reg[head].out_date,
- lat16, perf->reg[head].retries, perf->reg[head].dlen, perf->reg[head].dest_addr);
+ ret =
+ snprintf (buf + len, PERF_LENGTH_MAX,
+ "l=%-5d in=%-6d out=%-6d lat=%-6u r=%-2d len=%-d DA=%-d\n",
+ size, perf->reg[head].in_date, perf->reg[head].out_date,
+ lat16, perf->reg[head].retries, perf->reg[head].dlen,
+ perf->reg[head].dest_addr);
/* ret == -1 if output was truncated */
if (ret > 0)
{
@@ -714,7 +736,9 @@ int proc_r_mac_perf (char *buf, char **start, off_t offset, int count, int *eof,
d_lat = latency / total;
d_len = length / total;
/* summary of the perf */
- ret = snprintf (buf + len, PERF_LENGTH_MAX, "lat=%0f, len=%0f\n", d_lat, d_len);
+ ret =
+ snprintf (buf + len, PERF_LENGTH_MAX, "lat=%0f, len=%0f\n",
+ d_lat, d_len);
if (ret > 0)
{
len += ret;
@@ -734,7 +758,8 @@ int proc_r_mac_perf (char *buf, char **start, off_t offset, int count, int *eof,
return len;
}
-int proc_w_mac_perf (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_mac_perf (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
int value;
diff --git a/app/sm-plc-drv/src/mac_frame.c b/app/sm-plc-drv/src/mac_frame.c
index 44cf7333da..9032a5277a 100755
--- a/app/sm-plc-drv/src/mac_frame.c
+++ b/app/sm-plc-drv/src/mac_frame.c
@@ -14,10 +14,19 @@
// max_xmit_skb=3072 is a good value for troughput with 32 slaves, but that take too many memory...
// For the moment, i decrease the value for dodge the no memory crash. And i change the BUFFER_ISOLATION in mac_tx.c
// The crash memory is easy to do : send broadcast flow on the master with 10 mbit/s, and this fifo will be full.
-int max_xmit_skb = 2048;
+#if defined(CONFIG_VERSION_16M)
+int max_xmit_skb = 512; //512
+#else
+int max_xmit_skb = 2048; //512
+#endif
+
module_param (max_xmit_skb, int, 0644);
+#if defined(CONFIG_VERSION_16M)
+int max_recv_skb = 256;
+#else
int max_recv_skb = 512;
+#endif
module_param (max_recv_skb, int, 0644);
struct mac_frame *mac_tx_frames;
@@ -112,7 +121,8 @@ void mac_free_tx_frame (struct mac_frame *frame)
uint32_t msr;
ASSERT (frame);
- ASSERT_N (!((frame->prio < 0 || frame->prio >= MAC_NB_PRIO)), mac_dump_frame (frame));
+ ASSERT_N (!((frame->prio < 0 || frame->prio >= MAC_NB_PRIO)),
+ mac_dump_frame (frame));
ASSERT_N (list_empty (&frame->link), mac_dump_frame (frame));
LOCK_SAVE (msr);
list_add_tail (&frame->link, &mac_tx_free_queue);
@@ -160,7 +170,8 @@ void mac_init_frames (struct plc_drv_unit *unit)
INIT_LIST_HEAD (&mac_rx_free_queue);
INIT_LIST_HEAD (&mac_tx_free_queue);
- mac_rx_frames = kmalloc (max_recv_skb * sizeof (struct mac_frame), GFP_KERNEL);
+ mac_rx_frames =
+ kmalloc (max_recv_skb * sizeof (struct mac_frame), GFP_KERNEL);
ASSERT (mac_rx_frames);
for (i = 0; i < max_recv_skb; i++)
{
@@ -170,9 +181,11 @@ void mac_init_frames (struct plc_drv_unit *unit)
mac_free_rx_frame (frame);
};
- mac_tx_frames = kmalloc (max_xmit_skb * sizeof (struct mac_frame), GFP_KERNEL);
+ mac_tx_frames =
+ kmalloc (max_xmit_skb * sizeof (struct mac_frame), GFP_KERNEL);
ASSERT (mac_tx_frames);
- mac_tx_headers = kmalloc (max_xmit_skb * sizeof (struct mac_header), GFP_KERNEL);
+ mac_tx_headers =
+ kmalloc (max_xmit_skb * sizeof (struct mac_header), GFP_KERNEL);
ASSERT (mac_tx_headers);
for (i = 0; i < max_xmit_skb; i++)
{
@@ -211,7 +224,8 @@ int mac_ring_snapshot (char *buffer, struct mac_frame *ring, int n)
p += sprintf (p, " ADDRESS D_BUF D_LEN S \n");
for (i = 0, frame = ring; i < n; i++, frame++)
{
- p += sprintf (p, "%08x %08x %1d\n", frame, frame->d_buf, frame->d_len, frame->state);
+ p += sprintf (p, "%08x %08x %1d\n", frame, frame->d_buf, frame->d_len,
+ frame->state);
}
#endif
return (p - buffer);
@@ -221,13 +235,6 @@ int mac_ring_snapshot (char *buffer, struct mac_frame *ring, int n)
extern int plcp_header (char *buffer, union plcp_control *control);
int mac_ring_general (char *buffer)
{
-#ifdef VERBOSE_MULTICAST
- extern u32 LOG_MULTICAST;
- extern char mcast_buffer[32000];
- extern union plcp_control mcast_control;
- extern struct plcp_frame mcast_pframe;
-#endif
-
char *p = buffer;
int tx_frames = mac_count_tx_frames ();
int rx_frames = mac_count_rx_frames ();
@@ -239,18 +246,11 @@ int mac_ring_general (char *buffer)
p += sprintf (p, "alloc_tx_frames=%d\n", max_xmit_skb - tx_frames);
p += sprintf (p, "alloc_rx_frames=%d\n", max_recv_skb - rx_frames);
-#ifdef VERBOSE_MULTICAST
- p += plcp_header (p, &mcast_control);
- p += sprintf (p, "frame->d_len=%d\n", mcast_pframe.d_len);
- p += sprintf (p, "frame->uchannel=%p\n", mcast_pframe.uchannel);
- p += sprintf (p, "frame->d_buf (start)=%p\n", &mcast_buffer);
- p += sprintf (p, "frame->d_buf (end)=%p\n", ((char *) &mcast_buffer) + mcast_pframe.d_len);
-#endif
-
return (p - buffer);
}
-int proc_r_mac_frames (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_frames (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -286,5 +286,6 @@ int proc_r_mac_frames (char *buf, char **start, off_t offset, int count, int *eo
void mac_dump_frame (struct mac_frame *frame)
{
- rt_printk ("mac_frame=%p len=%d prio=%d\n", frame, frame->d_len, frame->prio);
+ rt_printk ("mac_frame=%p len=%d prio=%d\n", frame, frame->d_len,
+ frame->prio);
}
diff --git a/app/sm-plc-drv/src/mac_interface.c b/app/sm-plc-drv/src/mac_interface.c
index 1d1ad93436..9bfdd4af69 100644
--- a/app/sm-plc-drv/src/mac_interface.c
+++ b/app/sm-plc-drv/src/mac_interface.c
@@ -36,27 +36,34 @@
*
*****************************************************************************/
/* local functions */
-extern void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern void rx_data_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void rx_start_indication (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
+extern void rx_data_indication (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern void rx_status_indication (struct plc_drv_unit *unit);
extern uint16_t mac_random_backoff (struct plc_drv_unit *unit);
extern void rx_coord_init (void);
-extern void phy_tx_ack_confirm (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void phy_tx_ack_confirm (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern uint16_t bp_busy_date;
extern uint16_t bp_idle_date;
/* PLCP interrupt request */
extern void plcp_busy (struct plc_drv_unit *unit);
-extern void plcp_rx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern void plcp_rx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void plcp_rx_start (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
+extern void plcp_rx_end (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern void plcp_tx_end (struct plc_drv_unit *unit, struct plcp_frame *frame);
extern void plcp_tmo (struct plc_drv_unit *unit);
extern void plcp_eof (struct plc_drv_unit *unit);
extern void plcp_rx_drop (struct plc_drv_unit *unit);
-extern void plcp_tx_status (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void plcp_tx_status (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern void phy_idle (struct plc_drv_unit *unit, uint16_t idle_date);
extern void phy_busy (struct plc_drv_unit *unit, uint16_t busy_date);
-extern void bp_timeout (struct plc_drv_unit *unit, int sig_tresp, uint16_t tmo_date);
+extern void bp_timeout (struct plc_drv_unit *unit, int sig_tresp,
+ uint16_t tmo_date);
extern void cco_init (void);
extern void cs_init (void);
@@ -64,12 +71,20 @@ extern void tx_coordination_init (struct plc_drv_unit *unit);
extern void rx_coordination_init (void);
extern void phy_tx_ack_indication (struct plc_drv_unit *unit);
+#ifdef CONFIG_PLC_RTSCTS
+extern void phy_tx_cts_indication (struct plc_drv_unit *unit);
+extern void phy_tx_cts_confirm (struct plc_drv_unit *unit);
+#endif
+
/* tx_coordination State machine */
#define DCF_IDLE (TX_COORD_OFFSET + 0)
#define DCF_CP (TX_COORD_OFFSET + 1)
#define DCF_TX (TX_COORD_OFFSET + 2)
#define DCF_WAIT_ACK (TX_COORD_OFFSET + 3)
+#ifdef CONFIG_PLC_RTSCTS
+#define DCF_WAIT_CTS (TX_COORD_OFFSET + 4)
+#endif
/* TResp status */
#define TRESP_STATUS_IDLE 0
@@ -185,7 +200,8 @@ static void set_frame_control (struct plcp_frame *pframe)
if (pframe->control->ff == PPC_PROTO)
{
csma_stats (unit->stats.access.tx_mng++);
- set_data_seqno (pframe->control->l_frm.seqno, pframe->host->mng_seqno);
+ set_data_seqno (pframe->control->l_frm.seqno,
+ pframe->host->mng_seqno);
pframe->host->mng_seqno = (pframe->host->mng_seqno + 1) & 0xf;
return;
}
@@ -193,7 +209,8 @@ static void set_frame_control (struct plcp_frame *pframe)
if (pframe->control->l_frm.type == MA_TYPE_MANAGEMENT)
{
csma_stats (unit->stats.access.tx_mng++);
- set_data_seqno (pframe->control->l_frm.seqno, pframe->host->mng_seqno);
+ set_data_seqno (pframe->control->l_frm.seqno,
+ pframe->host->mng_seqno);
pframe->host->mng_seqno = (pframe->host->mng_seqno + 1) & 0xf;
}
else if (pframe->control->l_frm.type == MA_TYPE_DATA)
@@ -233,13 +250,16 @@ static void set_frame_control (struct plcp_frame *pframe)
/* always asign a sequence number for multicast, broadcast and unicast */
if (pframe->host)
{
- set_data_seqno (pframe->control->l_frm.seqno, pframe->host->data_seqno);
+ set_data_seqno (pframe->control->l_frm.seqno,
+ pframe->host->data_seqno);
pframe->host->data_seqno = (pframe->host->data_seqno + 1) & 0xf;
}
}
else
{
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "mac_access_write: bad type %d\n", pframe->control->l_frm.type);
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "mac_access_write: bad type %d\n",
+ pframe->control->l_frm.type);
}
}
@@ -260,7 +280,9 @@ struct plcp_frame *in_queue_sel (int index)
LOCK_SAVE (msr);
if (host->tx_queue_count[prio] > 0)
{
- pframe = list_entry (host->tx_queue[prio].next, struct plcp_frame, link);
+ pframe =
+ list_entry (host->tx_queue[prio].next, struct plcp_frame,
+ link);
if (pframe->state == PLCP_QUEUED)
{
@@ -280,7 +302,8 @@ struct plcp_frame *in_queue_sel (int index)
dbg = 1;
LOCK_RESTORE (msr);
if (dbg)
- RT_PRINTK ("host(%d)->tx_queue[%d] not empty\n", host->index, prio);
+ RT_PRINTK ("host(%d)->tx_queue[%d] not empty\n", host->index,
+ prio);
}
return NULL;
}
@@ -308,19 +331,51 @@ struct plcp_frame *in_queue_dcf (struct plc_drv_unit *unit)
static int idx = 0;
int i;
+#ifdef CONFIG_PLC_PPC
+ uint8_t hopTEI;
+ struct plcp_host *host = NULL;
+ int flag;
+#endif
+
/* function can return NULL */
pframe = NULL;
/* round robin algorithm */
- i = 0;
- while ((i < PLCP_MAX_HOST) && (pframe == NULL))
+#ifdef CONFIG_PLC_PPC
+ if (l2_ppc && l2_ppc->l2_sched_next_host)
{
- pframe = in_queue_sel (idx);
- idx = (idx + 1) % PLCP_MAX_HOST;
- i++;
+ flag = l2_ppc->l2_sched_next_host (&hopTEI);
+ if (flag == 0)
+ {
+ for (i = 0; i < PLCP_MAX_HOST; i++)
+ {
+ host = &hosts_pool[i];
+ if (host->used && host->init &&
+ (host->ce_state != CE_STATE_EXITING) &&
+ host->TEI == hopTEI)
+ break;
+ else
+ host = NULL;
+ }
+ if (host)
+ pframe = in_queue_sel (host->index);
+ }
}
+ if (pframe)
+ return pframe;
+ else
+#endif
+ {
+ i = 0;
+ while ((i < PLCP_MAX_HOST) && (pframe == NULL))
+ {
+ pframe = in_queue_sel (idx);
+ idx = (idx + 1) % PLCP_MAX_HOST;
+ i++;
+ }
- return pframe;
+ return pframe;
+ }
}
@@ -354,13 +409,15 @@ int is_flooding_multicast (char *addr)
// for ipv6 33:33:00:00:00:01 is multicast mac address to all hosts
#ifdef CONFIG_IPV6
if ((addr[0] == 0x33)
- && (addr[1] == 0x33) && (addr[2] == 0x00) && (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x01))
+ && (addr[1] == 0x33) && (addr[2] == 0x00) && (addr[3] == 0x00) &&
+ (addr[4] == 0x00) && (addr[5] == 0x01))
return 1;
#endif
// 01-00-5e-00-00-01 s a special multicast address for flooding.
if ((addr[0] == 0x01)
- && (addr[1] == 0x00) && (addr[2] == 0x5e) && (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x01))
+ && (addr[1] == 0x00) && (addr[2] == 0x5e) && (addr[3] == 0x00) &&
+ (addr[4] == 0x00) && (addr[5] == 0x01))
return 1;
else
return 0;
@@ -375,14 +432,38 @@ int is_multicast_mac (char *addr)
return 1;
#endif
-
// 01-00-5e-00-00-00 to 01-00-5e-7f-ff-ff.
- if ((addr[0] == 0x01) && (addr[1] == 0x00) && (addr[2] == 0x5e) && ((addr[3] & 0x80) == 0x00))
+ if ((addr[0] == 0x01) && (addr[1] == 0x00) && (addr[2] == 0x5e) &&
+ ((addr[3] & 0x80) == 0x00))
return 1;
else
return 0;
}
+int is_multicast_mac_ipv6 (char *addr)
+{
+ // for ipv6 33:33:XX:XX:XX:XX is multicast mac address..
+#ifdef CONFIG_IPV6
+ if ((addr[0] == 0x33) && (addr[1] == 0x33))
+ return 1;
+#endif
+ return 0;
+}
+
+int is_multicast_mac_ipv6_ok (char *addr)
+{
+ // for ipv6 33:33:XX:XX:XX:XX is multicast mac address..
+#ifdef CONFIG_IPV6
+ if (addr[0] != 0x33 || addr[1] != 0x33)
+ return 0;
+ if (addr[2] || addr[3] || addr[4])
+ return 0;
+ if (addr[5] == 0x02 || addr[5] == 0x16)
+ return 1;
+#endif
+ return 0;
+}
+
#ifdef CONFIG_PLC_MCAST
// check if we own to the plc multicast group identifed by this tei
struct mcast_stream *get_multicast_stream (int tei)
@@ -398,7 +479,8 @@ struct mcast_stream *get_multicast_stream (int tei)
// -1 if sta already own to the stream
// 0 if the sta own to the stream but stream config has changed
// 1 if sta has been added succesfully to the stream
-int add_to_multicast_stream (uint8_t mtei, uint8_t * mc_group, uint8_t proxy_tei, uint16_t channel_id,
+int add_to_multicast_stream (uint8_t mtei, uint8_t * mc_group,
+ uint8_t proxy_tei, uint16_t channel_id,
uint16_t channel_index)
{
struct mcast_stream *ms, *msb;
@@ -491,7 +573,8 @@ int filter_multicast (char *DA)
for (i = 0; i < filter_num; i++)
{
- if (filter_table[i][0] == DA[3] && filter_table[i][1] == DA[4] && filter_table[i][2] == DA[5])
+ if (filter_table[i][0] == DA[3] && filter_table[i][1] == DA[4] &&
+ filter_table[i][2] == DA[5])
return 1;
}
return 0;
@@ -502,7 +585,8 @@ int filter_multicast (char *DA)
#ifdef CONFIG_PLC_MCAST
/* browse mhost mc_list to find an mc_link owning the mc_member */
-struct mc_link *get_member_mclink (struct plcp_host *mhost, unsigned char *mc_member)
+struct mc_link *get_member_mclink (struct plcp_host *mhost,
+ unsigned char *mc_member)
{
struct list_head *entry;
struct mc_link *mc, *mc_ret;
@@ -530,7 +614,8 @@ struct mc_link *get_member_mclink (struct plcp_host *mhost, unsigned char *mc_me
#ifdef CONFIG_PLC_MCAST
/* create a multicast host knowing its group mac address. return MAC_STATUS_XXX and mhost pointer.
* start channel estimation for this host */
-int create_mcast_host (struct plc_drv_unit *unit, struct plcp_host **mhost_addr, unsigned char *mc_group)
+int create_mcast_host (struct plc_drv_unit *unit,
+ struct plcp_host **mhost_addr, unsigned char *mc_group)
{
struct plcp_host *mhost;
struct plcp_uchannel *uchannel;
@@ -540,8 +625,9 @@ int create_mcast_host (struct plc_drv_unit *unit, struct plcp_host **mhost_addr,
mhost = plcp_create_host (unit, mc_group);
if (mhost == NULL)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "no enough memory to create the mcast link \n" IEEE802_FMT "\n",
- IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "no enough memory to create the mcast link \n" IEEE802_FMT
+ "\n", IEEE802_VAL (mc_group));
*mhost_addr = NULL;
return MC_STATUS_NO_MEMORY;
}
@@ -550,8 +636,9 @@ int create_mcast_host (struct plc_drv_unit *unit, struct plcp_host **mhost_addr,
tei = get_mcast_tei (mhost);
if (tei < 0)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "no enough memory to allocate mcast tei\n" IEEE802_FMT "\n",
- IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "no enough memory to allocate mcast tei\n" IEEE802_FMT
+ "\n", IEEE802_VAL (mc_group));
plcp_destroy_host (unit, mhost);
*mhost_addr = NULL;
return MC_STATUS_NO_MEMORY;
@@ -588,7 +675,8 @@ int create_mcast_host (struct plc_drv_unit *unit, struct plcp_host **mhost_addr,
plcp_copy_channel (mhost->uchannel1, uchannel);
plcp_copy_channel (mhost->uchannel2, uchannel);
- mhost->mtu = plcp_get_max_data_len (unit, mhost->uchannel, PLCP_MAX_SLOTS);
+ mhost->mtu =
+ plcp_get_max_data_len (unit, mhost->uchannel, PLCP_MAX_SLOTS);
if (unit->plcp.config.fcs)
slices = (mhost->mtu + 4) / PMD_SLICE_SIZE;
else
@@ -617,7 +705,9 @@ void remove_mcast_host (struct plc_drv_unit *unit, struct plcp_host *mhost)
int msr;
// TODO: should send an indication so that the slaves can remove their TEI for the multicast list
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "remove mcast host " IEEE802_FMT "\n", IEEE802_VAL (mhost->mac_addr));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "remove mcast host " IEEE802_FMT "\n",
+ IEEE802_VAL (mhost->mac_addr));
// stop the channel estimation process
ce_stop_host (unit, mhost);
@@ -661,7 +751,8 @@ void remove_mcast_host (struct plc_drv_unit *unit, struct plcp_host *mhost)
* - SUCCESS: mhost found (carp entry eventually updated)
* - GROUP_ALREADY_EXIST: group already found. mcast carp entry may be updated.
* - NO_MEMORY: unable to create mhost context. */
-int add_mcast_group (struct plc_drv_unit *unit, struct plcp_host **mhost_addr, unsigned char *mc_group)
+int add_mcast_group (struct plc_drv_unit *unit, struct plcp_host **mhost_addr,
+ unsigned char *mc_group)
{
struct plcp_host *mhost;
int status;
@@ -672,8 +763,9 @@ int add_mcast_group (struct plc_drv_unit *unit, struct plcp_host **mhost_addr, u
// security check. mhost could not be the local_host
if (mhost == local_host)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "strange: local_host associated with mhost: member is " IEEE802_FMT "\n",
- IEEE802_VAL (mhost->mac_addr));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "strange: local_host associated with mhost: member is "
+ IEEE802_FMT "\n", IEEE802_VAL (mhost->mac_addr));
status = MC_STATUS_IGNORED;
}
else
@@ -687,7 +779,8 @@ int add_mcast_group (struct plc_drv_unit *unit, struct plcp_host **mhost_addr, u
{
// carp entry as been removed!! recreate it now
carp_insert (mc_group, mhost);
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "CARP update mcast group " IEEE802_FMT " \n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "CARP update mcast group " IEEE802_FMT " \n",
IEEE802_VAL (mc_group));
status = MC_STATUS_GROUP_ALREADY_EXIST;
}
@@ -718,13 +811,17 @@ int del_mcast_group (struct plc_drv_unit *unit, unsigned char *mc_group)
// check if group is a multicast address
if (!is_multicast_mac (mc_group))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "not a multicast address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "not a multicast address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
// filter unwanted multicast group
if (filter_multicast (mc_group))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "filtered group address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "filtered group address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
@@ -732,7 +829,9 @@ int del_mcast_group (struct plc_drv_unit *unit, unsigned char *mc_group)
mhost = carp_lookup (mc_group);
if (mhost == NULL || !mhost->used)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "group " IEEE802_FMT "doesn't exist\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "group " IEEE802_FMT "doesn't exist\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_GROUP_NOT_FOUND;
}
@@ -746,7 +845,8 @@ int del_mcast_group (struct plc_drv_unit *unit, unsigned char *mc_group)
#ifdef CONFIG_PLC_MCAST
// add a member to the multicast group. Exectuted in rtai context!
-int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsigned char *mc_member)
+int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group,
+ unsigned char *mc_member)
{
struct plcp_host *mhost, *uhost;
struct list_head *entry;
@@ -760,14 +860,18 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
// check if group is a multicast address
if (!is_multicast_mac (&mc_group[0]))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "not a multicast address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "not a multicast address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
// filter unwanted multicast group
if (filter_multicast (&mc_group[0]))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "filtered group address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "filtered group address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
@@ -776,7 +880,8 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
if (uhost == NULL || uhost == local_host || uhost->used == false)
{ // FIXED bug: check local_host
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "no link to join member " IEEE802_FMT ". uhost=%p\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "no link to join member " IEEE802_FMT ". uhost=%p\n",
IEEE802_VAL (mc_member), uhost);
return MC_STATUS_LINK_NOT_FOUND;
}
@@ -802,8 +907,10 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
list_add_tail (&mc->link, &mhost->mc_list);
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "member " IEEE802_FMT " successfully attached to mhost: group is " IEEE802_FMT ", index %d\n",
- IEEE802_VAL (mc_member), IEEE802_VAL (mc_group), mhost->index);
+ "member " IEEE802_FMT
+ " successfully attached to mhost: group is "
+ IEEE802_FMT ", index %d\n", IEEE802_VAL (mc_member),
+ IEEE802_VAL (mc_group), mhost->index);
}
else
{
@@ -811,14 +918,16 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
if (mc->uhost == uhost)
{
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "member " IEEE802_FMT " already found in the mc_group " IEEE802_FMT "\n",
+ "member " IEEE802_FMT
+ " already found in the mc_group " IEEE802_FMT "\n",
IEEE802_VAL (mc_member), IEEE802_VAL (mc_group));
return MC_STATUS_MEMBER_ALREADY_EXIST;
}
else
{
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "member " IEEE802_FMT " changed link in the mc_group " IEEE802_FMT "\n",
+ "member " IEEE802_FMT
+ " changed link in the mc_group " IEEE802_FMT "\n",
IEEE802_VAL (mc_member), IEEE802_VAL (mc_group));
// update uhost
mc->uhost = uhost;
@@ -839,7 +948,8 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
}
else
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "join ignored if not master or ad_hoc" IEEE802_FMT "\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "join ignored if not master or ad_hoc" IEEE802_FMT "\n",
IEEE802_VAL (mc_member));
return MC_STATUS_IGNORED;
}
@@ -850,7 +960,8 @@ int add_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
#ifdef CONFIG_PLC_MCAST
// del a member of a multicast group. Exectuted in rtai context!
-int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsigned char *mc_member)
+int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group,
+ unsigned char *mc_member)
{
struct plcp_host *mhost;
struct list_head *entry;
@@ -861,13 +972,17 @@ int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
// check if group is a multicast address
if (!is_multicast_mac (&mc_group[0]))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "not a multicast address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "not a multicast address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
// filter unwanted multicast group
if (filter_multicast (&mc_group[0]))
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "filtered group address " IEEE802_FMT "\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "filtered group address " IEEE802_FMT "\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_BAD_GROUP;
}
@@ -878,14 +993,16 @@ int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
if (mhost == local_host)
{
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "strange: local_host associated with mhost: member is " IEEE802_FMT "\n",
- IEEE802_VAL (mc_member));
+ "strange: local_host associated with mhost: member is "
+ IEEE802_FMT "\n", IEEE802_VAL (mc_member));
return MC_STATUS_IGNORED;
}
if (mhost == NULL || !mhost->used)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "group " IEEE802_FMT "doesn't exist\n", IEEE802_VAL (mc_group));
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "group " IEEE802_FMT "doesn't exist\n",
+ IEEE802_VAL (mc_group));
return MC_STATUS_GROUP_NOT_FOUND;
}
@@ -899,15 +1016,19 @@ int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
free (mc);
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "member " IEEE802_FMT " found in the mc_group " IEEE802_FMT " whose mhost index is %d\n",
- IEEE802_VAL (mc_member), IEEE802_VAL (mc_group), mhost->index);
+ "member " IEEE802_FMT " found in the mc_group "
+ IEEE802_FMT " whose mhost index is %d\n",
+ IEEE802_VAL (mc_member), IEEE802_VAL (mc_group),
+ mhost->index);
}
else
{
RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
- "member " IEEE802_FMT " NOT found in the mc_group " IEEE802_FMT " whose mhost index is %d\n",
- IEEE802_VAL (mc_member), IEEE802_VAL (mc_group), mhost->index);
+ "member " IEEE802_FMT " NOT found in the mc_group "
+ IEEE802_FMT " whose mhost index is %d\n",
+ IEEE802_VAL (mc_member), IEEE802_VAL (mc_group),
+ mhost->index);
return MC_STATUS_MEMBER_NOT_FOUND;
}
@@ -924,7 +1045,8 @@ int del_mcast_member (struct plc_drv_unit *unit, unsigned char *mc_group, unsign
}
else
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "slave NOT listening on mutlicast tei 2\n");
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "slave NOT listening on mutlicast tei 2\n");
}
return MC_STATUS_SUCCESS;
@@ -1013,16 +1135,20 @@ int mac_access_set_defaults (struct plc_drv_unit *unit)
unit->mac.config.pifs = MAC_CSMA_PIFS;
unit->mac.config.ts = MAC_CSMA_TS;
-#ifdef CONFIG_PLAB
- unit->mac.config.cw_min = 0;
- unit->mac.config.cw_max = 0;
-#else
+// BUG 56: Ad-hoc Mode and attachment's problem for PLAB target
+// bug is fixed by adding the comment below.
+
+//#ifdef CONFIG_PLAB
+// unit->mac.config.cw_min = 0;
+// unit->mac.config.cw_max = 0;
+//#else
unit->mac.config.cw_min = 3;
unit->mac.config.cw_max = 7;
-#endif
+//#endif
// 0,1,2 slots are priority slots, slot 3 is reserved for beacon, others for unicast
- unit->mac.config.cw_size = unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
+ unit->mac.config.cw_size =
+ unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
unit->mac.config.csma_retries = 400;
unit->mac.config.tmo_scale = 3;
@@ -1152,7 +1278,8 @@ void mac_send_failed (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->host->tx_queue_count[pframe->prio]--;
list_del_init (&pframe->link);
LOCK_RESTORE (msr);
- mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date, pframe->d_len, (unsigned short) -1);
+ mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date,
+ pframe->d_len, (unsigned short) -1);
mac_handle_tx_end (unit, pframe, -1);
}
@@ -1175,7 +1302,8 @@ void mac_send_done (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->host->tx_queue_count[pframe->prio]--;
list_del_init (&pframe->link);
LOCK_RESTORE (msr);
- mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date, pframe->d_len, (unsigned short) 1);
+ mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date,
+ pframe->d_len, (unsigned short) 1);
mac_handle_tx_end (unit, pframe, 1);
}
@@ -1190,7 +1318,8 @@ void mac_send_partial (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->host->tx_queue_count[pframe->prio]--;
list_del_init (&pframe->link);
LOCK_RESTORE (msr);
- mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date, pframe->d_len, (unsigned short) 2);
+ mac_register_perf (pframe->control->l_frm.DTEI, pframe->mreq_date,
+ pframe->d_len, (unsigned short) 2);
mac_handle_tx_end (unit, pframe, 2);
}
@@ -1209,7 +1338,8 @@ extern uint16_t tmo2_isr_date;
/* set CFACK flag if required */
-static void set_cfack_flag (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void set_cfack_flag (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
if (pending_ack)
{
@@ -1255,13 +1385,17 @@ void phy_tx_cfack (uint8_t seqno, uint8_t data_ok)
static int data_over_ack_counter = 0;
/* tx_coord or rx_coord need to send a frame to PHY layer */
-bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+bool phy_tx_data_request (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
bool transmitted = false;
int msr;
/* tx_cfack message must reach pending_frame before phy_idle is called */
- set_cfack_flag (unit, pframe);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.type != MA_TYPE_CONTROL)
+#endif
+ set_cfack_flag (unit, pframe);
// dynasar => set flag on pframe
if (pframe->sar_enable)
@@ -1278,10 +1412,15 @@ bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
case MA_TYPE_CONTROL:
switch (pframe->control->l_frm.subtype)
{
+#ifdef CONFIG_PLC_RTSCTS
+ case MA_SUBTYPE_RTS:
+ case MA_SUBTYPE_CTS:
+#endif
case MA_SUBTYPE_ACK:
case MA_SUBTYPE_NACK:
case MA_SUBTYPE_SACK:
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX, MAC_SAMPLE_OK, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX,
+ MAC_SAMPLE_OK, pframe->control);
break;
}
break;
@@ -1289,22 +1428,26 @@ bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
case MA_TYPE_DATA:
if (pframe->control->l_frm.subtype == MA_SUBTYPE_NULL)
{
- if ((pframe->control->l_frm.flags & (MA_BIT_DATA_OK | MA_BIT_CFACK)) == MA_BIT_CFACK)
+ if ((pframe->control->l_frm.
+ flags & (MA_BIT_DATA_OK | MA_BIT_CFACK)) == MA_BIT_CFACK)
{
/* log only if negative ACK */
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX, MAC_SAMPLE_OK, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX,
+ MAC_SAMPLE_OK, pframe->control);
}
}
else
{
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX, MAC_SAMPLE_OK, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX,
+ MAC_SAMPLE_OK, pframe->control);
}
break;
case MA_TYPE_MANAGEMENT:
if (pframe->control->l_frm.flags & MA_BIT_DATA_OK)
{
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX, MAC_SAMPLE_OK, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_TX,
+ MAC_SAMPLE_OK, pframe->control);
}
break;
}
@@ -1333,8 +1476,11 @@ bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
csma_stats (unit->stats.access.data_over_ack++);
if (data_over_ack_counter > 0)
{
- RT_PRINTK ("data_over_ack: pframe=%p, type=%d, sub=%d, len=%d, dbuf=%p\n", pframe,
- pframe->control->l_frm.type, pframe->control->l_frm.subtype, pframe->d_len, pframe->d_buf);
+ RT_PRINTK
+ ("data_over_ack: pframe=%p, type=%d, sub=%d, len=%d, dbuf=%p\n",
+ pframe, pframe->control->l_frm.type,
+ pframe->control->l_frm.subtype, pframe->d_len,
+ pframe->d_buf);
data_over_ack_counter--;
}
}
@@ -1344,7 +1490,8 @@ bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
/* send a direct acknowledge regardless. No call to phy_busy */
-bool phy_tx_ack_request (struct plc_drv_unit * unit, struct plcp_frame * pframe)
+bool phy_tx_ack_request (struct plc_drv_unit * unit,
+ struct plcp_frame * pframe)
{
bool transmitted = false;
int msr;
@@ -1424,6 +1571,13 @@ void plcp_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
sig.PhyTxDataConfirm.date = (short) medium_idle_date;
sig_send (&sig);
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_CTS)
+ {
+ phy_tx_cts_confirm (unit);
+ }
+#endif
else
{ /* rx_coordination */
phy_tx_ack_confirm (unit, pframe);
@@ -1431,7 +1585,8 @@ void plcp_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "mac_tx_end with no transmitter\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "mac_tx_end with no transmitter\n");
}
}
@@ -1459,6 +1614,13 @@ void plcp_tx_status (struct plc_drv_unit *unit, struct plcp_frame *pframe)
sig.PhyTxStatusIndication.pframe = pframe;
sig_send (&sig);
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_CTS)
+ {
+ phy_tx_cts_indication (unit);
+ }
+#endif
else
{ /* rx_coordination */
phy_tx_ack_indication (unit);
@@ -1466,7 +1628,8 @@ void plcp_tx_status (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "mac_tx_status with no transmitter\n");
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "mac_tx_status with no transmitter\n");
}
}
@@ -1512,7 +1675,8 @@ bool plcp_stop_tresp (struct plc_drv_unit *unit, int signo)
/* start TResp timeout. Must be synchronous with phlic and interrupt controler */
-bool plcp_start_tresp (struct plc_drv_unit * unit, int obj, int signo, uint16_t date)
+bool plcp_start_tresp (struct plc_drv_unit * unit, int obj, int signo,
+ uint16_t date)
{
int msr;
@@ -1520,8 +1684,9 @@ bool plcp_start_tresp (struct plc_drv_unit * unit, int obj, int signo, uint16_t
if (tresp_status == TRESP_STATUS_RUNNING)
{
LOCK_RESTORE (msr);
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "tmo error: tresp_status=%d, tresp_signo=%d\r\n", tresp_status,
- tresp_signo);
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "tmo error: tresp_status=%d, tresp_signo=%d\r\n",
+ tresp_status, tresp_signo);
return false;
}
usr_obj = obj;
@@ -1546,7 +1711,8 @@ void plcp_tmo (struct plc_drv_unit *unit)
if (tresp_status != TRESP_STATUS_RUNNING)
{
#ifdef DEBUG_MULTIPOINT
- RT_PRINTM (TRACE_ACCESS, TRACE_ERROR, "plcp_tmo unexp at date %d. Previsous was signo=%d at date %d\n",
+ RT_PRINTM (TRACE_ACCESS, TRACE_ERROR,
+ "plcp_tmo unexp at date %d. Previsous was signo=%d at date %d\n",
tmo2_isr_date, last_signo, last_tmo_date);
#endif
return;
diff --git a/app/sm-plc-drv/src/mac_network_discovery.c b/app/sm-plc-drv/src/mac_network_discovery.c
index 89b9cad6cd..edebb0b50b 100644
--- a/app/sm-plc-drv/src/mac_network_discovery.c
+++ b/app/sm-plc-drv/src/mac_network_discovery.c
@@ -35,7 +35,6 @@ u32 RX_DEQUEUE_MMDU_IND = 0;
u32 DBG_ND_STATE = ND_STATE_IDLE;
#endif
-
/* all frames begins with this header */
struct nd_header {
uint8_t bssid; // bssid of the source station
@@ -81,6 +80,24 @@ struct disassoc_request {
struct nd_header head;
};
+#ifdef PLC_RECOVERY
+struct tei_mac {
+ char mac_addr[6];
+ char tei;
+};
+
+struct recovery_request {
+ struct nd_header head;
+ int SNID;
+ char nb_hosts;
+ struct tei_mac tei_mac[0];
+};
+
+struct recovery_reply {
+ struct nd_header head;
+ uint16_t status;
+};
+#endif
/* A confirmation that the attachement has been done or not */
struct disassoc_reply {
struct nd_header head;
@@ -119,12 +136,13 @@ static int scan_bssid;
static int scan_snid;
static PROCESS network_discovery_saved;
-
static struct NdTimeout *nd_create_timeout (struct plc_drv_unit *unit);
static void nd_destroy_timeout (struct NdTimeout *ndTmo);
-static void nd_request_timeout (struct NdTimeout *ndTmo, CANCEL_INFO * cancel_info, int timer);
+static void nd_request_timeout (struct NdTimeout *ndTmo,
+ CANCEL_INFO * cancel_info, int timer);
static struct NdTimeout *nd_cancel_timeout (CANCEL_INFO * cancel_info);
-static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype, uint8_t DTEI, uint8_t bssid, int nb_times);
+static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype,
+ uint8_t DTEI, uint8_t bssid, int nb_times);
static void nd_timeout (struct plc_drv_unit *unit);
void nd_event_host_up (struct plcp_host *host)
@@ -137,6 +155,9 @@ void nd_event_host_up (struct plcp_host *host)
}
else
{
+#ifdef PLC_RECOVERY
+ RECOVERY_FLAG = 1; // New host have been added, so recovery.conf file need to be updated.
+#endif
#ifdef CONFIG_PLC_PPC
/* Call the l2_host_create function. */
@@ -145,10 +166,18 @@ void nd_event_host_up (struct plcp_host *host)
host->ppc_host.nid = host->NID;
host->ppc_host.tei = host->TEI;
memcpy (host->ppc_host.hw_addr, host->mac_addr, ETH_ALEN);
- l2_ppc->l2_host_create (&host->ppc_host);
+ // Function l2_host_create will be called in linux context.
+ send_r2l_sig (PPC_HOST_CREATE, &host->ppc_host);
}
#endif
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+ /* Notify plcnfs driver when new host is detected. */
+ if (is_unicast_tei (host->TEI))
+ if (callbacks && callbacks->new_host)
+ send_r2l_sig (PLC_EN_HOST_CREATE, host);
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
event->host_up.event_id = EV_HOST_UP;
event->host_up.host_id = host->index;
memcpy (event->host_up.mac_addr, host->mac_addr, 6);
@@ -175,7 +204,8 @@ void nd_event_host_down (struct plcp_host *host)
}
#ifdef CONFIG_PLC_VPORT
-static void neighbour_create_vport (struct plc_drv_unit *unit, struct mac_addr *mac)
+static void neighbour_create_vport (struct plc_drv_unit *unit,
+ struct mac_addr *mac)
{
if (!vport_find (unit, (uint8_t *) & mac->addr))
{
@@ -189,7 +219,8 @@ static void neighbour_create_vport (struct plc_drv_unit *unit, struct mac_addr *
}
}
-static void neighbour_destroy_vport (struct plc_drv_unit *unit, struct mac_addr *mac)
+static void neighbour_destroy_vport (struct plc_drv_unit *unit,
+ struct mac_addr *mac)
{
struct vport_msg_ *msg;
@@ -209,7 +240,8 @@ static struct NdTimeout *nd_create_timeout (struct plc_drv_unit *unit)
/* allocation d'un signal de temporisation */
- ndTmo = (struct NdTimeout *) alloc (sizeof (struct NdTimeout), ND_TIMEOUT);
+ ndTmo =
+ (struct NdTimeout *) alloc (sizeof (struct NdTimeout), ND_TIMEOUT);
ASSERT (ndTmo);
return ndTmo;
}
@@ -226,7 +258,8 @@ static void nd_destroy_timeout (struct NdTimeout *ndTmo)
}
// request a timer signal for a duration in ms
-static void nd_request_timeout (struct NdTimeout *ndTmo, CANCEL_INFO * cancel_info, int timer)
+static void nd_request_timeout (struct NdTimeout *ndTmo,
+ CANCEL_INFO * cancel_info, int timer)
{
union SIGNAL *sig;
@@ -251,7 +284,8 @@ static void nd_goto_idle (void)
}
/* send a frame eventually several times. */
-static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype, uint8_t DTEI, uint8_t bssid, int nb_times)
+static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype,
+ uint8_t DTEI, uint8_t bssid, int nb_times)
{
static SIGSELECT sigsel[] = { 1, MMDU_CONFIRM };
struct plcp_host *host;
@@ -289,7 +323,7 @@ static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype, uint8_t DT
sent = 0;
for (i = 0; i < nb_times; i++)
{
- /* envoie prioritaire sur la donnée (si queue full, tanpis), sans ack */
+ /* envoie prioritaire sur la donnée (si queue full, tanpis), sans ack */
err = mm_write (unit, pframe);
if (err == DEVICE_EQUEUE_FULL)
@@ -311,7 +345,8 @@ static int mmdu_request (struct plcp_frame *pframe, uint16_t subtype, uint8_t DT
// create an new host if enough memory
// 0: success, 1: exist, -1: not enough memory
-static int nd_create_host (struct plc_drv_unit *unit, struct mac_addr addr, int syncBand)
+static int nd_create_host (struct plc_drv_unit *unit, struct mac_addr addr,
+ int syncBand)
{
struct plcp_host *host;
int status;
@@ -346,14 +381,42 @@ static int nd_create_host (struct plc_drv_unit *unit, struct mac_addr addr, int
void nd_free_host (struct plc_drv_unit *unit, struct plcp_host *host)
{
+#ifdef CONFIG_PLC_EVENT_NOTIFICATION
+ struct plc_en_host *plc_en_host;
+
+ /* Notify plcnfs driver when host disconnects. */
+ if (is_unicast_tei (host->TEI))
+ {
+ if (callbacks && callbacks->new_host)
+ {
+ plc_en_host = rt_malloc (sizeof (struct plc_en_host));
+ plc_en_host->TEI = host->TEI;
+ memcpy (plc_en_host->mac_addr, host->mac_addr, ETH_ALEN);
+ send_r2l_sig (PLC_EN_HOST_DESTROY, plc_en_host);
+ }
+ }
+#endif /* CONFIG_PLC_EVENT_NOTIFICATION */
+
+#ifdef PLC_RECOVERY
+ RECOVERY_FLAG = 1; // New host have been destroyed, so recovery.conf file need to be updated.
+#endif
+
#ifdef CONFIG_PLC_PPC
/* Calling of the l2_host_delete function. */
if (l2_ppc && l2_ppc->l2_host_delete)
{
- host->ppc_host.nid = host->NID;
- host->ppc_host.tei = host->TEI;
- memcpy (host->ppc_host.hw_addr, host->mac_addr, ETH_ALEN);
- l2_ppc->l2_host_delete (&host->ppc_host);
+ // In case of update host before execution of the l2_host_delete(),
+ // new istance of the l2_host structure is created and sent with
+ // the r2l signal insted the pointer to that structure.
+ struct l2_host *PPC_host;
+ PPC_host = (struct l2_host *) rt_malloc (sizeof (struct l2_host));
+
+ PPC_host->nid = host->NID;
+ PPC_host->tei = host->TEI;
+ memcpy (PPC_host->hw_addr, host->mac_addr, ETH_ALEN);
+
+ // Function l2_host_delete will be called in linux context.
+ send_r2l_sig (PPC_HOST_DELETE, PPC_host);
}
#endif
unit->stats.nd.free_host++;
@@ -363,13 +426,16 @@ void nd_free_host (struct plc_drv_unit *unit, struct plcp_host *host)
/* we receive an association request and reply with a response */
-static void probe_request (struct plc_drv_unit *unit, struct probe_request *request)
+static void probe_request (struct plc_drv_unit *unit,
+ struct probe_request *request)
{
struct probe_reply *reply;
struct plcp_frame *pframe;
// ASSERT used_bands are corrects and we are a repeater or a station
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive PROBE_REQUEST from MAC=%02x\n", request->head.srcEthAddr.addr[5]);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive PROBE_REQUEST from MAC=%02x\n",
+ request->head.srcEthAddr.addr[5]);
unit->stats.nd.rx_probe_request++;
// allocate a plcp frame
@@ -387,9 +453,6 @@ static void probe_request (struct plc_drv_unit *unit, struct probe_request *requ
memcpy (reply->head.dstEthAddr.addr, request->head.srcEthAddr.addr, 6);
reply->head.mode = unit->mode;
reply->head.tei = unit->TEI;
-#ifdef CONFIG_PLC_PPC
- reply->head.nid = unit->NID;
-#endif
reply->head.bssid = unit->BSSID;
// build reply information
reply->glomer = __glomer; // from channel estimation
@@ -398,7 +461,8 @@ static void probe_request (struct plc_drv_unit *unit, struct probe_request *requ
// send a response to the sender
memcpy (pframe->d_buf, reply, sizeof (struct probe_reply));
- mmdu_request (pframe, MA_SUBTYPE_PROBE_REPLY, TEI_ALL_CELL, BSSID_ALL_BSS, 1);
+ mmdu_request (pframe, MA_SUBTYPE_PROBE_REPLY, TEI_ALL_CELL, BSSID_ALL_BSS,
+ 1);
// free probe_reply memory
plcp_free_tx_frame (pframe);
@@ -406,7 +470,8 @@ static void probe_request (struct plc_drv_unit *unit, struct probe_request *requ
/* we receive an association request and reply with a response */
-static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *request, int syncBand)
+static void assoc_request (struct plc_drv_unit *unit,
+ struct assoc_request *request, int syncBand)
{
struct assoc_reply *reply;
struct plcp_frame *pframe;
@@ -426,8 +491,9 @@ static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *requ
reply = (struct assoc_reply *) pframe->d_buf;
// ASSERT used_bands are corrects and we are a repeater or a station
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive ASSOC_REQUEST from bss=%d, MAC=%02x\n", request->head.bssid,
- request->head.srcEthAddr.addr[5]);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive ASSOC_REQUEST from bss=%d, MAC=%02x\n",
+ request->head.bssid, request->head.srcEthAddr.addr[5]);
// check if mode is supported
switch (unit->mode)
@@ -435,19 +501,25 @@ static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *requ
case repeater:
supported =
((request->head.mode == repeater &&
- ((unit->attachBSSID == BSSID_UNDEF && request->head.bssid != BSSID_UNDEF) ||
- (unit->attachBSSID != BSSID_UNDEF && request->head.bssid == BSSID_UNDEF) ||
- ((unit->attachBSSID == request->head.bssid) && (unit->attachBSSID != BSSID_UNDEF)))) ||
- (request->head.mode == station && unit->attachBSSID != BSSID_UNDEF));
+ ((unit->attachBSSID == BSSID_UNDEF &&
+ request->head.bssid != BSSID_UNDEF) ||
+ (unit->attachBSSID != BSSID_UNDEF &&
+ request->head.bssid == BSSID_UNDEF) ||
+ ((unit->attachBSSID == request->head.bssid) &&
+ (unit->attachBSSID != BSSID_UNDEF)))) ||
+ (request->head.mode == station &&
+ unit->attachBSSID != BSSID_UNDEF));
break;
case station:
// only from repeater if not attached and the repeater is attached
- supported = (request->head.mode == repeater) && ((unit->attachBSSID == BSSID_UNDEF) ||
- (unit->attachBSSID == request->head.bssid)) &&
+ supported = (request->head.mode == repeater) &&
+ ((unit->attachBSSID == BSSID_UNDEF) ||
+ (unit->attachBSSID == request->head.bssid)) &&
(request->head.bssid != BSSID_UNDEF);
break;
case ad_hoc:
- supported = ((request->head.mode == ad_hoc) && (request->head.bssid == unit->BSSID));
+ supported = ((request->head.mode == ad_hoc) &&
+ (request->head.bssid == unit->BSSID));
break;
}
@@ -525,6 +597,9 @@ static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *requ
host->TEI = get_ucast_tei (host);
host->localTEI = TEI_MASTER;
host->pollable = true;
+#ifdef PLC_RECOVERY
+ host->in_recovery = 0;
+#endif
break;
default:
ASSERT (0);
@@ -594,12 +669,16 @@ static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *requ
memcpy (pframe->d_buf, reply, sizeof (struct assoc_reply));
unit->stats.nd.tx_assoc_reply++;
- mmdu_request (pframe, MA_SUBTYPE_ASSOC_REPLY, TEI_ALL_CELL, BSSID_ALL_BSS, 1);
+ mmdu_request (pframe, MA_SUBTYPE_ASSOC_REPLY, TEI_ALL_CELL, BSSID_ALL_BSS,
+ 1);
-#ifdef CONFIG_PLC_8021X
+ // If 802.1x auhentication is turned on send auth message
+ // to the hostapd application for this slave.
+ if (unit->auth_8021x)
{
struct sk_buff *skb;
+ struct authentication_8021x auth;
uint16_t proto = htons (0x888e); // 0x888e = ETH_P_PAE
skb = alloc_skb (14 + SKB_RESERVE, GFP_ATOMIC);
@@ -607,19 +686,24 @@ static void assoc_request (struct plc_drv_unit *unit, struct assoc_request *requ
memcpy (skb->data + 6, request->head.srcEthAddr.addr, 6);
memcpy (skb->data, &unit->mac_addr[0], 6);
memcpy (skb->data + 12, &proto, sizeof (proto));
+ skb->len = 14;
/* SA MAC @ , DA , Type */
- drv_handle_rx (unit, host, skb, 0);
- }
-#endif
+ auth.unit = unit;
+ auth.host = host;
+ auth.skb = skb;
+ // Function drv_handle_rx(unit, host, skb, 0) will be called from linux context.
+ send_r2l_sig (PLC_HOST_AUTH, &auth);
+ }
// free assoc reply memory
plcp_free_tx_frame (pframe);
}
/* we received a reply to our association request */
-static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply, int syncBand)
+static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply,
+ int syncBand)
{
struct NdTimeout *ndTmo;
extern PROCESS plc_mm_l2r_;
@@ -633,15 +717,17 @@ static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply, i
// check first that we have request an association
if (state != ND_ASSOC)
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "received assoc reply at state %d\n", state);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "received assoc reply at state %d\n", state);
return;
}
// check now this is with the good station
if (!plcp_same_mac (assoc_addr, reply->head.srcEthAddr.addr))
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "requested assoc with " IEEE802_FMT
- ", whereas reply from " IEEE802_FMT "\n", IEEE802_VAL (assoc_addr),
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "requested assoc with " IEEE802_FMT ", whereas reply from "
+ IEEE802_FMT "\n", IEEE802_VAL (assoc_addr),
IEEE802_VAL (reply->head.srcEthAddr.addr));
return;
}
@@ -650,12 +736,14 @@ static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply, i
ASSERT (assoc_host);
// ASSERT used_bands are corrects and we are a repeater or a station and host doesnt exists
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "ASSOC_REPLY [from bss=%d, TEI=%02x] status:%d\n", reply->head.bssid,
- reply->head.tei, reply->status);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "ASSOC_REPLY [from bss=%d, TEI=%02x] status:%d\n",
+ reply->head.bssid, reply->head.tei, reply->status);
unit->stats.nd.rx_assoc_reply++;
- if (reply->status == ND_STATUS_SUCCESS
- || reply->status == ND_STATUS_ALREADY_EXIST /* possible if reply was lost */ )
+ if ((reply->status == ND_STATUS_SUCCESS
+ || reply->status == ND_STATUS_ALREADY_EXIST) &&
+ assoc_host->init == false /* possible if reply was lost */ )
{
// host was already reserved
ret = plcp_init_host (unit, assoc_host, assoc_addr);
@@ -794,8 +882,9 @@ static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply, i
sig = alloc (sizeof (struct MlmeAssocConfirm), MLME_ASSOC_CONFIRM);
ASSERT (sig);
sig->nd_signal.MlmeAssocConfirm.status = reply->status;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "send mlme_assoc_confirm to process %d (l2r is %d)\n", user_process,
- plc_mm_l2r_);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "send mlme_assoc_confirm to process %d (l2r is %d)\n",
+ user_process, plc_mm_l2r_);
send (&sig, user_process);
/* change status to IDLE */
@@ -805,14 +894,16 @@ static void assoc_reply (struct plc_drv_unit *unit, struct assoc_reply *reply, i
#ifdef CONFIG_PLC_PPC
/* we receive an reassociation request and we are going to change TEI and NID of the host with
* specified mac address or delete it if TEI and NID are set to 0. */
-static void reassoc_request (struct plc_drv_unit *unit, struct reassoc_request *request, int syncBand)
+static void reassoc_request (struct plc_drv_unit *unit,
+ struct reassoc_request *request, int syncBand)
{
int status, ret;
struct plcp_host *host = NULL;
// ASSERT used_bands are corrects and we are a repeater or a station
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive REASSOC_REQUEST from bss=%d, MAC=%02x\n", request->head.bssid,
- request->head.srcEthAddr.addr[5]);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive REASSOC_REQUEST from bss=%d, MAC=%02x\n",
+ request->head.bssid, request->head.srcEthAddr.addr[5]);
unit->stats.nd.rx_reassoc_request++;
@@ -845,7 +936,8 @@ static void reassoc_request (struct plc_drv_unit *unit, struct reassoc_request *
{
pframe = list_entry (entry, struct plcp_frame, link);
- if (pframe->control->ff && (pframe->control->l_frm.DTEI == host->TEI))
+ if (pframe->control->ff &&
+ (pframe->control->l_frm.DTEI == host->TEI))
pframe->control->l_frm.DTEI = request->head.tei;
}
LOCK_RESTORE (msr);
@@ -860,7 +952,8 @@ static void reassoc_request (struct plc_drv_unit *unit, struct reassoc_request *
host->ppc_host.nid = host->NID;
host->ppc_host.tei = host->TEI;
- l2_ppc->l2_host_update (&host->ppc_host);
+ // Function l2_host_update will be called from linux context.
+ send_r2l_sig (PPC_HOST_UPDATE, &host->ppc_host);
}
}
}
@@ -868,7 +961,8 @@ static void reassoc_request (struct plc_drv_unit *unit, struct reassoc_request *
#endif
/* we receive an association request and reply with a response */
-static void disassoc_request (struct plc_drv_unit *unit, struct disassoc_request *request)
+static void disassoc_request (struct plc_drv_unit *unit,
+ struct disassoc_request *request)
{
struct disassoc_reply *reply;
struct plcp_frame *pframe;
@@ -886,7 +980,8 @@ static void disassoc_request (struct plc_drv_unit *unit, struct disassoc_request
reply = (struct disassoc_reply *) pframe->d_buf;
// ASSERT used_bands are corrects and we are a repeater or a station
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive DISASSOC_REQUEST from TEI=%02x\n", request->head.tei);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive DISASSOC_REQUEST from TEI=%02x\n", request->head.tei);
// retreive corresponding host
host = plcp_get_host_by_addr (request->head.srcEthAddr.addr);
@@ -932,7 +1027,8 @@ static void disassoc_request (struct plc_drv_unit *unit, struct disassoc_request
// build reply header
memcpy (&reply->head.srcEthAddr.addr[0], &unit->mac_addr[0], 6);
- memcpy (&reply->head.dstEthAddr.addr[0], request->head.srcEthAddr.addr, 6);
+ memcpy (&reply->head.dstEthAddr.addr[0], request->head.srcEthAddr.addr,
+ 6);
reply->head.tei = unit->TEI;
#ifdef CONFIG_PLC_PPC
reply->head.nid = unit->NID;
@@ -945,14 +1041,16 @@ static void disassoc_request (struct plc_drv_unit *unit, struct disassoc_request
// send a response to the sender
memcpy (pframe->d_buf, reply, sizeof (struct disassoc_reply));
unit->stats.nd.tx_disassoc_reply++;
- mmdu_request (pframe, MA_SUBTYPE_DISASSOC_REPLY, TEI_ALL_CELL, BSSID_ALL_BSS, 1);
+ mmdu_request (pframe, MA_SUBTYPE_DISASSOC_REPLY, TEI_ALL_CELL,
+ BSSID_ALL_BSS, 1);
// free assoc reply memory
plcp_free_tx_frame (pframe);
}
/* we received a reply to our association request */
-static void disassoc_reply (struct plc_drv_unit *unit, struct disassoc_reply *reply)
+static void disassoc_reply (struct plc_drv_unit *unit,
+ struct disassoc_reply *reply)
{
struct NdTimeout *ndTmo;
struct plcp_host *host;
@@ -963,22 +1061,26 @@ static void disassoc_reply (struct plc_drv_unit *unit, struct disassoc_reply *re
// check first that we have request an association
if (state != ND_DISASSOC)
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "received disassoc reply at state %d\n", state);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "received disassoc reply at state %d\n", state);
return;
}
// check now this is with the good station
if (!plcp_same_mac (assoc_addr, reply->head.srcEthAddr.addr))
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "requested disassoc with " IEEE802_FMT
- ", whereas reply from " IEEE802_FMT "\n", IEEE802_VAL (assoc_addr),
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "requested disassoc with " IEEE802_FMT
+ ", whereas reply from " IEEE802_FMT "\n",
+ IEEE802_VAL (assoc_addr),
IEEE802_VAL (reply->head.srcEthAddr.addr));
return;
}
// ASSERT used_bands are corrects and we are a repeater or a station and host doesnt exists
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "DISASSOC_REPLY [from %02x] status:%d\n", reply->head.srcEthAddr.addr[5],
- reply->status);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "DISASSOC_REPLY [from %02x] status:%d\n",
+ reply->head.srcEthAddr.addr[5], reply->status);
unit->stats.nd.rx_disassoc_reply++;
if (reply->status == ND_STATUS_SUCCESS || reply->status == ND_STATUS_DOESNT_EXIST) // handle these case cause the reply could be lost
@@ -1044,26 +1146,36 @@ static void nd_timeout (struct plc_drv_unit *unit)
switch (state)
{
case ND_SCAN:
- sig = alloc (sizeof (struct MlmeScanConfirm) + sizeof (struct report) * (nb_reports - 1), MLME_SCAN_CONFIRM);
+ sig =
+ alloc (sizeof (struct MlmeScanConfirm) +
+ sizeof (struct report) * (nb_reports - 1),
+ MLME_SCAN_CONFIRM);
ASSERT (sig);
/* send confirm to the process */
sig->nd_signal.MlmeScanConfirm.status = ND_STATUS_SUCCESS;
sig->nd_signal.MlmeScanConfirm.nb_reports = nb_reports;
- memcpy (sig->nd_signal.MlmeScanConfirm.info, report_table, sizeof (struct report) * nb_reports);
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd scanning done. send confirm to %d (lr2 is %d)\n", user_process,
- plc_mm_l2r_);
+ memcpy (sig->nd_signal.MlmeScanConfirm.info, report_table,
+ sizeof (struct report) * nb_reports);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "nd scanning done. send confirm to %d (lr2 is %d)\n",
+ user_process, plc_mm_l2r_);
send (&sig, user_process);
break;
case ND_PROBE:
- sig = alloc (sizeof (struct MlmeProbeConfirm) + sizeof (struct report) * (nb_reports - 1), MLME_PROBE_CONFIRM);
+ sig =
+ alloc (sizeof (struct MlmeProbeConfirm) +
+ sizeof (struct report) * (nb_reports - 1),
+ MLME_PROBE_CONFIRM);
ASSERT (sig);
/* send confirm to the process */
sig->nd_signal.MlmeProbeConfirm.status = ND_STATUS_SUCCESS;
sig->nd_signal.MlmeProbeConfirm.nb_reports = nb_reports;
- memcpy (sig->nd_signal.MlmeProbeConfirm.info, report_table, sizeof (struct report) * nb_reports);
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd probing done. send confirm to %d (lr2 is %d)\n", user_process,
- plc_mm_l2r_);
+ memcpy (sig->nd_signal.MlmeProbeConfirm.info, report_table,
+ sizeof (struct report) * nb_reports);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "nd probing done. send confirm to %d (lr2 is %d)\n",
+ user_process, plc_mm_l2r_);
send (&sig, user_process);
break;
@@ -1073,7 +1185,8 @@ static void nd_timeout (struct plc_drv_unit *unit)
/* send confirm to the process */
sig->nd_signal.MlmeAssocConfirm.status = ND_STATUS_TIMEOUT;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd timeout assoc. send to %d (lr2 is %d)\n", user_process,
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "nd timeout assoc. send to %d (lr2 is %d)\n", user_process,
plc_mm_l2r_);
ASSERT (assoc_host);
if (assoc_host->TEI != TEI_MASTER && unit->mode == repeater)
@@ -1088,8 +1201,9 @@ static void nd_timeout (struct plc_drv_unit *unit)
/* send confirm to the process */
sig->nd_signal.MlmeDisassocConfirm.status = ND_STATUS_TIMEOUT;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd timeout disassoc. send to %d (lr2 is %d)\n", user_process,
- plc_mm_l2r_);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "nd timeout disassoc. send to %d (lr2 is %d)\n",
+ user_process, plc_mm_l2r_);
send (&sig, user_process);
break;
@@ -1101,7 +1215,8 @@ static void nd_timeout (struct plc_drv_unit *unit)
}
/* find in the report_table an entry with the mac_addr */
-static bool report_table_lookup (struct plc_drv_unit *unit, uint8_t * mac_addr)
+static bool report_table_lookup (struct plc_drv_unit *unit,
+ uint8_t * mac_addr)
{
int i;
bool found = false;
@@ -1120,7 +1235,7 @@ static bool report_table_lookup (struct plc_drv_unit *unit, uint8_t * mac_addr)
/************************ public functions **************************************/
-/* initialisation des données du protocole */
+/* initialisation des données du protocole */
void nd_init (struct plc_drv_unit *unit)
{
unit->nd.period = ND_DEFAULT_PERIOD;
@@ -1131,7 +1246,7 @@ void nd_init (struct plc_drv_unit *unit)
nd_goto_idle ();
}
-/* Arrêt de la machine d'état relative à un host */
+/* Arrêt de la machine d'état relative à un host */
int nd_start (struct plc_drv_unit *unit)
{
ASSERT (unit->nd.opened);
@@ -1142,7 +1257,7 @@ int nd_start (struct plc_drv_unit *unit)
return 0;
}
-/* Arrêt de la machine d'état relative à un host */
+/* Arrêt de la machine d'état relative à un host */
int nd_stop (struct plc_drv_unit *unit)
{
//free the frame
@@ -1162,7 +1277,8 @@ void start_scanning (struct plc_drv_unit *unit, struct MlmeScanRequest *scan)
if (state == ND_IDLE)
{
nb_reports = 0;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "start scanning for %d ms\n", unit->nd.period);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "start scanning for %d ms\n",
+ unit->nd.period);
ndTmo = nd_create_timeout (unit);
state = ND_SCAN;
user_process = scan->sender;
@@ -1190,7 +1306,8 @@ void start_probing (struct plc_drv_unit *unit, struct MlmeProbeRequest *probe)
// check that state id ILDE
if (state == ND_IDLE)
{
- struct probe_request *request = (struct probe_request *) ze_frame->d_buf;
+ struct probe_request *request =
+ (struct probe_request *) ze_frame->d_buf;
RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd: start probing\n");
nb_reports = 0;
@@ -1201,12 +1318,11 @@ void start_probing (struct plc_drv_unit *unit, struct MlmeProbeRequest *probe)
request->head.mode = unit->mode;
request->head.bssid = unit->BSSID;
request->head.tei = unit->TEI;
-#ifdef CONFIG_PLC_PPC
- request->head.nid = unit->NID;
-#endif
// send several time the request with broadcast
- sent = mmdu_request (ze_frame, MA_SUBTYPE_PROBE_REQUEST, probe->tei, probe->bssid, probe->nb_sent);
+ sent =
+ mmdu_request (ze_frame, MA_SUBTYPE_PROBE_REQUEST, probe->tei,
+ probe->bssid, probe->nb_sent);
unit->stats.nd.tx_probe_request++;
if (sent > 0)
@@ -1215,7 +1331,8 @@ void start_probing (struct plc_drv_unit *unit, struct MlmeProbeRequest *probe)
ndTmo = nd_create_timeout (unit);
state = ND_PROBE;
user_process = probe->sender;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "nd: request sent. user_process=%d\n", user_process);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "nd: request sent. user_process=%d\n", user_process);
nd_request_timeout (ndTmo, &tx_timer, unit->nd.period);
status = ND_STATUS_SUCCESS;
}
@@ -1235,7 +1352,8 @@ void start_probing (struct plc_drv_unit *unit, struct MlmeProbeRequest *probe)
extern PROCESS plc_mm_l2r_;
sig = alloc (sizeof (union nd_signal), MLME_PROBE_CONFIRM);
ASSERT (sig);
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "probe error. send to %d (mm_lr2 is %d)\n", probe->sender,
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "probe error. send to %d (mm_lr2 is %d)\n", probe->sender,
plc_mm_l2r_);
/* send confirm to the process */
sig->nd_signal.MlmeProbeConfirm.status = status;
@@ -1258,10 +1376,12 @@ void start_assoc (struct plc_drv_unit *unit, struct MlmeAssocRequest *assoc)
// check that state id ILDE
else if (state == ND_IDLE)
{
- struct assoc_request *request = (struct assoc_request *) ze_frame->d_buf;
+ struct assoc_request *request =
+ (struct assoc_request *) ze_frame->d_buf;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "start association with MAC=%02x nb_sent = %d\n", assoc->mac_addr[5],
- assoc->nb_sent);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "start association with MAC=%02x nb_sent = %d\n",
+ assoc->mac_addr[5], assoc->nb_sent);
// first check that we are not already associated with this mac address
host = plcp_get_host_by_addr (assoc->mac_addr);
@@ -1297,7 +1417,10 @@ void start_assoc (struct plc_drv_unit *unit, struct MlmeAssocRequest *assoc)
// send the request with broadcast
unit->stats.nd.tx_assoc_request++;
- sent = mmdu_request (ze_frame, MA_SUBTYPE_ASSOC_REQUEST, TEI_ALL_CELL, BSSID_ALL_BSS, assoc->nb_sent);
+ sent =
+ mmdu_request (ze_frame, MA_SUBTYPE_ASSOC_REQUEST,
+ TEI_ALL_CELL, BSSID_ALL_BSS,
+ assoc->nb_sent);
RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "sent = %d\n", sent);
@@ -1307,9 +1430,10 @@ void start_assoc (struct plc_drv_unit *unit, struct MlmeAssocRequest *assoc)
ndTmo = nd_create_timeout (unit);
state = ND_ASSOC;
user_process = assoc->sender;
- // nd_request_timeout(ndTmo, &tx_timer, unit->nd.period);
+ // nd_request_timeout(ndTmo, &tx_timer, unit->nd.period);
nd_request_timeout (ndTmo, &tx_timer, 100);
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "timer started for %d ms\n", unit->nd.period);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "timer started for %d ms\n", unit->nd.period);
status = ND_STATUS_SUCCESS;
}
else
@@ -1344,7 +1468,8 @@ void start_assoc (struct plc_drv_unit *unit, struct MlmeAssocRequest *assoc)
}
/* start active scanning for a period */
-void start_disassoc (struct plc_drv_unit *unit, struct MlmeDisassocRequest *disassoc)
+void start_disassoc (struct plc_drv_unit *unit,
+ struct MlmeDisassocRequest *disassoc)
{
uint16_t status;
union SIGNAL *sig;
@@ -1354,12 +1479,15 @@ void start_disassoc (struct plc_drv_unit *unit, struct MlmeDisassocRequest *disa
// check that state id ILDE
if (state == ND_IDLE)
{
- struct disassoc_request *request = (struct disassoc_request *) ze_frame->d_buf;
+ struct disassoc_request *request =
+ (struct disassoc_request *) ze_frame->d_buf;
// check that the host exists
if (plcp_get_host_by_addr (disassoc->mac_addr))
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "start disassociation with %02x\n", disassoc->mac_addr[5]);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "start disassociation with %02x\n",
+ disassoc->mac_addr[5]);
// buid request header
memcpy (request->head.srcEthAddr.addr, &unit->mac_addr[0], 6);
@@ -1374,7 +1502,9 @@ void start_disassoc (struct plc_drv_unit *unit, struct MlmeDisassocRequest *disa
// send a response to the sender
unit->stats.nd.tx_disassoc_request++;
- sent = mmdu_request (ze_frame, MA_SUBTYPE_DISASSOC_REQUEST, TEI_ALL_CELL, BSSID_ALL_BSS, disassoc->nb_sent);
+ sent =
+ mmdu_request (ze_frame, MA_SUBTYPE_DISASSOC_REQUEST,
+ TEI_ALL_CELL, BSSID_ALL_BSS, disassoc->nb_sent);
if (sent > 0)
{
@@ -1415,10 +1545,10 @@ void start_disassoc (struct plc_drv_unit *unit, struct MlmeDisassocRequest *disa
/* start reassociation when tei or nid are changed */
void start_reassoc (struct plc_drv_unit *unit)
{
- union SIGNAL *sig;
struct NdTimeout *ndTmo;
- struct reassoc_request *request = (struct reassoc_request *) ze_frame->d_buf;
+ struct reassoc_request *request =
+ (struct reassoc_request *) ze_frame->d_buf;
memcpy (request->head.srcEthAddr.addr, &unit->mac_addr[0], 6);
memset (request->head.dstEthAddr.addr, 0xff, 6);
@@ -1429,15 +1559,377 @@ void start_reassoc (struct plc_drv_unit *unit)
// send reassociation request with broadcast
unit->stats.nd.tx_reassoc_request++;
- mmdu_request (ze_frame, MA_SUBTYPE_REASSOC_REQUEST, TEI_ALL_CELL, BSSID_ALL_BSS, 1);
+ mmdu_request (ze_frame, MA_SUBTYPE_REASSOC_REQUEST, TEI_ALL_CELL,
+ BSSID_ALL_BSS, 1);
}
#endif
+#ifdef PLC_RECOVERY
+void start_recovery (struct plc_drv_unit *unit,
+ struct MlmeRecoveryRequest *recovery)
+{
+ struct plcp_frame *pframe;
+ uint16_t status;
+ int host_status;
+ struct plcp_host *host;
+ int i, ret;
+ uint8_t nb_assoc_hosts; // Number of alredy associated hosts
+
+ // check that state id ILDE
+ if (recovery->nb_hosts > 0)
+ {
+ struct recovery_request *request;
+
+ pframe =
+ plcp_alloc_tx_frame (sizeof (struct recovery_request) +
+ (recovery->nb_hosts *
+ sizeof (struct tei_mac)));
+ if (pframe == NULL)
+ return;
+
+ request = (struct recovery_request *) pframe->d_buf;
+
+ nb_assoc_hosts = 0;
+
+ for (i = 0; i < recovery->nb_hosts; i++)
+ {
+ host = plcp_get_host_by_addr (&recovery->mac_addr[i].addr[0]);
+ /* Kreiranje novog hosta. */
+ if (host == NULL)
+ {
+ /* host really unknown, try to create one */
+ host = plcp_create_host (unit, recovery->mac_addr[i].addr);
+ if (host == NULL)
+ {
+ /* no struct host available */
+ unit->stats.nd.no_host_free++;
+ host_status = -1;
+ }
+ else
+ {
+ ASSERT (host);
+ host->BSSID = unit->BSSID;
+ // Restore old value for TEI.
+ memcpy (host->mac_addr, recovery->mac_addr[i].addr, 6);
+ host->TEI = get_ucast_tei (host);
+ host->localTEI = TEI_MASTER;
+ host->pollable = true;
+ host->in_recovery = 1;
+ host_status = 0;
+ }
+ }
+ else
+ {
+ host_status = 1;
+ }
+
+ if (host_status == -1)
+ {
+ status = ND_STATUS_MEMORY_FULL;
+ // free recovery request memory
+ plcp_free_tx_frame (pframe);
+ return;
+ }
+ else if (host_status == 1 && host->in_recovery == 0)
+ {
+ /* Host already exists! */
+ unit->stats.nd.host_already_exist++;
+ nb_assoc_hosts++;
+ }
+ else
+ {
+ memcpy (request->tei_mac[i - nb_assoc_hosts].mac_addr,
+ recovery->mac_addr[i].addr, 6);
+ request->tei_mac[i - nb_assoc_hosts].tei = host->TEI;
+
+ // now start channel estimation
+ ASSERT (host);
+ if (host_status == 0)
+ {
+ ce_start_host (unit, host);
+ nd_event_host_up (host);
+ }
+ else
+ {
+ ce_restart_host (unit, host);
+ }
+ }
+
+ // buid request header
+ memcpy (request->head.srcEthAddr.addr, &unit->mac_addr[0], 6);
+ memcpy (request->head.dstEthAddr.addr, broadcast_addr, 6);
+ request->nb_hosts = recovery->nb_hosts - nb_assoc_hosts;
+ request->head.mode = unit->mode;
+ request->head.bssid = unit->BSSID;
+ request->head.tei = unit->TEI;
+ request->SNID = unit->SNID;
+ }
+
+ // If there are hosts for recovery send a request to slaves
+ if (request->nb_hosts > 0)
+ {
+ memcpy (pframe->d_buf, request,
+ sizeof (struct recovery_request) +
+ (request->nb_hosts * sizeof (struct tei_mac)));
+ unit->stats.nd.tx_recovery_request++;
+ {
+ static SIGSELECT sigsel[] = { 1, MMDU_CONFIRM };
+ struct plcp_host *host;
+ union plcp_control *ctl;
+ union SIGNAL *sig;
+ DevErr err;
+
+ /* always use host 0 */
+ host = plcp_get_host_by_index (0);
+
+ /* fill frame payload (depends of step) */
+ pframe->d_len =
+ sizeof (struct recovery_request) +
+ (request->nb_hosts * sizeof (struct tei_mac));
+
+ /* fill pframe control */
+ ctl = pframe->control;
+ ctl->l_frm.STEI = TEI_ALL_CELL;
+ ctl->l_frm.bssid = unit->BSSID;
+ ctl->l_frm.DTEI = TEI_ALL_CELL;
+ ctl->l_frm.channel_id = (uint8_t) unit->nd.cid;
+ ctl->l_frm.subtype = MA_SUBTYPE_RECOVERY_REQUEST;
+ ctl->l_frm.type = MA_TYPE_MANAGEMENT;
+
+ pframe->host = host;
+ pframe->uchannel = plcp_get_uchannel_by_id (unit->nd.cid);
+ pframe->data_gain = default_ogain;
+ pframe->ctrl_gain = default_ogain;
+ pframe->priv = 0;
+
+ /* envoie prioritaire sur la donn�e (si queue full, tanpis), sans ack */
+ err = mm_write (unit, pframe);
+
+ if (err == DEVICE_EQUEUE_FULL)
+ {
+ unit->stats.nd.q_full++;
+ }
+ else
+ {
+ // wait until the frame has been sent
+ sig = receive (sigsel);
+
+ /* free signal */
+ free_buf (&sig);
+ }
+
+ }
+ }
+
+ // free recovery request memory
+ plcp_free_tx_frame (pframe);
+ }
+}
+
+
+void recovery_request (struct plc_drv_unit *unit,
+ struct recovery_request *request, int syncBand)
+{
+ struct plcp_frame *pframe;
+ struct plcp_host *host;
+ struct recovery_reply *reply;
+ uint16_t status;
+ int i, ret;
+ union SIGNAL *sig;
+
+ unit->stats.nd.rx_recovery_request++;
+
+ if (plcp_get_host_by_addr (request->head.srcEthAddr.addr) != NULL)
+ {
+ // Alredy associated!
+ return;
+ }
+
+ for (i = 0; i < request->nb_hosts; i++)
+ {
+ if (plcp_same_mac (request->tei_mac[i].mac_addr, unit->mac_addr))
+ {
+ if (!assoc_host)
+ {
+ // allocation the host without allocation of ressources, to have the tei
+ assoc_host = plcp_host_alloc ();
+ assoc_host->init = false;
+ }
+
+ if (assoc_host && assoc_host->init == false)
+ {
+ // host was already reserved
+ memcpy (assoc_addr, request->head.srcEthAddr.addr, 6);
+ ret = plcp_init_host (unit, assoc_host, assoc_addr);
+
+ if (ret == true)
+ {
+ // free the preallocated host
+ if (assoc_host->TEI != TEI_MASTER &&
+ unit->mode == repeater)
+ give_ucast_tei (assoc_host->TEI);
+ plcp_host_free (assoc_host);
+ break;
+ }
+ else
+ {
+ pframe =
+ plcp_alloc_tx_frame (sizeof (struct recovery_reply));
+ if (pframe == NULL)
+ return;
+
+ reply = (struct recovery_reply *) pframe->d_buf;
+
+ // get the new created host and change his TEI
+ host = plcp_get_host_by_addr (assoc_addr);
+
+ // Fill slave with right values.
+ host->BSSID = request->head.bssid;
+ ASSERT (request->head.tei == TEI_MASTER);
+ host->TEI = TEI_MASTER;
+ host->localTEI = request->tei_mac[i].tei;
+ host->pollable = false;
+ unit->TEI = request->tei_mac[i].tei;
+ unit->BSSID = host->BSSID;
+ unit->attachBSSID = host->BSSID;
+ unit->attachSNID = request->SNID;
+
+ // consider the syncBand is a good choice to start
+ host->syncBand = syncBand;
+
+ // now start channel estimation
+ ce_start_host (unit, host);
+ nd_event_host_up (host);
+
+ // Recovery process was successful, and we send response to the master.
+
+ // buid reply header
+ memcpy (reply->head.srcEthAddr.addr, &unit->mac_addr[0],
+ 6);
+ memcpy (reply->head.dstEthAddr.addr,
+ request->head.srcEthAddr.addr, 6);
+ reply->head.mode = unit->mode;
+ reply->head.tei = unit->TEI;
+ reply->head.bssid = unit->BSSID;
+
+ // send a response to the master
+ memcpy (pframe->d_buf, reply,
+ sizeof (struct recovery_reply));
+
+ unit->stats.nd.tx_recovery_reply++;
+
+ {
+ static SIGSELECT sigsel[] = { 1, MMDU_CONFIRM };
+ union plcp_control *ctl;
+ DevErr err;
+
+ /* fill frame payload (depends of step) */
+ pframe->d_len = sizeof (struct recovery_reply);
+
+ /* fill pframe control */
+ ctl = pframe->control;
+ ctl->l_frm.STEI = unit->TEI;
+ ctl->l_frm.bssid = unit->BSSID;
+ ctl->l_frm.DTEI = TEI_MASTER;
+ ctl->l_frm.channel_id = (uint8_t) unit->nd.cid;
+ ctl->l_frm.subtype = MA_SUBTYPE_RECOVERY_REPLY;
+ ctl->l_frm.type = MA_TYPE_MANAGEMENT;
+
+ pframe->host = host;
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (unit->nd.cid);
+ pframe->data_gain = default_ogain;
+ pframe->ctrl_gain = default_ogain;
+ pframe->priv = 0;
+
+ err = mm_write (unit, pframe);
+
+ if (err == DEVICE_EQUEUE_FULL)
+ {
+ unit->stats.nd.q_full++;
+ }
+ else
+ {
+ // wait until the frame has been sent
+ sig = receive (sigsel);
+
+ /* free signal */
+ free_buf (&sig);
+ }
+ }
+
+ /* send a confirm to the application */
+ if (user_process)
+ {
+ sig =
+ alloc (sizeof (struct MlmeAssocConfirm),
+ MLME_ASSOC_CONFIRM);
+ ASSERT (sig);
+ sig->nd_signal.MlmeAssocConfirm.status =
+ ND_STATUS_SUCCESS;
+ send (&sig, user_process);
+ }
+
+ // change status to IDLE
+ nd_goto_idle ();
+
+ // free recovery request memory
+ plcp_free_tx_frame (pframe);
+ }
+ break;
+ }
+ }
+ }
+}
+
+
+void recovery_reply (struct plc_drv_unit *unit, struct recovery_reply *reply,
+ int syncBand)
+{
+ struct plcp_host *host;
+
+ unit->stats.nd.rx_recovery_reply++;
+
+ host = plcp_get_host_by_addr (reply->head.srcEthAddr.addr);
+
+ if (host != NULL)
+ {
+ host->in_recovery = 0;
+ host->syncBand = syncBand;
+ host->syncBandAdv = syncBand;
+ }
+
+ // If 802.1x auhentication is turned on send auth message
+ // to the hostapd application for this slave.
+ if (unit->auth_8021x)
+ {
+ struct sk_buff *skb;
+ struct authentication_8021x auth;
+ uint16_t proto = htons (0x888e); // 0x888e = ETH_P_PAE
+
+ skb = alloc_skb (14 + SKB_RESERVE, GFP_ATOMIC);
+
+ memcpy (skb->data + 6, reply->head.srcEthAddr.addr, 6);
+ memcpy (skb->data, &unit->mac_addr[0], 6);
+ memcpy (skb->data + 12, &proto, sizeof (proto));
+ skb->len = 14;
+
+ /* SA MAC @ , DA , Type */
+ auth.unit = unit;
+ auth.host = host;
+ auth.skb = skb;
+
+ // Function drv_handle_rx(unit, host, skb, 0) will be called from linux context.
+ send_r2l_sig (PLC_HOST_AUTH, &auth);
+ }
+}
+#endif // PLC_RECOVERY
/* we receive information about one host during the scanning period */
void probe_reply (struct plc_drv_unit *unit, struct probe_reply *reply)
{
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive PROBE_REPLY from TEI=%02x\n", reply->head.tei);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive PROBE_REPLY from TEI=%02x\n", reply->head.tei);
unit->stats.nd.rx_probe_reply++;
if ((state == ND_PROBE) /* active scanning period */
&& (report_table_lookup (unit, reply->head.srcEthAddr.addr) == false) /* entry doesnt exist */
@@ -1450,19 +1942,22 @@ void probe_reply (struct plc_drv_unit *unit, struct probe_reply *reply)
report_table[nb_reports].TEI = reply->head.tei;
report_table[nb_reports].mode = reply->head.mode;
report_table[nb_reports].att = 0;
- memcpy (report_table[nb_reports].mac_addr, reply->head.srcEthAddr.addr, 6);
+ memcpy (report_table[nb_reports].mac_addr,
+ reply->head.srcEthAddr.addr, 6);
nb_reports++;
}
}
/* we received a beacon frame */
-void beacon_indicate (struct plc_drv_unit *unit, struct MlmeBeaconIndicate *sig)
+void beacon_indicate (struct plc_drv_unit *unit,
+ struct MlmeBeaconIndicate *sig)
{
struct beacon *bc;
bc = (struct beacon *) &sig->bc;
/* if we are an attached slave to this BSSID, remove the host if SID has changed */
- if (unit->mode == station && unit->attachBSSID == bc->bssid && unit->attachSNID != bc->snid)
+ if (unit->mode == station && unit->attachBSSID == bc->bssid &&
+ unit->attachSNID != bc->snid)
{
struct plcp_host *host;
@@ -1474,7 +1969,8 @@ void beacon_indicate (struct plc_drv_unit *unit, struct MlmeBeaconIndicate *sig)
if (state == ND_SCAN)
{
scan_snid = bc->snid;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "receive beacon frame from MAC %02x BSSID %d expect %d\n",
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "receive beacon frame from MAC %02x BSSID %d expect %d\n",
bc->mac_addr[5], bc->bssid, scan_bssid);
if ((report_table_lookup (unit, bc->mac_addr) == false) /* not found */
&& (nb_reports < ND_MAX_REPORTS) /* mem available */ )
@@ -1492,12 +1988,16 @@ void beacon_indicate (struct plc_drv_unit *unit, struct MlmeBeaconIndicate *sig)
union SIGNAL *sig;
struct NdTimeout *ndTmo;
- sig = alloc (sizeof (struct MlmeScanConfirm) + sizeof (struct report) * nb_reports, MLME_SCAN_CONFIRM);
+ sig =
+ alloc (sizeof (struct MlmeScanConfirm) +
+ sizeof (struct report) * nb_reports,
+ MLME_SCAN_CONFIRM);
ASSERT (sig);
/* send confirm to the process */
sig->nd_signal.MlmeScanConfirm.status = ND_STATUS_SUCCESS;
sig->nd_signal.MlmeScanConfirm.nb_reports = nb_reports;
- memcpy (sig->nd_signal.MlmeScanConfirm.info, report_table, sizeof (struct report) * nb_reports);
+ memcpy (sig->nd_signal.MlmeScanConfirm.info, report_table,
+ sizeof (struct report) * nb_reports);
send (&sig, user_process);
// return to ND_IDLE
nd_goto_idle ();
@@ -1511,8 +2011,9 @@ void beacon_indicate (struct plc_drv_unit *unit, struct MlmeBeaconIndicate *sig)
}
-/* la trame a bien été envoyée */
-void nd_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+/* la trame a bien été envoyée */
+void nd_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
union SIGNAL *sig;
struct MmduConfirm *cfn;
@@ -1529,8 +2030,9 @@ void nd_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plc
}
-/* une trame vient d'être recue */
-void nd_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+/* une trame vient d'être recue */
+void nd_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
union SIGNAL *sig;
@@ -1547,7 +2049,6 @@ void nd_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plc
send (&sig, network_discovery_);
}
-
/* get the band that was used for synchronization of the nd request frame */
inline int sync_band (int bands)
{
@@ -1593,6 +2094,7 @@ OS_PROCESS (network_discovery)
{
if (!print_flag)
print_flag++;
+
PPC_RT_PRINTK ("Network discovery has been stopped!\n");
sig = receive (sigsel);
@@ -1633,10 +2135,12 @@ OS_PROCESS (network_discovery)
probe_reply (unit, (struct probe_reply *) head);
break;
case MA_SUBTYPE_ASSOC_REQUEST:
- assoc_request (unit, (struct assoc_request *) head, sync_band (pframe->rx_bands));
+ assoc_request (unit, (struct assoc_request *) head,
+ sync_band (pframe->rx_bands));
break;
case MA_SUBTYPE_ASSOC_REPLY:
- assoc_reply (unit, (struct assoc_reply *) head, sync_band (pframe->rx_bands));
+ assoc_reply (unit, (struct assoc_reply *) head,
+ sync_band (pframe->rx_bands));
break;
case MA_SUBTYPE_DISASSOC_REQUEST:
disassoc_request (unit, (struct disassoc_request *) head);
@@ -1646,7 +2150,19 @@ OS_PROCESS (network_discovery)
break;
#ifdef CONFIG_PLC_PPC
case MA_SUBTYPE_REASSOC_REQUEST:
- reassoc_request (unit, (struct reassoc_request *) head, sync_band (pframe->rx_bands));
+ reassoc_request (unit, (struct reassoc_request *) head,
+ sync_band (pframe->rx_bands));
+ break;
+#endif
+#ifdef PLC_RECOVERY
+ case MA_SUBTYPE_RECOVERY_REQUEST:
+ recovery_request (unit, (struct recovery_request *) head,
+ sync_band (pframe->rx_bands));
+ break;
+
+ case MA_SUBTYPE_RECOVERY_REPLY:
+ recovery_reply (unit, (struct recovery_reply *) head,
+ sync_band (pframe->rx_bands));
break;
#endif
default:
@@ -1675,6 +2191,11 @@ OS_PROCESS (network_discovery)
start_disassoc (unit, &sig->nd_signal.MlmeDisassocRequest);
break;
+#ifdef PLC_RECOVERY
+ case MLME_RECOVERY_REQUEST:
+ start_recovery (unit, &sig->nd_signal.MlmeRecoveryRequest);
+ break;
+#endif
case MLME_BEACON_INDICATE:
beacon_indicate (unit, &sig->nd_signal.MlmeBeaconIndicate);
break;
@@ -1691,10 +2212,11 @@ OS_PROCESS (network_discovery)
default:
ASSERT (0);
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_ERROR, "nd sig unknown %d\n", sig->sigNo);
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_ERROR, "nd sig unknown %d\n",
+ sig->sigNo);
}
- /* libération du signal */
+ /* Free the signal */
restore (sig);
free_buf (&sig);
}
@@ -1728,7 +2250,8 @@ int mlme_scan (struct scan_req_t *scan_req, struct scan_cfn_t *scan_cfn)
// ioctl return status is mapped on nd_status
scan_cfn->status = sig->nd_signal.MlmeScanConfirm.status;
scan_cfn->nb_reports = nb_rep;
- memcpy (&scan_cfn->reports[0], &sig->nd_signal.MlmeScanConfirm.info[0], sizeof (struct report) * nb_rep);
+ memcpy (&scan_cfn->reports[0], &sig->nd_signal.MlmeScanConfirm.info[0],
+ sizeof (struct report) * nb_rep);
// free the signal
free_buf (&sig);
return 0;
@@ -1748,7 +2271,8 @@ int mlme_probe (struct probe_req_t *probe_req, struct probe_cfn_t *probe_cfn)
sig->nd_signal.MlmeProbeRequest.nb_sent = probe_req->nb_sent;
sig->nd_signal.MlmeProbeRequest.tei = probe_req->tei;
sig->nd_signal.MlmeProbeRequest.bssid = probe_req->bssid;
- RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG, "l2r send PROBE_REQUEST from %d to nd=%d\n",
+ RT_PRINTM (TRACE_NEIGHBOUR, TRACE_DEBUG,
+ "l2r send PROBE_REQUEST from %d to nd=%d\n",
sig->nd_signal.MlmeProbeRequest.sender, network_discovery_);
#ifdef CONFIG_PLC_DEBUG
ASSERT (network_discovery_ == network_discovery_saved);
@@ -1761,7 +2285,8 @@ int mlme_probe (struct probe_req_t *probe_req, struct probe_cfn_t *probe_cfn)
// ioctl return status is mapped on nd_status
probe_cfn->status = sig->nd_signal.MlmeProbeConfirm.status;
probe_cfn->nb_reports = nb_rep;
- memcpy (&probe_cfn->reports[0], &sig->nd_signal.MlmeProbeConfirm.info[0], sizeof (struct report) * nb_rep);
+ memcpy (&probe_cfn->reports[0], &sig->nd_signal.MlmeProbeConfirm.info[0],
+ sizeof (struct report) * nb_rep);
// free the signal
free_buf (&sig);
return 0;
@@ -1779,7 +2304,8 @@ int mlme_assoc (struct assoc_req_t *assoc_req, struct assoc_cfn_t *assoc_cfn)
ASSERT (sig);
sig->nd_signal.MlmeAssocRequest.sender = current_process ();
sig->nd_signal.MlmeAssocRequest.nb_sent = assoc_req->nb_sent;
- memcpy (sig->nd_signal.MlmeAssocRequest.mac_addr, assoc_req->mac_addr, 6);
+ memcpy (sig->nd_signal.MlmeAssocRequest.mac_addr, assoc_req->mac_addr,
+ 6);
#ifdef CONFIG_PLC_DEBUG
ASSERT (network_discovery_ == network_discovery_saved);
#endif
@@ -1797,7 +2323,8 @@ int mlme_assoc (struct assoc_req_t *assoc_req, struct assoc_cfn_t *assoc_cfn)
return 0;
}
-int mlme_disassoc (struct disassoc_req_t *disassoc_req, struct disassoc_cfn_t *disassoc_cfn)
+int mlme_disassoc (struct disassoc_req_t *disassoc_req,
+ struct disassoc_cfn_t *disassoc_cfn)
{
static SIGSELECT sigsel[] = { 1, MLME_DISASSOC_CONFIRM };
union SIGNAL *sig;
@@ -1807,7 +2334,8 @@ int mlme_disassoc (struct disassoc_req_t *disassoc_req, struct disassoc_cfn_t *d
ASSERT (sig);
sig->nd_signal.MlmeDisassocRequest.sender = current_process ();
sig->nd_signal.MlmeDisassocRequest.nb_sent = disassoc_req->nb_sent;
- memcpy (sig->nd_signal.MlmeDisassocRequest.mac_addr, disassoc_req->mac_addr, 6);
+ memcpy (sig->nd_signal.MlmeDisassocRequest.mac_addr,
+ disassoc_req->mac_addr, 6);
#ifdef CONFIG_PLC_DEBUG
ASSERT (network_discovery_ == network_discovery_saved);
#endif
@@ -1820,3 +2348,32 @@ int mlme_disassoc (struct disassoc_req_t *disassoc_req, struct disassoc_cfn_t *d
free_buf (&sig);
return 0;
}
+
+#ifdef PLC_RECOVERY
+int mlme_start_recovery (struct recovery_t *recovery_req)
+{
+ union SIGNAL *sig;
+ int i;
+
+ // request scanning to nd
+ sig = alloc (sizeof (struct MlmeRecoveryRequest), MLME_RECOVERY_REQUEST);
+ ASSERT (sig);
+
+ sig->nd_signal.MlmeRecoveryRequest.sender = current_process ();
+ sig->nd_signal.MlmeRecoveryRequest.nb_sent = recovery_req->nb_sent;
+ sig->nd_signal.MlmeRecoveryRequest.nb_hosts = recovery_req->nb_hosts;
+
+ for (i = 0; i < recovery_req->nb_hosts; i++)
+ {
+ memcpy (sig->nd_signal.MlmeRecoveryRequest.mac_addr[i].addr,
+ recovery_req->mac_addr[i], 6);
+ }
+
+#ifdef CONFIG_PLC_DEBUG
+ ASSERT (network_discovery_ == network_discovery_saved);
+#endif
+ send (&sig, network_discovery_);
+
+ return 0;
+}
+#endif
diff --git a/app/sm-plc-drv/src/mac_rx.c b/app/sm-plc-drv/src/mac_rx.c
index b7e6926b07..83d400813e 100644
--- a/app/sm-plc-drv/src/mac_rx.c
+++ b/app/sm-plc-drv/src/mac_rx.c
@@ -24,6 +24,7 @@
#include "plc_neighbour.h"
#include "plc_sms.h"
#include "plc_ber.h"
+#include "plc_mac.h"
#include "pb_list.h"
#include <linux/pci.h>
#include <linux/netdevice.h>
@@ -43,10 +44,12 @@ EXPORT_SYMBOL (RX_DEQUEUE_MM);
extern void wd_trigger (void);
+extern int is_broadcast_mac (uint8_t DA[6]);
int (*mac_handle_rx) (struct plc_drv_unit * unit, struct plcp_frame * pframe);
-void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
uint8_t subtype = pframe->control->l_frm.subtype;
@@ -54,7 +57,9 @@ void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct pl
if (subtype == MA_SUBTYPE_TEST_RAW)
{
- TEST_PRINTK ("MA_SUBTYPE_TEST_RAW") test_raw_handle_rx (unit, host, pframe, failed);
+ TEST_PRINTK ("MA_SUBTYPE_TEST_RAW") test_raw_handle_rx (unit, host,
+ pframe,
+ failed);
unit->stats.drv.handle_rx_test++;
}
#ifdef CONFIG_PLC_PPC
@@ -65,7 +70,9 @@ void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct pl
#endif
else if (subtype == MA_SUBTYPE_TEST_BER)
{
- TEST_PRINTK ("MA_SUBTYPE_TEST_BER") test_ber_handle_rx (unit, host, pframe, failed);
+ TEST_PRINTK ("MA_SUBTYPE_TEST_BER") test_ber_handle_rx (unit, host,
+ pframe,
+ failed);
unit->stats.drv.handle_rx_ber++;
}
else if (is_channel_estimation (subtype))
@@ -73,7 +80,16 @@ void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct pl
ce_handle_rx (unit, host, pframe, failed);
unit->stats.drv.handle_rx_channel++;
}
- else if (subtype >= MA_SUBTYPE_PROBE_REQUEST && subtype <= MA_SUBTYPE_DISASSOC_REPLY)
+ else if ((subtype >= MA_SUBTYPE_PROBE_REQUEST &&
+ subtype <= MA_SUBTYPE_DISASSOC_REPLY)
+#ifdef CONFIG_PLC_PPC
+ || subtype == SUBTYPE_REASSOC_REQUEST
+#endif
+#ifdef PLC_RECOVERY
+ || subtype == MA_SUBTYPE_RECOVERY_REQUEST
+ || subtype == MA_SUBTYPE_RECOVERY_REPLY
+#endif
+ )
{
nd_handle_rx (unit, host, pframe, failed);
unit->stats.drv.handle_rx_nd++;
@@ -88,7 +104,9 @@ void mng_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct pl
int rx_mcast_msdu = 0;
#endif
-inline void master_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *frame, struct sk_buff *skb)
+inline void master_intra_cell_rx (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct sk_buff *skb)
{
struct sk_buff *skb_copy;
@@ -110,8 +128,14 @@ inline void master_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *f
skb_put (skb_copy, skb->len);
/* the frame must be resent on the medium */
- if (mac_write (unit, skb_copy->data, (uint8_t *) (skb_copy->data), skb_copy->len,
- frame->subtype, FLAG_FORWARDED, MAC_PRIO_MSDU, frame->header->TEI, NULL) < 0)
+ if (mac_write
+ (unit, skb_copy->data, (uint8_t *) (skb_copy->data),
+ skb_copy->len, frame->subtype, FLAG_FORWARDED,
+ MAC_PRIO_MSDU, frame->header->TEI, skb_copy
+#ifdef CONFIG_PLC_PPC
+ , 0
+#endif
+ ) < 0)
{
dev_kfree_skb (skb_copy);
}
@@ -121,7 +145,8 @@ inline void master_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *f
}
else
{
- RT_PRINTM (TRACE_E2E, TRACE_DEBUG, "Repeater : Receving Mltcast frame\n");
+ RT_PRINTM (TRACE_E2E, TRACE_DEBUG,
+ "Repeater : Receving Mltcast frame\n");
}
/* and given to the repeater too if not from another's BSS (master) */
if (frame->host->BSSID == unit->BSSID)
@@ -139,28 +164,37 @@ inline void master_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *f
host = carp_lookup (skb->data);
if (host == NULL)
{ /* not found */
- RT_PRINTM (TRACE_E2E, TRACE_DEBUG, "Repeater : Receving unicast frame; No entry found in carp.\n");
+ RT_PRINTM (TRACE_E2E, TRACE_DEBUG,
+ "Repeater : Receving unicast frame; No entry found in carp.\n");
drv_handle_rx (unit, frame->host, skb, frame->failed);
}
else if (host == local_host)
{ /* DA is for us */
RT_PRINTM (TRACE_E2E, TRACE_DEBUG,
- "Repeater : Receving unicast frame; Entry in carp match repeater TEI %02x.\n", unit->TEI);
+ "Repeater : Receving unicast frame; Entry in carp match repeater TEI %02x.\n",
+ unit->TEI);
drv_handle_rx (unit, frame->host, skb, frame->failed);
}
else
{ /* found */
- RT_PRINTM (TRACE_E2E, TRACE_DEBUG, "Repeater : Receving & sending unicast frame to station tei=0x%x\n",
+ RT_PRINTM (TRACE_E2E, TRACE_DEBUG,
+ "Repeater : Receving & sending unicast frame to station tei=0x%x\n",
host->TEI);;
if (mac_write
- (unit, skb->data, (u8 *) skb->data, frame->d_len, frame->subtype, FLAG_FORWARDED, MAC_PRIO_MSDU,
- unit->TEI, NULL) < 0)
+ (unit, skb->data, (u8 *) skb->data, frame->d_len,
+ frame->subtype, FLAG_FORWARDED, MAC_PRIO_MSDU, unit->TEI,
+ skb
+#ifdef CONFIG_PLC_PPC
+ , 0
+#endif
+ ) < 0)
dev_kfree_skb (skb);
}
}
else
{
- RT_PRINTM (TRACE_E2E, TRACE_DEBUG, "Repeater : Receving unicast frame from End %02x To End %02x\n",
+ RT_PRINTM (TRACE_E2E, TRACE_DEBUG,
+ "Repeater : Receving unicast frame from End %02x To End %02x\n",
skb->data[11], skb->data[5]);
drv_handle_rx (unit, frame->host, skb, frame->failed);
}
@@ -168,7 +202,9 @@ inline void master_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *f
}
#ifdef CONFIG_PLC_VPORT
-inline void master_inter_cell_rx (struct plc_drv_unit *unit, struct mac_frame *frame, struct sk_buff *skb)
+inline void master_inter_cell_rx (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct sk_buff *skb)
{
struct plc_vport_unit *vport;
@@ -185,7 +221,8 @@ inline void master_inter_cell_rx (struct plc_drv_unit *unit, struct mac_frame *f
}
#endif /* CONFIG_PLC_VPORT */
-inline void slave_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *frame, struct sk_buff *skb)
+inline void slave_intra_cell_rx (struct plc_drv_unit *unit,
+ struct mac_frame *frame, struct sk_buff *skb)
{
struct plcp_host *rep_host;
@@ -202,15 +239,21 @@ inline void slave_intra_cell_rx (struct plc_drv_unit *unit, struct mac_frame *fr
else
{
RT_PRINTM (TRACE_VPORT, TRACE_DEBUG,
- "Station : recv INTRA CELL frame from repeater for %02x\n", skb->data[5]);
+ "Station : recv INTRA CELL frame from repeater for %02x\n",
+ skb->data[5]);
drv_handle_rx (unit, frame->host, skb, frame->failed);
}
}
}
/* handle a single msdu */
-void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bool sar_enable)
+void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame,
+ bool sar_enable)
{
+#ifdef CONFIG_PLC_PPC
+ struct ppc_Header _ppc_header;
+ struct ppc_Header *ppc_header = &_ppc_header;
+#endif
struct sk_buff *skb = NULL;
int res;
@@ -237,7 +280,16 @@ void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bo
if (sar_enable)
{
+#ifdef CONFIG_PLC_PPC
+ res =
+ pb_merge_data (skb->data, &frame->mac_pb_list, frame->d_len,
+ ppc_header);
+ frame->d_len -= sizeof (struct ppc_Header); /* ppc header */
+ /* frame->d_len is adjusted during the process of jigsawing arriving PB-s and also res == ppc_header.len */
+#else
res = pb_merge_data (skb->data, &frame->mac_pb_list, frame->d_len);
+#endif
+
if (res != frame->d_len)
{
unit->stats.pb.merge_failed++;
@@ -248,12 +300,31 @@ void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bo
/* insert the entry in the cache table */
if (frame->host)
{
- carp_insert (&skb->data[6], frame->host);
- carp_insert (&frame->host->mac_addr[0], frame->host);
+#ifndef CONFIG_PLC_PPC
+ if (carp_insert (&skb->data[6], frame->host) == false)
+ {
+ dev_kfree_skb (skb);
+ return;
+ }
+ if (carp_insert (&frame->host->mac_addr[0], frame->host) == false)
+ {
+ dev_kfree_skb (skb);
+ return;
+ }
+#else
+ if (!l2_ppc)
+ {
+ carp_insert (&skb->data[6], frame->host);
+ carp_insert (&frame->host->mac_addr[0], frame->host);
+ }
+#endif
}
}
else
{
+#ifdef CONFIG_PLC_PPC
+ ppc_header = &frame->header->ppc_header; // sar_enable = 0, ppc_header is part of frame header
+#endif
memcpy (skb->data, frame->d_buf, frame->d_len);
}
skb_put (skb, frame->d_len);
@@ -262,7 +333,50 @@ void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bo
switch (unit->mode)
{
case ad_hoc:
+#ifdef CONFIG_PLC_PPC
+ /* if there is the difference between TEIs we must redirect the frame if we a PPC_repeater
+ * if frame is sent in local broadcast we must not repeat it to next repeater station */
+ if (l2_ppc && (ppc_header->DTEI != TEI_ALL_CELL) &&
+ (unit->TEI != ppc_header->DTEI))
+ {
+ if (ppc_update_all_route && unit->PPC_repeater) // update on all station during the packet travell..
+ if (l2_ppc && l2_ppc->l2_carp_update)
+ l2_ppc->l2_carp_update (skb, &ppc_header->STEI);
+
+ if (unit->PPC_repeater)
+ {
+ PPC_PRINTK ("PKT_REP: DTEI=%d STEI=%d !!\n", ppc_header->DTEI,
+ ppc_header->STEI);
+ if (mac_write
+ (unit, skb->data, (uint8_t *) (skb->data), skb->len,
+ frame->subtype, FLAG_FORWARDED, MAC_PRIO_MSDU,
+ ppc_header->STEI, (void *) skb,
+ 0x8000 | ppc_header->DTEI) < 0)
+ dev_kfree_skb (skb);
+ }
+ else
+ {
+ PPC_PRINTK ("PKT_DRO: DTEI=%d STEI=%d !!\n", ppc_header->DTEI,
+ ppc_header->STEI);
+ dev_kfree_skb (skb);
+ }
+
+ /* release the memory and break, frame is not for us */
+ break;
+ }
+
+ /* call update only on last station where we receive data .. */
+ PPC_PRINTK ("PKT_PUT_STEI=%d !!\n", ppc_header->STEI);
+ if (l2_ppc && l2_ppc->l2_carp_update)
+ l2_ppc->l2_carp_update (skb, &ppc_header->STEI);
+
+#ifdef CONFIG_PLC_DEBUG
+ dump_skb (skb->data);
+#endif
/* recover host to handle correctly the frame */
+ PPC_PRINTK ("PKT_RCV: DTEI=%d STEI=%d LEN=%d\n", ppc_header->DTEI,
+ ppc_header->STEI, skb->len);
+#endif
drv_handle_rx (unit, frame->host, skb, frame->failed);
break;
@@ -280,7 +394,8 @@ void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bo
#endif // CONFIG_PLC_VPORT
else
{
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_poll: bad rx subtype %d\n", frame->subtype);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_poll: bad rx subtype %d\n", frame->subtype);
dev_kfree_skb (skb);
}
break;
@@ -292,7 +407,8 @@ void mac_handle_rx_frame (struct plc_drv_unit *unit, struct mac_frame *frame, bo
}
else
{
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_poll: bad rx subtype %d\n", frame->subtype);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_poll: bad rx subtype %d\n", frame->subtype);
dev_kfree_skb (skb);
}
break;
@@ -322,7 +438,8 @@ int mac_nosar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
RT_PRINTM (TRACE_MAC, TRACE_DEBUG,
"control: efr=%d, dlen=%d, channel_id=%d, slices=%d\n",
pframe->control->l_frm.efr, pframe->d_len,
- pframe->control->l_frm.channel_id, pframe->control->l_frm.slices);
+ pframe->control->l_frm.channel_id,
+ pframe->control->l_frm.slices);
if (pframe->d_len > 0)
{
@@ -420,8 +537,26 @@ int mac_nosar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (carp_needs_update (frame->d_buf))
{
/* insert the entry in the cache table */
- carp_insert (&frame->d_buf[6], frame->host);
- carp_insert (&frame->host->mac_addr[0], frame->host);
+#ifndef CONFIG_PLC_PPC
+ if (carp_insert (&frame->d_buf[6], frame->host) == false)
+ {
+ mac_free_rx_frame (frame);
+ return count;
+ }
+ if (carp_insert (&frame->host->mac_addr[0], frame->host) ==
+ false)
+ {
+ mac_free_rx_frame (frame);
+ return count;
+ }
+#endif
+#ifdef CONFIG_PLC_PPC
+ if (!l2_ppc)
+ {
+ carp_insert (&frame->d_buf[6], frame->host);
+ carp_insert (&frame->host->mac_addr[0], frame->host);
+ }
+#endif
}
}
if ((frame->d_len > 0) && (frame->d_len <= MAC_PAYLOAD_DSIZE))
@@ -436,8 +571,9 @@ int mac_nosar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "frame->dlen=%d, pframe->d_len=%d, remain_len=%d", frame->d_len,
- pframe->d_len, remaining_len);
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "frame->dlen=%d, pframe->d_len=%d, remain_len=%d",
+ frame->d_len, pframe->d_len, remaining_len);
unit->stats.mac.e_rx_bad_len++;
remaining_len = 0;
}
@@ -453,7 +589,8 @@ int mac_nosar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
"d_len=%d offset=%d rlen=%d hlen=%d\r\n",
p, ((uint32_t) p) % 4 ? "(NOT ALIGNED)" : "",
pframe, pframe->d_buf, pframe->d_len,
- ((uint8_t *) p) - ((uint8_t *) pframe->d_buf), remaining_len, header->len);
+ ((uint8_t *) p) - ((uint8_t *) pframe->d_buf),
+ remaining_len, header->len);
}
return count;
}
@@ -474,8 +611,10 @@ int mac_sar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
RT_PRINTM (TRACE_MAC, TRACE_DEBUG,
"control: efr=%d, dlen=%d, channel_id=%d, slices=%d\n",
pframe->control->l_frm.efr, pframe->d_len,
- pframe->control->l_frm.channel_id, pframe->control->l_frm.slices);
- PB_LOG (("mac_handle_rx() d_len = %d; pb_errors = %d", pframe->d_len, pframe->pb_errors));
+ pframe->control->l_frm.channel_id,
+ pframe->control->l_frm.slices);
+ PB_LOG (("mac_handle_rx() d_len = %d; pb_errors = %d", pframe->d_len,
+ pframe->pb_errors));
ctl = pframe->control;
p = pframe->d_buf;
@@ -501,9 +640,12 @@ int mac_sar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
/* Sanity check on PB */
- if ((pb->header.pb_count > MAX_PB_PER_FRAME) || (pb->header.pb_num > MAX_PB_PER_FRAME) ||
- (pb->header.pb_num > pb->header.pb_count) || (pb->header.pb_len > PB_DATA_SIZE) ||
- ((pb->header.pb_len != PB_DATA_SIZE) && ((pb->header.pb_num + 1) != pb->header.pb_count)))
+ if ((pb->header.pb_count > MAX_PB_PER_FRAME) ||
+ (pb->header.pb_num > MAX_PB_PER_FRAME) ||
+ (pb->header.pb_num > pb->header.pb_count) ||
+ (pb->header.pb_len > PB_DATA_SIZE) ||
+ ((pb->header.pb_len != PB_DATA_SIZE) &&
+ ((pb->header.pb_num + 1) != pb->header.pb_count)))
{
remaining_len -= PB_SIZE;
p += PB_SIZE;
@@ -572,8 +714,9 @@ int mac_sar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{
- RT_PRINTM (TRACE_PB, TRACE_ERROR, "frame->dlen=%d, pframe->d_len=%d, remain_len=%d", frame->d_len,
- pframe->d_len, remaining_len);
+ RT_PRINTM (TRACE_PB, TRACE_ERROR,
+ "frame->dlen=%d, pframe->d_len=%d, remain_len=%d",
+ frame->d_len, pframe->d_len, remaining_len);
unit->stats.mac.e_rx_bad_len++;
remaining_len = 0;
LOCK_SAVE (msr);
@@ -638,7 +781,9 @@ OS_PROCESS (rx_management_process)
LOCK_SAVE (msr);
while (!(list_empty (&plcp_rx_queue[PLCP_PRIO_MM])))
{
- pframe = list_entry (plcp_rx_queue[PLCP_PRIO_MM].next, struct plcp_frame, link);
+ pframe =
+ list_entry (plcp_rx_queue[PLCP_PRIO_MM].next,
+ struct plcp_frame, link);
list_del_init (&pframe->link);
RX_DEQUEUE_MM++;
@@ -657,8 +802,10 @@ OS_PROCESS (rx_management_process)
/* check if there are plcp frames into plcp_rx_queue */
-void mac_poll_pframe_queue (struct plc_drv_unit *unit, struct list_head *queue,
- void (*handler) (struct plc_drv_unit *, struct plcp_frame *))
+void mac_poll_pframe_queue (struct plc_drv_unit *unit,
+ struct list_head *queue,
+ void (*handler) (struct plc_drv_unit *,
+ struct plcp_frame *))
{
uint32_t msr;
struct plcp_frame *pframe;
@@ -711,7 +858,8 @@ void mac_handle_rx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
else
{
unit->stats.mac.rx_unknown++;
- rt_printk ("%s:%d Fatal erreur grave for pframe 0x%x\n", __FILE__, __LINE__);
+ rt_printk ("%s:%d Fatal erreur grave for pframe 0x%x\n", __FILE__,
+ __LINE__);
plcp_free_rx_frame (pframe);
}
//GPIO_WRITE(RX_END_IRQ,1);
diff --git a/app/sm-plc-drv/src/mac_rx_coord.c b/app/sm-plc-drv/src/mac_rx_coord.c
index 3b4cf7411d..637243728f 100644
--- a/app/sm-plc-drv/src/mac_rx_coord.c
+++ b/app/sm-plc-drv/src/mac_rx_coord.c
@@ -33,7 +33,6 @@
#include "plc_ppc.h"
#endif
-
/******************************************************************************
*
* DATAs
@@ -42,9 +41,11 @@
/* imported interface */
extern void phy_idle (struct plc_drv_unit *unit, uint16_t idle_date);
-extern bool phy_tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern bool phy_tx_ack_request (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern void phy_tx_cfack (uint8_t seqno, uint8_t data_ok);
-extern void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur);
+extern void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date,
+ uint32_t dur);
extern void phy_clear_nav (struct plc_drv_unit *unit, uint16_t this_date);
extern void phy_disable_nav (struct plc_drv_unit *unit, uint16_t time);
extern int cco_get_mode (void);
@@ -59,13 +60,25 @@ extern uint16_t medium_idle_date;
/* ack transmitted */
static volatile bool dcf_ack_sent;
static volatile bool dcf_ack_status;
+#ifdef CONFIG_PLC_RTSCTS
+static volatile bool dcf_cts_status;
+static bool wait_dcf_cts;
+static volatile bool dcf_cts_sent;
+static bool dcf_cts_received;
+#endif
static bool wait_dcf_ack;
struct plcp_frame *ack_frame;
+#ifdef CONFIG_PLC_RTSCTS
+struct plcp_frame *cts_frame;
+#endif
static struct plcp_frame *save_pframe = NULL;
static union plcp_control ack_tx_control __attribute__ ((aligned (32)));
static union plcp_control sack_tx_control __attribute__ ((aligned (32)));
+#ifdef CONFIG_PLC_RTSCTS
+static union plcp_control cts_tx_control __attribute__ ((aligned (32)));
+#endif
#ifdef DEBUG_SEQNO
@@ -83,7 +96,8 @@ struct mac_sample {
int mac_nb_samples = 0;
struct mac_sample mac_samples[MAC_MAX_SAMPLES];
-void mac_add_sample (int date, int direction, int error, union plcp_control *control)
+void mac_add_sample (int date, int direction, int error,
+ union plcp_control *control)
{
struct mac_sample *s;
@@ -98,7 +112,8 @@ void mac_add_sample (int date, int direction, int error, union plcp_control *con
}
}
-int proc_r_mac_samples (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_samples (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct mac_sample *sample;
static int n;
@@ -123,23 +138,32 @@ int proc_r_mac_samples (char *buf, char **start, off_t offset, int count, int *e
while ((n < mac_nb_samples) && (count > 132))
{
sample = &mac_samples[n];
- len = sprintf (p, "%d %s %s sub=%d STEI=%d DTEI=%d cid=%d seqno=%d slices=%d %s %s %s %s\n", n,
- // sample->date,
- sample->direction == MAC_SAMPLE_RX ? "RX" : "TX",
- sample->control.l_frm.type == MA_TYPE_CONTROL ? "CTL" :
- sample->control.l_frm.type == MA_TYPE_DATA ? "DATA" : "MM",
- sample->control.l_frm.subtype,
- sample->control.l_frm.STEI, sample->control.l_frm.DTEI, sample->control.l_frm.channel_id,
- // sample->control.l_frm.flags,
- // sample->control.l_frm.bssid,
- sample->control.l_frm.seqno,
- // sample->control.l_frm.efr,
- sample->control.l_frm.slices,
- sample->error == MAC_SAMPLE_OK ? "" :
- (sample->error == MAC_SAMPLE_DROP ? "*DROP*" : "*DESEQ*"),
- sample->control.l_frm.flags & MA_BIT_RETRY ? "RETRY" : "",
- sample->control.l_frm.flags & MA_BIT_DATA_OK ? "ACK" : "",
- sample->control.l_frm.flags & MA_BIT_CFACK ? "CFACK" : "");
+ len =
+ sprintf (p,
+ "%d %s %s sub=%d STEI=%d DTEI=%d cid=%d seqno=%d slices=%d %s %s %s %s\n",
+ n,
+ // sample->date,
+ sample->direction == MAC_SAMPLE_RX ? "RX" : "TX",
+ sample->control.l_frm.type == MA_TYPE_CONTROL ? "CTL" :
+ sample->control.l_frm.type ==
+ MA_TYPE_DATA ? "DATA" : "MM",
+ sample->control.l_frm.subtype,
+ sample->control.l_frm.STEI, sample->control.l_frm.DTEI,
+ sample->control.l_frm.channel_id,
+ // sample->control.l_frm.flags,
+ // sample->control.l_frm.bssid,
+ sample->control.l_frm.seqno,
+ // sample->control.l_frm.efr,
+ sample->control.l_frm.slices,
+ sample->error == MAC_SAMPLE_OK ? "" :
+ (sample->error ==
+ MAC_SAMPLE_DROP ? "*DROP*" : "*DESEQ*"),
+ sample->control.l_frm.
+ flags & MA_BIT_RETRY ? "RETRY" : "",
+ sample->control.l_frm.
+ flags & MA_BIT_DATA_OK ? "ACK" : "",
+ sample->control.l_frm.
+ flags & MA_BIT_CFACK ? "CFACK" : "");
p += len;
n++;
count -= len;
@@ -148,7 +172,10 @@ int proc_r_mac_samples (char *buf, char **start, off_t offset, int count, int *e
}
#endif /* DEBUG_SEQNO */
-
+#ifdef CONFIG_PLC_RTSCTS
+#define NOT_RTSCTS(P) (P->control->l_frm.type!=MA_TYPE_CONTROL && \
+ P->control->l_frm.subtype!=MA_SUBTYPE_CTS && P->control->l_frm.subtype!=MA_SUBTYPE_RTS)
+#endif
#define NOT_FOR_ME(P,U) ((P->control->l_frm.DTEI!=U->TEI || P->control->l_frm.bssid != U->BSSID) && \
(P->control->l_frm.DTEI!=U->localTEI || P->control->l_frm.bssid != U->attachBSSID))
@@ -186,8 +213,32 @@ static void make_ack (void)
ack_frame->uchannel = plcp_get_uchannel_by_id (PLCP_CID_NONE);
}
+#ifdef CONFIG_PLC_RTSCTS
+static void make_cts (void)
+{
+ cts_frame = plcp_alloc_tx_frame (0);
-static INLINE void mm_indication (struct plc_drv_unit *unit, struct plcp_host *host, int mm_type)
+ // normal ack frame format
+ cts_tx_control.l_frm.type = MA_TYPE_CONTROL;
+ cts_tx_control.l_frm.subtype = MA_SUBTYPE_CTS;
+ cts_tx_control.l_frm.flags = 0;
+ cts_tx_control.l_frm.channel_id = PLCP_CID_NONE;
+ cts_tx_control.l_frm.bssid = BSSID_ALL_BSS;
+
+ // init static parameters of the ack_frame structure
+ INIT_LIST_HEAD (&cts_frame->link);
+ INIT_LIST_HEAD (&cts_frame->mm);
+ INIT_LIST_HEAD (&cts_frame->mac_frames);
+ INIT_LIST_HEAD (&cts_frame->pb_list);
+
+ cts_frame->nb_retries = 0;
+ cts_frame->d_len = 0;
+ cts_frame->uchannel = plcp_get_uchannel_by_id (PLCP_CID_NONE);
+}
+#endif
+
+static INLINE void mm_indication (struct plc_drv_unit *unit,
+ struct plcp_host *host, int mm_type)
{
union mac_signal sig;
@@ -202,7 +253,8 @@ static INLINE void mm_indication (struct plc_drv_unit *unit, struct plcp_host *h
static void ack_transmitted (struct plc_drv_unit *unit, int signo)
{
/* rx_coordination has transmitted an ACK */
- mac_register_call (rx_coord_state, rx_coordination_, phy_transmitter_, signo, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, rx_coordination_, phy_transmitter_,
+ signo, MAC_STATUS_OK);
/* wait a confirm or a status indication */
switch (signo)
{
@@ -246,11 +298,15 @@ void phy_tx_ack_confirm (struct plc_drv_unit *unit, struct plcp_frame *pframe)
// no protection needed cause phy_tx is higher prio than phy_rx
if (mac_counter2 > 0 && (pframe != ack_frame))
{
- rt_printk ("phy_tx_ack_confirm: frame=%p, type=%d, sub=%d, len=%d, dbuf=%p\n", pframe,
- pframe->control->l_frm.type, pframe->control->l_frm.subtype, pframe->d_len, pframe->d_buf);
- rt_printk (" : ack=%p, type=%d, sub=%d, len=%d, dbuf=%p\n", ack_frame,
- ack_frame->control->l_frm.type, ack_frame->control->l_frm.subtype, ack_frame->d_len,
- ack_frame->d_buf);
+ rt_printk
+ ("phy_tx_ack_confirm: frame=%p, type=%d, sub=%d, len=%d, dbuf=%p\n",
+ pframe, pframe->control->l_frm.type,
+ pframe->control->l_frm.subtype, pframe->d_len, pframe->d_buf);
+ rt_printk
+ (" : ack=%p, type=%d, sub=%d, len=%d, dbuf=%p\n",
+ ack_frame, ack_frame->control->l_frm.type,
+ ack_frame->control->l_frm.subtype, ack_frame->d_len,
+ ack_frame->d_buf);
mac_counter2--;
}
if (rx_coord_state == RX_COORD_ACK)
@@ -265,8 +321,64 @@ void phy_tx_ack_confirm (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
}
+#ifdef CONFIG_PLC_RTSCTS
+static void cts_transmitted (struct plc_drv_unit *unit, int signo)
+{
+ /* rx_coordination has transmitted an CTS */
+ mac_register_call (rx_coord_state, rx_coordination_, phy_transmitter_,
+ signo, MAC_STATUS_OK);
+ /* wait a confirm or a status indication */
+ switch (signo)
+ {
+ case PHY_TX_STATUS_INDICATION:
+ csma_stats (unit->stats.access.tx_cts_err++);
+ break;
+ case PHY_TX_DATA_CONFIRM:
+ csma_stats (unit->stats.access.tx_cts_ok++);
+ /* nothing to add */
+ break;
+ }
+
+ /* goto idle state */
+ rx_coord_state = RX_COORD_IDLE;
+}
+
+/* cts has not been successfully transmitted */
+void phy_tx_cts_indication (struct plc_drv_unit *unit)
+{
+ // no protection needed cause phy_tx is higher prio than phy_rx
+ if (rx_coord_state == RX_COORD_CTS)
+ {
+ // note that wait_dcf_ack should be true
+ cts_transmitted (unit, PHY_TX_STATUS_INDICATION);
+ }
+ else
+ {
+ dcf_cts_status = PHY_TX_STATUS_INDICATION;
+ dcf_cts_sent = true;
+ }
+}
+
+/* cts has been successfully transmitted */
+void phy_tx_cts_confirm (struct plc_drv_unit *unit)
+{
+ // no protection needed cause phy_tx is higher prio than phy_rx
+ if (rx_coord_state == RX_COORD_CTS)
+ {
+ // note that wait_dcf_ack should be true
+ cts_transmitted (unit, PHY_TX_DATA_CONFIRM);
+ }
+ else
+ {
+ dcf_cts_status = PHY_TX_DATA_CONFIRM;
+ dcf_cts_sent = true;
+ }
+}
+#endif
+
/* check sequence number IF retry bit is set. THIS MUST BE LAST CONDITION FOR DROPING A FRAME */
-static INLINE bool is_valid_data_seqno (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static INLINE bool is_valid_data_seqno (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
struct mcast_stream *ms;
uint8_t seqno, tei, last_seqno;
@@ -309,7 +421,8 @@ static INLINE bool is_valid_data_seqno (struct plc_drv_unit *unit, struct plcp_f
}
/* check sequence number IF retry bit is set. THIS MUST BE LAST CONDITION FOR DROPING A FRAME */
-static INLINE bool is_valid_mng_seqno (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static INLINE bool is_valid_mng_seqno (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
struct mcast_stream *ms;
uint8_t seqno, tei, last_seqno;
@@ -335,7 +448,8 @@ static INLINE bool is_valid_mng_seqno (struct plc_drv_unit *unit, struct plcp_fr
}
/* store current sequence number depending on the source stream of the source STA.*/
-static INLINE void set_last_data_seqno (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static INLINE void set_last_data_seqno (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
struct mcast_stream *ms;
uint8_t seqno, tei;
@@ -369,7 +483,8 @@ static INLINE void set_last_data_seqno (struct plc_drv_unit *unit, struct plcp_f
}
/* store current sequence number depending on the source stream of the source STA.*/
-static INLINE void set_last_mng_seqno (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static INLINE void set_last_mng_seqno (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
uint8_t seqno, tei;
@@ -384,14 +499,16 @@ static INLINE void set_last_mng_seqno (struct plc_drv_unit *unit, struct plcp_fr
/* send a DCF acknowledge in these function immediately, checking first if we need to send an ACK, a SACK or a NACK */
/* ASSERT pframe->host exists */
-static bool send_dcf_ack (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static bool send_dcf_ack (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
struct plcp_host *host = pframe->host;
uint8_t data_seq;
int i, j;
csma_stats (unit->stats.access.tx_ctrl++);
- mac_register_call (rx_coord_state, phy_transmitter_, rx_coordination_, PHY_TX_DATA_REQUEST, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, phy_transmitter_, rx_coordination_,
+ PHY_TX_DATA_REQUEST, MAC_STATUS_OK);
// set default_gain here and not in make_ack cause it may be changed
ack_frame->data_gain = unit->ce.data_gain;
@@ -401,9 +518,11 @@ static bool send_dcf_ack (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if ((unit->sar.use_sack && pframe->sar_enable)
&& (pframe->pb_errors > 0)
&& (pframe->pb_errors < pframe->pb_count)
- && (pframe->pb_errors <= S_FRM_RESERVED) && (pframe->control->l_frm.type == MA_TYPE_DATA))
+ && (pframe->pb_errors <= S_FRM_RESERVED) &&
+ (pframe->control->l_frm.type == MA_TYPE_DATA))
{
- PB_LOGX (("send_dcf_ack : sending SACK for %d errors", pframe->pb_errors));
+ PB_LOGX (("send_dcf_ack : sending SACK for %d errors",
+ pframe->pb_errors));
csma_stats (unit->stats.access.tx_sack++);
pframe->host->pb_tx_sack++;
// send a SACK using the short frame format. ff value is thus 0
@@ -413,12 +532,14 @@ static bool send_dcf_ack (struct plc_drv_unit *unit, struct plcp_frame *pframe)
// copy the pb errors position into the res field
memset (ack_frame->control->s_frm.res, 255, S_FRM_RESERVED);
- for (i = 0, j = 0; (i < pframe->control->l_frm.slices) && (j < S_FRM_RESERVED); i++)
+ for (i = 0, j = 0;
+ (i < pframe->control->l_frm.slices) && (j < S_FRM_RESERVED); i++)
{
if (!PB_ISSET (i, &pframe->pb_mask))
{
ack_frame->control->s_frm.res[j] = i;
- PB_LOG (("send_dcf_ack :\t%d : Slices %d received false", j, i));
+ PB_LOG (("send_dcf_ack :\t%d : Slices %d received false", j,
+ i));
j++;
}
}
@@ -467,15 +588,54 @@ static bool send_dcf_ack (struct plc_drv_unit *unit, struct plcp_frame *pframe)
return phy_tx_ack_request (unit, ack_frame);
}
+#ifdef CONFIG_PLC_RTSCTS
+/* send a DCF acknowledge in these function immediately, checking first if we need to send an ACK, a SACK or a NACK */
+/* ASSERT pframe->host exists */
+static bool send_dcf_cts (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
+{
+ struct plcp_host *host = pframe->host;
+
+ csma_stats (unit->stats.access.tx_ctrl++);
+ mac_register_call (rx_coord_state, phy_transmitter_, rx_coordination_,
+ PHY_TX_DATA_REQUEST, MAC_STATUS_OK);
+
+ // set default_gain here and not in make_ack cause it may be changed
+ cts_frame->data_gain = unit->ce.data_gain;
+ cts_frame->ctrl_gain = default_ogain;
+
+ cts_frame->control = &cts_tx_control;
+
+ // statistics
+ if (pframe->control->l_frm.DTEI == unit->TEI)
+ csma_stats (unit->stats.access.tx_cts++);
+
+ /* use long frame format for CTS */
+ PB_LOG (("Sending CTS"));
+
+ cts_tx_control.l_frm.bssid = pframe->control->l_frm.bssid;
+ cts_tx_control.l_frm.STEI = pframe->control->l_frm.DTEI;
+ cts_tx_control.l_frm.DTEI = pframe->control->l_frm.STEI;
+ cts_tx_control.l_frm.res[0] = pframe->control->l_frm.res[0];
+
+ /* cts is sent immediately after rx_end */
+ GPIO_PULSE (GPIO_EVENT_TX_CTS);
+ return phy_tx_ack_request (unit, cts_frame);
+}
+#endif
+
/* indicate to phy_transmitter thant the next time we call
* phy_tx_data_request, with should add a CF_ACK flag. send_pcf_ack should
* be called before idle reachs backoff procedure, cause the data frame can
* be sent before the reception of the frame is completed */
-static void send_pcf_ack (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void send_pcf_ack (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
- phy_tx_cfack (get_data_seqno (pframe->control->l_frm.seqno), (pframe->pb_errors > 0) ? 0 : 1);
+ phy_tx_cfack (get_data_seqno (pframe->control->l_frm.seqno),
+ (pframe->pb_errors > 0) ? 0 : 1);
PB_LOG (("Sending PCF %s", (pframe->pb_errors > 0) ? "NACK" : "ACK"));
- mac_register_call (rx_coord_state, phy_transmitter_, rx_coordination_, TX_CFACK, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, phy_transmitter_, rx_coordination_,
+ TX_CFACK, MAC_STATUS_OK);
}
@@ -495,7 +655,8 @@ void mac_rx_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->drop = 0;
}
#ifdef CONFIG_PLC_PPC
- else if (pframe->control->ff == PPC_PROTO || pframe->control->l_frm.subtype == MA_SUBTYPE_PEPSI)
+ else if (pframe->control->ff == PPC_PROTO ||
+ pframe->control->l_frm.subtype == MA_SUBTYPE_PEPSI)
{
pframe->drop = 0;
}
@@ -503,8 +664,13 @@ void mac_rx_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
else if (TO_ONE_POINT (pframe))
{ /* unicast frame */
/* drop if not for the station */
+#ifdef CONFIG_PLC_RTSCTS
+ if (NOT_FOR_ME (pframe, unit) && NOT_RTSCTS (pframe))
+ {
+#else
if (NOT_FOR_ME (pframe, unit))
{
+#endif
csma_stats (unit->stats.access.rx_ctrl_other++);
pframe->drop = 1;
}
@@ -523,7 +689,6 @@ void mac_rx_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->drop = 1;
}
-#ifdef EXTRA_STATS
if (pframe->for_me || TO_MULTI_POINT (pframe))
{
if (pframe->drop)
@@ -531,19 +696,51 @@ void mac_rx_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
else
stats_subtype[pframe->control->l_frm.subtype].valid++;
}
-#endif
/* check destination address only for long frame format */
if (!pframe->drop)
{
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX, MAC_SAMPLE_OK, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX, MAC_SAMPLE_OK,
+ pframe->control);
switch (pframe->control->l_frm.subtype)
{
case MA_SUBTYPE_ACK:
case MA_SUBTYPE_NACK:
case MA_SUBTYPE_SACK:
break;
+#ifdef CONFIG_PLC_RTSCTS
+ case MA_SUBTYPE_RTS:
+// set NAV timer for all receiving stations
+ if (TO_ONE_POINT (pframe))
+ {
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "RxCoord: mac_rx_control setting NAV timer to %d slots [RTS DTEI=%d]\n",
+ pframe->control->l_frm.res[0],
+ pframe->control->l_frm.DTEI);
+// GPIO_WRITE(GPIO_EVENT_RX_RTS,1);
+ phy_set_nav (unit, plcp_get_timer (unit),
+ 36 * pframe->control->l_frm.res[0] +
+ unit->nav_offset);
+// GPIO_WRITE(GPIO_EVENT_RX_RTS,0);
+ }
+ break;
+ case MA_SUBTYPE_CTS:
+// GPIO_WRITE(GPIO_EVENT_RX_CTS,1);
+// set NAV timer for stations where pframe(DTEI)!=unit(STEI)
+ if (TO_ONE_POINT (pframe) && NOT_FOR_ME (pframe, unit))
+ {
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "RxCoord: mac_rx_control setting NAV timer to %d slots [CTS DTEI=%d]\n",
+ pframe->control->l_frm.res[0],
+ pframe->control->l_frm.DTEI);
+ phy_set_nav (unit, plcp_get_timer (unit),
+ 36 * pframe->control->l_frm.res[0] +
+ unit->nav_offset);
+ }
+// GPIO_WRITE(GPIO_EVENT_RX_CTS,0);
+ break;
+#endif
case MA_SUBTYPE_BEACON:
csma_stats (unit->stats.access.rx_beacon++);
@@ -564,11 +761,15 @@ void mac_rx_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
phy_set_nav (unit, plcp_get_timer (unit), bc->cfp_dur);
}
- if (crc16 (pframe->d_buf, sizeof (struct beacon) - 2) == bc->cksum16)
+ if (crc16 (pframe->d_buf, sizeof (struct beacon) - 2) ==
+ bc->cksum16)
{
/* copy beacon information and send a signal to network_coordination */
- sig = alloc (sizeof (struct MlmeBeaconIndicate), MLME_BEACON_INDICATE);
- memcpy (&sig->nd_signal.MlmeBeaconIndicate.bc, bc, sizeof (struct beacon));
+ sig =
+ alloc (sizeof (struct MlmeBeaconIndicate),
+ MLME_BEACON_INDICATE);
+ memcpy (&sig->nd_signal.MlmeBeaconIndicate.bc, bc,
+ sizeof (struct beacon));
/* send this signal conditionnaly, cause the rx_coordination cannot be blocked */
if (sendif (&sig, network_discovery_))
{
@@ -615,7 +816,8 @@ void rx_something (struct plc_drv_unit *unit, struct plcp_host *temp)
temp->poll_empty = 0;
temp->poll_empty--;
// number of consecutive rx_data
- if ((-temp->poll_empty >= unit->mac.config.poll_thr_something) && (temp->poll_inter > 1))
+ if ((-temp->poll_empty >= unit->mac.config.poll_thr_something) &&
+ (temp->poll_inter > 1))
{
// poll more often
decrease_poll_inter (temp);
@@ -631,7 +833,8 @@ void rx_nothing (struct plc_drv_unit *unit, struct plcp_host *temp)
temp->poll_empty = 0;
temp->poll_empty++;
// number of consecutive rx_null
- if ((temp->poll_empty >= unit->mac.config.poll_thr_nothing) && (temp->poll_inter < INTER_MAX))
+ if ((temp->poll_empty >= unit->mac.config.poll_thr_nothing) &&
+ (temp->poll_inter < INTER_MAX))
{
// poll less often
increase_poll_inter (temp);
@@ -681,7 +884,8 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{
if (pframe->fake_rx_end)
{
- csma_stats (unit->stats.access.rx_unicast_no_dstart++);
+ csma_stats (unit->stats.access.
+ rx_unicast_no_dstart++);
if (pframe->host)
pframe->host->stats.lost_dstart++;
}
@@ -702,12 +906,14 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{
- if (pframe->pb_errors > S_FRM_RESERVED || pframe->fake_rx_end ||
+ if (pframe->pb_errors > S_FRM_RESERVED ||
+ pframe->fake_rx_end ||
(pframe->pb_errors >= pframe->control->l_frm.slices))
{
if (pframe->fake_rx_end)
{
- csma_stats (unit->stats.access.rx_unicast_no_dstart++);
+ csma_stats (unit->stats.access.
+ rx_unicast_no_dstart++);
if (pframe->host)
pframe->host->stats.lost_dstart++;
}
@@ -743,7 +949,8 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{ /* multicast or broadcast */
/* see if frame is for our network */
if ((pframe->control->l_frm.bssid == unit->BSSID)
- || (pframe->control->l_frm.bssid == unit->attachBSSID) || (pframe->control->l_frm.bssid == BSSID_ALL_BSS))
+ || (pframe->control->l_frm.bssid == unit->attachBSSID) ||
+ (pframe->control->l_frm.bssid == BSSID_ALL_BSS))
{
#ifdef CONFIG_PLC_MCAST
ms = get_multicast_stream (pframe->control->l_frm.DTEI);
@@ -755,9 +962,11 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (pframe->pb_errors > 0)
{ // no retransmit sar for multicast
if (pframe->fake_rx_end)
- csma_stats (unit->stats.access.rx_multicast_no_dstart++);
+ csma_stats (unit->stats.access.
+ rx_multicast_no_dstart++);
else
- csma_stats (unit->stats.access.rx_multicast_bad++);
+ csma_stats (unit->stats.access.
+ rx_multicast_bad++);
pframe->drop = 1;
}
else
@@ -779,7 +988,8 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (pframe->pb_errors > 0)
{
if (pframe->fake_rx_end)
- csma_stats (unit->stats.access.rx_broadcast_no_dstart++);
+ csma_stats (unit->stats.access.
+ rx_broadcast_no_dstart++);
else
csma_stats (unit->stats.access.rx_broadcast_bad++);
pframe->drop = 1;
@@ -805,7 +1015,8 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* check sequence number and drop if necessary, if addressed to us */
if ((!pframe->drop) // multicast and broadcast are also checked if STEI is known
- && (pframe->control->l_frm.subtype != MA_SUBTYPE_NULL) && (is_valid_data_seqno (unit, pframe) == false))
+ && (pframe->control->l_frm.subtype != MA_SUBTYPE_NULL) &&
+ (is_valid_data_seqno (unit, pframe) == false))
{
pframe->drop = 1;
if (is_unicast_tei (pframe->control->l_frm.DTEI))
@@ -814,22 +1025,27 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
csma_stats (unit->stats.access.rx_multicast_deseq++);
else
csma_stats (unit->stats.access.rx_broadcast_deseq++);
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX, MAC_SAMPLE_DESEQ, pframe->control);
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX,
+ MAC_SAMPLE_DESEQ, pframe->control);
}
else
{
if (pframe->control->l_frm.subtype == MA_SUBTYPE_NULL)
{
- if ((pframe->control->l_frm.flags & (MA_BIT_DATA_OK | MA_BIT_CFACK)) == MA_BIT_CFACK)
+ if ((pframe->control->l_frm.
+ flags & (MA_BIT_DATA_OK | MA_BIT_CFACK)) == MA_BIT_CFACK)
{
/* log only if negative ACK */
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX, pframe->drop ? MAC_SAMPLE_DROP : MAC_SAMPLE_OK,
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX,
+ pframe->
+ drop ? MAC_SAMPLE_DROP : MAC_SAMPLE_OK,
pframe->control);
}
}
else
{
- mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX, pframe->drop ? MAC_SAMPLE_DROP : MAC_SAMPLE_OK,
+ mac_add_sample (plcp_get_timer (unit), MAC_SAMPLE_RX,
+ pframe->drop ? MAC_SAMPLE_DROP : MAC_SAMPLE_OK,
pframe->control);
}
}
@@ -851,7 +1067,9 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{
csma_stats (unit->stats.access.rx_null++);
/* null frame received are designed with status_ignored */
- mac_register_call (rx_coord_state, phy_receiver_, rx_coordination_, MPDU_INDICATE, MAC_STATUS_IGNORED);
+ mac_register_call (rx_coord_state, phy_receiver_,
+ rx_coordination_, MPDU_INDICATE,
+ MAC_STATUS_IGNORED);
plcp_free_rx_frame (pframe);
}
else
@@ -867,7 +1085,9 @@ void mac_rx_data (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->host->rx_date = t;
}
#endif
- mac_register_call (rx_coord_state, phy_receiver_, rx_coordination_, MPDU_INDICATE, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, phy_receiver_,
+ rx_coordination_, MPDU_INDICATE,
+ MAC_STATUS_OK);
PB_LOG (("mac_handle_pframe"));
mac_handle_rx_end (unit, pframe);
}
@@ -904,7 +1124,8 @@ void mac_rx_management (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{ /* multicast or broadcast */
/* see broadcast type */
if ((pframe->control->l_frm.bssid == unit->BSSID)
- || (pframe->control->l_frm.bssid == unit->attachBSSID) || (pframe->control->l_frm.bssid == BSSID_ALL_BSS))
+ || (pframe->control->l_frm.bssid == unit->attachBSSID) ||
+ (pframe->control->l_frm.bssid == BSSID_ALL_BSS))
pframe->drop = 0;
else
pframe->drop = 1;
@@ -925,7 +1146,8 @@ void mac_rx_management (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
/* check sequence number and drop if necessary, if addressed to us */
- if (pframe->for_me && !pframe->drop && (is_valid_mng_seqno (unit, pframe) == false))
+ if (pframe->for_me && !pframe->drop &&
+ (is_valid_mng_seqno (unit, pframe) == false))
{
pframe->drop = 1;
csma_stats (unit->stats.access.rx_mng_deseq++);
@@ -943,7 +1165,6 @@ void mac_rx_management (struct plc_drv_unit *unit, struct plcp_frame *pframe)
ce_rx_data_isr (unit, pframe->host, pframe);
}
-#ifdef EXTRA_STATS
if (pframe->for_me || TO_MULTI_POINT (pframe))
{
if (pframe->drop)
@@ -951,7 +1172,6 @@ void mac_rx_management (struct plc_drv_unit *unit, struct plcp_frame *pframe)
else
stats_subtype[pframe->control->l_frm.subtype].valid++;
}
-#endif
/* handle data if not dropped */
if (!pframe->drop)
{
@@ -965,7 +1185,8 @@ void mac_rx_management (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pframe->host->rx_date = get_ticks ();
#endif
}
- mac_register_call (rx_coord_state, phy_receiver_, rx_coordination_, MPDU_INDICATE, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, phy_receiver_, rx_coordination_,
+ MPDU_INDICATE, MAC_STATUS_OK);
/* give mmdu to upper layer */
mac_handle_rx_end (unit, pframe);
}
@@ -980,6 +1201,10 @@ void rx_coordination_init (void)
{
/* build the ack frame at startup */
make_ack ();
+#ifdef CONFIG_PLC_RTSCTS
+ /* build the CTS frame at startup */
+ make_cts ();
+#endif
}
@@ -988,15 +1213,20 @@ void rx_coordination_init (void)
* possible uppon rx_end interrupt. Get the host sender too.
*/
-void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+void rx_start_indication (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
/* ack received */
union mac_signal sig;
uint8_t rxack_done = false;
+#ifdef CONFIG_PLC_RTSCTS
+ uint8_t rxcts_done = false;
+#endif
uint8_t rxack_status = 0;
int band, mask;
- mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_, PHY_RX_START_INDICATION, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_,
+ PHY_RX_START_INDICATION, MAC_STATUS_OK);
// filter SACK first cause the frame format is different
if (pframe->control->ff == 0)
@@ -1016,8 +1246,13 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (TO_ONE_POINT (pframe))
{ /* unicast frame */
/* drop if not for the station */
+#ifdef CONFIG_PLC_RTSCTS
+ if (NOT_FOR_ME (pframe, unit) && NOT_RTSCTS (pframe))
+ {
+#else
if (NOT_FOR_ME (pframe, unit))
{
+#endif
pframe->for_me = 0;
}
else
@@ -1049,7 +1284,9 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* Note for TT. pmd_set_agc_goal is set in plcp_fmode.c, during spy_rx_start function */
/* WARNING!!! host can be NULL if link not established */
- pframe->host = plcp_get_host_by_tei (pframe->control->l_frm.STEI, pframe->control->l_frm.bssid);
+ pframe->host =
+ plcp_get_host_by_tei (pframe->control->l_frm.STEI,
+ pframe->control->l_frm.bssid);
#ifdef CONFIG_PLC_MEASURES
// statistics per host concerning synchronisation
@@ -1071,9 +1308,11 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
// moyenne mobile sur toutes les bandes
pframe->host->minCorr[band] =
- (pframe->host->minCorr[band] * 99 + unit->stats.plcp.min_corr[band]) / 100;
+ (pframe->host->minCorr[band] * 99 +
+ unit->stats.plcp.min_corr[band]) / 100;
pframe->host->maxCorr[band] =
- (pframe->host->maxCorr[band] * 99 + unit->stats.plcp.max_corr[band]) / 100;
+ (pframe->host->maxCorr[band] * 99 +
+ unit->stats.plcp.max_corr[band]) / 100;
}
}
#endif
@@ -1087,13 +1326,15 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
// intra-cell polling :send POLLED to tx_coordination process
csma_stats (unit->stats.access.rx_cfpoll++);
sig.sigNo = POLLED;
- sig.Polled.seqno = (short) get_data_seqno (pframe->control->l_frm.seqno);
+ sig.Polled.seqno =
+ (short) get_data_seqno (pframe->control->l_frm.seqno);
sig_send (&sig);
}
#ifdef CONFIG_PLC_VPORT
// handle token messages
- if ((pframe->control->l_frm.type == MA_TYPE_DATA) && (pframe->control->l_frm.flags & MA_BIT_TOKEN))
+ if ((pframe->control->l_frm.type == MA_TYPE_DATA) &&
+ (pframe->control->l_frm.flags & MA_BIT_TOKEN))
{
if (pframe->for_me && pframe->host)
{
@@ -1104,7 +1345,8 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
else
{ // protect yield blocking virtual carrier sense
- phy_set_nav (unit, plcp_get_timer (unit), MAC_CSMA_TOKEN_TIMEOUT);
+ phy_set_nav (unit, plcp_get_timer (unit),
+ MAC_CSMA_TOKEN_TIMEOUT);
}
}
#endif
@@ -1128,6 +1370,15 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{
switch (pframe->control->l_frm.subtype)
{
+#ifdef CONFIG_PLC_RTSCTS
+ case MA_SUBTYPE_CTS:
+ csma_stats (unit->stats.access.rx_cts++);
+ PB_LOG (("mac_rx control : CTS"));
+ GPIO_PULSE (GPIO_EVENT_RX_CTS);
+ rxcts_done = true;
+ break;
+
+#endif
case MA_SUBTYPE_ACK:
/* trame en cours de transmission */
csma_stats (unit->stats.access.rx_ack++);
@@ -1159,7 +1410,9 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* send RX_ACK to tx_coordination process */
rxack_done = true;
/* a cfack is postive or negative, but cannot be a selective one */
- rxack_status = (pframe->control->l_frm.flags & MA_BIT_DATA_OK) ? POSITIVE_ACK : NEGATIVE_ACK;
+ rxack_status =
+ (pframe->control->l_frm.
+ flags & MA_BIT_DATA_OK) ? POSITIVE_ACK : NEGATIVE_ACK;
csma_stats (unit->stats.access.rx_cfack++);
break;
}
@@ -1170,7 +1423,9 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* send RX_ACK to tx_coordination process */
rxack_done = true;
/* a cfack is postive or negative, but cannot be a selective one */
- rxack_status = (pframe->control->l_frm.flags & MA_BIT_DATA_OK) ? POSITIVE_ACK : NEGATIVE_ACK;
+ rxack_status =
+ (pframe->control->l_frm.
+ flags & MA_BIT_DATA_OK) ? POSITIVE_ACK : NEGATIVE_ACK;
csma_stats (unit->stats.access.rx_cfack++);
}
@@ -1180,13 +1435,31 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* send RX_ACK to tx_coordination process */
PB_LOG (("warn_tx_coordination: RX_ACK sent"));
sig.sigNo = RX_ACK;
- sig.RxAck.seqno = (char) get_ack_seqno (pframe->control->l_frm.seqno);
+ sig.RxAck.seqno =
+ (char) get_ack_seqno (pframe->control->l_frm.seqno);
sig.RxAck.status = rxack_status;
// copy the pbs positions into the signal (only ok for SACK)
- memcpy (sig.RxAck.pb_pos, pframe->control->s_frm.res, S_FRM_RESERVED);
+ memcpy (sig.RxAck.pb_pos, pframe->control->s_frm.res,
+ S_FRM_RESERVED);
sig_send (&sig);
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (rxcts_done)
+ {
+ if (!NOT_FOR_ME (pframe, unit))
+ {
+ /* send RX_CTS to tx_coordination process */
+ PB_LOG (("warn_tx_coordination: RX_CTS sent"));
+ sig.sigNo = RX_CTS;
+ sig.RxCts.STEI = pframe->control->l_frm.STEI;
+ sig.RxCts.DTEI = pframe->control->l_frm.DTEI;
+ sig.RxCts.efr = pframe->control->l_frm.res[0];
+
+ sig_send (&sig);
+ }
+ }
+#endif
else
{
/* send RX_OTHER to tx_coordination process */
@@ -1195,6 +1468,12 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
sig_send (&sig);
}
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (pframe->control->l_frm.subtype == MA_SUBTYPE_CTS)
+ {
+ GPIO_PULSE (GPIO_EVENT_RX_CTS);
+ }
+#endif
else if ((pframe->control->ff) // long frame format ok
&& (pframe->for_me) // unicast for station ok
&& ((pframe->control->l_frm.subtype == MA_SUBTYPE_ACK) ||
@@ -1207,7 +1486,8 @@ void rx_start_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* send ackwnowledge (now we have pb->errors and mask before channel is considered idle */
-static void tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void tx_ack_request (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
#ifdef CONFIG_PLC_PPC
if (pframe->control->ff == PPC_PROTO)
@@ -1226,8 +1506,10 @@ static void tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe
if (pframe->control->l_frm.type == MA_TYPE_DATA)
{
/* demande de nouveau channel, possible retransmission */
- if (unit->ce.iteratif && (unit->ce.auto_correct == RX_AUTO_CORRECT) && (pframe->host->stats.tx_ce_update == 0)
- && (pframe->host->stats.tx_nack > pframe->host->stats.rate_error_host))
+ if (unit->ce.iteratif && (unit->ce.auto_correct == RX_AUTO_CORRECT) &&
+ (pframe->host->stats.tx_ce_update == 0) &&
+ (pframe->host->stats.tx_nack >
+ pframe->host->stats.rate_error_host))
{
ce_status_indicate (unit, pframe->host, STATUS_RENEW);
pframe->host->stats.tx_ce_update = 1;
@@ -1236,12 +1518,15 @@ static void tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe
/* see if the ack must be sent in dcf or pcf */
if (cco_get_mode () == MASTER_MODE /* repeater master */
- || ((pframe->control->l_frm.flags & (MA_BIT_CFPOLL | MA_BIT_TOKEN))))
+ ||
+ ((pframe->control->l_frm.flags & (MA_BIT_CFPOLL | MA_BIT_TOKEN))))
{
- if (unit->sar.use_sack && pframe->sar_enable && (pframe->pb_errors > 0))
+ if (unit->sar.use_sack && pframe->sar_enable &&
+ (pframe->pb_errors > 0))
{
/* SACK retransmit is use for low bytes/slot to limit CPU use */
- if (pframe->pb_errors <= S_FRM_RESERVED && (pframe->pb_errors < pframe->control->l_frm.slices) &&
+ if (pframe->pb_errors <= S_FRM_RESERVED &&
+ (pframe->pb_errors < pframe->control->l_frm.slices) &&
(pframe->fake_rx_end == 0))
{
// force parameters to send only a SACK (NACK and ACK are sent in PCF mode)
@@ -1262,7 +1547,8 @@ static void tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe
}
else
{
- if (unit->sar.use_sack && pframe->sar_enable && (pframe->pb_errors > 0))
+ if (unit->sar.use_sack && pframe->sar_enable &&
+ (pframe->pb_errors > 0))
{
PB_LOG (("send_dcf_ack 2 on %d errors", pframe->pb_errors));
@@ -1323,6 +1609,33 @@ static void tx_ack_request (struct plc_drv_unit *unit, struct plcp_frame *pframe
wait_dcf_ack = send_dcf_ack (unit, pframe);
}
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (pframe->control->l_frm.type == MA_TYPE_CONTROL)
+ {
+ switch (pframe->control->l_frm.subtype)
+ {
+ case MA_SUBTYPE_RTS:
+ csma_stats (unit->stats.access.rx_rts++);
+ GPIO_PULSE (GPIO_EVENT_RX_RTS);
+ wait_dcf_ack = false;
+ if (!NOT_FOR_ME (pframe, unit))
+ {
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "RxCoord: [RTS DTEI=%d] Responding with CTS\n",
+ pframe->control->l_frm.DTEI);
+ wait_dcf_cts = send_dcf_cts (unit, pframe);
+ }
+ break;
+ case MA_SUBTYPE_CTS:
+ if (!NOT_FOR_ME (pframe, unit))
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "RxCoord: [CTS DTEI=%d] RTS confirmed with CTS\n",
+ pframe->control->l_frm.DTEI);
+ dcf_cts_received = true;
+ break;
+ }
+ }
+#endif
}
/* we received a frame with correct control header from network */
@@ -1333,6 +1646,11 @@ void rx_data_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* store tresp_stopped information into a global variable, for rx_other signal */
wait_dcf_ack = false;
dcf_ack_sent = false;
+#ifdef CONFIG_PLC_RTSCTS
+ wait_dcf_cts = false;
+ dcf_cts_sent = false;
+ dcf_cts_received = false;
+#endif
/* check first if we have an ack to send */
if (pframe->for_me)
@@ -1345,13 +1663,20 @@ void rx_data_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
* tx_over_tx. phy_idle can generate a tx_data_request that interrupt
* the rx_data_indication function
*/
+#ifdef CONFIG_PLC_RTSCTS
+ if (!wait_dcf_ack && !wait_dcf_cts && !dcf_cts_received &&
+ plcp_state_idle (unit))
+ {
+#else
if (!wait_dcf_ack && plcp_state_idle (unit))
{
+#endif
/* if station is polled, NAV is ignored until next tx_data_request */
phy_idle (unit, medium_idle_date);
}
- mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_, PHY_RX_DATA_INDICATION, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_,
+ PHY_RX_DATA_INDICATION, MAC_STATUS_OK);
/* see if the frame should be dropped, check seqno, do channel estimation mesures. set timestamps */
switch (pframe->control->l_frm.type)
@@ -1398,6 +1723,16 @@ void rx_data_indication (struct plc_drv_unit *unit, struct plcp_frame *pframe)
ack_transmitted (unit, dcf_ack_status);
}
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (wait_dcf_cts)
+ {
+ rx_coord_state = RX_COORD_CTS;
+ if (dcf_cts_sent)
+ {
+ cts_transmitted (unit, dcf_cts_status);
+ }
+ }
+#endif
else
{ /* see if we should send information to tx_coordination */
rx_coord_state = RX_COORD_IDLE;
@@ -1413,7 +1748,8 @@ void rx_status_indication (struct plc_drv_unit *unit)
if (plcp_state_idle (unit))
phy_idle (unit, medium_idle_date);
- mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_, PHY_RX_STATUS_INDICATION, MAC_STATUS_OK);
+ mac_register_call (rx_coord_state, rx_coordination_, phy_receiver_,
+ PHY_RX_STATUS_INDICATION, MAC_STATUS_OK);
csma_stats (unit->stats.access.rx_drop++);
csma_stats (unit->stats.ce.rx_unicast_bad++);
}
diff --git a/app/sm-plc-drv/src/mac_timer.c b/app/sm-plc-drv/src/mac_timer.c
index 660aad6005..e9b5173148 100644
--- a/app/sm-plc-drv/src/mac_timer.c
+++ b/app/sm-plc-drv/src/mac_timer.c
@@ -61,18 +61,21 @@ OS_PROCESS (mac_timer_proc)
sig->signo = TIMER_TMO;
/* DO NOT cancel timeout if never started one time */
if (timer->cancel_info.sigNo)
- old_sig = (struct timer_msg *) cancelTmo (&timer->cancel_info);
+ old_sig =
+ (struct timer_msg *) cancelTmo (&timer->cancel_info);
else
old_sig = NULL;
if (old_sig)
free_buf ((union SIGNAL **) &old_sig);
- requestTmo (&(timer->cancel_info), sig->time, (union SIGNAL **) &sig, current_process ());
+ requestTmo (&(timer->cancel_info), sig->time,
+ (union SIGNAL **) &sig, current_process ());
break;
case TIMER_STOP:
/* DO NOT cancel timeout if never started one time */
if (timer->cancel_info.sigNo)
- old_sig = (struct timer_msg *) cancelTmo (&timer->cancel_info);
+ old_sig =
+ (struct timer_msg *) cancelTmo (&timer->cancel_info);
else
old_sig = NULL;
if (old_sig)
@@ -95,7 +98,8 @@ void mac_init_timer (struct mac_timer *timer)
}
/* request a timeout for time_ms. Once the timer expired, a callback is executed into mac_timer_proc context */
-void mac_start_timer (struct mac_timer *timer, int time_ms, void (*tmo_fn) (void *arg1, void *arg2), void *arg1,
+void mac_start_timer (struct mac_timer *timer, int time_ms,
+ void (*tmo_fn) (void *arg1, void *arg2), void *arg1,
void *arg2)
{
struct timer_msg *sig;
diff --git a/app/sm-plc-drv/src/mac_tx.c b/app/sm-plc-drv/src/mac_tx.c
index 17b058ecd0..621cff323b 100644
--- a/app/sm-plc-drv/src/mac_tx.c
+++ b/app/sm-plc-drv/src/mac_tx.c
@@ -53,12 +53,10 @@
#include "pb_list.h"
-#ifdef BUFFER_ISOLATION
int xmit_host = 0;
int xmit_host_thr = 2;
int xmit_host_skb;
int xmit_host_min = 1;
-#endif
static int cf_interrupted = 0;
static int tok_interrupted = 0;
@@ -99,19 +97,30 @@ int tx_mcast_msdu = 0;
/* dynamic mac_write function */
-int (*mac_write_data) (struct plc_drv_unit * unit, struct mac_frame * frame, struct plcp_host * host);
-int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struct mac_frame *frame);
+int (*mac_write_data) (struct plc_drv_unit * unit, struct mac_frame * frame,
+ struct plcp_host * host);
+int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ struct mac_frame *frame);
extern int plcp_header (char *buffer, union plcp_control *control);
-extern void (*mac_handle_rx) (struct plc_drv_unit * unit, struct plcp_frame * pframe);
-
-extern int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host);
-extern int mac_nosar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host);
-extern int mac_sar_handle_rx (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+extern void (*mac_handle_rx) (struct plc_drv_unit * unit,
+ struct plcp_frame * pframe);
+
+extern int mac_nosar_write_data (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct plcp_host *host);
+extern int mac_nosar_handle_rx (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
+extern int mac_sar_write_data (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct plcp_host *host);
+extern int mac_sar_handle_rx (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
extern void wd_trigger (void);
-extern void mac_poll_pframe_queue (struct plc_drv_unit *unit, struct list_head *queue,
- void (*handler) (struct plc_drv_unit *, struct plcp_frame *));
+extern void mac_poll_pframe_queue (struct plc_drv_unit *unit,
+ struct list_head *queue,
+ void (*handler) (struct plc_drv_unit *,
+ struct plcp_frame *));
extern void mm_handle_rx (struct plc_drv_unit *, struct plcp_frame *);
extern void mng_handle_tx (struct plc_drv_unit *, struct plcp_frame *);
extern void nco_start_cco (struct plc_drv_unit *unit);
@@ -138,9 +147,7 @@ DevErr __init mac_init (void)
{
int i;
-#ifdef BUFFER_ISOLATION
xmit_host_skb = max_xmit_skb / xmit_host_min;
-#endif
carp_init ();
@@ -150,6 +157,17 @@ DevErr __init mac_init (void)
}
+int is_broadcast_mac (uint8_t DA[6])
+{
+ int i;
+
+ for (i = 0; i < 6; i++)
+ if (DA[i] != broadcast_addr[i])
+ return 0;
+ return 1;
+}
+
+
/* -----------------------------------------------------------------------
* DESCRIPTION :
* -----------------------------------------------------------------------
@@ -172,8 +190,8 @@ void create_lock_if_none (void)
* ----------------------------------------------------------------------- */
DevErr mac_set_defaults (struct plc_drv_unit *unit)
{
- // set default configuration: ad_hoc
- unit->mode = ad_hoc;
+ // set default configuration: was ad_hoc
+ unit->mode = station;
/* get from nvram by linux-drv.c by default TEI is the last byte of the mac address */
/* FIX for CSMA only mode. do not define multicast tei by default, it is reserved */
@@ -392,7 +410,16 @@ void mng_handle_tx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
ce_handle_tx (unit, host, pframe, failed);
unit->stats.drv.handle_tx_channel++;
}
- else if (subtype >= MA_SUBTYPE_PROBE_REQUEST && subtype <= MA_SUBTYPE_DISASSOC_REPLY)
+ else if ((subtype >= MA_SUBTYPE_PROBE_REQUEST &&
+ subtype <= MA_SUBTYPE_DISASSOC_REPLY)
+#ifdef CONFIG_PLC_PPC
+ || subtype == SUBTYPE_REASSOC_REQUEST
+#endif
+#ifdef PLC_RECOVERY
+ || subtype == MA_SUBTYPE_RECOVERY_REQUEST
+ || subtype == MA_SUBTYPE_RECOVERY_REPLY
+#endif
+ )
{
nd_handle_tx (unit, host, pframe, failed);
unit->stats.drv.handle_tx_nd++;
@@ -400,7 +427,8 @@ void mng_handle_tx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
else
{
#ifdef CONFIG_PLC_ASSERT
- dbg_write_fmt ("pframe->subtype=%d unknown\n", pframe->control->l_frm.subtype);
+ dbg_write_fmt ("pframe->subtype=%d unknown\n",
+ pframe->control->l_frm.subtype);
#endif
/* no need to free the semaphore for MANAGEMENT frames */
plcp_free_tx_frame (pframe);
@@ -415,7 +443,8 @@ void mng_handle_tx (struct plc_drv_unit *unit, struct plcp_frame *pframe)
* RETURN : 0 = Success
* -1 = Error
* ----------------------------------------------------------------------- */
-int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host)
+int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame,
+ struct plcp_host *host)
{
struct plcp_frame *pframe;
@@ -429,7 +458,9 @@ int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, st
if (counter > 0)
{
// already some PLCP frames waiting
- pframe = list_entry (host->tx_queue[PLCP_PRIO_DATA].prev, struct plcp_frame, link);
+ pframe =
+ list_entry (host->tx_queue[PLCP_PRIO_DATA].prev,
+ struct plcp_frame, link);
ASSERT (pframe);
@@ -501,8 +532,9 @@ int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, st
else
{
ASSERT (status == 0);
- rt_printk ("ERROR ! cannot builded plcp_frame : status = %d, host[%d]->mtu=%d\n", status, host->index,
- host->mtu);
+ rt_printk
+ ("ERROR ! cannot builded plcp_frame : status = %d, host[%d]->mtu=%d\n",
+ status, host->index, host->mtu);
return -1;
}
}
@@ -514,7 +546,8 @@ int mac_nosar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, st
* RETURN : 0 = Success
* -1 = Error
* ----------------------------------------------------------------------- */
-int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host)
+int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame,
+ struct plcp_host *host)
{
struct plcp_frame *pframe;
@@ -530,7 +563,9 @@ int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, stru
if (counter > 0)
{
/* already some PLCP frames waiting */
- pframe = list_entry (host->tx_queue[PLCP_PRIO_DATA].prev, struct plcp_frame, link);
+ pframe =
+ list_entry (host->tx_queue[PLCP_PRIO_DATA].prev,
+ struct plcp_frame, link);
if (pframe->state == PLCP_QUEUED)
{
@@ -556,9 +591,11 @@ int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, stru
}
else
{
- PB_LOG (("mac_sar_write_data : pframe 0x%x state != queued", pframe));
+ PB_LOG (("mac_sar_write_data : pframe 0x%x state != queued",
+ pframe));
}
- if (host->tx_queue_count[PLCP_PRIO_DATA] >= unit->mac.config.sap_queue)
+ if (host->tx_queue_count[PLCP_PRIO_DATA] >=
+ unit->mac.config.sap_queue)
{
/* PLCP queue is full */
LOCK_RESTORE (msr);
@@ -591,7 +628,8 @@ int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, stru
if (pb_append_frame (unit, pframe, frame) != 0)
{
- PB_LOG (("%s:%d pb_append_frame failed for frame 0x%x!", __FILE__, __LINE__, frame));
+ PB_LOG (("%s:%d pb_append_frame failed for frame 0x%x!", __FILE__,
+ __LINE__, frame));
res = -1;
ASSERT (0);
// this can happen if the mtu if less than the frame->d_len
@@ -616,7 +654,8 @@ int mac_sar_write_data (struct plc_drv_unit *unit, struct mac_frame *frame, stru
* -----------------------------------------------------------------------
* RETURN :
* ----------------------------------------------------------------------- */
-int mac_write_mm (struct plc_drv_unit *unit, struct plcp_frame *pframe, struct plcp_host *host)
+int mac_write_mm (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ struct plcp_host *host)
{
int msr;
@@ -658,7 +697,8 @@ DevErr mm_write (struct plc_drv_unit * unit, struct plcp_frame * pframe)
ASSERT (pframe->host);
/* check unit mode */
- if (unit->mode != ad_hoc && unit->mode != station && unit->mode != repeater)
+ if (unit->mode != ad_hoc && unit->mode != station &&
+ unit->mode != repeater)
{
RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mm_write: bad mode\n");
goto mm_status;
@@ -700,7 +740,8 @@ inline struct plcp_host *broadcast_host (int len)
* -----------------------------------------------------------------------
* RETURN :
* ----------------------------------------------------------------------- */
-inline struct plcp_host *__host_lookup (struct plc_drv_unit *unit, uint8_t * DA, int subtype, int len)
+inline struct plcp_host *__host_lookup (struct plc_drv_unit *unit,
+ uint8_t * DA, int subtype, int len)
{
struct plcp_host *host = NULL;
@@ -731,8 +772,9 @@ inline struct plcp_host *__host_lookup (struct plc_drv_unit *unit, uint8_t * DA,
// Drop intra-cell unicasts for slave repeaters
// These should be inter-cell frames
if (host == local_host)
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "frame sent to DA " IEEE802_FMT " found on local host side\n",
- IEEE802_VAL (DA));
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "frame sent to DA " IEEE802_FMT
+ " found on local host side\n", IEEE802_VAL (DA));
if (host && (host == local_host || host->BSSID != unit->BSSID))
return NULL;
}
@@ -754,7 +796,12 @@ inline struct plcp_host *__host_lookup (struct plc_drv_unit *unit, uint8_t * DA,
}
else
{
+#ifdef CONFIG_IPV6
+ return (is_multicast_mac_ipv6_ok (DA)) ?
+ broadcast_host (len) : NULL;
+#else
return NULL;
+#endif
}
}
else
@@ -786,7 +833,9 @@ inline struct plcp_host *__host_lookup (struct plc_drv_unit *unit, uint8_t * DA,
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-void INLINE __mac_queue_frame (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host, int prio)
+void INLINE __mac_queue_frame (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct plcp_host *host, int prio)
{
PB_LOG (("mac_queue_frame"));
@@ -803,7 +852,9 @@ void INLINE __mac_queue_frame (struct plc_drv_unit *unit, struct mac_frame *fram
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-void INLINE __mac_dequeue_frame (struct plc_drv_unit *unit, struct mac_frame *frame, struct plcp_host *host, int prio)
+void INLINE __mac_dequeue_frame (struct plc_drv_unit *unit,
+ struct mac_frame *frame,
+ struct plcp_host *host, int prio)
{
host->mac_queued[prio]--;
ASSERT (host->mac_queued[prio] >= 0);
@@ -819,60 +870,142 @@ void INLINE __mac_dequeue_frame (struct plc_drv_unit *unit, struct mac_frame *fr
* 0 = packet is queued, and more frames are available
* -1 = packet could not be queued
* ----------------------------------------------------------------------- */
-int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_len, int subtype, int flags, int prio,
- uint8_t TEI, void *priv)
+#ifdef CONFIG_PLC_PPC
+int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf,
+ int d_len, int subtype, int flags, int prio, uint8_t TEI,
+ void *priv, unsigned int dtei)
+#else
+int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf,
+ int d_len, int subtype, int flags, int prio, uint8_t TEI,
+ void *priv)
+#endif
{
struct mac_frame *frame;
- struct plcp_host *host;
+ struct plcp_host *host = NULL;
uint32_t msr;
+#ifdef CONFIG_PLC_PPC
+ uint8_t DTEI = dtei & 0xFF, dfirst = !(dtei & 0x8000);
+#endif
int full;
int mtu;
-#ifdef CONFIG_PLC_8021X
- int i, broadcast = 1, eth_type_pae = 0;
- uint16_t eth_type = *(uint16_t *) & d_buf[12];
-#endif // CONFIG_PLC_8021X
-
-
unit->stats.mac.write++;
/* check oversize */
if (d_len > MAC_PAYLOAD_DSIZE)
{
unit->stats.mac.e_tx_bad_len++;
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_write: frame enormous (dlen=%d)\n", d_len);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_write: frame enormous (dlen=%d)\n", d_len);
PB_LOG (("mac_write: e_tx_bad_len "));
goto mac_status_no_host;
}
+#ifdef CONFIG_PLC_PPC
+ /*
+ * we must try to find next hop by calling PPC module function
+ * date :16.07.2007
+ * user: Milenko Jelisavcic
+ */
+ if (l2_ppc)
+ {
+ int ret_val = 0, ret_val1 = 0;
+
+ if (dfirst) // only in first write we must calculate DTEI. In hop stations we propagate already calculated DTEI
+ {
+ if ((ret_val = getDTEI (DA, &DTEI))) // no entry or obsolete entry..
+ {
+ PPC_PRINTK ("PPC:getDTEI RV=%d DTEI=%d\n", ret_val, DTEI);
+ if (l2_ppc->l2_carp_resolve)
+ ret_val =
+ l2_ppc->l2_carp_resolve ((struct sk_buff *) priv,
+ &DTEI);
+ }
+ }
+
+ if ((ret_val == 0) && (DTEI != unit->TEI) &&
+ l2_ppc->l2_route_next_hop)
+ {
+ uint8_t HOPTEI, err = 0;
+
+ int rel = l2_ppc->l2_route_next_hop (DTEI, &HOPTEI, d_len);
+
+ if ((rel == 0) && (HOPTEI != unit->TEI))
+ host = plcp_get_host_by_TEI (HOPTEI);
+ else
+ err = 1;
+
+ if (err == 1 || host == NULL)
+ {
+ if (l2_ppc->l2_sched_packet_fail)
+ l2_ppc->l2_sched_packet_fail (DTEI, unit->TEI, d_len);
+ PPC_PRINTK ("PPC:Packet dropped no HOP node DTEI=%d LEN=%d\n",
+ DTEI, d_len);
+#ifdef CONFIG_PLC_DEBUG
+ dump_skb (d_buf);
+#endif
+ }
+ }
+ else
+ {
+ PPC_PRINTK
+ ("PPC:Packet dropped no PPC connection retval=%d DTEI=%d LOCAL_TEI=%d LEN=%d\n",
+ ret_val, DTEI, unit->TEI, d_len);
+ if (l2_ppc->l2_sched_packet_fail)
+ l2_ppc->l2_sched_packet_fail (DTEI, unit->TEI, d_len);
+#ifdef CONFIG_PLC_DEBUG
+ dump_skb (d_buf);
+#endif
+ }
+ }
+ else
+ {
+ host = __host_lookup (unit, DA, subtype, d_len);
+ if (host)
+ DTEI = host->TEI;
+ }
+#else
host = __host_lookup (unit, DA, subtype, d_len);
+#endif
+
if (host == NULL)
{
RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_write: host not found\n");
- PB_LOG (("mac_write: host not found for DA %x:%x:%x:%x:%x:%x (%d)", DA[0], DA[1], DA[2], DA[3], DA[4], DA[5],
- subtype));
+ PB_LOG (("mac_write: host not found for DA %x:%x:%x:%x:%x:%x (%d)",
+ DA[0], DA[1], DA[2], DA[3], DA[4], DA[5], subtype));
unit->stats.mac.e_tx_bad_host++;
PB_LOG (("mac_write: e_tx_bad_host "));
goto mac_status_no_host;
}
-#ifdef CONFIG_PLC_8021X
+#ifdef CONFIG_PLC_PPC
+#ifdef CONFIG_PLC_DEBUG
+ dump_skb (d_buf);
+#endif
+#endif
- for (i = 0; i < 6; i++)
- if (DA[i] != 0xff)
- broadcast = 0;
+ // If 802.1x authentication is turned on and slave is not authenticated
+ // drop all packets except management messages.
+ if (unit->auth_8021x)
+ {
+ int i, broadcast = 1, eth_type_pae = 0;
+ uint16_t eth_type = *(uint16_t *) & d_buf[12];
- if (eth_type == htons (0x888e))
- eth_type_pae = 1;
+ for (i = 0; i < 6; i++)
+ if (DA[i] != 0xff)
+ broadcast = 0;
- if ((host->authenticated == 0) && (broadcast == 0) && (eth_type_pae == 0))
- {
- // queued packet is degaged...
- unit->netstats.tx_dropped++;
- goto mac_status_no_host;
- }
+ if (eth_type == htons (0x888e))
+ eth_type_pae = 1;
-#endif // CONFIG_PLC_8021X
+ if ((host->authenticated == 0) && (broadcast == 0) &&
+ (eth_type_pae == 0))
+ {
+ // queued packet is degaged...
+ unit->netstats.tx_dropped++;
+ goto mac_status_no_host;
+ }
+ }
host->stats.tx_lookup_msdu++;
@@ -885,7 +1018,8 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
if (subtype == MA_SUBTYPE_INTRA_CELL && host->BSSID != unit->BSSID)
{
- RT_PRINTM (TRACE_VPORT, TRACE_ERROR, "mac_write: filtered intra-cell for vport\n");
+ RT_PRINTM (TRACE_VPORT, TRACE_ERROR,
+ "mac_write: filtered intra-cell for vport\n");
unit->stats.mac.e_tx_bad_bssid++;
PB_LOG (("mac_write: e_tx_bad_bssid "));
goto mac_status;
@@ -908,29 +1042,31 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
// ensure the maximum transfert unit will not be reached for the
// mac_frame (not nly the msdu), to avoid blocking situation in mac_append_frame
- if (!unit->sar.enable && ((MAC_HEADER_SIZE + d_len) > mtu /*can be 0 */ ) &&
+ if (!unit->sar.enable && ((MAC_HEADER_SIZE + d_len) > mtu /*can be 0 */ )
+ &&
((MAC_HEADER_SIZE + d_len) > mtu_rqpsk))
{
// error, we need fragmentation here
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_write: frame needs fragmentation (dlen=%d, mtu=%d)\n", d_len, mtu);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_write: frame needs fragmentation (dlen=%d, mtu=%d)\n",
+ d_len, mtu);
unit->stats.mac.e_tx_need_frag++;
goto mac_status;
}
#endif
-#ifdef BUFFER_ISOLATION
if (host->msdu_queued >= xmit_host_skb)
{
goto skb_limit;
}
-#endif
/* try to add a mac_frame into the fifo */
frame = mac_alloc_tx_frame (prio, &full);
if (unlikely (frame == NULL))
{
PB_LOG (("Device queue full"));
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_write: could not allocate tx frame\n");
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_write: could not allocate tx frame\n");
unit->stats.mac.e_tx_alloc_frame++;
goto device_full;
}
@@ -939,15 +1075,23 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
/* store frame parameters (not ent on the network) */
frame->header->flags = flags;
frame->header->len = d_len;
- frame->header->TEI = TEI; /* indicate TEI in the mac_header for intra_cell diffusion */
+#ifdef CONFIG_PLC_PPC
+ frame->header->TEI = unit->TEI; /* TEI is local TEI */
+#else
+ frame->header->TEI = TEI; /* indicate TEI in the mac_header for intra_cell */
+#endif
frame->header->magic = MAGIC_NUMBER; /* magic number to identify a valid mac_frame */
+ /* store frame parameters (not ent on the network) */
+#ifdef CONFIG_PLC_PPC
+ frame->header->ppc_header.len = d_len;
+ frame->header->ppc_header.STEI = TEI;
+ frame->header->ppc_header.DTEI = DTEI;
+#endif
+
+ /* split frame if the frame is not queued or dequeued, cause pb allocation is only need in the mac_append_frame */
frame->keep_buf = d_buf;
frame->keep_len = d_len;
-#ifndef SAR_OPT
- frame->d_len = pb_split_data (frame->keep_buf, frame->keep_len, &frame->mac_pb_list);
- frame->pb_len = ((frame->keep_len + PB_DATA_SIZE - 1) / PB_DATA_SIZE) * PB_SIZE;
-#endif
frame->d_buf = d_buf;
frame->d_len = d_len;
@@ -960,14 +1104,15 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
LOCK_SAVE (msr);
frame->host = host;
host->msdu_queued++;
-#ifdef BUFFER_ISOLATION
if ((host->msdu_queued == xmit_host_thr) && (host->xmit_active == 0))
{
host->xmit_active = 1;
xmit_host++;
- xmit_host_skb = (xmit_host < xmit_host_min) ? (max_xmit_skb / xmit_host_min) : (max_xmit_skb / xmit_host);
+ xmit_host_skb =
+ (xmit_host <
+ xmit_host_min) ? (max_xmit_skb / xmit_host_min) : (max_xmit_skb /
+ xmit_host);
}
-#endif
if (host->msdu_queued > mac_max_msdu)
mac_max_msdu = host->msdu_queued;
ASSERT (host->mac_queued[prio] >= 0);
@@ -979,7 +1124,8 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
else
{
LOCK_RESTORE (msr);
- if (sar_switch[host->uchannel->sar_enable].mac_write_data (unit, frame, host) < 0)
+ if (sar_switch[host->uchannel->sar_enable].
+ mac_write_data (unit, frame, host) < 0)
{
LOCK_SAVE (msr);
__mac_queue_frame (unit, frame, host, prio);
@@ -1014,7 +1160,8 @@ int mac_write (struct plc_drv_unit *unit, uint8_t * DA, uint8_t * d_buf, int d_l
* -1 = Can't add the mac_frame to the mpdu
* -2 ... -6 = Error
* ----------------------------------------------------------------------- */
-int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struct mac_frame *mac_frame)
+int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ struct mac_frame *mac_frame)
{
union plcp_control *ctl;
struct plcp_uchannel *uchannel;
@@ -1043,7 +1190,8 @@ int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, stru
else if (len_total > mac_frame->host->mtu /*can be 0 */ )
{
// chunk mode is disabled on cable versions, cause mac_frame len of 9 ms lead to big overhead
- if ((len_total <= mtu_chunk) && (unit->config_medium != MEDIUM_CABLE))
+ if ((len_total <= mtu_chunk) &&
+ (unit->config_medium != MEDIUM_CABLE))
{ // MTU_MAX_CHUNK = 480
cid = PLCP_CID_CBPSK;
uchannel = uchannel_chunk;
@@ -1066,8 +1214,8 @@ int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, stru
{
// error, we need fragmentation here
RT_PRINTM (TRACE_MAC, TRACE_ERROR,
- "mac_append_frame: mac_frame needs fragmentation (dlen=%d, mtu=%d)\n", mac_frame->d_len,
- mtu);
+ "mac_append_frame: mac_frame needs fragmentation (dlen=%d, mtu=%d)\n",
+ mac_frame->d_len, mtu);
unit->stats.mac.e_tx_need_frag++;
return -2;
}
@@ -1105,8 +1253,9 @@ int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, stru
else if (pframe->host != mac_frame->host)
{
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_append_frame: different hosts (%d and %d)\n", pframe->host->index,
- mac_frame->host->index);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_append_frame: different hosts (%d and %d)\n",
+ pframe->host->index, mac_frame->host->index);
return -4;
}
@@ -1120,7 +1269,8 @@ int mac_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, stru
unit->stats.mac.e_tx_oversize++;
RT_PRINTM (TRACE_MAC, TRACE_ERROR,
"mac_append_frame: tx_oversize, host_index=%d, host->mtu=%d, subtype=%d, mac_frame->d_len=%d, pframe->mtu=%d\n",
- mac_frame->host->index, mac_frame->host->mtu, mac_frame->subtype, mac_frame->d_len, pframe->mtu);
+ mac_frame->host->index, mac_frame->host->mtu,
+ mac_frame->subtype, mac_frame->d_len, pframe->mtu);
return -5;
}
@@ -1192,11 +1342,13 @@ void mac_poll_tx_queue (struct plc_drv_unit *unit)
if (!list_empty (list))
{
/* get the first mac_frame */
- frame = list_entry (list->next, struct mac_frame, link);
+ frame =
+ list_entry (list->next, struct mac_frame, link);
LOCK_RESTORE (msr);
/* try to send the mac_frame */
- if (sar_switch[host->uchannel->sar_enable].mac_write_data (unit, frame, host) < 0)
+ if (sar_switch[host->uchannel->sar_enable].
+ mac_write_data (unit, frame, host) < 0)
{
unit->stats.access.q_full++;
/* queue full */
@@ -1253,7 +1405,9 @@ OS_PROCESS (tx_management_process)
LOCK_SAVE (msr);
while (!(list_empty (&plcp_tx_done_queue[PLCP_PRIO_MM])))
{
- pframe = list_entry (plcp_tx_done_queue[PLCP_PRIO_MM].next, struct plcp_frame, link);
+ pframe =
+ list_entry (plcp_tx_done_queue[PLCP_PRIO_MM].next,
+ struct plcp_frame, link);
list_del_init (&pframe->link);
LOCK_RESTORE (msr);
@@ -1272,16 +1426,19 @@ OS_PROCESS (tx_management_process)
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-void mac_handle_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe, int status)
+void mac_handle_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ int status)
{
int msr;
ASSERT (pframe);
#ifdef CONFIG_PLC_PPC
- ASSERT (pframe->control->ff == PPC_PROTO || pframe->control->l_frm.type == MA_TYPE_DATA ||
+ ASSERT (pframe->control->ff == PPC_PROTO ||
+ pframe->control->l_frm.type == MA_TYPE_DATA ||
pframe->control->l_frm.type == MA_TYPE_MANAGEMENT);
#else
- ASSERT (pframe->control->l_frm.type == MA_TYPE_DATA || pframe->control->l_frm.type == MA_TYPE_MANAGEMENT);
+ ASSERT (pframe->control->l_frm.type == MA_TYPE_DATA ||
+ pframe->control->l_frm.type == MA_TYPE_MANAGEMENT);
#endif
GPIO_WRITE (GPIO_EVENT_MM_INDICATE, 1);
@@ -1332,8 +1489,10 @@ void mac_handle_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe, in
{
GPIO_WRITE (GPIO_EVENT_RIFS_TMO, 1);
unit->stats.mac.tx_unknown++;
- rt_printk ("%s:%d Fatal erreur grave for pframe 0x%x\n", __FILE__, __LINE__);
- dbg_write_fmt ("handle_tx: type unknown type=%s\r\n", ma_type_name[pframe->control->l_frm.type]);
+ rt_printk ("%s:%d Fatal erreur grave for pframe 0x%x\n", __FILE__,
+ __LINE__);
+ dbg_write_fmt ("handle_tx: type unknown type=%s\r\n",
+ ma_type_name[pframe->control->l_frm.type]);
GPIO_WRITE (GPIO_EVENT_RIFS_TMO, 0);
}
GPIO_WRITE (GPIO_EVENT_MM_INDICATE, 0);
diff --git a/app/sm-plc-drv/src/mac_tx_coord.c b/app/sm-plc-drv/src/mac_tx_coord.c
index c0def18766..979299180c 100644
--- a/app/sm-plc-drv/src/mac_tx_coord.c
+++ b/app/sm-plc-drv/src/mac_tx_coord.c
@@ -56,19 +56,19 @@ static int tx_coord_seq_rifs = 0;
static int tx_coord_rifs_thr = 10;
#endif
-#ifdef VERBOSE_MULTICAST
-u32 LOG_MULTICAST = 0;
-char mcast_buffer[32000];
-union plcp_control mcast_control;
-struct plcp_frame mcast_pframe;
+#ifdef CONFIG_PLC_RTSCTS
+static volatile unsigned int rts_retransmit;
+struct plcp_frame *rtsd_pframe = NULL;
+struct plcp_frame *rts_frame;
+static union plcp_control rts_tx_control __attribute__ ((aligned (32)));
#endif
-
int tx_coord_max_holding = (3000 / OS_TICK_MS);
/* imported mac interfaces */
extern bool plcp_stop_tresp (struct plc_drv_unit *unit, int signo);
-extern bool plcp_start_tresp (struct plc_drv_unit *unit, int obj, int signo, uint16_t date);
+extern bool plcp_start_tresp (struct plc_drv_unit *unit, int obj, int signo,
+ uint16_t date);
extern void bp_backoff (struct plc_drv_unit *unit, struct plcp_frame *pframe);
extern int bp_cancel (struct plc_drv_unit *unit);
@@ -79,16 +79,21 @@ extern void disable_backoff (void);
extern void enable_backoff (void);
extern void set_ifs (uint16_t ifs);
-extern void mac_send_failed (struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern void mac_send_done (struct plc_drv_unit *unit, struct plcp_frame *frame);
-extern void mac_send_partial (struct plc_drv_unit *unit, struct plcp_frame *frame);
+extern void mac_send_failed (struct plc_drv_unit *unit,
+ struct plcp_frame *frame);
+extern void mac_send_done (struct plc_drv_unit *unit,
+ struct plcp_frame *frame);
+extern void mac_send_partial (struct plc_drv_unit *unit,
+ struct plcp_frame *frame);
extern struct plcp_frame *in_queue_pcf (struct plc_drv_unit *unit, int index);
extern struct plcp_frame *in_queue_dcf (struct plc_drv_unit *unit);
extern void phy_cca_request (struct plc_drv_unit *unit, uint16_t this_date);
-extern bool phy_tx_data_request (struct plc_drv_unit *unit, struct plcp_frame *pframe);
-extern void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date, uint32_t dur);
+extern bool phy_tx_data_request (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
+extern void phy_set_nav (struct plc_drv_unit *unit, uint16_t this_date,
+ uint32_t dur);
extern void phy_clear_nav (struct plc_drv_unit *unit, uint16_t this_date);
extern void phy_enable_nav (struct plc_drv_unit *unit, uint16_t time);
extern void phy_disable_nav (struct plc_drv_unit *unit, uint16_t time);
@@ -97,12 +102,18 @@ extern void cco_start (struct plc_drv_unit *unit);
extern void cco_stop (struct plc_drv_unit *unit);
extern void token_start (struct plc_drv_unit *unit);
extern void token_stop (struct plc_drv_unit *unit);
-extern void mm_indicate (struct plc_drv_unit *unit, struct MmIndicate *mm_ind);
+extern void mm_indicate (struct plc_drv_unit *unit,
+ struct MmIndicate *mm_ind);
extern void mm_confirm (struct plc_drv_unit *unit, int mm_type, int status);
extern void mm_wake (struct plc_drv_unit *unit, struct plcp_host *host);
extern void tbtt (struct plc_drv_unit *unit);
extern void tmo_token (struct plc_drv_unit *unit);
+#ifdef CONFIG_PLC_RTSCTS
+extern unsigned int max_rts_retrans;
+extern void access_rtsd_confirm (struct plc_drv_unit *unit, int status);
+#endif
+
/* imported data */
extern int default_ogain;
extern volatile int sig_pend;
@@ -122,7 +133,8 @@ inline int is_expired (struct plcp_frame *pframe)
}
struct plcp_frame *make_frame (struct plc_drv_unit *unit,
- uint8_t localTEI, uint8_t BSSID, uint8_t TEI, uint8_t type, uint8_t subtype)
+ uint8_t localTEI, uint8_t BSSID, uint8_t TEI,
+ uint8_t type, uint8_t subtype)
{
union plcp_control *ctl;
@@ -151,6 +163,30 @@ struct plcp_frame *make_frame (struct plc_drv_unit *unit,
return mm_pframe;
}
+#ifdef CONFIG_PLC_RTSCTS
+static void make_rts (struct plc_drv_unit *unit)
+{
+ rts_frame = plcp_alloc_tx_frame (0);
+
+ // RTS frame format
+ rts_tx_control.l_frm.type = MA_TYPE_CONTROL;
+ rts_tx_control.l_frm.subtype = MA_SUBTYPE_RTS;
+ rts_tx_control.l_frm.flags = 0;
+ rts_tx_control.l_frm.channel_id = PLCP_CID_NONE;
+ rts_tx_control.l_frm.bssid = BSSID_ALL_BSS;
+
+ // init static parameters of the rts_frame structure
+ INIT_LIST_HEAD (&rts_frame->link);
+ INIT_LIST_HEAD (&rts_frame->mm);
+ INIT_LIST_HEAD (&rts_frame->mac_frames);
+ INIT_LIST_HEAD (&rts_frame->pb_list);
+
+ rts_frame->nb_retries = 0;
+ rts_frame->d_len = 0;
+ rts_frame->uchannel = plcp_get_uchannel_by_id (PLCP_CID_NONE);
+}
+#endif
+
/* get the next elected pframe and start backoff_procedure */
static void adhoc_transmit (struct plc_drv_unit *unit)
{
@@ -180,14 +216,16 @@ static void adhoc_transmit (struct plc_drv_unit *unit)
/* higher priority for management broadcast */
#ifdef CONFIG_PLC_PPC
- if ((pframe->host->index == 0) && (pframe->control->ff == PPC_PROTO) && (unit->mac.config.cw_min > 0))
+ if ((pframe->host->index == 0) && (pframe->control->ff == PPC_PROTO)
+ && (unit->mac.config.cw_min > 0))
enable_priority ();
else
disable_priority ();
#endif
if ((pframe->host->index == 0)
- && (pframe->control->l_frm.type == MA_TYPE_MANAGEMENT) && (unit->mac.config.cw_min > 0))
+ && (pframe->control->l_frm.type == MA_TYPE_MANAGEMENT) &&
+ (unit->mac.config.cw_min > 0))
enable_priority ();
else
@@ -198,8 +236,35 @@ static void adhoc_transmit (struct plc_drv_unit *unit)
tx_coord_state = DCF_CP;
- /* send busy to CARRIER SENSE process */
- bp_backoff (unit, pframe);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.efr >= unit->rts_threshold &&
+ TO_ONE_POINT (pframe) && !unit->mode)
+ {
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "TxCoord: adhoc_transmit efr=%d => sending RTS [RTS DTEI=%d]\n",
+ pframe->control->l_frm.efr,
+ pframe->control->l_frm.DTEI);
+ // Set ce gain here and not in make_rts cause it might be changed
+ rts_frame->data_gain = unit->ce.data_gain;
+ rts_frame->ctrl_gain = default_ogain;
+
+ rts_frame->control = &rts_tx_control;
+ rts_frame->control->l_frm.bssid = pframe->control->l_frm.bssid;
+ rts_frame->control->l_frm.STEI = pframe->control->l_frm.STEI;
+ rts_frame->control->l_frm.DTEI = pframe->control->l_frm.DTEI;
+ rts_frame->control->l_frm.res[0] = pframe->control->l_frm.efr;
+ rtsd_pframe = pframe;
+
+ rts_retransmit = 0;
+ GPIO_WRITE (GPIO_EVENT_TX_RTS, 1);
+ bp_backoff (unit, rts_frame);
+ GPIO_WRITE (GPIO_EVENT_TX_RTS, 0);
+ }
+ else
+#endif
+
+ /* send busy to CARRIER SENSE process */
+ bp_backoff (unit, pframe);
}
}
@@ -210,7 +275,8 @@ static void adhoc_transmit (struct plc_drv_unit *unit)
*/
/* Too optimze medium occupancy, the MPDU_REQUEST should be prepared */
-static struct plcp_frame *poll_local_host (struct plc_drv_unit *unit, struct plcp_host *host)
+static struct plcp_frame *poll_local_host (struct plc_drv_unit *unit,
+ struct plcp_host *host)
{
struct plcp_frame *pframe = NULL;
@@ -239,7 +305,9 @@ static struct plcp_frame *poll_local_host (struct plc_drv_unit *unit, struct plc
{
csma_stats (unit->stats.access.poll_empty++);
/* if nothing to send should be MA_SUBTYPE_NULL */
- pframe = make_frame (unit, host->localTEI, host->BSSID, host->TEI, MA_TYPE_DATA, MA_SUBTYPE_NULL);
+ pframe =
+ make_frame (unit, host->localTEI, host->BSSID, host->TEI,
+ MA_TYPE_DATA, MA_SUBTYPE_NULL);
if (pframe == NULL)
{
csma_stats (unit->stats.access.no_pframe++);
@@ -286,7 +354,8 @@ static int mac_counter = 0;
/* ASSERT control->type is DATA or MANAGEMENT */
extern struct plcp_frame *ack_frame;
-static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *pframe, int tx_status)
+static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, int tx_status)
{
int retry_limit_max;
@@ -309,8 +378,11 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
#ifdef CONFIG_PLC_ASSERT
if ((pframe == mm_pframe || pframe == ack_frame) && mac_counter > 0)
{
- rt_printk ("msdu_confirm: pframe=%p, type=%d, sub=%d, len=%d, dbuf=%p\n", pframe,
- pframe->control->l_frm.type, pframe->control->l_frm.subtype, pframe->d_len, pframe->d_buf);
+ rt_printk
+ ("msdu_confirm: pframe=%p, type=%d, sub=%d, len=%d, dbuf=%p\n",
+ pframe, pframe->control->l_frm.type,
+ pframe->control->l_frm.subtype, pframe->d_len,
+ pframe->d_buf);
mac_counter--;
}
#endif
@@ -318,9 +390,11 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
switch (tx_status)
{
case TX_CNF_SUCCESS: // SUCCESS
- mac_register_call (tx_coord_state, phy_transmitter_, tx_coordination_, MPDU_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, phy_transmitter_,
+ tx_coordination_, MPDU_CONFIRM, MAC_STATUS_OK);
#ifdef CONFIG_PLC_MCAST
- if ((pframe->control->l_frm.subtype == MA_SUBTYPE_MCAST_INDICATION) && (pframe->nb_retries < 1))
+ if ((pframe->control->l_frm.subtype ==
+ MA_SUBTYPE_MCAST_INDICATION) && (pframe->nb_retries < 1))
{
pframe->nb_retries++;
break;
@@ -363,13 +437,16 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
// if we experienced one retry limit for multicast, stop partial ack for this multi point host.
if ((pframe->partial_ack == 1) && pframe->host)
{
- RT_PRINTM (TRACE_MCAST, TRACE_DEBUG, "disable partial ack for host tei=%d, index=%d\r\n",
+ RT_PRINTM (TRACE_MCAST, TRACE_DEBUG,
+ "disable partial ack for host tei=%d, index=%d\r\n",
pframe->host->TEI, pframe->host->index);
// next frame will have pframe->partial_ack set to -1
pframe->host->proxy_tei = TEI_ALL_CELL;
}
- mac_register_call (tx_coord_state, phy_transmitter_, tx_coordination_, MPDU_CONFIRM, MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, phy_transmitter_,
+ tx_coordination_, MPDU_CONFIRM,
+ MAC_STATUS_ERROR);
pending_mpdu--;
mac_send_failed (unit, pframe);
}
@@ -379,22 +456,15 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
GPIO_PULSE (GPIO_EVENT_MAC_RETRY_LIMIT);
- mac_register_call (tx_coord_state, phy_transmitter_, tx_coordination_, MPDU_CONFIRM, MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, phy_transmitter_,
+ tx_coordination_, MPDU_CONFIRM,
+ MAC_STATUS_ERROR);
pending_mpdu--;
pframe->nb_retries = NB_RETRY_LIMIT;
mac_send_failed (unit, pframe);
}
else
{
-#ifdef VERBOSE_MULTICAST
- if (pframe->partial_ack && LOG_MULTICAST)
- {
- LOG_MULTICAST = 0;
- memcpy (mcast_buffer, pframe->d_buf, pframe->d_len);
- memcpy (&mcast_control, pframe->control, sizeof (union plcp_control));
- memcpy (&mcast_pframe, pframe, sizeof (struct plcp_frame));
- }
-#endif
/* retry transmit (avec a complete schedule) */
PB_LOG (("msdu_or_mmdu_confirm : TX_CNF_NO_CFACKED ==> retry pframe 0x%x", pframe));
pframe->nb_retries++;
@@ -407,7 +477,8 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
case TX_CNF_PARTIAL: // Data partially acknowledged
PB_LOG (("msdu_or_mmdu_confirm : TX_CNF_PARTIAL"));
ASSERT (pframe->sar_enable);
- mac_register_call (tx_coord_state, phy_transmitter_, tx_coordination_, MPDU_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, phy_transmitter_,
+ tx_coordination_, MPDU_CONFIRM, MAC_STATUS_OK);
// TODO see if something more
mac_send_partial (unit, pframe);
break;
@@ -423,7 +494,8 @@ static void msdu_or_mmdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *
* -1: transmit_error
*/
-static void slave_transmit (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void slave_transmit (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
/* increment sequence number only if retry flag is not set (and frame as payload) */
if (pframe->nb_retries > 0)
@@ -461,7 +533,8 @@ static void slave_transmit (struct plc_drv_unit *unit, struct plcp_frame *pframe
/* acknowledge cco */
-static void mpdu_confirm (struct plc_drv_unit *unit, struct plcp_frame *pframe, int tx_status)
+static void mpdu_confirm (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, int tx_status)
{
int mctrl_status = (tx_status < 0) ? MCTRL_FAILED : MCTRL_SUCCESS;
@@ -555,7 +628,8 @@ static void slave_polled (struct plc_drv_unit *unit)
* pending_ack is true, set the flag retry if needed, and return a status:
*/
-static void master_transmit (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void master_transmit (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
ASSERT (in_sdram (pframe));
@@ -600,7 +674,8 @@ static void send_cfpoll (struct plc_drv_unit *unit, struct plcp_host *host)
}
/* add CFPOLL flag if unicast frame and pframe is not management frame */
- if (TO_ONE_POINT (pframe) /*&& pframe->control->l_frm.type == MA_TYPE_DATA */ )
+ if (TO_ONE_POINT (pframe)
+ /*&& pframe->control->l_frm.type == MA_TYPE_DATA */ )
{
pframe->control->l_frm.flags |= MA_BIT_CFPOLL;
host->stats.tx_poll++;
@@ -620,7 +695,8 @@ static void send_cfpoll (struct plc_drv_unit *unit, struct plcp_host *host)
/* cco opened contention free period, and ask pcf to poll a remote host.
* If no data is available, MA_SUBTYPE_NULL is used.
* If tx_err occurs, the sta must retransmit after a sifs */
-static void send_token (struct plc_drv_unit *unit, struct plcp_host *host, int end_cp)
+static void send_token (struct plc_drv_unit *unit, struct plcp_host *host,
+ int end_cp)
{
struct plcp_frame *pframe;
@@ -691,7 +767,8 @@ static void send_beacon (struct plc_drv_unit *unit, int end_cp)
memcpy (bc->mac_addr, unit->mac_addr, 6);
bc->bssid = unit->BSSID;
bc->mode = unit->mode;
- bc->beacon_interval = unit->mac.config.csma_duration + unit->mac.config.cfp_duration;
+ bc->beacon_interval =
+ unit->mac.config.csma_duration + unit->mac.config.cfp_duration;
bc->cfp_dur = unit->mac.config.cfp_duration;
bc->snid = unit->SNID;
bc->cksum16 = crc16 (mm->d_buf, mm->d_len - 2);
@@ -788,7 +865,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
tresp_obj++;
plcp_stop_tresp (unit, RIFS_TMO);
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_ACK, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_ACK, MAC_STATUS_OK);
csma_stats (unit->stats.access.dcf_tx_acked++);
PB_ZERO (&pending_pframe->pb_nack);
/* check if it is a selective ack cause there is no seqno into */
@@ -801,7 +879,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
for (i = 0; (i < S_FRM_RESERVED) && (ack->pb_pos[i] != 255); i++)
{
PB_SET (ack->pb_pos[i], &pending_pframe->pb_nack);
- PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i, ack->pb_pos[i]));
+ PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i,
+ ack->pb_pos[i]));
}
LOCK_RESTORE (msr);
status = TX_CNF_PARTIAL;
@@ -842,7 +921,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
plcp_stop_tresp (unit, RIFS_TMO);
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_ACK, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_ACK, MAC_STATUS_OK);
csma_stats (unit->stats.access.cf_tx_acked++);
PB_ZERO (&pending_pframe->pb_nack);
/* check if it is a selective ack cause there is no seqno into */
@@ -855,7 +935,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
for (i = 0; (i < S_FRM_RESERVED) && (ack->pb_pos[i] != 255); i++)
{
PB_SET (ack->pb_pos[i], &pending_pframe->pb_nack);
- PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i, ack->pb_pos[i]));
+ PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i,
+ ack->pb_pos[i]));
}
LOCK_RESTORE (msr);
status = TX_CNF_PARTIAL;
@@ -895,7 +976,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
tresp_obj++;
plcp_stop_tresp (unit, RIFS_TMO);
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_ACK, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_ACK, MAC_STATUS_OK);
csma_stats (unit->stats.access.pcf_tx_acked++);
#ifdef CONFIG_PLC_DEBUG
tx_coord_seq_rifs = 0;
@@ -912,7 +994,8 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
for (i = 0; (i < S_FRM_RESERVED) && (ack->pb_pos[i] != 255); i++)
{
PB_SET (ack->pb_pos[i], &pending_pframe->pb_nack);
- PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i, ack->pb_pos[i]));
+ PB_LOGX (("rx_ack :\t%d : Slices %d declared false", i,
+ ack->pb_pos[i]));
}
LOCK_RESTORE (msr);
status = TX_CNF_PARTIAL;
@@ -949,24 +1032,93 @@ static void rx_ack (struct plc_drv_unit *unit, struct RxAck *ack)
default:
PB_LOG (("rx_ack: late ACK"));
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_ACK, MAC_STATUS_IGNORED);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_ACK, MAC_STATUS_IGNORED);
csma_stats (unit->stats.access.late_ack++);
break;
}
}
+#ifdef CONFIG_PLC_RTSCTS
+static void rx_cts (struct plc_drv_unit *unit, struct RxCts *cts)
+{
+ uint32_t msr;
+
+ switch (tx_coord_state)
+ {
+ case DCF_WAIT_CTS:
+ /* timeout repsonse always cancelled on rx_start event */
+ tresp_obj++;
+ plcp_stop_tresp (unit, RIFS_TMO);
+ /* TResp cancelled by plcp_rxstart isr */
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "TxCoord: [CTS DTEI=%d] Sending DATA frame...\n",
+ cts->DTEI);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_CTS, MAC_STATUS_OK);
+ /* handle transmit of data and branch to the good state */
+ /* clear flags */
+ rtsd_pframe->control->l_frm.flags = 0;
+// rejuvenate rts'd frame to avoid timeout
+#ifdef DEBUG_MULTIPOINT
+ /* record date of MAC input */
+ rtsd_pframe->mreq_date = plcp_get_timer (unit);
+#endif
+ rtsd_pframe->in_tick = get_ticks ();
+
+ tx_coord_state = DCF_CP;
+// Send rts'd frame immediately without backoff
+ if (phy_tx_data_request (unit, rtsd_pframe))
+ {
+ access_rtsd_confirm (unit, BP_ACCESS_DONE);
+ }
+ else
+ {
+ access_rtsd_confirm (unit, BP_ACCESS_FAILED);
+ }
+ pending_pframe = NULL;
+ break;
+
+
+ default:
+ PB_LOG (("rx_cts: late CTS"));
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_CTS, MAC_STATUS_IGNORED);
+ break;
+ }
+}
+#endif
+
/* tresp was stopped and no ack were received */
static void rx_other (struct plc_drv_unit *unit, struct RxOther *other)
{
switch (tx_coord_state)
{
+#ifdef CONFIG_PLC_RTSCTS
+ case DCF_WAIT_CTS:
+ /* timeout repsonse always cancelled on rx_start event */
+ tresp_obj++;
+ plcp_stop_tresp (unit, RIFS_TMO);
+
+ /* TResp cancelled by plcp_rxstart isr */
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_OTHER, MAC_STATUS_OK);
+
+ csma_stats (unit->stats.access.dcf_tx_other++);
+ csma_stats (unit->stats.access.nb_col++);
+ PB_LOG (("rx_other : TX_CNF_NO_CFACKED"));
+ goto_idle (unit);
+ pending_pframe = NULL;
+ break;
+#endif
case DCF_WAIT_ACK:
/* timeout repsonse always cancelled on rx_start event */
tresp_obj++;
plcp_stop_tresp (unit, RIFS_TMO);
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_OTHER, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_OTHER, MAC_STATUS_OK);
csma_stats (unit->stats.access.dcf_tx_other++);
csma_stats (unit->stats.access.nb_col++);
@@ -980,7 +1132,8 @@ static void rx_other (struct plc_drv_unit *unit, struct RxOther *other)
tresp_obj++;
plcp_stop_tresp (unit, RIFS_TMO);
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_OTHER, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_OTHER, MAC_STATUS_OK);
csma_stats (unit->stats.access.pcf_tx_other++);
#ifdef CONFIG_PLC_DEBUG
tx_coord_seq_rifs = 0;
@@ -995,7 +1148,8 @@ static void rx_other (struct plc_drv_unit *unit, struct RxOther *other)
tresp_obj++;
plcp_stop_tresp (unit, RIFS_TMO);
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_OTHER, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_OTHER, MAC_STATUS_OK);
csma_stats (unit->stats.access.cf_tx_other++);
PB_LOG (("rx_other 2 : TX_CNF_NO_CFACKED"));
msdu_or_mmdu_confirm (unit, pending_pframe, TX_CNF_NO_CFACKED);
@@ -1003,7 +1157,8 @@ static void rx_other (struct plc_drv_unit *unit, struct RxOther *other)
break;
default:
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RX_OTHER, MAC_STATUS_IGNORED);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RX_OTHER, MAC_STATUS_IGNORED);
break;
}
}
@@ -1019,14 +1174,41 @@ void rifs_tmo (struct plc_drv_unit *unit, struct TResp *tmo)
if (tmo->obj != tresp_obj)
{
//rt_printk("ignored rifs_tmo\n");
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RIFS_TMO, MAC_STATUS_IGNORED);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RIFS_TMO, MAC_STATUS_IGNORED);
return;
}
switch (tx_coord_state)
{
+#ifdef CONFIG_PLC_RTSCTS
+ case DCF_WAIT_CTS:
+ if (++rts_retransmit <= unit->max_rts_retrans)
+ {
+ RT_PRINTM (TRACE_RTSCTS, TRACE_INFO,
+ "TxCoord: RIFS timeout take %d! [RTS DTEI=%d]\n",
+ rts_retransmit, rts_frame->control->l_frm.DTEI);
+ /* this is surely due to a collision */
+ csma_stats (unit->stats.access.nb_col++);
+ csma_stats (unit->stats.access.dcf_tx_rifs++);
+ PB_LOG (("dcf_tx_rifs"));
+ PB_LOG (("rifs_tmo : CTS timeout"));
+// recompute the backoff period
+ random_backoff (unit);
+ tx_coord_state = DCF_CP;
+// retransmit the rts frame (with backoff)
+ GPIO_WRITE (GPIO_EVENT_TX_RTS, 1);
+ bp_backoff (unit, rts_frame);
+ GPIO_WRITE (GPIO_EVENT_TX_RTS, 0);
+ }
+ else
+ msdu_or_mmdu_confirm (unit, rtsd_pframe, TX_CNF_ERR);
+
+ break;
+#endif
case DCF_WAIT_ACK:
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RIFS_TMO, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RIFS_TMO, MAC_STATUS_OK);
/* this is surely due to a collision */
csma_stats (unit->stats.access.nb_col++);
csma_stats (unit->stats.access.dcf_tx_rifs++);
@@ -1042,7 +1224,8 @@ void rifs_tmo (struct plc_drv_unit *unit, struct TResp *tmo)
case PCF_WAIT_ACK:
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RIFS_TMO, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RIFS_TMO, MAC_STATUS_OK);
csma_stats (unit->stats.access.pcf_tx_rifs++);
PB_LOG (("pcf_tx_rifs"));
#ifdef CONFIG_PLC_DEBUG
@@ -1052,7 +1235,8 @@ void rifs_tmo (struct plc_drv_unit *unit, struct TResp *tmo)
extern int history_run;
unit->stats.access.max_seq_rifs = tx_coord_seq_rifs;
- if (history_run && unit->stats.access.max_seq_rifs > tx_coord_rifs_thr)
+ if (history_run &&
+ unit->stats.access.max_seq_rifs > tx_coord_rifs_thr)
{
unit->stats.access.max_seq_rifs = 0;
history_run = 0;
@@ -1068,7 +1252,8 @@ void rifs_tmo (struct plc_drv_unit *unit, struct TResp *tmo)
case CF_WAIT_ACK:
/* TResp cancelled by plcp_rxstart isr */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RIFS_TMO, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RIFS_TMO, MAC_STATUS_OK);
csma_stats (unit->stats.access.cf_tx_rifs++);
PB_LOG (("cf_tx_rifs"));
msdu_or_mmdu_confirm (unit, pending_pframe, TX_CNF_NO_CFACKED);
@@ -1077,7 +1262,8 @@ void rifs_tmo (struct plc_drv_unit *unit, struct TResp *tmo)
default:
/* timeout probably late */
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, RIFS_TMO, MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ RIFS_TMO, MAC_STATUS_ERROR);
break;
}
}
@@ -1091,12 +1277,14 @@ static void polled (struct plc_drv_unit *unit, struct Polled *pol)
switch (tx_coord_state)
{
case DCF_IDLE:
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, POLLED, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ POLLED, MAC_STATUS_OK);
/* station is polled */
slave_polled (unit);
break;
case DCF_CP:
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, POLLED, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ POLLED, MAC_STATUS_OK);
if (bp_cancel (unit))
{
/* station is polled */
@@ -1104,17 +1292,23 @@ static void polled (struct plc_drv_unit *unit, struct Polled *pol)
}
else
{
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "mm_poll at state DCF_CP, bp_cancel failed\n");
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "mm_poll at state DCF_CP, bp_cancel failed\n");
}
break;
case DCF_WAIT_ACK:
+#ifdef CONFIG_PLC_RTSCTS
+ case DCF_WAIT_CTS:
+#endif
case CF_WAIT_ACK:
/* rember we are polled so that once ack is received, go immediately to TX */
pending_poll = 1;
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, POLLED, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ POLLED, MAC_STATUS_OK);
break;
default:
- mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_, POLLED, MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, tx_coordination_, rx_coordination_,
+ POLLED, MAC_STATUS_ERROR);
break;
}
}
@@ -1153,6 +1347,9 @@ static void mm_beacon (struct plc_drv_unit *unit, struct MmRequest *mm_req)
break;
case DCF_TX:
+#ifdef CONFIG_PLC_RTSCTS
+ case DCF_WAIT_CTS:
+#endif
case DCF_WAIT_ACK:
pending_mm_req = *mm_req;
pending_beacon = 1;
@@ -1237,6 +1434,9 @@ static void mm_token (struct plc_drv_unit *unit, struct MmRequest *mm_req)
break;
case DCF_TX:
+#ifdef CONFIG_PLC_RTSCTS
+ case DCF_WAIT_CTS:
+#endif
case DCF_WAIT_ACK:
case PCF_WAIT_ACK:
pending_mm_req = *mm_req;
@@ -1256,7 +1456,8 @@ static void mm_token (struct plc_drv_unit *unit, struct MmRequest *mm_req)
static void mm_request (struct plc_drv_unit *unit, struct MmRequest *mm_req)
{
/* see transmit pump is started */
- mac_register_call (tx_coord_state, tx_coordination_, cco_, MM_REQUEST, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, cco_, MM_REQUEST,
+ MAC_STATUS_OK);
/* pframe->flags should be CFPOLL or CFEND */
switch (mm_req->mm_type)
@@ -1286,7 +1487,8 @@ static void mm_request (struct plc_drv_unit *unit, struct MmRequest *mm_req)
#ifdef CONFIG_PLC_VPORT
// see if the pframe own a token, and thus confirm the cco and enable backoff
-static INLINE void has_token (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static INLINE void has_token (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
/* whatever the state, if the frame carry a token, confirm it to cco */
if (pframe->control->l_frm.flags & MA_BIT_TOKEN)
@@ -1312,7 +1514,8 @@ void access (struct plc_drv_unit *unit, struct Access *acc)
case PCF_CP_END:
case PCF_SIFS:
/* master transmit */
- mac_register_call (tx_coord_state, tx_coordination_, backoff_procedure_, ACCESS, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_,
+ backoff_procedure_, ACCESS, MAC_STATUS_OK);
if (status == BP_ACCESS_DONE)
{
csma_stats (unit->stats.access.pcf_tx++);
@@ -1365,7 +1568,8 @@ void access (struct plc_drv_unit *unit, struct Access *acc)
case CF_SIFS:
/* master transmit */
- mac_register_call (tx_coord_state, tx_coordination_, backoff_procedure_, ACCESS, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_,
+ backoff_procedure_, ACCESS, MAC_STATUS_OK);
/* reenable backoff */
enable_backoff ();
@@ -1385,37 +1589,60 @@ void access (struct plc_drv_unit *unit, struct Access *acc)
break;
case DCF_CP:
- mac_register_call (tx_coord_state, tx_coordination_, backoff_procedure_, ACCESS, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_,
+ backoff_procedure_, ACCESS, MAC_STATUS_OK);
if (status == BP_ACCESS_LIMIT)
{
/* access failed with backoff_procedure */
csma_stats (unit->stats.access.dcf_access_err++);
/* WARNING: deliberately push nb_retries to end up the loop! */
pframe->nb_retries = NB_RETRY_LIMIT;
- msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_RTS)
+ tx_coord_state = DCF_WAIT_CTS;
+ else
+#endif
+ msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
}
else if (status == BP_ACCESS_FAILED)
{
csma_stats (unit->stats.access.dcf_tx_err++);
- msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_RTS)
+ goto_idle (unit);
+ else
+#endif
+ msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
}
else /* (status == BP_ACCESS_DONE) */
{
/* transmit done by backoff_procedure */
- csma_stats (unit->stats.access.dcf_tx++);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_RTS)
+ {
+ csma_stats (unit->stats.access.tx_rts++);
+ }
+ else
+#endif
+ csma_stats (unit->stats.access.dcf_tx++);
tx_coord_state = DCF_TX;
}
break;
default:
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, ACCESS, MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ ACCESS, MAC_STATUS_ERROR);
/* probably a late cancel */
break;
}
}
/* wakeup tx_coordination if it is in IDLE state */
-static void mpdu_request (struct plc_drv_unit *unit, struct MpduRequest *mpdu_req)
+static void mpdu_request (struct plc_drv_unit *unit,
+ struct MpduRequest *mpdu_req)
{
struct plcp_frame *pframe = mpdu_req->pframe;
@@ -1425,7 +1652,8 @@ static void mpdu_request (struct plc_drv_unit *unit, struct MpduRequest *mpdu_re
{
case DCF_IDLE:
/* mpdu_request immediately consummed */
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, MPDU_REQUEST, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ MPDU_REQUEST, MAC_STATUS_OK);
adhoc_transmit (unit);
break;
case PCF_IDLE:
@@ -1434,7 +1662,8 @@ static void mpdu_request (struct plc_drv_unit *unit, struct MpduRequest *mpdu_re
break;
default:
/* mpdu_request is saved and consumed in goto_idle function */
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, MPDU_REQUEST, MAC_STATUS_IGNORED);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ MPDU_REQUEST, MAC_STATUS_IGNORED);
break;
}
}
@@ -1446,7 +1675,8 @@ static void mpdu_request (struct plc_drv_unit *unit, struct MpduRequest *mpdu_re
* -2: transmit error
*/
-static void phy_tx_status_indication (struct plc_drv_unit *unit, struct PhyTxStatusIndication *tx_status)
+static void phy_tx_status_indication (struct plc_drv_unit *unit,
+ struct PhyTxStatusIndication *tx_status)
{
struct plcp_frame *pframe = (struct plcp_frame *) tx_status->pframe;
@@ -1460,8 +1690,15 @@ static void phy_tx_status_indication (struct plc_drv_unit *unit, struct PhyTxSta
case DCF_TX:
PB_LOG (("phy_tx_status_ind : dcf_tx_err"));
csma_stats (unit->stats.access.dcf_tx_err++);
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
- msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
+#ifdef CONFIG_PLC_RTSCTS
+ if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_RTS)
+ goto_idle (unit);
+ else
+#endif
+ msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
break;
case PCF_TX:
@@ -1470,7 +1707,8 @@ static void phy_tx_status_indication (struct plc_drv_unit *unit, struct PhyTxSta
#ifdef CONFIG_PLC_DEBUG
tx_coord_seq_rifs = 0;
#endif
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
/* schedule for next host */
/* acknowledge cco for this data */
mpdu_confirm (unit, pframe, TX_CNF_ERR);
@@ -1479,20 +1717,22 @@ static void phy_tx_status_indication (struct plc_drv_unit *unit, struct PhyTxSta
case CF_TX:
PB_LOG (("phy_tx_status_ind : cf_tx_err"));
csma_stats (unit->stats.access.cf_tx_err++);
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_STATUS_INDICATION, MAC_STATUS_OK);
msdu_or_mmdu_confirm (unit, pframe, TX_CNF_ERR);
break;
default:
PB_LOG (("phy_tx_status_ind : default"));
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_STATUS_INDICATION,
- MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_STATUS_INDICATION, MAC_STATUS_ERROR);
break;
}
}
/* transmit finshed correctly */
-static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConfirm *tx_cnf)
+static void phy_tx_data_confirm (struct plc_drv_unit *unit,
+ struct PhyTxDataConfirm *tx_cnf)
{
struct plcp_frame *pframe = (struct plcp_frame *) tx_cnf->pframe;
int timeout;
@@ -1505,15 +1745,24 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
switch (tx_coord_state)
{
case DCF_TX:
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
/* note that multicast frames with mcast_ack on and proxy down wait also for an ack
* cause the proxy is not aware of this change */
- if ((TO_MULTI_POINT (pframe) && !pframe->partial_ack)
#ifdef CONFIG_PLC_PPC
- || (pframe->control->ff == PPC_PROTO)
-#endif
+ if (pframe->control->ff == PPC_PROTO ||
+ (TO_MULTI_POINT (pframe) && !pframe->partial_ack) ||
+ (pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_BER) ||
+ (pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_RAW))
+#else
+ if ((TO_MULTI_POINT (pframe) && !pframe->partial_ack)
+// delete during merging RTS_CTS_branch into branch-3-9
+//#ifdef CONFIG_PLC_PPC
+// || (pframe->control->ff == PPC_PROTO)
+//#endif
|| (pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_BER)
|| (pframe->control->l_frm.subtype == MA_SUBTYPE_TEST_RAW))
+#endif
{
/* phy should listen for eof irq now */
unit->PMD->eof_irq_mask = 1;
@@ -1521,6 +1770,24 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
csma_stats (unit->stats.access.dcf_tx_alone++);
msdu_or_mmdu_confirm (unit, pframe, TX_CNF_SUCCESS);
}
+#ifdef CONFIG_PLC_RTSCTS
+ else if (pframe->control->l_frm.type == MA_TYPE_CONTROL &&
+ pframe->control->l_frm.subtype == MA_SUBTYPE_RTS)
+ {
+ /* wait for CTS confirmation */
+ tx_coord_state = DCF_WAIT_CTS;
+ pending_pframe = pframe;
+ unit->PMD->eof_irq_mask = 1;
+// timeout must be higher in chunk mode
+ if (pframe->control->l_frm.channel_id == PLCP_CID_CBPSK)
+ timeout = unit->mac.config.tresp;
+ else
+ timeout = unit->mac.config.rifs;
+// start a timer to wait for cts
+ plcp_start_tresp (unit, tresp_obj, RIFS_TMO,
+ tx_cnf->date + timeout);
+ }
+#endif
else /* wait for an ACK */
{
/* wait a confirm or a status indication */
@@ -1535,12 +1802,14 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
else
timeout = unit->mac.config.rifs;
/* start a timer to wait the ack */
- plcp_start_tresp (unit, tresp_obj, RIFS_TMO, tx_cnf->date + timeout);
+ plcp_start_tresp (unit, tresp_obj, RIFS_TMO,
+ tx_cnf->date + timeout);
}
break;
case PCF_TX:
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
/* schedule for next host */
switch (pframe->control->l_frm.type)
{
@@ -1551,7 +1820,8 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
/* wait for a cfack if unicast frame */
tx_coord_state = PCF_WAIT_ACK;
pending_pframe = pframe;
- plcp_start_tresp (unit, tresp_obj, RIFS_TMO, tx_cnf->date + unit->mac.config.tresp);
+ plcp_start_tresp (unit, tresp_obj, RIFS_TMO,
+ tx_cnf->date + unit->mac.config.tresp);
}
else
{ /* TO_MULTI_POINT(pframe) */
@@ -1569,13 +1839,15 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
break;
case CF_TX:
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_DATA_CONFIRM, MAC_STATUS_OK);
if (TO_ONE_POINT (pframe) || pframe->partial_ack /* 1 or -1 */ )
{
/* wait for a cfack if unicast frame */
tx_coord_state = CF_WAIT_ACK;
pending_pframe = pframe;
- plcp_start_tresp (unit, tresp_obj, RIFS_TMO, tx_cnf->date + unit->mac.config.tresp);
+ plcp_start_tresp (unit, tresp_obj, RIFS_TMO,
+ tx_cnf->date + unit->mac.config.tresp);
}
else
{ /* TO_MULTI_POINT(pframe) */
@@ -1585,8 +1857,8 @@ static void phy_tx_data_confirm (struct plc_drv_unit *unit, struct PhyTxDataConf
break;
default:
- mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_, PHY_TX_STATUS_INDICATION,
- MAC_STATUS_ERROR);
+ mac_register_call (tx_coord_state, tx_coordination_, phy_transmitter_,
+ PHY_TX_STATUS_INDICATION, MAC_STATUS_ERROR);
break;
}
}
@@ -1611,6 +1883,10 @@ void tx_coordination_init (struct plc_drv_unit *unit)
mm_pframe = plcp_alloc_tx_frame (DMA_POOL1_BUFFER_SIZE);
+#ifdef CONFIG_PLC_RTSCTS
+ /* create rts_frame structure */
+ make_rts (unit);
+#endif
/* start in dcf mode by default */
enable_backoff ();
}
@@ -1688,6 +1964,11 @@ OS_PROCESS (tx_coordination)
rx_ack (unit, &sig.RxAck);
GPIO_WRITE (GPIO_EVENT_RX_ACK, 0);
break;
+#ifdef CONFIG_PLC_RTSCTS
+ case RX_CTS:
+ rx_cts (unit, &sig.RxCts);
+ break;
+#endif
case RX_OTHER:
GPIO_WRITE (GPIO_EVENT_RX_OTHER, 1);
rx_other (unit, &sig.RxOther);
@@ -1746,3 +2027,8 @@ OS_PROCESS (tx_coordination)
}
rt_unmask_irq (((hal_tcb *) (tx_coordination_))->vector);
}
+
+void release_pending_frames (int size)
+{
+ pending_mpdu -= size;
+}
diff --git a/app/sm-plc-drv/src/pb_core.c b/app/sm-plc-drv/src/pb_core.c
index 02ac6e328d..77db9c0921 100644
--- a/app/sm-plc-drv/src/pb_core.c
+++ b/app/sm-plc-drv/src/pb_core.c
@@ -58,7 +58,9 @@ void __init sar_init (void)
INIT_LIST_HEAD (&pb_pool_queue);
for (i = 0; i < PB_POOL_RING_SIZE; i++)
{
- pb_desc = (struct pb_desc *) kmalloc (sizeof (struct pb_desc), GFP_ATOMIC);
+ pb_desc =
+ (struct pb_desc *) kmalloc (sizeof (struct pb_desc), GFP_ATOMIC);
+ ASSERT (pb_desc);
pb_desc->pb = (struct pb *) (PB_POOL_BASE + (i * PB_SIZE)); /* DMA not cacheable */
pb_desc->pb->header.frame_num = i; /* unique frame id */
pb_desc->nb_retries = 0;
@@ -69,7 +71,9 @@ void __init sar_init (void)
INIT_LIST_HEAD (&pb_rx_pool_queue);
for (i = 0; i < PB_POOL_RING_SIZE; i++)
{
- pb_desc = (struct pb_desc *) kmalloc (sizeof (struct pb_desc), GFP_ATOMIC);
+ pb_desc =
+ (struct pb_desc *) kmalloc (sizeof (struct pb_desc), GFP_ATOMIC);
+ ASSERT (pb_desc);
INIT_LIST_HEAD (&pb_desc->pb_list);
list_add_tail (&pb_desc->pb_list, &pb_rx_pool_queue);
}
@@ -83,7 +87,8 @@ inline struct pb_desc *pb_alloc ()
if (list_empty (&pb_pool_queue))
{
pb_desc = NULL;
- printk ("No free pb %d:%d ==>%d\n", unit->stats.pb.alloc, unit->stats.pb.free,
+ printk ("No free pb %d:%d ==>%d\n", unit->stats.pb.alloc,
+ unit->stats.pb.free,
unit->stats.pb.alloc - unit->stats.pb.free);
}
else
@@ -104,7 +109,8 @@ inline struct pb_desc *pb_rx_alloc ()
if (list_empty (&pb_rx_pool_queue))
{
pb_desc = 0;
- printk ("No free RX pb %d:%d ==>%d\n", unit->stats.pb.rx_alloc, unit->stats.pb.rx_free,
+ printk ("No free RX pb %d:%d ==>%d\n", unit->stats.pb.rx_alloc,
+ unit->stats.pb.rx_free,
unit->stats.pb.rx_alloc - unit->stats.pb.rx_free);
}
else
@@ -173,13 +179,17 @@ int pframe_pb_free (struct plcp_frame *pframe, struct pb_set *pb_nack)
{
csma_stats (unit->stats.pb.tx_pb_sacked++);
PB_LOG (("pframe_pb_free : Pb %i was SACKed", i));
- PB_LOG ((" Pb %i : %d %d %d %d", i, pb_desc->pb->header.frame_num,
- pb_desc->pb->header.pb_count, pb_desc->pb->header.pb_num, pb_desc->pb->header.pb_len));
+ PB_LOG ((" Pb %i : %d %d %d %d", i,
+ pb_desc->pb->header.frame_num,
+ pb_desc->pb->header.pb_count,
+ pb_desc->pb->header.pb_num,
+ pb_desc->pb->header.pb_len));
}
}
i++;
}
- PB_LOG (("pframe_pb_free pframe 0x%x : %d/%d Pbs remaining len=%d\n", pframe, j, i, pframe->d_len));
+ PB_LOG (("pframe_pb_free pframe 0x%x : %d/%d Pbs remaining len=%d\n",
+ pframe, j, i, pframe->d_len));
}
if ((i != 0) && (i == j) && pframe->d_len)
{
@@ -189,7 +199,8 @@ int pframe_pb_free (struct plcp_frame *pframe, struct pb_set *pb_nack)
}
if ((i != 0) && (i != j) && pframe->d_len)
{
- PB_LOG (("pframe_pb_free remains %d PBs for len\n", i - j, pframe->d_len));
+ PB_LOG (("pframe_pb_free remains %d PBs for len\n", i - j,
+ pframe->d_len));
res = 1;
}
/* pframe->state = PLCP_QUEUED;*/
@@ -201,34 +212,60 @@ void pb_dump (struct pb_desc *pb_desc)
{
}
-inline int pb_split_data (uint8_t * data, int len, struct list_head *list)
+#ifdef CONFIG_PLC_PPC
+int pb_split_data (uint8_t * data, int len, struct list_head *list,
+ struct ppc_Header *ppc_header)
+#else
+int pb_split_data (uint8_t * data, int len, struct list_head *list)
+#endif
{
uint8_t *p;
int i;
- int d_len = 0;
+ int d_len = 0, ppc_hsize = 0, len1 = len;
struct pb_desc *pb_desc;
static uint16_t frame_num = 0;
uint32_t msr;
+ uint8_t num_of_pb;
+#ifdef CONFIG_PLC_PPC
+ ppc_hsize = sizeof (struct ppc_Header);
+#endif
+ num_of_pb = (ppc_hsize + len + PB_DATA_SIZE - 1) / PB_DATA_SIZE;
+ len += ppc_hsize;
RT_PRINTM (TRACE_PB, TRACE_INFO, "Split frame %d\n", frame_num);
INIT_LIST_HEAD (list);
LOCK_SAVE (msr);
- for (p = data, i = 0; (p - data) < len; p += PB_DATA_SIZE, i++)
+ for (p = data, i = 0; (p - data) < len1; i++)
{
pb_desc = pb_alloc ();
if (pb_desc)
{
pb_desc->pb->header.frame_num = frame_num;
- pb_desc->pb->header.pb_count = ((len + PB_DATA_SIZE - 1) / PB_DATA_SIZE);
+ pb_desc->pb->header.pb_count = num_of_pb;
pb_desc->pb->header.pb_num = i;
pb_desc->nb_retries = 0;
- if (i < (pb_desc->pb->header.pb_count - 1))
+
+ if (i < (num_of_pb - 1))
pb_desc->pb->header.pb_len = PB_DATA_SIZE;
else
- pb_desc->pb->header.pb_len = ((len % PB_DATA_SIZE) ? len % PB_DATA_SIZE : PB_DATA_SIZE);
+ pb_desc->pb->header.pb_len =
+ ((len % PB_DATA_SIZE) ? len %
+ PB_DATA_SIZE : PB_DATA_SIZE);
+
+ if (i == 0)
+ {
+#ifdef CONFIG_PLC_PPC
+ memcpy (pb_desc->pb->data, (uint8_t *) ppc_header, ppc_hsize);
+#endif
+ }
+ else
+ ppc_hsize = 0;
+
+ memcpy (pb_desc->pb->data + ppc_hsize, p,
+ pb_desc->pb->header.pb_len - ppc_hsize);
+ p += pb_desc->pb->header.pb_len - ppc_hsize;
d_len += pb_desc->pb->header.pb_len;
- memcpy (pb_desc->pb->data, p, pb_desc->pb->header.pb_len);
list_add_tail (&pb_desc->pb_list, list);
}
else
@@ -243,30 +280,48 @@ inline int pb_split_data (uint8_t * data, int len, struct list_head *list)
return d_len;
}
+#ifdef CONFIG_PLC_PPC
+int pb_merge_data (uint8_t * data, struct list_head *list, int dlen,
+ struct ppc_Header *ppc_header)
+#else
int pb_merge_data (uint8_t * data, struct list_head *list, int dlen)
+#endif
{
struct list_head *list_pb, *entry, *temp;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
struct pb_desc *pb_desc;
uint32_t msr;
- int len = 0;
+ int len = 0, poc_off = 0, pb_size, pos = 0;
LOCK_SAVE (msr);
list_for_each_safe (entry, temp, list)
{
pb_desc = list_entry (entry, struct pb_desc, pb_list);
- len += pb_desc->pb->header.pb_len;
+#ifdef CONFIG_PLC_PPC
+ poc_off = 0;
+ if (pos == 0)
+ {
+ pos = 1; /* copy ppc header to specified header for further processing */
+ poc_off = sizeof (struct ppc_Header);
+ memcpy (ppc_header, pb_desc->pb->data, poc_off);
+ }
+#endif
+
+ len += pb_desc->pb->header.pb_len - poc_off;
+
if (len > dlen)
{
LOCK_RESTORE (msr);
return len;
}
- memcpy (data, pb_desc->pb->data, pb_desc->pb->header.pb_len);
- data += pb_desc->pb->header.pb_len;
+ memcpy (data, pb_desc->pb->data + poc_off,
+ pb_desc->pb->header.pb_len - poc_off);
+ /* copy_pb(data, pb_desc->pb->data); */
+ data += pb_desc->pb->header.pb_len - poc_off;
list_del (entry);
- PB_LOGX (("%s:%d merge_data for frame %d: rx_pb_waiting-- !\n", __FILE__, __LINE__,
- pb_desc->pb->header.frame_num));
+ PB_LOGX (("%s:%d merge_data for frame %d: rx_pb_waiting-- !\n",
+ __FILE__, __LINE__, pb_desc->pb->header.frame_num));
pb_rx_free (pb_desc);
unit->stats.pb.rx_pb_waiting--;
}
@@ -274,7 +329,8 @@ int pb_merge_data (uint8_t * data, struct list_head *list, int dlen)
return len;
}
-int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struct mac_frame *frame)
+int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ struct mac_frame *frame)
{
union plcp_control *ctl;
uint32_t msr;
@@ -333,12 +389,12 @@ int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struc
}
else if (pframe->host != frame->host)
{
- RT_PRINTM (TRACE_MAC, TRACE_ERROR, "mac_append_frame: different hosts (%d and %d)\n", pframe->host->index,
- frame->host->index);
+ RT_PRINTM (TRACE_MAC, TRACE_ERROR,
+ "mac_append_frame: different hosts (%d and %d)\n",
+ pframe->host->index, frame->host->index);
return -2;
}
-#ifdef SAR_OPT
/* add frame only if there is enough room in the pframe */
if (pframe->d_len + PB_SIZE <= pframe->mtu)
{
@@ -346,30 +402,43 @@ int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struc
// note that spit_data will fail
if (list_empty (&frame->mac_pb_list))
{
- frame->d_len = pb_split_data (frame->keep_buf, frame->keep_len, &frame->mac_pb_list);
- frame->pb_len = ((frame->keep_len + PB_DATA_SIZE - 1) / PB_DATA_SIZE) * PB_SIZE;
- }
+ int ppc_size = 0;
+
+#ifdef CONFIG_PLC_PPC
+ ppc_size = sizeof (struct ppc_Header);
+ frame->d_len =
+ pb_split_data (frame->keep_buf, frame->keep_len,
+ &frame->mac_pb_list,
+ &frame->header->ppc_header);
#else
- /* add frame only if there is enough room in the pframe */
- if (pframe->d_len <= pframe->mtu)
- {
+ frame->d_len =
+ pb_split_data (frame->keep_buf, frame->keep_len,
+ &frame->mac_pb_list);
#endif
+ frame->pb_len =
+ ((frame->keep_len + ppc_size + PB_DATA_SIZE -
+ 1) / PB_DATA_SIZE) * PB_SIZE;
+ }
/* test size */
if (frame->pb_len > pframe->mtu)
{
unit->stats.mac.e_tx_oversize++;
- RT_PRINTM (TRACE_PB, TRACE_ERROR, "Oversize, host=%d, mtu=%d(%d), subtype=%d, frame->pb_len=%d\n",
- frame->host->index, frame->host->mtu, pframe->mtu, frame->subtype, frame->pb_len);
+ RT_PRINTM (TRACE_PB, TRACE_ERROR,
+ "Oversize, host=%d, mtu=%d(%d), subtype=%d, frame->pb_len=%d\n",
+ frame->host->index, frame->host->mtu, pframe->mtu,
+ frame->subtype, frame->pb_len);
PB_LOG (("Oversize host %d", frame->host->index));
goto link_pb;
}
if ((pframe->d_len + frame->pb_len) > pframe->mtu)
{
- RT_PRINTM (TRACE_PB, TRACE_WARNING, "Mtu reached for frame (%d:%d):%d!\n", pframe->d_len, frame->pb_len,
- pframe->mtu);
- PB_LOG (("MTU reached for frame (%d:%d):%d", pframe->d_len, frame->pb_len, pframe->mtu));
+ RT_PRINTM (TRACE_PB, TRACE_WARNING,
+ "Mtu reached for frame (%d:%d):%d!\n", pframe->d_len,
+ frame->pb_len, pframe->mtu);
+ PB_LOG (("MTU reached for frame (%d:%d):%d", pframe->d_len,
+ frame->pb_len, pframe->mtu));
goto link_pb;
}
/* link the whole frame */
@@ -391,16 +460,20 @@ int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struc
pb_desc = list_entry (entry2, struct pb_desc, pb_list);
if ((pframe->d_len + PB_SIZE) > pframe->mtu)
{
- PB_LOG (("Mtu reached for PB :(%d+%d)>%d !\n", pframe->d_len, PB_SIZE, pframe->mtu));
+ PB_LOG (("Mtu reached for PB :(%d+%d)>%d !\n", pframe->d_len,
+ PB_SIZE, pframe->mtu));
goto pframe_end;
}
list_move_tail (entry2, &pframe->pb_list);
pframe->d_len += PB_SIZE;
frame->pb_len -= PB_SIZE;
- PB_LOG (("Frame 0x%x:%d Queued 1 pb; %d/%d PB to go !", frame, pb_desc->pb->header.frame_num,
- pb_desc->pb->header.pb_num, pb_desc->pb->header.pb_count));
+ PB_LOG (("Frame 0x%x:%d Queued 1 pb; %d/%d PB to go !", frame,
+ pb_desc->pb->header.frame_num,
+ pb_desc->pb->header.pb_num,
+ pb_desc->pb->header.pb_count));
}
- printk ("%s:%d, Not supposed to reach this point !\n", __FILE__, __LINE__);
+ printk ("%s:%d, Not supposed to reach this point !\n", __FILE__,
+ __LINE__);
}
else
{
@@ -414,8 +487,7 @@ int pb_append_frame (struct plc_drv_unit *unit, struct plcp_frame *pframe, struc
PB_ZERO (&pframe->pb_nack);
LOCK_RESTORE (msr);
- PB_LOG (("pb_append_frame for pframe 0x%x done for host %d not whole frame 0x%x linked!", pframe,
- pframe->host->index, frame));
+ PB_LOG (("pb_append_frame for pframe 0x%x done for host %d not whole frame 0x%x linked!", pframe, pframe->host->index, frame));
return -1;
}
@@ -436,7 +508,8 @@ int pb_dump_jigsaw (char *buf)
{
frame = list_entry (entry, struct mac_frame, jigsaw_frames);
- p += sprintf (p, "Dumping frame %u(%d) : ", frame->frame_num, frame->pbTimeStamp);
+ p += sprintf (p, "Dumping frame %u(%d) : ", frame->frame_num,
+ frame->pbTimeStamp);
if (!list_empty (&frame->mac_pb_list))
{
list_for_each_safe (entryPB, tempPB, &frame->mac_pb_list)
@@ -447,7 +520,8 @@ int pb_dump_jigsaw (char *buf)
// p+=sdump8(p, &pb_desc->pb, 224, 16);
}
}
- p += sprintf (p, "\t%s\n", (frame->pbMissing) ? "" : "Complete !");
+ p += sprintf (p, "\t%s\n",
+ (frame->pbMissing) ? "" : "Complete !");
}
}
@@ -472,7 +546,8 @@ void pb_age_jigsaw (int purge)
{
frame = list_entry (entry, struct mac_frame, jigsaw_frames);
- if (frame && ((frame->pbTimeStamp++ > unit->sar.reorderTh) || purge))
+ if (frame &&
+ ((frame->pbTimeStamp++ > unit->sar.reorderTh) || purge))
{
PB_LOGX (("\tFrame %d is deleted", frame->frame_num));
list_del (entry);
@@ -532,39 +607,41 @@ struct mac_frame *pb_link_jigsaw (struct pb *pb)
{
list_for_each_safe (entryPB, tempPB, &frame->mac_pb_list)
{
- pb_desc = list_entry (entryPB, struct pb_desc, pb_list);
+ pb_desc =
+ list_entry (entryPB, struct pb_desc, pb_list);
- if (pb_desc && (pb->header.pb_num < pb_desc->pb->header.pb_num) &&
- (pb->header.pb_num != pb_desc->pb->header.pb_num))
+ if (pb_desc &&
+ (pb->header.pb_num < pb_desc->pb->header.pb_num)
+ && (pb->header.pb_num !=
+ pb_desc->pb->header.pb_num))
{
/* Insert here */
list_add (&new_pb_desc->pb_list, entryPB->prev);
unit->stats.pb.rx_pb_waiting++;
- PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__,
- pb->header.frame_num, pb->header.pb_num));
+ PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__, pb->header.frame_num, pb->header.pb_num));
frame->pbMissing--;
frame->d_len += new_pb_desc->pb->header.pb_len;
done = 1;
break;
}
- if (pb_desc && (pb->header.pb_num == pb_desc->pb->header.pb_num))
+ if (pb_desc &&
+ (pb->header.pb_num == pb_desc->pb->header.pb_num))
{
unit->stats.pb.rx_pb_waiting--;
- PB_LOGX (("%s:%d link_jigsaw for frame %d: Dup. for %d, rx_pb_waiting-- !\n", __FILE__,
- __LINE__, pb->header.frame_num, pb->header.pb_num));
+ PB_LOGX (("%s:%d link_jigsaw for frame %d: Dup. for %d, rx_pb_waiting-- !\n", __FILE__, __LINE__, pb->header.frame_num, pb->header.pb_num));
pb_rx_free (new_pb_desc);
done = 1;
break;
}
}
/* insert at end if not already present on queue */
- if (!done && pb_desc && (pb->header.pb_num != pb_desc->pb->header.pb_num))
+ if (!done && pb_desc &&
+ (pb->header.pb_num != pb_desc->pb->header.pb_num))
{
done = 1;
list_add_tail (&new_pb_desc->pb_list, entryPB);
unit->stats.pb.rx_pb_waiting++;
- PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__,
- pb->header.frame_num, pb->header.pb_num));
+ PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__, pb->header.frame_num, pb->header.pb_num));
frame->pbMissing--;
frame->d_len += new_pb_desc->pb->header.pb_len;
break;
@@ -574,7 +651,8 @@ struct mac_frame *pb_link_jigsaw (struct pb *pb)
}
else
{
- printk ("Huston, we've got a problem : jigsaw_frame queued but empty!");
+ printk
+ ("Huston, we've got a problem : jigsaw_frame queued but empty!");
PB_LOG (("Huston, we've got a problem : jigsaw frame queued but empty!"));
LOCK_RESTORE (msr);
return NULL;
@@ -591,7 +669,9 @@ struct mac_frame *pb_link_jigsaw (struct pb *pb)
LOCK_SAVE (msr);
if (!frame)
{
- printk ("Error : mac_alloc_rx_frame() failed : %d frame waiting !\n", unit->stats.pb.rx_frame_waiting);
+ printk
+ ("Error : mac_alloc_rx_frame() failed : %d frame waiting !\n",
+ unit->stats.pb.rx_frame_waiting);
PB_LOG (("Error : mac_alloc_rx_frame() failed !"));
pb_rx_free (new_pb_desc);
LOCK_RESTORE (msr);
@@ -607,8 +687,7 @@ struct mac_frame *pb_link_jigsaw (struct pb *pb)
/* PB_LOG(("Adding pb %d to new frame %d ",new_pb_desc->pb->header.pb_num, frame->frame_num)); */
list_add_tail (&new_pb_desc->pb_list, &frame->mac_pb_list);
unit->stats.pb.rx_pb_waiting++;
- PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__,
- new_pb_desc->pb->header.frame_num, new_pb_desc->pb->header.pb_num));
+ PB_LOGX (("%s:%d link_jigsaw for frame %d: pb %d, rx_pb_waiting++ !\n", __FILE__, __LINE__, new_pb_desc->pb->header.frame_num, new_pb_desc->pb->header.pb_num));
/* add the frame at the rigt place in the list */
list_add (&frame->jigsaw_frames, entry->prev);
}
diff --git a/app/sm-plc-drv/src/plc_ber.c b/app/sm-plc-drv/src/plc_ber.c
index cd8c80f4a4..8d58368f2c 100644
--- a/app/sm-plc-drv/src/plc_ber.c
+++ b/app/sm-plc-drv/src/plc_ber.c
@@ -51,8 +51,8 @@ static struct pmd_band_quality __qam256;
*/
static uint8_t __slice_pattern[PLCP_MAX_SLICES * PMD_SLICE_SIZE];
-/* obtenu en regardant la mémoire de debug en TX aprés injection
- * de 16 slices (maximum que le fec peut mémoriser) */
+/* obtenu en regardant la mémoire de debug en TX aprés injection
+ * de 16 slices (maximum que le fec peut mémoriser) */
static struct bad_slice __bad_slice __attribute__ ((aligned (512)));
@@ -214,7 +214,7 @@ uint16_t read_carrier_bits(int carrier_bits,
uint32_t last_byte, high_byte;
// si le nombre de bits disponible est plus petit que le nombre de bits
- // demandés
+ // demandés
if (*mem_bits<carrier_bits) {
// read low order bits
low_bits = *mem_bits;
@@ -349,13 +349,17 @@ int common_bits (uint16_t a, uint16_t b, int bits)
return n;
}
-int plcp_carrier_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band, int group, int carrier)
+int plcp_carrier_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band,
+ int group, int carrier)
{
int mod, bits, notch;
mod = plcp_get_group_modulation (qual[band], group);
bits = pmd_get_mod_bits_per_slot (mod);
- notch = CM_GROUP (band, group, &notches[NOTCHES_DEFAULT]) | plcp_pilots_bitmap[band][group];
+ notch =
+ CM_GROUP (band, group,
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band][group];
if (((1 << carrier) & (~notch)) != 0)
{
ASSERT (bits <= 8);
@@ -367,7 +371,8 @@ int plcp_carrier_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band, i
}
}
-int plcp_group_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band, int group)
+int plcp_group_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band,
+ int group)
{
int mod, bits, ones, group_bits;
uint8_t notch;
@@ -375,7 +380,10 @@ int plcp_group_bits (struct pmd_band_quality *qual[PMD_MAX_BANDS], int band, int
mod = plcp_get_group_modulation (qual[band], group);
ASSERT (mod <= PLC_MOD_QAM256);
bits = pmd_get_mod_bits_per_slot (mod);
- notch = CM_GROUP (band, group, &notches[NOTCHES_DEFAULT]) | plcp_pilots_bitmap[band][group];
+ notch =
+ CM_GROUP (band, group,
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band][group];
ones = byte_zeroes ((uint8_t) notch);
group_bits = (ones * bits);
ASSERT (group_bits <= 64);
@@ -449,7 +457,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
struct mem_curs *curs_exp, struct mem_curs *curs_real,
struct pmd_band_quality *qual[PMD_MAX_BANDS],
int nbits, int offset, uint8_t rx_bands,
- int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND], int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
+ int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+ int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
{
int group_bits, frame_bit, errors;
@@ -467,7 +476,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
/* check rx_bands and used_bands and rx_qual */
if (!rx_bands || ((rx_bands & unit->used_bands) != rx_bands))
{
- rt_printk ("rx_bands %02x not included in used_bands %02x\r\n", rx_bands, unit->used_bands);
+ rt_printk ("rx_bands %02x not included in used_bands %02x\r\n",
+ rx_bands, unit->used_bands);
nbits = 0;
err = 1;
}
@@ -484,7 +494,9 @@ void plcp_group_ber (struct plc_drv_unit *unit,
infinite_loop++;
if (infinite_loop > 1000000)
{
- rt_printk ("loop FAST_FORMWARD rx_bands=%d band=%d group=%d\r\n", rx_bands, band, group);
+ rt_printk
+ ("loop FAST_FORMWARD rx_bands=%d band=%d group=%d\r\n",
+ rx_bands, band, group);
nbits = 0;
err = 1;
break;
@@ -505,7 +517,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
}
else
{
- rt_printk ("band %d in rx_bands but rx_qual is NULL\r\n", band);
+ rt_printk ("band %d in rx_bands but rx_qual is NULL\r\n",
+ band);
err = 1;
nbits = 0;
}
@@ -519,7 +532,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
infinite_loop++;
if (infinite_loop > 1000000)
{
- rt_printk ("loop BER rx_bands=%d band=%d group=%d\r\n", rx_bands, band, group);
+ rt_printk ("loop BER rx_bands=%d band=%d group=%d\r\n", rx_bands,
+ band, group);
err = 1;
break;
}
@@ -536,7 +550,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
if (group_bits > 32)
{
errors = mem_curs_compare (curs_real, curs_exp, 32);
- errors += mem_curs_compare (curs_real, curs_exp, group_bits - 32);
+ errors +=
+ mem_curs_compare (curs_real, curs_exp, group_bits - 32);
}
else
{
@@ -564,7 +579,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
rt_printk ("band %d ", band);
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- rt_printk ("%d/%d ", valid[band][group], invalid[band][group]);
+ rt_printk ("%d/%d ", valid[band][group],
+ invalid[band][group]);
}
rt_printk ("\n");
}
@@ -916,7 +932,8 @@ void plcp_group_ber (struct plc_drv_unit *unit,
*/
#endif
-void plcp_copy_robust_fec_mem (uint16_t * dst, uint16_t * src, int slices, int rx_bands)
+void plcp_copy_robust_fec_mem (uint16_t * dst, uint16_t * src, int slices,
+ int rx_bands)
{
int band;
@@ -966,7 +983,8 @@ void plcp_copy_fec_mem (uint16_t * dst, uint16_t * fec_src, int slices)
plcp_fec_dbg_mem_disable ();
}
-void plcp_prepare_payload_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+void plcp_prepare_payload_ber (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int band;
@@ -994,19 +1012,26 @@ void plcp_prepare_payload_ber (struct plc_drv_unit *unit, struct plcp_frame *pfr
/* copy FEC debug memory */
if (pframe->uchannel->robust)
{
- plcp_copy_robust_fec_mem ((uint16_t *) rxmem, (uint16_t *) PMD_FEC_RX_MEM, unit->ber.slices, pframe->rx_bands);
- unit->ber.nbits = PMD_SLICE_SIZE_WITH_REED_SOLOMON * PMD_BYTE_SIZE_WITH_VITERBI;
+ plcp_copy_robust_fec_mem ((uint16_t *) rxmem,
+ (uint16_t *) PMD_FEC_RX_MEM,
+ unit->ber.slices, pframe->rx_bands);
+ unit->ber.nbits =
+ PMD_SLICE_SIZE_WITH_REED_SOLOMON * PMD_BYTE_SIZE_WITH_VITERBI;
}
else
{
- plcp_copy_fec_mem ((uint16_t *) rxmem, (uint16_t *) PMD_FEC_RX_MEM, unit->ber.slices);
- unit->ber.nbits = unit->ber.slices * PMD_SLICE_SIZE_WITH_REED_SOLOMON * PMD_BYTE_SIZE_WITH_VITERBI;
+ plcp_copy_fec_mem ((uint16_t *) rxmem, (uint16_t *) PMD_FEC_RX_MEM,
+ unit->ber.slices);
+ unit->ber.nbits =
+ unit->ber.slices * PMD_SLICE_SIZE_WITH_REED_SOLOMON *
+ PMD_BYTE_SIZE_WITH_VITERBI;
}
}
-void plcp_update_group_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe,
- int pattern, int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
+void plcp_update_group_ber (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, int pattern,
+ int valid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND],
int invalid[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
{
@@ -1027,12 +1052,14 @@ void plcp_update_group_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe
src = (u16 *) rxmem;
mem_curs_init (&curs_exp_start, plcp_shrinked_patterns[pattern]);
- offset = (unit->ber.slices - 1) * PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12;
+ offset =
+ (unit->ber.slices - 1) * PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12;
mem_curs_lseek (&curs_exp_start, offset);
#ifdef DEBUG_ROBUST
rt_printk ("rx_bands=%x slices=%d nbits=%d offset=%d pattern=%d\n",
- unit->ber.rx_bands, unit->ber.slices, unit->ber.nbits, offset, pattern);
+ unit->ber.rx_bands, unit->ber.slices, unit->ber.nbits,
+ offset, pattern);
#endif
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -1047,12 +1074,14 @@ void plcp_update_group_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe
rx_bands = (1 << band);
plcp_group_ber (unit, &curs_exp, &curs_real,
- unit->ber.rx_qual, unit->ber.nbits, offset, rx_bands, valid, invalid);
+ unit->ber.rx_qual, unit->ber.nbits, offset,
+ rx_bands, valid, invalid);
#ifdef DEBUG_ROBUST
rt_printk ("band %d %x ", band, src);
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- rt_printk ("%d/%d ", valid[band][group], invalid[band][group]);
+ rt_printk ("%d/%d ", valid[band][group],
+ invalid[band][group]);
}
rt_printk ("\n");
#endif
@@ -1064,11 +1093,15 @@ void plcp_update_group_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe
}
else
{
- mem_shrink ((uint8_t *) shrinked_rxmem, (uint16_t *) rxmem, FEC_SHRINKED_MEMSIZE);
+ mem_shrink ((uint8_t *) shrinked_rxmem, (uint16_t *) rxmem,
+ FEC_SHRINKED_MEMSIZE);
if (unit->ber.slices > (FEC_MAX_SLICES - 1))
{
- offset = (unit->ber.slices - (FEC_MAX_SLICES - 1)) * (PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12);
+ offset =
+ (unit->ber.slices -
+ (FEC_MAX_SLICES -
+ 1)) * (PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12);
}
else
{
@@ -1077,7 +1110,8 @@ void plcp_update_group_ber (struct plc_drv_unit *unit, struct plcp_frame *pframe
mem_curs_init (&curs_exp, plcp_shrinked_patterns[pattern]);
mem_curs_init (&curs_real, shrinked_rxmem);
plcp_group_ber (unit, &curs_exp, &curs_real,
- unit->ber.rx_qual, unit->ber.nbits, offset, unit->ber.rx_bands, valid, invalid);
+ unit->ber.rx_qual, unit->ber.nbits, offset,
+ unit->ber.rx_bands, valid, invalid);
}
}
@@ -1399,7 +1433,8 @@ void plcp_display_payload_ber(struct plc_drv_unit *unit, int flags) {
*/
-int plcp_payload_ber_len (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int nb_slots)
+int plcp_payload_ber_len (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int nb_slots)
{
int len;
@@ -1478,7 +1513,8 @@ int plcp_toggle_pattern (int pattern)
#endif
}
-int plcp_build_ber_frame (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t * d_buf, int *d_len)
+int plcp_build_ber_frame (struct plc_drv_unit *unit, struct plcp_host *host,
+ uint8_t * d_buf, int *d_len)
{
int padding_len;
@@ -1502,19 +1538,23 @@ int plcp_build_ber_frame (struct plc_drv_unit *unit, struct plcp_host *host, uin
__tx_slices = ((*d_len) + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
/* check for alternative patterns */
- unit->test.ber_tx_payload_pattern = plcp_toggle_pattern (unit->test.ber_tx_payload_pattern);
+ unit->test.ber_tx_payload_pattern =
+ plcp_toggle_pattern (unit->test.ber_tx_payload_pattern);
if (*d_len > ((FEC_MAX_SLICES - 1) * PMD_SLICE_SIZE))
{
/* d_len is too long, add padding at the beginning of the payload */
padding_len = *d_len - (FEC_MAX_SLICES - 1) * PMD_SLICE_SIZE;
- plcp_fill_with_pattern (d_buf, unit->test.ber_tx_payload_pattern, padding_len);
- plcp_fill_with_pattern (d_buf + padding_len, unit->test.ber_tx_payload_pattern,
+ plcp_fill_with_pattern (d_buf, unit->test.ber_tx_payload_pattern,
+ padding_len);
+ plcp_fill_with_pattern (d_buf + padding_len,
+ unit->test.ber_tx_payload_pattern,
(FEC_MAX_SLICES - 1) * PMD_SLICE_SIZE);
}
else
{
- plcp_fill_with_pattern (d_buf, unit->test.ber_tx_payload_pattern, *d_len);
+ plcp_fill_with_pattern (d_buf, unit->test.ber_tx_payload_pattern,
+ *d_len);
}
return 0;
diff --git a/app/sm-plc-drv/src/plc_plcp.c b/app/sm-plc-drv/src/plc_plcp.c
index fe14799491..fe257296d8 100644
--- a/app/sm-plc-drv/src/plc_plcp.c
+++ b/app/sm-plc-drv/src/plc_plcp.c
@@ -123,7 +123,8 @@ void plcp_add_log (int line, char *file, uint16_t date, char *name, int value)
}
#endif
-int plcp_kdebug_log (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plcp_kdebug_log (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
static int i;
@@ -164,7 +165,8 @@ int plcp_kdebug_log (char *buf, char **start, off_t offset, int count, int *eof,
n,
plcp_klog[i].date,
plcp_klog[i].ra,
- plcp_klog[i].file, plcp_klog[i].name, plcp_klog[i].value, plcp_klog[i].value);
+ plcp_klog[i].file, plcp_klog[i].name,
+ plcp_klog[i].value, plcp_klog[i].value);
p += len;
count -= len;
}
@@ -234,37 +236,65 @@ void plcp_log_pmd_rx (struct plc_drv_unit *unit)
*(uint16_t *) (pmd_desyr_link_addr (3)) +
*(uint16_t *) (pmd_desyr_link_addr (4)) +
*(uint16_t *) (pmd_desyr_link_addr (5)) +
- *(uint16_t *) (pmd_desyr_link_addr (6)) + *(uint16_t *) (pmd_desyr_link_addr (7)));
+ *(uint16_t *) (pmd_desyr_link_addr (6)) +
+ *(uint16_t *) (pmd_desyr_link_addr (7)));
#else
- PLCP_LOG (date, "PHLIC_CODE_BASE+0x08", *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 0 * PMD_GOTO_SIZE));
- PLCP_LOG (date, "PHLIC_CODE_BASE+0x48", *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 1 * PMD_GOTO_SIZE));
- PLCP_LOG (date, "PHLIC_CODE_BASE+0x88", *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 2 * PMD_GOTO_SIZE));
- PLCP_LOG (date, "PHLIC_CODE_BASE+0xc8", *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 3 * PMD_GOTO_SIZE));
+ PLCP_LOG (date, "PHLIC_CODE_BASE+0x08",
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 0 * PMD_GOTO_SIZE));
+ PLCP_LOG (date, "PHLIC_CODE_BASE+0x48",
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 1 * PMD_GOTO_SIZE));
+ PLCP_LOG (date, "PHLIC_CODE_BASE+0x88",
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 2 * PMD_GOTO_SIZE));
+ PLCP_LOG (date, "PHLIC_CODE_BASE+0xc8",
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 3 * PMD_GOTO_SIZE));
PLCP_LOG (date, "PHLIC_CODE_BASE+0x108",
- *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 4 * PMD_GOTO_SIZE));
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 4 * PMD_GOTO_SIZE));
PLCP_LOG (date, "PHLIC_CODE_BASE+0x148",
- *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 5 * PMD_GOTO_SIZE));
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 5 * PMD_GOTO_SIZE));
PLCP_LOG (date, "PHLIC_CODE_BASE+0x188",
- *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 6 * PMD_GOTO_SIZE));
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 6 * PMD_GOTO_SIZE));
PLCP_LOG (date, "PHLIC_CODE_BASE+0x1c8",
- *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE + 7 * PMD_GOTO_SIZE));
-
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1900", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1900));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1a00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1a00));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1b00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1b00));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1c00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1c00));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1d00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1d00));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1e00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1e00));
- PLCP_LOG (date, "PHLIC_DATA_BASE+0x1f00", *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1f00));
-
- PLCP_LOG (date, "DESYR_LINK band 0", *(uint16_t *) (pmd_desyr_link_addr (0)));
- PLCP_LOG (date, "DESYR_LINK band 1", *(uint16_t *) (pmd_desyr_link_addr (1)));
- PLCP_LOG (date, "DESYR_LINK band 2", *(uint16_t *) (pmd_desyr_link_addr (2)));
- PLCP_LOG (date, "DESYR_LINK band 3", *(uint16_t *) (pmd_desyr_link_addr (3)));
- PLCP_LOG (date, "DESYR_LINK band 4", *(uint16_t *) (pmd_desyr_link_addr (4)));
- PLCP_LOG (date, "DESYR_LINK band 5", *(uint16_t *) (pmd_desyr_link_addr (5)));
- PLCP_LOG (date, "DESYR_LINK band 6", *(uint16_t *) (pmd_desyr_link_addr (6)));
- PLCP_LOG (date, "DESYR_LINK band 7", *(uint16_t *) (pmd_desyr_link_addr (7)));
+ *(uint16_t *) (PMD_PHLIC_CODE_REGBASE + PMD_GOTO_BASE +
+ 7 * PMD_GOTO_SIZE));
+
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1900",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1900));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1a00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1a00));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1b00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1b00));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1c00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1c00));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1d00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1d00));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1e00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1e00));
+ PLCP_LOG (date, "PHLIC_DATA_BASE+0x1f00",
+ *(uint16_t *) (PMD_PHLIC_DATA_REGBASE + 0x1f00));
+
+ PLCP_LOG (date, "DESYR_LINK band 0",
+ *(uint16_t *) (pmd_desyr_link_addr (0)));
+ PLCP_LOG (date, "DESYR_LINK band 1",
+ *(uint16_t *) (pmd_desyr_link_addr (1)));
+ PLCP_LOG (date, "DESYR_LINK band 2",
+ *(uint16_t *) (pmd_desyr_link_addr (2)));
+ PLCP_LOG (date, "DESYR_LINK band 3",
+ *(uint16_t *) (pmd_desyr_link_addr (3)));
+ PLCP_LOG (date, "DESYR_LINK band 4",
+ *(uint16_t *) (pmd_desyr_link_addr (4)));
+ PLCP_LOG (date, "DESYR_LINK band 5",
+ *(uint16_t *) (pmd_desyr_link_addr (5)));
+ PLCP_LOG (date, "DESYR_LINK band 6",
+ *(uint16_t *) (pmd_desyr_link_addr (6)));
+ PLCP_LOG (date, "DESYR_LINK band 7",
+ *(uint16_t *) (pmd_desyr_link_addr (7)));
#endif
PLCP_LOG (date, "DSP_CHMR", *(uint16_t *) (DSP_CHMR_ADDR));
@@ -314,7 +344,8 @@ void plcp_log_pmd_tx (struct plc_drv_unit *unit)
*(uint16_t *) (pmd_desyr_link_addr (3)) +
*(uint16_t *) (pmd_desyr_link_addr (4)) +
*(uint16_t *) (pmd_desyr_link_addr (5)) +
- *(uint16_t *) (pmd_desyr_link_addr (6)) + *(uint16_t *) (pmd_desyr_link_addr (7)));
+ *(uint16_t *) (pmd_desyr_link_addr (6)) +
+ *(uint16_t *) (pmd_desyr_link_addr (7)));
PLCP_LOG (unit->PMD->val_timer, "val_timer", unit->PMD->val_timer);
}
@@ -350,7 +381,8 @@ void plcp_set_efr (struct plc_drv_unit *unit, int efr)
*(uint16_t *) (PH1_EFR_ADDR) =
*(uint16_t *) (PH2_EFR_ADDR) =
*(uint16_t *) (PH3_EFR_ADDR) =
- *(uint16_t *) (PH4_EFR_ADDR) = *(uint16_t *) (PH5_EFR_ADDR) = *(uint16_t *) (PH6_EFR_ADDR) =
+ *(uint16_t *) (PH4_EFR_ADDR) = *(uint16_t *) (PH5_EFR_ADDR) =
+ *(uint16_t *) (PH6_EFR_ADDR) =
/* *(uint16_t *)(PH7_EFR_ADDR) = (efr+delta_efr);*/
*(uint16_t *) (PH7_EFR_ADDR) = (efr);
}
@@ -372,7 +404,8 @@ void plcp_set_srr (int srr)
}
/* reference space register */
-void plcp_set_periodic_ref (struct plc_drv_unit *unit, int ref_interval, int nb_ref, int nb_bands)
+void plcp_set_periodic_ref (struct plc_drv_unit *unit, int ref_interval,
+ int nb_ref, int nb_bands)
{
*(volatile uint16_t *) DSP_RSR_ADDR = ref_interval + nb_ref;
unit->PMD->rx_ref_interval = (nb_bands * ref_interval);
@@ -381,7 +414,8 @@ void plcp_set_periodic_ref (struct plc_drv_unit *unit, int ref_interval, int nb_
}
/* configure RX parameters according to the number of used bands */
-void plcp_set_rx_nb_bands (struct plc_drv_unit *unit, int nb_bands, int dsp_nb_bands)
+void plcp_set_rx_nb_bands (struct plc_drv_unit *unit, int nb_bands,
+ int dsp_nb_bands)
{
/*
@@ -407,8 +441,10 @@ void plcp_set_rx_nb_bands (struct plc_drv_unit *unit, int nb_bands, int dsp_nb_b
unit->PMD->rx_control_nb_symbols = unit->control_symbols - 1;
#if 0
- rt_printk ("nb_bands=%d dsp_nb_bands=%d nb_control=%d control_symbols=%d\n",
- nb_bands, dsp_nb_bands, unit->plcp.config.nb_control, unit->control_symbols);
+ rt_printk
+ ("nb_bands=%d dsp_nb_bands=%d nb_control=%d control_symbols=%d\n",
+ nb_bands, dsp_nb_bands, unit->plcp.config.nb_control,
+ unit->control_symbols);
#endif
}
@@ -555,29 +591,35 @@ void INLINE plcp_write_quality (void *dst, void *src)
"stmia %0!,{r2-r3}\n\t"
"add %0,%0,%2\n\t"
"stmia %0!,{r4-r5}\n\t"
- "add %0,%0,%2\n\t" "stmia %0!,{r6-r7}\n\t": /*No output */ :"r" (dst), "r" (src),
- "r" (PMD_BAND_SIZE - sizeof (struct pmd_band_quality)):"r2", "r3", "r4", "r5", "r6", "r7", "r8",
- "r9");
+ "add %0,%0,%2\n\t" "stmia %0!,{r6-r7}\n\t": /*No output */
+ :"r" (dst), "r" (src),
+ "r" (PMD_BAND_SIZE - sizeof (struct pmd_band_quality)):"r2",
+ "r3", "r4", "r5", "r6", "r7", "r8", "r9");
}
-void plcp_set_rx_quality (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_set_rx_quality (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
plcp_write_quality ((void *) (PMD_PHLIC_DATA_REGBASE +
- PMD_BAND (1) + PMD_BAND_RX_QUALITY), (void *) &uchannel->quality[1]);
+ PMD_BAND (1) + PMD_BAND_RX_QUALITY),
+ (void *) &uchannel->quality[1]);
}
// tx_quality is set before transmitting the controls, so plcp_update pilots
// is set uppon tx_more interrupt
-void plcp_set_tx_quality (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_set_tx_quality (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
- plcp_write_quality ((void *) (PMD_PHLIC_DATA_REGBASE + PMD_BAND (1) + PMD_BAND_TX_QUALITY),
+ plcp_write_quality ((void *) (PMD_PHLIC_DATA_REGBASE + PMD_BAND (1) +
+ PMD_BAND_TX_QUALITY),
(void *) &uchannel->quality[1]);
}
// switch off carriers whose quality is none to avoid detection of false start durring the payload
-void plcp_update_pilots (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_update_pilots (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int band;
@@ -669,7 +711,8 @@ int plcp_start (struct plc_drv_unit *unit)
if (nb_bands == 0)
{
RT_PRINTM (TRACE_PLCP, TRACE_WARNING,
- "at least one band should be configured for unit (0x%x) %d\n", unit, unit->id);
+ "at least one band should be configured for unit (0x%x) %d\n",
+ unit, unit->id);
return DEVICE_EUNKNOWN;
}
unit->nb_bands = nb_bands;
@@ -704,14 +747,16 @@ int plcp_start (struct plc_drv_unit *unit)
#endif
status = plcp_get_control_slots (unit, unit->control_len,
- &unit->control_symbols, &unit->plcp.config.nb_control, &dsp_rpr);
+ &unit->control_symbols,
+ &unit->plcp.config.nb_control, &dsp_rpr);
if (status < 0)
{
RT_PRINTM (TRACE_PLCP, TRACE_ERROR, "invalid control symbol count\n");
return DEVICE_EUNKNOWN;
}
- unit->plcp.config.n_slots = unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control;
+ unit->plcp.config.n_slots =
+ unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control;
plcp_chunks_start ();
@@ -752,7 +797,8 @@ void plcp_disable (struct plc_drv_unit *unit)
/* mesure du bruit sur chaque groupe de porteuse */
-void plcp_get_noise (struct plc_drv_unit *unit, uint16_t tab[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
+void plcp_get_noise (struct plc_drv_unit *unit,
+ uint16_t tab[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND])
{
int band, group;
uint16_t noise;
@@ -776,7 +822,9 @@ void plcp_register_agc (struct plcp_frame *frame)
int agc_index;
struct plcp_host *host = NULL;
- host = plcp_get_host_by_tei (frame->control->l_frm.STEI, frame->control->l_frm.bssid);
+ host =
+ plcp_get_host_by_tei (frame->control->l_frm.STEI,
+ frame->control->l_frm.bssid);
if (host != NULL)
{
@@ -812,14 +860,16 @@ uint8_t plcp_get_started_bands (struct plc_drv_unit * unit)
(pmd_band_started (2) << 2) |
(pmd_band_started (3) << 3) |
(pmd_band_started (4) << 4) |
- (pmd_band_started (5) << 5) | (pmd_band_started (6) << 6) | (pmd_band_started (7) << 7));
+ (pmd_band_started (5) << 5) | (pmd_band_started (6) << 6) |
+ (pmd_band_started (7) << 7));
return started_bands;
}
/* returns number of DATA symbols (without periodic REF symbol)
* needed to transmit len bytes. */
-int plcp_get_data_slots (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int len)
+int plcp_get_data_slots (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int len)
{
int slices = (len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
@@ -827,14 +877,16 @@ int plcp_get_data_slots (struct plc_drv_unit *unit, struct plcp_uchannel *uchann
}
/* Compute the number of slices that can fit in a number of slots */
-int plcp_fit_nb_slices (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
- int max_slices, int max_slots, int *p_data_slots, int *p_ref_slots)
+int plcp_fit_nb_slices (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int max_slices,
+ int max_slots, int *p_data_slots, int *p_ref_slots)
{
int slices = max_slices;
ASSERT (slices >= 0);
while ((slices > 0) &&
- ((uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices]) > max_slots))
+ ((uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices]) > max_slots))
{
slices--;
}
@@ -950,7 +1002,8 @@ int timer2_isr (uint32_t user_obj, uint32_t ose_date)
return ret;
}
-int plcp_sprintf_scan (struct plc_drv_unit *unit, char *buf, int len, int *pos)
+int plcp_sprintf_scan (struct plc_drv_unit *unit, char *buf, int len,
+ int *pos)
{
char *p = buf;
int cur = *pos;
@@ -959,15 +1012,18 @@ int plcp_sprintf_scan (struct plc_drv_unit *unit, char *buf, int len, int *pos)
if (!cur)
{
- p += sprintf (p, " band 1 band 2 band 3 band 4 band 5 band 6 band 7\n");
- p += sprintf (p, "sample agc min/max min/max min/max min/max min/max min/max min/max\n");
+ p += sprintf (p,
+ " band 1 band 2 band 3 band 4 band 5 band 6 band 7\n");
+ p += sprintf (p,
+ "sample agc min/max min/max min/max min/max min/max min/max min/max\n");
}
while ((cur < unit->scan.samples) && ((len - ((int) p - (int) buf)) > 80))
{
p += sprintf (p, "%6d %3d ", cur, agc_corr[cur]);
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- p += sprintf (p, "%3d/%3d ", min_corr[band][cur], max_corr[band][cur]);
+ p += sprintf (p, "%3d/%3d ", min_corr[band][cur],
+ max_corr[band][cur]);
}
p += sprintf (p, "\n");
cur++;
diff --git a/app/sm-plc-drv/src/plc_ppc.c b/app/sm-plc-drv/src/plc_ppc.c
index 812dbfcb22..3012adcd57 100644
--- a/app/sm-plc-drv/src/plc_ppc.c
+++ b/app/sm-plc-drv/src/plc_ppc.c
@@ -2,9 +2,9 @@
HEADER
--------------------------------------------------------------------------------
$RCSfile: plc_ppc.c,v $
- $Revision: 1.1.2.14 $
- $Author: mstankovic $
- $Date: 2007/09/04 07:30:33 $
+ $Revision: 1.1.2.18 $
+ $Author: jelisavcic $
+ $Date: 2007/11/23 10:51:13 $
Copyright (C) 2005 by SPiDCOM Technologies. All rights reserved.
--------------------------------------------------------------------------------*/
@@ -42,35 +42,106 @@
// >>>>> l1_proto_xmit & l1_proto_recv implementation
+struct l2_client_ops *l2_ppc;
+struct l1_client_ops *l1_ppc;
+
+int ppc_aux[5];
+
#define PPC_L1_PACKET_BUFF_SIZE 10
struct ppc_l1_packet ppc_l1_packet_storage[PPC_L1_PACKET_BUFF_SIZE];
-DECLARE_CIRBUF (ppc_l1_packet_queue, sizeof (struct ppc_l1_packet), PPC_L1_PACKET_BUFF_SIZE, ppc_l1_packet_storage);
+DECLARE_CIRBUF (ppc_l1_packet_queue, sizeof (struct ppc_l1_packet),
+ PPC_L1_PACKET_BUFF_SIZE, ppc_l1_packet_storage);
// RTAI to linux main dispatcher
// it puts request in request queue
// and triggers linux interrupt
-void ppc_r2l_pend (enum ppc_r2l_req req, void *arg)
+
+enum ppc_r2l_req_t ppc_r2l_req;
+int ppc_r2l_conflict_req_lock;
+struct l2_host *ppc_host;
+int ppc_update_all_route = 0;
+
+irqreturn_t ppc_r2l_irq_handler (void)
{
+ schedule_work (&ppc_work);
+ return IRQ_HANDLED;
+}
+void ppc_r2l_pend (enum ppc_r2l_req_t req, void *arg)
+{
+ if (req == PPCR2LREQ_CONFLICT)
+ {
+ if (ppc_r2l_conflict_req_lock)
+ // subsequent requests are discarded while previous one is not completed
+ return;
+ else
+ ppc_r2l_conflict_req_lock = 1;
+ }
+ shared_irq_type = SHARED_IRQ_PPC;
+ // store request type for use in work function
+ ppc_r2l_req = req;
+ rt_pend_linux_irq (PEPSI_R2L_IRQ);
}
void ppc_work_func (void *arg)
{
struct ppc_l1_packet *packet;
- wait_sem (ppc_r2l_lock);
- while ((packet = cirbuf_get_read_ptr (&ppc_l1_packet_queue)) != NULL)
+// struct l2_host *host;
+
+ if (ppc_r2l_req == PPCR2LREQ_PROTO_RECV)
+ {
+ wait_sem (ppc_r2l_lock);
+ while ((packet = cirbuf_get_read_ptr (&ppc_l1_packet_queue)) != NULL)
+ {
+ if (l1_ppc && l1_ppc->l1_proto_recv)
+ l1_ppc->l1_proto_recv (packet->header, packet->payload);
+ //printk("BETSY BETSY PLUTA YOT!\n");
+ }
+ signal_sem (ppc_r2l_lock);
+ }
+ else if (ppc_r2l_req == PPCR2LREQ_CONFLICT)
+ {
+ //printk(KERN_ALERT "PPCR2LREQ_CONFLICT %d %d\n", ppc_aux[0], ppc_aux[1]);
+ ppc_r2l_conflict_req_lock = 0;
+
+ if (l2_ppc && l2_ppc->l2_plcp_conflict)
+ {
+ l2_ppc->l2_plcp_conflict ();
+ // unlock for future use
+ ppc_r2l_conflict_req_lock = 0;
+ }
+ }
+ else if (ppc_r2l_req == PPCR2LREQ_TST)
+ {
+ ; //printk(KERN_ALERT "SMACK MY BITCH UP!\n");
+ }
+
+ else if (ppc_r2l_req == PPCR2LREQ_HOST_CREATE)
+ {
+ l2_ppc->l2_host_create (ppc_host);
+ signal_sem (ppc_r2l_host_lock);
+ }
+
+ else if (ppc_r2l_req == PPCR2LREQ_HOST_DELETE)
+ {
+ l2_ppc->l2_host_delete (ppc_host);
+ rt_free (ppc_host);
+ signal_sem (ppc_r2l_host_lock);
+ }
+
+ else if (ppc_r2l_req == PPCR2LREQ_HOST_UPDATE)
{
- if (l1_ppc && l1_ppc->l1_proto_recv)
- l1_ppc->l1_proto_recv (packet->header, packet->payload);
-// printk("BETSY BETSY PLUTA YOT!\n");
+ l2_ppc->l2_host_update (ppc_host);
+ signal_sem (ppc_r2l_host_lock);
}
- signal_sem (ppc_r2l_lock);
+
}
DECLARE_WORK (ppc_work, ppc_work_func, NULL);
SEMAPHORE *ppc_r2l_lock;
+SEMAPHORE *ppc_r2l_host_lock;
// Enqueue l1 packet in buff. On fail returns 0.
@@ -109,12 +180,14 @@ extern int default_ogain;
union plcp_control ppc_ctrl __attribute__ ((aligned (32)));
union plcp_control *ppc_orig_ctrl __attribute__ ((aligned (32)));
-static int cap_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices)
+static int cap_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slices)
{
int efr = unit->plcp.config.nb_ref_head
+ unit->plcp.config.nb_control
+ unit->plcp.config.nb_wait_control
- + uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices];
+ + uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices];
if (efr > 127)
efr++;
return efr;
@@ -142,7 +215,7 @@ void dump_pepsi_frame_ctrl (struct plcp_frame *pframe)
ctrl_str[i * 2 + 1] = hex_digit_to_ascii (lo_nib);
}
ctrl_str[S_FRM_RESERVED * 2] = '\0';
-// printk(KERN_ALERT "PEPSI control: %s\n", ctrl_str);
+ printk (KERN_ALERT "PEPSI control: %s\n", ctrl_str);
}
void dump_pepsi_frame_payload (struct plcp_frame *pframe)
@@ -159,7 +232,7 @@ void dump_pepsi_frame_payload (struct plcp_frame *pframe)
payload_str[i * 2 + 1] = hex_digit_to_ascii (lo_nib);
}
payload_str[PMD_SLICE_SIZE * 2] = '\0';
-// printk(KERN_ALERT "PEPSI payload: %s\n", payload_str);
+ printk (KERN_ALERT "PEPSI payload: %s\n", payload_str);
}
static char in_save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN];
@@ -167,7 +240,8 @@ static char *in_save_buf_slot[SAVE_BUFFER_LEN];
static char out_save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN];
static char *out_save_buf_slot[SAVE_BUFFER_LEN];
-void save_pepsi_hdr (struct plcp_frame *pframe, char save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN],
+void save_pepsi_hdr (struct plcp_frame *pframe,
+ char save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN],
char *save_buf_slot[SAVE_BUFFER_LEN])
{
uint8_t i;
@@ -182,7 +256,8 @@ void save_pepsi_hdr (struct plcp_frame *pframe, char save_buf[SAVE_BUFFER_LEN][P
pframe->control->l_frm.res[0] = i;
}
-void restore_pepsi_hdr (struct plcp_frame *pframe, char save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN],
+void restore_pepsi_hdr (struct plcp_frame *pframe,
+ char save_buf[SAVE_BUFFER_LEN][PPC_L1_HDR_LEN],
char *save_buf_slot[SAVE_BUFFER_LEN])
{
uint8_t slot;
@@ -240,7 +315,9 @@ void fill_pepsi_ctrl_as_mng (union plcp_control *control)
//! only for CAP, update later for SCAP also
- control->l_frm.efr = cap_efr (unit, plcp_get_uchannel_by_id (PLCP_CID_ROBUST_BPSK), control->l_frm.slices);
+ control->l_frm.efr =
+ cap_efr (unit, plcp_get_uchannel_by_id (PLCP_CID_ROBUST_BPSK),
+ control->l_frm.slices);
control->l_frm.crc = control_crc (control);
}
@@ -271,42 +348,41 @@ irqreturn_t pepsi_r2l_isr(int irq, void *dev_id, struct pt_regs *regs)
}
*/
-void pepsi_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void pepsi_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
if (failed)
- printk (KERN_ALERT "Pepsi tx failed.\n");
+ ; //printk(KERN_ALERT "Pepsi tx failed.\n");
else
{
struct plcp_frame foo;
-// printk(KERN_ALERT "Pepsi tx ok.\n");
- unit->stats.drv.tx_rcm++;
foo.control = get_pepsi_ctrl_buff ();
-
- dump_pepsi_frame_ctrl (&foo);
- dump_pepsi_frame_payload (pframe);
+ //printk(KERN_ALERT "Pepsi tx ok.\n");
+ //dump_pepsi_frame_ctrl(&foo);
+ //dump_pepsi_frame_payload(pframe);
}
plcp_free_tx_frame (pframe);
}
-void pepsi_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void pepsi_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
if (failed)
- printk (KERN_ALERT "Pepsi rx failed.\n");
+ ; //printk(KERN_ALERT "Pepsi rx failed.\n");
else
{
-// printk(KERN_ALERT "Pepsi rx ok.\n");
unit->stats.drv.rx_rcm++;
+ //printk(KERN_ALERT "Pepsi rx ok.\n");
in_restore_pepsi_hdr (pframe);
- dump_pepsi_frame_ctrl (pframe);
- dump_pepsi_frame_payload (pframe);
+ //dump_pepsi_frame_ctrl(pframe);
+ //dump_pepsi_frame_payload(pframe);
wait_sem (ppc_r2l_lock);
ppc_enqueue_l1_packet (pframe);
signal_sem (ppc_r2l_lock);
shared_irq_type = SHARED_IRQ_PPC;
- rt_pend_linux_irq (PEPSI_R2L_IRQ);
- //schedule_work(&ppc_work);
+ ppc_r2l_pend (PPCR2LREQ_PROTO_RECV, NULL);
}
plcp_free_rx_frame (pframe);
}
@@ -330,7 +406,7 @@ int l1_proto_xmit (char *msg)
pframe = plcp_alloc_tx_frame (DMA_POOL2_BUFFER_SIZE);
if (!pframe)
{
- printk (KERN_ALERT "plcp_alloc_tx_frame failed.\n");
+ PPC_PRINTK ("plcp_alloc_tx_frame failed.\n");
return 1;
}
@@ -354,6 +430,7 @@ int l1_proto_xmit (char *msg)
// could not be queued for transmission, no free slot
ASSERT (0);
plcp_free_tx_frame (pframe);
+ unit->stats.drv.tx_rcm_failed++;
return -1;
}
@@ -372,11 +449,10 @@ int l1_proto_xmit (char *msg)
mm_write (unit, pframe);
+ unit->stats.drv.tx_rcm++;
return 0;
}
-// <<<<< 1_proto_xmit & l1_proto_recv implementation
-
#define MAX_AGE_SEC 60 // duration for which the entry is obsolete
#define MAX_AGE ((MAX_AGE_SEC * 1000) / OS_TICK_MS)
@@ -407,10 +483,13 @@ int l2_carp_lookup (mac_t hw_addr, tei_t * dtei, void **priv)
{
time = get_ticks ();
/*check if obsolete */
- if (((entry->timestamp <= time) && ((time - entry->timestamp) < MAX_AGE)))
+ if (((entry->timestamp <= time) &&
+ ((time - entry->timestamp) < MAX_AGE)))
{
- *priv = entry->priv;
- *dtei = entry->dtei;
+ if (priv)
+ *priv = entry->priv;
+ if (dtei)
+ *dtei = entry->dtei;
PPC_PRINTK ("PPC l2_carp_lookup, ok, entry found\n");
LOCK_RESTORE (lock);
return 0;
@@ -428,7 +507,8 @@ int l2_carp_lookup (mac_t hw_addr, tei_t * dtei, void **priv)
/* function inserts an entry in carp table for a given MAC address*/
-int l2_carp_insert (mac_t hw_addr, tei_t dtei, void *priv, tei_t * old_dtei, void **old_priv)
+int l2_carp_insert (mac_t hw_addr, tei_t dtei, void *priv, tei_t * old_dtei,
+ void **old_priv)
{
int index = CARP_HASHFUNC (hw_addr);
uint32_t lock;
@@ -458,9 +538,11 @@ int l2_carp_insert (mac_t hw_addr, tei_t dtei, void *priv, tei_t * old_dtei, voi
list_del_init (&entry->l_hash);
memcpy (entry->DA, hw_addr, 6);
- *old_dtei = entry->dtei;
+ if (old_dtei)
+ *old_dtei = entry->dtei;
entry->dtei = dtei;
- *old_priv = entry->priv;
+ if (old_priv)
+ *old_priv = entry->priv;
entry->priv = priv;
entry->timestamp = get_ticks ();
@@ -468,7 +550,8 @@ int l2_carp_insert (mac_t hw_addr, tei_t dtei, void *priv, tei_t * old_dtei, voi
list_add_tail (&entry->l_hash, &carp_hash[index]);
LOCK_RESTORE (lock);
- PPC_PRINTK ("PPC l2_carp_insert, ok,exit\n");
+ PPC_PRINTK ("PPC l2_carp_insert %02X:%02X DTEI=%d\n", hw_addr[4],
+ hw_addr[5], dtei);
return 0;
}
@@ -546,7 +629,7 @@ int l2_carp_setup (int max_entries, int max_age)
int counter = 0;
- if (max_entries > CARP_NB_ENTRIES)
+ if ((max_entries > CARP_NB_ENTRIES) || (max_entries < 0))
{
PPC_PRINTK ("PPC l2_carp_setup invalid parameter\n");
return -EINVAL;
@@ -592,7 +675,8 @@ struct l2_host *l2_host_get_host (nid_t nid, tei_t tei)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
host = &hosts_pool[i];
- if (host->used && host->init && (host->ce_state != CE_STATE_EXITING) && host->TEI == tei && host->NID == nid)
+ if (host->used && host->init && (host->ce_state != CE_STATE_EXITING)
+ && host->TEI == tei && host->NID == nid)
return &host->ppc_host;
}
return NULL;
@@ -653,6 +737,9 @@ int l2_plcp_set_teinid (tei_t tei, nid_t nid)
int l2_repeating (int enabled)
{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ unit->PPC_repeater = (enabled);
PPC_PRINTK ("PPC l2_repeating\n");
return 0;
}
@@ -677,6 +764,7 @@ int l2_stat_get_mac_statistics (struct stat_mac *macstat)
macstat->nb_retries = unit->stats.access.nb_retries;
macstat->tx_data_failed = unit->stats.access.tx_data_failed;
macstat->tx_mng_failed = unit->stats.access.tx_mng_failed;
+ macstat->tx_rcm_failed = unit->stats.drv.tx_rcm_failed;
macstat->tx_ack = unit->stats.access.tx_ack;
macstat->tx_nack = unit->stats.access.tx_nack;
macstat->tx_sack = unit->stats.access.tx_sack;
@@ -708,10 +796,8 @@ static struct l1_ops l1_plc_ops = {
.l1_proto_xmit = l1_proto_xmit
};
-struct l2_client_ops *l2_ppc;
-struct l1_client_ops *l1_ppc;
-
-int l1_client_register (int proto, struct l1_client_ops *client_ops, struct l1_ops **ops)
+int l1_client_register (int proto, struct l1_client_ops *client_ops,
+ struct l1_ops **ops)
{
*ops = &l1_plc_ops;
l1_ppc = client_ops;
@@ -723,6 +809,20 @@ int l2_client_register (struct l2_client_ops *client_ops, struct l2_ops **ops)
{
*ops = &l2_plc_ops;
l2_ppc = client_ops;
+
+#define PPI(a) PPC_PRINTK("%s %p\n",#a,l2_ppc->a)
+
+ PPI (l2_carp_resolve);
+ PPI (l2_carp_update);
+ PPI (l2_route_next_hop);
+ PPI (l2_sched_packet_fail);
+ PPI (l2_sched_packet_succeed);
+ PPI (l2_sched_next_host);
+ PPI (l2_host_create);
+ PPI (l2_host_update);
+ PPI (l2_host_delete);
+ PPI (l2_plcp_conflict);
+
PPC_PRINTK ("PPC l2_client registered!\n");
return 0;
}
diff --git a/app/sm-plc-drv/src/plc_proc.c b/app/sm-plc-drv/src/plc_proc.c
index bbb7dc496f..83e0ac448c 100644
--- a/app/sm-plc-drv/src/plc_proc.c
+++ b/app/sm-plc-drv/src/plc_proc.c
@@ -44,6 +44,7 @@
#include "mib.h"
#include "lib_if.h"
#include "math.h"
+#include "plc_ioctl.h"
#ifndef PI
#define PI 3.14159265358979323
@@ -98,7 +99,8 @@ static void format_nid (uint8_t NID, char *s)
extern char board_version[64];
#ifndef SP_FCM3
-int proc_r_switches (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_switches (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
static ApGpio_dev_t *ApGpio_dev = (ApGpio_dev_t *) GPIO_BASE;
char *p;
@@ -113,12 +115,16 @@ int proc_r_switches (char *buf, char **start, off_t offset, int count, int *eof,
if (strcmp (board_version, "SPK200-1"))
{
for (i = 0; i < 8; i++)
- p += sprintf (p, "%c ", !(ApGpio_dev->GPIO_7_0.data_in & (0x01 << i)) ? '1' : '0');
+ p += sprintf (p, "%c ",
+ !(ApGpio_dev->GPIO_7_0.
+ data_in & (0x01 << i)) ? '1' : '0');
}
else // SPK200-e and SPK200-2
{
for (i = 0; i < 8; i++)
- p += sprintf (p, "%c ", !(ApGpio_dev->GPIO_7_0.data_in & (0x80 >> i)) ? '1' : '0');
+ p += sprintf (p, "%c ",
+ !(ApGpio_dev->GPIO_7_0.
+ data_in & (0x80 >> i)) ? '1' : '0');
}
p += sprintf (p, "\n");
@@ -126,14 +132,17 @@ int proc_r_switches (char *buf, char **start, off_t offset, int count, int *eof,
return p - buf + 1;
}
-int proc_r_memmap (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_memmap (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
char *p;
p = buf;
p += sprintf (p, "ApVic 0x1000.0000-0x13FF.FFFF 64MB\n");
- p += sprintf (p, "SRAM Configuration Register 0x14000000-0x17FFFFFF 64MB\n");
- p += sprintf (p, "SDRAM Configuration Register 0x18000000-0x1FFFFFFF 128MB\n");
+ p += sprintf (p,
+ "SRAM Configuration Register 0x14000000-0x17FFFFFF 64MB\n");
+ p += sprintf (p,
+ "SDRAM Configuration Register 0x18000000-0x1FFFFFFF 128MB\n");
p += sprintf (p, "GPIO 0x20000000-0x20FFFFFF 16MB\n");
p += sprintf (p, "Timers 0x21000000-0x21FFFFFF 16MB\n");
p += sprintf (p, "UART0 0x22000000-0x22FFFFFF 16MB\n");
@@ -149,14 +158,19 @@ int proc_r_memmap (char *buf, char **start, off_t offset, int count, int *eof, v
p += sprintf (p, "PCI 0x34000000-0x37FFFFFF 64MB\n");
p += sprintf (p, "Unused 0x38000000-0x6FFFFFFF 896MB\n");
p += sprintf (p, "SDRAM 0x%08x-0x%08x %dMB (cacheable)\n",
- SDRAM_BASE, SDRAM_BASE + SDRAM_size - DMA_ZONE_SIZE, (SDRAM_SIZE - DMA_ZONE_SIZE) / (1024 * 1024));
+ SDRAM_BASE, SDRAM_BASE + SDRAM_size - DMA_ZONE_SIZE,
+ (SDRAM_SIZE - DMA_ZONE_SIZE) / (1024 * 1024));
p += sprintf (p, "SDRAM 0x%08x-0x%08x %dMB (non cacheable)\n",
- DMA_zone_base, DMA_zone_base + DMA_ZONE_SIZE, DMA_ZONE_SIZE / (1024 * 1024));
- p += sprintf (p, "FLASH 0x%08x-0x%08x %dMB\n", FLASH_BASE, FLASH_BASE + FLASH_SIZE, FLASH_SIZE / (1024 * 1024));
+ DMA_zone_base, DMA_zone_base + DMA_ZONE_SIZE,
+ DMA_ZONE_SIZE / (1024 * 1024));
+ p += sprintf (p, "FLASH 0x%08x-0x%08x %dMB\n", FLASH_BASE,
+ FLASH_BASE + FLASH_SIZE, FLASH_SIZE / (1024 * 1024));
p += sprintf (p, "PLC microcode .TEXT 0x701500c4-0x701600b0\n");
p += sprintf (p, "PLC microcode .BSS 0x701540c0-0x70157f12\n");
- p += sprintf (p, "Unused (recopy of SDRAM) 0x8000.0000-0xEFFF.FFFF 1792MB\n");
- p += sprintf (p, "Unused (VINITHI=0 / INITRAM=0)0xF000.0000-0xFFFF.FFFF 256MB\n");
+ p += sprintf (p,
+ "Unused (recopy of SDRAM) 0x8000.0000-0xEFFF.FFFF 1792MB\n");
+ p += sprintf (p,
+ "Unused (VINITHI=0 / INITRAM=0)0xF000.0000-0xFFFF.FFFF 256MB\n");
*eof = 1;
return p - buf + 1;
}
@@ -188,7 +202,8 @@ void dotify (char *dst, char *src)
*(dst + DOT_WIDTH) = '\0';
}
-int proc_r_plcp_events (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_events (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int event, state;
struct net_device *dev = (struct net_device *) data;
@@ -218,7 +233,8 @@ int proc_r_plcp_events (char *buf, char **start, off_t offset, int count, int *e
p += sprintf (p, "\n");
#endif
p += sprintf (p, "PLCP_DEBUG_LEVEL %d\n", PLCP_DEBUG_LEVEL);
- p += sprintf (p, "PLCP current state %s\n\n", plcp_state_name[unit->plcp.state]);
+ p += sprintf (p, "PLCP current state %s\n\n",
+ plcp_state_name[unit->plcp.state]);
p += sprintf (p, "\nchecktest errors\n");
DISPLAY (plcp.rx_drop);
@@ -263,7 +279,8 @@ int proc_r_plcp_events (char *buf, char **start, off_t offset, int count, int *e
#if defined(CONFIG_PLC_CRYPTO) || defined(CONFIG_PLC_CRYPTO)
extern struct crypt_info stats;
-int proc_r_crypto_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_crypto_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
char *p;
char i;
@@ -275,16 +292,21 @@ int proc_r_crypto_stats (char *buf, char **start, off_t offset, int count, int *
for (i = 0; i < 8; i++)
p += sprintf (p, "%c", *(stats.key + i));
p += sprintf (p, "\n");
- p += sprintf (p, "--->Key Size ................= %d (bytes)\n", stats.keysize);
+ p += sprintf (p, "--->Key Size ................= %d (bytes)\n",
+ stats.keysize);
#ifdef CONFIG_PLC_CRYPTO
p += sprintf (p, "\nControl Frame\n");
- p += sprintf (p, "--->Last Encryption Time ....= %u (�sec)\n", stats.enc_control_time);
- p += sprintf (p, "--->Last Decryption Time ....= %u (�sec)\n", stats.dec_control_time);
+ p += sprintf (p, "--->Last Encryption Time ....= %u (µsec)\n",
+ stats.enc_control_time);
+ p += sprintf (p, "--->Last Decryption Time ....= %u (µsec)\n",
+ stats.dec_control_time);
#endif
#ifdef CONFIG_PLC_CRYPTO
p += sprintf (p, "\nTone Map Exchange\n");
- p += sprintf (p, "--->Last Encryption Time ....= %u (�sec)\n", stats.enc_map_time);
- p += sprintf (p, "--->Last Decryption Time ....= %u (�sec)\n", stats.dec_map_time);
+ p += sprintf (p, "--->Last Encryption Time ....= %u (µsec)\n",
+ stats.enc_map_time);
+ p += sprintf (p, "--->Last Decryption Time ....= %u (µsec)\n",
+ stats.dec_map_time);
#endif
*eof = 1;
return p - buf + 1;
@@ -316,7 +338,8 @@ extern wait_queue_head_t sn_wait_queue;
extern int sn_sleep;
extern double __glomer;
-int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
#ifdef CONFIG_PLC_DEBUG
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -346,6 +369,10 @@ int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof, void
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
+
p = buffer;
if (unit->sn.samples > 0)
{
@@ -354,12 +381,14 @@ int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof, void
{
if (band_is_used (unit, band))
{
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
{
min = __min_sn[band][carrier];
max = __max_sn[band][carrier];
avg = __avg_sn[band][carrier];
- p += sprintf (p, "%d ;%3d ;%10.4f ;%10.4f ;%10.4f\n", band, carrier, min, avg, max);
+ p += sprintf (p, "%d ;%3d ;%10.4f ;%10.4f ;%10.4f\n",
+ band, carrier, min, avg, max);
}
}
}
@@ -368,7 +397,9 @@ int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof, void
pb_max = ce_get_power (unit, &__max_sn[0][0]);
/* update the glomer */
__glomer = pb_max;
- p += sprintf (p, "the power of the noise B is min:%f, avg:%f, max:%f\n", pb_min, pb_avg, pb_max);
+ p += sprintf (p,
+ "the power of the noise B is min:%f, avg:%f, max:%f\n",
+ pb_min, pb_avg, pb_max);
}
buffer_len = p - buffer + 1;
@@ -401,7 +432,8 @@ int proc_r_sn (char *buf, char **start, off_t offset, int count, int *eof, void
return 0;
}
-int proc_r_sn_sample (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_sn_sample (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
#ifdef CONFIG_PLC_DEBUG
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -418,6 +450,9 @@ int proc_r_sn_sample (char *buf, char **start, off_t offset, int count, int *eof
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
if (unit->sn.samples > 0)
{
@@ -426,11 +461,13 @@ int proc_r_sn_sample (char *buf, char **start, off_t offset, int count, int *eof
{
if (band_is_used (unit, band))
{
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
{
// fpprintf.c now display decimal correctly
sn = __log_sn[unit->sn.sample][band][carrier];
- p += sprintf (p, "%d ;%3d ;%10.4f \n", band, carrier, sn);
+ p += sprintf (p, "%d ;%3d ;%10.4f \n", band, carrier,
+ sn);
}
}
}
@@ -469,7 +506,8 @@ int proc_r_sn_sample (char *buf, char **start, off_t offset, int count, int *eof
}
// give the spectrum on the last mesured ref symbol
-int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
static char *buffer = NULL;
@@ -492,8 +530,18 @@ int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof, void
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
+
// read the spectrum from the phy
- spectrum = (double *) kmalloc (sizeof (double) * PMD_CARRIERS_PER_BAND, GFP_KERNEL);
+ spectrum =
+ (double *) kmalloc (sizeof (double) * PMD_CARRIERS_PER_BAND,
+ GFP_KERNEL);
+
+ if (spectrum == NULL)
+ return -ENOMEM;
+
__data_agc = plcp_data_agc;
__fft_gain[band] = pmd_get_fft_gain (band);
ce_get_band_spectrum (band);
@@ -501,8 +549,11 @@ int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof, void
// FILL THE BUFFER HERE
p = buffer;
- p += sprintf (p, "\nspectrum analysis with [gain AGC]=%02x band=%d\n\n", __data_agc, band);
- p += sprintf (p, " ; ;%10s;%10s;%10s;%10s;%10s;\n", "real", "img", "mod", "phase", "amp");
+ p += sprintf (p,
+ "\nspectrum analysis with [gain AGC]=%02x band=%d\n\n",
+ __data_agc, band);
+ p += sprintf (p, " ; ;%10s;%10s;%10s;%10s;%10s;\n", "real", "img",
+ "mod", "phase", "amp");
for (carrier = 0; carrier < 128; carrier++)
{
@@ -545,7 +596,8 @@ int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof, void
}
// display the power for the seven bands at the end
power = ce_get_band_power (band, spectrum);
- p += sprintf (p, "the power of the signal on this band is %f\n", power);
+ p += sprintf (p, "the power of the signal on this band is %f\n",
+ power);
kfree (spectrum);
@@ -580,7 +632,8 @@ int proc_r_sp (char *buf, char **start, off_t offset, int count, int *eof, void
// ASSERT like proc_r_sp that a valid data frame has been received. compute
// the sn and then display the snr in dB for each BAND.
-int proc_r_snr (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_snr (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
#ifdef CONFIG_PLC_DEBUG
struct net_device *dev = (struct net_device *) data;
@@ -600,7 +653,14 @@ int proc_r_snr (char *buf, char **start, off_t offset, int count, int *eof, void
}
// read the spectrum from the phy
- spectrum = (double *) kmalloc (sizeof (double) * PMD_MAX_BANDS * PMD_CARRIERS_PER_BAND, GFP_KERNEL);
+ spectrum =
+ (double *) kmalloc (sizeof (double) * PMD_MAX_BANDS *
+ PMD_CARRIERS_PER_BAND, GFP_KERNEL);
+
+ if (spectrum == NULL)
+ return -ENOMEM;
+
+
__data_agc = plcp_data_agc;
ce_get_fft (unit);
ce_get_spectrum ((uint8_t) unit->used_bands);
@@ -611,12 +671,14 @@ int proc_r_snr (char *buf, char **start, off_t offset, int count, int *eof, void
{
if (band_is_used (unit, band))
{
- pb = ce_get_band_power (band, spectrum + band * PMD_CARRIERS_PER_BAND);
+ pb = ce_get_band_power (band,
+ spectrum + band * PMD_CARRIERS_PER_BAND);
pb_avg = ce_get_band_power (band, __avg_sn[band]);
pb_max = ce_get_band_power (band, __max_sn[band]);
snr_max = 10 * log10 (pb / pb_max);
snr_avg = 10 * log10 (pb / pb_avg);
- p += sprintf (p, "band%d: snr_avg:%f, snr_max:%f\n", band, snr_avg, snr_max);
+ p += sprintf (p, "band%d: snr_avg:%f, snr_max:%f\n", band,
+ snr_avg, snr_max);
}
}
return p - buf + 1;
@@ -625,7 +687,8 @@ int proc_r_snr (char *buf, char **start, off_t offset, int count, int *eof, void
}
// get the fft gains on the last data frame received
-int proc_r_fft (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_fft (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -645,7 +708,6 @@ int proc_r_fft (char *buf, char **start, off_t offset, int count, int *eof, void
}
-#ifdef CE_ITERATIF
struct noise_t {
int band;
int group;
@@ -657,11 +719,13 @@ struct noise_t {
extern struct noise_t noiseDistance[PMD_MAX_BANDS][PMD_GROUPS_PER_BAND];
-extern void qsort (void *aa, size_t n, size_t es, int (*cmp) (const void *, const void *));
+extern void qsort (void *aa, size_t n, size_t es,
+ int (*cmp) (const void *, const void *));
extern int Dmin (const void *a, const void *b);
extern int Dmax (const void *a, const void *b);
-int proc_r_noiseDist (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_noiseDist (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
char *p;
@@ -706,9 +770,9 @@ int proc_r_noiseDist (char *buf, char **start, off_t offset, int count, int *eof
return p - buf + 1;
}
-#endif
-int proc_r_noise (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_noise (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
char *p;
@@ -751,7 +815,8 @@ int proc_r_noise (char *buf, char **start, off_t offset, int count, int *eof, vo
return p - buf + 1;
}
-int proc_r_sph (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_sph (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
struct plcp_host *host;
@@ -786,15 +851,21 @@ int proc_r_sph (char *buf, char **start, off_t offset, int count, int *eof, void
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
+#ifdef INCLUDE_HOST_MEMO
for (band = 1; band < PMD_MAX_BANDS; band++)
{
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
- p += sprintf (p, "%d ;%3d ;%10.4f\n", band, carrier, host->info->spectrum[band][carrier]);
+ p += sprintf (p, "%d ;%3d ;%10.4f\n", band, carrier,
+ host->info->spectrum[band][carrier]);
}
}
buffer_len = p - buffer + 1;
+#endif
}
if (!buffer)
@@ -826,7 +897,8 @@ int proc_r_sph (char *buf, char **start, off_t offset, int count, int *eof, void
extern double step_power[3][9];
extern int afe_type;
-int proc_r_step_power (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_step_power (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -837,14 +909,16 @@ int proc_r_step_power (char *buf, char **start, off_t offset, int count, int *eo
for (att = 0; att < 9; att++)
{
- p += sprintf (p, "%d %f\n", (att + 1) * 10, step_power[afe_type][att]);
+ p += sprintf (p, "%d %f\n", (att + 1) * 10,
+ step_power[afe_type][att]);
}
*eof = 1;
return p - buf + 1;
}
-int proc_r_drv_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_drv_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -876,9 +950,11 @@ int proc_r_drv_stats (char *buf, char **start, off_t offset, int count, int *eof
return p - buf + 1;
}
-extern int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data);
+extern int proc_r_plcp_control_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data);
-int proc_r_plcp_rs_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_rs_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -897,23 +973,25 @@ int proc_r_plcp_rs_stats (char *buf, char **start, off_t offset, int count, int
return p - buf + 1;
}
- p += sprintf (p, "0 : %d\n1 : %d\n2 : %d\n3 : %d\n4 : %d\n5 : %d\n6 : %d\n7 : %d\n8 : %d\nFalse : %d\n",
- host->stats.rs[0],
- host->stats.rs[1],
- host->stats.rs[2],
- host->stats.rs[3],
- host->stats.rs[4],
- host->stats.rs[5], host->stats.rs[6], host->stats.rs[7], host->stats.rs[8], host->stats.rs[9]);
+ p += sprintf (p,
+ "0 : %d\n1 : %d\n2 : %d\n3 : %d\n4 : %d\n5 : %d\n6 : %d\n7 : %d\n8 : %d\nFalse : %d\n",
+ host->stats.rs[0], host->stats.rs[1], host->stats.rs[2],
+ host->stats.rs[3], host->stats.rs[4], host->stats.rs[5],
+ host->stats.rs[6], host->stats.rs[7], host->stats.rs[8],
+ host->stats.rs[9]);
p += sprintf (p,
"Frame ACK : %d\nFrame SACK : %d\nFrame NACK : %d\nce_evol_choice : %d\nGroupUp : %d\nGroupDown : %d\nnb_update_request : %d\nrate_error_host : %d\n",
- host->stats.tx_ack, host->stats.tx_sack, host->stats.tx_nack, host->stats.ce_evol_choice,
- host->nbGroupUp, host->nbGroupDown, host->stats.nb_ce_update, host->stats.rate_error_host);
+ host->stats.tx_ack, host->stats.tx_sack,
+ host->stats.tx_nack, host->stats.ce_evol_choice,
+ host->nbGroupUp, host->nbGroupDown,
+ host->stats.nb_ce_update, host->stats.rate_error_host);
*eof = 1;
return p - buf + 1;
}
-int proc_r_nbGroupUp (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_nbGroupUp (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plcp_host *host;
int index = (int) data;
@@ -935,7 +1013,8 @@ int proc_r_nbGroupUp (char *buf, char **start, off_t offset, int count, int *eof
return p - buf + 1;
}
-int proc_w_nbGroupUp (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_nbGroupUp (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
struct plcp_host *host;
int index = (int) data;
@@ -954,7 +1033,8 @@ int proc_w_nbGroupUp (struct file *file, const char *buffer, unsigned long count
return count;
}
-int proc_r_nbGroupDown (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_nbGroupDown (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plcp_host *host;
int index = (int) data;
@@ -976,7 +1056,8 @@ int proc_r_nbGroupDown (char *buf, char **start, off_t offset, int count, int *e
return p - buf + 1;
}
-int proc_w_nbGroupDown (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_nbGroupDown (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
struct plcp_host *host;
int index = (int) data;
@@ -995,7 +1076,8 @@ int proc_w_nbGroupDown (struct file *file, const char *buffer, unsigned long cou
return count;
}
-int proc_r_plcp_entropy_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_entropy_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1009,7 +1091,8 @@ int proc_r_plcp_entropy_stats (char *buf, char **start, off_t offset, int count,
return p - buf + 1;
}
-int proc_r_plcp_slices_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_slices_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1021,9 +1104,12 @@ int proc_r_plcp_slices_stats (char *buf, char **start, off_t offset, int count,
p = buf;
for (slice = 0; (slice < PLCP_MAX_SLICES) && (slices > 0); slice++)
{
- slices = unit->stats.plcp.valid_slice[slice] + unit->stats.plcp.invalid_slice[slice];
+ slices =
+ unit->stats.plcp.valid_slice[slice] +
+ unit->stats.plcp.invalid_slice[slice];
p += sprintf (p, "%d %d %d %d\n", slice,
- unit->stats.plcp.valid_slice[slice], unit->stats.plcp.invalid_slice[slice], slices);
+ unit->stats.plcp.valid_slice[slice],
+ unit->stats.plcp.invalid_slice[slice], slices);
}
*eof = 1;
return p - buf + 1;
@@ -1031,7 +1117,8 @@ int proc_r_plcp_slices_stats (char *buf, char **start, off_t offset, int count,
#ifdef CONFIG_PLC_MEASURES
-int proc_r_plcp_corr_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_corr_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1041,7 +1128,8 @@ int proc_r_plcp_corr_stats (char *buf, char **start, off_t offset, int count, in
}
#endif /* CONFIG_PLC_MEASURES */
-int proc_r_plcp_chunks_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_chunks_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1055,7 +1143,8 @@ int proc_r_plcp_chunks_stats (char *buf, char **start, off_t offset, int count,
-int proc_r_plcp_interrupts_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_interrupts_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1083,7 +1172,8 @@ int proc_r_plcp_interrupts_stats (char *buf, char **start, off_t offset, int cou
return p - buf + 1;
}
-int proc_r_nd_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_nd_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1091,32 +1181,56 @@ int proc_r_nd_stats (char *buf, char **start, off_t offset, int count, int *eof,
uint32_t reg;
p = buf;
- p += sprintf (p, "tx probe request %d\r\n", unit->stats.nd.tx_probe_request);
- p += sprintf (p, "tx probe reply %d\r\n", unit->stats.nd.tx_probe_reply);
- p += sprintf (p, "tx assoc request %d\r\n", unit->stats.nd.tx_assoc_request);
- p += sprintf (p, "tx assoc reply %d\r\n", unit->stats.nd.tx_assoc_reply);
+ p += sprintf (p, "tx probe request %d\r\n",
+ unit->stats.nd.tx_probe_request);
+ p += sprintf (p, "tx probe reply %d\r\n",
+ unit->stats.nd.tx_probe_reply);
+ p += sprintf (p, "tx assoc request %d\r\n",
+ unit->stats.nd.tx_assoc_request);
+ p += sprintf (p, "tx assoc reply %d\r\n",
+ unit->stats.nd.tx_assoc_reply);
#ifdef CONFIG_PLC_PPC
- p += sprintf (p, "tx reassoc request %d\r\n", unit->stats.nd.tx_reassoc_request);
+ p += sprintf (p, "tx reassoc request %d\r\n",
+ unit->stats.nd.tx_reassoc_request);
#endif
- p += sprintf (p, "tx diassoc request %d\r\n", unit->stats.nd.tx_disassoc_request);
- p += sprintf (p, "tx disassoc reply %d\r\n", unit->stats.nd.tx_disassoc_reply);
+ p += sprintf (p, "tx diassoc request %d\r\n",
+ unit->stats.nd.tx_disassoc_request);
+ p += sprintf (p, "tx disassoc reply %d\r\n",
+ unit->stats.nd.tx_disassoc_reply);
p += sprintf (p, "\n");
- p += sprintf (p, "rx probe request %d\r\n", unit->stats.nd.rx_probe_request);
- p += sprintf (p, "rx probe reply %d\r\n", unit->stats.nd.rx_probe_reply);
- p += sprintf (p, "rx assoc request %d\r\n", unit->stats.nd.rx_assoc_request);
- p += sprintf (p, "rx assoc reply %d\r\n", unit->stats.nd.rx_assoc_reply);
+ p += sprintf (p, "rx probe request %d\r\n",
+ unit->stats.nd.rx_probe_request);
+ p += sprintf (p, "rx probe reply %d\r\n",
+ unit->stats.nd.rx_probe_reply);
+ p += sprintf (p, "rx assoc request %d\r\n",
+ unit->stats.nd.rx_assoc_request);
+ p += sprintf (p, "rx assoc reply %d\r\n",
+ unit->stats.nd.rx_assoc_reply);
#ifdef CONFIG_PLC_PPC
- p += sprintf (p, "rx reassoc request %d\r\n", unit->stats.nd.rx_reassoc_request);
+ p += sprintf (p, "rx reassoc request %d\r\n",
+ unit->stats.nd.rx_reassoc_request);
#endif
- p += sprintf (p, "rx diassoc request %d\r\n", unit->stats.nd.rx_disassoc_request);
- p += sprintf (p, "rx disassoc reply %d\r\n", unit->stats.nd.rx_disassoc_reply);
+#ifdef PLC_RECOVERY
+ p += sprintf (p, "rx recovery request %d\r\n",
+ unit->stats.nd.rx_recovery_request);
+ p += sprintf (p, "rx recovery reply %d\r\n",
+ unit->stats.nd.rx_recovery_reply);
+#endif
+ p += sprintf (p, "rx diassoc request %d\r\n",
+ unit->stats.nd.rx_disassoc_request);
+ p += sprintf (p, "rx disassoc reply %d\r\n",
+ unit->stats.nd.rx_disassoc_reply);
p += sprintf (p, "\n");
p += sprintf (p, "nb ddSignal full %d\r\n", unit->stats.nd.q_full);
- p += sprintf (p, "nb host full %d\r\n", unit->stats.nd.host_full);
- p += sprintf (p, "no_host_free %d\r\n", unit->stats.nd.no_host_free);
- p += sprintf (p, "host_already_exist %d\r\n", unit->stats.nd.host_already_exist);
- p += sprintf (p, "nb alloc error %d\n", unit->stats.nd.nb_alloc_error);
+ p += sprintf (p, "nb host full %d\r\n",
+ unit->stats.nd.host_full);
+ p += sprintf (p, "no_host_free %d\r\n",
+ unit->stats.nd.no_host_free);
+ p += sprintf (p, "host_already_exist %d\r\n",
+ unit->stats.nd.host_already_exist);
+ p += sprintf (p, "nb alloc error %d\n",
+ unit->stats.nd.nb_alloc_error);
p += sprintf (p, "free host %d\n", unit->stats.nd.free_host);
*eof = 1;
@@ -1124,7 +1238,8 @@ int proc_r_nd_stats (char *buf, char **start, off_t offset, int count, int *eof,
}
-int proc_r_ce_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_ce_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1132,36 +1247,57 @@ int proc_r_ce_stats (char *buf, char **start, off_t offset, int count, int *eof,
uint32_t reg;
p = buf;
- p += sprintf (p, "nb send request %d\n", unit->stats.ce.nb_send_request);
- p += sprintf (p, "nb tmo request %d\n", unit->stats.ce.nb_tmo_request);
- p += sprintf (p, "nb error reply %d\n", unit->stats.ce.nb_error_reply);
- p += sprintf (p, "nb restart %d\n", unit->stats.ce.nb_restart);
+ p += sprintf (p, "nb send request %d\n",
+ unit->stats.ce.nb_send_request);
+ p += sprintf (p, "nb tmo request %d\n",
+ unit->stats.ce.nb_tmo_request);
+ p += sprintf (p, "nb error reply %d\n",
+ unit->stats.ce.nb_error_reply);
+ p += sprintf (p, "nb restart %d\n",
+ unit->stats.ce.nb_restart);
p += sprintf (p, "nb resync %d\n", unit->stats.ce.nb_resync);
- p += sprintf (p, "nb recv reply %d\n", unit->stats.ce.nb_recv_reply);
- p += sprintf (p, "nb recv request %d\n", unit->stats.ce.nb_recv_request);
- p += sprintf (p, "nb send reply %d\n", unit->stats.ce.nb_send_reply);
- p += sprintf (p, "nb send frame %d\n", unit->stats.ce.nb_send_frame);
- p += sprintf (p, "nb sent failed %d\n", unit->stats.ce.nb_sent_failed);
- p += sprintf (p, "nb sent success %d\n", unit->stats.ce.nb_sent_success);
+ p += sprintf (p, "nb recv reply %d\n",
+ unit->stats.ce.nb_recv_reply);
+ p += sprintf (p, "nb recv request %d\n",
+ unit->stats.ce.nb_recv_request);
+ p += sprintf (p, "nb send reply %d\n",
+ unit->stats.ce.nb_send_reply);
+ p += sprintf (p, "nb send frame %d\n",
+ unit->stats.ce.nb_send_frame);
+ p += sprintf (p, "nb sent failed %d\n",
+ unit->stats.ce.nb_sent_failed);
+ p += sprintf (p, "nb sent success %d\n",
+ unit->stats.ce.nb_sent_success);
p += sprintf (p, "nb id error %d\n", unit->stats.ce.id_error);
p += sprintf (p, "nb queue full %d\n", unit->stats.ce.q_full);
- p += sprintf (p, "nb uchannel full %d\n", unit->stats.ce.channel_full);
- p += sprintf (p, "nb alloc error %d\n", unit->stats.ce.nb_alloc_error);
- p += sprintf (p, "nb corrupted qual %d\n", unit->stats.ce.corrupted_qual);
+ p += sprintf (p, "nb uchannel full %d\n",
+ unit->stats.ce.channel_full);
+ p += sprintf (p, "nb alloc error %d\n",
+ unit->stats.ce.nb_alloc_error);
+ p += sprintf (p, "nb corrupted qual %d\n",
+ unit->stats.ce.corrupted_qual);
p += sprintf (p, "nb bad step %d\n", unit->stats.ce.bad_step);
- p += sprintf (p, "nb bad session %d\n", unit->stats.ce.bad_session);
- p += sprintf (p, "nb bad current id %d\n", unit->stats.ce.bad_current_id);
+ p += sprintf (p, "nb bad session %d\n",
+ unit->stats.ce.bad_session);
+ p += sprintf (p, "nb bad current id %d\n",
+ unit->stats.ce.bad_current_id);
p += sprintf (p, "nb drop ber %d\n", unit->stats.ce.drop_ber);
p += sprintf (p, "nb fake ber %d\n", unit->stats.ce.fake_ber);
p += sprintf (p, "last data agc %d\n", __data_agc);
p += sprintf (p, "last control agc %d\n", __control_agc);
- p += sprintf (p, "nb host unknown %d\n", unit->stats.ce.nb_host_unknown);
- p += sprintf (p, "nb update mcast %d\n", unit->stats.ce.nb_update_mcast);
+ p += sprintf (p, "nb host unknown %d\n",
+ unit->stats.ce.nb_host_unknown);
+ p += sprintf (p, "nb update mcast %d\n",
+ unit->stats.ce.nb_update_mcast);
p += sprintf (p, "ce update %d\n", unit->stats.ce.nb_update);
p += sprintf (p, "nb update ucast %d\n", unit->stats.ce.nb_update);
- p += sprintf (p, "nb drop measure %d\n", unit->stats.ce.drop_measure);
- p += sprintf (p, "nb fake measure %d\n", unit->stats.ce.fake_measure);
+ p += sprintf (p, "nb drop measure %d\n",
+ unit->stats.ce.drop_measure);
+ p += sprintf (p, "nb fake measure %d\n",
+ unit->stats.ce.fake_measure);
p += sprintf (p, "nb killed %d\n", unit->stats.ce.nb_killed);
+ p += sprintf (p, "nb ce timeout %d\n",
+ unit->stats.ce.nb_tmo_est);
*eof = 1;
return p - buf + 1;
@@ -1169,7 +1305,8 @@ int proc_r_ce_stats (char *buf, char **start, off_t offset, int count, int *eof,
/* used to fill /proc/net/plc/notches file : */
-int proc_r_notches (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_notches (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int n = (int) data;
@@ -1184,7 +1321,8 @@ int proc_r_notches (char *buf, char **start, off_t offset, int count, int *eof,
}
}
-int proc_w_notches (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_notches (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int n = (int) data;
@@ -1197,10 +1335,10 @@ int proc_w_notches (struct file *file, const char *buffer, unsigned long count,
if ((n >= 0) && (n < NOTCHES_NB))
{
cm = &notches[n];
- while (sscanf (p, "%d %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x",
- &band,
- &g[0], &g[1], &g[2], &g[3], &g[4], &g[5], &g[6], &g[7],
- &g[8], &g[9], &g[10], &g[11], &g[12], &g[13], &g[14], &g[15]))
+ while (sscanf
+ (p, "%d %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x",
+ &band, &g[0], &g[1], &g[2], &g[3], &g[4], &g[5], &g[6], &g[7],
+ &g[8], &g[9], &g[10], &g[11], &g[12], &g[13], &g[14], &g[15]))
{
if ((band >= 0) && (band < PMD_MAX_BANDS))
{
@@ -1234,7 +1372,8 @@ int proc_w_notches (struct file *file, const char *buffer, unsigned long count,
/* read plcp_pilots from 0 to 127 to user pilot POSITION from 1 to 128 */
-int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int band, group, k, len = 0;
int limit = count - 80; /* Don't print more than this */
@@ -1243,7 +1382,8 @@ int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count, int
int p; //number of pilot found per band
struct system_carrier_tab *systemCarrierTab;
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
@@ -1253,9 +1393,12 @@ int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count, int
{
p = 0;
len += sprintf (buf + len, "%-1d", band);
- for (group = 0; group < PMD_GROUPS_PER_BAND && p <= 2 && len <= limit; group++)
+ for (group = 0; group < PMD_GROUPS_PER_BAND && p <= 2 && len <= limit;
+ group++)
{
- pilot = systemCarrierTab->groupPilot[band * PMD_GROUPS_PER_BAND + group];
+ pilot =
+ systemCarrierTab->groupPilot[band * PMD_GROUPS_PER_BAND +
+ group];
if (pilot)
{
for (k = 0; k < 8 && p < 2; k++)
@@ -1271,7 +1414,9 @@ int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count, int
}
if (p >= 2)
{
- len += sprintf (buf + len, " band %d : %3d %3d\n", band, pilot_grp[0], pilot_grp[1]);
+ len +=
+ sprintf (buf + len, " band %d : %3d %3d\n", band,
+ pilot_grp[0], pilot_grp[1]);
}
else
len += sprintf (buf + len, " pilots not set for this group\n");
@@ -1283,7 +1428,8 @@ int proc_r_pilots_aspros (char *buf, char **start, off_t offset, int count, int
}
/* write pilot POSITION from 1 to 128 to plcp_pilots from 0 to 127 !! */
-int proc_w_pilots_aspros (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_pilots_aspros (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
int l, p1, p2;
struct net_device *dev = (struct net_device *) data;
@@ -1295,7 +1441,10 @@ int proc_w_pilots_aspros (struct file *file, const char *buffer, unsigned long c
{
// integrity test
if ((l < 0 || l >= PMD_MAX_BANDS)
- || (p1 <= 0 || p1 > PMD_CARRIERS_PER_BAND) || (p2 <= 0 || p2 > PMD_CARRIERS_PER_BAND) || (p1 >= p2))
+ || (p1 <= 0 || p1 > PMD_CARRIERS_PER_BAND) || (p2 <= 0 ||
+ p2 >
+ PMD_CARRIERS_PER_BAND)
+ || (p1 >= p2))
{
}
else
@@ -1318,7 +1467,8 @@ int proc_w_pilots_aspros (struct file *file, const char *buffer, unsigned long c
}
/* display dsp pilots POSITION (1 to 128) */
-int proc_r_pilots_dsp (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pilots_dsp (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int band, len = 0;
int index = (int) data;
@@ -1332,7 +1482,9 @@ int proc_r_pilots_dsp (char *buf, char **start, off_t offset, int count, int *eo
{
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- len += sprintf (buf + len, "%1d %3d %3d\n", band, dsp_pilots[band][0] + 1, dsp_pilots[band][1] + 1);
+ len +=
+ sprintf (buf + len, "%1d %3d %3d\n", band,
+ dsp_pilots[band][0] + 1, dsp_pilots[band][1] + 1);
}
}
else
@@ -1341,7 +1493,8 @@ int proc_r_pilots_dsp (char *buf, char **start, off_t offset, int count, int *eo
for (band = 1; band < PMD_MAX_BANDS; band++)
{
len +=
- sprintf (buf + len, "%1d %3d %3d\n", band, uchannel->pilots[band][0] + 1,
+ sprintf (buf + len, "%1d %3d %3d\n", band,
+ uchannel->pilots[band][0] + 1,
uchannel->pilots[band][1] + 1);
}
}
@@ -1351,7 +1504,8 @@ int proc_r_pilots_dsp (char *buf, char **start, off_t offset, int count, int *eo
}
/* write dsp pilots POSITION (1 to 128) */
-int proc_w_pilots_dsp (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_pilots_dsp (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
int l, p1, p2;
int index = (int) data;
@@ -1367,7 +1521,10 @@ int proc_w_pilots_dsp (struct file *file, const char *buffer, unsigned long coun
{
// integrity test
if ((l < 0 || l >= PMD_MAX_BANDS)
- || (p1 <= 0 || p1 > PMD_CARRIERS_PER_BAND) || (p2 <= 0 || p2 > PMD_CARRIERS_PER_BAND) || (p1 >= p2))
+ || (p1 <= 0 || p1 > PMD_CARRIERS_PER_BAND) || (p2 <= 0 ||
+ p2 >
+ PMD_CARRIERS_PER_BAND)
+ || (p1 >= p2))
{
}
else if (index == 0)
@@ -1387,7 +1544,8 @@ int proc_w_pilots_dsp (struct file *file, const char *buffer, unsigned long coun
return count;
}
-int proc_r_pilots_signal (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pilots_signal (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int index = (int) data;
int band, len = 0;
@@ -1395,26 +1553,32 @@ int proc_r_pilots_signal (char *buf, char **start, off_t offset, int count, int
host = plcp_get_host_by_index (index);
+#ifdef INCLUDE_HOST_MEMO
if (host->used && host->info)
{
for (band = 0; band < PMD_MAX_BANDS; band++)
{
- len += sprintf (buf + len, "%1d %5d %5d\n", band, host->info->spectrum[band][plcp_pilots[band][0]],
- host->info->spectrum[band][plcp_pilots[band][1]]);
+ len +=
+ sprintf (buf + len, "%1d %5d %5d\n", band,
+ host->info->spectrum[band][plcp_pilots[band][0]],
+ host->info->spectrum[band][plcp_pilots[band][1]]);
}
}
+#endif
*eof = 1;
return len;
}
/* used to fill /proc/net/plc/adapts file : */
-int proc_r_adapts (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_adapts (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
int i, band, max, len = 0;
struct system_carrier_tab *systemCarrierTab;
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
@@ -1440,7 +1604,11 @@ int proc_r_adapts (char *buf, char **start, off_t offset, int count, int *eof, v
len += sprintf (buf + len, "%3d", i);
for (band = 1; band < PMD_MAX_BANDS && len < (count - 4); band++)
{
- len += sprintf (buf + len, " 0x%03x", systemCarrierTab->carrierAdapt[band * PMD_CARRIERS_PER_BAND + i]);
+ len +=
+ sprintf (buf + len, " 0x%03x",
+ systemCarrierTab->carrierAdapt[band *
+ PMD_CARRIERS_PER_BAND
+ + i]);
}
len += sprintf (buf + len, "\n");
}
@@ -1450,7 +1618,8 @@ int proc_r_adapts (char *buf, char **start, off_t offset, int count, int *eof, v
}
// proc_r_host_adapts : Create par TC, 31/07/2006
-int proc_r_host_adapts (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_host_adapts (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
struct plcp_host *host = plcp_get_host_by_index ((int) data);
@@ -1462,7 +1631,8 @@ int proc_r_host_adapts (char *buf, char **start, off_t offset, int count, int *e
if (host->mapA == NULL)
{
- len += sprintf (buf + len, "This host don't have personnal adapt\n");
+ len +=
+ sprintf (buf + len, "This host don't have personnal adapt\n");
*eof = 1;
return len;
}
@@ -1487,7 +1657,9 @@ int proc_r_host_adapts (char *buf, char **start, off_t offset, int count, int *e
len += sprintf (buf + len, "%3d", i);
for (j = 1; j < PMD_MAX_BANDS && len < (count - 4); j++)
{
- len += sprintf (buf + len, " 0x%03x", host->mapA->tead[j - 1][i]);
+ len +=
+ sprintf (buf + len, " 0x%03x",
+ host->mapA->tead[j - 1][i]);
}
len += sprintf (buf + len, "\n");
}
@@ -1500,7 +1672,8 @@ int proc_r_host_adapts (char *buf, char **start, off_t offset, int count, int *e
return len;
}
-int proc_w_host_adapts (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_host_adapts (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
int decalage = 0, procfs_buffer_size, carrier;
static int passage = 0;
@@ -1546,7 +1719,8 @@ int proc_w_host_adapts (struct file *file, const char *buffer, unsigned long cou
decalage = passage * 4096;
// write data to the buffer
- if (copy_from_user (procfs_buffer + decalage, buffer, procfs_buffer_size))
+ if (copy_from_user
+ (procfs_buffer + decalage, buffer, procfs_buffer_size))
{
return -EFAULT;
}
@@ -1557,7 +1731,9 @@ int proc_w_host_adapts (struct file *file, const char *buffer, unsigned long cou
drv_lock (unit);
p = (char *) procfs_buffer;
- while (sscanf (p, "%d 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x", &carrier, &v1, &v2, &v3, &v4, &v5, &v6, &v7))
+ while (sscanf
+ (p, "%d 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x", &carrier, &v1,
+ &v2, &v3, &v4, &v5, &v6, &v7))
{
if (carrier >= 0 && carrier < PMD_CARRIERS_PER_BAND)
@@ -1592,7 +1768,8 @@ int proc_w_host_adapts (struct file *file, const char *buffer, unsigned long cou
}
-int proc_w_adapts (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_adapts (struct file *file, const char *buffer, unsigned long count,
+ void *data)
{
// the "decalage" enables the writing of a
//proc file with a very big size
@@ -1628,7 +1805,8 @@ int proc_w_adapts (struct file *file, const char *buffer, unsigned long count, v
if (count < 4096)
{ //last round
// parse_adapts(*procfs_buffer)
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
@@ -1636,17 +1814,32 @@ int proc_w_adapts (struct file *file, const char *buffer, unsigned long count, v
// get previous adapts, then change the carriers for each seven bands
plcp_getAdapts (systemCarrierTab);
p = (char *) procfs_buffer;
- while (sscanf (p, "%d 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x", &l, &v1, &v2, &v3, &v4, &v5, &v6, &v7))
+ while (sscanf
+ (p, "%d 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x", &l, &v1, &v2, &v3,
+ &v4, &v5, &v6, &v7))
{
if (l >= 0 && l < PMD_CARRIERS_PER_BAND)
{
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND] = (uint16_t) v1;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 2] = (uint16_t) v2;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 3] = (uint16_t) v3;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 4] = (uint16_t) v4;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 5] = (uint16_t) v5;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 6] = (uint16_t) v6;
- systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND * 7] = (uint16_t) v7;
+ systemCarrierTab->carrierAdapt[l + PMD_CARRIERS_PER_BAND] =
+ (uint16_t) v1;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 2] =
+ (uint16_t) v2;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 3] =
+ (uint16_t) v3;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 4] =
+ (uint16_t) v4;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 5] =
+ (uint16_t) v5;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 6] =
+ (uint16_t) v6;
+ systemCarrierTab->carrierAdapt[l +
+ PMD_CARRIERS_PER_BAND * 7] =
+ (uint16_t) v7;
}
// goto next line
@@ -1667,7 +1860,8 @@ int proc_w_adapts (struct file *file, const char *buffer, unsigned long count, v
}
#ifdef CONFIG_PLC_VPORT
-int proc_r_vports (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_vports (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1683,10 +1877,13 @@ int proc_r_vports (char *buf, char **start, off_t offset, int count, int *eof, v
for (i = 0; i < PLC_MAX_VPORTS; i++)
{
- if (vport_desc (unit->vports[i], &peer_addr, &peer_bssid, &peer_tei, &localtei) >= 0)
+ if (vport_desc
+ (unit->vports[i], &peer_addr, &peer_bssid, &peer_tei,
+ &localtei) >= 0)
{
p += sprintf (p, "Name: plc0lnk%u\n", i);
- p += sprintf (p, "Addr: " IEEE802_FMT "\n", IEEE802_VAL (peer_addr.addr), peer_bssid);
+ p += sprintf (p, "Addr: " IEEE802_FMT "\n",
+ IEEE802_VAL (peer_addr.addr), peer_bssid);
format_bssid (peer_bssid, str);
p += sprintf (p, "Peer BSSID: %s\n", str);
format_tei (peer_tei, str);
@@ -1728,7 +1925,8 @@ const char *plc_if_mode_str (plc_if_mode_t mode)
extern char *(*fphook) (char *, char *, double);
extern char *fnumber (char *buf, char *end, double fnum);
-int plc_dump_profile (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plc_dump_profile (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int i, j;
char *p;
@@ -1750,12 +1948,17 @@ int plc_dump_profile (char *buf, char **start, off_t offset, int count, int *eof
{
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
for (i = 0; i < MAX_PROF_ENTRY; i++)
{
for (j = 0; j < MAX_HASH_COL; j++)
{
- namePfn = kallsyms_lookup ((unsigned long) profEntryPrev[i][j].fn, &size, &koffset, &modname, namebuf);
+ namePfn =
+ kallsyms_lookup ((unsigned long) profEntryPrev[i][j].fn,
+ &size, &koffset, &modname, namebuf);
addrEntry2 = (unsigned long) profEntryPrev[i][j].fn - koffset;
entry2 = find_entry ((void *) addrEntry2);
if (entry2 && entry2->time)
@@ -1777,35 +1980,53 @@ int plc_dump_profile (char *buf, char **start, off_t offset, int count, int *eof
}
p += sprintf (p, "Total time = %llu\n", total_time);
if (type == 1)
- p += sprintf (p, "%-12s\t%9s\t%-5lls\t%9s\t%s\n", "Total time", "Count", "Av.Time", "%", "Func");
+ p += sprintf (p, "%-12s\t%9s\t%-5lls\t%9s\t%s\n", "Total time",
+ "Count", "Av.Time", "%", "Func");
else if (type == 2)
- p += sprintf (p, "%9s\t%-12lls\t%-5lls\t%9s\t%s\n", "Count", "Total time", "Av.Time", "%", "Func");
+ p += sprintf (p, "%9s\t%-12lls\t%-5lls\t%9s\t%s\n", "Count",
+ "Total time", "Av.Time", "%", "Func");
else if (type == 3)
- p += sprintf (p, "%-5lls\t%9s\t%-12lls\t%9s\t%s\n", "AV.Time", "Total time", "Count", "%", "Func");
+ p += sprintf (p, "%-5lls\t%9s\t%-12lls\t%9s\t%s\n", "AV.Time",
+ "Total time", "Count", "%", "Func");
else if (type == 4)
- p += sprintf (p, "%9s\t%-12lls\t%9s\t%-5lls\t%s\n", "%", "Total time", "Count", "Av.Time", "Func");
+ p += sprintf (p, "%9s\t%-12lls\t%9s\t%-5lls\t%s\n", "%",
+ "Total time", "Count", "Av.Time", "Func");
for (i = 0; i < MAX_PROF_ENTRY; i++)
{
for (j = 0; j < MAX_HASH_COL; j++)
{
if (profEntry[i][j].fn && profEntry[i][j].time)
{
- nameFn = kallsyms_lookup ((unsigned long) profEntry[i][j].fn, &size, &koffset, &modname, namebuf);
- percent = (double) profEntry[i][j].time / (double) total_time;
+ nameFn =
+ kallsyms_lookup ((unsigned long) profEntry[i][j].fn,
+ &size, &koffset, &modname, namebuf);
+ percent =
+ (double) profEntry[i][j].time / (double) total_time;
percent *= 100;
if (type == 1)
- p += sprintf (p, "%-12llu\t%9d\t%-5llu\t%lf\t%s\n", profEntry[i][j].time, profEntry[i][j].count,
- profEntry[i][j].time / profEntry[i][j].count, percent, nameFn);
+ p += sprintf (p, "%-12llu\t%9d\t%-5llu\t%lf\t%s\n",
+ profEntry[i][j].time,
+ profEntry[i][j].count,
+ profEntry[i][j].time /
+ profEntry[i][j].count, percent, nameFn);
else if (type == 2)
- p += sprintf (p, "%9d\t%-12llu\t%-5llu\t%lf\t%s\n", profEntry[i][j].count, profEntry[i][j].time,
- profEntry[i][j].time / profEntry[i][j].count, percent, nameFn);
+ p += sprintf (p, "%9d\t%-12llu\t%-5llu\t%lf\t%s\n",
+ profEntry[i][j].count,
+ profEntry[i][j].time,
+ profEntry[i][j].time /
+ profEntry[i][j].count, percent, nameFn);
else if (type == 3)
p += sprintf (p, "%-5llu\t%9d\t%-12llu\t%lf\t%s\n",
- profEntry[i][j].time / profEntry[i][j].count, profEntry[i][j].count,
+ profEntry[i][j].time /
+ profEntry[i][j].count,
+ profEntry[i][j].count,
profEntry[i][j].time, percent, nameFn);
else if (type == 4)
- p += sprintf (p, "%lf\t%-9llu\t%9d\t%-5llu\t%s\n", percent,
- profEntry[i][j].time / profEntry[i][j].count, profEntry[i][j].count,
+ p += sprintf (p, "%lf\t%-9llu\t%9d\t%-5llu\t%s\n",
+ percent,
+ profEntry[i][j].time /
+ profEntry[i][j].count,
+ profEntry[i][j].count,
profEntry[i][j].time, nameFn);
}
}
@@ -1840,7 +2061,8 @@ int plc_dump_profile (char *buf, char **start, off_t offset, int count, int *eof
}
}
-int plc_dump_profile2 (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plc_dump_profile2 (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int i, j;
char *p;
@@ -1859,6 +2081,9 @@ int plc_dump_profile2 (char *buf, char **start, off_t offset, int count, int *eo
{
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
for (i = 0; i < MAX_PROF_ENTRY; i++)
{
@@ -1866,8 +2091,12 @@ int plc_dump_profile2 (char *buf, char **start, off_t offset, int count, int *eo
{
if (profEntry[i][j].fn)
{
- nameFn = kallsyms_lookup ((unsigned long) profEntry[i][j].fn, &size, &koffset, &modname, namebuf);
- p += sprintf (p, "%10llu\t%21llu\t%d\t%s\n", profEntry[i][j].time, profEntry[i][j].count, nameFn);
+ nameFn =
+ kallsyms_lookup ((unsigned long) profEntry[i][j].fn,
+ &size, &koffset, &modname, namebuf);
+ p += sprintf (p, "%10llu\t%21llu\t%d\t%s\n",
+ profEntry[i][j].time, profEntry[i][j].count,
+ nameFn);
}
}
}
@@ -1907,7 +2136,8 @@ int plc_dump_profile2 (char *buf, char **start, off_t offset, int count, int *eo
#error "Problem here"
#endif
-int plc_conf_ce (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plc_conf_ce (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -1920,7 +2150,8 @@ int plc_conf_ce (char *buf, char **start, off_t offset, int count, int *eof, voi
for (step = 0; step < CE_NB_STEPS; step++)
{
- p += sprintf (p, "%2u: %20s [%s]\n", step, ce_step_name[step], (unit->ce.steps[step]) ? "enabled" : "disabled");
+ p += sprintf (p, "%2u: %20s [%s]\n", step, ce_step_name[step],
+ (unit->ce.steps[step]) ? "enabled" : "disabled");
if (unit->ce.steps[step])
{
@@ -1940,7 +2171,9 @@ int plc_conf_ce (char *buf, char **start, off_t offset, int count, int *eof, voi
}
time_ce_second = ((u32) (unit->ce.period * nb_step_of_CE) / 1000) % 60;
- time_ce_minute = (((u32) (unit->ce.period * nb_step_of_CE) / 1000) - time_ce_second) / 60;
+ time_ce_minute =
+ (((u32) (unit->ce.period * nb_step_of_CE) / 1000) -
+ time_ce_second) / 60;
p += sprintf (p, "\n");
p += sprintf (p, "NB of step : %2u\n", nb_step_of_CE);
@@ -1948,14 +2181,16 @@ int plc_conf_ce (char *buf, char **start, off_t offset, int count, int *eof, voi
p += sprintf (p, "\n");
p += sprintf (p, "Timing between:\n");
p += sprintf (p, " - 2 step : %5ums\n", unit->ce.period);
- p += sprintf (p, " - 2 CE : %2umin %2us\n", time_ce_minute, time_ce_second);
+ p += sprintf (p, " - 2 CE : %2umin %2us\n", time_ce_minute,
+ time_ce_second);
p += sprintf (p, "\n");
*eof = 1;
return p - buf + 1;
}
-int plc_dump_conf (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plc_dump_conf (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
extern int coef_corr;
int band;
@@ -1987,14 +2222,16 @@ int plc_dump_conf (char *buf, char **start, off_t offset, int count, int *eof, v
#ifdef CONFIG_PLC_MCAST
LOCK_SAVE (msr);
p += sprintf (p, "multicast stream listened:\n");
- p += sprintf (p, "%7s %7s multicast group %4s %4s\n", "mtei", "proxy", "cid", "idx");
+ p += sprintf (p, "%7s %7s multicast group %4s %4s\n", "mtei", "proxy",
+ "cid", "idx");
for (band = TEI_FIRST_MCAST; band <= TEI_LAST_MCAST; band++)
{
ms = get_multicast_stream (band);
if (ms && ms->own)
{
p += sprintf (p, "%7d %7d " IEEE802_FMT " %4d %4d %p\n",
- band, ms->proxy_tei, IEEE802_VAL (ms->mc_group), ms->channel_id, ms->channel_index, &ms->own);
+ band, ms->proxy_tei, IEEE802_VAL (ms->mc_group),
+ ms->channel_id, ms->channel_index, &ms->own);
}
}
LOCK_RESTORE (msr);
@@ -2003,42 +2240,64 @@ int plc_dump_conf (char *buf, char **start, off_t offset, int count, int *eof, v
/* mac control */
p += sprintf (p, "\n");
p += sprintf (p, "tmo_tx %d ms\n", unit->mac.config.tmo_tx);
- p += sprintf (p, "max_retries %d\n", unit->mac.config.max_retries);
+ p += sprintf (p, "max_retries %d\n",
+ unit->mac.config.max_retries);
- p += sprintf (p, "early_tx %d\n", unit->plcp.config.early_tx_start);
+ p += sprintf (p, "early_tx %d\n",
+ unit->plcp.config.early_tx_start);
p += sprintf (p, "plcp mode .%s|%s|%s\n",
unit->plcp.config.fcs ? "fcs" : "no fcs",
unit->plcp.config.vote ? "voted" : "no vote",
- unit->plcp.config.hamming.enable ? "hamming" : "no hamming");
+ unit->plcp.config.hamming.
+ enable ? "hamming" : "no hamming");
p += sprintf ("plcp mode .%s|%s|%s|%s\n",
unit->plcp.config.fcs ? "fcs" : "no fcs",
unit->plcp.config.vote ? "voted" : "no vote",
unit->plcp.config.hamming.enable ? "hamming" : "no hamming",
unit->plcp.config.scramble_ctl ? "ctl_scr" : "no ctl_scr");
- p += sprintf (p, "plcp frame mode %s\n", plcp_fmode_name (unit->plcp.config.fmode));
+ p += sprintf (p, "plcp frame mode %s\n",
+ plcp_fmode_name (unit->plcp.config.fmode));
p += sprintf (p, "control power %s\n",
- (unit->plcp.config.control_power == POWER_ALL_BANDS) ? "ALL" :
- (unit->plcp.config.control_power == POWER_SINGLE_BAND) ? "SINGLE" : "USED");
- p += sprintf (p, "check all CRC %s\n", unit->plcp.config.check_all_crc ? "enabled" : "disabled");
+ (unit->plcp.config.control_power ==
+ POWER_ALL_BANDS) ? "ALL" : (unit->plcp.config.
+ control_power ==
+ POWER_SINGLE_BAND) ? "SINGLE" :
+ "USED");
+ p += sprintf (p, "check all CRC %s\n",
+ unit->plcp.config.check_all_crc ? "enabled" : "disabled");
/* fm->__status(unit); */
- p += sprintf (p, "control %d slots\n", unit->plcp.config.nb_control);
- p += sprintf (p, "wait control %d slots\n", unit->plcp.config.nb_wait_control);
+ p += sprintf (p, "control %d slots\n",
+ unit->plcp.config.nb_control);
+ p += sprintf (p, "wait control %d slots\n",
+ unit->plcp.config.nb_wait_control);
#if defined(CONFIG_TINA_C) || defined(CONFIG_PLAB) || defined(SP_FCM3)
p += sprintf (p, "ctrl modulation %d\n", unit->control_modulation);
- p += sprintf (p, "bands together %s\n", unit->together ? "yes" : "no");
- p += sprintf (p, "new shaker %s\n", unit->new_shaker ? "yes" : "no");
- p += sprintf (p, "new tx filters %s\n", unit->new_txFilter ? "yes" : "no");
- p += sprintf (p, "new rx filters %s\n", unit->new_rxFilter ? "yes" : "no");
+ p += sprintf (p, "bands together %s\n",
+ unit->together ? "yes" : "no");
+ p += sprintf (p, "new shaker %s\n",
+ unit->new_shaker ? "yes" : "no");
+ p += sprintf (p, "new tx filters %s\n",
+ unit->new_txFilter ? "yes" : "no");
+ p += sprintf (p, "new rx filters %s\n",
+ unit->new_rxFilter ? "yes" : "no");
#endif
- p += sprintf (p, "calibrate %d (not part of EFR)\n", unit->plcp.config.nb_calibrate);
- p += sprintf (p, "start %d slots\n", unit->plcp.config.nb_start);
- p += sprintf (p, "ref (head) %d slots\n", unit->plcp.config.nb_ref_head);
- p += sprintf (p, "ref interval %d slots\n", unit->plcp.config.ref_interval);
- p += sprintf (p, "nb periodic ref %d slots\n", unit->plcp.config.nb_periodic_ref);
+ p += sprintf (p, "calibrate %d (not part of EFR)\n",
+ unit->plcp.config.nb_calibrate);
+ p += sprintf (p, "start %d slots\n",
+ unit->plcp.config.nb_start);
+ p += sprintf (p, "ref (head) %d slots\n",
+ unit->plcp.config.nb_ref_head);
+ p += sprintf (p, "ref interval %d slots\n",
+ unit->plcp.config.ref_interval);
+ p += sprintf (p, "nb periodic ref %d slots\n",
+ unit->plcp.config.nb_periodic_ref);
p += sprintf (p, "coef_corr %d\n", coef_corr);
- p += sprintf (p, "tmo_drop %d\n", unit->plcp.config.n_drop_slots);
- p += sprintf (p, "rxEof %d slots\n", unit->plcp.config.rx_nb_eof);
- p += sprintf (p, "txEof %d slots\n", unit->plcp.config.tx_nb_eof);
+ p += sprintf (p, "tmo_drop %d\n",
+ unit->plcp.config.n_drop_slots);
+ p += sprintf (p, "rxEof %d slots\n",
+ unit->plcp.config.rx_nb_eof);
+ p += sprintf (p, "txEof %d slots\n",
+ unit->plcp.config.tx_nb_eof);
p += sprintf (p, "bands ");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -2052,7 +2311,8 @@ int plc_dump_conf (char *buf, char **start, off_t offset, int count, int *eof, v
return p - buf + 1;
}
-int proc_r_access_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_access_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -2064,7 +2324,8 @@ int proc_r_access_stats (char *buf, char **start, off_t offset, int count, int *
return p - buf + 1;
}
-int proc_r_br_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_br_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -2093,8 +2354,8 @@ int proc_r_br_stats (char *buf, char **start, off_t offset, int count, int *eof,
}
-#ifdef BUFFER_ISOLATION
-int proc_r_mac_buffers (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_buffers (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
char *p = buf;
int index = (int) data;
@@ -2112,7 +2373,8 @@ int proc_r_mac_buffers (char *buf, char **start, off_t offset, int count, int *e
host = plcp_get_host_by_index (i);
if (host)
{
- p += sprintf (p, "host[%d] msdu_queued=%d active=%d\n", host->index, host->msdu_queued, host->xmit_active);
+ p += sprintf (p, "host[%d] msdu_queued=%d active=%d\n",
+ host->index, host->msdu_queued, host->xmit_active);
}
}
hard_local_irq_restore (flags);
@@ -2120,10 +2382,9 @@ int proc_r_mac_buffers (char *buf, char **start, off_t offset, int count, int *e
*eof = 1;
return p - buf + 1;
}
-#endif /* BUFFER_ISOLATION */
-#ifdef EXTRA_STATS
-int proc_r_extra_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_extra_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -2138,9 +2399,12 @@ int proc_r_extra_stats (char *buf, char **start, off_t offset, int count, int *e
if (!buffer)
buffer = kmalloc (8192, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
p = buffer;
- p += sprintf (p, "%20s:%10s %10s %10s\n", "subtype", "valid", "invalid", "total");
+ p += sprintf (p, "%20s:%10s %10s %10s\n", "subtype", "valid",
+ "invalid", "total");
for (i = 0; i < MA_SUBTYPE_MAX; i++)
{
p += sprintf (p, "%45s:%10u %10u %10u\n", ma_subtype_name[i],
@@ -2150,21 +2414,32 @@ int proc_r_extra_stats (char *buf, char **start, off_t offset, int count, int *e
p += sprintf (p, "\n");
p += sprintf (p, "%45s:%10u %10u %10u\n", "dma_tx_alloc_node",
- estats.dma_tx_alloc_node.valid, estats.dma_tx_alloc_node.invalid,
- estats.dma_tx_alloc_node.valid + estats.dma_tx_alloc_node.invalid);
+ estats.dma_tx_alloc_node.valid,
+ estats.dma_tx_alloc_node.invalid,
+ estats.dma_tx_alloc_node.valid +
+ estats.dma_tx_alloc_node.invalid);
p += sprintf (p, "%45s:%10u %10u %10u\n", "dma_rx_alloc_node",
- estats.dma_rx_alloc_node.valid, estats.dma_rx_alloc_node.invalid,
- estats.dma_rx_alloc_node.valid + estats.dma_rx_alloc_node.invalid);
+ estats.dma_rx_alloc_node.valid,
+ estats.dma_rx_alloc_node.invalid,
+ estats.dma_rx_alloc_node.valid +
+ estats.dma_rx_alloc_node.invalid);
p += sprintf (p, "%45s:%10u %10u %10u\n", "plcp_alloc_tx_frame",
- estats.plcp_alloc_tx_frame.valid, estats.plcp_alloc_tx_frame.invalid,
- estats.plcp_alloc_tx_frame.valid + estats.plcp_alloc_tx_frame.invalid);
+ estats.plcp_alloc_tx_frame.valid,
+ estats.plcp_alloc_tx_frame.invalid,
+ estats.plcp_alloc_tx_frame.valid +
+ estats.plcp_alloc_tx_frame.invalid);
p += sprintf (p, "%45s:%10u %10u %10u\n", "plcp_alloc_rx_frame",
- estats.plcp_alloc_rx_frame.valid, estats.plcp_alloc_rx_frame.invalid,
- estats.plcp_alloc_rx_frame.valid + estats.plcp_alloc_rx_frame.invalid);
+ estats.plcp_alloc_rx_frame.valid,
+ estats.plcp_alloc_rx_frame.invalid,
+ estats.plcp_alloc_rx_frame.valid +
+ estats.plcp_alloc_rx_frame.invalid);
p += sprintf (p, "\n");
- p += sprintf (p, "%20s:%10s\n", "subtype", "valid", "invalid", "total");
- p += sprintf (p, "%45s:%10u\n", "clean_tx_queue", estats.clean_tx_queue);
- p += sprintf (p, "%45s:%10u\n", "clean_mac_tx_queue", estats.clean_mac_tx_queue);
+ p += sprintf (p, "%20s:%10s\n", "subtype", "valid", "invalid",
+ "total");
+ p += sprintf (p, "%45s:%10u\n", "clean_tx_queue",
+ estats.clean_tx_queue);
+ p += sprintf (p, "%45s:%10u\n", "clean_mac_tx_queue",
+ estats.clean_mac_tx_queue);
buffer_len = p - buffer + 1;
}
@@ -2193,10 +2468,11 @@ int proc_r_extra_stats (char *buf, char **start, off_t offset, int count, int *e
}
}
-#endif
-extern int proc_r_plcp_dma (char *buf, char **start, off_t offset, int count, int *eof, void *data);
-int proc_r_plcp_frames (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+extern int proc_r_plcp_dma (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data);
+int proc_r_plcp_frames (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
extern int plcp_snapshot (char *buf);
struct net_device *dev = (struct net_device *) data;
@@ -2212,6 +2488,9 @@ int proc_r_plcp_frames (char *buf, char **start, off_t offset, int count, int *e
if (!buffer)
buffer = kmalloc (16 * 1024, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
buffer_len = plcp_snapshot (buffer);
}
@@ -2241,9 +2520,9 @@ int proc_r_plcp_frames (char *buf, char **start, off_t offset, int count, int *e
}
}
-#ifdef DISPLAY_STATS // apply to stats MAC only
extern int mac_max_msdu;
-int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mac_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -2263,6 +2542,9 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
if (!buffer)
buffer = kmalloc (8192, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
p += sprintf (p, "==> MSDU/MMDU\n");
@@ -2312,6 +2594,10 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
DISPLAY (access.tx_sack);
DISPLAY (access.tx_partial_ack);
DISPLAY (access.tx_partial_nack);
+#ifdef CONFIG_PLC_RTSCTS
+ DISPLAY (access.tx_rts);
+ DISPLAY (access.tx_cts);
+#endif
p += sprintf (p, "access.max_msdu_queued=%d\n", mac_max_msdu);
p += sprintf (p, "\n");
@@ -2356,9 +2642,11 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
p += sprintf (p, " ");
DISPLAY (access.rx_mng_bad);
p += sprintf (p, " ");
- p += sprintf (p, "access.rx_mng_no_dstart=%d\n", unit->stats.ce.fake_ber);
+ p += sprintf (p, "access.rx_mng_no_dstart=%d\n",
+ unit->stats.ce.fake_ber);
p += sprintf (p, " ");
- p += sprintf (p, "access.rx_mng_drop_ber=%d\n", unit->stats.ce.drop_ber);
+ p += sprintf (p, "access.rx_mng_drop_ber=%d\n",
+ unit->stats.ce.drop_ber);
DISPLAY (access.rx_drop);
DISPLAY (access.polled);
@@ -2368,6 +2656,10 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
DISPLAY (access.rx_ack);
DISPLAY (access.rx_nack);
DISPLAY (access.rx_sack);
+#ifdef CONFIG_PLC_RTSCTS
+ DISPLAY (access.rx_rts);
+ DISPLAY (access.rx_cts);
+#endif
p += sprintf (p, "\n");
p += sprintf (p, "=> ERRORS\n");
@@ -2384,12 +2676,18 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
DISPLAY (mac.e_rx_alloc_frame);
DISPLAY (mac.e_rx_alloc_mem);
p += sprintf (p, "access.tx_rifs=%20d\n",
- unit->stats.access.dcf_tx_rifs + unit->stats.access.pcf_tx_rifs + unit->stats.access.cf_tx_rifs);
+ unit->stats.access.dcf_tx_rifs +
+ unit->stats.access.pcf_tx_rifs +
+ unit->stats.access.cf_tx_rifs);
p += sprintf (p, "access.tx_err=%20d\n",
- unit->stats.access.dcf_tx_err + unit->stats.access.pcf_tx_err + unit->stats.access.cf_tx_err +
- unit->stats.access.pcf_access_err + unit->stats.access.dcf_access_err);
+ unit->stats.access.dcf_tx_err +
+ unit->stats.access.pcf_tx_err +
+ unit->stats.access.cf_tx_err +
+ unit->stats.access.pcf_access_err +
+ unit->stats.access.dcf_access_err);
p += sprintf (p, "access.tx_mpdu=%20d\n",
- unit->stats.access.dcf_tx + unit->stats.access.pcf_tx + unit->stats.access.cf_tx);
+ unit->stats.access.dcf_tx + unit->stats.access.pcf_tx +
+ unit->stats.access.cf_tx);
buffer_len = p - buffer + 1;
}
@@ -2418,16 +2716,17 @@ int proc_r_mac_stats (char *buf, char **start, off_t offset, int count, int *eof
return count;
}
}
-#endif
-int proc_r_pmd_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pmd_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
*eof = 1;
return 0;
}
#ifdef CONFIG_PLC_MEASURES
-int proc_r_pb_errors (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pb_errors (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
char *p;
int i;
@@ -2439,10 +2738,14 @@ int proc_r_pb_errors (char *buf, char **start, off_t offset, int count, int *eof
p += sprintf (p, "\nPB errors :\n");
p += sprintf (p, "Nb of pb falses\t\tCount\t\tall false\tContiguous\n");
- p += sprintf (p, "------------------------------------------------------------------\n");
- p += sprintf (p, "%d\t\t\t%d\t\t%d\t|\t -\n", 1, unit->stats.pb.pb_errors[1], unit->stats.pb.all_false[1]);
+ p += sprintf (p,
+ "------------------------------------------------------------------\n");
+ p += sprintf (p, "%d\t\t\t%d\t\t%d\t|\t -\n", 1,
+ unit->stats.pb.pb_errors[1], unit->stats.pb.all_false[1]);
for (i = 2; i < PLCP_MAX_SLICES; i++)
- p += sprintf (p, "%d\t\t\t%d\t\t%d\t|\t%d\n", i, unit->stats.pb.pb_errors[i], unit->stats.pb.all_false[i],
+ p += sprintf (p, "%d\t\t\t%d\t\t%d\t|\t%d\n", i,
+ unit->stats.pb.pb_errors[i],
+ unit->stats.pb.all_false[i],
unit->stats.pb.contiguous_errors[i]);
return p - buf + 1;
@@ -2450,7 +2753,8 @@ int proc_r_pb_errors (char *buf, char **start, off_t offset, int count, int *eof
}
#endif
-int proc_r_pb_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pb_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
char *p;
int i;
@@ -2464,9 +2768,11 @@ int proc_r_pb_stats (char *buf, char **start, off_t offset, int count, int *eof,
p += sprintf (p, "\nPB stats :\n");
p += sprintf (p, "----------\n");
dotify (dot_buffer, "pb.tx_pending");
- p += sprintf (p, "%s %d\n", dot_buffer, unit->stats.pb.alloc - unit->stats.pb.free);
+ p += sprintf (p, "%s %d\n", dot_buffer,
+ unit->stats.pb.alloc - unit->stats.pb.free);
dotify (dot_buffer, "pb.rx_pending");
- p += sprintf (p, "%s %d\n", dot_buffer, unit->stats.pb.rx_alloc - unit->stats.pb.rx_free);
+ p += sprintf (p, "%s %d\n", dot_buffer,
+ unit->stats.pb.rx_alloc - unit->stats.pb.rx_free);
p += sprintf (p, "\nTX SACK stats :\n");
p += sprintf (p, "-----------------\n");
DISPLAY (pb.tx_sack);
@@ -2489,7 +2795,8 @@ int proc_r_pb_stats (char *buf, char **start, off_t offset, int count, int *eof,
return 0;
}
-int proc_r_pb_jigsaw (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_pb_jigsaw (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
char *p;
struct net_device *dev = (struct net_device *) data;
@@ -2505,7 +2812,8 @@ int proc_r_pb_jigsaw (char *buf, char **start, off_t offset, int count, int *eof
return 0;
}
-int proc_r_channel (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_channel (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
int index = (int) data;
int len = 0;
@@ -2523,33 +2831,48 @@ int proc_r_channel (char *buf, char **start, off_t offset, int count, int *eof,
{
uchannel = kmalloc (sizeof (struct plcp_uchannel), GFP_KERNEL);
+ if (uchannel == NULL)
+ return -ENOMEM;
+
*uchannel = *uchannelp;
/* search in RX channels */
id = 0;
- while (id < PLCP_MAX_CHANNEL_ID && plcp_get_uchannel_by_id (id) != uchannelp)
+ while (id < PLCP_MAX_CHANNEL_ID &&
+ plcp_get_uchannel_by_id (id) != uchannelp)
id++;
/* find host (TX or RX) */
for (i = 0; i < PLCP_MAX_HOST; i++)
{
host = plcp_get_host_by_index (i);
- if (host && (host->uchannel1 == uchannelp || host->uchannel2 == uchannelp ||
- host->id1 == id || host->id2 == id || host->id3 == id))
+ if (host &&
+ (host->uchannel1 == uchannelp || host->uchannel2 == uchannelp
+ || host->id1 == id || host->id2 == id || host->id3 == id))
break;
}
- len += sprintf (buf + len, "direction %s\n", id < PLCP_MAX_CHANNEL_ID ? "RX" : "TX");
+ len +=
+ sprintf (buf + len, "direction %s\n",
+ id < PLCP_MAX_CHANNEL_ID ? "RX" : "TX");
len += sprintf (buf + len, "cid %d\n", id);
- len += sprintf (buf + len, "bytes_per_slot %d\n", plcp_slot_rate (unit, uchannel));
+ len +=
+ sprintf (buf + len, "bytes_per_slot %d\n",
+ plcp_slot_rate (unit, uchannel));
if (id >= PLCP_CID_ROBUST_BPSK && id <= PLCP_CID_ROBUST_QAM256)
{
- len += sprintf (buf + len, "mtu %d\n", plcp_get_max_data_len (unit, uchannel, PLCP_MAX_SLOTS));
+ len +=
+ sprintf (buf + len, "mtu %d\n",
+ plcp_get_max_data_len (unit, uchannel,
+ PLCP_MAX_SLOTS));
}
else
{
- len += sprintf (buf + len, "mtu %d\n", plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots));
+ len +=
+ sprintf (buf + len, "mtu %d\n",
+ plcp_get_max_data_len (unit, uchannel,
+ unit->ce.max_slots));
}
if (host)
len += sprintf (buf + len, "SNR %f\n", host->snr);
@@ -2561,7 +2884,9 @@ int proc_r_channel (char *buf, char **start, off_t offset, int count, int *eof,
}
else
{
- len += sprintf (buf + len, "not robust, syncBand=%d\n", uchannel->syncBand);
+ len +=
+ sprintf (buf + len, "not robust, syncBand=%d\n",
+ uchannel->syncBand);
}
kfree (uchannel);
@@ -2571,13 +2896,15 @@ int proc_r_channel (char *buf, char **start, off_t offset, int count, int *eof,
return len;
}
-int proc_w_channel (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_channel (struct file *file, const char *buffer,
+ unsigned long count, void *data)
{
return count;
}
-int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
double sn;
int index = (int) data;
@@ -2599,12 +2926,16 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
if (hostp && hostp->used)
{
host = kmalloc (sizeof (struct plcp_host), GFP_KERNEL);
+ if (host == NULL)
+ return -ENOMEM;
+
*host = *hostp;
p += sprintf (p, "in_use 1\n");
p += sprintf (p, "MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
host->mac_addr[0], host->mac_addr[1], host->mac_addr[2],
- host->mac_addr[3], host->mac_addr[4], host->mac_addr[5]);
+ host->mac_addr[3], host->mac_addr[4],
+ host->mac_addr[5]);
format_bssid (host->BSSID, str);
p += sprintf (p, "BSSID %s\n", str);
format_tei (host->TEI, str);
@@ -2620,13 +2951,16 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
p += sprintf (p, "poll inter %u\n", host->poll_inter);
if (index > 0)
{
- double sn;
+ //double sn;
- sn = POWER_TO_DBM (host->glomer / BANDWITH (unit->nb_bands));
+ // sn = POWER_TO_DBM (host->glomer / BANDWITH (unit->nb_bands));
// p += sprintf(p,"attenuation %d dB\n", host->att);
// NS> changed with attenuation calc from AGC
p += sprintf (p, "attenuation %d dB\n", host->new_gain);
- p += sprintf (p, "glomer %.1f (dBm/Hz)\n", sn);
+ // p += sprintf (p, "glomer %.1f (dBm/Hz)\n", sn);
+ p += sprintf (p,
+ "mac address recorded in carp from this host : %u\n",
+ host->mac_adress_recorded);
#ifdef CONFIG_PLC_MEASURES
{ // AGC by host
@@ -2665,7 +2999,8 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
uhost = plcp_get_host_by_tei (host->proxy_tei, unit->BSSID);
if (uhost && uhost->used && uhost->init)
- p += sprintf (p, "proxy tei=%02x uhost->index=%d\n", host->proxy_tei, uhost->index);
+ p += sprintf (p, "proxy tei=%02x uhost->index=%d\n",
+ host->proxy_tei, uhost->index);
else
p += sprintf (p, "proxy tei=%02xno with no uhost\n");
}
@@ -2677,8 +3012,11 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
{
mc = list_entry (entry, struct mc_link, link);
- p += sprintf (p, "member " IEEE802_FMT ", connected to uhost index: %d\n",
- IEEE802_VAL (mc->mac_addr), mc->uhost->index);
+ p += sprintf (p,
+ "member " IEEE802_FMT
+ ", connected to uhost index: %d\n",
+ IEEE802_VAL (mc->mac_addr),
+ mc->uhost->index);
}
}
}
@@ -2688,51 +3026,72 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
{
estim = plcp_slot_rate (unit, host->uchannel);
mtu = host->mtu;
- p += sprintf (p, "TX cid %2d channel/%d bytes_per_slot=%3d mtu=%d sar=%d\n", host->id,
- host->uchannel->index, estim, mtu, host->uchannel->sar_enable);
+ p += sprintf (p,
+ "TX cid %2d channel/%d bytes_per_slot=%3d mtu=%d sar=%d\n",
+ host->id, host->uchannel->index, estim, mtu,
+ host->uchannel->sar_enable);
if (host->uchannel == host->uchannel1)
uchannel = host->uchannel2;
else
uchannel = host->uchannel1;
estim = plcp_slot_rate (unit, uchannel);
- p += sprintf (p, "TX channel/%d bytes_per_slot=%3d mtu=%d sar=%d\n", uchannel->index, estim,
- plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots), uchannel->sar_enable);
+ p += sprintf (p,
+ "TX channel/%d bytes_per_slot=%3d mtu=%d sar=%d\n",
+ uchannel->index, estim, plcp_get_max_data_len (unit,
+ uchannel,
+ unit->
+ ce.
+ max_slots),
+ uchannel->sar_enable);
}
uchannel = plcp_get_uchannel_by_id (host->id1);
if (uchannel)
{
estim = plcp_slot_rate (unit, uchannel);
- p += sprintf (p, "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n", host->id1, uchannel->index, estim,
- plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots));
+ p += sprintf (p,
+ "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n",
+ host->id1, uchannel->index, estim,
+ plcp_get_max_data_len (unit, uchannel,
+ unit->ce.max_slots));
}
uchannel = plcp_get_uchannel_by_id (host->id2);
if (uchannel)
{
estim = plcp_slot_rate (unit, uchannel);
- p += sprintf (p, "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n", host->id2, uchannel->index, estim,
- plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots));
+ p += sprintf (p,
+ "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n",
+ host->id2, uchannel->index, estim,
+ plcp_get_max_data_len (unit, uchannel,
+ unit->ce.max_slots));
}
uchannel = plcp_get_uchannel_by_id (host->id3);
if (uchannel)
{
estim = plcp_slot_rate (unit, uchannel);
- p += sprintf (p, "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n", host->id3, uchannel->index, estim,
- plcp_get_max_data_len (unit, uchannel, unit->ce.max_slots));
+ p += sprintf (p,
+ "RX cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n",
+ host->id3, uchannel->index, estim,
+ plcp_get_max_data_len (unit, uchannel,
+ unit->ce.max_slots));
}
if (host->test_uchannel)
{
estim = plcp_slot_rate (unit, host->test_uchannel);
- p += sprintf (p, "TEST cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n", host->test_id,
- host->test_uchannel->index, estim, plcp_get_max_data_len (unit, host->test_uchannel,
- unit->ce.max_slots));
+ p += sprintf (p,
+ "TEST cid %2d channel/%d bytes_per_slot=%3d mtu=%d\n",
+ host->test_id, host->test_uchannel->index, estim,
+ plcp_get_max_data_len (unit, host->test_uchannel,
+ unit->ce.max_slots));
}
if (unit->ce.iteratif)
{
- p += sprintf (p, "Byte per slot from sound only : TX=%3d\n", host->fake_quality_tx);
- p += sprintf (p, "Byte per slot from sound only : RX=%3d\n", host->fake_quality_rx);
+ p += sprintf (p, "Byte per slot from sound only : TX=%3d\n",
+ host->fake_quality_tx);
+ p += sprintf (p, "Byte per slot from sound only : RX=%3d\n",
+ host->fake_quality_rx);
}
if (host->uchannel)
@@ -2751,7 +3110,10 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
p += sprintf (p, "TX sync band = %d\n", host->tx_sync_band);
used_bands =
unit->
- used_bands & ~((host->tx_unused_bands | ((1 << host->tx_sync_band) - 1)) & ~(1 << host->tx_sync_band));
+ used_bands &
+ ~((host->
+ tx_unused_bands | ((1 << host->tx_sync_band) -
+ 1)) & ~(1 << host->tx_sync_band));
p += sprintf (p, "TX bands for sound frame ");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -2760,7 +3122,11 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
}
p += sprintf (p, "\n");
used_bands =
- unit->used_bands & ~((host->rx_unused_bands | ((1 << host->syncBand) - 1)) & ~(1 << host->syncBand));
+ unit->
+ used_bands &
+ ~((host->
+ rx_unused_bands | ((1 << host->syncBand) -
+ 1)) & ~(1 << host->syncBand));
p += sprintf (p, "RX bands considered in CEIT ");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -2769,16 +3135,26 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
}
p += sprintf (p, "\n");
}
- p += sprintf (p, "rx_channel cid=%d\n", (int) host->rx_channel);
- p += sprintf (p, "rx_last_channel cid=%d\n", (int) host->rx_last_channel);
+ p += sprintf (p, "rx_channel cid=%d\n",
+ (int) host->rx_channel);
+ p += sprintf (p, "rx_last_channel cid=%d\n",
+ (int) host->rx_last_channel);
if (unit->mode == repeater)
p += sprintf (p, "pollable %d\n", (int) hostp->pollable);
+ if (unit->mode == repeater && unit->auth_8021x)
+ p += sprintf (p, "authenticated = %d\n", hostp->authenticated);
+#ifdef PLC_RECOVERY
+ if (host->in_recovery == 1)
+ p += sprintf (p, "In recovery process!\n");
+#endif
p += sprintf (p, "link state %s", ce_link_name[host->link_state]);
- if ((host->link_state != LINK_STATE_STABLE) && (host->link_state != LINK_STATE_MANUAL))
+ if ((host->link_state != LINK_STATE_STABLE) &&
+ (host->link_state != LINK_STATE_MANUAL))
{
- p += sprintf (p, "(remain nb_quick_pass_of_ce :%d)", host->nb_quick_pass_of_ce);
+ p += sprintf (p, "(remain nb_quick_pass_of_ce :%d)",
+ host->nb_quick_pass_of_ce);
}
p += sprintf (p, "\n");
@@ -2859,7 +3235,9 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
p += sprintf (p, "\n%12s", "corrCrit");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- p += sprintf (p, "%5d\t", CORR_criteria (host->minCorr[band], host->maxCorr[band]));
+ p += sprintf (p, "%5d\t",
+ CORR_criteria (host->minCorr[band],
+ host->maxCorr[band]));
}
p += sprintf (p, "\nsyncBand=%d", host->syncBand);
@@ -2876,7 +3254,8 @@ int proc_r_host (char *buf, char **start, off_t offset, int count, int *eof, voi
return p - buf + 1;
}
-int proc_r_host_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_host_stats (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plcp_host *host;
int i;
@@ -2886,44 +3265,69 @@ int proc_r_host_stats (char *buf, char **start, off_t offset, int count, int *eo
if (host && host->used)
{
- p += sprintf (p, "nb send request %d\n", host->stats.nb_send_request);
- p += sprintf (p, "nb tmo request %d\n", host->stats.nb_tmo_request);
- p += sprintf (p, "nb recv reply %d\n", host->stats.nb_recv_reply);
- p += sprintf (p, "nb recv request %d\n", host->stats.nb_recv_request);
- p += sprintf (p, "nb send reply %d\n", host->stats.nb_send_reply);
- p += sprintf (p, "nb sent failed %d\n", host->stats.nb_sent_failed);
- p += sprintf (p, "nb sent sucess %d\n", host->stats.nb_sent_success);
- p += sprintf (p, "nb bad step %d\n", host->stats.bad_step);
- p += sprintf (p, "nb bad current id %d\n", host->stats.bad_current_id);
+ p += sprintf (p, "nb send request %d\n",
+ host->stats.nb_send_request);
+ p += sprintf (p, "nb tmo request %d\n",
+ host->stats.nb_tmo_request);
+ p += sprintf (p, "nb recv reply %d\n",
+ host->stats.nb_recv_reply);
+ p += sprintf (p, "nb recv request %d\n",
+ host->stats.nb_recv_request);
+ p += sprintf (p, "nb send reply %d\n",
+ host->stats.nb_send_reply);
+ p += sprintf (p, "nb sent failed %d\n",
+ host->stats.nb_sent_failed);
+ p += sprintf (p, "nb sent sucess %d\n",
+ host->stats.nb_sent_success);
+ p += sprintf (p, "nb bad step %d\n",
+ host->stats.bad_step);
+ p += sprintf (p, "nb bad current id %d\n",
+ host->stats.bad_current_id);
p += sprintf (p, "\n");
- p += sprintf (p, "e_poll_null %d\n", host->stats.e_poll_null);
- p += sprintf (p, "tx_pframe %d\n", host->stats.tx_pframe);
- p += sprintf (p, "tx_retry_pframe %d\n", host->stats.tx_retry_pframe);
- p += sprintf (p, "tx_lookup_msdu %d\n", host->stats.tx_lookup_msdu);
- p += sprintf (p, "tx_drop_msdu %d\n", host->stats.tx_drop_msdu);
- p += sprintf (p, "tx_append_first_msdu %d\n", host->stats.tx_append_first_msdu);
- p += sprintf (p, "tx_append_next_msdu %d\n", host->stats.tx_append_next_msdu);
- p += sprintf (p, "tx_append_qfull_msdu %d\n", host->stats.tx_append_qfull_msdu);
- p += sprintf (p, "tx_queue_msdu %d\n", host->stats.tx_queue_msdu);
- p += sprintf (p, "tx_dequeue_msdu %d\n", host->stats.tx_dequeue_msdu);
- p += sprintf (p, "tx_done_msdu %d\n", host->stats.tx_done_msdu);
- p += sprintf (p, "need_pframe %d\n", host->stats.need_pframe);
+ p += sprintf (p, "e_poll_null %d\n",
+ host->stats.e_poll_null);
+ p += sprintf (p, "tx_pframe %d\n",
+ host->stats.tx_pframe);
+ p += sprintf (p, "tx_retry_pframe %d\n",
+ host->stats.tx_retry_pframe);
+ p += sprintf (p, "tx_lookup_msdu %d\n",
+ host->stats.tx_lookup_msdu);
+ p += sprintf (p, "tx_drop_msdu %d\n",
+ host->stats.tx_drop_msdu);
+ p += sprintf (p, "tx_append_first_msdu %d\n",
+ host->stats.tx_append_first_msdu);
+ p += sprintf (p, "tx_append_next_msdu %d\n",
+ host->stats.tx_append_next_msdu);
+ p += sprintf (p, "tx_append_qfull_msdu %d\n",
+ host->stats.tx_append_qfull_msdu);
+ p += sprintf (p, "tx_queue_msdu %d\n",
+ host->stats.tx_queue_msdu);
+ p += sprintf (p, "tx_dequeue_msdu %d\n",
+ host->stats.tx_dequeue_msdu);
+ p += sprintf (p, "tx_done_msdu %d\n",
+ host->stats.tx_done_msdu);
+ p += sprintf (p, "need_pframe %d\n",
+ host->stats.need_pframe);
p += sprintf (p, "mac queued %d\n", host->msdu_queued);
p += sprintf (p, "nb msdu queued %d\n", host->msdu_queued);
- p += sprintf (p, "pframe data ready(mpdu) %d\n", host->tx_queue_count[PLCP_PRIO_DATA]);
- p += sprintf (p, "pframe mngt ready(mmdu) %d\n", host->tx_queue_count[PLCP_PRIO_MM]);
+ p += sprintf (p, "pframe data ready(mpdu) %d\n",
+ host->tx_queue_count[PLCP_PRIO_DATA]);
+ p += sprintf (p, "pframe mngt ready(mmdu) %d\n",
+ host->tx_queue_count[PLCP_PRIO_MM]);
for (i = 0; i < MAC_NB_PRIO; i++)
{
p += sprintf (p, "prio %d:\n", i);
p += sprintf (p, " %d: mac_queued\n", host->mac_queued[i]);
- p += sprintf (p, " %d: mac_counter\n", host->stats.prio_count[i]);
+ p += sprintf (p, " %d: mac_counter\n",
+ host->stats.prio_count[i]);
}
p += sprintf (p, "\n");
p += sprintf (p, "Poll :\n");
p += sprintf (p, " - tx poll %d\n", host->stats.tx_poll);
- p += sprintf (p, " - tx poll acked %d\n", host->stats.tx_poll_ok);
+ p += sprintf (p, " - tx poll acked %d\n",
+ host->stats.tx_poll_ok);
p += sprintf (p, "\n");
}
else
@@ -3000,10 +3404,14 @@ char *gpio_event_names[GPIO_EVENT_MAX] = {
[GPIO_EVENT_CE_PROCESS_GET_CHANNEL_REP] = "CE_PROCESS_GET_CHANNEL_REP",
[GPIO_EVENT_CE_PROCESS_TEST_REP] = "CE_PROCESS_TEST_REP",
[GPIO_EVENT_CE_PROCESS_KEEPALIVE_REP] = "CE_PROCESS_KEEPALIVE_REP",
- [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION] = "CE_PROCESS_MCAST_CHANNEL_INDICATION",
- [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_REQUEST] = "CE_PROCESS_MCAST_CHANNEL_REQUEST",
- [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_REPLY] = "CE_PROCESS_MCAST_CHANNEL_REPLY",
- [GPIO_EVENT_CE_PROCESS_STATUS_INDICATION] = "CE_PROCESS_STATUS_INDICATION",
+ [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_INDICATION] =
+ "CE_PROCESS_MCAST_CHANNEL_INDICATION",
+ [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_REQUEST] =
+ "CE_PROCESS_MCAST_CHANNEL_REQUEST",
+ [GPIO_EVENT_CE_PROCESS_MCAST_CHANNEL_REPLY] =
+ "CE_PROCESS_MCAST_CHANNEL_REPLY",
+ [GPIO_EVENT_CE_PROCESS_STATUS_INDICATION] =
+ "CE_PROCESS_STATUS_INDICATION",
[GPIO_EVENT_CE_PROCESS_UNKNOWN] = "CE_PROCESS_UNKNOWN",
[GPIO_EVENT_PLCP_WRITE] = "PLCP_WRITE",
[GPIO_EVENT_TX_OVER_RX] = "TX_OVER_RX",
@@ -3015,6 +3423,12 @@ char *gpio_event_names[GPIO_EVENT_MAX] = {
[GPIO_EVENT_PHY_TX_DATA_CONFIRM] = "PHY_TX_DATA_CONFIRM",
[GPIO_EVENT_PHY_TX_STATUS_INDICATION] = "PHY_TX_STATUS_INDICATION",
[GPIO_EVENT_RX_ACK] = "RX_ACK",
+#ifdef CONFIG_PLC_RTSCTS
+ [GPIO_EVENT_RX_RTS] = "RX_RTS",
+ [GPIO_EVENT_RX_CTS] = "RX_CTS",
+ [GPIO_EVENT_TX_RTS] = "TX_RTS",
+ [GPIO_EVENT_TX_CTS] = "TX_CTS",
+#endif
[GPIO_EVENT_RX_OTHER] = "EVENT_RX_OTHER",
[GPIO_EVENT_ACCESS] = "ACCESS",
[GPIO_EVENT_RIFS_TMO] = "RIFS_TMO",
@@ -3032,7 +3446,8 @@ char *gpio_event_names[GPIO_EVENT_MAX] = {
};
-int proc_r_gpio (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_gpio (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
int i;
char *p = buf;
@@ -3054,7 +3469,8 @@ int proc_r_gpio (char *buf, char **start, off_t offset, int count, int *eof, voi
return (int) (p - buf) + 1;
}
-int proc_w_gpio (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_gpio (struct file *file, const char *buffer, unsigned long count,
+ void *data)
{
char name[64], gpio_name[64];
int gpio, i;
@@ -3104,7 +3520,8 @@ int proc_w_gpio (struct file *file, const char *buffer, unsigned long count, voi
#ifdef CONFIG_PLC_MEASURES
// proc_r_ber_control : Create par TC, 11/08/2006
-int proc_r_ber_control (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_ber_control (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int band, carrier, groups, carrier_per_group;
@@ -3118,7 +3535,8 @@ int proc_r_ber_control (char *buf, char **start, off_t offset, int count, int *e
len += sprintf (buf + len, "\tBand %d\n\t-------\n", band);
nb_valid_control = unit->stats.ber_control.total_crc[band];
- for (carrier_per_group = PMD_CARRIERS_PER_GROUP; carrier_per_group != 0; carrier_per_group--)
+ for (carrier_per_group = PMD_CARRIERS_PER_GROUP; carrier_per_group != 0;
+ carrier_per_group--)
{
for (groups = PMD_GROUPS_PER_BAND; groups != 0; groups--)
@@ -3134,7 +3552,9 @@ int proc_r_ber_control (char *buf, char **start, off_t offset, int count, int *e
len += sprintf (buf + len, "\n");
}
- len += sprintf (buf + len, "\nTotal crc analysed on this band : %d \n", nb_valid_control);
+ len +=
+ sprintf (buf + len, "\nTotal crc analysed on this band : %d \n",
+ nb_valid_control);
if (unit->plcp.config.ber_control == 0)
{
@@ -3146,7 +3566,8 @@ int proc_r_ber_control (char *buf, char **start, off_t offset, int count, int *e
extern u32 buffer_compare[PMD_MAX_BANDS][3 * (ENCODED_CONTROL_SIZE + 3) / 4];
extern bool bc_ready;
-int proc_r_extract_control (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_extract_control (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int len = 0, band;
@@ -3171,19 +3592,24 @@ int proc_r_extract_control (char *buf, char **start, off_t offset, int count, in
ptr_rx = buffer_compare[band];
len += sprintf (buf + len, "\nBand %d : \n", band);
len +=
- sprintf (buf + len, "- Word 1 = %8x %8x %8x %8x %8x \n", ptr_rx[0], ptr_rx[1], ptr_rx[2], ptr_rx[3],
+ sprintf (buf + len, "- Word 1 = %8x %8x %8x %8x %8x \n",
+ ptr_rx[0], ptr_rx[1], ptr_rx[2], ptr_rx[3],
(ptr_rx[4] & 0xFFFF));
len +=
- sprintf (buf + len, "- Word 2 = %8x %8x %8x %8x %8x \n", ptr_rx[5], ptr_rx[6], ptr_rx[7], ptr_rx[8],
+ sprintf (buf + len, "- Word 2 = %8x %8x %8x %8x %8x \n",
+ ptr_rx[5], ptr_rx[6], ptr_rx[7], ptr_rx[8],
(ptr_rx[9] & 0xFFFF));
len +=
- sprintf (buf + len, "- Word 3 = %8x %8x %8x %8x %8x \n", ptr_rx[10], ptr_rx[11], ptr_rx[12],
- ptr_rx[13], (ptr_rx[14] & 0xFFFF));
+ sprintf (buf + len, "- Word 3 = %8x %8x %8x %8x %8x \n",
+ ptr_rx[10], ptr_rx[11], ptr_rx[12], ptr_rx[13],
+ (ptr_rx[14] & 0xFFFF));
}
}
else
{
- len += sprintf (buf + len, "Control currently changing - try again\n");
+ len +=
+ sprintf (buf + len,
+ "Control currently changing - try again\n");
}
}
@@ -3191,7 +3617,8 @@ int proc_r_extract_control (char *buf, char **start, off_t offset, int count, in
}
#endif
-int proc_r_mod (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_mod (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
int band, group, len = 0, index = (int) data;
int limit = count - 80; /* Don't print more than this */
@@ -3204,9 +3631,12 @@ int proc_r_mod (char *buf, char **start, off_t offset, int count, int *eof, void
for (band = 1; band < PMD_MAX_BANDS && len <= limit; band++)
{
len += sprintf (buf + len, "%-1d", band);
- for (group = 0; group < PMD_GROUPS_PER_BAND && len <= limit; group++)
+ for (group = 0; group < PMD_GROUPS_PER_BAND && len <= limit;
+ group++)
{
- mod = plcp_get_group_modulation (&uchannel->quality[band], group);
+ mod =
+ plcp_get_group_modulation (&uchannel->quality[band],
+ group);
if (mod == 0)
len += sprintf (buf + len, " -");
else
@@ -3220,7 +3650,8 @@ int proc_r_mod (char *buf, char **start, off_t offset, int count, int *eof, void
return len;
}
-int proc_w_mod (struct file *file, const char *buffer, unsigned long count, void *data)
+int proc_w_mod (struct file *file, const char *buffer, unsigned long count,
+ void *data)
{
int band, group, nmod, l, index = (int) data;
struct plcp_uchannel *uchannel = NULL;
@@ -3238,8 +3669,10 @@ int proc_w_mod (struct file *file, const char *buffer, unsigned long count, void
sscanf (buffer + (band - 1) * (16 * 2 + 2), "%d", &l);
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- sscanf (buffer + (band - 1) * (16 * 2 + 2) + group * 2 + 1, "%d", &nmod);
- plcp_set_group_modulation (&uchannel->quality[band], group, nmod);
+ sscanf (buffer + (band - 1) * (16 * 2 + 2) + group * 2 + 1,
+ "%d", &nmod);
+ plcp_set_group_modulation (&uchannel->quality[band], group,
+ nmod);
}
}
}
@@ -3247,7 +3680,8 @@ int proc_w_mod (struct file *file, const char *buffer, unsigned long count, void
return count;
}
-int proc_r_software_build (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_software_build (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
extern char softwareVersionString[];
extern char builtDate[]; /* TAG date */
@@ -3310,10 +3744,13 @@ extern wait_queue_head_t scan_wait_queue;
extern int scan_sleep;
#if defined(DEBUG_PB) && defined(DEBUG_MULTIPOINT)
-extern int proc_r_pb_log (char *buf, char **start, off_t offset, int count, int *eof, void *data);
-extern int proc_w_pb_log (struct file *file, const char *buffer, unsigned long count, void *data);
+extern int proc_r_pb_log (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data);
+extern int proc_w_pb_log (struct file *file, const char *buffer,
+ unsigned long count, void *data);
#endif
-int proc_r_scan (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_scan (char *buf, char **start, off_t offset, int count, int *eof,
+ void *data)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
static int pos;
@@ -3428,8 +3865,10 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
#ifdef CONFIG_PLC_MEASURES
dir_measures = proc_mkdir ("measures", dir_plc);
- create_proc_read_entry ("fft_gain", 0, dir_measures, proc_r_sampler, fft_gain_sampler);
- create_proc_read_entry ("corr", 0, dir_measures, proc_r_plcp_corr_stats, dev);
+ create_proc_read_entry ("fft_gain", 0, dir_measures, proc_r_sampler,
+ fft_gain_sampler);
+ create_proc_read_entry ("corr", 0, dir_measures, proc_r_plcp_corr_stats,
+ dev);
#endif
dir_stats = proc_mkdir ("stats", dir_plc);
@@ -3437,26 +3876,26 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
create_proc_read_entry ("crypto", 0, dir_stats, proc_r_crypto_stats, dev);
#endif
create_proc_read_entry ("drv", 0, dir_stats, proc_r_drv_stats, dev);
-#ifdef DISPLAY_STATS
create_proc_read_entry ("mac", 0, dir_stats, proc_r_mac_stats, dev);
-#endif
-#ifdef EXTRA_STATS
create_proc_read_entry ("extra", 0, dir_stats, proc_r_extra_stats, dev);
-#endif
create_proc_read_entry ("br", 0, dir_stats, proc_r_br_stats, dev);
create_proc_read_entry ("pmd", 0, dir_stats, proc_r_pmd_stats, dev);
create_proc_read_entry ("sar", 0, dir_stats, proc_r_pb_stats, dev);
- create_proc_read_entry ("jigsaw_sar", 0, dir_stats, proc_r_pb_jigsaw, dev);
+ create_proc_read_entry ("jigsaw_sar", 0, dir_stats, proc_r_pb_jigsaw,
+ dev);
dir_stats_plcp = proc_mkdir ("plcp", dir_stats);
dir_control = proc_mkdir ("control", dir_stats);
- create_proc_read_entry ("general", 0, dir_control, proc_r_plcp_control_stats, dev);
- create_proc_read_entry ("entropy", 0, dir_control, proc_r_plcp_entropy_stats, dev);
+ create_proc_read_entry ("general", 0, dir_control,
+ proc_r_plcp_control_stats, dev);
+ create_proc_read_entry ("entropy", 0, dir_control,
+ proc_r_plcp_entropy_stats, dev);
dir_rs = proc_mkdir ("rs", dir_stats_plcp);
for (i = 0; i < PLCP_MAX_HOST; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, dir_rs, proc_r_plcp_rs_stats, (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_rs, proc_r_plcp_rs_stats,
+ (int *) i);
}
dir_nbGroupUp = proc_mkdir ("nbGroupUp", dir_plc);
@@ -3474,19 +3913,25 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
entree->data = (int *) i;
}
#ifdef CONFIG_PLC_MEASURES
- create_proc_read_entry ("sar_distribution", 0, dir_stats, proc_r_pb_errors, dev);
- create_proc_read_entry ("extract_last", 0, dir_control, proc_r_extract_control, dev);
+ create_proc_read_entry ("sar_distribution", 0, dir_stats,
+ proc_r_pb_errors, dev);
+ create_proc_read_entry ("extract_last", 0, dir_control,
+ proc_r_extract_control, dev);
for (i = 1; i < PMD_MAX_BANDS; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, dir_control, proc_r_ber_control, (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_control, proc_r_ber_control,
+ (int *) i);
}
#endif
- create_proc_read_entry ("slices", 0, dir_stats_plcp, proc_r_plcp_slices_stats, dev);
- create_proc_read_entry ("chunks", 0, dir_stats_plcp, proc_r_plcp_chunks_stats, dev);
- create_proc_read_entry ("interrupts", 0, dir_stats_plcp, proc_r_plcp_interrupts_stats, dev);
+ create_proc_read_entry ("slices", 0, dir_stats_plcp,
+ proc_r_plcp_slices_stats, dev);
+ create_proc_read_entry ("chunks", 0, dir_stats_plcp,
+ proc_r_plcp_chunks_stats, dev);
+ create_proc_read_entry ("interrupts", 0, dir_stats_plcp,
+ proc_r_plcp_interrupts_stats, dev);
create_proc_read_entry ("access", 0, dir_stats, proc_r_access_stats, dev);
create_proc_read_entry ("ce", 0, dir_stats, proc_r_ce_stats, dev);
create_proc_read_entry ("nd", 0, dir_stats, proc_r_nd_stats, dev);
@@ -3498,10 +3943,14 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
#ifdef CONFIG_PLC_PROFILER
dir_profiler = proc_mkdir ("profiler", dir_plc);
- create_proc_read_entry ("time", 0, dir_profiler, plc_dump_profile, (int *) 1);
- create_proc_read_entry ("count", 0, dir_profiler, plc_dump_profile, (int *) 2);
- create_proc_read_entry ("average", 0, dir_profiler, plc_dump_profile, (int *) 3);
- create_proc_read_entry ("percent", 0, dir_profiler, plc_dump_profile, (int *) 4);
+ create_proc_read_entry ("time", 0, dir_profiler, plc_dump_profile,
+ (int *) 1);
+ create_proc_read_entry ("count", 0, dir_profiler, plc_dump_profile,
+ (int *) 2);
+ create_proc_read_entry ("average", 0, dir_profiler, plc_dump_profile,
+ (int *) 3);
+ create_proc_read_entry ("percent", 0, dir_profiler, plc_dump_profile,
+ (int *) 4);
#endif
dir_sp = proc_mkdir ("sp", dir_plc);
@@ -3527,12 +3976,14 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, dir_noise_bpsk, proc_r_noise, (int *) i);
- create_proc_read_entry (nb_str, 0, dir_noise_qam16, proc_r_noise, (int *) (100 + i));
-#ifdef CE_ITERATIF
- create_proc_read_entry (nb_str, 0, dir_noise_distMin, proc_r_noiseDist, (int *) i);
- create_proc_read_entry (nb_str, 0, dir_noise_distMax, proc_r_noiseDist, (int *) (100 + i));
-#endif
+ create_proc_read_entry (nb_str, 0, dir_noise_bpsk, proc_r_noise,
+ (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_noise_qam16, proc_r_noise,
+ (int *) (100 + i));
+ create_proc_read_entry (nb_str, 0, dir_noise_distMin,
+ proc_r_noiseDist, (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_noise_distMax,
+ proc_r_noiseDist, (int *) (100 + i));
}
dir_sph = proc_mkdir ("sph", dir_plc);
@@ -3573,7 +4024,8 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, dir_signal, proc_r_pilots_signal, (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_signal, proc_r_pilots_signal,
+ (int *) i);
}
dir_adapts = proc_mkdir ("adapts", dir_plc);
@@ -3599,7 +4051,8 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
dir_internals = proc_mkdir ("internals", dir_plc);
entree = create_proc_entry ("carp", 0644, dir_internals);
- create_proc_read_entry ("carp_by_age", 0, dir_internals, proc_r_carp_by_age, dev);
+ create_proc_read_entry ("carp_by_age", 0, dir_internals,
+ proc_r_carp_by_age, dev);
entree->read_proc = proc_r_carp_entries;
entree->write_proc = proc_w_carp_entries;
entree->data = (int *) dev;
@@ -3615,11 +4068,11 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
create_proc_read_entry ("frames", 0, dir_int_mac, proc_r_mac_frames, dev);
-#ifdef BUFFER_ISOLATION
- create_proc_read_entry ("buffers", 0, dir_int_mac, proc_r_mac_buffers, dev);
-#endif
+ create_proc_read_entry ("buffers", 0, dir_int_mac, proc_r_mac_buffers,
+ dev);
#ifdef DEBUG_SEQNO
- create_proc_read_entry ("samples", 0, dir_int_mac, proc_r_mac_samples, dev);
+ create_proc_read_entry ("samples", 0, dir_int_mac, proc_r_mac_samples,
+ dev);
#endif
#ifdef CONFIG_PLC_DEBUG
@@ -3638,14 +4091,18 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
dir_int_plcp = proc_mkdir ("plcp", dir_internals);
create_proc_read_entry ("dma", 0, dir_int_plcp, proc_r_plcp_dma, dev);
- create_proc_read_entry ("frames", 0, dir_int_plcp, proc_r_plcp_frames, dev);
- create_proc_read_entry ("headers", 0, dir_int_plcp, proc_r_plcp_headers, dev);
- create_proc_read_entry ("events", 0, dir_int_plcp, proc_r_plcp_events, dev);
+ create_proc_read_entry ("frames", 0, dir_int_plcp, proc_r_plcp_frames,
+ dev);
+ create_proc_read_entry ("headers", 0, dir_int_plcp, proc_r_plcp_headers,
+ dev);
+ create_proc_read_entry ("events", 0, dir_int_plcp, proc_r_plcp_events,
+ dev);
create_proc_read_entry ("log", 0, dir_int_plcp, plcp_kdebug_log, dev);
#ifdef CONFIG_PLC_DEBUG
create_proc_read_entry ("traces", 0, dir_int_plcp, plcp_traces_log, dev);
#endif
- create_proc_read_entry ("chunk_map", 0, dir_int_plcp, proc_r_plcp_chunk_map, dev);
+ create_proc_read_entry ("chunk_map", 0, dir_int_plcp,
+ proc_r_plcp_chunk_map, dev);
init_pmd_procfs (dir_plc);
@@ -3653,18 +4110,21 @@ void init_plc_procfs (struct plc_drv_unit *unit, struct net_device *dev)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, unit->hostDir, proc_r_host, (int *) i);
+ create_proc_read_entry (nb_str, 0, unit->hostDir, proc_r_host,
+ (int *) i);
}
dir_stats_host = proc_mkdir ("host", dir_stats);
for (i = 0; i < PLCP_MAX_HOST; i++)
{
sprintf (nb_str, "%d", i);
- create_proc_read_entry (nb_str, 0, dir_stats_host, proc_r_host_stats, (int *) i);
+ create_proc_read_entry (nb_str, 0, dir_stats_host, proc_r_host_stats,
+ (int *) i);
}
create_proc_read_entry ("scan", 0, dir_plc, proc_r_scan, dev);
- create_proc_read_entry ("software_build", 0, dir_plc, proc_r_software_build, dev);
+ create_proc_read_entry ("software_build", 0, dir_plc,
+ proc_r_software_build, dev);
}
diff --git a/app/sm-plc-drv/src/plc_prof.c b/app/sm-plc-drv/src/plc_prof.c
index a946715a3f..da387d720b 100755
--- a/app/sm-plc-drv/src/plc_prof.c
+++ b/app/sm-plc-drv/src/plc_prof.c
@@ -9,9 +9,11 @@ int prof_enable = 0;
struct prof_entry profEntry[MAX_PROF_ENTRY][MAX_HASH_COL];
struct prof_entry_prev profEntryPrev[MAX_PROF_ENTRY][MAX_HASH_COL];
-void inline __cyg_profile_func_enter (void *, void *) __attribute__ ((no_instrument_function));
+void inline __cyg_profile_func_enter (void *, void *)
+ __attribute__ ((no_instrument_function));
-void inline __cyg_profile_func_exit (void *, void *) __attribute__ ((no_instrument_function));
+void inline __cyg_profile_func_exit (void *, void *)
+ __attribute__ ((no_instrument_function));
/* Profiling Functions */
diff --git a/app/sm-plc-drv/src/plc_sampler.c b/app/sm-plc-drv/src/plc_sampler.c
index e080f3a531..d92878d313 100755
--- a/app/sm-plc-drv/src/plc_sampler.c
+++ b/app/sm-plc-drv/src/plc_sampler.c
@@ -34,16 +34,19 @@ int fft_gain_equal (void *addr1, void *addr2)
struct fft_gain_sample *sample2 = (struct fft_gain_sample *) addr2;
return ((sample1->val_timer == sample2->val_timer) &&
- (sample1->symbolnb == sample2->symbolnb) && (sample1->current_band == sample2->current_band));
+ (sample1->symbolnb == sample2->symbolnb) &&
+ (sample1->current_band == sample2->current_band));
}
int fft_gain_print (char *buf, void *addr)
{
struct fft_gain_sample *sample = (struct fft_gain_sample *) addr;
- return sprintf (buf, "%d sym=%d next_rx_symbol=%x current_band=%x fft_gain=%d\n",
+ return sprintf (buf,
+ "%d sym=%d next_rx_symbol=%x current_band=%x fft_gain=%d\n",
sample->val_timer, sample->symbolnb,
- sample->next_rx_symbol, sample->current_band, sample->fft_gain);
+ sample->next_rx_symbol, sample->current_band,
+ sample->fft_gain);
}
struct sampler_ops fft_gain_sampler_ops = {
@@ -55,6 +58,8 @@ struct sampler_ops fft_gain_sampler_ops = {
void plc_sampler_init (void)
{
fft_gain_sampler =
- sampler_create (sizeof (struct fft_gain_sample), &fft_gain_sampler_ops, PMD_MAX_FRAME_SLOTS * PMD_MAX_BANDS);
+ sampler_create (sizeof (struct fft_gain_sample),
+ &fft_gain_sampler_ops,
+ PMD_MAX_FRAME_SLOTS * PMD_MAX_BANDS);
ASSERT (fft_gain_sampler);
}
diff --git a/app/sm-plc-drv/src/plc_sysctl.c b/app/sm-plc-drv/src/plc_sysctl.c
index 382d34da0e..0acb3d8145 100644
--- a/app/sm-plc-drv/src/plc_sysctl.c
+++ b/app/sm-plc-drv/src/plc_sysctl.c
@@ -15,6 +15,8 @@
* 2007-08-17 | T.C | - Add Robustness on sysctl (to avoid strange config).
* | | - Remove all "#if 0" and "#if 1". (cleaning)
* | | - CONFIG_PLC_CRYPTO better writed
+ * ---------------------------------------------------------------------------------
+ * 2007-12-11 | T.C | - Restore an another crush from someone.
* --------------------------------------------------------------------------------- */
#include "platform.h"
@@ -49,6 +51,10 @@
#include "gpio.h"
#include "plc_ce.h"
+#ifdef CONFIG_PLC_PPC
+#include "ppc_tst.h"
+#endif
+
#include "mac_signals.h"
#define strtoul simple_strtoul
@@ -173,14 +179,17 @@ void check_ce_configuration (void)
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-void print_one_select (int select, int max_option, char **tab_name, char *output, int *len)
+void print_one_select (int select, int max_option, char **tab_name,
+ char *output, int *len)
{
int i, len_writed = 0;
for (i = 0; i < max_option; i++)
{
- len_writed += sprintf (&output[len_writed], "%2u: [%c] %40s \n", i, (select == i) ? 'X' : ' ', tab_name[i]);
+ len_writed +=
+ sprintf (&output[len_writed], "%2u: [%c] %40s \n", i,
+ (select == i) ? 'X' : ' ', tab_name[i]);
}
*len = len_writed;
@@ -193,14 +202,17 @@ void print_one_select (int select, int max_option, char **tab_name, char *output
* -----------------------------------------------------------------------
* RETURN : none
* ----------------------------------------------------------------------- */
-void print_multiple_select (bool * select, int max_option, char **tab_name, char *output, int *len)
+void print_multiple_select (bool * select, int max_option, char **tab_name,
+ char *output, int *len)
{
int i, len_writed = 0;
for (i = 0; i < max_option; i++)
{
- len_writed += sprintf (&output[len_writed], "%2u: [%c] %40s \n", i, (select[i]) ? 'X' : ' ', tab_name[i]);
+ len_writed +=
+ sprintf (&output[len_writed], "%2u: [%c] %40s \n", i,
+ (select[i]) ? 'X' : ' ', tab_name[i]);
}
*len = len_writed;
@@ -233,7 +245,8 @@ EXPORT_SYMBOL (crypto_map_enable);
extern const char *plc_if_mode_str (plc_if_mode_t mode);
-static int std_proc_handler (ctl_table * ctl, int write, struct file *filp, void __user * buffer, size_t * lenp,
+static int std_proc_handler (ctl_table * ctl, int write, struct file *filp,
+ void __user * buffer, size_t * lenp,
loff_t * ppos)
{
if (write)
@@ -257,7 +270,8 @@ static int std_proc_handler (ctl_table * ctl, int write, struct file *filp, void
return 0;
}
-static int sysctl_hostNb (ctl_table * table, int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
+static int sysctl_hostNb (ctl_table * table, int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
void __user * newval, size_t newlen, void **context)
{
struct plcp_host *host;
@@ -287,8 +301,11 @@ static int sysctl_hostNb (ctl_table * table, int __user * name, int nlen, void _
}
static int sysctl_plcp_max_corr_thr (ctl_table * table,
- int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -304,8 +321,11 @@ static int sysctl_plcp_max_corr_thr (ctl_table * table,
}
static int sysctl_plcp_max_corr_fn (ctl_table * table,
- int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
@@ -338,8 +358,11 @@ static int sysctl_plcp_max_corr_fn (ctl_table * table,
#ifdef CONFIG_PLC_MEASURES
static int sysctl_plcp_max_corr_mul (ctl_table * table,
- int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -355,8 +378,11 @@ static int sysctl_plcp_max_corr_mul (ctl_table * table,
}
static int sysctl_plcp_max_corr_div (ctl_table * table,
- int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
@@ -375,8 +401,11 @@ static int sysctl_plcp_max_corr_div (ctl_table * table,
}
static int sysctl_plcp_max_corr_b (ctl_table * table,
- int __user * name, int nlen, void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -393,8 +422,10 @@ static int sysctl_plcp_max_corr_b (ctl_table * table,
static int sysctl_plcp_min_corr_thr (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -413,15 +444,18 @@ static int sysctl_plcp_min_corr_thr (ctl_table * table,
static int sysctl_plcp_static_spy_band (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
if (oldval)
{
- *oldlenp = sprintf (oldval, "%d", unit->plcp.config.static_spy_band) + 1;
+ *oldlenp =
+ sprintf (oldval, "%d", unit->plcp.config.static_spy_band) + 1;
}
if (newval)
@@ -460,15 +494,18 @@ static int sysctl_plcp_detect_bands(ctl_table *table,
static int sysctl_plcp_fft_gain_sampler (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
if (oldval)
{
- *oldlenp = sprintf (oldval, "%d", unit->plcp.config.fft_gain_sampler) + 1;
+ *oldlenp =
+ sprintf (oldval, "%d", unit->plcp.config.fft_gain_sampler) + 1;
}
if (newval)
@@ -484,7 +521,8 @@ static int sysctl_plcp_fft_gain_sampler (ctl_table * table,
static int sysctl_plcp_crc_min (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
@@ -505,7 +543,8 @@ static int sysctl_plcp_crc_min (ctl_table * table,
static int sysctl_plcp_crc_max (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
@@ -524,8 +563,10 @@ static int sysctl_plcp_crc_max (ctl_table * table,
}
static int sysctl_plcp_crc_step_up (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
@@ -545,15 +586,18 @@ static int sysctl_plcp_crc_step_up (ctl_table * table,
static int sysctl_plcp_crc_step_down (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int val;
if (oldval)
{
- *oldlenp = sprintf (oldval, "%d", unit->plcp.config.crc_step_down) + 1;
+ *oldlenp =
+ sprintf (oldval, "%d", unit->plcp.config.crc_step_down) + 1;
}
if (newval)
@@ -568,7 +612,8 @@ static int sysctl_plcp_crc_step_down (ctl_table * table,
static int sysctl_plcp_traces (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -606,7 +651,8 @@ static int sysctl_ack (ctl_table * table,
static int sysctl_analyser (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
static int saved_mode;
static uint8_t saved_bands;
@@ -652,7 +698,8 @@ static int sysctl_analyser (ctl_table * table,
static int sysctl_ce_enable (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -673,25 +720,19 @@ static int sysctl_ce_enable (ctl_table * table,
{
case 0:
ce_state = 0;
-#ifdef CE_ITERATIF
unit->ce.oneshot = 0;
-#endif
send_mm_l2r_sig (PLC_CE_MSG, (void *) 0);
break;
case 1:
ce_state = 1;
-#ifdef CE_ITERATIF
unit->ce.oneshot = 0;
-#endif
send_mm_l2r_sig (PLC_CE_MSG, (void *) 1);
break;
-#ifdef CE_ITERATIF
case 2:
ce_state = 2;
unit->ce.oneshot = 1;
send_mm_l2r_sig (PLC_CE_MSG, (void *) 1);
break;
-#endif
}
}
@@ -701,14 +742,16 @@ static int sysctl_ce_enable (ctl_table * table,
static int sysctl_ce_nb_sound (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.nb_sound) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.nb_sound) + 1;
}
if (newval) // write
@@ -729,7 +772,9 @@ static int sysctl_ce_nb_sound (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.config_medium != MEDIUM_UNLOCKED)
{
- sprintf (newval, "%u stored, but not used (see config_medium) !", val);
+ sprintf (newval,
+ "%u stored, but not used (see config_medium) !",
+ val);
}
}
}
@@ -740,7 +785,8 @@ static int sysctl_ce_nb_sound (ctl_table * table,
static int sysctl_ce_config (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
@@ -753,7 +799,8 @@ static int sysctl_ce_config (ctl_table * table,
[CE_UNLOCKED_CONFIG] = "Unlocked mode (Expert)",
};
- print_one_select (unit->expert_config.ce.mode, NB_CE_CONFIG, ce_mode_name, (char *) oldval, (int *) oldlenp);
+ print_one_select (unit->expert_config.ce.mode, NB_CE_CONFIG,
+ ce_mode_name, (char *) oldval, (int *) oldlenp);
}
if (newval) // write
@@ -764,11 +811,7 @@ static int sysctl_ce_config (ctl_table * table,
value = strtoul (newval, NULL, 0);
// Unit of val is in 'ms'
- if ((value >= NB_CE_CONFIG)
-#ifndef CE_ITERATIF
- || (value = CE_ITERATIVE_CONFIG)
-#endif
- )
+ if (value >= NB_CE_CONFIG)
{
status = -EINVAL;
sprintf (newval, "invalid value entered !");
@@ -783,11 +826,11 @@ static int sysctl_ce_config (ctl_table * table,
return status;
}
-#ifdef CE_ITERATIF
static int sysctl_ce_coefnoise (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -819,13 +862,15 @@ static int sysctl_ce_coefnoise (ctl_table * table,
static int sysctl_ce_iteratif (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.iteratif) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.iteratif) + 1;
}
else if (newval) // write
@@ -843,7 +888,8 @@ static int sysctl_ce_iteratif (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", value);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ value);
}
}
@@ -852,8 +898,10 @@ static int sysctl_ce_iteratif (ctl_table * table,
static int sysctl_ce_auto_ajust (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -884,7 +932,8 @@ extern uint16_t ce_gaps[6];
static int sysctl_ce_gap_bpsk (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -915,7 +964,8 @@ static int sysctl_ce_gap_bpsk (ctl_table * table,
static int sysctl_ce_gap_qpsk (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -946,7 +996,8 @@ static int sysctl_ce_gap_qpsk (ctl_table * table,
static int sysctl_ce_gap_qam16 (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -977,7 +1028,8 @@ static int sysctl_ce_gap_qam16 (ctl_table * table,
static int sysctl_ce_gap_qam64 (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1007,8 +1059,10 @@ static int sysctl_ce_gap_qam64 (ctl_table * table,
static int sysctl_ce_gap_qam256 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1036,12 +1090,12 @@ static int sysctl_ce_gap_qam256 (ctl_table * table,
return 0;
}
-#endif
static int sysctl_ce_period (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
@@ -1069,7 +1123,9 @@ static int sysctl_ce_period (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.config_medium != MEDIUM_UNLOCKED)
{
- sprintf (newval, "%u stored, but not used (see config_medium) !", val);
+ sprintf (newval,
+ "%u stored, but not used (see config_medium) !",
+ val);
}
}
}
@@ -1080,8 +1136,10 @@ static int sysctl_ce_period (ctl_table * table,
#ifdef CONFIG_PLC_MCAST
static int sysctl_ce_mcast_period (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1110,8 +1168,10 @@ static int sysctl_ce_mcast_period (ctl_table * table,
#ifdef CONFIG_PLC_MCAST
static int sysctl_ce_mcast_group_down (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1139,8 +1199,10 @@ static int sysctl_ce_mcast_group_down (ctl_table * table,
static int sysctl_ce_pilots_thr (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1174,7 +1236,8 @@ int atoi (char *buf)
static int sysctl_ce_band_min (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1203,7 +1266,8 @@ static int sysctl_ce_band_min (ctl_table * table,
static int sysctl_ce_timeout (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
@@ -1231,7 +1295,9 @@ static int sysctl_ce_timeout (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.config_medium != MEDIUM_UNLOCKED)
{
- sprintf (newval, "%u stored, but not used (see config_medium) !", val);
+ sprintf (newval,
+ "%u stored, but not used (see config_medium) !",
+ val);
}
}
}
@@ -1242,7 +1308,8 @@ static int sysctl_ce_timeout (ctl_table * table,
static int sysctl_ce_slots (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1270,8 +1337,10 @@ static int sysctl_ce_slots (ctl_table * table,
static int sysctl_ce_auto_correct (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
@@ -1284,7 +1353,9 @@ static int sysctl_ce_auto_correct (ctl_table * table,
[RX_AUTO_CORRECT] = "RX auto correct",
};
- print_one_select (unit->ce.auto_correct, NB_AUTO_CORRECT, auto_correct_name, (char *) oldval, (int *) oldlenp);
+ print_one_select (unit->ce.auto_correct, NB_AUTO_CORRECT,
+ auto_correct_name, (char *) oldval,
+ (int *) oldlenp);
}
if (newval) // write
@@ -1305,7 +1376,8 @@ static int sysctl_ce_auto_correct (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -1316,7 +1388,8 @@ static int sysctl_ce_auto_correct (ctl_table * table,
static int sysctl_ce_step (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1324,7 +1397,8 @@ static int sysctl_ce_step (ctl_table * table,
{
extern char *ce_step_name[CE_NB_STEPS];
- print_multiple_select (unit->ce.steps, CE_NB_STEPS, ce_step_name, (char *) oldval, (int *) oldlenp);
+ print_multiple_select (unit->ce.steps, CE_NB_STEPS, ce_step_name,
+ (char *) oldval, (int *) oldlenp);
}
if (newval) // write
@@ -1352,7 +1426,8 @@ static int sysctl_ce_step (ctl_table * table,
static int sysctl_ce_power (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1382,7 +1457,8 @@ static int sysctl_ce_power (ctl_table * table,
static int sysctl_ce_realspec (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1412,7 +1488,8 @@ extern uint16_t agc_goaldeff;
static int sysctl_ce_agcgoal1 (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1444,7 +1521,8 @@ static int sysctl_ce_agcgoal1 (ctl_table * table,
static int sysctl_ce_agcgoal2 (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1475,7 +1553,8 @@ static int sysctl_ce_agcgoal2 (ctl_table * table,
static int sysctl_ce_power_equ (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1487,7 +1566,8 @@ static int sysctl_ce_power_equ (ctl_table * table,
sprintf (oldval, "%s",
(unit->ce.data_power ==
DATA_POWER_MANUAL) ? "MANUAL" : ((unit->ce.data_power ==
- DATA_POWER_AUTO) ? "AUTO" : "EQUAL")) + 1;
+ DATA_POWER_AUTO) ?
+ "AUTO" : "EQUAL")) + 1;
*oldlenp = len;
}
@@ -1517,7 +1597,8 @@ static int sysctl_ce_power_equ (ctl_table * table,
static int sysctl_ce_data_gain (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1545,8 +1626,10 @@ static int sysctl_ce_data_gain (ctl_table * table,
static int sysctl_ce_unused_data_gain (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int i;
@@ -1586,8 +1669,10 @@ static int sysctl_ce_unused_data_gain (ctl_table * table,
static int sysctl_ce_dist_min_up (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1613,8 +1698,10 @@ static int sysctl_ce_dist_min_up (ctl_table * table,
static int sysctl_ce_dist_max_down (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1641,7 +1728,8 @@ static int sysctl_ce_dist_max_down (ctl_table * table,
static int sysctl_ce_ref_coef (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1671,8 +1759,10 @@ static int sysctl_ce_ref_coef (ctl_table * table,
static int sysctl_ce_removing_enabled (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1700,8 +1790,10 @@ static int sysctl_ce_removing_enabled (ctl_table * table,
static int sysctl_ce_no_response (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1730,15 +1822,18 @@ static int sysctl_ce_no_response (ctl_table * table,
static int sysctl_ce_nb_ber_test (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.nb_ber_test) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.nb_ber_test) + 1;
}
if (newval) // write
@@ -1758,7 +1853,9 @@ static int sysctl_ce_nb_ber_test (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.config_medium != MEDIUM_UNLOCKED)
{
- sprintf (newval, "%u stored, but not used (see config_medium) !", val);
+ sprintf (newval,
+ "%u stored, but not used (see config_medium) !",
+ val);
}
}
}
@@ -1769,7 +1866,8 @@ static int sysctl_ce_nb_ber_test (ctl_table * table,
static int sysctl_ce_max_mtu (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1798,7 +1896,8 @@ static int sysctl_ce_max_mtu (ctl_table * table,
static int sysctl_ce_min_mtu (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1824,8 +1923,10 @@ static int sysctl_ce_min_mtu (ctl_table * table,
static int sysctl_ce_target_pow (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
extern double __target_pow;
char *text;
@@ -1931,7 +2032,8 @@ static int sysctl_ce_cid (ctl_table * table,
static int sysctl_nd_period (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1986,7 +2088,8 @@ static int sysctl_nd_cid (ctl_table * table,
static int sysctl_sar_mode (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
// For understand this parameter, you should read SAR specification in spidcom's server.
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1999,7 +2102,8 @@ static int sysctl_sar_mode (ctl_table * table,
[DYNASAR] = "Dynamic SAR"
};
- print_one_select (unit->sar.mode, NB_SAR_MODE, sar_mode_name, (char *) oldval, (int *) oldlenp);
+ print_one_select (unit->sar.mode, NB_SAR_MODE, sar_mode_name,
+ (char *) oldval, (int *) oldlenp);
}
else if (newval) // write
{
@@ -2021,8 +2125,10 @@ static int sysctl_sar_mode (ctl_table * table,
static int sysctl_dynasar_level (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
// For understand this parameter, you should read SAR specification in spidcom's server.
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2051,8 +2157,10 @@ static int sysctl_dynasar_level (ctl_table * table,
static int sysctl_dynasar_delta (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
// For understand this parameter, you should read SAR specification in spidcom's server.
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2081,8 +2189,10 @@ static int sysctl_dynasar_delta (ctl_table * table,
static int sysctl_sar_reordering (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2111,8 +2221,10 @@ static int sysctl_sar_reordering (ctl_table * table,
static int sysctl_sar_reorderth (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2140,7 +2252,8 @@ static int sysctl_sar_reorderth (ctl_table * table,
static int sysctl_sar_use_sack (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2172,7 +2285,8 @@ static int sysctl_sar_use_sack (ctl_table * table,
static int sysctl_crypto_nek (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -2190,7 +2304,8 @@ static int sysctl_crypto_nek (ctl_table * table,
init_crypto ();
}
else
- printk ("your key must have a length of %d bytes\n", sizeof (nek));
+ printk ("your key must have a length of %d bytes\n",
+ sizeof (nek));
}
return 0;
@@ -2237,7 +2352,8 @@ extern int serial_number_set;
static int sysctl_serial_no (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -2272,7 +2388,8 @@ extern int afe_type;
static int sysctl_afe_version (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2336,8 +2453,10 @@ static int sysctl_afe_version (ctl_table * table,
return 0;
}
-static int sysctl_sn_samples (ctl_table * table, int __user * name, int nlen, void __user * oldval,
- size_t __user * oldlenp, void __user * newval, size_t newlen, void **context)
+static int sysctl_sn_samples (ctl_table * table, int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2359,8 +2478,10 @@ static int sysctl_sn_samples (ctl_table * table, int __user * name, int nlen, vo
return 0;
}
-static int sysctl_sn_period (ctl_table * table, int __user * name, int nlen, void __user * oldval,
- size_t __user * oldlenp, void __user * newval, size_t newlen, void **context)
+static int sysctl_sn_period (ctl_table * table, int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2380,8 +2501,10 @@ static int sysctl_sn_period (ctl_table * table, int __user * name, int nlen, voi
return 0;
}
-static int sysctl_sn_sample (ctl_table * table, int __user * name, int nlen, void __user * oldval,
- size_t __user * oldlenp, void __user * newval, size_t newlen, void **context)
+static int sysctl_sn_sample (ctl_table * table, int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2402,8 +2525,10 @@ static int sysctl_sn_sample (ctl_table * table, int __user * name, int nlen, voi
}
-static int sysctl_scan_samples (ctl_table * table, int __user * name, int nlen, void __user * oldval,
- size_t __user * oldlenp, void __user * newval, size_t newlen, void **context)
+static int sysctl_scan_samples (ctl_table * table, int __user * name,
+ int nlen, void __user * oldval,
+ size_t __user * oldlenp, void __user * newval,
+ size_t newlen, void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2423,8 +2548,10 @@ static int sysctl_scan_samples (ctl_table * table, int __user * name, int nlen,
return 0;
}
-static int sysctl_scan_period (ctl_table * table, int __user * name, int nlen, void __user * oldval,
- size_t __user * oldlenp, void __user * newval, size_t newlen, void **context)
+static int sysctl_scan_period (ctl_table * table, int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2447,7 +2574,8 @@ static int sysctl_scan_period (ctl_table * table, int __user * name, int nlen, v
static int sysctl_tmo_detect (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2475,7 +2603,8 @@ static int sysctl_tmo_detect (ctl_table * table,
static int sysctl_retries (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2504,8 +2633,10 @@ static int sysctl_retries (ctl_table * table,
#if !defined(CONFIG_VERSION_16M) && defined(CONFIG_PLC_DEBUG)
static int sysctl_debug_modules (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2544,7 +2675,8 @@ static int sysctl_debug_modules (ctl_table * table,
{
if (!strncmp (module_list[i], str, strlen (str) - 2))
{
- if ((str[strlen (str) - 1] == '+') || (str[strlen (str) - 2] == '+'))
+ if ((str[strlen (str) - 1] == '+') ||
+ (str[strlen (str) - 2] == '+'))
{
DEBUG_MOD |= 1 << i;
}
@@ -2564,7 +2696,8 @@ extern int prof_enable;
static int sysctl_profile (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2618,8 +2751,10 @@ static int sysctl_wait (ctl_table * table,
static int sysctl_tx_more_slots (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2645,7 +2780,7 @@ static int sysctl_tx_more_slots (ctl_table * table,
return 0;
}
-
+#ifndef CONFIG_VERSION_16M
static int sysctl_bands (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
@@ -2697,7 +2832,8 @@ static int sysctl_bands (ctl_table * table,
* and in that case it can not be set. */
//allocating memory for the structure:
- systemCarrierTab = kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
+ systemCarrierTab =
+ kmalloc (sizeof (struct system_carrier_tab), GFP_KERNEL);
if (systemCarrierTab == NULL)
return -ENOMEM;
@@ -2705,19 +2841,24 @@ static int sysctl_bands (ctl_table * table,
nbNotchPerBand = 0;
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
- nbNotchPerBand += systemCarrierTab->groupNotch[band * PMD_GROUPS_PER_BAND + group];
+ nbNotchPerBand +=
+ systemCarrierTab->groupNotch[band *
+ PMD_GROUPS_PER_BAND +
+ group];
if (nbNotchPerBand != (PMD_GROUPS_PER_BAND * 255)) /* Band is not all notched */
mask |= (1 << band);
else
- rt_printk ("Band %d can not be set! It's all notched.\n", band);
+ rt_printk ("Band %d can not be set! It's all notched.\n",
+ band);
}
} while (*str++ != '\0');
drv_lock (unit);
plcp_set_bands (unit, mask);
- if (unit->plcp.config.static_spy_band > 0 && unit->plcp.config.static_spy_band < 8)
+ if (unit->plcp.config.static_spy_band > 0 &&
+ unit->plcp.config.static_spy_band < 8)
{
mask_static_spy_band = 1 << unit->plcp.config.static_spy_band;
}
@@ -2732,11 +2873,14 @@ static int sysctl_bands (ctl_table * table,
return 0;
}
+#endif
static int sysctl_bands_together (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -2847,8 +2991,10 @@ static int sysctl_filter (ctl_table * table,
static int sysctl_ce_unused_bands (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -2897,7 +3043,8 @@ static int sysctl_ce_unused_bands (ctl_table * table,
static int sysctl_ce_adapt_max (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
@@ -2934,7 +3081,8 @@ static int sysctl_ce_adapt_max (ctl_table * table,
static int sysctl_ce_adapt_min (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
@@ -2966,12 +3114,15 @@ static int sysctl_ce_adapt_min (ctl_table * table,
static int sysctl_ce_adapt_max_band (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
- *oldlenp = sprintf (oldval, "adapt max in band = %3d\n", __adapt_max_band);
+ *oldlenp =
+ sprintf (oldval, "adapt max in band = %3d\n", __adapt_max_band);
}
if (newval)
@@ -2993,12 +3144,16 @@ static int sysctl_ce_adapt_max_band (ctl_table * table,
static int sysctl_ce_adapt_max_spec (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
- *oldlenp = sprintf (oldval, "adapt max in spectrum = %3d\n", __adapt_max_spec);
+ *oldlenp =
+ sprintf (oldval, "adapt max in spectrum = %3d\n",
+ __adapt_max_spec);
}
if (newval)
@@ -3020,12 +3175,16 @@ static int sysctl_ce_adapt_max_spec (ctl_table * table,
static int sysctl_ce_adapt_over_cnt (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
- *oldlenp = sprintf (oldval, "adapt max overflow count = %3d\n", __adapt_over_cnt);
+ *oldlenp =
+ sprintf (oldval, "adapt max overflow count = %3d\n",
+ __adapt_over_cnt);
}
if (newval)
@@ -3043,13 +3202,17 @@ static int sysctl_ce_adapt_over_cnt (ctl_table * table,
static int sysctl_ce_adapt_extremes (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval)
{ // read
if (__adapt_extreme > 0)
- *oldlenp = sprintf (oldval, "adapt extremes = %d\n", (int) (__adapt_extreme * 100));
+ *oldlenp =
+ sprintf (oldval, "adapt extremes = %d\n",
+ (int) (__adapt_extreme * 100));
else
*oldlenp = sprintf (oldval, "adapt extremes = OFF\n");
}
@@ -3124,7 +3287,7 @@ static void set_bssid (struct plc_drv_unit *unit, int bssid)
*/
}
}
- else if (unit->mode == ad_hoc)
+ else if (unit->mode == ad_hoc || unit->mode == station)
{
struct plcp_host *bhost = plcp_get_host_by_index (0); // get broadcast host to update BSSID
@@ -3155,11 +3318,15 @@ static int sysctl_mode (ctl_table * table,
if (newval) // write
{
- if (!strncmp (newval, plc_if_mode_str (ad_hoc), strlen (plc_if_mode_str (ad_hoc))))
+ if (!strncmp
+ (newval, plc_if_mode_str (ad_hoc),
+ strlen (plc_if_mode_str (ad_hoc))))
{
unit->mode = ad_hoc;
}
- else if (!strncmp (newval, plc_if_mode_str (repeater), strlen (plc_if_mode_str (repeater))))
+ else if (!strncmp
+ (newval, plc_if_mode_str (repeater),
+ strlen (plc_if_mode_str (repeater))))
{
unit->mode = repeater;
// force TEI to zero
@@ -3169,7 +3336,9 @@ static int sysctl_mode (ctl_table * table,
unit->BSSID = BSSID_UNDEF;
set_bssid (unit, unit->defaultBSSID);
}
- else if (!strncmp (newval, plc_if_mode_str (station), strlen (plc_if_mode_str (station))))
+ else if (!strncmp
+ (newval, plc_if_mode_str (station),
+ strlen (plc_if_mode_str (station))))
{
unit->mode = station;
// force tei to undefined
@@ -3190,7 +3359,8 @@ static int sysctl_mode (ctl_table * table,
static int sysctl_calibrate (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3251,7 +3421,8 @@ static int sysctl_ref (ctl_table * table,
static int sysctl_ref_interval (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3280,8 +3451,10 @@ static int sysctl_ref_interval (ctl_table * table,
static int sysctl_nb_periodic_ref (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3368,8 +3541,10 @@ static int sysctl_tx_eof (ctl_table * table,
static int sysctl_check_all_crc (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3399,7 +3574,8 @@ static int sysctl_check_all_crc (ctl_table * table,
static int sysctl_plcp_mode (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3447,7 +3623,8 @@ static int sysctl_plcp_mode (ctl_table * table,
static int sysctl_control (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3515,7 +3692,8 @@ static int sysctl_vote (ctl_table * table,
static int sysctl_ber_control (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3542,7 +3720,8 @@ static int sysctl_ber_control (ctl_table * table,
{
for (band = 0; band < PMD_MAX_BANDS; band++)
{
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
{
unit->stats.ber_control.error[band][carrier] = 0;
}
@@ -3565,7 +3744,8 @@ static int sysctl_ber_control (ctl_table * table,
static int sysctl_hamming (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3642,7 +3822,8 @@ static int sysctl_reeds (ctl_table * table,
static int sysctl_all_hamming (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3650,7 +3831,8 @@ static int sysctl_all_hamming (ctl_table * table,
{
size_t len;
- len = sprintf (oldval, "%u", unit->plcp.config.hamming.all_hamming) + 1;
+ len =
+ sprintf (oldval, "%u", unit->plcp.config.hamming.all_hamming) + 1;
*oldlenp = len;
}
@@ -3665,7 +3847,8 @@ static int sysctl_all_hamming (ctl_table * table,
if (val == 1)
unit->plcp.config.hamming.enable = 1;
unit->plcp.config.hamming.all_hamming = val;
- printk ("ALL_HAM\nval=%d ; ham=%d ; all_ham=%d\n", val, unit->plcp.config.hamming.enable,
+ printk ("ALL_HAM\nval=%d ; ham=%d ; all_ham=%d\n", val,
+ unit->plcp.config.hamming.enable,
unit->plcp.config.hamming.enable);
drv_unlock (unit);
}
@@ -3675,8 +3858,10 @@ static int sysctl_all_hamming (ctl_table * table,
static int sysctl_entropy_enable (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3684,7 +3869,9 @@ static int sysctl_entropy_enable (ctl_table * table,
{
size_t len;
- len = sprintf (oldval, "%u", unit->plcp.config.hamming.entropy.enable) + 1;
+ len =
+ sprintf (oldval, "%u",
+ unit->plcp.config.hamming.entropy.enable) + 1;
*oldlenp = len;
}
@@ -3705,8 +3892,10 @@ static int sysctl_entropy_enable (ctl_table * table,
}
static int sysctl_entropy_limit (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3714,7 +3903,9 @@ static int sysctl_entropy_limit (ctl_table * table,
{
size_t len;
- len = sprintf (oldval, "%u", unit->plcp.config.hamming.entropy.limit) + 1;
+ len =
+ sprintf (oldval, "%u",
+ unit->plcp.config.hamming.entropy.limit) + 1;
*oldlenp = len;
}
@@ -3736,8 +3927,10 @@ static int sysctl_entropy_limit (ctl_table * table,
static int sysctl_new_scrambler (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3763,12 +3956,128 @@ static int sysctl_new_scrambler (ctl_table * table,
return 0;
}
+static int sysctl_stat_rx_enable (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len = sprintf (oldval, "%u", unit->plcp.config.stat_rx.enable) + 1;
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ unsigned int val;
+
+ val = strtoul (newval, NULL, 0);
+ if (val < 0 || val > 1)
+ val = 1;
+ drv_lock (unit);
+ unit->plcp.config.stat_rx.enable = val;
+ drv_unlock (unit);
+
+#ifdef CONFIG_PLC_MEASURES
+ // Stop service ber_control for new init.
+ unit->plcp.config.ber_control = 0;
+ bc_ready = false;
+#endif
+ }
+
+ return 0;
+}
+
+static int sysctl_stat_rx_fast (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len = sprintf (oldval, "%u", unit->plcp.config.stat_rx.fast) + 1;
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ unsigned int val;
+
+ val = strtoul (newval, NULL, 0);
+ if (val < 0 || val > 1)
+ val = 1;
+ drv_lock (unit);
+ unit->plcp.config.stat_rx.fast = val;
+ drv_unlock (unit);
+
+#ifdef CONFIG_PLC_MEASURES
+ // Stop service ber_control for new init.
+ unit->plcp.config.ber_control = 0;
+ bc_ready = false;
+#endif
+ }
+
+ return 0;
+}
+
+static int sysctl_stat_rx_band_votes (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len =
+ sprintf (oldval, "%u", unit->plcp.config.stat_rx.band_votes) + 1;
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ unsigned int val;
+
+ val = strtoul (newval, NULL, 0);
+ if (val < 0 || val > 1)
+ val = 1;
+ drv_lock (unit);
+ unit->plcp.config.stat_rx.band_votes = val;
+ drv_unlock (unit);
+
+#ifdef CONFIG_PLC_MEASURES
+ // Stop service ber_control for new init.
+ unit->plcp.config.ber_control = 0;
+ bc_ready = false;
+#endif
+ }
+
+ return 0;
+}
+
+
extern int default_ogain;
static int sysctl_default_gain (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3798,7 +4107,8 @@ static int sysctl_default_gain (ctl_table * table,
static int sysctl_bridge_queue (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -3826,15 +4136,18 @@ static int sysctl_bridge_queue (ctl_table * table,
static int sysctl_ce_levels_qam256 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.levels[5]) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.levels[5]) + 1;
}
if (newval) // write
@@ -3855,7 +4168,8 @@ static int sysctl_ce_levels_qam256 (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -3867,15 +4181,18 @@ static int sysctl_ce_levels_qam256 (ctl_table * table,
static int sysctl_ce_levels_qam64 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.levels[4]) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.levels[4]) + 1;
}
if (newval) // write
@@ -3896,7 +4213,8 @@ static int sysctl_ce_levels_qam64 (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -3907,15 +4225,18 @@ static int sysctl_ce_levels_qam64 (ctl_table * table,
static int sysctl_ce_levels_qam16 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.levels[3]) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.levels[3]) + 1;
}
if (newval) // write
@@ -3936,7 +4257,8 @@ static int sysctl_ce_levels_qam16 (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -3947,15 +4269,18 @@ static int sysctl_ce_levels_qam16 (ctl_table * table,
static int sysctl_ce_levels_qpsk (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.levels[2]) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.levels[2]) + 1;
}
if (newval) // write
@@ -3976,7 +4301,8 @@ static int sysctl_ce_levels_qpsk (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -3987,15 +4313,18 @@ static int sysctl_ce_levels_qpsk (ctl_table * table,
static int sysctl_ce_levels_bpsk (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
if (oldval) // read
{
- *oldlenp = sprintf (oldval, "%u", unit->expert_config.ce.levels[1]) + 1;
+ *oldlenp =
+ sprintf (oldval, "%u", unit->expert_config.ce.levels[1]) + 1;
}
if (newval) // write
@@ -4016,7 +4345,8 @@ static int sysctl_ce_levels_bpsk (ctl_table * table,
check_ce_configuration ();
if (unit->expert_config.ce.mode != CE_UNLOCKED_CONFIG)
{
- sprintf (newval, "%u stored, but not used (see ce.mode) !", val);
+ sprintf (newval, "%u stored, but not used (see ce.config) !",
+ val);
}
}
}
@@ -4030,8 +4360,10 @@ extern uint16_t fec_limit[];
// fec_limit between 0 and 65535
static int sysctl_ce_fec_limit_qam256 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4061,8 +4393,10 @@ static int sysctl_ce_fec_limit_qam256 (ctl_table * table,
// fec_limit between 0 and 65535
static int sysctl_ce_fec_limit_qam64 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4092,8 +4426,10 @@ static int sysctl_ce_fec_limit_qam64 (ctl_table * table,
// fec_limit between 0 and 65535
static int sysctl_ce_fec_limit_qam16 (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4123,8 +4459,10 @@ static int sysctl_ce_fec_limit_qam16 (ctl_table * table,
// fec_limit between 0 and 65535
static int sysctl_ce_fec_limit_qpsk (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4154,8 +4492,10 @@ static int sysctl_ce_fec_limit_qpsk (ctl_table * table,
// fec_limit between 0 and 65535
static int sysctl_ce_fec_limit_bpsk (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4186,8 +4526,10 @@ extern int bridge_forwarding;
static int sysctl_bridgeForwarding (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4216,7 +4558,8 @@ static int sysctl_bridgeForwarding (ctl_table * table,
static int sysctl_cp_duration (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4246,8 +4589,10 @@ static int sysctl_cp_duration (ctl_table * table,
static int sysctl_cell_forwarding (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4275,7 +4620,8 @@ static int sysctl_cell_forwarding (ctl_table * table,
static int sysctl_sap_queue (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4303,7 +4649,8 @@ static int sysctl_sap_queue (ctl_table * table,
static int sysctl_cap_queue (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4331,7 +4678,8 @@ static int sysctl_cap_queue (ctl_table * table,
static int sysctl_drv_lock (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
static int locked = 0;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4367,7 +4715,8 @@ static int sysctl_drv_lock (ctl_table * table,
static int sysctl_max_hold (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
extern int tx_coord_max_holding;
@@ -4376,7 +4725,8 @@ static int sysctl_max_hold (ctl_table * table,
{
size_t len;
- len = sprintf (oldval, "%u ms", tx_coord_max_holding * OS_TICK_MS) + 1;
+ len =
+ sprintf (oldval, "%u ms", tx_coord_max_holding * OS_TICK_MS) + 1;
*oldlenp = len;
}
@@ -4445,6 +4795,68 @@ static int sysctl_teinid (ctl_table * table,
return 0;
}
+
+static int sysctl_ppc_mj (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen, void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len = sprintf (oldval, "%u", unit->NID) + 1;
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ if (unit->mode == ad_hoc)
+ {
+ tst_fun_ppc_mj (newval);
+ /* implement test functions */
+ printk ("NEW value:%s\n", newval);
+
+ }
+ else
+ {
+ return -EPERM;
+ }
+ }
+
+ return 0;
+}
+static int sysctl_ppc_lr (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen, void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len = sprintf (oldval, "%d", ppc_update_all_route) + 1;
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ if (unit->mode == ad_hoc)
+ {
+ sscanf (newval, "%d", &ppc_update_all_route);
+ }
+ else
+ {
+ return -EPERM;
+ }
+ }
+
+ return 0;
+}
#else
static int sysctl_tei (ctl_table * table,
@@ -4487,7 +4899,8 @@ static int sysctl_tei (ctl_table * table,
static int sysctl_agc_cal (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4514,8 +4927,10 @@ static int sysctl_agc_cal (ctl_table * table,
static int sysctl_config_medium (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
int status = 0;
@@ -4528,8 +4943,8 @@ static int sysctl_config_medium (ctl_table * table,
[MEDIUM_UNLOCKED] = "Unlocked mode (Expert)",
};
- print_one_select (unit->expert_config.ce.config_medium, NB_MEDIUM, plc_medium_name, (char *) oldval,
- (int *) oldlenp);
+ print_one_select (unit->expert_config.ce.config_medium, NB_MEDIUM,
+ plc_medium_name, (char *) oldval, (int *) oldlenp);
}
if (newval) // write
@@ -4552,6 +4967,92 @@ static int sysctl_config_medium (ctl_table * table,
return status;
}
+#ifdef CONFIG_PLC_RTSCTS
+static int sysctl_rts_threshold (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ unsigned int len;
+
+ len = sprintf (oldval, "%u", unit->rts_threshold) + 1;
+ *oldlenp = len;
+ }
+ if (newval) // write
+ {
+ unsigned int val;
+
+ val = strtoul (newval, NULL, 0);
+ if (val < 17)
+ return -EINVAL;
+ else
+ unit->rts_threshold = val;
+ }
+
+ return 0;
+}
+
+static int sysctl_nav_offset (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ int len;
+
+ len = sprintf (oldval, "%d", unit->nav_offset) + 1;
+ *oldlenp = len;
+ }
+ if (newval) // write
+ {
+ int val;
+
+ val = strtol (newval, NULL, 0);
+ unit->nav_offset = val;
+ }
+
+ return 0;
+}
+
+static int sysctl_max_rts_retrans (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ unsigned int len;
+
+ len = sprintf (oldval, "%u", unit->max_rts_retrans) + 1;
+ *oldlenp = len;
+ }
+ if (newval) // write
+ {
+ unsigned int val;
+
+ val = strtoul (newval, NULL, 0);
+ unit->max_rts_retrans = val;
+ }
+
+ return 0;
+}
+
+#endif
+
static int sysctl_bssid (ctl_table * table, int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
void __user * newval, size_t newlen, void **context)
@@ -4609,7 +5110,8 @@ static int sysctl_SNID (ctl_table * table, int __user * name, int nlen,
static int sysctl_tmo_yield (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4644,7 +5146,8 @@ void nco_stop_token (struct plc_drv_unit *unit);
static int sysctl_yield_enable (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
extern int tok_started;
@@ -4690,9 +5193,11 @@ static int sysctl_yield_enable (ctl_table * table,
}
-static int sysctl_prefered_bssid (ctl_table * table, int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+static int sysctl_prefered_bssid (ctl_table * table, int __user * name,
+ int nlen, void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4721,10 +5226,39 @@ static int sysctl_prefered_bssid (ctl_table * table, int __user * name, int nlen
return 0;
}
+static int sysctl_8021x_auth (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval, size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ *oldlenp = sprintf (oldval, "%u", unit->auth_8021x) + 1;
+ }
+ else if (newval) // write
+ {
+ unsigned int value;
+
+ value = strtoul (newval, NULL, 0);
+
+ if (value == 0)
+ unit->auth_8021x = value;
+ else
+ unit->auth_8021x = 1;
+ }
+
+ return 0;
+}
+
static int sysctl_cfp_broadcast (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plcp_host *host;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4759,7 +5293,8 @@ static int sysctl_cfp_broadcast (ctl_table * table,
static int sysctl_cfp_duration (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4792,7 +5327,8 @@ static int sysctl_cfp_duration (ctl_table * table,
static int sysctl_cfp_enable (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
extern int cf_started;
@@ -4839,8 +5375,10 @@ static int sysctl_cfp_enable (ctl_table * table,
static int sysctl_cfp_inactivity (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4848,7 +5386,9 @@ static int sysctl_cfp_inactivity (ctl_table * table,
{
size_t len;
- len = sprintf (oldval, "%u", unit->mac.config.cfp_inactivity * OS_TICK_MS) + 1;
+ len =
+ sprintf (oldval, "%u",
+ unit->mac.config.cfp_inactivity * OS_TICK_MS) + 1;
*oldlenp = len;
}
@@ -4866,8 +5406,10 @@ static int sysctl_cfp_inactivity (ctl_table * table,
static int sysctl_poll_thr_nothing (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4893,8 +5435,10 @@ static int sysctl_poll_thr_nothing (ctl_table * table,
static int sysctl_poll_thr_something (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4922,7 +5466,8 @@ static int sysctl_poll_thr_something (ctl_table * table,
static int sysctl_cp_rifs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4947,7 +5492,8 @@ static int sysctl_cp_rifs (ctl_table * table,
static int sysctl_cp_difs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4972,7 +5518,8 @@ static int sysctl_cp_difs (ctl_table * table,
static int sysctl_cp_eifs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -4996,7 +5543,8 @@ static int sysctl_cp_eifs (ctl_table * table,
static int sysctl_cp_pifs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5021,7 +5569,8 @@ static int sysctl_cp_pifs (ctl_table * table,
static int sysctl_cfp_sifs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5071,8 +5620,10 @@ static int sysctl_cp_ts (ctl_table * table,
static int sysctl_ce_mcast_errors (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
char *text;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5105,7 +5656,8 @@ static int sysctl_ce_mcast_errors (ctl_table * table,
static int sysctl_cp_cwmin (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5127,7 +5679,8 @@ static int sysctl_cp_cwmin (ctl_table * table,
{
unit->mac.config.cw_max = unit->mac.config.cw_min;
}
- unit->mac.config.cw_size = unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
+ unit->mac.config.cw_size =
+ unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
}
return 0;
}
@@ -5135,7 +5688,8 @@ static int sysctl_cp_cwmin (ctl_table * table,
static int sysctl_cp_cwmax (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5157,7 +5711,8 @@ static int sysctl_cp_cwmax (ctl_table * table,
{
unit->mac.config.cw_min = unit->mac.config.cw_max;
}
- unit->mac.config.cw_size = unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
+ unit->mac.config.cw_size =
+ unit->mac.config.cw_max + 1 - unit->mac.config.cw_min;
}
return 0;
}
@@ -5165,7 +5720,8 @@ static int sysctl_cp_cwmax (ctl_table * table,
static int sysctl_cfp_rifs (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5190,7 +5746,8 @@ static int sysctl_cfp_rifs (ctl_table * table,
static int sysctl_cp_tmoscale (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5214,8 +5771,10 @@ static int sysctl_cp_tmoscale (ctl_table * table,
static int sysctl_det_removingEnabled (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5239,8 +5798,10 @@ static int sysctl_det_removingEnabled (ctl_table * table,
}
static int sysctl_sync_changeEnabled (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5260,7 +5821,8 @@ static int sysctl_sync_changeEnabled (ctl_table * table,
static int sysctl_corr_enabled (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5280,8 +5842,10 @@ static int sysctl_corr_enabled (ctl_table * table,
static int sysctl_det_staticDetectBands (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5334,8 +5898,10 @@ static int sysctl_det_staticDetectBands (ctl_table * table,
static int sysctl_det_falseStartTogether (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5355,8 +5921,10 @@ static int sysctl_det_falseStartTogether (ctl_table * table,
static int sysctl_det_falseStartMin (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5376,8 +5944,10 @@ static int sysctl_det_falseStartMin (ctl_table * table,
static int sysctl_det_falseStartMax (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5398,7 +5968,8 @@ static int sysctl_det_falseStartMax (ctl_table * table,
static int sysctl_det_timeout (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5424,8 +5995,10 @@ static int sysctl_det_timeout (ctl_table * table,
static int sysctl_det_unusableMove (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5451,8 +6024,10 @@ static int sysctl_det_unusableMove (ctl_table * table,
static int sysctl_det_usableMove (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5478,8 +6053,10 @@ static int sysctl_det_usableMove (ctl_table * table,
static int sysctl_det_levelFromUsable (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5505,8 +6082,10 @@ static int sysctl_det_levelFromUsable (ctl_table * table,
static int sysctl_det_levelFromUnusable (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5533,8 +6112,10 @@ static int sysctl_det_levelFromUnusable (ctl_table * table,
static int sysctl_sync_staticSyncBand (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5560,8 +6141,10 @@ static int sysctl_sync_staticSyncBand (ctl_table * table,
static int sysctl_sync_startLostMove (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5587,8 +6170,10 @@ static int sysctl_sync_startLostMove (ctl_table * table,
static int sysctl_sync_startTrue00Move (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5610,8 +6195,10 @@ static int sysctl_sync_startTrue00Move (ctl_table * table,
static int sysctl_sync_startTrue11Move (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5633,8 +6220,10 @@ static int sysctl_sync_startTrue11Move (ctl_table * table,
static int sysctl_sync_startTrue10Move (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5656,8 +6245,10 @@ static int sysctl_sync_startTrue10Move (ctl_table * table,
static int sysctl_sync_startTrue01Move (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5679,8 +6270,10 @@ static int sysctl_sync_startTrue01Move (ctl_table * table,
static int sysctl_sync_levelFromEnabled (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5706,8 +6299,10 @@ static int sysctl_sync_levelFromEnabled (ctl_table * table,
static int sysctl_sync_levelFromDisabled (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5734,7 +6329,8 @@ static int sysctl_sync_levelFromDisabled (ctl_table * table,
static int sysctl_corr_coefDir (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5761,7 +6357,8 @@ static int sysctl_corr_coefDir (ctl_table * table,
static int sysctl_corr_maxCorr (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5788,7 +6385,8 @@ static int sysctl_corr_maxCorr (ctl_table * table,
static int sysctl_corr_coefCte (ctl_table * table,
int __user * name, int nlen,
void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * newval, size_t newlen,
+ void **context)
{
if (oldval) // read
{
@@ -5814,8 +6412,10 @@ static int sysctl_corr_coefCte (ctl_table * table,
static int sysctl_ce_nb_frames_min (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5841,8 +6441,10 @@ static int sysctl_ce_nb_frames_min (ctl_table * table,
static int sysctl_ce_nb_slices_per_frame_min (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval,
+ size_t newlen, void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5868,8 +6470,10 @@ static int sysctl_ce_nb_slices_per_frame_min (ctl_table * table,
static int sysctl_ce_rate_error_target (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5895,8 +6499,10 @@ static int sysctl_ce_rate_error_target (ctl_table * table,
static int sysctl_ce_rate_error_max (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5928,8 +6534,10 @@ extern int igmp_query_interval;
static int sysctl_igmp_query_enable (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5953,8 +6561,10 @@ static int sysctl_igmp_query_enable (ctl_table * table,
static int sysctl_igmp_query_timeout (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -5978,8 +6588,10 @@ static int sysctl_igmp_query_timeout (ctl_table * table,
static int sysctl_igmp_query_interval (ctl_table * table,
int __user * name, int nlen,
- void __user * oldval, size_t __user * oldlenp,
- void __user * newval, size_t newlen, void **context)
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
{
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -6037,6 +6649,44 @@ static int sysctl_led (ctl_table * table,
}
#endif /* CONFIG_PLAB */
+static int sysctl_carp_limit_per_host (ctl_table * table,
+ int __user * name, int nlen,
+ void __user * oldval,
+ size_t __user * oldlenp,
+ void __user * newval, size_t newlen,
+ void **context)
+{
+ struct plc_drv_unit *unit = plc_drv_get_unit (0);
+
+ if (oldval) // read
+ {
+ size_t len;
+
+ len =
+ sprintf (oldval, "%u MAC allowed by host",
+ unit->carp_limit_per_host) + 1;
+
+ *oldlenp = len;
+ }
+
+ if (newval) // write
+ {
+ u16 new_value;
+
+ new_value = strtoul (newval, NULL, 0);
+
+ if (new_value > 0xFE)
+ {
+ new_value = 0xFE;
+ sprintf (newval, "max value is %u", new_value);
+ }
+
+ unit->carp_limit_per_host = (u8) new_value;
+
+ }
+ return 0;
+}
+
// ########################################################################
// # tree declaration
// ########################################################################
@@ -6379,7 +7029,6 @@ static ctl_table plcce_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_ce_nb_sound},
-#ifdef CE_ITERATIF
{
.ctl_name = PLCCE_COEFNOISE,
.procname = "smooth_factor",
@@ -6444,7 +7093,6 @@ static ctl_table plcce_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_ce_rate_error_max},
-#endif
{
.ctl_name = PLCCE_PERIOD,
.procname = "period",
@@ -7338,6 +7986,50 @@ static ctl_table plchamming_table[] = {
{0}
};
+/* items in stat_rx_ctrl directory */
+static ctl_table plc_stat_rx_ctrl_table[] = {
+ {
+ .ctl_name = STAT_RX_ENABLE,
+ .procname = "enable",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_stat_rx_enable,
+ },
+ {
+ .ctl_name = STAT_RX_FAST,
+ .procname = "fast",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_stat_rx_fast,
+ },
+ {
+ .ctl_name = STAT_RX_BAND_VOTES,
+ .procname = "band_votes",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_stat_rx_band_votes,
+ },
+ {0}
+};
+
+static ctl_table carp_table[] = {
+ {
+ .ctl_name = CARP_GLOBAL_LIMITATION_PER_HOST,
+ .procname = "limit_per_host",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_carp_limit_per_host},
+ {0}
+};
+
/* items in plc directory */
static ctl_table plc_table[] = {
{
@@ -7522,6 +8214,7 @@ static ctl_table plc_table[] = {
.proc_handler = &std_proc_handler,
.strategy = &sysctl_shaker,
},
+#ifndef CONFIG_VERSION_16M
{
.ctl_name = PLC_BANDS,
.procname = "bands",
@@ -7530,6 +8223,7 @@ static ctl_table plc_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_bands},
+#endif
{
.ctl_name = PLC_FCS,
.procname = "fcs",
@@ -7642,17 +8336,14 @@ static ctl_table plc_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_default_gain},
-/*
- {
- .ctl_name = PLC_ACK,
- .procname = "ack",
- .data = NULL,
- .maxlen = 0,
- .mode = 0666,
- .proc_handler = &std_proc_handler,
- .strategy = &sysctl_ack
- },
-*/
+ {
+ .ctl_name = NET_CARP,
+ .procname = "carp",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0555,
+ .child = carp_table,
+ },
{
.ctl_name = PLC_CELL_FORWARDING,
.procname = "cell_forwarding",
@@ -7678,6 +8369,14 @@ static ctl_table plc_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_teinid},
+ {
+ .ctl_name = PLC_PPC_LR,
+ .procname = "rep_update",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_ppc_lr},
#else
{
.ctl_name = PLC_TEI,
@@ -7895,7 +8594,58 @@ static ctl_table plc_table[] = {
.mode = 0666,
.proc_handler = &std_proc_handler,
.strategy = &sysctl_config_medium},
-
+#ifdef CONFIG_PLC_RTSCTS
+ {
+ .ctl_name = PLC_RTS_THRESHOLD,
+ .procname = "rts_threshold",
+ .data = NULL,
+ .maxlen = sizeof (unsigned int),
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_rts_threshold},
+ {
+ .ctl_name = PLC_NAV_OFFSET,
+ .procname = "nav_offset",
+ .data = NULL,
+ .maxlen = sizeof (unsigned int),
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_nav_offset},
+ {
+ .ctl_name = PLC_MAX_RTS_RETRANS,
+ .procname = "max_rts_retrans",
+ .data = NULL,
+ .maxlen = sizeof (unsigned int),
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_max_rts_retrans},
+#endif
+#ifdef CONFIG_PLC_PPC
+ {
+ .ctl_name = PLC_PPC_TEST_1,
+ .procname = "ppc",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_ppc_mj},
+#endif
+ {
+ .ctl_name = PLC_STAT_RX_CTRL,
+ .procname = "stat_rx",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .child = plc_stat_rx_ctrl_table,
+ },
+ {
+ .ctl_name = PLC_8021X_AUTH,
+ .procname = "auth_8021x",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0666,
+ .proc_handler = &std_proc_handler,
+ .strategy = &sysctl_8021x_auth},
{0}
};
diff --git a/app/sm-plc-drv/src/plc_vport.c b/app/sm-plc-drv/src/plc_vport.c
index 15d1545515..5ea18b62b5 100755
--- a/app/sm-plc-drv/src/plc_vport.c
+++ b/app/sm-plc-drv/src/plc_vport.c
@@ -420,7 +420,8 @@ static DevErr ddSetConf (U32 unit, DevTag * tagcList)
*****************************************************************/
void vport_handle_tx (struct plc_vport_unit *unit, struct plcp_host *host,
- uint8_t * d_buf_sdu, int d_len_sdu, void *data, int flags, bool failed)
+ uint8_t * d_buf_sdu, int d_len_sdu, void *data,
+ int flags, bool failed)
{
if (unit)
{
@@ -441,15 +442,16 @@ void vport_handle_tx (struct plc_vport_unit *unit, struct plcp_host *host,
*****************************************************************/
void vport_handle_rx (struct plc_vport_unit *unit, struct plcp_host *host,
- uint8_t * d_buf_sdu, int d_len_sdu, void *data, int flags, bool failed)
+ uint8_t * d_buf_sdu, int d_len_sdu, void *data,
+ int flags, bool failed)
{
if (unit)
{
/* should be nothing else than a standard frame */
RT_PRINTM (TRACE_VPORT, TRACE_DEBUG,
"VPORT RECV to %02x:%02x:%02x:%02x:%02x:%02x via %02x\n",
- d_buf_sdu[0], d_buf_sdu[1], d_buf_sdu[2], d_buf_sdu[3], d_buf_sdu[4], d_buf_sdu[5],
- unit->peer_addr.addr[5]);
+ d_buf_sdu[0], d_buf_sdu[1], d_buf_sdu[2], d_buf_sdu[3],
+ d_buf_sdu[4], d_buf_sdu[5], unit->peer_addr.addr[5]);
unit->dcFuncs.dcHandleRX (unit->dcObj, d_buf_sdu, d_len_sdu, failed);
if (failed)
@@ -500,13 +502,15 @@ static DevErr ddWrite (U32 id, void *buf, U32 * buflen)
if (p->state < open)
{
- RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "<open %u\n", (unsigned int) p->state);
+ RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "<open %u\n",
+ (unsigned int) p->state);
return DEVICE_ENOT_OPENED;
}
if (p->state < started)
{
- RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "<started %u\n", (unsigned int) p->state);
+ RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "<started %u\n",
+ (unsigned int) p->state);
return DEVICE_ENOT_STARTED;
}
@@ -515,12 +519,14 @@ static DevErr ddWrite (U32 id, void *buf, U32 * buflen)
RT_PRINTM (TRACE_VPORT, TRACE_DEBUG,
"VPORT SEND to %02x:%02x:%02x:%02x:%02x:%02x via %02x (len %u)\n",
- d_buf[0], d_buf[1], d_buf[2], d_buf[3], d_buf[4], d_buf[5], p->peer_addr.addr[5], (int) *buflen);
+ d_buf[0], d_buf[1], d_buf[2], d_buf[3], d_buf[4], d_buf[5],
+ p->peer_addr.addr[5], (int) *buflen);
p->stats.dd_write++;
result =
- mac_write (p->master_unit, (uint8_t *) & p->peer_addr, (uint8_t *) buf, (int) *buflen, MA_SUBTYPE_INTER_CELL, 0,
+ mac_write (p->master_unit, (uint8_t *) & p->peer_addr,
+ (uint8_t *) buf, (int) *buflen, MA_SUBTYPE_INTER_CELL, 0,
MAC_PRIO_MSDU, p->master_unit->TEI, 0 /* useless */ );
if (result == DEVICE_EQUEUE_FULL)
@@ -625,7 +631,8 @@ DevErr plc_vport_init (void)
vport_units[i].id = i;
vport_units[i].master_unit_id = 0;
vport_units[i].master_unit = NULL;
- memset ((char *) &vport_units[i].peer_addr, 0x0, sizeof (struct mac_addr));
+ memset ((char *) &vport_units[i].peer_addr, 0x0,
+ sizeof (struct mac_addr));
}
return 0;
@@ -638,7 +645,8 @@ DevErr plc_vport_init (void)
*
*****************************************************************/
-long plc_vport_biosentry (long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7)
+long plc_vport_biosentry (long arg1, long arg2, long arg3, long arg4,
+ long arg5, long arg6, long arg7)
{
(void) arg7; /* not used */
@@ -656,7 +664,9 @@ long plc_vport_biosentry (long arg1, long arg2, long arg3, long arg4, long arg5,
return (long) ddUnitInfo ((uint32_t) arg2, (DevTag *) arg3);
case DEVICE_FCOPEN:
return (long) ddOpen ((uint32_t) arg2,
- (uint32_t) arg3, (void *) arg4, (struct DcFuncs *) arg5, (struct ISRInfo *) arg6);
+ (uint32_t) arg3, (void *) arg4,
+ (struct DcFuncs *) arg5,
+ (struct ISRInfo *) arg6);
case DEVICE_FCSTART:
return (long) ddStart ((uint32_t) arg2);
case DEVICE_FCCLOSE:
@@ -794,15 +804,17 @@ void vport_clean_stats (struct plc_vport_unit *vport)
/* VPort Creation/Destruction */
-bool vport_set_peer_address (struct plc_vport_unit *vport, struct mac_addr *mac_addr)
+bool vport_set_peer_address (struct plc_vport_unit *vport,
+ struct mac_addr *mac_addr)
{
- memcpy ((char *) &vport->peer_addr, (char *) mac_addr, sizeof (struct mac_addr));
+ memcpy ((char *) &vport->peer_addr, (char *) mac_addr,
+ sizeof (struct mac_addr));
return true;
}
-int vport_desc (struct plc_vport_unit *vport, struct mac_addr *peer_addr, uint8_t * peer_bssid, uint8_t * peer_tei,
- uint8_t * localtei)
+int vport_desc (struct plc_vport_unit *vport, struct mac_addr *peer_addr,
+ uint8_t * peer_bssid, uint8_t * peer_tei, uint8_t * localtei)
{
if (vport)
{
@@ -836,7 +848,9 @@ int vport_create (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
// search existing vport for the same peer_addr
i = 0;
while (i < PLC_MAX_VPORTS &&
- (unit->vports[i] == NULL || !SAME_MAC ((uint8_t *) & (unit->vports[i]->peer_addr), (uint8_t *) peer_addr)))
+ (unit->vports[i] == NULL ||
+ !SAME_MAC ((uint8_t *) & (unit->vports[i]->peer_addr),
+ (uint8_t *) peer_addr)))
i++;
if (i < PLC_MAX_VPORTS)
@@ -872,7 +886,8 @@ int vport_create (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
vport_attach (unit->vports[i]);
- RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "CREATED vport " IEEE802_FMT "\n", IEEE802_VAL (peer_addr->addr));
+ RT_PRINTM (TRACE_VPORT, TRACE_DEBUG, "CREATED vport " IEEE802_FMT "\n",
+ IEEE802_VAL (peer_addr->addr));
return 0;
}
@@ -902,13 +917,15 @@ int vport_destroy (struct plc_drv_unit *unit, struct mac_addr *peer_addr)
return 0;
}
-struct plc_vport_unit *vport_find (struct plc_drv_unit *unit, uint8_t * mac_addr)
+struct plc_vport_unit *vport_find (struct plc_drv_unit *unit,
+ uint8_t * mac_addr)
{
int i;
i = 0;
while (i < PLC_MAX_VPORTS &&
- (unit->vports[i] == NULL || !SAME_MAC (mac_addr, (uint8_t *) & unit->vports[i]->peer_addr)))
+ (unit->vports[i] == NULL ||
+ !SAME_MAC (mac_addr, (uint8_t *) & unit->vports[i]->peer_addr)))
i++;
if (i >= PLC_MAX_VPORTS)
diff --git a/app/sm-plc-drv/src/plcp_channel.c b/app/sm-plc-drv/src/plcp_channel.c
index 64231d2fc1..736c4d596f 100755
--- a/app/sm-plc-drv/src/plcp_channel.c
+++ b/app/sm-plc-drv/src/plcp_channel.c
@@ -1,8 +1,22 @@
+/* ---------------------------------------------------------------------------------
+ * plcp_channel : ...
+ * ---------------------------------------------------------------------------------
+ * OBJECT :
+ * See documentation on Spidcom's server.
+ *
+ * Copyright (C) 2007 by SPiDCOM Technologies. All rights reserved.
+ * ---------------------------------------------------------------------------------
+ * DATE | AUTHOR | COMMENT
+ * ---------------------------------------------------------------------------------
+ * 2007-11-12 | T.C | - Remove all "#if 0" and "#if 1". (cleaning)
+ * | | - Remove following define :
+ * | | SPIDMONITOR_173 and RAFALE_WITH_NR
+ * | | - fix an error during the last commit.
+ * --------------------------------------------------------------------------------- */
+
#include <linux/module.h>
#include "hal.h"
-
#include "plc_dbg.h"
-
#include "plc_drv.h"
#include "plc_pmd.h"
#include "plc_plcp.h"
@@ -28,6 +42,8 @@ bool id_pool[PLCP_MAX_CHANNEL_ID]; // id pool
static int index_uchannel;
static int max_hosts = 0;
+static int mcast_hosts = 0;
+static int ucast_hosts = 0;
static struct plcp_host *mcast_tei[PLCP_NB_MCAST_TEI];
static struct plcp_host *ucast_tei[PLCP_NB_UCAST_TEI];
@@ -51,8 +67,10 @@ void __init plcp_channels_init (void)
{
int i;
memset (hosts_pool, 0, PLCP_MAX_HOST * sizeof (struct plcp_host));
- memset (uchannels_pool, 0, PLCP_MAX_UCHANNEL * sizeof (struct plcp_uchannel));
- memset (channels, 0, PLCP_MAX_CHANNEL_ID * sizeof (struct plcp_uchannel *));
+ memset (uchannels_pool, 0,
+ PLCP_MAX_UCHANNEL * sizeof (struct plcp_uchannel));
+ memset (channels, 0,
+ PLCP_MAX_CHANNEL_ID * sizeof (struct plcp_uchannel *));
memset (id_pool, false, PLCP_MAX_CHANNEL_ID * sizeof (bool));
/* host indexes */
for (i = 0; i < PLCP_MAX_HOST; i++)
@@ -81,7 +99,8 @@ void __init plcp_channels_init (void)
// return the index in the uchannel_pool corresponding to the uchannel pointer
int plcp_channel_index (struct plcp_uchannel *uchannel)
{
- return ((unsigned int) uchannel - (unsigned int) uchannels_pool) / sizeof (struct plcp_uchannel);
+ return ((unsigned int) uchannel -
+ (unsigned int) uchannels_pool) / sizeof (struct plcp_uchannel);
}
struct plcp_host *plcp_host_alloc (void)
@@ -196,12 +215,12 @@ int plcp_id_alloc (void)
{
int i;
- /* on s'arr�tera quand i==end */
+ /* on s'arrêtera quand i==end */
for (i = PLCP_NB_GLOBAL_TMI; i < PLCP_MAX_CHANNEL_ID; i++)
{
if (id_pool[i] == false)
{
- /* channel allou� */
+ /* channel alloué */
id_pool[i] = true;
return i;
}
@@ -222,12 +241,16 @@ int get_mcast_tei (struct plcp_host *host)
int tei_found = -1;
int index;
+ if (mcast_hosts >= PLCP_MAX_HOST_MULTICAST)
+ return tei_found;
+
for (index = PLCP_NB_MCAST_TEI; (index > 0 && tei_found == -1); index--)
{
if (mcast_tei[mcast_higher_index] == 0)
{
mcast_tei[mcast_higher_index] = host;
tei_found = mcast_higher_index + TEI_FIRST_MCAST;
+ mcast_hosts++;
}
mcast_higher_index++;
@@ -235,7 +258,8 @@ int get_mcast_tei (struct plcp_host *host)
mcast_higher_index = 0;
}
- ASSERT (tei_found == -1 || (tei_found >= TEI_FIRST_MCAST && tei_found <= TEI_LAST_MCAST));
+ ASSERT (tei_found == -1 ||
+ (tei_found >= TEI_FIRST_MCAST && tei_found <= TEI_LAST_MCAST));
return tei_found;
}
@@ -252,12 +276,16 @@ int get_ucast_tei (struct plcp_host *host)
int tei_found = -1;
int index;
+ if (ucast_hosts >= PLCP_MAX_HOST_UNICAST)
+ return tei_found;
+
for (index = PLCP_NB_UCAST_TEI; (index > 0 && tei_found == -1); index--)
{
if (ucast_tei[ucast_higher_index] == 0)
{
ucast_tei[ucast_higher_index] = host;
tei_found = ucast_higher_index + TEI_FIRST_UCAST;
+ ucast_hosts++;
}
ucast_higher_index++;
@@ -265,7 +293,8 @@ int get_ucast_tei (struct plcp_host *host)
ucast_higher_index = 0;
}
- ASSERT (tei_found == -1 || (tei_found >= TEI_FIRST_UCAST && tei_found <= TEI_LAST_UCAST));
+ ASSERT (tei_found == -1 ||
+ (tei_found >= TEI_FIRST_UCAST && tei_found <= TEI_LAST_UCAST));
return tei_found;
}
@@ -280,6 +309,8 @@ void give_mcast_tei (int tei)
{
ASSERT (mcast_tei[index]); // It's only a warning, but we have a bad management on this table.
mcast_tei[index] = NULL;
+ if (mcast_hosts > 0)
+ mcast_hosts--;
}
else
{
@@ -299,6 +330,7 @@ void give_ucast_tei (int tei)
{
ASSERT (ucast_tei[index]); // It's only a warning, but we have a bad management on this table.
ucast_tei[index] = NULL;
+ ucast_hosts--;
}
else
{
@@ -312,12 +344,12 @@ int get_mcast_tmi (void)
{
int i;
- /* on s'arr�tera quand i==end */
+ /* on s'arrêtera quand i==end */
for (i = PLCP_NB_PREFIXED_CHANNEL; i < PLCP_NB_GLOBAL_TMI; i++)
{
if (id_pool[i] == false)
{
- /* channel allou� */
+ /* channel alloué */
id_pool[i] = true;
break;
}
@@ -336,8 +368,8 @@ void plcp_uchannel_free (struct plcp_uchannel *uchannel)
}
-/* lib�ration d'un identifiant de channel. ATTENTION: ne pas lib�rer un
- * identifiant qui n'a pas �t� allou� pour la station!! */
+/* libération d'un identifiant de channel. ATTENTION: ne pas libèrer un
+ * identifiant qui n'a pas été alloué pour la station!! */
void plcp_id_free (int id)
{
if (id >= 0 && id < PLCP_MAX_UCHANNEL)
@@ -354,7 +386,8 @@ struct plcp_host *plcp_get_host_by_addr (uint8_t * DA)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
host = &hosts_pool[i];
- if (host->used && host->init && (host->ce_state != CE_STATE_EXITING) && plcp_same_mac (&host->mac_addr[0], DA))
+ if (host->used && host->init && (host->ce_state != CE_STATE_EXITING)
+ && plcp_same_mac (&host->mac_addr[0], DA))
{
return host;
}
@@ -392,7 +425,8 @@ struct plcp_host *plcp_get_host_by_tei (uint8_t TEI, uint8_t BSSID)
}
// check the information
- if (host && host->used && host->init && (host->ce_state != CE_STATE_EXITING) && host->TEI == TEI &&
+ if (host && host->used && host->init &&
+ (host->ce_state != CE_STATE_EXITING) && host->TEI == TEI &&
host->BSSID == BSSID)
{
return host;
@@ -402,8 +436,8 @@ struct plcp_host *plcp_get_host_by_tei (uint8_t TEI, uint8_t BSSID)
for (i = 0; i < PLCP_MAX_HOST; i++)
{
host = &hosts_pool[i];
- if (host->used && host->init && (host->ce_state != CE_STATE_EXITING) && host->TEI == TEI &&
- host->BSSID == BSSID)
+ if (host->used && host->init && (host->ce_state != CE_STATE_EXITING)
+ && host->TEI == TEI && host->BSSID == BSSID)
{
return host;
}
@@ -477,7 +511,8 @@ void plcp_copy_channel (struct plcp_uchannel *to, struct plcp_uchannel *from)
extern void SYN_init (struct plcp_host *host);
/* init host struct previously allocated */
-bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t * mac_addr)
+bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host,
+ uint8_t * mac_addr)
{
struct plcp_uchannel *uchannel;
bool error = true;
@@ -521,14 +556,16 @@ bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t
/* current channel is the first */
host->uchannel = host->uchannel1;
- /* allocation de channel id pour la r�c�ption */
+ /* allocation de channel id pour la récéption */
host->id1 = plcp_id_alloc ();
host->id2 = plcp_id_alloc ();
host->id3 = plcp_id_alloc ();
host->rx_channel = 0;
host->rx_last_channel = 0;
- if (host->id1 != PLCP_ID_NOT_DEFINED && host->id2 != PLCP_ID_NOT_DEFINED && host->id3 != PLCP_ID_NOT_DEFINED)
+ if (host->id1 != PLCP_ID_NOT_DEFINED &&
+ host->id2 != PLCP_ID_NOT_DEFINED &&
+ host->id3 != PLCP_ID_NOT_DEFINED)
{
host->info = NULL;
@@ -542,14 +579,15 @@ bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t
/* default transmit channel */
uchannel = plcp_get_uchannel_by_id (PLCP_CID_NONE);
- /* on utilise un canal bien s�par� pour la transmission */
+ /* on utilise un canal bien séparé pour la transmission */
if (uchannel)
{
plcp_copy_channel (host->uchannel, uchannel);
plcp_copy_channel (host->test_uchannel, uchannel);
}
host->max_slots = PLCP_MAX_SLOTS;
- host->mtu = plcp_get_max_data_len (unit, host->uchannel, PLCP_MAX_SLOTS);
+ host->mtu =
+ plcp_get_max_data_len (unit, host->uchannel, PLCP_MAX_SLOTS);
host->ce_state = CE_STATE_IDLE;
host->link_state = LINK_STATE_MANUAL;
host->step = 0;
@@ -585,9 +623,6 @@ bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t
INIT_LIST_HEAD (&host->mac_tx_queue[prio]);
host->mac_queued[prio] = 0;
}
-#if 0
- INIT_LIST_HEAD (&host->xmit);
-#endif
/*new_gain */
host->new_gain = 0;
host->data_agc_av = 0;
@@ -640,9 +675,10 @@ bool plcp_init_host (struct plc_drv_unit *unit, struct plcp_host *host, uint8_t
return error;
}
-/* creation d'un host par d�fault */
+/* creation d'un host par défault */
/* DO_THIS: create a link only if TEI has been allocated */
-struct plcp_host *plcp_create_host (struct plc_drv_unit *unit, uint8_t * mac_addr)
+struct plcp_host *plcp_create_host (struct plc_drv_unit *unit,
+ uint8_t * mac_addr)
{
struct plcp_host *host;
@@ -660,7 +696,7 @@ struct plcp_host *plcp_create_host (struct plc_drv_unit *unit, uint8_t * mac_add
return host;
}
-/* lib�ration de toutes les structures host */
+/* libération de toutes les structures host */
void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
{
struct plcp_uchannel *uchannel;
@@ -690,14 +726,15 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
}
ASSERT (host->msdu_queued == 0);
-#ifdef BUFFER_ISOLATION
if (host->xmit_active)
{
xmit_host--;
- xmit_host_skb = (xmit_host < xmit_host_min) ? max_xmit_skb / xmit_host_min : max_xmit_skb / xmit_host;
+ xmit_host_skb =
+ (xmit_host <
+ xmit_host_min) ? max_xmit_skb / xmit_host_min : max_xmit_skb /
+ xmit_host;
host->xmit_active = 0;
}
-#endif
// browse every mhost, remove every mc_entries linked with this host
if (is_unicast_tei (host->TEI))
@@ -713,11 +750,11 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
hard_local_irq_restore (flags);
- /* lib�ration du premier canal de reception */
+ /* libération du premier canal de reception */
if (host->id1 >= PLCP_NB_GLOBAL_TMI)
{
uchannel = plcp_get_uchannel_by_id (host->id1);
- /* lib�ration �ventuelle du uchannel */
+ /* libération éventuelle du uchannel */
if (uchannel)
{
/* break the association between uchannel and id */
@@ -729,11 +766,11 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
/* free the id */
plcp_id_free (host->id1);
}
- /* lib�ration du deuxi�me canal de reception */
+ /* libération du deuxième canal de reception */
if (host->id2 >= PLCP_NB_GLOBAL_TMI)
{
uchannel = plcp_get_uchannel_by_id (host->id2);
- /* lib�ration �ventuelle du uchannel */
+ /* libération éventuelle du uchannel */
if (uchannel)
{
/* break the association between uchannel and id */
@@ -745,11 +782,11 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
/* free the id */
plcp_id_free (host->id2);
}
- /* lib�ration du deuxi�me canal de reception */
+ /* libération du deuxième canal de reception */
if (host->id3 >= PLCP_NB_GLOBAL_TMI)
{
uchannel = plcp_get_uchannel_by_id (host->id3);
- /* lib�ration �ventuelle du uchannel */
+ /* libération éventuelle du uchannel */
if (uchannel)
{
/* break the association between uchannel and id */
@@ -768,10 +805,8 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
plcp_uchannel_free (host->test_uchannel);
//plcp_uchannel_free(host->test_uchannel_unused);
-#ifndef STATIC_MESURE_ALLOCATION
if (host->info)
free (host->info);
-#endif
/* free struct host */
plcp_host_free (host);
@@ -781,12 +816,32 @@ void plcp_destroy_host (struct plc_drv_unit *unit, struct plcp_host *host)
host->need_sync = false;
}
+uint8_t is_host_empty (struct plcp_host *host)
+{
+ int emp = 0, prio;
+ uint32_t msr;
+
+ LOCK_SAVE (msr);
+
+ for (prio = 0; prio < PLCP_NB_PRIO; prio++)
+ emp += host->tx_queue_count[prio] > 0;
+
+ for (prio = 0; prio < MAC_NB_PRIO; prio++)
+ emp += host->mac_queued[prio] > 0;
+
+ LOCK_RESTORE (msr);
+
+ return (uint8_t) (emp) ? 0 : 1;
+
+}
+
struct plcp_prefixed_uchannel {
int modulation;
int mode;
};
-struct plcp_prefixed_uchannel plcp_prefixed_uchannel[PLCP_NB_PREFIXED_CHANNEL] = {
+struct plcp_prefixed_uchannel plcp_prefixed_uchannel[PLCP_NB_PREFIXED_CHANNEL]
+ = {
{ /* PLCP_CID_NONE */
PLC_MOD_NONE,
PLCP_MODE_CONTROL},
@@ -820,23 +875,6 @@ struct plcp_prefixed_uchannel plcp_prefixed_uchannel[PLCP_NB_PREFIXED_CHANNEL] =
{ /* PLCP_CID_ROBUST_QAM256 */
PLC_MOD_QAM256,
PLCP_MODE_ROBUST_FEC},
-#if 0
- { /* PLCP_CID_3xBSPK */
- PLC_MOD_BPSK,
- PLCP_MODE_3FEC},
- { /* PLCP_CID_3xQSPK */
- PLC_MOD_QPSK,
- PLCP_MODE_3FEC},
- { /* PLCP_CID_3xQAM16 */
- PLC_MOD_QAM16,
- PLCP_MODE_3FEC},
- { /* PLCP_CID_3xQAM64 */
- PLC_MOD_QAM64,
- PLCP_MODE_3FEC},
- { /* PLCP_CID_3xQAM256 */
- PLC_MOD_QAM256,
- PLCP_MODE_3FEC},
-#endif
{ /* PLCP_CID_SBPSK */
PLC_MOD_BPSK,
PLCP_MODE_ROBUST_FEC},
@@ -950,7 +988,8 @@ int plcp_get_group_modulation (struct pmd_band_quality *quality, int group)
}
}
-int plcp_set_group_modulation (struct pmd_band_quality *quality, int group, int nmod)
+int plcp_set_group_modulation (struct pmd_band_quality *quality, int group,
+ int nmod)
{
uint8_t *p = (uint8_t *) & quality->q[0];
uint8_t *pmod = (p + (group / 2));
@@ -998,7 +1037,8 @@ int plcp_getPilots (struct system_carrier_tab *systemCarrierTab)
// pilot INDEX. Correspond to pilot position 22 and 114
int pilot_1 = 21, pilot_2 = 113; /* default value */
- memset (systemCarrierTab->groupPilot, 0, sizeof (systemCarrierTab->groupPilot));
+ memset (systemCarrierTab->groupPilot, 0,
+ sizeof (systemCarrierTab->groupPilot));
/* The groupPilot tab is per group */
/* To set a pilot, we must set a bit in the right group */
@@ -1008,9 +1048,11 @@ int plcp_getPilots (struct system_carrier_tab *systemCarrierTab)
pilot_1 = plcp_pilots[band][0];
if (plcp_pilots[band][1])
pilot_2 = plcp_pilots[band][1];
- systemCarrierTab->groupPilot[(pilot_1 / PMD_CARRIERS_PER_GROUP) + band * PMD_GROUPS_PER_BAND] =
+ systemCarrierTab->groupPilot[(pilot_1 / PMD_CARRIERS_PER_GROUP) +
+ band * PMD_GROUPS_PER_BAND] =
1 << (pilot_1 % PMD_CARRIERS_PER_GROUP);
- systemCarrierTab->groupPilot[(pilot_2 / PMD_CARRIERS_PER_GROUP) + band * PMD_GROUPS_PER_BAND] =
+ systemCarrierTab->groupPilot[(pilot_2 / PMD_CARRIERS_PER_GROUP) +
+ band * PMD_GROUPS_PER_BAND] =
1 << (pilot_2 % PMD_CARRIERS_PER_GROUP);
}
return 0;
@@ -1022,7 +1064,8 @@ int plcp_getAdapts (struct system_carrier_tab *systemCarrierTab)
for (band = 1; band < PMD_MAX_BANDS; band++)
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
- systemCarrierTab->carrierAdapt[band * PMD_CARRIERS_PER_BAND + carrier] =
+ systemCarrierTab->carrierAdapt[band * PMD_CARRIERS_PER_BAND +
+ carrier] =
pmd_get_control_adapt (band, carrier);
return 0;
}
@@ -1035,13 +1078,16 @@ int plcp_setAdapts (struct system_carrier_tab *systemCarrierTab)
for (band = 1; band < PMD_MAX_BANDS; band++)
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
pmd_set_control_adapt (band, carrier,
- systemCarrierTab->carrierAdapt[band * PMD_CARRIERS_PER_BAND + carrier]);
+ systemCarrierTab->carrierAdapt[band *
+ PMD_CARRIERS_PER_BAND
+ + carrier]);
pmd_restore_adapts ();
return 0;
}
#ifndef CONFIG_VERSION_16M
-struct plcp_host *plcp_get_host_by_pos (struct plc_drv_unit *unit, int hostNb);
+struct plcp_host *plcp_get_host_by_pos (struct plc_drv_unit *unit,
+ int hostNb);
void plcp_set_gain (int hostNb, int gain)
{
@@ -1052,14 +1098,16 @@ void plcp_set_gain (int hostNb, int gain)
if (host != NULL)
{
- RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "Setting Tx ctrl/data gain at %d\n", gain);
+ RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR,
+ "Setting Tx ctrl/data gain at %d\n", gain);
host->data_gain = gain;
host->ctrl_gain = gain;
}
RT_PRINTM (ALWAYS_PRINTED, TRACE_ERROR, "Setting Tx gain done\n");
}
-void plcp_setHostPilots (enum channel_type type, int hostNb, struct plc_channel *channel)
+void plcp_setHostPilots (enum channel_type type, int hostNb,
+ struct plc_channel *channel)
{
int band, idx = 0;
struct plcp_host *host;
@@ -1127,11 +1175,14 @@ int plcp_setPilots (struct system_carrier_tab *systemCarrierTab)
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
// test if the group contains one (or two) pilots
- if (systemCarrierTab->groupPilot[band * PMD_GROUPS_PER_BAND + group])
+ if (systemCarrierTab->
+ groupPilot[band * PMD_GROUPS_PER_BAND + group])
{
// pilot index start from 0
pilot_idx = group * PMD_CARRIERS_PER_GROUP;
- val = systemCarrierTab->groupPilot[band * PMD_GROUPS_PER_BAND + group];
+ val =
+ systemCarrierTab->groupPilot[band * PMD_GROUPS_PER_BAND +
+ group];
while (val && (pilot_num <= 1))
{
if (val & 1)
@@ -1164,7 +1215,8 @@ int plcp_setPilots (struct system_carrier_tab *systemCarrierTab)
int plcp_getNotchs (struct system_carrier_tab *systemCarrierTab)
{
- memcpy (systemCarrierTab->groupNotch, &notches[NOTCHES_DEFAULT], sizeof (struct pmd_carrier_map));
+ memcpy (systemCarrierTab->groupNotch, &notches[NOTCHES_DEFAULT],
+ sizeof (struct pmd_carrier_map));
return 0;
}
@@ -1201,42 +1253,13 @@ int plcp_get_group_carriers_count (int band, int group)
{
uint8_t notch;
- notch = CM_GROUP (band, group, &notches[NOTCHES_DEFAULT]) | plcp_pilots_bitmap[band][group];
+ notch =
+ CM_GROUP (band, group,
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band][group];
return byte_zeroes (notch);
}
-#if 0
-
-#if 0
-/*
- * Compute the number of bits per slot
- */
-int plcp_get_control_bits_per_slot (struct plc_drv_unit *unit)
-{
-
- int b, n, band, group;
- int bits_per_slot;
-
- /* build bitmap */
- plcp_set_pilots_bitmap (plcp_pilots);
-
- b = pmd_get_mod_bits_per_slot (unit->control_modulation);
- bits_per_slot = 0;
- for (band = 1; band < PMD_MAX_BANDS; band++)
- {
- if (!band_is_used (unit, band))
- continue;
- for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
- {
- n = plcp_get_group_carriers_count (band, group);
- bits_per_slot += (b * n);
- }
- }
- return bits_per_slot;
-}
-#endif
-#endif
-
/*
* Compute the number of slots for RX/TX control
@@ -1260,7 +1283,8 @@ int plcp_get_control_bits_per_slot (struct plc_drv_unit *unit)
int plcp_get_control_slots (struct plc_drv_unit *unit, int control_len, /* bytes */
int *control_symbols,
- uint16_t * control_slots, int *dsp_rpr /* position of second reference symbol */ )
+ uint16_t * control_slots, int *dsp_rpr
+ /* position of second reference symbol */ )
{
int mod, b, n, band, group, bits, control_bits;
int bits_per_slot = 0;
@@ -1288,7 +1312,9 @@ int plcp_get_control_slots (struct plc_drv_unit *unit, int control_len, /* bytes
n = plcp_get_group_carriers_count (band, group);
bits += (b * n);
RT_PRINTM (TRACE_PLCP, TRACE_INFO,
- "(control) band %d, group %d, " "mod = %d (%d bits), carriers=%d\n", band, group, mod, b, n);
+ "(control) band %d, group %d, "
+ "mod = %d (%d bits), carriers=%d\n", band, group,
+ mod, b, n);
}
if (bits)
@@ -1310,12 +1336,6 @@ int plcp_get_control_slots (struct plc_drv_unit *unit, int control_len, /* bytes
control_bits = control_len * 8 * (unit->plcp.config.vote ? 3 : 1);
-#if 0
- if (force_ctrl_slots)
- {
- *control_slots = force_ctrl_slots;
- }
-#endif
/*
* For each band, PHLIC decrements a counter to know if enough
* symbols have been sent/received. Therefore, we need to
@@ -1404,7 +1424,8 @@ void plcp_rebuild_channels (struct plc_drv_unit *unit)
char band_str[2048];
-void plcp_dump_uchannel (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_dump_uchannel (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int band, group;
int mod;
@@ -1419,7 +1440,9 @@ void plcp_dump_uchannel (struct plc_drv_unit *unit, struct plcp_uchannel *uchann
rt_printk ("mode ........... %d (%s)\n", uchannel->mode,
((uchannel->mode == PLCP_MODE_CONTROL) ? "control" :
- (uchannel->mode == PLCP_MODE_FEC) ? "FEC" : (uchannel->mode == PLCP_MODE_ROBUST_FEC) ? "robust FEC" :
+ (uchannel->mode == PLCP_MODE_FEC) ? "FEC" : (uchannel->mode ==
+ PLCP_MODE_ROBUST_FEC)
+ ? "robust FEC" :
/* (uchannel->mode == PLCP_MODE_3FEC) ? "3FEC" : */
(uchannel->mode == PLCP_MODE_CHUNKS) ? "CHUNKS" : "unknown"));
@@ -1469,35 +1492,43 @@ void plcp_dump_uchannel (struct plc_drv_unit *unit, struct plcp_uchannel *uchann
rt_printk ("%s", band_str);
rt_printk ("bits/symbols = %d\r\n", uchannel->lookup.bits_per_slot);
- phy_rate = ((float) unit->nb_bands * 8 * PMD_CARRIERS_PER_BAND * 1000000) / 36;
+ phy_rate =
+ ((float) unit->nb_bands * 8 * PMD_CARRIERS_PER_BAND * 1000000) / 36;
rt_printk ("theorical PHY rate = %.2f %s "
- "(%d bands, no notch, all carriers QAM256)\r\n", RATE (phy_rate), unit->nb_bands);
+ "(%d bands, no notch, all carriers QAM256)\r\n",
+ RATE (phy_rate), unit->nb_bands);
avail_phy_rate = (float) uchannel->lookup.bits_per_slot * 1000000 / 36;
avail_phy_rate = (avail_phy_rate * 224 * 8) / (241 * 12);
rt_printk ("available PHY rate = %.2f %s "
- "(%d bands, with notchs, modulations, FEC)\r\n", RATE (avail_phy_rate), unit->nb_bands);
+ "(%d bands, with notchs, modulations, FEC)\r\n",
+ RATE (avail_phy_rate), unit->nb_bands);
- rt_printk ("\n%12s%12s%12s%12s%12s\r\n", "slices", "bytes", "symbols", "payload slots", "raw rate", "plcp rate");
+ rt_printk ("\n%12s%12s%12s%12s%12s\r\n", "slices", "bytes", "symbols",
+ "payload slots", "raw rate", "plcp rate");
for (slice = 0; slice <= PLCP_MAX_SLICES; slice++)
{
control_slots = unit->plcp.config.n_slots;
- payload_slots = uchannel->lookup.payload_slots[slice] + uchannel->lookup.periodic_ref_slots[slice];
+ payload_slots =
+ uchannel->lookup.payload_slots[slice] +
+ uchannel->lookup.periodic_ref_slots[slice];
/* FIXME : should be slots */
slots = plcp_get_fmode (unit)->efr (unit, uchannel, slice);
slots += unit->plcp.config.nb_calibrate;
- plcp_rate = (avail_phy_rate * uchannel->lookup.payload_slots[slice]) / slots;
- rt_printk ("%12d%12d%12d%12d%12.2f %s\r\n",
- slice,
+ plcp_rate =
+ (avail_phy_rate * uchannel->lookup.payload_slots[slice]) / slots;
+ rt_printk ("%12d%12d%12d%12d%12.2f %s\r\n", slice,
slice * PMD_SLICE_SIZE,
- uchannel->lookup.payload_slots[slice] * uchannel->nb_used_bands, payload_slots, RATE (plcp_rate));
+ uchannel->lookup.payload_slots[slice] *
+ uchannel->nb_used_bands, payload_slots, RATE (plcp_rate));
}
}
-void plcp_Xdump_uchannel (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int mix)
+void plcp_Xdump_uchannel (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int mix)
{
int band, group;
int mod;
@@ -1541,79 +1572,9 @@ void plcp_Xdump_uchannel (struct plc_drv_unit *unit, struct plcp_uchannel *uchan
}
*b++ = ' ';
-#if 0
- for (carrier = 0; carrier < PMD_CARRIERS_PER_GROUP; carrier++)
- {
- if ((notch & 1) || (!band_is_used (unit, band)))
- {
- *b++ = '-';
- }
- else
- {
- *b++ = '0' + bits;
- }
- notch = (notch >> 1);
- }
-
- if ((group % 8) == 7)
- {
- b += sprintf (b, "\n ", band);
- }
- else
- {
- *b++ = ' ';
- }
-#endif
}
b += sprintf (b, " (%d bits)\r\n", uchannel->bits_per_band[band]);
}
-
-#if 0
- rt_printk ("%s", band_str);
- rt_printk ("bits/symbols = %d\r\n", uchannel->lookup.bits_per_slot);
-
- phy_rate = ((float) units->nb_bands * 8 * PMD_CARRIERS_PER_BAND * 1000000) / 36;
-
- rt_printk ("theorical PHY rate = %.2f %s "
- "(%d bands, no notch, all carriers QAM256)\r\n", RATE (phy_rate), unit->nb_bands);
-
- avail_phy_rate = (float) uchannel->lookup.bits_per_slot * 1000000 / 36;
- avail_phy_rate = (avail_phy_rate * 224 * 8) / (241 * 12);
- rt_printk ("available PHY rate = %.2f %s "
- "(%d bands, with notchs, modulations, FEC)\r\n", RATE (avail_phy_rate), unit->nb_bands);
-
- slice = (1514 * mix + 223) / 224;
- payload_slots = uchannel->lookup.slice_slots[slice];
- control_slots = slots = uchannel->lookup.slice_slots[slice] + 1;
- plcp_rate = (avail_phy_rate * payload_slots) / slots;
-
- rt_printk ("PLCP rate = %.2f %s "
- "(%d bands, with PLCP overhead, average of %d frames)\r\n", RATE (plcp_rate), unit->nb_bands, mix);
-
- slice = (((1514 + 32) * mix) + 223) / 224;
- payload_slots = (uchannel->lookup.slice_slots[slice] - unit->plcp.config.n_slots);
-
- slice_ack = (32 * mix + 223) / 224;
- slots = ((uchannel->lookup.slice_slots[slice] + 1) + (uchannel->lookup.slice_slots[slice_ack] + 1));
-
- mac_rate = (avail_phy_rate * payload_slots) / slots;
- rt_printk ("MAC rate = %.2f %s "
- "(%d bands, with MAC overhead, average of mix frames, 1 symbol gap)\r\n",
- RATE (mac_rate), unit->nb_bands);
-
- rt_printk ("\n%12s%12s%12s%12s%12s\r\n", "slices", "bytes", "symbols", "efr", "plcp rate");
-
- for (slice = 0; slice <= PLCP_MAX_SLICES; slice++)
- {
- plcp_rate = (avail_phy_rate *
- (uchannel->lookup.slice_slots[slice] - unit->plcp.config.n_slots))
- / uchannel->lookup.slice_slots[slice];
- rt_printk ("%12d%12d%12d%12d%12.2f %s\r\n",
- slice,
- slice * PMD_SLICE_SIZE,
- uchannel->lookup.symbols[slice], uchannel->lookup.slice_slots[slice], RATE (plcp_rate));
- }
-#endif
}
@@ -1623,7 +1584,8 @@ void plcp_set_group_notchs (int band, int group, uint8_t notchs)
pmd_set_group_notchs (band, group, notchs);
}
-void plcp_set_channel (enum channel_type type, int hostNb, struct plc_channel *channel)
+void plcp_set_channel (enum channel_type type, int hostNb,
+ struct plc_channel *channel)
{
struct plcp_host *host;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1639,11 +1601,14 @@ void plcp_set_channel (enum channel_type type, int hostNb, struct plc_channel *c
uchannel = host->uchannel;
if (uchannel && uchannel->quality)
{
- memcpy (uchannel->quality, channel->modulation, PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+ memcpy (uchannel->quality, channel->modulation,
+ PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
qual_ptr = (uint8_t *) uchannel->quality;
for (i = 0; i < sizeof (channel->modulation); i++)
{
- qual_ptr[i] = ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) << 4);
+ qual_ptr[i] =
+ ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) <<
+ 4);
}
uchannel->ops->build_lookup (unit, uchannel);
}
@@ -1653,11 +1618,14 @@ void plcp_set_channel (enum channel_type type, int hostNb, struct plc_channel *c
uchannel = plcp_get_uchannel_by_id (host->id1);
if (uchannel && uchannel->quality)
{
- memcpy (uchannel->quality, channel->modulation, PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+ memcpy (uchannel->quality, channel->modulation,
+ PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
qual_ptr = (uint8_t *) uchannel->quality;
for (i = 0; i < sizeof (channel->modulation); i++)
{
- qual_ptr[i] = ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) << 4);
+ qual_ptr[i] =
+ ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) <<
+ 4);
}
uchannel->ops->build_lookup (unit, uchannel);
}
@@ -1665,11 +1633,14 @@ void plcp_set_channel (enum channel_type type, int hostNb, struct plc_channel *c
uchannel = plcp_get_uchannel_by_id (host->id2);
if (uchannel && uchannel->quality)
{
- memcpy (uchannel->quality, channel->modulation, PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+ memcpy (uchannel->quality, channel->modulation,
+ PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
qual_ptr = (uint8_t *) uchannel->quality;
for (i = 0; i < sizeof (channel->modulation); i++)
{
- qual_ptr[i] = ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) << 4);
+ qual_ptr[i] =
+ ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) <<
+ 4);
}
uchannel->ops->build_lookup (unit, uchannel);
}
@@ -1677,11 +1648,14 @@ void plcp_set_channel (enum channel_type type, int hostNb, struct plc_channel *c
uchannel = plcp_get_uchannel_by_id (host->id3);
if (uchannel && uchannel->quality)
{
- memcpy (uchannel->quality, channel->modulation, PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+ memcpy (uchannel->quality, channel->modulation,
+ PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
qual_ptr = (uint8_t *) uchannel->quality;
for (i = 0; i < sizeof (channel->modulation); i++)
{
- qual_ptr[i] = ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) << 4);
+ qual_ptr[i] =
+ ((qual_ptr[i] & 0xF0) >> 4) | ((qual_ptr[i] & 0x0F) <<
+ 4);
}
uchannel->ops->build_lookup (unit, uchannel);
}
@@ -1695,7 +1669,9 @@ uint8_t dataRateFromBytePerSlot (uint32_t byte_per_slot)
uint32_t data_rate;
/* byte / slot */
- data_rate = (byte_per_slot * 224 * 8) / (241 * 12);
+ data_rate =
+ (byte_per_slot * PMD_SLICE_SIZE * 8) /
+ (PMD_SLICE_SIZE_WITH_REED_SOLOMON * PMD_BYTE_SIZE_WITH_VITERBI);
/* Mb / second */
data_rate = (data_rate * 8 * 27778) / (1024 * 1024);
@@ -1707,11 +1683,11 @@ uint8_t dataRateFromBytePerSlot (uint32_t byte_per_slot)
}
-static void plcp_get_channel (enum channel_type type, struct plcp_host *host, struct plcp_uchannel *uchannel,
- struct plc_channel *channel)
+static void plcp_get_channel (enum channel_type type, struct plcp_host *host,
+ struct plcp_uchannel *uchannel,
+ struct plc_channel *channel, bool light)
{
int i, band;
- uint32_t byte_per_slot;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
@@ -1724,72 +1700,80 @@ static void plcp_get_channel (enum channel_type type, struct plcp_host *host, st
channel->type = type;
channel->index = host->index;
- memcpy (channel->modulation, uchannel->quality, PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+ memcpy (channel->modulation, uchannel->quality,
+ PMD_MAX_BANDS * PMD_GROUPS_PER_BAND / 2);
+
+ if (!light)
+ {
+ u32 byte_per_slot;
- byte_per_slot = plcp_slot_rate (unit, uchannel);
- channel->bandwidth = dataRateFromBytePerSlot (byte_per_slot);
- channel->max_bandwidth = dataRateFromBytePerSlot (plcp_max_slot_rate (unit, uchannel));
+ byte_per_slot = plcp_slot_rate (unit, uchannel);
+ channel->bandwidth = dataRateFromBytePerSlot (byte_per_slot);
+ channel->max_bandwidth =
+ dataRateFromBytePerSlot (plcp_max_slot_rate (unit, uchannel));
+ }
for (i = 0; i < sizeof (channel->modulation); i++)
{
- channel->modulation[i] = ((channel->modulation[i] & 0xF0) >> 4) | ((channel->modulation[i] & 0x0F) << 4);
+ channel->modulation[i] =
+ ((channel->modulation[i] & 0xF0) >> 4) | ((channel->
+ modulation[i] & 0x0F)
+ << 4);
}
/* if band is not used */
for (band = 1; band < PMD_MAX_BANDS; band++)
if (!band_is_used (unit, band))
- memset (&channel->modulation[band * PMD_GROUPS_PER_BAND / 2], 0, PMD_GROUPS_PER_BAND / 2);
+ memset (&channel->modulation[band * PMD_GROUPS_PER_BAND / 2], 0,
+ PMD_GROUPS_PER_BAND / 2);
memset (channel->pilots, 0, sizeof (channel->pilots));
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- channel->pilots[2 * band] = (uchannel->pilots[band][0]) ? uchannel->pilots[band][0] : 2;
- channel->pilots[2 * band + 1] = (uchannel->pilots[band][1]) ? uchannel->pilots[band][1] : 126;
+ channel->pilots[2 * band] =
+ (uchannel->pilots[band][0]) ? uchannel->pilots[band][0] : 2;
+ channel->pilots[2 * band + 1] =
+ (uchannel->pilots[band][1]) ? uchannel->pilots[band][1] : 126;
}
}
#ifndef CONFIG_VERSION_16M
-int plcp_ce_host (int hostNb, struct plc_host *plcHost)
+int plcp_ce_host (int hostNb, struct plc_host *plcHost, bool spectrum_analyse)
{
int band, carrier;
struct plcp_host *host;
struct plcp_uchannel *uchannel;
struct plc_drv_unit *unit = plc_drv_get_unit (0);
+ bool light = false;
host = plcp_get_host_by_pos (unit, hostNb);
+ if (!spectrum_analyse)
+ light = true;
+
if ((host != NULL) && (host->used))
{
- // memcpy(plcHost->mac_address, host->mac_addr,6); //PR50: Renamed mac_address field
- memcpy (plcHost->macAddress, host->mac_addr, 6); //PR50: Renamed mac_address field
+ memcpy (plcHost->macAddress, host->mac_addr, 6);
plcHost->gain = host->data_gain;
plcHost->avgNoise = (uint16_t) host->glomer;
plcHost->mtu = host->mtu;
- plcHost->automatic = (host->link_state == LINK_STATE_MANUAL) ? false : true;
+ plcHost->automatic =
+ (host->link_state == LINK_STATE_MANUAL) ? false : true;
- /* TX channel */
-#if 0
- printk (__FILE__ ":%d plcp_get_channel(TX_CHANNEL, %08x, %08x, %08x)\n",
- __LINE__, host, host->uchannel, &plcHost->tx_channel);
-#endif
- plcp_get_channel (TX_CHANNEL, host, host->uchannel, &plcHost->tx_channel);
+ plcp_get_channel (TX_CHANNEL, host, host->uchannel,
+ &plcHost->tx_channel, light);
- /* RX channel */
-#if 0
- printk (__FILE__ ":%d hostNb=%d host->id1=%d plcp_get_channel(RX_CHANNEL, %08x, %08x, %08x)\n",
- __LINE__, hostNb, host->id1, host, plcp_get_uchannel_by_id (host->id1), &plcHost->rx_channel);
-#endif
- // the host->rx_channel corresponds to the last channel seen on a data frame. Can be other than id1-2-3
uchannel = plcp_get_uchannel_by_id (host->rx_channel);
ASSERT (uchannel);
- plcp_get_channel (RX_CHANNEL, host, uchannel, &plcHost->rx_channel);
+ plcp_get_channel (RX_CHANNEL, host, uchannel, &plcHost->rx_channel,
+ light);
- // the host->rx_channel corresponds to the last channel calculated by our ce process. Must be id1-2-3, or 0.
uchannel = plcp_get_uchannel_by_id (host->rx_last_channel);
ASSERT (uchannel);
- plcp_get_channel (RX_LAST_CHANNEL, host, uchannel, &plcHost->rx_last_channel);
+ plcp_get_channel (RX_LAST_CHANNEL, host, uchannel,
+ &plcHost->rx_last_channel, light);
if (host->info == NULL)
{
@@ -1797,50 +1781,39 @@ int plcp_ce_host (int hostNb, struct plc_host *plcHost)
memset (plcHost->signal, 0, sizeof (plcHost->signal));
memset (plcHost->avg_band_att, 0, sizeof (plcHost->avg_band_att));
memset (plcHost->avg_band_snr, 0, sizeof (plcHost->avg_band_snr));
- plcHost->avg_att = 0;
plcHost->avg_snr = 0;
}
- else
+ else if (spectrum_analyse)
{
- ce_analyse_host_spectrum (host);
+ ce_analyse_host_spectrum_sm (host,
+ &plcHost->
+ signal[PMD_CARRIERS_PER_BAND]);
for (band = 1; band < PMD_MAX_BANDS; band++)
{
for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
{
- //PR50 BEGIN: Removed ber references
- /*
- * if ((unit->stats.ber.payload_invalid[band][carrier] + unit->stats.ber.payload_valid[band][carrier])!= 0)
- * plcHost->ber[band*PMD_CARRIERS_PER_BAND+carrier] =
- * ((unit->stats.ber.payload_invalid[band][carrier] * 10000) /
- * (unit->stats.ber.payload_invalid[band][carrier] + unit->stats.ber.payload_valid[band][carrier]));
- * else
- * plcHost->ber[band*PMD_CARRIERS_PER_BAND+carrier] = 0;
- */
- //PR50 END
-#ifdef RAFALE_WITH_NR // plc_common.h
- plcHost->noise[band * PMD_CARRIERS_PER_BAND + carrier] = host->info->bpsk_noise[band][carrier / 8];
-#else
- plcHost->noise[band * PMD_CARRIERS_PER_BAND + carrier] = 0;
-#endif
-#ifdef SPIDMONITOR_173_USED
- plcHost->signal[band * PMD_CARRIERS_PER_BAND + carrier] = host->info->spectrum[band][carrier] * 100;
-#else
- plcHost->signal[band * PMD_CARRIERS_PER_BAND + carrier] = host->info->spectrum[band][carrier];
-#endif
+ plcHost->noise[band * PMD_CARRIERS_PER_BAND + carrier] =
+ host->info->bpsk_noise[band][carrier / 8];
}
- //PR50 BEGIN: Added avg_att & avg_snd management
- plcHost->avg_band_att[band] = /*host->att */ host->new_gain;
+ plcHost->avg_band_att[band] = host->new_gain;
+
if (band_is_used (unit, band))
{
+#ifdef INCLUDE_HOST_MEMO
plcHost->avg_band_snr[band] =
- 10 * log10 (ce_get_band_power (band, host->info->spectrum[band]) /
- ce_get_band_power (band, __avg_sn[band]));
+ 10 *
+ log10 (ce_get_band_power
+ (band,
+ host->info->spectrum[band]) /
+ ce_get_band_power (band, __avg_sn[band]));
+#elseif
+ plcHost->avg_band_snr[band] = 0;
+#endif
}
}
- plcHost->avg_att = /*host->att */ host->new_gain;
plcHost->avg_snr = host->snr;
}
- //PR50 END:
+ plcHost->avg_att = host->new_gain;
return 0;
}
else
@@ -1853,7 +1826,8 @@ int plcp_ce_host (int hostNb, struct plc_host *plcHost)
int plcp_isPilot (int band, int carrier /*INDEX 0..127 */ )
{
- return ((plcp_pilots[band][0] == carrier) || (plcp_pilots[band][1] == carrier));
+ return ((plcp_pilots[band][0] == carrier) ||
+ (plcp_pilots[band][1] == carrier));
}
#endif
@@ -1896,7 +1870,8 @@ int plcp_channel_open (struct plc_drv_unit *unit)
{
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- plcp_set_group_modulation (&uchannel->quality[band], group, modulation);
+ plcp_set_group_modulation (&uchannel->quality[band], group,
+ modulation);
}
}
@@ -1905,8 +1880,10 @@ int plcp_channel_open (struct plc_drv_unit *unit)
{
for (band = 2; band < PMD_MAX_BANDS; band += 2)
{
- plcp_set_group_modulation (&uchannel->quality[band], 1, PLC_MOD_NONE);
- plcp_set_group_modulation (&uchannel->quality[band], 14, PLC_MOD_NONE);
+ plcp_set_group_modulation (&uchannel->quality[band], 1,
+ PLC_MOD_NONE);
+ plcp_set_group_modulation (&uchannel->quality[band], 14,
+ PLC_MOD_NONE);
}
}
@@ -1925,7 +1902,6 @@ int plcp_channel_open (struct plc_drv_unit *unit)
uchannel->pilots[band][1] = plcp_pilots[band][0];
#endif
}
-
}
else
{ /* none, bpsk, qpsk */
@@ -1947,19 +1923,13 @@ int plcp_channel_open (struct plc_drv_unit *unit)
struct pmd_carrier_map cm;
-void plcp_update_slot_rate (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_update_slot_rate (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int mod, b, n, band, group, bits, bits_per_slot;
uint8_t notch;
-#if 0
- uint32_t ra;
- asm volatile ("str lr,[%0]\n\t"::"r" (&ra));
-
- printk (__FILE__ ":%d uchannel 0x%08x index=%d ra=%08x\n", __LINE__, uchannel, uchannel->index, ra);
-#endif
-
cm = *(uchannel->notches);
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -1976,36 +1946,34 @@ void plcp_update_slot_rate (struct plc_drv_unit *unit, struct plcp_uchannel *uch
bits = 0;
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
{
- mod = plcp_get_group_modulation (&uchannel->quality[band], group);
+ mod =
+ plcp_get_group_modulation (&uchannel->quality[band],
+ group);
b = pmd_get_mod_bits_per_slot (mod);
notch = CM_GROUP (band, group, &cm);
n = byte_zeroes (notch);
bits += (b * n);
RT_PRINTM (TRACE_PLCP, TRACE_INFO,
- "band %d, group %d, mod = %d (%d bits), carriers=%d\n", band, group, mod, b, n);
+ "band %d, group %d, mod = %d (%d bits), carriers=%d\n",
+ band, group, mod, b, n);
}
uchannel->bits_per_band[band] = bits;
bits_per_slot += bits;
- RT_PRINTM (TRACE_PLCP, TRACE_INFO, "bits_per_band[%d] = %d\n", band, uchannel->bits_per_band[band]);
+ RT_PRINTM (TRACE_PLCP, TRACE_INFO, "bits_per_band[%d] = %d\n",
+ band, uchannel->bits_per_band[band]);
}
}
uchannel->lookup.bits_per_slot = bits_per_slot;
}
/* returns band bitrate in bits/s this is the PHY rate (including DATA+FEC overhead) */
-int plcp_band_bit_rate (struct pmd_band_quality *q, int band, struct pmd_carrier_map *notches)
+int plcp_band_bit_rate (struct pmd_band_quality *q, int band,
+ struct pmd_carrier_map *notches)
{
int mod, b, n, group, bits;
uint8_t notch;
-#if 0
- uint32_t ra;
- asm volatile ("str lr,[%0]\n\t"::"r" (&ra));
-
- printk (__FILE__ ":%d notches=0x%08x ra=%08x ", __LINE__, notches, ra);
- printk ("memcpy(0x%08x,0x%08x,%d)\n", &cm.dword[band], &notches->dword[band], sizeof (cm.dword[band]));
-#endif
memcpy (&cm.dword[band], &notches->dword[band], sizeof (cm.dword[band]));
CM_SET (band, plcp_pilots[band][0], &cm);
CM_SET (band, plcp_pilots[band][1], &cm);
@@ -2030,27 +1998,23 @@ int plcp_slot_rate (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
int mod, b, n, band, group, bits;
uint8_t notch;
-#if 0
- uint32_t ra;
- asm volatile ("str lr,[%0]\n\t"::"r" (&ra));
-
- printk (__FILE__ ":%d uchannel 0x%08x index=%d ra=%08x\n", __LINE__, uchannel, uchannel->index, ra);
-#endif
-
/* Compute the number of bits that each band can send in one symbol */
bits = 0;
for (band = 1; band < PMD_MAX_BANDS; band++)
{
if (band_is_used (unit, band))
{
- bits += plcp_band_bit_rate (&uchannel->quality[band], band, uchannel->notches);
+ bits +=
+ plcp_band_bit_rate (&uchannel->quality[band], band,
+ uchannel->notches);
}
}
return (bits / 8);
}
/* returns slot rate in bytes/s this is the PHY rate (including DATA+FEC overhead) */
-int plcp_max_slot_rate (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+int plcp_max_slot_rate (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
struct pmd_band_quality quality;
diff --git a/app/sm-plc-drv/src/plcp_fmode.c b/app/sm-plc-drv/src/plcp_fmode.c
index c655699e65..cc0723d1bc 100755
--- a/app/sm-plc-drv/src/plcp_fmode.c
+++ b/app/sm-plc-drv/src/plcp_fmode.c
@@ -2,9 +2,9 @@
HEADER
--------------------------------------------------------------------------------
$RCSfile: plcp_fmode.c,v $
- $Revision: 1.139.2.4.2.18.2.1 $
- $Author: save $
- $Date: 2007/10/30 13:12:41 $
+ $Revision: 1.139.2.4.2.19 $
+ $Author: mstankovic $
+ $Date: 2007/10/24 09:57:58 $
Copyright (C) 2005 by SPiDCOM Technologies. All rights reserved.
--------------------------------------------------------------------------------*/
@@ -118,14 +118,20 @@ static int __cap_start (struct plc_drv_unit *unit);
static int __spy_start (struct plc_drv_unit *unit);
static int __p_start (struct plc_drv_unit *unit);
-static int __cap_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices);
-static int __spy_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices);
-static int __p_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices);
+static int __cap_efr (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slices);
+static int __spy_efr (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slices);
+static int __p_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slices);
static int __tx_start (struct plc_drv_unit *, struct plcp_frame *, uint16_t);
-static int __early_tx_start (struct plc_drv_unit *, struct plcp_frame *, uint16_t);
-static int __spy_tx_start (struct plc_drv_unit *, struct plcp_frame *, uint16_t);
-static int __p_tx_start (struct plc_drv_unit *, struct plcp_frame *, uint16_t);
+static int __early_tx_start (struct plc_drv_unit *, struct plcp_frame *,
+ uint16_t);
+static int __spy_tx_start (struct plc_drv_unit *, struct plcp_frame *,
+ uint16_t);
+static int __p_tx_start (struct plc_drv_unit *, struct plcp_frame *,
+ uint16_t);
static void __tx_more_isr (int proto, int flow);
static void __p_tx_more_isr (int proto, int flow);
@@ -139,8 +145,10 @@ static bool __start_tmo (struct plc_drv_unit *unit, uint16_t date);
static bool __stop_tmo (struct plc_drv_unit *unit);
static int __check_control (struct plc_drv_unit *, struct plcp_frame *);
-static int __read_control (struct plc_drv_unit *, struct plcp_frame *, uint32_t);
-static int __read_triple_control (struct plc_drv_unit *, struct plcp_frame *, uint32_t);
+static int __read_control (struct plc_drv_unit *, struct plcp_frame *,
+ uint32_t);
+static int __read_triple_control (struct plc_drv_unit *, struct plcp_frame *,
+ uint32_t);
static void __cap_status (struct plc_drv_unit *unit);
static void __spy_status (struct plc_drv_unit *unit);
@@ -173,20 +181,27 @@ static void __cap_check_more (struct plc_drv_unit *unit);
static void __spy_check_more (struct plc_drv_unit *unit, int first_valid_crc);
static void __rx_end_isr (int proto, int flow);
-static int __rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static int __p_rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static void __fake_rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe);
-static void __fake_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe);
+static int __rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe);
+static int __p_rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe);
+static void __fake_rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe);
+static void __fake_tx_end (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe);
static void __eof_isr (int proto, int flow);
static void __tmo1_isr (int proto, int flow);
static void __tmo2_isr (int proto, int flow);
-static int __mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots);
-static int __p_mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots);
+static int __mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slots);
+static int __p_mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slots);
static void __write_control (struct plc_drv_unit *, struct plcp_frame *);
-static void __early_write_control (struct plc_drv_unit *, struct plcp_frame *);
+static void __early_write_control (struct plc_drv_unit *,
+ struct plcp_frame *);
static void __p_write_control (struct plc_drv_unit *, struct plcp_frame *);
static void __drop (struct plc_drv_unit *unit, uint16_t target_date);
@@ -282,7 +297,8 @@ extern uint16_t __adapts[PMD_MAX_BANDS][PMD_CARRIERS_PER_BAND];
/**T**/
#if (PLCP_DEBUG_LEVEL>=PLCP_LEVEL_EVENTS)
-INLINE void plcp_event (struct plc_drv_unit *unit, struct plcp_frame *pframe, int event, int date)
+INLINE void plcp_event (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ int event, int date)
{
int state = unit->plcp.state;
int tail;
@@ -541,16 +557,21 @@ double __estim_band_power (struct pmd_band_quality *quality, int band_no)
{
mod = plcp_get_group_modulation (quality, group);
/* vérifier si le groupe contient que des notch */
- notchs = CM_GROUP (band_no, group, &notches[NOTCHES_DEFAULT]) | plcp_pilots_bitmap[band_no][group];
+ notchs =
+ CM_GROUP (band_no, group,
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band_no][group];
band_power = __power[band_no][mod];
- band_power = band_power * ((double) (byte_zeroes (notchs)) / (double) 8);
+ band_power =
+ band_power * ((double) (byte_zeroes (notchs)) / (double) 8);
power += band_power;
}
return power;
}
-double plcp_estim_power (struct pmd_band_quality qual[PMD_MAX_BANDS], uint8_t used_mask)
+double plcp_estim_power (struct pmd_band_quality qual[PMD_MAX_BANDS],
+ uint8_t used_mask)
{
int band;
double power;
@@ -567,7 +588,8 @@ double plcp_estim_power (struct pmd_band_quality qual[PMD_MAX_BANDS], uint8_t us
return power;
}
-INLINE void __set_control_power (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+INLINE void __set_control_power (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
uint8_t mask;
@@ -601,11 +623,14 @@ INLINE void __set_control_power (struct plc_drv_unit *unit, struct plcp_frame *p
pmd_disable_mod (band, unit->control_modulation);
}
}
- power_ref = plcp_estim_power (control_uchannel->quality, unit->used_bands);
+ power_ref =
+ plcp_estim_power (control_uchannel->quality, unit->used_bands);
power_ctrl = plcp_estim_power (control_uchannel->quality, ctrl_mask);
if ((double) power_ctrl > (double) 0)
{
- gain = (uint16_t) ((double) pframe->ctrl_gain * sqrt (power_ref / power_ctrl));
+ gain =
+ (uint16_t) ((double) pframe->ctrl_gain *
+ sqrt (power_ref / power_ctrl));
PLCP_LOG (0, "control gain adjusted (single band)", gain);
}
else
@@ -629,17 +654,21 @@ INLINE void __set_control_power (struct plc_drv_unit *unit, struct plcp_frame *p
pmd_disable_mod (band, unit->control_modulation);
}
}
- power_ref = plcp_estim_power (control_uchannel->quality, unit->used_bands);
+ power_ref =
+ plcp_estim_power (control_uchannel->quality, unit->used_bands);
power_ctrl = plcp_estim_power (control_uchannel->quality, ctrl_mask);
if ((double) power_ctrl > (double) 0)
{
- gain = (uint16_t) ((double) pframe->ctrl_gain * sqrt (power_ref / power_ctrl));
+ gain =
+ (uint16_t) ((double) pframe->ctrl_gain *
+ sqrt (power_ref / power_ctrl));
PLCP_LOG (0, "control gain adjusted (used bands)", gain);
}
else
{
gain = pframe->data_gain;
- PLCP_LOG (0, "control gain defaulted to data gain (used bands)", gain);
+ PLCP_LOG (0, "control gain defaulted to data gain (used bands)",
+ gain);
}
break;
@@ -721,8 +750,10 @@ static inline void plcp_data_power (uint32_t unused)
void __cap_status (struct plc_drv_unit *unit)
{
- RT_PRINTK ("control ........... %d slots\n", unit->plcp.config.nb_control);
- RT_PRINTK ("wait control ....... %d slots\n", unit->plcp.config.nb_wait_control);
+ RT_PRINTK ("control ........... %d slots\n",
+ unit->plcp.config.nb_control);
+ RT_PRINTK ("wait control ....... %d slots\n",
+ unit->plcp.config.nb_wait_control);
}
void __spy_status (struct plc_drv_unit *unit)
@@ -765,6 +796,9 @@ int plcp_fmode_set_defaults (struct plc_drv_unit *unit)
unit->plcp.config.min_corr_thr = 0xffff;
#endif
unit->plcp.config.vote = true;
+ unit->plcp.config.stat_rx.enable = false;
+ unit->plcp.config.stat_rx.band_votes = false;
+ unit->plcp.config.stat_rx.fast = false; // doesn't work with hamming or reed-solomon
unit->plcp.config.hamming.enable = true;
unit->plcp.config.hamming.all_hamming = false;
unit->plcp.config.reeds = false;
@@ -909,15 +943,19 @@ static int __start (struct plc_drv_unit *unit)
unit->PMD->tx_min = min;
unit->PMD->tx_max = max;
- unit->PMD->rx_spy_refs = unit->plcp.config.nb_ref_head - unit->plcp.config.nb_start;
+ unit->PMD->rx_spy_refs =
+ unit->plcp.config.nb_ref_head - unit->plcp.config.nb_start;
unit->PMD->rx_spy_ctrls = unit->plcp.config.nb_control;
- plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref, unit->nb_bands);
+ plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref, unit->nb_bands);
unit->PMD->nb_bands = nb_bands;
unit->PMD->tx_nb_calibrate = nb_bands * unit->plcp.config.nb_calibrate;
unit->PMD->tx_nb_refs = nb_bands * unit->plcp.config.nb_ref_head;
- unit->PMD->tx_nb_wait_ose = nb_bands * (unit->plcp.config.nb_wait_control - unit->plcp.config.tx_more_slots);
+ unit->PMD->tx_nb_wait_ose =
+ nb_bands * (unit->plcp.config.nb_wait_control -
+ unit->plcp.config.tx_more_slots);
// FIWME should send tx_nb_eof * unit->nb_bands symbols
unit->PMD->tx_nb_eof = nb_bands * unit->plcp.config.tx_nb_eof;
@@ -964,13 +1002,17 @@ static int __cap_start (struct plc_drv_unit *unit)
return -1;
}
unit->PMD->tx_control_nb_words = unit->control_len / 2;
- unit->PMD->tx_control_nb_symbols = unit->control_symbols + (unit->plcp.config.tx_more_slots * unit->nb_bands);
+ unit->PMD->tx_control_nb_symbols =
+ unit->control_symbols +
+ (unit->plcp.config.tx_more_slots * unit->nb_bands);
unit->PMD->tx_more_ctl = 0;
unit->PMD->rx_header = 1;
unit->PMD->rx_more_ctl = 0;
rpr = unit->plcp.config.nb_ref_head;
- srr = unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control + unit->plcp.config.nb_wait_control;
+ srr =
+ unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control +
+ unit->plcp.config.nb_wait_control;
fm->data_offset = srr;
plcp_set_rx_dsp_bands (unit, unit->used_bands);
@@ -1007,7 +1049,9 @@ static int __spy_start (struct plc_drv_unit *unit)
}
unit->PMD->tx_control_nb_words = unit->control_len / 2;
- unit->PMD->tx_control_nb_symbols = unit->control_symbols + (unit->plcp.config.tx_more_slots * unit->nb_bands);
+ unit->PMD->tx_control_nb_symbols =
+ unit->control_symbols +
+ (unit->plcp.config.tx_more_slots * unit->nb_bands);
unit->PMD->tx_more_ctl = 0;
/* when configured in spy mode, there is always a header
* and rx_header MUST be 0
@@ -1024,7 +1068,8 @@ static int __spy_start (struct plc_drv_unit *unit)
fm->data_offset = unit->plcp.config.nb_ref_head;
- hal_start_timer (&detect_timer, DET_timeout, __spy_tmo_detect, unit, NULL);
+ hal_start_timer (&detect_timer, DET_timeout, __spy_tmo_detect, unit,
+ NULL);
// we reach better BER using AGCGOA=0x64=100 instead of 0x40=64 in spy mode
agc->target_amplitude = 0x64; /* inverse de la valeure à atteindre */
@@ -1073,7 +1118,8 @@ static int __p_start (struct plc_drv_unit *unit)
unit->PMD->tx_control_nb_words = 0;
unit->PMD->tx_control_nb_symbols = 0;
unit->PMD->tx_more_ctl = 0;
- unit->PMD->tx_nb_wait_ose = unit->plcp.config.nb_wait_control * unit->nb_bands;
+ unit->PMD->tx_nb_wait_ose =
+ unit->plcp.config.nb_wait_control * unit->nb_bands;
bug_128_position = unit->nb_bands * (127 - unit->plcp.config.nb_ref_head);
pmd_set_bug_128_position (bug_128_position);
@@ -1088,13 +1134,15 @@ static int __p_start (struct plc_drv_unit *unit)
}
-static int __cap_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices)
+static int __cap_efr (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slices)
{
int efr = unit->plcp.config.nb_ref_head
+ unit->plcp.config.nb_control
+ unit->plcp.config.nb_wait_control
- + uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices];
+ + uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices];
// + unit->plcp.config.rx_nb_eof;
if (efr > 127)
@@ -1104,10 +1152,12 @@ static int __cap_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
return efr;
}
-static int __spy_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices)
+static int __spy_efr (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slices)
{
int efr = unit->plcp.config.nb_ref_head
- + uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices];
+ + uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices];
// + unit->plcp.config.rx_nb_eof;
if (efr > 127)
{
@@ -1116,10 +1166,12 @@ static int __spy_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
return efr;
}
-static int __p_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slices)
+static int __p_efr (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slices)
{
int efr = unit->plcp.config.nb_ref_head
- + uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices];
+ + uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices];
// + unit->plcp.config.rx_nb_eof;
if (efr > 127)
{
@@ -1134,7 +1186,9 @@ static void __cap_idle (struct plc_drv_unit *unit)
__idle (unit);
- efr = unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control + unit->plcp.config.nb_wait_control;
+ efr =
+ unit->plcp.config.nb_ref_head + unit->plcp.config.nb_control +
+ unit->plcp.config.nb_wait_control;
// + unit->plcp.config.rx_nb_eof;
plcp_set_efr (unit, efr);
@@ -1152,7 +1206,8 @@ static void __spy_idle (struct plc_drv_unit *unit)
pmd_set_chmr (plcp_detect_bands);
plcp_set_rx_nb_bands (unit, unit->nb_bands, unit->nb_bands);
- plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref, unit->nb_bands);
+ plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref, unit->nb_bands);
/* In spy mode a second frame will be received just after the
* spy block. Therefore the EFR must be as short as possible.
@@ -1196,19 +1251,24 @@ static void __p_idle (struct plc_drv_unit *unit)
}
}
- plcp_rx_frame->uchannel = plcp_get_uchannel_by_id (unit->plcp.config.p_cid);
+ plcp_rx_frame->uchannel =
+ plcp_get_uchannel_by_id (unit->plcp.config.p_cid);
if (plcp_rx_frame->uchannel)
{
- plcp_eligible_bands = unit->used_bands & ~plcp_rx_frame->uchannel->unused_bands;
+ plcp_eligible_bands =
+ unit->used_bands & ~plcp_rx_frame->uchannel->unused_bands;
memset (plcp_rx_frame->control, 0, sizeof (union plcp_control));
plcp_rx_frame->control->l_frm.slices = unit->plcp.config.p_rx_slices;
plcp_rx_frame->rx_bands = plcp_eligible_bands;
// update rx_bands for BER mesures. Also done in other modes
plcp_rx_frame->nb_rx_bands = unit->nb_bands;
- plcp_rx_frame->d_len = (unit->plcp.config.p_rx_slices * PMD_SLICE_SIZE);
+ plcp_rx_frame->d_len =
+ (unit->plcp.config.p_rx_slices * PMD_SLICE_SIZE);
slices = plcp_rx_frame->uchannel->ops->rx_start (unit, plcp_rx_frame);
- __p_last_efr = __p_efr (unit, plcp_rx_frame->uchannel, unit->plcp.config.p_rx_slices);
+ __p_last_efr =
+ __p_efr (unit, plcp_rx_frame->uchannel,
+ unit->plcp.config.p_rx_slices);
plcp_set_efr (unit, __p_last_efr);
/* keep efr for future reuse */
@@ -1216,7 +1276,8 @@ static void __p_idle (struct plc_drv_unit *unit)
plcp_rx_frame->uchannel->ops->rx_more (unit, plcp_rx_frame);
PLCP_LOG (0, "control->l_frm.efr", plcp_rx_frame->control->l_frm.efr);
- PLCP_LOG (0, "control->l_frm.slices", plcp_rx_frame->control->l_frm.slices);
+ PLCP_LOG (0, "control->l_frm.slices",
+ plcp_rx_frame->control->l_frm.slices);
//dcache_invalidate(plcp_rx_frame->d_buf, plcp_rx_frame->d_len);
}
}
@@ -1301,7 +1362,8 @@ static inline void __invalid_crc (struct plc_drv_unit *unit, int band)
{
unit->stats.plcp.invalid_crc[band]++;
}
-static inline void __invalid_crc_all_hamm (struct plc_drv_unit *unit, int band)
+static inline void __invalid_crc_all_hamm (struct plc_drv_unit *unit,
+ int band)
{
unit->stats.plcp.invalid_crc_all_hamm[band]++;
}
@@ -1310,7 +1372,8 @@ static inline void __valid_control (struct plc_drv_unit *unit, int band)
{
unit->stats.plcp.valid_control[band]++;
}
-static inline void __valid_control_all_hamm (struct plc_drv_unit *unit, int band)
+static inline void __valid_control_all_hamm (struct plc_drv_unit *unit,
+ int band)
{
unit->stats.plcp.valid_control_all_hamm[band]++;
}
@@ -1320,7 +1383,8 @@ static inline void __invalid_control (struct plc_drv_unit *unit, int band)
unit->stats.plcp.rx_invalid_control++;
unit->stats.plcp.invalid_control[band]++;
}
-static inline void __invalid_control_all_hamm (struct plc_drv_unit *unit, int band)
+static inline void __invalid_control_all_hamm (struct plc_drv_unit *unit,
+ int band)
{
unit->stats.plcp.rx_invalid_control++;
unit->stats.plcp.invalid_control_all_hamm[band]++;
@@ -1478,6 +1542,14 @@ inline void __vote_replicas (u32 * replicas, u32 * dst)
dst[5] = __vote32 (replicas[5], replicas[13], replicas[21]);
}
+inline void __fast_vote_replicas (u32 * replicas, u32 * dst)
+{
+ dst[0] = __vote32 (replicas[0], replicas[8], replicas[16]);
+ dst[1] = __vote32 (replicas[1], replicas[9], replicas[17]);
+ dst[2] = __vote32 (replicas[2], replicas[10], replicas[18]);
+}
+
+
extern void pmd_read_band_control (u32 * dst, u8 * src, u32 xor_mask);
@@ -1489,7 +1561,316 @@ extern void pmd_read_band_control (u32 * dst, u8 * src, u32 xor_mask);
* -1 when no valid CRC could be found.
* -2 when valid CRC was found, but something was wrong in control
*/
-static int __read_control (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint32_t band_mask)
+/* STATISTIC VOTE FUNCTIONS */
+
+inline void count_bits_per_location (u32 src, u32 * cnt0, u32 * cnt1,
+ u32 * cnt2, u32 * cnt3)
+{
+
+ register u32 cntx = 0;
+
+ if (src & 0x00000001)
+ cntx |= 0x00000001;
+ if (src & 0x00000002)
+ cntx |= 0x00000010;
+ if (src & 0x00000004)
+ cntx |= 0x00000100;
+ if (src & 0x00000008)
+ cntx |= 0x00001000;
+ if (src & 0x00000010)
+ cntx |= 0x00010000;
+ if (src & 0x00000020)
+ cntx |= 0x00100000;
+ if (src & 0x00000040)
+ cntx |= 0x01000000;
+ if (src & 0x00000080)
+ cntx |= 0x10000000;
+
+ *cnt0 += cntx;
+ cntx = 0;
+
+ if (src & 0x00000100)
+ cntx |= 0x00000001;
+ if (src & 0x00000200)
+ cntx |= 0x00000010;
+ if (src & 0x00000400)
+ cntx |= 0x00000100;
+ if (src & 0x00000800)
+ cntx |= 0x00001000;
+ if (src & 0x00001000)
+ cntx |= 0x00010000;
+ if (src & 0x00002000)
+ cntx |= 0x00100000;
+ if (src & 0x00004000)
+ cntx |= 0x01000000;
+ if (src & 0x00008000)
+ cntx |= 0x10000000;
+
+ *cnt1 += cntx;
+ cntx = 0;
+
+ if (src & 0x00010000)
+ cntx |= 0x00000001;
+ if (src & 0x00020000)
+ cntx |= 0x00000010;
+ if (src & 0x00040000)
+ cntx |= 0x00000100;
+ if (src & 0x00080000)
+ cntx |= 0x00001000;
+ if (src & 0x00100000)
+ cntx |= 0x00010000;
+ if (src & 0x00200000)
+ cntx |= 0x00100000;
+ if (src & 0x00400000)
+ cntx |= 0x01000000;
+ if (src & 0x00800000)
+ cntx |= 0x10000000;
+
+ *cnt2 += cntx;
+ cntx = 0;
+
+ if (src & 0x01000000)
+ cntx |= 0x00000001;
+ if (src & 0x02000000)
+ cntx |= 0x00000010;
+ if (src & 0x04000000)
+ cntx |= 0x00000100;
+ if (src & 0x08000000)
+ cntx |= 0x00001000;
+ if (src & 0x10000000)
+ cntx |= 0x00010000;
+ if (src & 0x20000000)
+ cntx |= 0x00100000;
+ if (src & 0x40000000)
+ cntx |= 0x01000000;
+ if (src & 0x80000000)
+ cntx |= 0x10000000;
+
+ *cnt3 += cntx;
+ cntx = 0;
+}
+
+inline int statistic_vote (u32 cnt0, u32 cnt1, u32 cnt2, u32 cnt3)
+{
+ register int result = 0;
+
+ if ((cnt0 & 0x0000000f) > 0x00000003)
+ result |= 0x00000001;
+ if ((cnt0 & 0x000000f0) > 0x00000030)
+ result |= 0x00000002;
+ if ((cnt0 & 0x00000f00) > 0x00000300)
+ result |= 0x00000004;
+ if ((cnt0 & 0x0000f000) > 0x00003000)
+ result |= 0x00000008;
+ if ((cnt0 & 0x000f0000) > 0x00030000)
+ result |= 0x00000010;
+ if ((cnt0 & 0x00f00000) > 0x00300000)
+ result |= 0x00000020;
+ if ((cnt0 & 0x0f000000) > 0x03000000)
+ result |= 0x00000040;
+ if ((cnt0 & 0xf0000000) > 0x30000000)
+ result |= 0x00000080;
+
+ if ((cnt1 & 0x0000000f) > 0x00000003)
+ result |= 0x00000100;
+ if ((cnt1 & 0x000000f0) > 0x00000030)
+ result |= 0x00000200;
+ if ((cnt1 & 0x00000f00) > 0x00000300)
+ result |= 0x00000400;
+ if ((cnt1 & 0x0000f000) > 0x00003000)
+ result |= 0x00000800;
+ if ((cnt1 & 0x000f0000) > 0x00030000)
+ result |= 0x00001000;
+ if ((cnt1 & 0x00f00000) > 0x00300000)
+ result |= 0x00002000;
+ if ((cnt1 & 0x0f000000) > 0x03000000)
+ result |= 0x00004000;
+ if ((cnt1 & 0xf0000000) > 0x30000000)
+ result |= 0x00008000;
+
+ if ((cnt2 & 0x0000000f) > 0x00000003)
+ result |= 0x00010000;
+ if ((cnt2 & 0x000000f0) > 0x00000030)
+ result |= 0x00020000;
+ if ((cnt2 & 0x00000f00) > 0x00000300)
+ result |= 0x00040000;
+ if ((cnt2 & 0x0000f000) > 0x00003000)
+ result |= 0x00080000;
+ if ((cnt2 & 0x000f0000) > 0x00030000)
+ result |= 0x00100000;
+ if ((cnt2 & 0x00f00000) > 0x00300000)
+ result |= 0x00200000;
+ if ((cnt2 & 0x0f000000) > 0x03000000)
+ result |= 0x00400000;
+ if ((cnt2 & 0xf0000000) > 0x30000000)
+ result |= 0x00800000;
+
+ if ((cnt3 & 0x0000000f) > 0x00000003)
+ result |= 0x01000000;
+ if ((cnt3 & 0x000000f0) > 0x00000030)
+ result |= 0x02000000;
+ if ((cnt3 & 0x00000f00) > 0x00000300)
+ result |= 0x04000000;
+ if ((cnt3 & 0x0000f000) > 0x00003000)
+ result |= 0x08000000;
+ if ((cnt3 & 0x000f0000) > 0x00030000)
+ result |= 0x10000000;
+ if ((cnt3 & 0x00f00000) > 0x00300000)
+ result |= 0x20000000;
+ if ((cnt3 & 0x0f000000) > 0x03000000)
+ result |= 0x40000000;
+ if ((cnt3 & 0xf0000000) > 0x30000000)
+ result |= 0x80000000;
+
+ return result;
+}
+
+
+inline void stat_vote (u32 * dest, struct plc_drv_unit *unit)
+{
+ int i = 0;
+ u32 cnt0, cnt1, cnt2, cnt3, cntx;
+
+// BAND VOTE IF ENABLED
+ if (unit->plcp.config.stat_rx.band_votes)
+ {
+ __vote_replicas ((u32 *) pmd_rx_control (1),
+ (u32 *) pmd_rx_control (1));
+ __vote_replicas ((u32 *) pmd_rx_control (2),
+ (u32 *) pmd_rx_control (2));
+ __vote_replicas ((u32 *) pmd_rx_control (3),
+ (u32 *) pmd_rx_control (3));
+ __vote_replicas ((u32 *) pmd_rx_control (4),
+ (u32 *) pmd_rx_control (4));
+ __vote_replicas ((u32 *) pmd_rx_control (5),
+ (u32 *) pmd_rx_control (5));
+ __vote_replicas ((u32 *) pmd_rx_control (6),
+ (u32 *) pmd_rx_control (6));
+ __vote_replicas ((u32 *) pmd_rx_control (7),
+ (u32 *) pmd_rx_control (7));
+ }
+
+//SCRAMBLE DATA
+ pmd_read_band_control ((u32 *) pmd_rx_control (1) /*dst */ ,
+ (u8 *) pmd_rx_control (1) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][1]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (2) /*dst */ ,
+ (u8 *) pmd_rx_control (2) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][2]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (3) /*dst */ ,
+ (u8 *) pmd_rx_control (3) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][3]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (4) /*dst */ ,
+ (u8 *) pmd_rx_control (4) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][4]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (5) /*dst */ ,
+ (u8 *) pmd_rx_control (5) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][5]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (6) /*dst */ ,
+ (u8 *) pmd_rx_control (6) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][6]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (7) /*dst */ ,
+ (u8 *) pmd_rx_control (7) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][7]);
+
+
+ while (i < 6)
+ {
+ cnt3 = cnt2 = cnt1 = cnt0 = 0;
+ count_bits_per_location (*((u32 *) pmd_rx_control (1) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (2) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (3) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (4) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (5) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (6) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (7) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ dest[i] = statistic_vote (cnt0, cnt1, cnt2, cnt3);
+ i++;
+ }
+}
+
+inline void fast_stat_vote (u32 * dest, struct plc_drv_unit *unit)
+{
+ int i = 0;
+ u32 cnt0, cnt1, cnt2, cnt3, cntx;
+
+// BAND VOTE IF ENABLED
+ if (unit->plcp.config.stat_rx.band_votes)
+ {
+ __fast_vote_replicas ((u32 *) pmd_rx_control (1),
+ (u32 *) pmd_rx_control (1));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (2),
+ (u32 *) pmd_rx_control (2));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (3),
+ (u32 *) pmd_rx_control (3));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (4),
+ (u32 *) pmd_rx_control (4));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (5),
+ (u32 *) pmd_rx_control (5));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (6),
+ (u32 *) pmd_rx_control (6));
+ __fast_vote_replicas ((u32 *) pmd_rx_control (7),
+ (u32 *) pmd_rx_control (7));
+ }
+
+//SCRAMBLE DATA
+ pmd_read_band_control ((u32 *) pmd_rx_control (1) /*dst */ ,
+ (u8 *) pmd_rx_control (1) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][1]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (2) /*dst */ ,
+ (u8 *) pmd_rx_control (2) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][2]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (3) /*dst */ ,
+ (u8 *) pmd_rx_control (3) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][3]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (4) /*dst */ ,
+ (u8 *) pmd_rx_control (4) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][4]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (5) /*dst */ ,
+ (u8 *) pmd_rx_control (5) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][5]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (6) /*dst */ ,
+ (u8 *) pmd_rx_control (6) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][6]);
+ pmd_read_band_control ((u32 *) pmd_rx_control (7) /*dst */ ,
+ (u8 *) pmd_rx_control (7) /*src */ ,
+ xor_mask[unit->plcp.config.scramble_new][7]);
+
+
+ while (i < 3)
+ {
+ cnt3 = cnt2 = cnt1 = cnt0 = 0;
+ count_bits_per_location (*((u32 *) pmd_rx_control (1) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (2) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (3) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (4) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (5) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (6) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ count_bits_per_location (*((u32 *) pmd_rx_control (7) + i), &cnt0,
+ &cnt1, &cnt2, &cnt3);
+ dest[i] = statistic_vote (cnt0, cnt1, cnt2, cnt3);
+ i++;
+ }
+}
+
+/* END STATISTIC VOTE FUNCTONS SECTION */
+
+
+static int __read_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, uint32_t band_mask)
{
int band;
@@ -1500,19 +1881,24 @@ static int __read_control (struct plc_drv_unit *unit, struct plcp_frame *pframe,
if ((1 << band) & band_mask)
{
// then perform the scrambling
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) pmd_rx_control (band) /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) pmd_rx_control (band) /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
if (unit->plcp.config.hamming.enable)
{
- hamming_unroll_decode ((u16 *) pframe->control, decoded_control);
+ hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control);
}
else
{ /* recopy control byte descrambled into pframe->control */
- memcpy (pframe->control, decoded_control, sizeof (union plcp_control));
+ memcpy (pframe->control, decoded_control,
+ sizeof (union plcp_control));
}
if (unit->plcp.config.reeds)
- rs_decode ((char *) pframe->control, (char *) pframe->control);
+ rs_decode ((char *) pframe->control,
+ (char *) pframe->control);
if (control_crc (pframe->control) == pframe->control->l_frm.crc)
{
__valid_crc (unit, band);
@@ -1540,7 +1926,9 @@ static int __read_control (struct plc_drv_unit *unit, struct plcp_frame *pframe,
return -ECRC;
}
-static int __read_triple_control (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint32_t band_mask)
+static int __read_triple_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe,
+ uint32_t band_mask)
{
int band, i, j, offset;
u8 res_entropy;
@@ -1560,10 +1948,14 @@ static int __read_triple_control (struct plc_drv_unit *unit, struct plcp_frame *
if ((1 << band) & band_mask)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (band), decoded_control /*dst */ );
+ __vote_replicas ((u32 *) pmd_rx_control (band),
+ decoded_control /*dst */ );
// then perform the entropy
- res_entropy = entropy ((u32 *) pmd_rx_control (band), (u32 *) (((u8 *) pmd_rx_control (band)) + 32),
- (u32 *) (((u8 *) pmd_rx_control (band)) + 64), decoded_control);
+ res_entropy =
+ entropy ((u32 *) pmd_rx_control (band),
+ (u32 *) (((u8 *) pmd_rx_control (band)) + 32),
+ (u32 *) (((u8 *) pmd_rx_control (band)) + 64),
+ decoded_control);
// entropy ok -> stock band number
if (res_entropy < unit->plcp.config.hamming.entropy.limit)
{
@@ -1579,13 +1971,19 @@ static int __read_triple_control (struct plc_drv_unit *unit, struct plcp_frame *
for (i = 0; i < nb_started_bands_ok; i++)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (bands[i]), decoded_control_tab[i] /*dst */ );
+ __vote_replicas ((u32 *) pmd_rx_control (bands[i]),
+ decoded_control_tab[i] /*dst */ );
// then perform the scrambling
- pmd_read_band_control (decoded_control_tab[i] /*dst */ , (u8 *) decoded_control_tab[i] /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][bands[i]]);
+ pmd_read_band_control (decoded_control_tab[i] /*dst */ ,
+ (u8 *) decoded_control_tab[i]
+ /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][bands[i]]);
}
// then perform the hamming
- all_hamming_unroll_decode ((u16 *) pframe->control, decoded_control_tab, nb_started_bands_ok);
+ all_hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control_tab,
+ nb_started_bands_ok);
}
else
{
@@ -1593,25 +1991,42 @@ static int __read_triple_control (struct plc_drv_unit *unit, struct plcp_frame *
for (i = 0; i < nb_started_bands_ok; i++)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (bands[i]), decoded_control_tab[3 + offset] /*dst */ );
+ __vote_replicas ((u32 *) pmd_rx_control (bands[i]),
+ decoded_control_tab[3 +
+ offset] /*dst */ );
// then perform the scrambling
for (j = 0; j < 3; j++)
{
- pmd_read_band_control (decoded_control_tab[j + offset] /*dst */ ,
- (u8 *) (((u8 *) pmd_rx_control (bands[i])) + (j * 32)) /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][bands[i]]);
+ pmd_read_band_control (decoded_control_tab[j + offset]
+ /*dst */ ,
+ (u8
+ *) (((u8 *)
+ pmd_rx_control (bands
+ [i])) +
+ (j * 32)) /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][bands
+ [i]]);
}
- pmd_read_band_control (decoded_control_tab[3 + offset] /*dst */ ,
- (u8 *) decoded_control_tab[3 + offset] /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][bands[i]]);
+ pmd_read_band_control (decoded_control_tab[3 + offset]
+ /*dst */ ,
+ (u8 *) decoded_control_tab[3 +
+ offset]
+ /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][bands[i]]);
offset += 4;
}
// then perform the hamming
- all_hamming_unroll_decode ((u16 *) pframe->control, decoded_control_tab, nb_started_bands_ok * 4);
+ all_hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control_tab,
+ nb_started_bands_ok * 4);
}
// then perform the ReedSolomon
if (unit->plcp.config.reeds)
- res_rs = rs_decode ((char *) pframe->control, (char *) pframe->control);
+ res_rs =
+ rs_decode ((char *) pframe->control,
+ (char *) pframe->control);
// and to finish perform the CRC
// WARNING there are no more stats per band
@@ -1647,124 +2062,230 @@ static int __read_triple_control (struct plc_drv_unit *unit, struct plcp_frame *
}
else
{ //without entropy
- band = 1;
- while (band < PMD_MAX_BANDS)
+ if (unit->plcp.config.stat_rx.enable)
{
- if ((1 << band) & band_mask)
+
+// STATISTIC VOTE (SPiDCOM Internship - july-september 2007)
+
+ band = 1;
+ if (unit->plcp.config.stat_rx.fast)
+ fast_stat_vote (decoded_control /*dst */ , unit); // fast New RX Control
+ else
+ stat_vote (decoded_control /*dst */ , unit); // New RX Control
+
+ if (unit->plcp.config.hamming.enable)
+ {
+ hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control);
+ }
+ else
+ { /* recopy control byte descrambled into pframe->control */
+ memcpy (pframe->control, decoded_control,
+ sizeof (union plcp_control));
+ }
+ if (unit->plcp.config.reeds)
+ rs_decode ((char *) pframe->control,
+ (char *) pframe->control);
+
+ if (control_crc (pframe->control) == pframe->control->l_frm.crc)
{
- // first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (band), decoded_control /*dst */ );
- // then perform the scrambling
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) decoded_control /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
- if (unit->plcp.config.hamming.enable)
- {
- hamming_unroll_decode ((u16 *) pframe->control, decoded_control);
- }
- else
- { /* recopy control byte descrambled into pframe->control */
- memcpy (pframe->control, decoded_control, sizeof (union plcp_control));
- }
- if (unit->plcp.config.reeds)
- rs_decode ((char *) pframe->control, (char *) pframe->control);
- if (control_crc (pframe->control) == pframe->control->l_frm.crc)
- {
#ifdef CONFIG_PLC_PPC
- if (pframe->control->ff == PPC_PROTO)
- {
- in_save_pepsi_hdr (pframe);
- if (pframe->control->l_frm.res[0] == INVALID_SLOT)
- {
- // too many queued incoming frames probably
- __invalid_control (unit, band);
- __valid_control_not_found (unit);
- return -ECHECK; /* valid CRC, but something wrong in control */
- }
- pframe->control->l_frm.DTEI = 0xff;
- pframe->control->l_frm.channel_id = PLCP_CID_ROBUST_BPSK;
- pframe->control->l_frm.bssid = 0;
- pframe->control->l_frm.type = MA_TYPE_MANAGEMENT;
- pframe->control->l_frm.subtype = MA_SUBTYPE_PEPSI;
- pframe->control->l_frm.slices = 1;
- pframe->control->l_frm.STEI = 0x45;
- pframe->control->l_frm.efr = 0x32;
- //->
- pframe->d_len = 1;
- pframe->uchannel = plcp_get_uchannel_by_id (PLCP_CID_ROBUST_BPSK);
- __valid_crc (unit, band);
- return band;
- //<-
- //pframe->control->l_frm.crc = control_crc(pframe->control);
- }
-#endif
- __valid_crc (unit, band);
- if (__check_control (unit, pframe) >= 0)
- {
- __valid_control (unit, band);
- __valid_control_found (unit);
- return band;
- }
- else
+ if (pframe->control->ff == PPC_PROTO)
+ {
+ in_save_pepsi_hdr (pframe);
+ if (pframe->control->l_frm.res[0] == INVALID_SLOT)
{
+ // too many queued incoming frames probably
__invalid_control (unit, band);
__valid_control_not_found (unit);
return -ECHECK; /* valid CRC, but something wrong in control */
}
+ pframe->control->l_frm.DTEI = 0xff;
+ pframe->control->l_frm.channel_id = PLCP_CID_ROBUST_BPSK;
+ pframe->control->l_frm.bssid = 0;
+ pframe->control->l_frm.type = MA_TYPE_MANAGEMENT;
+ pframe->control->l_frm.subtype = MA_SUBTYPE_PEPSI;
+ pframe->control->l_frm.slices = 1;
+ pframe->control->l_frm.STEI = 0x45;
+ pframe->control->l_frm.efr = 0x32;
+ //->
+ pframe->d_len = 1;
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (PLCP_CID_ROBUST_BPSK);
+ __valid_crc (unit, band);
+ return band;
+ //<-
+ //pframe->control->l_frm.crc = control_crc(pframe->control);
+ }
+#endif
+
+ __valid_crc (unit, band);
+ if (__check_control (unit, pframe) >= 0)
+ {
+ __valid_control (unit, band);
+ __valid_control_found (unit);
+ return band;
}
else
{
- __invalid_crc (unit, band);
+ __invalid_control (unit, band);
+ __valid_control_not_found (unit);
+ return -ECHECK; /* valid CRC, but something wrong in control */
}
}
- band++;
- }
- /* ajout de la partie reconstitution du control octet par octet avec avant et apres vote */
- if (unit->plcp.config.hamming.all_hamming)
+ else
+ {
+ __invalid_crc (unit, band);
+ }
+
+ } // END STATISTIC VOTE
+ else
{
+// OLD VOTE ALGORITHM
band = 1;
-
while (band < PMD_MAX_BANDS)
{
if ((1 << band) & band_mask)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (band), decoded_control_tab[3] /*dst */ );
+ __vote_replicas ((u32 *) pmd_rx_control (band),
+ decoded_control /*dst */ );
// then perform the scrambling
- for (i = 0; i < 3; i++)
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) decoded_control /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
+ if (unit->plcp.config.hamming.enable)
{
- pmd_read_band_control (decoded_control_tab[i] /*dst */ ,
- (u8 *) (((u8 *) pmd_rx_control (band)) + (i * 32)) /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control);
+ }
+ else
+ { /* recopy control byte descrambled into pframe->control */
+ memcpy (pframe->control, decoded_control,
+ sizeof (union plcp_control));
}
- pmd_read_band_control (decoded_control_tab[3] /*dst */ , (u8 *) decoded_control_tab[3] /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
- // then the 4 hammings
- all_hamming_unroll_decode ((u16 *) pframe->control, decoded_control_tab, 4);
if (unit->plcp.config.reeds)
- rs_decode ((char *) pframe->control, (char *) pframe->control);
- if (control_crc (pframe->control) == pframe->control->l_frm.crc)
+ rs_decode ((char *) pframe->control,
+ (char *) pframe->control);
+ if (control_crc (pframe->control) ==
+ pframe->control->l_frm.crc)
{
- __valid_crc_all_hamm (unit, band);
+#ifdef CONFIG_PLC_PPC
+ if (pframe->control->ff == PPC_PROTO)
+ {
+ in_save_pepsi_hdr (pframe);
+ if (pframe->control->l_frm.res[0] == INVALID_SLOT)
+ {
+ // too many queued incoming frames probably
+ __invalid_control (unit, band);
+ __valid_control_not_found (unit);
+ return -ECHECK; /* valid CRC, but something wrong in control */
+ }
+ pframe->control->l_frm.DTEI = 0xff;
+ pframe->control->l_frm.channel_id =
+ PLCP_CID_ROBUST_BPSK;
+ pframe->control->l_frm.bssid = 0;
+ pframe->control->l_frm.type = MA_TYPE_MANAGEMENT;
+ pframe->control->l_frm.subtype = MA_SUBTYPE_PEPSI;
+ pframe->control->l_frm.slices = 1;
+ pframe->control->l_frm.STEI = 0x45;
+ pframe->control->l_frm.efr = 0x32;
+ //->
+ pframe->d_len = 1;
+ pframe->uchannel =
+ plcp_get_uchannel_by_id
+ (PLCP_CID_ROBUST_BPSK);
+ __valid_crc (unit, band);
+ return band;
+ //<-
+ //pframe->control->l_frm.crc = control_crc(pframe->control);
+ }
+#endif
+ __valid_crc (unit, band);
if (__check_control (unit, pframe) >= 0)
{
- __valid_control_all_hamm (unit, band);
+ __valid_control (unit, band);
__valid_control_found (unit);
return band;
}
else
{
- __invalid_control_all_hamm (unit, band);
+ __invalid_control (unit, band);
__valid_control_not_found (unit);
return -ECHECK; /* valid CRC, but something wrong in control */
}
}
else
{
- __invalid_crc_all_hamm (unit, band);
+ __invalid_crc (unit, band);
}
}
band++;
}
+ /* ajout de la partie reconstitution du control octet par octet avec avant et apres vote */
+ if (unit->plcp.config.hamming.all_hamming)
+ {
+ band = 1;
+
+ while (band < PMD_MAX_BANDS)
+ {
+ if ((1 << band) & band_mask)
+ {
+ // first perform the vote
+ __vote_replicas ((u32 *) pmd_rx_control (band),
+ decoded_control_tab[3] /*dst */ );
+ // then perform the scrambling
+ for (i = 0; i < 3; i++)
+ {
+ pmd_read_band_control (decoded_control_tab[i]
+ /*dst */ ,
+ (u8
+ *) (((u8 *)
+ pmd_rx_control
+ (band)) +
+ (i * 32)) /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new]
+ [band]);
+ }
+ pmd_read_band_control (decoded_control_tab[3] /*dst */
+ ,
+ (u8 *) decoded_control_tab[3]
+ /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
+ // then the 4 hammings
+ all_hamming_unroll_decode ((u16 *) pframe->control,
+ decoded_control_tab, 4);
+ if (unit->plcp.config.reeds)
+ rs_decode ((char *) pframe->control,
+ (char *) pframe->control);
+ if (control_crc (pframe->control) ==
+ pframe->control->l_frm.crc)
+ {
+ __valid_crc_all_hamm (unit, band);
+ if (__check_control (unit, pframe) >= 0)
+ {
+ __valid_control_all_hamm (unit, band);
+ __valid_control_found (unit);
+ return band;
+ }
+ else
+ {
+ __invalid_control_all_hamm (unit, band);
+ __valid_control_not_found (unit);
+ return -ECHECK; /* valid CRC, but something wrong in control */
+ }
+ }
+ else
+ {
+ __invalid_crc_all_hamm (unit, band);
+ }
+ }
+ band++;
+ }
+ }
}
}
__valid_control_not_found (unit);
@@ -1786,20 +2307,26 @@ static int __check_other_crc (struct plc_drv_unit *unit, int first_band)
if (unit->plcp.config.vote)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (band), decoded_control);
+ __vote_replicas ((u32 *) pmd_rx_control (band),
+ decoded_control);
// then perform the scrambling
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) decoded_control /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) decoded_control /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
}
else
{
// then perform the scrambling directly from memory
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) pmd_rx_control (band) /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) pmd_rx_control (band) /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
}
if (unit->plcp.config.hamming.enable)
{
- hamming_unroll_decode ((u16 *) decoded_control, decoded_control);
+ hamming_unroll_decode ((u16 *) decoded_control,
+ decoded_control);
}
if (control_crc (ctl) == ctl->l_frm.crc)
{
@@ -1841,20 +2368,27 @@ static int __get_valid_crc (struct plc_drv_unit *unit, int first_band)
if (unit->plcp.config.vote)
{
// first perform the vote
- __vote_replicas ((u32 *) pmd_rx_control (band), decoded_control);
+ __vote_replicas ((u32 *) pmd_rx_control (band),
+ decoded_control);
// then perform the scrambling
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) decoded_control /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) decoded_control /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
}
else
{
// then perform the scrambling directly from memory
- pmd_read_band_control (decoded_control /*dst */ , (u8 *) pmd_rx_control (band) /*src */ ,
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_control (decoded_control /*dst */ ,
+ (u8 *) pmd_rx_control (band)
+ /*src */ ,
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
}
if (unit->plcp.config.hamming.enable)
{
- hamming_unroll_decode ((u16 *) decoded_control, decoded_control);
+ hamming_unroll_decode ((u16 *) decoded_control,
+ decoded_control);
}
if (control_crc (ctl) == ctl->l_frm.crc)
{
@@ -1871,7 +2405,8 @@ static int __get_valid_crc (struct plc_drv_unit *unit, int first_band)
extern int crypto_control_enable;
#endif
-static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static int __check_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
union plcp_control *control = pframe->control;
int efr;
@@ -1905,11 +2440,17 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
goto check_control;
}
#ifdef CONFIG_PLC_PPC
- if (control->l_frm.STEI == unit->localTEI)
- {
- //!
- //ppc_r2l_pend(PPCR2LREQ_PROTO_RECV, NULL);
- }
+ if (control->l_frm.STEI == unit->TEI)
+ ppc_r2l_pend (PPCR2LREQ_CONFLICT, NULL);
+
+/* for future use
+ {
+ struct ppc_mile_entry_t arg;
+ arg.req = PPCR2LREQ_CONFLICT;
+ r2l_pend(PPCR2LREQ_CONFLICT, &arg);
+ }
+*/
+
#endif
PLCP_LOG (0, "bssid", control->l_frm.bssid);
@@ -1925,12 +2466,15 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
// filter undefined bssid
}
// network diffusion. Accept also the intra-cell broadcast if not attached (beacon listenning)
- else if ((unit->attachBSSID == BSSID_UNDEF && unit->mode != ad_hoc) || control->l_frm.bssid == BSSID_ALL_BSS)
+ else if ((unit->attachBSSID == BSSID_UNDEF && unit->mode != ad_hoc) ||
+ control->l_frm.bssid == BSSID_ALL_BSS)
{
/* check terminal equipement identifier */
- if ((control->l_frm.DTEI == TEI_ALL_CELL) && (control->l_frm.channel_id < PLCP_NB_PREFIXED_CHANNEL))
+ if ((control->l_frm.DTEI == TEI_ALL_CELL) &&
+ (control->l_frm.channel_id < PLCP_NB_PREFIXED_CHANNEL))
{
- pframe->uchannel = plcp_get_uchannel_by_id (control->l_frm.channel_id);
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (control->l_frm.channel_id);
}
}
// master-slave communications
@@ -1944,7 +2488,8 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
// master-slave unicast frames
else if (control->l_frm.DTEI == unit->TEI)
{
- pframe->uchannel = plcp_get_uchannel_by_id (control->l_frm.channel_id);
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (control->l_frm.channel_id);
}
// intra-cell diffusion
else if ((control->l_frm.DTEI == TEI_ALL_CELL) // broadcast
@@ -1957,13 +2502,15 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
/* check if channel is prefixed */
if (control->l_frm.channel_id < PLCP_NB_GLOBAL_TMI)
{
- pframe->uchannel = plcp_get_uchannel_by_id (control->l_frm.channel_id);
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (control->l_frm.channel_id);
}
}
// else, frame for another slave
}
// repeater communications. Only frames from attached master are received
- else if (control->l_frm.bssid == unit->attachBSSID && control->l_frm.STEI == TEI_MASTER /* always master */ )
+ else if (control->l_frm.bssid == unit->attachBSSID &&
+ control->l_frm.STEI == TEI_MASTER /* always master */ )
{
// intra-cell diffusion concerns also the attached master
if ((control->l_frm.DTEI == TEI_ALL_CELL) // broadcast
@@ -1976,14 +2523,16 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
/* check if channel is prefixed */
if (control->l_frm.channel_id < PLCP_NB_GLOBAL_TMI)
{
- pframe->uchannel = plcp_get_uchannel_by_id (control->l_frm.channel_id);
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (control->l_frm.channel_id);
}
// unicast frames. Use the local TEI in that case.
}
else if (control->l_frm.DTEI == unit->localTEI)
{
PLCP_LOG (0, "unicast DTEI", control->l_frm.DTEI);
- pframe->uchannel = plcp_get_uchannel_by_id (control->l_frm.channel_id);
+ pframe->uchannel =
+ plcp_get_uchannel_by_id (control->l_frm.channel_id);
}
// else, frame for another slave
}
@@ -2011,7 +2560,8 @@ static int __check_control (struct plc_drv_unit *unit, struct plcp_frame *pframe
if (efr != control->l_frm.efr)
{
- PB_LOG (("Invalid efr : %d:%d for slices %d", efr, control->l_frm.efr, control->l_frm.slices));
+ PB_LOG (("Invalid efr : %d:%d for slices %d", efr,
+ control->l_frm.efr, control->l_frm.slices));
unit->stats.plcp.rx_control_bad_efr++;
PLCP_LOG (0, "bad efr", efr);
return -1;
@@ -2035,7 +2585,9 @@ static inline void __tx_end (struct plc_drv_unit *unit)
#if 0
uint32_t addr;
- addr = (((uint32_t) unit->PMD->tx_high_slice_ad) << 16) + ((uint32_t) unit->PMD->tx_low_slice_ad);
+ addr =
+ (((uint32_t) unit->PMD->tx_high_slice_ad) << 16) +
+ ((uint32_t) unit->PMD->tx_low_slice_ad);
if (addr)
{
pkt_log_add (&pmd_plog, PKT_LOG_TX, 0, (char *) addr);
@@ -2049,7 +2601,8 @@ static inline void __tx_end (struct plc_drv_unit *unit)
}
-static void __fake_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void __fake_tx_end (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
unit->stats.plcp.transmit_error++;
@@ -2059,7 +2612,9 @@ static void __fake_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
pmd_set_dsp_pilots (dsp_pilots);
// restore power on pilots
+#ifndef CONFIG_VERSION_16M
plcp_restore_pilots ();
+#endif
if (plcp_callbacks_fn->tx_status)
{
plcp_callbacks_fn->tx_status (unit, pframe);
@@ -2069,14 +2624,15 @@ static void __fake_tx_end (struct plc_drv_unit *unit, struct plcp_frame *pframe)
/* returns the minimum max_corr value for a good synchro */
/* the formula was built empiricaly, using lab measures */
-static inline uint16_t __max_corr_fn (struct plc_drv_unit *unit, uint16_t min_corr)
+static inline uint16_t __max_corr_fn (struct plc_drv_unit *unit,
+ uint16_t min_corr)
{
#ifdef CONFIG_PLC_MEASURES
if (unit->plcp.config.max_corr_fn)
{
- return (unit->plcp.config.max_corr_mul * min_corr) / unit->plcp.config.max_corr_div +
- unit->plcp.config.max_corr_b;
+ return (unit->plcp.config.max_corr_mul * min_corr) /
+ unit->plcp.config.max_corr_div + unit->plcp.config.max_corr_b;
}
else
{
@@ -2122,8 +2678,12 @@ static INLINE void __get_dsp_corr (struct plc_drv_unit *unit)
unit->stats.plcp.min_corr[band] = min_corr;
unit->stats.plcp.max_corr[band] = max_corr;
#ifdef CONFIG_PLC_MEASURES
- unit->stats.plcp.min_corr_avg[band] = ((n - 1) * unit->stats.plcp.min_corr_avg[band] + (int) min_corr) / n;
- unit->stats.plcp.max_corr_avg[band] = ((n - 1) * unit->stats.plcp.max_corr_avg[band] + (int) max_corr) / n;
+ unit->stats.plcp.min_corr_avg[band] =
+ ((n - 1) * unit->stats.plcp.min_corr_avg[band] +
+ (int) min_corr) / n;
+ unit->stats.plcp.max_corr_avg[band] =
+ ((n - 1) * unit->stats.plcp.max_corr_avg[band] +
+ (int) max_corr) / n;
#endif
if ((max_corr >= unit->plcp.config.max_corr_thr) &&
@@ -2149,7 +2709,8 @@ int plcp_sprintf_dsp_corr (struct plc_drv_unit *unit, char *buf)
p += sprintf (p, "no correlation collected yet.\n");
return 0;
}
- p += sprintf (p, "band\tdetect\tstart\tcorr\tcand\telect\tmin_corr max_corr max/min\n");
+ p += sprintf (p,
+ "band\tdetect\tstart\tcorr\tcand\telect\tmin_corr max_corr max/min\n");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
@@ -2162,7 +2723,8 @@ int plcp_sprintf_dsp_corr (struct plc_drv_unit *unit, char *buf)
((1 << band) & plcp_eligible_bands) ? '+' : '-',
unit->stats.plcp.min_corr[band],
unit->stats.plcp.max_corr[band],
- (float) unit->stats.plcp.max_corr[band] / (float) unit->stats.plcp.min_corr[band]);
+ (float) unit->stats.plcp.max_corr[band] /
+ (float) unit->stats.plcp.min_corr[band]);
p += sprintf (p, "\n");
}
p += sprintf (p, "average (%d samples)\n", unit->stats.plcp.corr_samples);
@@ -2173,7 +2735,8 @@ int plcp_sprintf_dsp_corr (struct plc_drv_unit *unit, char *buf)
band,
unit->stats.plcp.min_corr_avg[band],
unit->stats.plcp.max_corr_avg[band],
- (float) unit->stats.plcp.max_corr_avg[band] / (float) unit->stats.plcp.min_corr_avg[band]);
+ (float) unit->stats.plcp.max_corr_avg[band] /
+ (float) unit->stats.plcp.min_corr_avg[band]);
}
return (p - buf);
}
@@ -2191,7 +2754,8 @@ static inline char __trend (int band, int valid, int invalid)
}
}
-int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_control_stats (char *buf, char **start, off_t offset,
+ int count, int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -2207,16 +2771,20 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
{
p += sprintf (p, "\nWITH ENTROPY\n");
}
- p += sprintf (p, " \t \t \t \t \t \tvalid\tinvalid\t \n");
- p += sprintf (p, "band\tdetect\tstarted\tcorr\tcand\teligble\t crc \t crc \ttotal\n");
+ p += sprintf (p,
+ " \t \t \t \t \t \tvalid\tinvalid\t \n");
+ p += sprintf (p,
+ "band\tdetect\tstarted\tcorr\tcand\teligble\t crc \t crc \ttotal\n");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
if (band_is_used (unit, band))
{
p += sprintf (p, "%d %c %c\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
band,
- __trend (band, plcp_valid_corr[band], plcp_invalid_corr[band]),
- __trend (band, plcp_valid_crc[band], plcp_invalid_crc[band]),
+ __trend (band, plcp_valid_corr[band],
+ plcp_invalid_corr[band]),
+ __trend (band, plcp_valid_crc[band],
+ plcp_invalid_crc[band]),
unit->stats.plcp.detect[band],
unit->stats.plcp.started[band],
unit->stats.plcp.corr[band],
@@ -2224,7 +2792,8 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
unit->stats.plcp.eligible[band],
unit->stats.plcp.valid_crc[band],
unit->stats.plcp.invalid_crc[band],
- unit->stats.plcp.valid_crc[band] + unit->stats.plcp.invalid_crc[band]);
+ unit->stats.plcp.valid_crc[band] +
+ unit->stats.plcp.invalid_crc[band]);
}
}
if (unit->plcp.config.hamming.entropy.enable)
@@ -2233,13 +2802,15 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
p += sprintf (p, "entropy\trx ctrl\trx ctrl\n");
p += sprintf (p, "%d\t%d\t%d\n",
unit->stats.plcp.invalid_entropy[1],
- unit->stats.plcp.rx_valid_control, unit->stats.plcp.rx_control_bad_crc);
+ unit->stats.plcp.rx_valid_control,
+ unit->stats.plcp.rx_control_bad_crc);
}
else
{
p += sprintf (p, " valid \tinvalid\n");
p += sprintf (p, "rx ctrl\trx ctrl\n");
- p += sprintf (p, "%d\t%d\n", unit->stats.plcp.rx_valid_control, unit->stats.plcp.rx_control_bad_crc);
+ p += sprintf (p, "%d\t%d\n", unit->stats.plcp.rx_valid_control,
+ unit->stats.plcp.rx_control_bad_crc);
}
}
else
@@ -2257,15 +2828,19 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
if (unit->plcp.config.hamming.entropy.enable)
{
p += sprintf (p, "\nWITH ENTROPY\n");
- p += sprintf (p, "valid\tinvalid\t valid \tinvalid\t crc \t \n");
- p += sprintf (p, " crc \t crc \tcontrol\tentropy\ttotal\ttotal\n");
+ p += sprintf (p,
+ "valid\tinvalid\t valid \tinvalid\t crc \t \n");
+ p += sprintf (p,
+ " crc \t crc \tcontrol\tentropy\ttotal\ttotal\n");
p += sprintf (p, "%d\t%d\t%d\t%d\t%d\t%d\n",
unit->stats.plcp.valid_crc[1],
unit->stats.plcp.invalid_crc[1],
unit->stats.plcp.valid_control[1],
unit->stats.plcp.invalid_entropy[1],
- unit->stats.plcp.valid_crc[1] + unit->stats.plcp.invalid_crc[1],
- unit->stats.plcp.valid_crc[1] + unit->stats.plcp.invalid_crc[1] +
+ unit->stats.plcp.valid_crc[1] +
+ unit->stats.plcp.invalid_crc[1],
+ unit->stats.plcp.valid_crc[1] +
+ unit->stats.plcp.invalid_crc[1] +
unit->stats.plcp.invalid_entropy[1]);
}
else
@@ -2285,12 +2860,14 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
unit->stats.plcp.valid_crc[band],
unit->stats.plcp.invalid_crc[band],
unit->stats.plcp.valid_control[band],
- unit->stats.plcp.valid_crc[band] + unit->stats.plcp.invalid_crc[band]);
+ unit->stats.plcp.valid_crc[band] +
+ unit->stats.plcp.invalid_crc[band]);
}
}
}
}
- if ((unit->plcp.config.hamming.all_hamming) && (!unit->plcp.config.hamming.entropy.enable))
+ if ((unit->plcp.config.hamming.all_hamming) &&
+ (!unit->plcp.config.hamming.entropy.enable))
{
p += sprintf (p, "\nAFTER ALL HAMMING\n");
p += sprintf (p, " \tvalid\tinvalid\t valid \t \n");
@@ -2304,7 +2881,8 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
unit->stats.plcp.valid_crc_all_hamm[band],
unit->stats.plcp.invalid_crc_all_hamm[band],
unit->stats.plcp.valid_control_all_hamm[band],
- unit->stats.plcp.valid_crc_all_hamm[band] + unit->stats.plcp.invalid_crc_all_hamm[band]);
+ unit->stats.plcp.valid_crc_all_hamm[band] +
+ unit->stats.plcp.invalid_crc_all_hamm[band]);
}
}
}
@@ -2322,12 +2900,15 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
}
p += sprintf (p, "\n");
- p += sprintf (p, "valid control when no candidate = %d\n", unit->stats.plcp.rx_valid_control_no_candidate);
- p += sprintf (p, "invalid control when no candidate = %d\n", unit->stats.plcp.rx_invalid_control_no_candidate);
+ p += sprintf (p, "valid control when no candidate = %d\n",
+ unit->stats.plcp.rx_valid_control_no_candidate);
+ p += sprintf (p, "invalid control when no candidate = %d\n",
+ unit->stats.plcp.rx_invalid_control_no_candidate);
p += sprintf (p, "valid and invalid slices\n");
p += sprintf (p, " \twith candidates\t\t\t\twithout candidates\n");
- p += sprintf (p, "band\tsync\tvalid\tinvalid\tdropped\tsync\tvalid\tinvalid\tdropped\n");
+ p += sprintf (p,
+ "band\tsync\tvalid\tinvalid\tdropped\tsync\tvalid\tinvalid\tdropped\n");
for (band = 1; band < PMD_MAX_BANDS; band++)
{
if (band_is_used (unit, band))
@@ -2353,7 +2934,8 @@ int proc_r_plcp_control_stats (char *buf, char **start, off_t offset, int count,
p += sprintf (p, "%d\t%d\t%d\t%d\t%d\t%d\n",
band,
plcp_valid_corr[band],
- plcp_invalid_corr[band], plcp_valid_crc[band], plcp_invalid_crc[band], plcp_avg_crc[band]);
+ plcp_invalid_corr[band], plcp_valid_crc[band],
+ plcp_invalid_crc[band], plcp_avg_crc[band]);
}
}
#endif
@@ -2413,7 +2995,9 @@ static int __p_busy (struct plc_drv_unit *unit, uint16_t date)
{
__set_state (unit, PLCP_STATE_RX_DATA);
rxstart_isr_date = date;
- tmo = busy_isr_date + plcp_rx_frame->control->l_frm.efr + PLCP_FEC_LATENCY;
+ tmo =
+ busy_isr_date + plcp_rx_frame->control->l_frm.efr +
+ PLCP_FEC_LATENCY;
unit->PMD->eof_irq_mask = 0;
}
else
@@ -2446,7 +3030,8 @@ static void __p_drop (struct plc_drv_unit *unit, uint16_t target_date)
__set_state (unit, PLCP_STATE_IDLE);
}
-static void __fake_rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe)
+static void __fake_rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe)
{
PB_ZERO (&pframe->pb_mask);
@@ -2476,7 +3061,9 @@ static void __idle (struct plc_drv_unit *unit)
pmd_set_dsp_pilots (dsp_pilots);
// restore power on pilots and all bands
+#ifndef CONFIG_VERSION_16M
plcp_restore_pilots ();
+#endif
plcp_data_power (0);
// CHRIS: eog is controlled on drop, and on phy_cca_request
@@ -2488,7 +3075,8 @@ static void __idle (struct plc_drv_unit *unit)
/* prepare number of words for control */
unit->PMD->rx_control_nb_words = unit->control_len / 2;
- unit->PMD->rx_control_nb_symbols = unit->control_symbols - 1 /*due to phlic counter */ ;
+ unit->PMD->rx_control_nb_symbols =
+ unit->control_symbols - 1 /*due to phlic counter */ ;
pmd_cancel_timer1 (unit->id);
@@ -2503,14 +3091,16 @@ static void __idle (struct plc_drv_unit *unit)
/* ----------------------------------------------------- STATE MACHINE */
-static void __early_write_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void __early_write_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
union plcp_control *control;
control = pframe->control;
/* this informations are reserved for mac layer sub-entities */
control->l_frm.slices = pframe->pb_count;
- control->l_frm.efr = fm->efr (unit, pframe->uchannel, control->l_frm.slices);
+ control->l_frm.efr =
+ fm->efr (unit, pframe->uchannel, control->l_frm.slices);
control->l_frm.crc = control_crc (control);
RT_PRINTM (TRACE_PLCP, TRACE_DEBUG,
@@ -2519,32 +3109,40 @@ static void __early_write_control (struct plc_drv_unit *unit, struct plcp_frame
control->l_frm.bssid,
control->l_frm.channel_id,
control->l_frm.slices,
- pframe->uchannel->lookup.payload_slots[pframe->control->l_frm.slices], control->l_frm.efr);
+ pframe->uchannel->lookup.payload_slots[pframe->control->l_frm.
+ slices],
+ control->l_frm.efr);
/* FIX: do not reduce waits if d_len==0 cause we have drops on the
* receive side cause IF_FRAME is not finished when a second busy can occur.*/
- unit->PMD->tx_nb_wait_ose = unit->plcp.config.nb_wait_control * unit->nb_bands;
+ unit->PMD->tx_nb_wait_ose =
+ unit->plcp.config.nb_wait_control * unit->nb_bands;
if (unit->plcp.config.hamming.enable)
{
/* encode pframe control into encoded_control buffer */
- hamming_encode ((unsigned char *) pframe->control, (unsigned char *) encoded_control, ENCODED_CONTROL_SIZE);
+ hamming_encode ((unsigned char *) pframe->control,
+ (unsigned char *) encoded_control,
+ ENCODED_CONTROL_SIZE);
/* write 18 bytes of control words */
pmd_write_control ((int) pmd_tx_control (1), (int) encoded_control,
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ (int) (&xor_mask[unit->plcp.config.scramble_new]
+ [1]));
}
else
{
pmd_write_control ((int) pmd_tx_control (1), (int) (pframe->control),
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ (int) (&xor_mask[unit->plcp.config.scramble_new]
+ [1]));
}
}
#if defined(__KERNEL__) && defined(CONFIG_PLC_CRYPTO)
static union plcp_control control_enc;
#endif
-static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void __write_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
union plcp_control *control;
@@ -2590,10 +3188,16 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
if (control->ff)
{
// long frame format
- control->l_frm.slices = pframe->uchannel->ops->tx_start (unit, pframe);
- control->l_frm.efr = fm->efr (unit, pframe->uchannel, control->l_frm.slices);
+ control->l_frm.slices =
+ pframe->uchannel->ops->tx_start (unit, pframe);
+ control->l_frm.efr =
+ fm->efr (unit, pframe->uchannel, control->l_frm.slices);
#ifdef CONFIG_PLC_PPC
- if (control->l_frm.type == MA_TYPE_MANAGEMENT && control->l_frm.subtype == MA_SUBTYPE_PEPSI)
+ /* l_frm.STEI must be set to TEI of the unit to avoid deleting host on the other
+ * devices in case of changing TEI. */
+ control->l_frm.STEI = unit->TEI;
+ if (control->l_frm.type == MA_TYPE_MANAGEMENT &&
+ control->l_frm.subtype == MA_SUBTYPE_PEPSI)
{
union plcp_control *ctrl;
struct plcp_frame foo;
@@ -2623,14 +3227,15 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
}
#endif
- PB_LOG (("write_control of %d slices for efr %d", control->l_frm.slices, control->l_frm.efr));
+ PB_LOG (("write_control of %d slices for efr %d",
+ control->l_frm.slices, control->l_frm.efr));
RT_PRINTM (TRACE_PLCP, TRACE_DEBUG,
"send: TEI=%d BSSID=%d cid=%d slices=%d (%d slots) efr=%d\n",
- control->l_frm.DTEI,
- control->l_frm.bssid,
- control->l_frm.channel_id,
- control->l_frm.slices,
- pframe->uchannel->lookup.payload_slots[pframe->control->l_frm.slices], control->l_frm.efr);
+ control->l_frm.DTEI, control->l_frm.bssid,
+ control->l_frm.channel_id, control->l_frm.slices,
+ pframe->uchannel->lookup.payload_slots[pframe->control->
+ l_frm.slices],
+ control->l_frm.efr);
#if defined(__KERNEL__) && defined(CONFIG_PLC_CRYPTO)
if (pframe)
@@ -2650,7 +3255,8 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
#ifdef CONFIG_PLC_PPC
if (use_pepsi_ctrl)
{
- get_pepsi_ctrl_buff ()->l_frm.crc = control_crc (get_pepsi_ctrl_buff ());
+ get_pepsi_ctrl_buff ()->l_frm.crc =
+ control_crc (get_pepsi_ctrl_buff ());
if (unit->plcp.config.reeds)
rs_encode ((char *) get_pepsi_ctrl_buff ());
}
@@ -2664,7 +3270,8 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
#ifdef CONFIG_PLC_PPC
if (use_pepsi_ctrl)
{
- get_pepsi_ctrl_buff ()->l_frm.crc = control_crc (get_pepsi_ctrl_buff ());
+ get_pepsi_ctrl_buff ()->l_frm.crc =
+ control_crc (get_pepsi_ctrl_buff ());
if (unit->plcp.config.reeds)
rs_encode ((char *) get_pepsi_ctrl_buff ());
}
@@ -2700,7 +3307,9 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
/* FIX: do not reduce waits if d_len==0 cause we have drops on the
* receive side cause IF_FRAME is not finished when a second busy can occur.*/
- unit->PMD->tx_nb_wait_ose = (unit->plcp.config.nb_wait_control - unit->plcp.config.tx_more_slots) * unit->nb_bands;
+ unit->PMD->tx_nb_wait_ose =
+ (unit->plcp.config.nb_wait_control -
+ unit->plcp.config.tx_more_slots) * unit->nb_bands;
if (likely (unit->plcp.config.hamming.enable))
{
@@ -2708,25 +3317,30 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
#if defined(__KERNEL__) && defined(CONFIG_PLC_CRYPTO)
if (etat_crypto)
{
- hamming_unroll_encode ((unsigned char *) encoded_control, (u32 *) & control_enc);
+ hamming_unroll_encode ((unsigned char *) encoded_control,
+ (u32 *) & control_enc);
}
else
{
- hamming_unroll_encode ((unsigned char *) encoded_control, (u32 *) pframe->control);
+ hamming_unroll_encode ((unsigned char *) encoded_control,
+ (u32 *) pframe->control);
}
#else
#ifdef CONFIG_PLC_PPC
if (use_pepsi_ctrl)
- hamming_unroll_encode ((unsigned char *) encoded_control, (u32 *) get_pepsi_ctrl_buff ());
+ hamming_unroll_encode ((unsigned char *) encoded_control,
+ (u32 *) get_pepsi_ctrl_buff ());
else
#endif
- hamming_unroll_encode ((unsigned char *) encoded_control, (u32 *) pframe->control);
+ hamming_unroll_encode ((unsigned char *) encoded_control,
+ (u32 *) pframe->control);
#endif
/* write 18 bytes of control words */
pmd_write_control ((int) pmd_tx_control (1), (int) encoded_control,
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ (int) (&xor_mask[unit->plcp.config.scramble_new]
+ [1]));
}
else
{
@@ -2734,21 +3348,26 @@ static void __write_control (struct plc_drv_unit *unit, struct plcp_frame *pfram
if (etat_crypto)
{
pmd_write_control ((int) pmd_tx_control (1), (int) (&control_enc),
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ (int) (&xor_mask
+ [unit->plcp.config.scramble_new][1]));
}
else
{
- pmd_write_control ((int) pmd_tx_control (1), (int) (pframe->control),
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ pmd_write_control ((int) pmd_tx_control (1),
+ (int) (pframe->control),
+ (int) (&xor_mask
+ [unit->plcp.config.scramble_new][1]));
}
#else
pmd_write_control ((int) pmd_tx_control (1), (int) (pframe->control),
- (int) (&xor_mask[unit->plcp.config.scramble_new][1]));
+ (int) (&xor_mask[unit->plcp.config.scramble_new]
+ [1]));
#endif
}
}
-static void __p_write_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+static void __p_write_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
union plcp_control *control;
int d_len;
@@ -2771,21 +3390,25 @@ static void __p_write_control (struct plc_drv_unit *unit, struct plcp_frame *pfr
control->l_frm.slices = (d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
//control->l_frm.dlen = (uint8_t)(d_len - control->l_frm.slices*PMD_SLICE_SIZE);
- control->l_frm.efr = fm->efr (unit, pframe->uchannel, control->l_frm.slices);
+ control->l_frm.efr =
+ fm->efr (unit, pframe->uchannel, control->l_frm.slices);
control->l_frm.crc = control_crc (control);
RT_PRINTM (TRACE_PLCP, TRACE_DEBUG,
"send: cid=%d slices=%d (%d slots) efr=%d\n",
control->l_frm.channel_id,
control->l_frm.slices,
- pframe->uchannel->lookup.payload_slots[pframe->control->l_frm.slices], control->l_frm.efr);
+ pframe->uchannel->lookup.payload_slots[pframe->control->l_frm.
+ slices],
+ control->l_frm.efr);
memcpy (pframe->d_buf, pframe->control, sizeof (union plcp_control));
}
-static int __tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint16_t date)
+static int __tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ uint16_t date)
{
int status;
@@ -2814,7 +3437,8 @@ static int __tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe, uin
return 0;
}
-static int __early_tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint16_t date)
+static int __early_tx_start (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, uint16_t date)
{
int status;
@@ -2838,17 +3462,21 @@ static int __early_tx_start (struct plc_drv_unit *unit, struct plcp_frame *pfram
return 0;
}
-static int __spy_tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint16_t date)
+static int __spy_tx_start (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, uint16_t date)
{
pmd_force_tx_loop_done (pframe->d_len == 0);
unit->PMD->tx_control_nb_words = unit->control_len / 2;
- unit->PMD->tx_control_nb_symbols = unit->control_symbols + (unit->plcp.config.tx_more_slots * unit->nb_bands);
+ unit->PMD->tx_control_nb_symbols =
+ unit->control_symbols +
+ (unit->plcp.config.tx_more_slots * unit->nb_bands);
return __tx_start (unit, pframe, date);
}
-static int __p_tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint16_t date)
+static int __p_tx_start (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ uint16_t date)
{
pframe->uchannel = plcp_get_uchannel_by_id (unit->plcp.config.p_cid);
@@ -2875,7 +3503,8 @@ static void __test_adapt (struct plc_drv_unit *unit, uint16_t target_date)
int c = PMD_V1_BAND_ADAPTS_OFFSET * PMD_MAX_BANDS;
// keep the same robustness for robust modes
- if (plcp_tx_frame->uchannel == uchannel_chunk || plcp_tx_frame->uchannel == uchannel_rbpsk)
+ if (plcp_tx_frame->uchannel == uchannel_chunk ||
+ plcp_tx_frame->uchannel == uchannel_rbpsk)
return;
if (plcp_tx_frame && plcp_tx_frame->d_len > 0)
@@ -2890,12 +3519,15 @@ static void __test_adapt (struct plc_drv_unit *unit, uint16_t target_date)
/*for(band=1;band<PMD_MAX_BANDS;band++)
* for(carrier=0;carrier<PMD_CARRIERS_PER_BAND;carrier++)
* pmd_set_adapt(band, carrier, pframe->host->mapA->tead[band-1][carrier]); */
- for (band = PMD_V1_BAND_ADAPTS_OFFSET; band < c; band += PMD_V1_BAND_ADAPTS_OFFSET)
+ for (band = PMD_V1_BAND_ADAPTS_OFFSET; band < c;
+ band += PMD_V1_BAND_ADAPTS_OFFSET)
{
- register uint16_t *z = (uint16_t *) (PMD_ADAPT_REGBASE + band);
+ register uint16_t *z =
+ (uint16_t *) (PMD_ADAPT_REGBASE + band);
register int carrier;
- for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND; carrier++)
+ for (carrier = 0; carrier < PMD_CARRIERS_PER_BAND;
+ carrier++)
*(z++) = *(t++);
}
changed_default__adapts = 1;
@@ -2924,7 +3556,8 @@ static void __return_adapt (struct plc_drv_unit *unit, uint16_t target_date)
{
//pmd_restore_adapts(); // adapt[] => PHLIC
- for (band = PMD_V1_BAND_ADAPTS_OFFSET; band < c; band += PMD_V1_BAND_ADAPTS_OFFSET)
+ for (band = PMD_V1_BAND_ADAPTS_OFFSET; band < c;
+ band += PMD_V1_BAND_ADAPTS_OFFSET)
{
register uint16_t *z = (uint16_t *) (PMD_ADAPT_REGBASE + band);
register int carrier;
@@ -2962,7 +3595,9 @@ static int __tx_more (struct plc_drv_unit *unit, uint16_t date)
// special behaviour for PLCP_CID_NONE, let the pilots.
if (pframe->uchannel->index > 0)
{
+#ifndef CONFIG_VERSION_16M
plcp_update_pilots (unit, pframe->uchannel);
+#endif
}
PLCP_VERBOSE (0, "data gain", pframe->data_gain);
@@ -2975,7 +3610,8 @@ static int __tx_more (struct plc_drv_unit *unit, uint16_t date)
return 0;
}
-static inline void __rx_start_set_date (struct plc_drv_unit *unit, uint16_t date)
+static inline void __rx_start_set_date (struct plc_drv_unit *unit,
+ uint16_t date)
{
rxstart_isr_date = date;
/* calculate idle date of the medium */
@@ -2983,7 +3619,8 @@ static inline void __rx_start_set_date (struct plc_drv_unit *unit, uint16_t date
unit->stats.plcp.rx_start_isr++;
}
-static inline struct plcp_frame *__rx_start_get_frame (struct plc_drv_unit *unit, uint16_t date)
+static inline struct plcp_frame *__rx_start_get_frame (struct plc_drv_unit
+ *unit, uint16_t date)
{
if (!plcp_rx_frame)
{
@@ -3032,7 +3669,8 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
/* choice on control words encoding */
if (unit->plcp.config.vote)
{
- first_band = __read_triple_control (unit, plcp_rx_frame, plcp_started_bands);
+ first_band =
+ __read_triple_control (unit, plcp_rx_frame, plcp_started_bands);
}
else
{
@@ -3040,7 +3678,8 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
}
if (first_band < 0)
{
- PLCP_LOG (rxstart_isr_date, "no valid control found status", first_band);
+ PLCP_LOG (rxstart_isr_date, "no valid control found status",
+ first_band);
return first_band; /* -ECRC or -ECHECK */
}
PLCP_LOG (rxstart_isr_date, "rx_start first valid band", first_band);
@@ -3048,8 +3687,10 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
// the following stats have no meaning for short frame format...
if (control->ff)
{
- PLCP_LOG (rxstart_isr_date, "rx_start channel_id", plcp_rx_frame->control->l_frm.channel_id);
- PLCP_LOG (rxstart_isr_date, "rx_start TEI", plcp_rx_frame->control->l_frm.DTEI);
+ PLCP_LOG (rxstart_isr_date, "rx_start channel_id",
+ plcp_rx_frame->control->l_frm.channel_id);
+ PLCP_LOG (rxstart_isr_date, "rx_start TEI",
+ plcp_rx_frame->control->l_frm.DTEI);
#ifdef CONFIG_PLC_MEASURES
plcp_register_agc (plcp_rx_frame);
@@ -3066,8 +3707,10 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
{
// copy all control for futur analyse in function plcp_ber_control()
- pmd_read_band_replicas (buffer_compare[band], (u8 *) pmd_rx_control (band),
- xor_mask[unit->plcp.config.scramble_new][band]);
+ pmd_read_band_replicas (buffer_compare[band],
+ (u8 *) pmd_rx_control (band),
+ xor_mask[unit->plcp.config.
+ scramble_new][band]);
memcpy (buffer_ref, control, sizeof (union plcp_control));
}
@@ -3078,7 +3721,8 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
// in spy mode, the efr are extended to get the agc at the end of the data.
if (unit->plcp.config.fmode == PLCP_FMODE_SCAP)
- plcp_set_efr (unit, plcp_rx_frame->control->l_frm.efr + plcp_data_efr);
+ plcp_set_efr (unit,
+ plcp_rx_frame->control->l_frm.efr + plcp_data_efr);
else
plcp_set_efr (unit, control->l_frm.efr + 1); // LISA BB request for autospy = CAP for polux
#ifdef CONFIG_PLC_MEASURES
@@ -3087,7 +3731,9 @@ static int __gen_rx_start (struct plc_drv_unit *unit, uint16_t date)
}
else
{
- plcp_set_efr (unit, fm->efr (unit, plcp_rx_frame->uchannel, 0 /*slices */ ));
+ plcp_set_efr (unit,
+ fm->efr (unit, plcp_rx_frame->uchannel,
+ 0 /*slices */ ));
}
//dcache_invalidate(plcp_rx_frame->d_buf, plcp_rx_frame->d_len);
@@ -3118,11 +3764,13 @@ static int __cap_rx_start (struct plc_drv_unit *unit, uint16_t date)
return first_band;
}
- plcp_eligible_bands = plcp_candidate_bands & ~plcp_rx_frame->uchannel->unused_bands;
+ plcp_eligible_bands =
+ plcp_candidate_bands & ~plcp_rx_frame->uchannel->unused_bands;
PLCP_LOG (date, "eligible bands", plcp_eligible_bands);
__update_election_stats (unit);
- channel_bands = plcp_started_bands & ~plcp_rx_frame->uchannel->unused_bands;
+ channel_bands =
+ plcp_started_bands & ~plcp_rx_frame->uchannel->unused_bands;
channel_nb_bands = byte_ones ((u8) channel_bands);
//channel_bands = unit->used_bands & ~plcp_rx_frame->uchannel->unused_bands;
PLCP_VERBOSE (rxstart_isr_date, "channel_bands", channel_bands);
@@ -3157,7 +3805,8 @@ int DET_staticDetectBands = 0; // force the detection bands by hand
int DET_falseStartMax = 50; // nombre de faux start qui deviennent significatif
int DET_falseStartMin = 5; // nombre de faux start max par seconde
int DET_detectLevel[PMD_MAX_BANDS] =
- { DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT };
+ { DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT, DETECT_INIT,
+DETECT_INIT, DETECT_INIT, DETECT_INIT };
int DET_levelFromUnusable = -19;
int DET_levelFromUsable = 27;
int DET_usableMove = 1;
@@ -3321,7 +3970,8 @@ void __spy_tmo_detect (void *arg1, void *arg2)
{
*(uint16_t *) DSP_CHMR_ADDR = plcp_detect_bands;
}
- hal_start_timer (&detect_timer, DET_timeout, __spy_tmo_detect, unit, NULL);
+ hal_start_timer (&detect_timer, DET_timeout, __spy_tmo_detect, unit,
+ NULL);
}
/*-------- correlation module ------*/
@@ -3336,20 +3986,24 @@ int CORR_criteria (int min_corr, int max_corr)
{
if (!CORR_enabled)
return 1;
- if (max_corr > CORR_maxCorr && (max_corr > (CORR_coefDir * min_corr + CORR_coefCte)))
+ if (max_corr > CORR_maxCorr &&
+ (max_corr > (CORR_coefDir * min_corr + CORR_coefCte)))
return 1;
return 0;
}
-void CORR_average (struct plcp_host *host, int band, int min_corr, int max_corr)
+void CORR_average (struct plcp_host *host, int band, int min_corr,
+ int max_corr)
{
// moyenne mobile sur toutes les bandes
if (host->corrNb < 100)
{
host->corrNb++;
}
- host->minCorr[band] = (host->minCorr[band] * (host->corrNb - 1) + min_corr) / host->corrNb;
- host->maxCorr[band] = (host->maxCorr[band] * (host->corrNb - 1) + max_corr) / host->corrNb;
+ host->minCorr[band] =
+ (host->minCorr[band] * (host->corrNb - 1) + min_corr) / host->corrNb;
+ host->maxCorr[band] =
+ (host->maxCorr[band] * (host->corrNb - 1) + max_corr) / host->corrNb;
}
@@ -3410,7 +4064,8 @@ void SYN_update (struct plcp_host *host)
firstUsable = 0;
for (band = PMD_MAX_BANDS - 1; band > 0; band--)
{
- if (DET_isUsableBand (band) > 0 && ((1 << band) & unit->used_bands))
+ if (DET_isUsableBand (band) > 0 &&
+ ((1 << band) & unit->used_bands))
{ /* usable only in used bands */
firstUsable = band;
if (host->synchroEnabled[band])
@@ -3553,11 +4208,16 @@ static int __spy_rx_start (struct plc_drv_unit *unit, uint16_t date)
// - chunk or robust frame: we use eligible bands (bands selected from previous control)
// - sound frame: we use host->syncband
// - data frame: we use uchannel->syncband (a copy of host->syncband during the ce process)
- plcp_candidate_bands = unit->used_bands & plcp_started_bands & plcp_corr_bands;
+ plcp_candidate_bands =
+ unit->used_bands & plcp_started_bands & plcp_corr_bands;
if (plcp_rx_frame->uchannel->robust)
{
- host = plcp_get_host_by_tei (plcp_rx_frame->control->l_frm.STEI, plcp_rx_frame->control->l_frm.bssid);
- if (host && is_channel_estimation_measure (plcp_rx_frame->control->l_frm.subtype))
+ host =
+ plcp_get_host_by_tei (plcp_rx_frame->control->l_frm.STEI,
+ plcp_rx_frame->control->l_frm.bssid);
+ if (host &&
+ is_channel_estimation_measure (plcp_rx_frame->control->l_frm.
+ subtype))
{
first_eligible = host->syncBand;
}
@@ -3589,19 +4249,24 @@ static int __spy_rx_start (struct plc_drv_unit *unit, uint16_t date)
pmd_link_dsp_bands (plcp_rx_frame->rx_bands);
- plcp_rx_frame->nb_rx_bands = pmd_link_phlic_bands (plcp_rx_frame->rx_bands);
+ plcp_rx_frame->nb_rx_bands =
+ pmd_link_phlic_bands (plcp_rx_frame->rx_bands);
*(uint16_t *) DSP_CHMR_ADDR = plcp_rx_frame->rx_bands;
PLCP_LOG (rxstart_isr_date, "rx_bands", plcp_rx_frame->rx_bands);
PLCP_LOG (rxstart_isr_date, "nb_rx_bands", plcp_rx_frame->nb_rx_bands);
- plcp_set_rx_nb_bands (unit, plcp_rx_frame->nb_rx_bands, plcp_rx_frame->nb_rx_bands);
+ plcp_set_rx_nb_bands (unit, plcp_rx_frame->nb_rx_bands,
+ plcp_rx_frame->nb_rx_bands);
// special extension for power management. periodic reference must be avoided otherwise the spectrum is
// calculated on noise cause efr has been extended to get the agc
if ((plcp_rx_frame->control->l_frm.subtype == MA_SUBTYPE_POWER_REQUEST) ||
- (plcp_rx_frame->control->l_frm.subtype == MA_SUBTYPE_POWER_INV_REQUEST))
- plcp_set_periodic_ref (unit, 200 /*ref_interval */ , 1 /*nb_ref */ , 7 /*nb_rx_bands */ );
+ (plcp_rx_frame->control->l_frm.subtype ==
+ MA_SUBTYPE_POWER_INV_REQUEST))
+ plcp_set_periodic_ref (unit, 200 /*ref_interval */ , 1 /*nb_ref */ ,
+ 7 /*nb_rx_bands */ );
else
- plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref,
+ plcp_set_periodic_ref (unit, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref,
plcp_rx_frame->nb_rx_bands);
/* drop on busy event is cancelled */
@@ -3624,7 +4289,8 @@ static int __spy_rx_start (struct plc_drv_unit *unit, uint16_t date)
/* use agc_goal1 for POWER REQUEST1; if we are in spy mode only, cause data power can be different */
pmd_set_agc_goal (unit->ce.agc_goal1);
}
- else if (plcp_rx_frame->control->l_frm.subtype == MA_SUBTYPE_POWER_INV_REQUEST)
+ else if (plcp_rx_frame->control->l_frm.subtype ==
+ MA_SUBTYPE_POWER_INV_REQUEST)
{
/* use agc_goal2 for POWER REQUEST2; if we are in spy mode only, cause data power can be different */
pmd_set_agc_goal (unit->ce.agc_goal2);
@@ -3680,7 +4346,9 @@ static void __cap_check_more (struct plc_drv_unit *unit)
}
/* rx_eof not part of EFR */
- tmo = busy_isr_date + plcp_rx_frame->control->l_frm.efr + PLCP_FEC_LATENCY;
+ tmo =
+ busy_isr_date + plcp_rx_frame->control->l_frm.efr +
+ PLCP_FEC_LATENCY;
pmd_request_timer1 (unit->id, tmo);
PLCP_LOG (0, "busy_date", busy_isr_date);
@@ -3694,16 +4362,19 @@ static void __cap_check_more (struct plc_drv_unit *unit)
(plcp_rx_frame->control->l_frm.subtype == MA_SUBTYPE_TEST_BER))
{
#if 0
- printk ("plcp_rx_frame=%p type=%s subtype=%s (%d) stei=%x dtei=%x cid=%d\n",
- plcp_rx_frame,
- ma_type_name[plcp_rx_frame->control->l_frm.type],
- ma_subtype_name[plcp_rx_frame->control->l_frm.subtype],
- plcp_rx_frame->control->l_frm.subtype,
- plcp_rx_frame->control->l_frm.STEI,
- plcp_rx_frame->control->l_frm.DTEI, plcp_rx_frame->control->l_frm.channel_id);
+ printk
+ ("plcp_rx_frame=%p type=%s subtype=%s (%d) stei=%x dtei=%x cid=%d\n",
+ plcp_rx_frame,
+ ma_type_name[plcp_rx_frame->control->l_frm.type],
+ ma_subtype_name[plcp_rx_frame->control->l_frm.subtype],
+ plcp_rx_frame->control->l_frm.subtype,
+ plcp_rx_frame->control->l_frm.STEI,
+ plcp_rx_frame->control->l_frm.DTEI,
+ plcp_rx_frame->control->l_frm.channel_id);
#endif
sampler_run (fft_gain_sampler, PMD_MAX_BANDS *
- (plcp_rx_frame->control->l_frm.efr - unit->plcp.config.nb_ref_head -
+ (plcp_rx_frame->control->l_frm.efr -
+ unit->plcp.config.nb_ref_head -
unit->plcp.config.nb_control));
}
#endif
@@ -3714,7 +4385,8 @@ static void __cap_check_more (struct plc_drv_unit *unit)
}
}
-void __spy_start_done (struct plc_drv_unit *unit, struct plcp_host *host, int first_valid_crc)
+void __spy_start_done (struct plc_drv_unit *unit, struct plcp_host *host,
+ int first_valid_crc)
{
int band, mask, valid_crc, valid_corr;
@@ -3734,9 +4406,12 @@ void __spy_start_done (struct plc_drv_unit *unit, struct plcp_host *host, int fi
// trueStart
host->startTrue[band]++;
// fill average correlation
- CORR_average (host, band, unit->stats.plcp.min_corr[band], unit->stats.plcp.max_corr[band]);
+ CORR_average (host, band, unit->stats.plcp.min_corr[band],
+ unit->stats.plcp.max_corr[band]);
// a valid crc or a good signal is lead to good starts
- valid_corr = CORR_criteria (unit->stats.plcp.min_corr[band], unit->stats.plcp.max_corr[band]);
+ valid_corr =
+ CORR_criteria (unit->stats.plcp.min_corr[band],
+ unit->stats.plcp.max_corr[band]);
if (mask & valid_crc || valid_corr)
{
if (mask & valid_crc)
@@ -3792,9 +4467,12 @@ static void __spy_check_more (struct plc_drv_unit *unit, int first_valid_crc)
tmo = busy_isr_date
+ 1
+ unit->plcp.config.nb_ref_head
- + unit->plcp.config.nb_control + unit->plcp.config.nb_wait_control + plcp_rx_frame->control->l_frm.efr;
+ + unit->plcp.config.nb_control +
+ unit->plcp.config.nb_wait_control +
+ plcp_rx_frame->control->l_frm.efr;
- PLCP_LOG (busy_isr_date, "TO_DROP UNDER __spy_check_more, will drop at ", tmo);
+ PLCP_LOG (busy_isr_date,
+ "TO_DROP UNDER __spy_check_more, will drop at ", tmo);
pmd_request_timer1 (unit->id, tmo);
PLCP_LOG (0, "rx_token, start_tmo1", tmo);
@@ -3812,7 +4490,9 @@ static void __spy_check_more (struct plc_drv_unit *unit, int first_valid_crc)
tmo = busy_isr_date
+ 1
+ unit->plcp.config.nb_ref_head
- + unit->plcp.config.nb_control + unit->plcp.config.nb_wait_control + plcp_rx_frame->control->l_frm.efr;
+ + unit->plcp.config.nb_control +
+ unit->plcp.config.nb_wait_control +
+ plcp_rx_frame->control->l_frm.efr;
if (plcp_rx_frame->uchannel->ops->rx_more (unit, plcp_rx_frame) < 0)
{
@@ -3837,15 +4517,18 @@ static void __spy_check_more (struct plc_drv_unit *unit, int first_valid_crc)
(plcp_rx_frame->control->l_frm.subtype == MA_SUBTYPE_TEST_BER))
{
#if 0
- printk ("plcp_rx_frame=%p type=%s subtype=%s (%d) stei=%x dtei=%x cid=%d\n",
- plcp_rx_frame,
- ma_type_name[plcp_rx_frame->control->l_frm.type],
- ma_subtype_name[plcp_rx_frame->control->l_frm.subtype],
- plcp_rx_frame->control->l_frm.subtype,
- plcp_rx_frame->control->l_frm.STEI,
- plcp_rx_frame->control->l_frm.DTEI, plcp_rx_frame->control->l_frm.channel_id);
+ printk
+ ("plcp_rx_frame=%p type=%s subtype=%s (%d) stei=%x dtei=%x cid=%d\n",
+ plcp_rx_frame,
+ ma_type_name[plcp_rx_frame->control->l_frm.type],
+ ma_subtype_name[plcp_rx_frame->control->l_frm.subtype],
+ plcp_rx_frame->control->l_frm.subtype,
+ plcp_rx_frame->control->l_frm.STEI,
+ plcp_rx_frame->control->l_frm.DTEI,
+ plcp_rx_frame->control->l_frm.channel_id);
#endif
- sampler_run (fft_gain_sampler, PMD_MAX_BANDS * plcp_rx_frame->control->l_frm.efr);
+ sampler_run (fft_gain_sampler,
+ PMD_MAX_BANDS * plcp_rx_frame->control->l_frm.efr);
}
#endif
if (plcp_callbacks_fn->rx_start)
@@ -3856,12 +4539,15 @@ static void __spy_check_more (struct plc_drv_unit *unit, int first_valid_crc)
}
}
-static int __rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe)
+static int __rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe)
{
uint32_t addr;
- addr = (((uint32_t) unit->PMD->rx_high_slice_ad) << 16) + ((uint32_t) unit->PMD->rx_low_slice_ad);
+ addr =
+ (((uint32_t) unit->PMD->rx_high_slice_ad) << 16) +
+ ((uint32_t) unit->PMD->rx_low_slice_ad);
/* pkt_log_add(&pmd_plog, PKT_LOG_RX, 0, (char*)addr);*/
@@ -3918,14 +4604,16 @@ static int __rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame
return 0;
}
-static int __p_rx_end (struct plc_drv_unit *unit, uint16_t date, struct plcp_frame *pframe)
+static int __p_rx_end (struct plc_drv_unit *unit, uint16_t date,
+ struct plcp_frame *pframe)
{
pmd_cancel_timer1 (unit->id);
PLCP_LOG (date, "pframe", pframe);
PLCP_LOG (date, "pframe->d_buf", pframe->d_buf);
PLCP_LOG (date, "PHLIC addr",
- (((uint32_t) unit->PMD->rx_high_slice_ad) << 16) + ((uint32_t) unit->PMD->rx_low_slice_ad));
+ (((uint32_t) unit->PMD->rx_high_slice_ad) << 16) +
+ ((uint32_t) unit->PMD->rx_low_slice_ad));
memcpy (pframe->control, pframe->d_buf, sizeof (union plcp_control));
pframe->d_buf += sizeof (union plcp_control);
@@ -4287,21 +4975,26 @@ static void __rx_start_isr (int proto, int flow)
if (status == -ECRC)
{
/* no valid CRC (-ECRC) */
- PLCP_LOG (date, "no valid CRC, drop target date", busy_isr_date + unit->plcp.config.n_drop_slots);
- fm->drop (unit, busy_isr_date + unit->plcp.config.n_drop_slots);
+ PLCP_LOG (date, "no valid CRC, drop target date",
+ busy_isr_date + unit->plcp.config.n_drop_slots);
+ fm->drop (unit,
+ busy_isr_date + unit->plcp.config.n_drop_slots);
}
else
{
/* problem in control (-ECHECK) */
- PLCP_LOG (date, "invalid control, drop target date", busy_isr_date + plcp_rx_frame->control->l_frm.efr);
- fm->drop (unit, busy_isr_date + plcp_rx_frame->control->l_frm.efr);
+ PLCP_LOG (date, "invalid control, drop target date",
+ busy_isr_date + plcp_rx_frame->control->l_frm.efr);
+ fm->drop (unit,
+ busy_isr_date + plcp_rx_frame->control->l_frm.efr);
}
}
break;
case PLCP_STATE_IDLE:
PLCP_ERROR ();
unit->stats.plcp.rx_start_error++;
- PLCP_LOG (date, "assert no valid CRC, drop target date", date + unit->plcp.config.n_drop_slots);
+ PLCP_LOG (date, "assert no valid CRC, drop target date",
+ date + unit->plcp.config.n_drop_slots);
__set_state (unit, PLCP_STATE_DROP);
fm->idle (unit);
fm->drop (unit, date + unit->plcp.config.n_drop_slots);
@@ -4319,7 +5012,8 @@ static void __rx_start_isr (int proto, int flow)
fm->busy (unit, date);
// and then do like a ECRC rx_start
fm->drop (unit, date + unit->plcp.config.n_drop_slots);
- PLCP_LOG (date, "assert no valid CRC, drop target date", date + unit->plcp.config.n_drop_slots);
+ PLCP_LOG (date, "assert no valid CRC, drop target date",
+ date + unit->plcp.config.n_drop_slots);
break;
case PLCP_STATE_RX_DATA:
@@ -4336,7 +5030,8 @@ static void __rx_start_isr (int proto, int flow)
fm->busy (unit, date);
// and then do like a ECRC rx_start
fm->drop (unit, date + unit->plcp.config.n_drop_slots);
- PLCP_LOG (date, "assert no valid CRC, drop target date", date + unit->plcp.config.n_drop_slots);
+ PLCP_LOG (date, "assert no valid CRC, drop target date",
+ date + unit->plcp.config.n_drop_slots);
break;
case PLCP_STATE_TX_CTRL:
@@ -4385,7 +5080,9 @@ static void __spy_rx_start_isr (int proto, int flow)
{
/* problem in control (-ECHECK) */
PLCP_LOG (date, "invalid control, drop target date", 0);
- fm->drop (unit, date + unit->plcp.config.nb_wait_control + 1 + plcp_rx_frame->control->l_frm.efr);
+ fm->drop (unit,
+ date + unit->plcp.config.nb_wait_control + 1 +
+ plcp_rx_frame->control->l_frm.efr);
}
}
break;
@@ -4394,7 +5091,8 @@ static void __spy_rx_start_isr (int proto, int flow)
case PLCP_STATE_DROP:
// drop the frame to avoid phlic staying at state rx_spy_wait_following_start
// stay in the same state
- PLCP_LOG (date, "rx_start at state idle or drop!!!", unit->plcp.state);
+ PLCP_LOG (date, "rx_start at state idle or drop!!!",
+ unit->plcp.state);
fm->drop (unit, date + PHLIC_HOLD);
// unit->stats.plcp.busy_missed_error++;
break;
@@ -4680,7 +5378,9 @@ static void __tmo1_isr (int proto, int flow)
fm->idle (unit);
if (unit->plcp.config.fmode == PLCP_FMODE_SCAP)
{ // ## SPY MODE
- PLCP_LOG (date, "TO_DROP UNDER PLCP_STATE_RX_CTRL, due to __tmo1_isr", date);
+ PLCP_LOG (date,
+ "TO_DROP UNDER PLCP_STATE_RX_CTRL, due to __tmo1_isr",
+ date);
PLCP_LOG (date, "PHLIC nextstate", pmd_get_nextstate ());
PLCP_LOG (date, "PHLIC counter", pmd_get_counter ());
__invalid_state_for_rx (unit);
@@ -4708,7 +5408,8 @@ static void __tmo1_isr (int proto, int flow)
unit->PMD->to_drop = 1;
unit->stats.plcp.tmo_drop_error++;
date = plcp_get_timer (unit);
- PLCP_LOG (date, "TO_DROP UNDER PLCP_STATE_DROP, due to __tmo1_isr", date);
+ PLCP_LOG (date, "TO_DROP UNDER PLCP_STATE_DROP, due to __tmo1_isr",
+ date);
__set_state (unit, PLCP_STATE_IDLE);
fm->idle (unit);
if (plcp_callbacks_fn->rx_drop)
@@ -4721,7 +5422,9 @@ static void __tmo1_isr (int proto, int flow)
unit->PMD->to_drop = 1;
unit->stats.plcp.tmo_drop_error++;
date = plcp_get_timer (unit);
- PLCP_LOG (date, "TO_DROP UNDER PLCP_STATE_DROP_DATA, due to __tmo1_isr", date);
+ PLCP_LOG (date,
+ "TO_DROP UNDER PLCP_STATE_DROP_DATA, due to __tmo1_isr",
+ date);
__set_state (unit, PLCP_STATE_IDLE);
pframe = plcp_rx_frame;
@@ -4753,17 +5456,20 @@ static void __tmo2_isr (int proto, int flow)
/* en fonction d'un uchannel et du nombre de slots, on veut connaître
* jusqu'à combien d'octets on peut envoyer exactement */
/* NB: slots includes DATA and periodic REF slots */
-int plcp_get_max_data_len (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+int plcp_get_max_data_len (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slots)
{
return fm->mtu (unit, uchannel, slots);
}
-static int __mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+static int __mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slots)
{
return uchannel->ops->mtu (unit, uchannel, slots);
}
-static int __p_mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+static int __p_mtu (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slots)
{
int mtu = unit->plcp.config.p_tx_slices * PMD_SLICE_SIZE;
@@ -4808,7 +5514,8 @@ int ref_slots (int slots, int ref_interval, int nb_refs)
{
refs = ((slots - 1) / ref_interval) * nb_refs;
/* BUG128 */
- if (((refs + slots + fm->data_offset) >= 128) && ((refs + slots + 1) % (ref_interval + nb_refs)) == 0)
+ if (((refs + slots + fm->data_offset) >= 128) &&
+ ((refs + slots + 1) % (ref_interval + nb_refs)) == 0)
{
refs++;
}
@@ -4822,7 +5529,8 @@ int ref_slots (int slots, int ref_interval, int nb_refs)
int plcp_overhead (struct plc_drv_unit *unit)
{
- return fm->efr (unit, plcp_get_uchannel_by_id (PLCP_CID_NONE), 0) + unit->plcp.config.rx_nb_eof;
+ return fm->efr (unit, plcp_get_uchannel_by_id (PLCP_CID_NONE),
+ 0) + unit->plcp.config.rx_nb_eof;
}
bool plcp_is_medium_busy (struct plc_drv_unit * unit)
@@ -4875,7 +5583,8 @@ void plcp_set_static_spy_band (struct plc_drv_unit *unit, int band)
unit->plcp.config.static_spy_band = band;
if (unit->plcp.config.fmode == PLCP_FMODE_CAP)
{
- plcp_set_rx_dsp_bands (unit, 0xFF - ((1 << band) - 1));
+ plcp_set_rx_dsp_bands (unit,
+ (0xFF - ((1 << band) - 1)) & unit->used_bands);
}
}
@@ -4888,7 +5597,8 @@ struct mem_curs {
};
extern void mem_curs_init (struct mem_curs *curs, void *addr);
-extern int mem_curs_compare (struct mem_curs *exp, struct mem_curs *real, int nbits);
+extern int mem_curs_compare (struct mem_curs *exp, struct mem_curs *real,
+ int nbits);
//####################
//# PLCP_BER_CONTROL #
@@ -4906,7 +5616,8 @@ void plcp_ber_control (struct plc_drv_unit *unit)
struct mem_curs ref, compare;
- u8 control_modulation = pmd_get_mod_bits_per_slot (unit->control_modulation);
+ u8 control_modulation =
+ pmd_get_mod_bits_per_slot (unit->control_modulation);
u8 mask_carriers;
u16 nb_bit_control, nb_all_bit; // For set limit of reading bit.
@@ -4924,7 +5635,9 @@ void plcp_ber_control (struct plc_drv_unit *unit)
hamming_unroll_encode ((u8 *) buffer_ref, (u32 *) encoded_control);
}
- nb_bit_control = (unit->plcp.config.hamming.enable) ? ENCODED_CONTROL_SIZE : sizeof (union plcp_control);
+ nb_bit_control =
+ (unit->plcp.config.hamming.
+ enable) ? ENCODED_CONTROL_SIZE : sizeof (union plcp_control);
nb_bit_control = (nb_bit_control * 8); // unit is bit.
nb_all_bit = nb_bit_control * ((unit->plcp.config.vote) ? 3 : 1);
nb_bit_reading = 0;
@@ -4945,33 +5658,47 @@ void plcp_ber_control (struct plc_drv_unit *unit)
group = PMD_GROUPS_PER_BAND;
mask_carriers =
- ~(CM_GROUP (band, (PMD_GROUPS_PER_BAND - group), &notches[NOTCHES_DEFAULT]) |
- plcp_pilots_bitmap[band][(PMD_GROUPS_PER_BAND - group)]);
+ ~(CM_GROUP
+ (band, (PMD_GROUPS_PER_BAND - group),
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band][(PMD_GROUPS_PER_BAND -
+ group)]);
for (i = PMD_CARRIERS_PER_GROUP; i != 0; i--)
{
- if (likely (mask_carriers & (1 << (PMD_CARRIERS_PER_GROUP - i))))
+ if (likely
+ (mask_carriers & (1 << (PMD_CARRIERS_PER_GROUP - i))))
{
// Determine how many bit we read for this carrier.
nb_bit_on_carrier =
- (nb_bit_remaining > control_modulation) ? control_modulation : nb_bit_remaining;
+ (nb_bit_remaining >
+ control_modulation) ? control_modulation :
+ nb_bit_remaining;
- if (unlikely ((nb_bit_reading >= nb_bit_control) && (unit->plcp.config.vote)))
+ if (unlikely
+ ((nb_bit_reading >= nb_bit_control) &&
+ (unit->plcp.config.vote)))
{
if (control_number == 1)
{
// Second control
mem_curs_init (&compare,
- (void *) &buffer_compare[band][((ENCODED_CONTROL_SIZE + 3) / 4)]);
+ (void *)
+ &buffer_compare[band][((ENCODED_CONTROL_SIZE + 3) / 4)]);
}
else
{
// Third control
mem_curs_init (&compare,
- (void *) &buffer_compare[band][(2 * (ENCODED_CONTROL_SIZE + 3) / 4)]);
+ (void *)
+ &buffer_compare[band][(2 *
+ (ENCODED_CONTROL_SIZE
+ +
+ 3) /
+ 4)]);
}
control_number++;
@@ -4982,18 +5709,25 @@ void plcp_ber_control (struct plc_drv_unit *unit)
}
// look and save error bit for one carrier.
- nb_bit_error = mem_curs_compare (&compare, &ref, nb_bit_on_carrier);
- carrier = (PMD_GROUPS_PER_BAND - group) * PMD_CARRIERS_PER_GROUP + (PMD_CARRIERS_PER_GROUP - i);
+ nb_bit_error =
+ mem_curs_compare (&compare, &ref,
+ nb_bit_on_carrier);
+ carrier =
+ (PMD_GROUPS_PER_BAND -
+ group) * PMD_CARRIERS_PER_GROUP +
+ (PMD_CARRIERS_PER_GROUP - i);
for (j = nb_bit_on_carrier; j > 0; j--)
{
// filter : y(t) = 0.99*y(t-1) + 1*e(t) // output : 0-100 (%)
- unit->stats.ber_control.error[band][carrier] *= 0.99;
+ unit->stats.ber_control.error[band][carrier] *=
+ 0.99;
if (j <= nb_bit_error)
{ // e(t) = 1
- unit->stats.ber_control.error[band][carrier] += 1;
+ unit->stats.ber_control.
+ error[band][carrier] += 1;
}
}
diff --git a/app/sm-plc-drv/src/plcp_frame.c b/app/sm-plc-drv/src/plcp_frame.c
index 4d1e827350..ed9a33743c 100755
--- a/app/sm-plc-drv/src/plcp_frame.c
+++ b/app/sm-plc-drv/src/plcp_frame.c
@@ -27,8 +27,12 @@ union plcp_control plcp_tx_control[PLCP_TX_RING_SIZE];
struct dma_pool dma_tx_pools[NB_DMA_POOLS];
struct dma_pool dma_rx_pools[NB_DMA_POOLS];
-struct dma_node dma_dma_nodes[DMA_TX_POOL0_NB_BUFFER + DMA_TX_POOL1_NB_BUFFER + DMA_TX_POOL2_NB_BUFFER +
- DMA_RX_POOL0_NB_BUFFER + DMA_RX_POOL1_NB_BUFFER + DMA_RX_POOL2_NB_BUFFER];
+struct dma_node dma_dma_nodes[DMA_TX_POOL0_NB_BUFFER +
+ DMA_TX_POOL1_NB_BUFFER +
+ DMA_TX_POOL2_NB_BUFFER +
+ DMA_RX_POOL0_NB_BUFFER +
+ DMA_RX_POOL1_NB_BUFFER +
+ DMA_RX_POOL2_NB_BUFFER];
int dma_rx_nbuf[NB_DMA_POOLS] = {
DMA_RX_POOL0_NB_BUFFER,
@@ -45,7 +49,8 @@ int dma_tx_nbuf[NB_DMA_POOLS] = {
void dma_dump_pool (struct dma_pool *pool)
{
- RT_PRINTK ("dma_pool %p %s, buf_size=%d, count=%d\n", pool, pool->name, pool->buf_size, pool->count);
+ RT_PRINTK ("dma_pool %p %s, buf_size=%d, count=%d\n", pool, pool->name,
+ pool->buf_size, pool->count);
}
struct plcp_frame *dma_find_pframe (struct dma_node *node)
@@ -72,9 +77,10 @@ struct plcp_frame *dma_find_pframe (struct dma_node *node)
void dma_dump_node (struct dma_node *node)
{
- RT_PRINTK ("dma_node=%p data=%p size=%d flags=%x headm=%08x (@ %08x) endm=%08x (@ %08x) ",
- node, node->data, node->size, node->flags,
- headm (node), headm_addr (node), endm (node), endm_addr (node));
+ RT_PRINTK
+ ("dma_node=%p data=%p size=%d flags=%x headm=%08x (@ %08x) endm=%08x (@ %08x) ",
+ node, node->data, node->size, node->flags, headm (node),
+ headm_addr (node), endm (node), endm_addr (node));
dma_dump_pool (node->pool);
}
@@ -120,7 +126,8 @@ void dma_free_mark (struct dma_node *node)
struct dma_pool *pool = node->pool;
ASSERT_N (endm (node) == DMA_MARK_ALLOC (node), dma_dump_pframe (node));
- ASSERT_N ((node->flags & F_DMA_ALLOC) == F_DMA_ALLOC, dma_dump_pframe (node));
+ ASSERT_N ((node->flags & F_DMA_ALLOC) == F_DMA_ALLOC,
+ dma_dump_pframe (node));
node->flags &= ~F_DMA_ALLOC;
endm (node) = DMA_MARK_FREE (node);
}
@@ -349,6 +356,7 @@ static inline struct plcp_frame *__alloc_frame (struct list_head *queue)
list_del_init (&frame->link);
frame->d_len = 0;
+ frame->prio = 0; // safety
frame->d_buf = NULL;
INIT_LIST_HEAD (&frame->pb_list);
LOCK_RESTORE (msr);
@@ -356,7 +364,8 @@ static inline struct plcp_frame *__alloc_frame (struct list_head *queue)
return frame;
}
-static inline void __free_frame (struct plcp_frame *frame, struct list_head *queue)
+static inline void __free_frame (struct plcp_frame *frame,
+ struct list_head *queue)
{
uint32_t msr;
@@ -393,9 +402,10 @@ int plcp_xmit_frame_valid (struct plcp_frame *pframe)
void plcp_dump_frame (struct plcp_frame *pframe)
{
RT_PRINTK ("frame=%p, type=%s(%d), sub=%s(%d), len=%d, dbuf=%p\n",
- pframe, ma_type_name[pframe->control->l_frm.type], pframe->control->l_frm.type,
- ma_subtype_name[pframe->control->l_frm.subtype], pframe->control->l_frm.subtype,
- pframe->d_len, pframe->d_buf);
+ pframe, ma_type_name[pframe->control->l_frm.type],
+ pframe->control->l_frm.type,
+ ma_subtype_name[pframe->control->l_frm.subtype],
+ pframe->control->l_frm.subtype, pframe->d_len, pframe->d_buf);
if (pframe->d_buf && pframe->dma_node)
{
dma_dump_node (pframe->dma_node);
@@ -496,7 +506,8 @@ void plcp_free_tx_frame (struct plcp_frame *frame)
}
else
{
- ASSERT_N (*(u32 *) frame->d_buf == DMA_MARK_ALLOC (plcp_tx_junk), plcp_dump_frame (frame));
+ ASSERT_N (*(u32 *) frame->d_buf == DMA_MARK_ALLOC (plcp_tx_junk),
+ plcp_dump_frame (frame));
}
res = pframe_pb_free (frame, &frame->pb_nack);
@@ -508,11 +519,11 @@ void plcp_free_tx_frame (struct plcp_frame *frame)
else
{
/* frame needs to be requeued */
- PB_LOG (("plcp_free_tx_frame for %s pframe 0x%x not done cause SACK: pframe requeued",
- (frame->prio) ? "DATA" : "MNG", frame));
+ PB_LOG (("plcp_free_tx_frame for %s pframe 0x%x not done cause SACK: pframe requeued", (frame->prio) ? "DATA" : "MNG", frame));
if (frame->host->tx_queue_count[PLCP_PRIO_DATA] > 0)
{
- PB_LOG (("Already %d frame queued\n", frame->host->tx_queue_count[PLCP_PRIO_DATA]));
+ PB_LOG (("Already %d frame queued\n",
+ frame->host->tx_queue_count[PLCP_PRIO_DATA]));
}
csma_stats (unit->stats.pb.tx_pframe_sacked++);
frame->state = PLCP_QUEUED;
@@ -645,12 +656,16 @@ int plcp_ring_snapshot (char *buffer, struct plcp_frame *ring, int n)
#ifdef CONFIG_PLC_DEBUG
p += sprintf (p,
"%x control=%x dma_node=%x d_buf=%x d_len=%d frames=%d link=(%x,%x) state=%d event=%d mac=%d\n",
- pframe, pframe->control, pframe->dma_node, pframe->d_buf, pframe->d_len, j, pframe->link.prev,
- pframe->link.next, pframe->last_plcp_state, pframe->last_plcp_event, pframe->state);
+ pframe, pframe->control, pframe->dma_node,
+ pframe->d_buf, pframe->d_len, j, pframe->link.prev,
+ pframe->link.next, pframe->last_plcp_state,
+ pframe->last_plcp_event, pframe->state);
#else
- p += sprintf (p, "%x control=%x dma_node=%x d_buf=%x d_len=%d frames=%d link=(%x,%x)\n",
+ p += sprintf (p,
+ "%x control=%x dma_node=%x d_buf=%x d_len=%d frames=%d link=(%x,%x)\n",
pframe, pframe->control, pframe->dma_node,
- pframe->d_buf, pframe->d_len, j, pframe->link.prev, pframe->link.next);
+ pframe->d_buf, pframe->d_len, j, pframe->link.prev,
+ pframe->link.next);
#endif /* CONFIG_PLC_DEBUG */
}
return (p - buffer);
@@ -685,9 +700,12 @@ int plcp_header (char *buffer, union plcp_control *control)
control->l_frm.flags,
control->l_frm.type,
control->l_frm.res[0],
- control->l_frm.res[1], control->l_frm.res[2], control->l_frm.efr, control->l_frm.slices);
+ control->l_frm.res[1], control->l_frm.res[2],
+ control->l_frm.efr, control->l_frm.slices);
n += sprintf (buffer + n, "crc ............ 0x%02x (%s)\n",
- control->l_frm.crc, control_crc (control) == control->l_frm.crc ? "valid" : "invalid");
+ control->l_frm.crc,
+ control_crc (control) ==
+ control->l_frm.crc ? "valid" : "invalid");
return n;
}
@@ -724,7 +742,8 @@ int plcp_snapshot (char *buffer)
return (p - buffer);
}
-int proc_r_plcp_headers (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_headers (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
static char *buffer = NULL;
@@ -739,16 +758,21 @@ int proc_r_plcp_headers (char *buf, char **start, off_t offset, int count, int *
if (!buffer)
buffer = kmalloc (65536, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
// complete here the buffer
p += sprintf (p, "\ndump plcp_tx_frames\n");
- for (i = 0, pframe = plcp_tx_frames; i < PLCP_TX_RING_SIZE; i++, pframe++)
+ for (i = 0, pframe = plcp_tx_frames; i < PLCP_TX_RING_SIZE;
+ i++, pframe++)
{
p += plcp_header (p, pframe->control);
}
p += sprintf (p, "\ndump plcp_rx_frames\n");
- for (i = 0, pframe = plcp_rx_frames; i < PLCP_RX_RING_SIZE; i++, pframe++)
+ for (i = 0, pframe = plcp_rx_frames; i < PLCP_RX_RING_SIZE;
+ i++, pframe++)
{
p += plcp_header (p, pframe->control);
}
@@ -818,12 +842,14 @@ int dma_pool_snapshot (char *buffer, struct dma_pool *pool)
struct dma_node *node;
char *p = buffer;
- p += sprintf (p, "%s buf_size=%d count=%d\n", pool->name, pool->buf_size, pool->count);
+ p += sprintf (p, "%s buf_size=%d count=%d\n", pool->name, pool->buf_size,
+ pool->count);
p += dma_nodes_snapshot (p, &pool->queue, pool->count + 10);
return p - buffer;
}
-int proc_r_plcp_dma (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_dma (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
struct net_device *dev = (struct net_device *) data;
struct plc_drv_unit *unit = dev->priv;
@@ -840,6 +866,9 @@ int proc_r_plcp_dma (char *buf, char **start, off_t offset, int count, int *eof,
if (!buffer)
buffer = kmalloc (16 * 1024, GFP_KERNEL);
+ if (buffer == NULL)
+ return -ENOMEM;
+
p = buffer;
LOCK_SAVE (flags);
diff --git a/app/sm-plc-drv/src/plcp_mode_chunks.c b/app/sm-plc-drv/src/plcp_mode_chunks.c
index 03026b8977..4e51b93275 100755
--- a/app/sm-plc-drv/src/plcp_mode_chunks.c
+++ b/app/sm-plc-drv/src/plcp_mode_chunks.c
@@ -377,8 +377,9 @@ int umap_init (struct umap *umap, int chunks)
for (i = 0; i < chunks; i++)
{
PRINTK ("%d;%d;%d;%d;%d;%d;%d;%d\n",
- chunks, i, umap->seqno[i][0], umap->seqno[i][1], umap->seqno[i][2],
- umap->seqno[i][0] % P_ROWS, umap->seqno[i][1] % P_ROWS, umap->seqno[i][2] % P_ROWS);
+ chunks, i, umap->seqno[i][0], umap->seqno[i][1],
+ umap->seqno[i][2], umap->seqno[i][0] % P_ROWS,
+ umap->seqno[i][1] % P_ROWS, umap->seqno[i][2] % P_ROWS);
}
for (i = 0; i < replicas; i++)
{
@@ -503,21 +504,24 @@ void xmap_init (struct xmap *xmap, struct umap *umap)
}
#endif
-inline void rmap_write_byte (struct rmap *rmap, struct umap *umap, char *buf, int i, int b, char c)
+inline void rmap_write_byte (struct rmap *rmap, struct umap *umap, char *buf,
+ int i, int b, char c)
{
*(buf + rmap->offset[umap->seqno[i][0]][b]) = c;
*(buf + rmap->offset[umap->seqno[i][1]][b]) = c;
*(buf + rmap->offset[umap->seqno[i][2]][b]) = c;
}
-inline uint16_t rmap_write_byte_crc (struct rmap *rmap, struct umap *umap, char *buf, int i, int b, char c,
+inline uint16_t rmap_write_byte_crc (struct rmap *rmap, struct umap *umap,
+ char *buf, int i, int b, char c,
uint16_t crc)
{
rmap_write_byte (rmap, umap, buf, i, b, c);
return crc_ccitt_byte (crc, c);
}
-void rmap_inflate (struct rmap *rmap, struct umap *umap, char *buf, char *slice)
+void rmap_inflate (struct rmap *rmap, struct umap *umap, char *buf,
+ char *slice)
{
int i, r, b;
char *src;
@@ -581,7 +585,8 @@ inline int r_vote (struct replicas *r)
return 0;
};
-inline char rmap_read_byte (struct rmap *rmap, struct umap *umap, char *buf, int i, int r, int b)
+inline char rmap_read_byte (struct rmap *rmap, struct umap *umap, char *buf,
+ int i, int r, int b)
{
return *(buf + rmap->offset[umap->seqno[i][r]][b]);
}
@@ -626,7 +631,8 @@ static INLINE void __invalid_chunk (int band)
#endif
}
-int rmap_deflate (struct rmap *rmap, struct umap *umap, char *slice, char *buf, struct chunk_set *cs, int band)
+int rmap_deflate (struct rmap *rmap, struct umap *umap, char *slice,
+ char *buf, struct chunk_set *cs, int band)
{
int i, r, b;
char *src;
@@ -672,8 +678,10 @@ int rmap_deflate (struct rmap *rmap, struct umap *umap, char *slice, char *buf,
dst++;
*dst = rmap_read_byte (rmap, umap, buf, i, r, 9);
computed_crc = crc_ccitt_byte (computed_crc, *dst);
- *((char *) &received_crc) = rmap_read_byte (rmap, umap, buf, i, r, 10);
- *(((char *) &received_crc) + 1) = rmap_read_byte (rmap, umap, buf, i, r, 11);
+ *((char *) &received_crc) =
+ rmap_read_byte (rmap, umap, buf, i, r, 10);
+ *(((char *) &received_crc) + 1) =
+ rmap_read_byte (rmap, umap, buf, i, r, 11);
//PRINTK("computed_crc=%04x received_crc=%04x\n", computed_crc, received_crc);
if (received_crc == computed_crc)
{
@@ -686,7 +694,8 @@ int rmap_deflate (struct rmap *rmap, struct umap *umap, char *slice, char *buf,
__invalid_replica (band, row (umap->seqno[i][r]), i, r);
dst = slice + i * PAYLOAD_SIZE;
memcpy ((char *) &__replicas.r[r], dst, PAYLOAD_SIZE);
- memcpy ((char *) &__replicas.r[r] + PAYLOAD_SIZE, &received_crc, 2);
+ memcpy ((char *) &__replicas.r[r] + PAYLOAD_SIZE,
+ &received_crc, 2);
}
}
@@ -716,7 +725,8 @@ int rmap_deflate (struct rmap *rmap, struct umap *umap, char *slice, char *buf,
* returns 0 if crc is valid
*/
#if 0
-int plcp_v_chunk_replicas (char *buf, int chunk, uint8_t * base, uint8_t * src, struct chunk_map *map,
+int plcp_v_chunk_replicas (char *buf, int chunk, uint8_t * base,
+ uint8_t * src, struct chunk_map *map,
struct chunk_set *cs)
{
@@ -730,17 +740,21 @@ int plcp_v_chunk_replicas (char *buf, int chunk, uint8_t * base, uint8_t * src,
row = map->offset[chunk][replica] % PLCP_BAND_ROWS;
//PRINTK("chunk %d replica %d row %d ", chunk, replica, row);
p += sprintf (p, "%d %d %d", chunk, replica, row);
- if (ochunk_read ((uint8_t *) ochunks.r[replica], src, map->offset[chunk][replica], map) == 0)
+ if (ochunk_read
+ ((uint8_t *) ochunks.r[replica], src, map->offset[chunk][replica],
+ map) == 0)
{
p += sprintf (p, " ");
- p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE, REPLICA_SIZE);
+ p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE,
+ REPLICA_SIZE);
CS_SET (chunk, cs);
memcpy (dst, (uint8_t *) ochunks.r[replica], PAYLOAD_SIZE);
}
else
{
p += sprintf (p, "*** ");
- p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE, REPLICA_SIZE);
+ p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE,
+ REPLICA_SIZE);
}
}
@@ -752,7 +766,8 @@ int plcp_v_chunk_replicas (char *buf, int chunk, uint8_t * base, uint8_t * src,
replica = 0;
//PRINTK("chunk %d FIXED ", chunk);
p += sprintf (p, "chunk %d FIXED ", chunk);
- p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE, REPLICA_SIZE);
+ p += sdump8 (p, (char *) ochunks.r[replica], REPLICA_SIZE,
+ REPLICA_SIZE);
CS_SET (chunk, cs);
memcpy (dst, (uint8_t *) ochunks.r[replica], PAYLOAD_SIZE);
}
@@ -760,7 +775,8 @@ int plcp_v_chunk_replicas (char *buf, int chunk, uint8_t * base, uint8_t * src,
return (int) p - (int) buf;
}
-int plcp_v_chunk_map (char *buf, uint8_t * base, uint8_t * src, struct chunk_map *map, struct chunk_set *cs)
+int plcp_v_chunk_map (char *buf, uint8_t * base, uint8_t * src,
+ struct chunk_map *map, struct chunk_set *cs)
{
int chunk;
@@ -809,7 +825,8 @@ int build_payload (uint8_t * dst, uint8_t * src, int len)
}
#ifndef TESTU
-int proc_r_plcp_chunk_map (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int proc_r_plcp_chunk_map (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
static int band;
static int chunk;
@@ -846,7 +863,8 @@ int proc_r_plcp_chunk_map (char *buf, char **start, off_t offset, int count, int
if (CS_ISSET (chunk, &cs))
{
p += sprintf (p, "chunk %d : ", chunk);
- p += sdump8 (p, ((char *) tx_unpadded) + PAYLOAD_SIZE * chunk, PAYLOAD_SIZE, PAYLOAD_SIZE);
+ p += sdump8 (p, ((char *) tx_unpadded) + PAYLOAD_SIZE * chunk,
+ PAYLOAD_SIZE, PAYLOAD_SIZE);
}
else
{
@@ -874,7 +892,9 @@ int proc_r_plcp_chunk_map (char *buf, char **start, off_t offset, int count, int
if (band_is_used (unit, band))
{
p += plcp_v_chunk_replicas (p, chunk,
- (uint8_t *) tx_unpadded, (uint8_t *) rx_unpadded[band], &__chunk_map, &cs);
+ (uint8_t *) tx_unpadded,
+ (uint8_t *) rx_unpadded[band],
+ &__chunk_map, &cs);
}
if (++chunk == __chunk_map.nb_chunks)
@@ -893,7 +913,8 @@ int proc_r_plcp_chunk_map (char *buf, char **start, off_t offset, int count, int
return (int) p - (int) buf;
}
-int plcp_mtu_chunks (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+int plcp_mtu_chunks (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slots)
{
int bits, slices;
@@ -905,7 +926,9 @@ int plcp_mtu_chunks (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
if (unit->plcp.config.ref_interval)
{
- refs = (slots / unit->plcp.config.ref_interval) * unit->plcp.config.nb_periodic_ref;
+ refs =
+ (slots / unit->plcp.config.ref_interval) *
+ unit->plcp.config.nb_periodic_ref;
//PRINTK("slots = %d - %d refs = %d\n", slots, refs, slots - refs);
slots -= refs;
@@ -916,7 +939,9 @@ int plcp_mtu_chunks (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
}
/* check if we have enough bits to send MAX_SLICES slices */
bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits / (PMD_BYTE_SIZE_WITH_VITERBI * PMD_SLICE_SIZE_WITH_REED_SOLOMON);
+ slices =
+ bits / (PMD_BYTE_SIZE_WITH_VITERBI *
+ PMD_SLICE_SIZE_WITH_REED_SOLOMON);
//PRINTK("bits = %d slots x %d bits_per_slot = %d, slices=%d\n",
// slots, uchannel->lookup.bits_per_slot, bits, slices);
@@ -938,7 +963,8 @@ int plcp_mtu_chunks (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
return mtu;
}
-int plcp_rx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_start_chunks (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices = pframe->control->l_frm.slices;
@@ -955,7 +981,8 @@ int plcp_rx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
#if 0
-int plcp_rx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_start_chunks (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices = pframe->control->l_frm.slices;
@@ -971,15 +998,18 @@ int plcp_rx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (slices > 0)
{
/* compute payload symbols */
- unit->PMD->rx_payload_nb_symbols = uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands;
+ unit->PMD->rx_payload_nb_symbols =
+ uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands;
unit->PMD->rx_slices_number = slices * pframe->nb_rx_bands;
unit->PMD->rx_high_slice_ad = (uint32_t) plcp_rx_robust_fec >> 16;
- unit->PMD->rx_low_slice_ad = (uint32_t) plcp_rx_robust_fec & 0x0000ffff;
+ unit->PMD->rx_low_slice_ad =
+ (uint32_t) plcp_rx_robust_fec & 0x0000ffff;
plcp_set_rx_quality (unit, uchannel);
PLCP_LOG (rxstart_isr_date, "slices", slices);
PLCP_LOG (rxstart_isr_date, "rx_payload_nb_symbols",
- uchannel->lookup.payload_slots[slices] * pframe->nb_rx_bands);
+ uchannel->lookup.payload_slots[slices] *
+ pframe->nb_rx_bands);
PLCP_LOG (rxstart_isr_date, "d_buf", pframe->d_buf);
PLCP_LOG (rxstart_isr_date, "nb_rx_bands", pframe->nb_rx_bands);
@@ -1006,7 +1036,8 @@ int plcp_rx_more_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
return 0;
}
-static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe, int n)
+static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ int n)
{
int band;
@@ -1091,10 +1122,13 @@ int plcp_rx_end_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
dst = (uint8_t *) rx_padded;
for (slice = 0; slice < slices; slice++, dst += PMD_SLICE_SIZE)
{
- PRINTK ("memcpy(0x%08x, 0x%08x, %d)\n", dst, __slice_map.addr[band][slice], PMD_SLICE_SIZE);
+ PRINTK ("memcpy(0x%08x, 0x%08x, %d)\n", dst,
+ __slice_map.addr[band][slice], PMD_SLICE_SIZE);
memcpy (dst, __slice_map.addr[band][slice], PMD_SLICE_SIZE);
}
- status = rmap_deflate (&__rmap, &__umap[slices - 1], pframe->d_buf, (char *) rx_padded, &cs, band);
+ status =
+ rmap_deflate (&__rmap, &__umap[slices - 1], pframe->d_buf,
+ (char *) rx_padded, &cs, band);
}
}
pframe->d_len = slices * PAYLOAD_PER_SLICE;
@@ -1113,7 +1147,8 @@ int plcp_rx_end_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
{
for (slice = 0; slice < pframe->pb_count; slice++)
{
- for (i = (slice * PMD_SLICE_SIZE) / PAYLOAD_SIZE; i < (slice + 1) * PMD_SLICE_SIZE; i += PAYLOAD_SIZE)
+ for (i = (slice * PMD_SLICE_SIZE) / PAYLOAD_SIZE;
+ i < (slice + 1) * PMD_SLICE_SIZE; i += PAYLOAD_SIZE)
{
chunk = i / PAYLOAD_SIZE;
if (!(CS_ISSET (chunk, &cs)))
@@ -1165,7 +1200,8 @@ int plcp_chunks_stats (struct plc_drv_unit *unit, char *buf)
band, row,
unit->stats.plcp.valid_replica[band][row],
unit->stats.plcp.invalid_replica[band][row],
- unit->stats.plcp.valid_replica[band][row] + unit->stats.plcp.invalid_replica[band][row]);
+ unit->stats.plcp.valid_replica[band][row] +
+ unit->stats.plcp.invalid_replica[band][row]);
}
}
}
@@ -1182,7 +1218,8 @@ int plcp_chunks_stats (struct plc_drv_unit *unit, char *buf)
unit->stats.plcp.fixed_chunk[band],
unit->stats.plcp.invalid_chunk[band],
unit->stats.plcp.valid_chunk[band] +
- unit->stats.plcp.fixed_chunk[band] + unit->stats.plcp.invalid_chunk[band]);
+ unit->stats.plcp.fixed_chunk[band] +
+ unit->stats.plcp.invalid_chunk[band]);
}
}
@@ -1293,7 +1330,9 @@ int main (int argc, char **argv)
damage_buffer (rx_padded, slices * PMD_SLICE_SIZE, errors);
CS_ZERO (&cs);
- status = rmap_deflate (&__rmap, &__umap[slices - 1], rx_buffer, rx_padded, &cs, 0);
+ status =
+ rmap_deflate (&__rmap, &__umap[slices - 1], rx_buffer, rx_padded, &cs,
+ 0);
PRINTK ("AFTER DEFLATE %s\n", status < 0 ? "*** NOK ***" : "OK");
dump8 (rx_buffer, len, PAYLOAD_SIZE);
diff --git a/app/sm-plc-drv/src/plcp_mode_common.c b/app/sm-plc-drv/src/plcp_mode_common.c
index 3abfe6bc75..076c1527bb 100644
--- a/app/sm-plc-drv/src/plcp_mode_common.c
+++ b/app/sm-plc-drv/src/plcp_mode_common.c
@@ -15,7 +15,8 @@
#include "plc_ce.h"
#include "plcp_core.h"
-int plcp_check_control_common (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_check_control_common (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices;
diff --git a/app/sm-plc-drv/src/plcp_mode_control.c b/app/sm-plc-drv/src/plcp_mode_control.c
index ec8c863070..e8d598c167 100755
--- a/app/sm-plc-drv/src/plcp_mode_control.c
+++ b/app/sm-plc-drv/src/plcp_mode_control.c
@@ -15,7 +15,8 @@
#include "plc_ce.h"
#include "plcp_core.h"
-int plcp_check_control_only (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_check_control_only (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
union plcp_control *control = pframe->control;
@@ -32,7 +33,8 @@ int plcp_check_control_only (struct plc_drv_unit *unit, struct plcp_frame *pfram
return 0;
}
-int plcp_rx_more_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_more_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
PLCP_LOG (rxstart_isr_date, "RX_MORE CONTROL MODE", 0);
// if this function is called, the pframe->d_len is assumed > 0. so goto DROP_DATA to have the noise remodulated at least
@@ -46,7 +48,8 @@ int plcp_rx_end_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
return -1;
}
-void plcp_build_lookup_control (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_build_lookup_control (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int slice;
@@ -59,13 +62,15 @@ void plcp_build_lookup_control (struct plc_drv_unit *unit, struct plcp_uchannel
}
}
-int plcp_mtu_control (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+int plcp_mtu_control (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel, int slots)
{
return 0;
}
-int plcp_rx_start_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_start_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
diff --git a/app/sm-plc-drv/src/plcp_mode_fec.c b/app/sm-plc-drv/src/plcp_mode_fec.c
index c4cafbd25f..29f2835fed 100644
--- a/app/sm-plc-drv/src/plcp_mode_fec.c
+++ b/app/sm-plc-drv/src/plcp_mode_fec.c
@@ -32,11 +32,13 @@
#include "lib_if.h"
#include "pb_list.h"
-int __write_pb_list (struct plc_drv_unit *unit, uint16_t tx_first_slice_index, struct plcp_frame *pframe)
+int __write_pb_list (struct plc_drv_unit *unit, uint16_t tx_first_slice_index,
+ struct plcp_frame *pframe)
{
uint16_t tx_last_slice_index;
- uint32_t *addr = (uint32_t *) (PMD_PHLIC_DATA_REGBASE + tx_first_slice_index);
+ uint32_t *addr =
+ (uint32_t *) (PMD_PHLIC_DATA_REGBASE + tx_first_slice_index);
int pb_num = 0;
struct list_head *entry, *temp;
struct pb_desc *pb_desc;
@@ -54,24 +56,29 @@ int __write_pb_list (struct plc_drv_unit *unit, uint16_t tx_first_slice_index, s
pb_free (pb_desc);
pframe->d_len -= PB_SIZE;
unit->stats.pb.tx_max_retries++;
- PB_LOG (("__write_pb_list : max retries for pb in pframe 0x%x", pframe));
+ PB_LOG (("__write_pb_list : max retries for pb in pframe 0x%x",
+ pframe));
continue;
}
*addr++ = (uint32_t) pb_desc->pb;
pb_num++;
tx_last_slice_index += 4;
}
- PB_LOG (("__write_pb_list : wrote %d slices for pframe 0x%x", pb_num, pframe));
+ PB_LOG (("__write_pb_list : wrote %d slices for pframe 0x%x", pb_num,
+ pframe));
unit->PMD->tx_last_slice_index = tx_last_slice_index;
return pb_num;
}
-int __write_contiguous_pbs (struct plc_drv_unit *unit, uint16_t tx_first_slice_index, struct plcp_frame *pframe,
- int slices, uint8_t * buf)
+int __write_contiguous_pbs (struct plc_drv_unit *unit,
+ uint16_t tx_first_slice_index,
+ struct plcp_frame *pframe, int slices,
+ uint8_t * buf)
{
int pb_num = slices;
uint16_t tx_last_slice_index;
- uint32_t *addr = (uint32_t *) (PMD_PHLIC_DATA_REGBASE + tx_first_slice_index);
+ uint32_t *addr =
+ (uint32_t *) (PMD_PHLIC_DATA_REGBASE + tx_first_slice_index);
pmd_set_tx_first_slice_index (tx_first_slice_index);
tx_last_slice_index = tx_first_slice_index - 4;
@@ -86,8 +93,8 @@ int __write_contiguous_pbs (struct plc_drv_unit *unit, uint16_t tx_first_slice_i
return slices;
}
-int __write_pbs (struct plc_drv_unit *unit, uint16_t tx_first_slice_index, struct plcp_frame *pframe, int slices,
- uint8_t * buf)
+int __write_pbs (struct plc_drv_unit *unit, uint16_t tx_first_slice_index,
+ struct plcp_frame *pframe, int slices, uint8_t * buf)
{
int pb_num;
uint32_t msr;
@@ -99,13 +106,15 @@ int __write_pbs (struct plc_drv_unit *unit, uint16_t tx_first_slice_index, struc
}
else
{
- pb_num = __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, slices, buf);
+ pb_num =
+ __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, slices, buf);
}
LOCK_RESTORE (msr);
return pb_num;
}
-int __read_pb_list (struct plc_drv_unit *unit, uint8_t * buf, struct plcp_frame *pframe)
+int __read_pb_list (struct plc_drv_unit *unit, uint8_t * buf,
+ struct plcp_frame *pframe)
{
int pb_num = 0;
uint32_t msr;
@@ -123,7 +132,8 @@ int __read_pb_list (struct plc_drv_unit *unit, uint8_t * buf, struct plcp_frame
pb_free (pb_desc);
pframe->d_len -= PB_SIZE;
unit->stats.pb.tx_max_retries++;
- PB_LOG (("__read_pb_list : max retries for pb in pframe 0x%x", pframe));
+ PB_LOG (("__read_pb_list : max retries for pb in pframe 0x%x",
+ pframe));
continue;
}
PLCP_LOG (pb_num, "__read_pb_list copy from", pb_desc->pb);
@@ -136,7 +146,8 @@ int __read_pb_list (struct plc_drv_unit *unit, uint8_t * buf, struct plcp_frame
return pb_num;
}
-void plcp_build_lookup_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_build_lookup_fec (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int slice, bits, slots;
@@ -148,10 +159,13 @@ void plcp_build_lookup_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uch
for (slice = 0; slice <= PLCP_MAX_SLICES; slice++)
{
bits = slice * PMD_SLICE_SIZE_WITH_REED_SOLOMON * 12;
- slots = (bits + uchannel->lookup.bits_per_slot - 1) / uchannel->lookup.bits_per_slot;
+ slots =
+ (bits + uchannel->lookup.bits_per_slot -
+ 1) / uchannel->lookup.bits_per_slot;
uchannel->lookup.payload_slots[slice] = slots;
uchannel->lookup.periodic_ref_slots[slice] =
- ref_slots (slots, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref);
+ ref_slots (slots, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref);
}
}
else
@@ -164,7 +178,8 @@ void plcp_build_lookup_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uch
}
}
-int plcp_mtu_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int slots)
+int plcp_mtu_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel,
+ int slots)
{
int bits, slices;
@@ -172,7 +187,9 @@ int plcp_mtu_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int
int refs; /* number of periodic ref */
- refs = ref_slots (slots, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref);
+ refs =
+ ref_slots (slots, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref);
slots -= refs;
if (slots <= 0)
{
@@ -180,7 +197,9 @@ int plcp_mtu_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int
}
bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits / (PMD_BYTE_SIZE_WITH_VITERBI * PMD_SLICE_SIZE_WITH_REED_SOLOMON);
+ slices =
+ bits / (PMD_BYTE_SIZE_WITH_VITERBI *
+ PMD_SLICE_SIZE_WITH_REED_SOLOMON);
if (slices > PLCP_MAX_SLICES)
{
slices = PLCP_MAX_SLICES;
@@ -203,7 +222,9 @@ int plcp_mtu_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel, int
return mtu;
}
-void plcp_setup_rx_payload (struct plc_drv_unit *unit, struct plcp_frame *pframe, uint8_t * buf, int slices)
+void plcp_setup_rx_payload (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, uint8_t * buf,
+ int slices)
{
int slots;
@@ -218,7 +239,9 @@ void plcp_setup_rx_payload (struct plc_drv_unit *unit, struct plcp_frame *pframe
if (slices > 0)
{
/* compute payload symbols */
- slots = uchannel->lookup.payload_slots[slices] + uchannel->lookup.periodic_ref_slots[slices];
+ slots =
+ uchannel->lookup.payload_slots[slices] +
+ uchannel->lookup.periodic_ref_slots[slices];
symbols = slots * pframe->nb_rx_bands - 1;
unit->PMD->rx_payload_nb_symbols = symbols;
unit->PMD->rx_high_slice_ad = (uint32_t) buf >> 16;
@@ -253,7 +276,8 @@ int plcp_rx_start_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
return slices;
}
-int plcp_rx_start_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_start_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices = pframe->control->l_frm.slices;
@@ -294,7 +318,8 @@ int plcp_rx_more_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
unit->PMD->eof_irq_mask = 1;
PLCP_LOG (0, "pframe->rx_bands", pframe->rx_bands);
PLCP_LOG (0, "unit->used_bands", unit->used_bands);
- PLCP_LOG (0, "uchannel->unused_bands", pframe->uchannel->unused_bands);
+ PLCP_LOG (0, "uchannel->unused_bands",
+ pframe->uchannel->unused_bands);
return -1;
}
else
@@ -309,7 +334,8 @@ int plcp_rx_more_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
unsigned long reedS;
unsigned long rs_count;
-INLINE static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe, int slice)
+INLINE static int __rx_slice (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, int slice)
{
#ifdef CONFIG_PLC_MEASURES
static int nb_error_cont = 0; /* nb of contiguous error in a pframe */
@@ -421,7 +447,9 @@ int plcp_rx_end_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
}
}
-INLINE int __write_payload_desc (struct plc_drv_unit *unit, struct plcp_frame *pframe, int slices, uint8_t * buf)
+INLINE int __write_payload_desc (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe, int slices,
+ uint8_t * buf)
{
int slots;
@@ -432,7 +460,9 @@ INLINE int __write_payload_desc (struct plc_drv_unit *unit, struct plcp_frame *p
/* slices = plcp_write_seq_slices(unit, PMD_PB_BASE, pframe, slices, buf);*/
/* if (slices == 0)*/
/* pframe->state = PLCP_FREE;*/
- slots = pframe->uchannel->lookup.payload_slots[slices] + pframe->uchannel->lookup.periodic_ref_slots[slices];
+ slots =
+ pframe->uchannel->lookup.payload_slots[slices] +
+ pframe->uchannel->lookup.periodic_ref_slots[slices];
symbols = unit->nb_bands * slots;
if (symbols > 0)
{
@@ -450,7 +480,8 @@ INLINE int __write_payload_desc (struct plc_drv_unit *unit, struct plcp_frame *p
return slices;
}
-int plcp_tx_start_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_tx_start_control (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices;
@@ -459,7 +490,8 @@ int plcp_tx_start_control (struct plc_drv_unit *unit, struct plcp_frame *pframe)
// now we can send slices on PLCP_CID_NONE, it increases the plcp frame duration
slices = (pframe->d_len + PMD_SLICE_SIZE - 1) / PMD_SLICE_SIZE;
// but dont use fec
- __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, 0 /*slices */ , plcp_rx_robust_fec);
+ __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, 0 /*slices */ ,
+ plcp_rx_robust_fec);
__write_payload_desc (unit, pframe, slices, pframe->d_buf);
return slices;
}
@@ -478,7 +510,8 @@ int plcp_tx_start_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
// return __write_first_slices(unit, pframe, slices, pframe->d_buf);
}
-int plcp_tx_start_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_tx_start_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices;
@@ -491,7 +524,8 @@ int plcp_tx_start_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pfra
}
-int plcp_tx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_tx_start_chunks (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slices;
@@ -510,10 +544,12 @@ int plcp_tx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
if (!list_empty (&pframe->pb_list))
{
__read_pb_list (unit, pframe->d_buf, pframe);
- PLCP_LOG (txstart_isr_date, "__read_pb_list pframe->d_len", pframe->d_len);
+ PLCP_LOG (txstart_isr_date, "__read_pb_list pframe->d_len",
+ pframe->d_len);
}
LOCK_RESTORE (msr);
- slices = build_payload (plcp_rx_robust_fec, pframe->d_buf, pframe->d_len);
+ slices =
+ build_payload (plcp_rx_robust_fec, pframe->d_buf, pframe->d_len);
PLCP_LOG (txstart_isr_date, "phy slices", slices);
slots = pframe->uchannel->lookup.payload_slots[slices];
@@ -525,7 +561,8 @@ int plcp_tx_start_chunks (struct plc_drv_unit *unit, struct plcp_frame *pframe)
slices = 0;
symbols = 0;
}
- __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, slices, plcp_rx_robust_fec);
+ __write_contiguous_pbs (unit, PMD_PB_BASE, pframe, slices,
+ plcp_rx_robust_fec);
__write_payload_desc (unit, pframe, slices, plcp_rx_robust_fec);
return slices;
}
diff --git a/app/sm-plc-drv/src/plcp_mode_robust_fec.c b/app/sm-plc-drv/src/plcp_mode_robust_fec.c
index b38f9d225f..e131a7ad95 100755
--- a/app/sm-plc-drv/src/plcp_mode_robust_fec.c
+++ b/app/sm-plc-drv/src/plcp_mode_robust_fec.c
@@ -26,7 +26,8 @@ void *robust_fec_slice_addr[PMD_MAX_SLICES];
int robust_fec_slice_band[PMD_MAX_SLICES];
int robust_fec_slices = 0;
-void plcp_build_lookup_robust_fec (struct plc_drv_unit *unit, struct plcp_uchannel *uchannel)
+void plcp_build_lookup_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_uchannel *uchannel)
{
int slice, slots, band, bits, bits_per_slot;
@@ -37,7 +38,8 @@ void plcp_build_lookup_robust_fec (struct plc_drv_unit *unit, struct plcp_uchann
bits_per_slot = PMD_MAX_BANDS * PMD_CARRIERS_PER_BAND * 8 /* QAM256 */ ;
for (band = 1; band < PMD_MAX_BANDS; band++)
{
- if (band_is_used (unit, band) && !((band << 1) & uchannel->unused_bands))
+ if (band_is_used (unit, band) &&
+ !((band << 1) & uchannel->unused_bands))
{
if (uchannel->bits_per_band[band] < bits_per_slot)
{
@@ -63,7 +65,8 @@ void plcp_build_lookup_robust_fec (struct plc_drv_unit *unit, struct plcp_uchann
if (unit->plcp.config.ref_interval)
{
uchannel->lookup.periodic_ref_slots[slice] =
- ref_slots (slots, unit->plcp.config.ref_interval, unit->plcp.config.nb_periodic_ref);
+ ref_slots (slots, unit->plcp.config.ref_interval,
+ unit->plcp.config.nb_periodic_ref);
}
else
{
@@ -82,7 +85,8 @@ void plcp_build_lookup_robust_fec (struct plc_drv_unit *unit, struct plcp_uchann
}
int plcp_mtu_robust_fec (struct plc_drv_unit *unit,
- struct plcp_uchannel *uchannel, int slots /*slots de data, ref periodics inclus */ )
+ struct plcp_uchannel *uchannel,
+ int slots /*slots de data, ref periodics inclus */ )
{
int bits, slices, slices_n;
@@ -91,7 +95,9 @@ int plcp_mtu_robust_fec (struct plc_drv_unit *unit,
if (unit->plcp.config.ref_interval)
{
- refs = (slots / unit->plcp.config.ref_interval) * unit->plcp.config.nb_periodic_ref;
+ refs =
+ (slots / unit->plcp.config.ref_interval) *
+ unit->plcp.config.nb_periodic_ref;
slots -= refs;
if (slots <= 0)
{
@@ -100,7 +106,9 @@ int plcp_mtu_robust_fec (struct plc_drv_unit *unit,
}
bits = uchannel->lookup.bits_per_slot * slots;
- slices = bits / (PMD_BYTE_SIZE_WITH_VITERBI * PMD_SLICE_SIZE_WITH_REED_SOLOMON);
+ slices =
+ bits / (PMD_BYTE_SIZE_WITH_VITERBI *
+ PMD_SLICE_SIZE_WITH_REED_SOLOMON);
slices_n = unit->nb_bands * slices;
/*
@@ -130,7 +138,8 @@ int plcp_mtu_robust_fec (struct plc_drv_unit *unit,
return mtu;
}
-int plcp_rx_more_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_more_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
/* even if some starts were not detected, we can receive data
@@ -141,7 +150,8 @@ int plcp_rx_more_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pfram
return 0;
}
-static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe, int n)
+static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe,
+ int n)
{
int band;
@@ -192,7 +202,8 @@ static int __rx_slice (struct plc_drv_unit *unit, struct plcp_frame *pframe, int
return 0;
}
-int plcp_rx_data_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_data_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int m;
@@ -214,7 +225,8 @@ int plcp_rx_data_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pfram
return 0;
}
-int plcp_rx_end_robust_fec (struct plc_drv_unit *unit, struct plcp_frame *pframe)
+int plcp_rx_end_robust_fec (struct plc_drv_unit *unit,
+ struct plcp_frame *pframe)
{
int slice;
@@ -257,7 +269,8 @@ void plcp_robust_fec_status (struct plc_drv_unit *unit)
for (slice = 0; slice < robust_fec_slices; slice++)
{
RT_PRINTK ("slice %d ......... band %d / addr 0x%08x\n",
- slice, robust_fec_slice_band[slice], robust_fec_slice_addr[slice]);
+ slice, robust_fec_slice_band[slice],
+ robust_fec_slice_addr[slice]);
}
}
diff --git a/app/sm-plc-drv/src/plcp_notches.c b/app/sm-plc-drv/src/plcp_notches.c
index 0757c5519c..4fa1cd1d08 100644
--- a/app/sm-plc-drv/src/plcp_notches.c
+++ b/app/sm-plc-drv/src/plcp_notches.c
@@ -102,7 +102,8 @@ void plcp_force_notches (int idx)
int plcp_setNotchs (struct system_carrier_tab *systemCarrierTab)
{
/* setup default notches */
- memcpy (&notches[NOTCHES_DEFAULT], systemCarrierTab->groupNotch, sizeof (struct pmd_carrier_map));
+ memcpy (&notches[NOTCHES_DEFAULT], systemCarrierTab->groupNotch,
+ sizeof (struct pmd_carrier_map));
plcp_force_notches (NOTCHES_DEFAULT);
return 0;
}
diff --git a/app/sm-plc-drv/src/plcp_traces.c b/app/sm-plc-drv/src/plcp_traces.c
index bdc21d16d9..bef80b433f 100644
--- a/app/sm-plc-drv/src/plcp_traces.c
+++ b/app/sm-plc-drv/src/plcp_traces.c
@@ -52,7 +52,8 @@ struct plcp_trace_head __plcp_traces[2];
struct plcp_trace_head *plcp_traces = &__plcp_traces[0];
int plcp_traces_cur = 0;
-void plcp_trace (char *file, uint16_t line, uint16_t date, char *fmt, void *arg1, void *arg2, void *arg3, void *arg4)
+void plcp_trace (char *file, uint16_t line, uint16_t date, char *fmt,
+ void *arg1, void *arg2, void *arg3, void *arg4)
{
struct plcp_trace_entry *entry = &plcp_traces->traces[plcp_traces->index];
@@ -71,7 +72,8 @@ void plcp_trace (char *file, uint16_t line, uint16_t date, char *fmt, void *arg1
}
}
-int plcp_traces_log (char *buf, char **start, off_t offset, int count, int *eof, void *data)
+int plcp_traces_log (char *buf, char **start, off_t offset, int count,
+ int *eof, void *data)
{
static int i;
static int n;
@@ -110,10 +112,11 @@ int plcp_traces_log (char *buf, char **start, off_t offset, int count, int *eof,
{
if (traces->traces[i].line != 0)
{
- p += sprintf (p, "%d %s:%d ", traces->traces[i].date, traces->traces[i].file, traces->traces[i].line);
- p += sprintf (p, traces->traces[i].fmt,
- traces->traces[i].arg1,
- traces->traces[i].arg2, traces->traces[i].arg3, traces->traces[i].arg4);
+ p += sprintf (p, "%d %s:%d ", traces->traces[i].date,
+ traces->traces[i].file, traces->traces[i].line);
+ p += sprintf (p, traces->traces[i].fmt, traces->traces[i].arg1,
+ traces->traces[i].arg2, traces->traces[i].arg3,
+ traces->traces[i].arg4);
p += sprintf (p, "\n");
}
if (++i >= L_MAX)
@@ -182,7 +185,8 @@ static void tx_end (struct plc_drv_unit *unit, struct plcp_frame *frame)
int date = plcp_get_timer (unit);
PLCP_TRACE (date, "tx_end %s %s",
- ma_type_name[frame->control->l_frm.type], ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
+ ma_type_name[frame->control->l_frm.type],
+ ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
if (original_callbacks_fn->tx_end)
{
original_callbacks_fn->tx_end (unit, frame);
@@ -210,7 +214,8 @@ static void rx_end (struct plc_drv_unit *unit, struct plcp_frame *frame)
int date = plcp_get_timer (unit);
PLCP_TRACE (date, "rx_end %s %s",
- ma_type_name[frame->control->l_frm.type], ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
+ ma_type_name[frame->control->l_frm.type],
+ ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
if (original_callbacks_fn->rx_end)
{
original_callbacks_fn->rx_end (unit, frame);
@@ -249,7 +254,8 @@ static void tx_status (struct plc_drv_unit *unit, struct plcp_frame *frame)
int date = plcp_get_timer (unit);
PLCP_TRACE (date, "tx_status",
- ma_type_name[frame->control->l_frm.type], ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
+ ma_type_name[frame->control->l_frm.type],
+ ma_subtype_name[frame->control->l_frm.subtype], NULL, NULL);
if (original_callbacks_fn->tx_status)
{
original_callbacks_fn->tx_status (unit, frame);
diff --git a/app/sm-plc-drv/src/ppc_r2l.c b/app/sm-plc-drv/src/ppc_r2l.c
index 4dea52220f..c118706a1e 100644
--- a/app/sm-plc-drv/src/ppc_r2l.c
+++ b/app/sm-plc-drv/src/ppc_r2l.c
@@ -9,7 +9,8 @@ int cirbuf_write (struct cirbuf *buf, const void *entry)
memcpy (buf->end, entry, buf->entry_size);
buf->fill_count++;
buf->end = (char *) buf->end + buf->entry_size;
- if ((char *) buf->end == (char *) buf->begin + buf->n * buf->entry_size)
+ if ((char *) buf->end ==
+ (char *) buf->begin + buf->n * buf->entry_size)
buf->end = buf->data;
return 1;
}
@@ -23,7 +24,8 @@ int cirbuf_read (struct cirbuf *buf, void *entry)
memcpy (entry, buf->begin, buf->entry_size);
buf->fill_count--;
buf->begin = (char *) buf->begin + buf->entry_size;
- if ((char *) buf->begin == (char *) buf->begin + buf->n * buf->entry_size)
+ if ((char *) buf->begin ==
+ (char *) buf->begin + buf->n * buf->entry_size)
buf->begin = buf->data;
return 1;
}
diff --git a/app/sm-plc-drv/src/ppc_tst.c b/app/sm-plc-drv/src/ppc_tst.c
index c0182fdc52..fdf0b079c8 100644
--- a/app/sm-plc-drv/src/ppc_tst.c
+++ b/app/sm-plc-drv/src/ppc_tst.c
@@ -12,7 +12,35 @@
#include "plc_ppc.h"
+struct MJ_ARP {
+ mac_t hw_addr;
+ tei_t tei;
+};
+
+struct MJ_RTEI {
+ unsigned char last;
+ tei_t dtei;
+};
+
+struct ARRP {
+ unsigned char dstmac[6], srcmac[6];
+ unsigned short type, ether, proto;
+ unsigned char hsize, psize;
+ unsigned short opcode;
+ unsigned char sndmac1[6], sndip[4], dstmac1[6], dstip[4];
+
+} __attribute__ ((packed));
+
+
+extern int l2_repeating (int enabled);
+extern int l2_carp_insert (mac_t hw_addr, tei_t dtei, void *priv,
+ tei_t * old_dtei, void **old_priv);
+
char buf[236];
+struct MJ_ARP mja[100];
+int na = 0;
+struct MJ_RTEI mjar[100];
+int nar = 0;
int tst_fun (void *arg)
{
@@ -34,3 +62,268 @@ int tst_fun (void *arg)
}
return 0;
}
+
+/* Milenko Jelisavcic testing */
+int TST_tei_resolve = TEI_ALL_CELL;
+int TST_tei_next_hop = TEI_ALL_CELL;
+unsigned short tei_test = 0x0000;
+
+#define SWAP_B(s) { s= ((s >> 8) & 0xFF) | (s << 8);}
+
+int TST_l2_carp_resolve (struct sk_buff *skb, tei_t * dtei)
+{
+ int i;
+ char tempa[256];
+ unsigned char *ad = skb->data;
+ struct ARRP arpa;
+
+ *dtei = ad[5]; //TST_tei_resolve
+
+ for (i = 0; i < na; i++)
+ if (!memcmp (&mja[i].hw_addr, ad, sizeof (mac_t)))
+ {
+ sprintf (tempa,
+ "%02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x %02X%02X ",
+ ad[0], ad[1], ad[2], ad[3], ad[4], ad[5], ad[6], ad[7],
+ ad[8], ad[9], ad[10], ad[11], ad[12], ad[13]);
+ *dtei = mja[i].tei;
+ //printk("CARP RESOLVED: %s %d %d \n", tempa, *dtei, i);
+ return 0;
+ }
+
+ memcpy (&arpa, skb->data, sizeof (arpa));
+ SWAP_B (arpa.type) SWAP_B (arpa.opcode) if ((arpa.type == 0x0806) && ((arpa.opcode == 0x0001) || (arpa.opcode == 0x0002))) // it is ARPing
+ {
+ if ((arpa.dstip[0] == 192) && (arpa.dstip[1] == 168))
+ {
+ int i, found = 0;
+
+ for (i = 0; i < nar; i++)
+ if (mjar[i].last == arpa.dstip[3])
+ {
+ *dtei = mjar[i].dtei;
+ found = 1;
+ break;
+ }
+ if (!found)
+ *dtei = arpa.dstip[3];
+ // printk("ARP RESOLVED: %d \n", *dtei);
+ }
+ return 0;
+ }
+
+ if (arpa.type == 0x0026)
+ {
+ *dtei = TEI_ALL_CELL;
+ //printk("ALL_CELL:\n");
+ return 0;
+ }
+
+ if (tei_test & 0x0001)
+ {
+ printk ("TEST_RESOLVE:\n");
+ //*dtei =TST_tei_resolve;
+ return 0;
+ }
+ else
+ return -1;
+}
+
+int TST_l2_carp_update (struct sk_buff *skb, tei_t * stei)
+{
+ int i, isNew = 0;
+ static int cira = 0;
+ char tempa[256];
+ void *nula = NULL;
+ mac_t hw_addr;
+ unsigned char *ad = (unsigned char *) hw_addr;
+ tei_t otei;
+
+ memcpy (hw_addr, skb->data + 6, sizeof (mac_t));
+
+ l2_carp_insert (hw_addr, *stei, NULL, &otei, &nula);
+
+ for (i = 0; i < na; i++)
+ if (!memcmp (mja[i].hw_addr, hw_addr, sizeof (mac_t)))
+ {
+ mja[i].tei = *stei;
+ return 0;
+ }
+
+ if (i == 100)
+ {
+ cira = (cira + 1) % 100;
+ i = cira;
+ }
+ else
+ na++;
+ memcpy (mja[i].hw_addr, hw_addr, sizeof (mac_t));
+ mja[i].tei = *stei;
+
+ // only if it is new entry show entry..
+ sprintf (tempa, "%02x:%02x:%02x:%02x:%02x:%02x %d", ad[0], ad[1], ad[2],
+ ad[3], ad[4], ad[5], *stei);
+ //printk(" %s %d carp updated!!\n", tempa, i);
+
+ return 0;
+}
+
+int TST_l2_route_next_hop (tei_t dtei, tei_t * hop_dtei, int len)
+{
+ struct plcp_host *host = plcp_get_host_by_TEI (dtei);
+
+ if (host)
+ {
+ *hop_dtei = dtei;
+ //printk("next hop local\n");
+ return 0;
+ }
+ *hop_dtei = TST_tei_next_hop;
+ //printk("next hop %d !!\n", TST_tei_next_hop);
+ return 0;
+}
+
+
+#define EAT_WS(p) { while(*p && *p==' ') p++; while (*p && p[strlen(p)-1]==' ') {p[strlen(p)-1]='\0';}}
+/* function for different testing of ppc functionality */
+void tst_fun_ppc_mj (char *msg)
+{
+ char lmsg[1024], *pmsg = lmsg, value[128];
+ int mark, sel;
+
+ strcpy (pmsg, msg);
+
+ EAT_WS (pmsg) mark = sscanf (pmsg, "%s", value);
+
+ if (mark == 0)
+ return;
+
+ pmsg += strlen (value);
+
+ EAT_WS (pmsg) mark = sscanf (value, "%d", &sel);
+
+ switch (sel)
+ {
+ case 1:
+ {
+ if (sscanf (pmsg, "%d", &sel) == 1)
+ l2_repeating (sel);
+ }
+ break;
+ case 2:
+ {
+ l2_ppc =
+ (struct l2_client_ops *)
+ kmalloc (sizeof (struct l2_client_ops), GFP_ATOMIC);
+ ASSERT (l2_ppc);
+ memset (l2_ppc, 0, sizeof (struct l2_client_ops));
+ l2_ppc->l2_carp_resolve = TST_l2_carp_resolve;
+ l2_ppc->l2_carp_update = TST_l2_carp_update;
+ l2_ppc->l2_route_next_hop = TST_l2_route_next_hop;
+ printk ("l2_ppc locally setted\n");
+ }
+ break;
+ case 3:
+ {
+ kfree (l2_ppc);
+ l2_ppc = 0;
+ printk ("l2_ppc kfreed\n");
+ }
+ break;
+ case 4: /* setting routing parameters */
+ {
+ int next_hop, dtei;
+
+ if (sscanf (pmsg, "%d %d", &dtei, &next_hop) == 2)
+ {
+ TST_tei_resolve = dtei;
+ TST_tei_next_hop = next_hop;
+ printk ("dtei next_hop setted\n");
+ }
+ }
+ break;
+ case 5:
+ {
+ int dtei;
+
+ if (sscanf (pmsg, "%d", &dtei) == 1)
+ {
+ struct plcp_host *host = plcp_get_host_by_TEI (dtei);
+
+ printk ("HOST %p\n", host);
+ }
+ }
+ break;
+ case 6:
+ {
+ int adr[6], dtei;
+
+ if (sscanf
+ (pmsg, "%x:%x:%x:%x:%x:%x: %d", adr, adr + 1, adr + 2,
+ adr + 3, adr + 4, adr + 5, &dtei) == 7)
+ {
+ printk ("CARP UPDATE\n");
+ }
+ }
+ break;
+ case 7:
+ {
+ int adr[6], dtei;
+
+ if (sscanf (pmsg, "%d", &tei_test) == 1)
+ {
+ printk ("TEI_TEST UPDATE\n");
+ }
+ }
+ break;
+ case 8:
+ {
+ int adr, dtei;
+
+ if (sscanf (pmsg, "%d %d", &adr, &dtei) == 2)
+ {
+ int i = 0, ima = 0;
+ static int inta = 0;
+
+ for (i = 0; i < nar; i++)
+ if (mjar[i].last == adr)
+ {
+ mjar[i].dtei = dtei;
+ break;
+ }
+ if (nar == 100)
+ {
+ i = inta++ % 100;
+ }
+ else
+ {
+ i = nar++;
+ }
+ mjar[i].last = adr;
+ mjar[i].dtei = dtei;
+
+ printk ("CARP UPDATE, ADR+DTEI\n");
+ }
+ }
+ break;
+ case 9:
+ {
+ na = 0;
+ }
+ break;
+ } /* end of switch */
+
+}
+
+void dump_skb (unsigned char *ad)
+{
+ printk ("DST %02x:%02x:%02x:%02x:%02x:%02x ", ad[0], ad[1], ad[2], ad[3],
+ ad[4], ad[5]);
+ ad += 6;
+ printk ("SRC %02x:%02x:%02x:%02x:%02x:%02x ", ad[0], ad[1], ad[2], ad[3],
+ ad[4], ad[5]);
+ ad += 6;
+ printk ("TYPE %02x%02x\n", ad[0], ad[1]);
+}
+
+/* end of Milenko Jelisavcic testing */
diff --git a/app/sm-plc-drv/src/qsort.c b/app/sm-plc-drv/src/qsort.c
index 015d2731c8..031bd7a66f 100644
--- a/app/sm-plc-drv/src/qsort.c
+++ b/app/sm-plc-drv/src/qsort.c
@@ -66,13 +66,19 @@ static __inline void swapfunc (char *a, char *b, int n, int swaptype)
#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
-static __inline char *med3 (char *a, char *b, char *c, int (*cmp) (const void *, const void *))
+static __inline char *med3 (char *a, char *b, char *c,
+ int (*cmp) (const void *, const void *))
{
return cmp (a, b) < 0 ?
- (cmp (b, c) < 0 ? b : (cmp (a, c) < 0 ? c : a)) : (cmp (b, c) > 0 ? b : (cmp (a, c) < 0 ? a : c));
+ (cmp (b, c) < 0 ? b : (cmp (a, c) < 0 ? c : a)) : (cmp (b, c) >
+ 0 ? b : (cmp (a, c)
+ <
+ 0 ? a :
+ c));
}
-void qsort (void *aa, size_t n, size_t es, int (*cmp) (const void *, const void *))
+void qsort (void *aa, size_t n, size_t es,
+ int (*cmp) (const void *, const void *))
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
int d, r, swaptype, swap_cnt;
diff --git a/app/sm-plc-drv/src/test_core.c b/app/sm-plc-drv/src/test_core.c
index 1bc96dfb9b..56d0bfea4c 100644
--- a/app/sm-plc-drv/src/test_core.c
+++ b/app/sm-plc-drv/src/test_core.c
@@ -91,7 +91,8 @@ int make_test_frame (struct testioctl *test)
}
//détection de fin d'emission d'une trame de test type raw
-void test_raw_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void test_raw_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
if (failed)
{
@@ -119,7 +120,8 @@ void test_raw_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, stru
}
//détection de fin d'emission d'une trame de test type ber
-void test_ber_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void test_ber_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
if (failed)
{
@@ -147,7 +149,8 @@ void test_ber_handle_tx (struct plc_drv_unit *unit, struct plcp_host *host, stru
}
//réception d'une trame de test type raw
-void test_raw_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void test_raw_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
struct testraweth *envoi;
uint32_t i;
@@ -195,14 +198,16 @@ void test_raw_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, stru
{
//prepare le donnees a envoyer au mode user
- memcpy (&envoi->ctrl, pframe->control, sizeof (union plcp_control));
+ memcpy (&envoi->ctrl, pframe->control,
+ sizeof (union plcp_control));
memcpy (envoi->payload, pframe->d_buf, pframe->d_len);
//mise dans la queue
if (test_ring[test_msg_head].type == 0)
{
test_ring[test_msg_head].type = TEST_TYPE_RAW_ETHCTRL;
- test_ring[test_msg_head].len = sizeof (union plcp_control) + pframe->d_len;
+ test_ring[test_msg_head].len =
+ sizeof (union plcp_control) + pframe->d_len;
test_ring[test_msg_head].buf.raw = envoi;
test_msg_head++;
if (test_msg_head >= TEST_RING_SIZE)
@@ -220,7 +225,8 @@ void test_raw_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, stru
//réception d'une trame de test type ber
extern uint32_t rxmem[FEC_MEMSIZE / 4];
-void test_ber_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, struct plcp_frame *pframe, bool failed)
+void test_ber_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host,
+ struct plcp_frame *pframe, bool failed)
{
struct testbereth *envoi;
uint32_t i;
@@ -255,7 +261,9 @@ void test_ber_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, stru
for (band = 1; band < PMD_MAX_BANDS; band++)
for (group = 0; group < PMD_GROUPS_PER_BAND; group++)
envoi->unused_bitmap[band][group] =
- CM_GROUP (band, group, &notches[NOTCHES_DEFAULT]) | plcp_pilots_bitmap[band][group];
+ CM_GROUP (band, group,
+ &notches[NOTCHES_DEFAULT]) |
+ plcp_pilots_bitmap[band][group];
// copie du noise
for (band = 1; band < PMD_MAX_BANDS; band++)
@@ -273,15 +281,21 @@ void test_ber_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, stru
if (band_is_used (unit, band))
{
envoi->rx_qual[band] =
- *(struct pmd_band_quality *) (PMD_PHLIC_DATA_REGBASE + PMD_BAND (band) + PMD_BAND_RX_QUALITY);
+ *(struct pmd_band_quality *) (PMD_PHLIC_DATA_REGBASE +
+ PMD_BAND (band) +
+ PMD_BAND_RX_QUALITY);
}
}
//copie de la memoire de debug du FEC
- TEST_PRINTK ("copy FEC mem, slices=%d", pframe->control->l_frm.slices);
- ber_copy_fec_mem ((uint16_t *) rxmem, (uint16_t *) PMD_FEC_RX_MEM, pframe->control->l_frm.slices);
- TEST_PRINTK ("shrink FEC mem dst=%p src=%p len=%d", envoi->fec_mem, rxmem, FEC_SHRINKED_MEMSIZE);
- ber_mem_shrink ((uint8_t *) envoi->fec_mem, (uint16_t *) rxmem, FEC_SHRINKED_MEMSIZE);
+ TEST_PRINTK ("copy FEC mem, slices=%d",
+ pframe->control->l_frm.slices);
+ ber_copy_fec_mem ((uint16_t *) rxmem, (uint16_t *) PMD_FEC_RX_MEM,
+ pframe->control->l_frm.slices);
+ TEST_PRINTK ("shrink FEC mem dst=%p src=%p len=%d", envoi->fec_mem,
+ rxmem, FEC_SHRINKED_MEMSIZE);
+ ber_mem_shrink ((uint8_t *) envoi->fec_mem, (uint16_t *) rxmem,
+ FEC_SHRINKED_MEMSIZE);
//d_len = longueur reelle de la pframe
if (pframe->control->l_frm.res[1])
@@ -303,7 +317,8 @@ void test_ber_handle_rx (struct plc_drv_unit *unit, struct plcp_host *host, stru
if (test_ring[test_msg_head].type == 0)
{
test_ring[test_msg_head].type = TEST_TYPE_BER_ETHCTRL;
- test_ring[test_msg_head].len = sizeof (struct testbereth) - MAX_PAYLOAD_LEN + pframe->d_len;
+ test_ring[test_msg_head].len =
+ sizeof (struct testbereth) - MAX_PAYLOAD_LEN + pframe->d_len;
test_ring[test_msg_head].buf.ber = envoi;
test_msg_head++;
if (test_msg_head >= TEST_RING_SIZE)
diff --git a/app/sm-version/src/version.c b/app/sm-version/src/version.c
index 1e90b894a8..b438b8a7d4 100644
--- a/app/sm-version/src/version.c
+++ b/app/sm-version/src/version.c
@@ -1,4 +1,4 @@
#include "version.h"
-char softwareVersionString[] = "rel-3-9-6";
-char builtDate[] = "Tues Sept 13 12:00:00 CET 2007";
+char softwareVersionString[] = "beta-3-9-8";
+char builtDate[] = "Tue Jan 17 12:15:00 CET 2007";
diff --git a/include/cristina/cpu.h b/include/cristina/cpu.h
index eaa77c20ab..01f4f16de4 100644
--- a/include/cristina/cpu.h
+++ b/include/cristina/cpu.h
@@ -3,7 +3,7 @@
* PUBLIC INTERFACE
*
* $Workfile: cpu.h $
-* $Author: antunes $
+* $Author: mstankovic $
*
* Copyright (C) 2002 by OSE Systems. All rights reserved.
*
diff --git a/include/cristina/device.h b/include/cristina/device.h
index 4710c38513..28cb92053f 100644
--- a/include/cristina/device.h
+++ b/include/cristina/device.h
@@ -2,9 +2,9 @@
* HEADER
*
* $Workfile: device.h $
- * Document no: @(#) 510/OSE66-6 $Revision: 1.1 $
- * $Author: antunes $
- * $Date: 2005/03/31 14:56:58 $
+ * Document no: @(#) 510/OSE66-6 $Revision: 1.1.20.2 $
+ * $Author: mstankovic $
+ * $Date: 2007/10/24 11:44:40 $
*
* Copyright (C) 1996 by ENEA OSE SYSTEMS AB. All rights reserved.
*
diff --git a/include/cristina/ethdev.h b/include/cristina/ethdev.h
index 2457f0a61f..fd5a64b044 100644
--- a/include/cristina/ethdev.h
+++ b/include/cristina/ethdev.h
@@ -2,9 +2,9 @@
* HEADER
*
* $Workfile: ethdev.h $
- * Document no: @(#) 510/OSE66-7 $Revision: 1.1 $
- * $Author: antunes $
- * $Date: 2005/03/31 14:56:59 $
+ * Document no: @(#) 510/OSE66-7 $Revision: 1.1.20.2 $
+ * $Author: mstankovic $
+ * $Date: 2007/10/24 11:44:40 $
*
* Copyright (C) 1996 by ENEA OSE SYSTEMS AB. All rights reserved.
*
@@ -35,6 +35,9 @@
****************************************************************************
* 2 HISTORY OF DEVELOPMENT.
* $Log: ethdev.h,v $
+ * Revision 1.1.20.2 2007/10/24 11:44:40 mstankovic
+ * add missing platforms
+ *
* Revision 1.1 2005/03/31 14:56:59 antunes
* Adding OSE file for RTAI features
*
diff --git a/include/cristina/tosv.h b/include/cristina/tosv.h
index 8992d18b56..5fdf93eb54 100644
--- a/include/cristina/tosv.h
+++ b/include/cristina/tosv.h
@@ -3,10 +3,10 @@
* HEADER
*
* $Workfile: tosv.h $
- * Document no: @(#) 510/OSE18-1 $Revision: 1.2 $
- * $Revision: 1.2 $
- * $Author: save $
- * $Date: 2005/10/18 09:10:35 $
+ * Document no: @(#) 510/OSE18-1 $Revision: 1.2.16.2 $
+ * $Revision: 1.2.16.2 $
+ * $Author: mstankovic $
+ * $Date: 2007/10/24 11:44:41 $
*
* Copyright (C) 1997 by ENEA OSE SYSTEMS AB. All rights reserved.
*
@@ -41,6 +41,9 @@
* 2 HISTORY OF DEVELOPMENT.
*
* $Log: tosv.h,v $
+ * Revision 1.2.16.2 2007/10/24 11:44:41 mstankovic
+ * add missing platforms
+ *
* Revision 1.2 2005/10/18 09:10:35 save
* deamon
*
diff --git a/include/platform.h b/include/platform.h
index 6829fa0263..3a08f6cdcf 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -1,18 +1,70 @@
/*!
- \file fcm3-board.h
- \brief FCM3 board specific features
-
\author Jean-Philippe Save (jean-philippe.save@spidcom.com)
\author (c) SPiDCOM Technologies
- \version 1.0
- \date 06/07/07
+ \version 1.1
+ \date 2008/01/28
*/
/************************************************************/
#ifndef PLATFORM_H
#define PLATFORM_H
+/************************
+ * Common part.
+ ************************/
+
+#ifdef CONFIG_VERSION_16M
+
+#define PB_POOL_RING_SIZE (1024)
+
+#define DMA_RX_POOL2_NB_BUFFER 8
+#define DMA_RX_POOL1_NB_BUFFER 16
+#define DMA_RX_POOL0_NB_BUFFER 128
+
+#define DMA_TX_POOL2_NB_BUFFER 8
+#define DMA_TX_POOL1_NB_BUFFER 16
+#define DMA_TX_POOL0_NB_BUFFER 128
+
+#else
+
+#define PB_POOL_RING_SIZE (2048)
+
+#define DMA_RX_POOL2_NB_BUFFER 32
+#define DMA_RX_POOL1_NB_BUFFER 32
+#define DMA_RX_POOL0_NB_BUFFER 128
+
+#define DMA_TX_POOL2_NB_BUFFER 32
+#define DMA_TX_POOL1_NB_BUFFER 32
+#define DMA_TX_POOL0_NB_BUFFER 128
+#endif
+
+// 224 is the frame size before FEC
+#define PB_DMA_POOL_SIZE (PB_POOL_RING_SIZE*224)
+
+// WARNING buffer must no cross a 64 KB boundary !
+
+#define DMA_POOL2_BUFFER_SIZE (32768)
+#define DMA_POOL1_BUFFER_SIZE (4096)
+#define DMA_POOL0_BUFFER_SIZE (256)
+
+#define DMA_RX_POOL2_SIZE (DMA_RX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
+#define DMA_RX_POOL1_SIZE (DMA_RX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
+#define DMA_RX_POOL0_SIZE (DMA_RX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
+
+#define DMA_TX_POOL2_SIZE (DMA_TX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
+#define DMA_TX_POOL1_SIZE (DMA_TX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
+#define DMA_TX_POOL0_SIZE (DMA_TX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
+
+#define DMA_RX_POOL_SIZE (DMA_RX_POOL2_SIZE + DMA_RX_POOL1_SIZE + DMA_RX_POOL0_SIZE)
+#define DMA_TX_POOL_SIZE (DMA_TX_POOL2_SIZE + DMA_TX_POOL1_SIZE + DMA_TX_POOL0_SIZE)
+
+#define PLC_DMA_ZONE_SIZE (DMA_RX_POOL_SIZE + DMA_TX_POOL_SIZE + PB_DMA_POOL_SIZE)
+/************************
+ * Part not-common.
+ ************************/
+
+
/* include types only if we're not using assembler */
#if !defined(__asm__) && !defined(__ASSEMBLY__) && !defined(__KERNEL__)
#include "sp_types.h"
diff --git a/include/platform_lisa.h b/include/platform_lisa.h
index ccff393011..132292afbe 100644
--- a/include/platform_lisa.h
+++ b/include/platform_lisa.h
@@ -13,38 +13,6 @@
#ifndef PLATFORM_LISA_H
#define PLATFORM_LISA_H
-/* TOP-LEVEL include to set/change the defines related to memory cunsomption/usage */
-//PLC Part
-#define PB_POOL_RING_SIZE (2048)
-#define PB_DMA_POOL_SIZE (PB_POOL_RING_SIZE*224)
-
-// WARNING buffer must no cross a 64 KB boundary !
-
-#define DMA_POOL2_BUFFER_SIZE (32768)
-#define DMA_POOL1_BUFFER_SIZE (4096)
-#define DMA_POOL0_BUFFER_SIZE (256)
-
-#define DMA_RX_POOL2_NB_BUFFER 32
-#define DMA_RX_POOL1_NB_BUFFER 32
-#define DMA_RX_POOL0_NB_BUFFER 128
-
-#define DMA_TX_POOL2_NB_BUFFER 32
-#define DMA_TX_POOL1_NB_BUFFER 32
-#define DMA_TX_POOL0_NB_BUFFER 128
-
-#define DMA_RX_POOL2_SIZE (DMA_RX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
-#define DMA_RX_POOL1_SIZE (DMA_RX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
-#define DMA_RX_POOL0_SIZE (DMA_RX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
-
-#define DMA_TX_POOL2_SIZE (DMA_TX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
-#define DMA_TX_POOL1_SIZE (DMA_TX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
-#define DMA_TX_POOL0_SIZE (DMA_TX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
-
-#define DMA_RX_POOL_SIZE (DMA_RX_POOL2_SIZE + DMA_RX_POOL1_SIZE + DMA_RX_POOL0_SIZE)
-#define DMA_TX_POOL_SIZE (DMA_TX_POOL2_SIZE + DMA_TX_POOL1_SIZE + DMA_TX_POOL0_SIZE)
-
-#define PLC_DMA_ZONE_SIZE (DMA_RX_POOL_SIZE + DMA_TX_POOL_SIZE + PB_DMA_POOL_SIZE)
-
// ETH Part
#define ETH_LEN (1522)
#define ETH_TX_RING_SIZE (32)
@@ -63,9 +31,6 @@
#define DMA_ZONE_USED_SIZE (PLC_DMA_ZONE_SIZE + ETH_DMA_ZONE_SIZE)
#define DMA_ZONE_SIZE (((DMA_ZONE_USED_SIZE + 0x100000 - 1) / 0x100000) * 0x100000)
-//#if DMA_ZONE_SIZE != 0x300000
-//#error "rrah DMA_ZONE_SIZE error"
-//#endif
//DMAs Base Addresses
#define ETH_DMA_RX_BASE (DMA_zone_base)
diff --git a/include/platform_tina.h b/include/platform_tina.h
index e475b487e1..eb3d0249c2 100644
--- a/include/platform_tina.h
+++ b/include/platform_tina.h
@@ -1,36 +1,6 @@
#ifndef PLATFORM_TINA_H
#define PLATFORM_TINA_H
-/* TOP-LEVEL include to set/change the defines related to memory cunsomption/usage */
-
-#define PB_POOL_RING_SIZE (2048)
-#define PB_DMA_POOL_SIZE (PB_POOL_RING_SIZE*224)
-
-// WARNING buffer must no cross a 64 KB boundary !
-
-#define DMA_POOL2_BUFFER_SIZE (32768)
-#define DMA_POOL1_BUFFER_SIZE (4096)
-#define DMA_POOL0_BUFFER_SIZE (256)
-
-#define DMA_RX_POOL2_NB_BUFFER 32
-#define DMA_RX_POOL1_NB_BUFFER 32
-#define DMA_RX_POOL0_NB_BUFFER 128
-
-#define DMA_TX_POOL2_NB_BUFFER 32
-#define DMA_TX_POOL1_NB_BUFFER 32
-#define DMA_TX_POOL0_NB_BUFFER 128
-
-#define DMA_RX_POOL2_SIZE (DMA_RX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
-#define DMA_RX_POOL1_SIZE (DMA_RX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
-#define DMA_RX_POOL0_SIZE (DMA_RX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
-
-#define DMA_TX_POOL2_SIZE (DMA_TX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
-#define DMA_TX_POOL1_SIZE (DMA_TX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
-#define DMA_TX_POOL0_SIZE (DMA_TX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)
-
-#define DMA_RX_POOL_SIZE (DMA_RX_POOL2_SIZE + DMA_RX_POOL1_SIZE + DMA_RX_POOL0_SIZE)
-#define DMA_TX_POOL_SIZE (DMA_TX_POOL2_SIZE + DMA_TX_POOL1_SIZE + DMA_TX_POOL0_SIZE)
-
#define ETH_DMA_ZONE_SIZE (32768*2)
#define PLC_DMA_ZONE_SIZE (DMA_RX_POOL_SIZE + DMA_TX_POOL_SIZE + PB_DMA_POOL_SIZE)
@@ -38,9 +8,6 @@
#define DMA_ZONE_USED_SIZE (PLC_DMA_ZONE_SIZE + ETH_DMA_ZONE_SIZE)
#define DMA_ZONE_SIZE (((DMA_ZONE_USED_SIZE + 0x100000 - 1) / 0x100000) * 0x100000)
-#if DMA_ZONE_SIZE != 0x300000
-#error "rrah"
-#endif
#define PLC_DMA_RX_BASE (DMA_zone_base+ETH_DMA_ZONE_SIZE)
#define PLC_DMA_TX_BASE (PLC_DMA_RX_BASE+DMA_RX_POOL_SIZE)
diff --git a/linux-2.6.10/GNUmakefile b/linux-2.6.10/GNUmakefile
index 89e34ee530..fbe3f01325 100755
--- a/linux-2.6.10/GNUmakefile
+++ b/linux-2.6.10/GNUmakefile
@@ -29,8 +29,9 @@ endif
SUBDIRS += agent linux-tools/bridge-utils-1.0.6 linux-tools/busybox-1.00 \
linux-tools/boa-0.94.14rc18 linux-tools/uphp\
linux-tools/iproute2 linux-tools/ebtables linux-tools/iptables linux-tools/tinyftp \
- linux-tools/safe-return linux-tools/udhcp linux-tools/wdd linux-tools/wishlist \
- agent linux-tools/rootfs image
+ linux-tools/safe-return linux-tools/udhcp linux-tools/openssl linux-tools/hostapd \
+ linux-tools/wpa_supplicant-0.4.8 linux-tools/wdd linux-tools/wishlist \
+ linux-tools/dconf agent linux-tools/rootfs image
SUBDIRS_CLEAN = $(foreach i,$(filter-out image,$(SUBDIRS)),../$i)
.PHONY: subdirs $(SUBDIRS) subdirs_clean $(SUBDIRS_CLEAN) linux_clean rtai_clean
@@ -75,13 +76,9 @@ $(filter-out image rtai-3.1-2.6 agent linux-tools/rootfs linux-tools/igmp_filter
@echo ""
linux-tools/rootfs:
- @if grep -q '^CONFIG_ARCH_FCM3=y$$' .config; then \
- echo "Building linux-tools/rootfs... "; \
- $(MAKE) $(SILENT) all -f Makefile.lisa -C ../linux-tools/rootfs; \
- echo ""; \
- else \
- $(MAKE) $(SILENT) all -C ../linux-tools/rootfs; \
- fi
+ @echo "Building linux-tools/rootfs... "
+ @$(MAKE) $(SILENT) all -C ../linux-tools/rootfs
+ @echo ""
# using non standard rules for rtai and app, to be able to use it when building the bundle
rtai-3.1-2.6:
@@ -103,18 +100,14 @@ agent:
# image as is own private rule
image:
- @if grep -q '^CONFIG_ARCH_FCM3=y$$' .config; then \
- echo "No bootpImage needed with SPC200-C platform !"; \
- else \
- echo "Building bootpImage..."; \
- $(MAKE) $(SILENT) bootpImage INITRD=../linux-tools/rootfs/initrd.efs2.gz; \
- echo ""; \
- if [ "$(FTP_HOME)" != "" ]; then \
- echo "Copying bootpImage in $(FTP_HOME)"; \
- cp arch/arm/boot/bootpImage $(FTP_HOME); \
- fi; \
- echo "Done bootpImage !"; \
+ @echo "Building zImage..."
+ @$(MAKE) $(SILENT) zImage
+ @if [ "$(FTP_HOME)" != "" ]; then \
+ echo "Copying zImage in $(FTP_HOME)"; \
+ cp arch/arm/boot/zImage $(FTP_HOME); \
fi
+ @echo "Done zImage !"
+ @rm ../linux-tools/rootfs/initramfs_list -f
# Create dependencies between modules only when no target are specified, otherwise create all
# Also, be less verbose in this case
@@ -130,12 +123,8 @@ $(filter-out image ../linux-tools/rootfs ../rtai-3.1-2.6 ../app ../agent ../linu
# using non standard rules for rtai and app, to be able to use it when building the bundle
../linux-tools/rootfs:
@echo "Cleaning ../linux-tools/rootfs"
- @if grep -q '^CONFIG_ARCH_FCM3=y$$' .config; then \
- $(MAKE) $(SILENT) clean -f Makefile.lisa -C ../linux-tools/rootfs; \
- echo ""; \
- else \
- $(MAKE) $(SILENT) clean -C ../linux-tools/rootfs; \
- fi
+ @$(MAKE) $(SILENT) clean -C ../linux-tools/rootfs
+ @echo ""
../rtai-3.1-2.6:
@if [ -d $@ ]; then \
@@ -186,7 +175,6 @@ spc200c:
#ifneq ($(filter-out $(SUBDIRS) GNUmakefile %GNUmakefile $(TARGETS),$(MAKECMDGOALS)),)
#for all others target (unknown here) use linux makefile
-
#linux $(filter-out $(SUBDIRS) $(TARGETS),$(MAKECMDGOALS)): force platform_used
# @echo "Building other image $@..."
# @$(MAKE) $(SILENT) -f Makefile $(filter-out linux, $@)
@@ -194,16 +182,15 @@ spc200c:
PLATFORM_USED=
linux: force platform_used
@echo "Building other image $@..."
+ @touch ../linux-tools/rootfs/initramfs_list
@$(MAKE) $(SILENT) -f Makefile $(filter-out linux, $@)
@echo "Done with $@"
- @if grep -q '^CONFIG_ARCH_FCM3=y$$' .config; then \
+ @if grep -q '^CONFIG_ARCH_FCM3=y$$' .config; then \
rm -f linux.bin.gz; \
arm-uclinux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin; \
gzip linux.bin; \
../tools/mkimage -A arm -O linux -T kernel -C gzip -a 0xb0008000 -e 0xb0008000 -n "Linux Kernel Image" -d linux.bin.gz uImage.kernel; \
- echo "cp uImage.kernel /tftpboot/linux"; \
- cp uImage.kernel /tftpboot/linux; \
- fi
+ fi
$(filter-out $(SUBDIRS) $(TARGETS),$(MAKECMDGOALS)): force platform_used
@echo "Building other image $@..."
@@ -222,8 +209,8 @@ platform_used:
fi; \
else \
echo "Please choose a target :"; \
- echo "use make spc200e for a SPC200-E target"; \
- echo "use make spc200c for a SPC200-C target"; \
+ echo "use make spc200e for a SPC200-E target(tinac)"; \
+ echo "use make spc200c for a SPC200-C target(lisa)"; \
echo ""; \
false; \
fi
diff --git a/linux-2.6.10/Makefile b/linux-2.6.10/Makefile
index 07dd64a274..a0e541911b 100644
--- a/linux-2.6.10/Makefile
+++ b/linux-2.6.10/Makefile
@@ -2,7 +2,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 10
-EXTRAVERSION = -fcm3
+EXTRAVERSION = -spk2xx
NAME=Woozy Numbat
# *DOCUMENTATION*
diff --git a/linux-2.6.10/arch/arm/Makefile b/linux-2.6.10/arch/arm/Makefile
index 10f8d7a49e..59fc9c97fb 100644
--- a/linux-2.6.10/arch/arm/Makefile
+++ b/linux-2.6.10/arch/arm/Makefile
@@ -20,7 +20,7 @@ endif
# Do not use arch/arm/defconfig - it's always outdated.
# Select a platform tht is kept up-to-date
-KBUILD_DEFCONFIG := versatile_defconfig
+KBUILD_DEFCONFIG := spc200e_defconfig
# defines filename extension for mmu type, if any.
ifeq ($(CONFIG_MMU),)
diff --git a/linux-2.6.10/arch/arm/configs/spc200c_defconfig b/linux-2.6.10/arch/arm/configs/spc200c_defconfig
index 7d1e87245d..6131ba14d4 100644
--- a/linux-2.6.10/arch/arm/configs/spc200c_defconfig
+++ b/linux-2.6.10/arch/arm/configs/spc200c_defconfig
@@ -1,5 +1,7 @@
#
# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-spk2xx
+# Fri Jan 11 09:37:24 2008
#
CONFIG_ARM=y
# CONFIG_MMU is not set
@@ -30,7 +32,6 @@ CONFIG_LOG_BUF_SHIFT=14
# CONFIG_IKCONFIG is not set
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
@@ -52,36 +53,10 @@ CONFIG_OBSOLETE_MODPARM=y
#
# System Type
#
-# CONFIG_ARCH_CLPS7500 is not set
-# CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
-# CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
-# CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
-# CONFIG_ARCH_IXP2000 is not set
-# CONFIG_ARCH_L7200 is not set
-# CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_RPC is not set
-# CONFIG_ARCH_SA1100 is not set
-# CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_SHARK is not set
-# CONFIG_ARCH_LH7A40X is not set
-# CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_S5C7375 is not set
-# CONFIG_ARCH_S3C24A0 is not set
+
# CONFIG_ARCH_SPK200 is not set
CONFIG_ARCH_FCM3=y
-# CONFIG_ARCH_S3C2500 is not set
-# CONFIG_ARCH_ATMEL is not set
-# CONFIG_ARCH_S3C3410 is not set
-# CONFIG_ARCH_ESPD_4510B is not set
-# CONFIG_ARCH_S3C44B0 is not set
+
CONFIG_SET_MEM_PARAM=y
CONFIG_DRAM_BASE=0xA4000000
CONFIG_DRAM_SIZE=0x02000000
@@ -107,7 +82,7 @@ CONFIG_CPU_ABRT_EV5TJ=y
#
# CONFIG_ARM_THUMB is not set
CONFIG_CPU_MXU_ENABLE=y
-# CONFIG_CPU_RO_SRAM is not set
+CONFIG_CPU_RO_SRAM=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
@@ -141,7 +116,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_PM is not set
CONFIG_LARGE_ALLOCS=y
# CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="mem=32M console=ttyS0,57600 initrd=0xb1000000,4M root=/dev/ram0 rw"
+CONFIG_CMDLINE="console=ttyS0,115200n8"
CONFIG_ALIGNMENT_TRAP=y
#
@@ -164,12 +139,9 @@ CONFIG_ALIGNMENT_TRAP=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=1
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_NO_CHK_INITRAMFS=y
-CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_INITRAMFS_SOURCE="../linux-tools/rootfs/initramfs_list"
# CONFIG_CDROM_PKTCDVD is not set
#
@@ -217,6 +189,13 @@ CONFIG_IP_MULTICAST=y
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=y
+CONFIG_INET6_ESP=y
+CONFIG_INET6_IPCOMP=y
+CONFIG_INET6_TUNNEL=y
+CONFIG_IPV6_TUNNEL=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_BRIDGE_NETFILTER is not set
@@ -227,10 +206,46 @@ CONFIG_NETFILTER=y
# CONFIG_IP_NF_CONNTRACK is not set
# CONFIG_IP_NF_CONNTRACK_MARK is not set
# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
+CONFIG_IP_NF_IPTABLES=y
+CONFIG_IP_NF_MATCH_LIMIT=y
+CONFIG_IP_NF_MATCH_IPRANGE=y
+CONFIG_IP_NF_MATCH_MAC=y
+CONFIG_IP_NF_MATCH_PKTTYPE=y
+CONFIG_IP_NF_MATCH_MARK=y
+CONFIG_IP_NF_MATCH_MULTIPORT=y
+CONFIG_IP_NF_MATCH_TOS=y
+CONFIG_IP_NF_MATCH_RECENT=y
+# CONFIG_IP_NF_MATCH_ECN is not set
+CONFIG_IP_NF_MATCH_DSCP=y
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+CONFIG_IP_NF_MATCH_LENGTH=y
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+CONFIG_IP_NF_MATCH_OWNER=y
+CONFIG_IP_NF_MATCH_ADDRTYPE=y
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+CONFIG_IP_NF_FILTER=y
+CONFIG_IP_NF_TARGET_REJECT=y
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_MANGLE=y
+CONFIG_IP_NF_TARGET_TOS=y
+# CONFIG_IP_NF_TARGET_ECN is not set
+CONFIG_IP_NF_TARGET_DSCP=y
+CONFIG_IP_NF_TARGET_MARK=y
+CONFIG_IP_NF_TARGET_CLASSIFY=y
+# CONFIG_IP_NF_RAW is not set
# CONFIG_IP_NF_ARPTABLES is not set
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+
+#
+# IPv6: Netfilter Configuration
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
#
# Bridge: Netfilter Configuration
@@ -249,13 +264,15 @@ CONFIG_BRIDGE_EBT_PKTTYPE=y
CONFIG_BRIDGE_EBT_STP=y
CONFIG_BRIDGE_EBT_VLAN=y
CONFIG_BRIDGE_EBT_ARPREPLY=y
-CONFIG_BRIDGE_EBT_DNAT=y
+# CONFIG_BRIDGE_EBT_DNAT is not set
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_REDIRECT=y
-CONFIG_BRIDGE_EBT_SNAT=y
-CONFIG_BRIDGE_EBT_LOG=y
+# CONFIG_BRIDGE_EBT_SNAT is not set
+# CONFIG_BRIDGE_EBT_LOG is not set
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
CONFIG_BRIDGE=y
-# CONFIG_VLAN_8021Q is not set
+CONFIG_VLAN_8021Q=y
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
@@ -264,8 +281,35 @@ CONFIG_BRIDGE=y
#
# QoS and/or fair queueing
#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CLK_JIFFIES=y
+# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+# CONFIG_NET_SCH_CLK_CPU is not set
+CONFIG_NET_SCH_CBQ=y
+CONFIG_NET_SCH_HTB=y
+# CONFIG_NET_SCH_HFSC is not set
+CONFIG_NET_SCH_PRIO=y
+CONFIG_NET_SCH_RED=y
+CONFIG_NET_SCH_SFQ=y
+# CONFIG_NET_SCH_TEQL is not set
+CONFIG_NET_SCH_TBF=y
+# CONFIG_NET_SCH_GRED is not set
+CONFIG_NET_SCH_DSMARK=y
+# CONFIG_NET_SCH_NETEM is not set
+CONFIG_NET_SCH_INGRESS=y
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=y
+CONFIG_NET_CLS_ROUTE4=y
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=y
+CONFIG_NET_CLS_U32=y
+# CONFIG_CLS_U32_PERF is not set
+# CONFIG_NET_CLS_IND is not set
+# CONFIG_NET_CLS_RSVP is not set
+# CONFIG_NET_CLS_RSVP6 is not set
+CONFIG_NET_CLS_POLICE=y
#
# Network testing
@@ -413,8 +457,7 @@ CONFIG_LEGACY_PTY_COUNT=16
#
# File systems
#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
@@ -552,10 +595,10 @@ CONFIG_USB_ARCH_HAS_HCD=y
#
CONFIG_PLC=y
# CONFIG_VERSION_16M is not set
-CONFIG_PLC_MEASURES=y
-CONFIG_PLC_DEBUG=y
+# CONFIG_PLC_MEASURES is not set
+# CONFIG_PLC_DEBUG is not set
# CONFIG_PLC_PPC is not set
-CONFIG_PLC_ASSERT=y
+# CONFIG_PLC_ASSERT is not set
# CONFIG_PLC_GDB is not set
# CONFIG_PLC_DEBUG_GPIO is not set
# CONFIG_PLC_PROFILER is not set
@@ -568,10 +611,9 @@ CONFIG_PLC_ASSERT=y
# CONFIG_PLC_PCI is not set
CONFIG_PLC_TIMEOUT=y
# CONFIG_PLC_RTSCTS is not set
-# CONFIG_PLC_MCAST is not set
+CONFIG_PLC_MCAST=y
# CONFIG_PLC_VPORT is not set
# CONFIG_PLC_CRYPTO is not set
-# CONFIG_PLC_8021X is not set
CONFIG_PLC_IRQS=y
#
@@ -582,19 +624,10 @@ CONFIG_PLC_IRQS=y
#
# Kernel hacking
#
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_INFO is not set
# CONFIG_FRAME_POINTER is not set
# CONFIG_DEBUG_USER is not set
-# CONFIG_DEBUG_WAITQ is not set
-# CONFIG_DEBUG_ERRORS is not set
-# CONFIG_DEBUG_LL is not set
#
# Security options
@@ -605,7 +638,30 @@ CONFIG_DEBUG_INFO=y
#
# Cryptographic options
#
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
#
# Library routines
@@ -614,3 +670,4 @@ CONFIG_CRC_CCITT=y
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff --git a/linux-2.6.10/arch/arm/configs/spc200e_defconfig b/linux-2.6.10/arch/arm/configs/spc200e_defconfig
index 4391e365b0..d8d8d0298b 100644
--- a/linux-2.6.10/arch/arm/configs/spc200e_defconfig
+++ b/linux-2.6.10/arch/arm/configs/spc200e_defconfig
@@ -1,5 +1,7 @@
#
# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10-spk2xx
+# Fri Jan 11 09:37:24 2008
#
CONFIG_ARM=y
# CONFIG_MMU is not set
@@ -51,36 +53,7 @@ CONFIG_OBSOLETE_MODPARM=y
#
# System Type
#
-# CONFIG_ARCH_CLPS7500 is not set
-# CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
-# CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
-# CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
-# CONFIG_ARCH_IXP2000 is not set
-# CONFIG_ARCH_L7200 is not set
-# CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_RPC is not set
-# CONFIG_ARCH_SA1100 is not set
-# CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_SHARK is not set
-# CONFIG_ARCH_LH7A40X is not set
-# CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_S5C7375 is not set
-# CONFIG_ARCH_S3C24A0 is not set
CONFIG_ARCH_SPK200=y
-# CONFIG_ARCH_FCM3 is not set
-# CONFIG_ARCH_S3C2500 is not set
-# CONFIG_ARCH_ATMEL is not set
-# CONFIG_ARCH_S3C3410 is not set
-# CONFIG_ARCH_ESPD_4510B is not set
-# CONFIG_ARCH_S3C44B0 is not set
CONFIG_ARCH_SPC2XX=y
CONFIG_SET_MEM_PARAM=y
CONFIG_DRAM_BASE=0x70000000
@@ -139,8 +112,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_PM is not set
CONFIG_LARGE_ALLOCS=y
# CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="initrd=0x70A00000,0x00400000 root=/dev/ram0 console=ttyS0,115200n8"
-# CONFIG_LEDS is not set
+CONFIG_CMDLINE="console=ttyS0,115200n8"
CONFIG_ALIGNMENT_TRAP=y
#
@@ -238,12 +210,9 @@ CONFIG_MTD_SPK200=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=1
-CONFIG_BLK_DEV_RAM_SIZE=4500
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_NO_CHK_INITRAMFS=y
-CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_INITRAMFS_SOURCE="../linux-tools/rootfs/initramfs_list"
# CONFIG_CDROM_PKTCDVD is not set
#
@@ -291,6 +260,13 @@ CONFIG_IP_MULTICAST=y
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=y
+CONFIG_INET6_ESP=y
+CONFIG_INET6_IPCOMP=y
+CONFIG_INET6_TUNNEL=y
+CONFIG_IPV6_TUNNEL=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_BRIDGE_NETFILTER is not set
@@ -337,6 +313,12 @@ CONFIG_IP_NF_TARGET_CLASSIFY=y
# CONFIG_IP_NF_ARPTABLES is not set
#
+# IPv6: Netfilter Configuration
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+
+#
# Bridge: Netfilter Configuration
#
CONFIG_BRIDGE_NF_EBTABLES=y
@@ -358,6 +340,8 @@ CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_REDIRECT=y
# CONFIG_BRIDGE_EBT_SNAT is not set
# CONFIG_BRIDGE_EBT_LOG is not set
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
CONFIG_BRIDGE=y
CONFIG_VLAN_8021Q=y
# CONFIG_DECNET is not set
@@ -552,8 +536,7 @@ CONFIG_SPR200_WATCHDOG=y
#
# File systems
#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
@@ -718,7 +701,6 @@ CONFIG_PLC_TIMEOUT=y
CONFIG_PLC_MCAST=y
# CONFIG_PLC_VPORT is not set
# CONFIG_PLC_CRYPTO is not set
-# CONFIG_PLC_8021X is not set
CONFIG_PLC_IRQS=y
#
@@ -743,7 +725,30 @@ CONFIG_PLC_IRQS=y
#
# Cryptographic options
#
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
#
# Library routines
diff --git a/linux-2.6.10/arch/arm/kernel/semaphore.c b/linux-2.6.10/arch/arm/kernel/semaphore.c
index c232d37772..02cc679341 100644
--- a/linux-2.6.10/arch/arm/kernel/semaphore.c
+++ b/linux-2.6.10/arch/arm/kernel/semaphore.c
@@ -178,7 +178,7 @@ int __down_trylock(struct semaphore * sem)
* registers (r0 to r3 and lr), but not ip, as we use it as a return
* value in some cases..
*/
-asm(" .section .sched.text \n\
+asm(" .section .sched.text,\"ax\" \n\
.align 5 \n\
.globl __down_failed \n\
__down_failed: \n\
diff --git a/linux-2.6.10/arch/arm/kernel/signal.c b/linux-2.6.10/arch/arm/kernel/signal.c
index 0395da3773..1541f47d17 100644
--- a/linux-2.6.10/arch/arm/kernel/signal.c
+++ b/linux-2.6.10/arch/arm/kernel/signal.c
@@ -45,6 +45,7 @@ static const unsigned long retcodes[4] = {
static
#endif
int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall);
+int rt_wrap_do_signal(sigset_t *, struct pt_regs *, int);
/*
* atomically swap in the new signal mask, and wait for a signal.
diff --git a/linux-2.6.10/arch/arm/mach-spc2XX/core.c b/linux-2.6.10/arch/arm/mach-spc2XX/core.c
index 3fe26f05e7..a7bfc851d9 100755
--- a/linux-2.6.10/arch/arm/mach-spc2XX/core.c
+++ b/linux-2.6.10/arch/arm/mach-spc2XX/core.c
@@ -129,7 +129,7 @@ static struct amba_device *amba_devs[] __initdata = {
&uart1_device
};
-static ApGpio_dev_t *ApGpio_dev = 0x0;
+static ApGpio_dev_t *ApGpio_dev = (ApGpio_dev_t *) IO_ADDRESS(GPIO_BASE);
char gpio_map[GPIO_EVENT_MAX];
#ifdef DEBUG_GPIO_OUT
@@ -191,8 +191,9 @@ static void __init spc2XX_fixup(struct machine_desc *mdesc,
strncpy(cp_boot_version,boot_version,sizeof(boot_version));
ptr1_boot_version = strsep(&ptr2_boot_version, ".");
- if ((simple_strtoul(ptr1_boot_version,NULL,0) >= 2) &&
- (simple_strtoul(ptr2_boot_version,NULL,0) >= 7))
+
+ if ((simple_strtoul(ptr1_boot_version,NULL,0) >= 2) ||
+ ((simple_strtoul(ptr1_boot_version,NULL,0) == 2) && (simple_strtoul(ptr2_boot_version,NULL,0) >= 7)))
{
board_spec_t *board_spec = (board_spec_t *)0x00000FE0;
#ifndef CONFIG_VERSION_16M
@@ -265,8 +266,6 @@ static void __init spc2XX_init(void)
asm("mcr p15, 0, %0, c8, c7, 0" : : "r" (zero));
#endif
- ApGpio_dev = (ApGpio_dev_t *) IO_ADDRESS(GPIO_BASE);
-
#ifdef CONFIG_LEDS
leds_event = spc2xx_leds_event;
#endif
@@ -458,10 +457,7 @@ unsigned int wd_trigger_count = 0;
void wd_trigger(void)
{
wd_trigger_count++;
-
- if (Wd_gpio<32)
- // TODO: use number
- ApGpio_dev->GPIO_7_0.data_out ^= 0x20;
+ ApGpio_dev->GPIO_7_0.data_out ^= 0x20;
}
// Timer
diff --git a/linux-2.6.10/arch/arm/mm/fault.c b/linux-2.6.10/arch/arm/mm/fault.c
index a1dd87b554..ebbcac0cdc 100644
--- a/linux-2.6.10/arch/arm/mm/fault.c
+++ b/linux-2.6.10/arch/arm/mm/fault.c
@@ -363,11 +363,11 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
copy_pmd(pmd, pmd_k);
return 0;
+
+bad_area:
#else /* CONFIG_MMU */
// printk("do_translation_fault? : %s %d\n",__FILE__,__LINE__);
#endif /* !CONFIG_MMU */
-
-bad_area:
tsk = current;
do_bad_area(tsk, tsk->active_mm, addr, fsr, regs);
diff --git a/linux-2.6.10/drivers/mtd/chips/Makefile b/linux-2.6.10/drivers/mtd/chips/Makefile
index 0dac159942..377d25be0d 100644
--- a/linux-2.6.10/drivers/mtd/chips/Makefile
+++ b/linux-2.6.10/drivers/mtd/chips/Makefile
@@ -3,13 +3,6 @@
#
# $Id: Makefile,v 1.1.1.1 2005/07/06 14:43:36 petillon Exp $
-# *** BIG UGLY NOTE ***
-#
-# The removal of get_module_symbol() and replacement with
-# inter_module_register() et al has introduced a link order dependency
-# here where previously there was none. We now have to ensure that
-# the CFI command set drivers are linked before gen_probe.o
-
obj-$(CONFIG_MTD) += chipreg.o
obj-$(CONFIG_MTD_AMDSTD) += amd_flash.o
obj-$(CONFIG_MTD_CFI) += cfi_probe.o
diff --git a/linux-2.6.10/drivers/mtd/chips/amd_flash.c b/linux-2.6.10/drivers/mtd/chips/amd_flash.c
index ad0c3560af..4d02ff86e0 100644
--- a/linux-2.6.10/drivers/mtd/chips/amd_flash.c
+++ b/linux-2.6.10/drivers/mtd/chips/amd_flash.c
@@ -98,7 +98,6 @@ struct amd_flash_private {
int interleave;
int numchips;
unsigned long chipshift;
-// const char *im_name;
struct flchip chips[0];
};
@@ -132,12 +131,6 @@ static struct mtd_chip_driver amd_flash_chipdrv = {
.module = THIS_MODULE
};
-
-
-static const char im_name[] = "amd_flash";
-
-
-
static inline __u32 wide_read(struct map_info *map, __u32 addr)
{
if (map->buswidth == 1) {
diff --git a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0001.c b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0001.c
index 173b6254ed..3d36468de1 100644
--- a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -168,7 +168,7 @@ static void fixup_st_m28w320cb(struct mtd_info *mtd, void* param)
static void fixup_use_point(struct mtd_info *mtd, void *param)
{
- struct map_info *map = mtd->priv;
+// struct map_info *map = mtd->priv;
if (!mtd->point && map_is_linear(map)) {
mtd->point = cfi_intelext_point;
mtd->unpoint = cfi_intelext_unpoint;
@@ -273,13 +273,6 @@ read_pri_intelext(struct map_info *map, __u16 adr)
return extp;
}
-/* This routine is made available to other mtd code via
- * inter_module_register. It must only be accessed through
- * inter_module_get which will bump the use count of this module. The
- * addresses passed back in cfi are valid as long as the use count of
- * this module is non-zero, i.e. between inter_module_get and
- * inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
- */
struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
{
struct cfi_private *cfi = map->fldrv_priv;
@@ -355,6 +348,12 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
return cfi_intelext_setup(mtd);
}
+struct mtd_info *cfi_cmdset_0003(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001")));
+struct mtd_info *cfi_cmdset_0200(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001")));
+EXPORT_SYMBOL_GPL(cfi_cmdset_0001);
+EXPORT_SYMBOL_GPL(cfi_cmdset_0003);
+EXPORT_SYMBOL_GPL(cfi_cmdset_0200);
+
static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
@@ -1232,7 +1231,7 @@ static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
return ret;
}
- /* §4.8 of the 28FxxxJ3A datasheet says "Any time SR.4 and/or SR.5 is set
+ /* �4.8 of the 28FxxxJ3A datasheet says "Any time SR.4 and/or SR.5 is set
[...], the device will not accept any more Write to Buffer commands".
So we must check here and reset those bits if they're set. Otherwise
we're just pissing in the wind */
@@ -1872,25 +1871,8 @@ static void cfi_intelext_destroy(struct mtd_info *mtd)
kfree(mtd->eraseregions);
}
-static char im_name_1[]="cfi_cmdset_0001";
-static char im_name_3[]="cfi_cmdset_0003";
-
-int __init cfi_intelext_init(void)
-{
- inter_module_register(im_name_1, THIS_MODULE, &cfi_cmdset_0001);
- inter_module_register(im_name_3, THIS_MODULE, &cfi_cmdset_0001);
- return 0;
-}
-
-static void __exit cfi_intelext_exit(void)
-{
- inter_module_unregister(im_name_1);
- inter_module_unregister(im_name_3);
-}
-
-module_init(cfi_intelext_init);
-module_exit(cfi_intelext_exit);
-
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al.");
MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips");
+MODULE_ALIAS("cfi_cmdset_0003");
+MODULE_ALIAS("cfi_cmdset_0200");
diff --git a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0002.c b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0002.c
index 5c5b3ee13a..4807bda7ce 100644
--- a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -309,7 +309,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
return cfi_amdstd_setup(mtd);
}
-
+EXPORT_SYMBOL(cfi_cmdset_0002);
static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
{
@@ -1503,25 +1503,6 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd)
kfree(mtd->eraseregions);
}
-static char im_name[]="cfi_cmdset_0002";
-
-
-static int __init cfi_amdstd_init(void)
-{
- inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0002);
- return 0;
-}
-
-
-static void __exit cfi_amdstd_exit(void)
-{
- inter_module_unregister(im_name);
-}
-
-
-module_init(cfi_amdstd_init);
-module_exit(cfi_amdstd_exit);
-
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Crossnet Co. <info@crossnet.co.jp> et al.");
MODULE_DESCRIPTION("MTD chip driver for AMD/Fujitsu flash chips");
diff --git a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0020.c b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0020.c
index e3ffc47046..c6ec38245f 100644
--- a/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/linux-2.6.10/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -1399,20 +1399,4 @@ static void cfi_staa_destroy(struct mtd_info *mtd)
kfree(cfi);
}
-static char im_name[]="cfi_cmdset_0020";
-
-static int __init cfi_staa_init(void)
-{
- inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020);
- return 0;
-}
-
-static void __exit cfi_staa_exit(void)
-{
- inter_module_unregister(im_name);
-}
-
-module_init(cfi_staa_init);
-module_exit(cfi_staa_exit);
-
MODULE_LICENSE("GPL");
diff --git a/linux-2.6.10/drivers/mtd/chips/gen_probe.c b/linux-2.6.10/drivers/mtd/chips/gen_probe.c
index 2ac14ab42f..aa6a40b4be 100644
--- a/linux-2.6.10/drivers/mtd/chips/gen_probe.c
+++ b/linux-2.6.10/drivers/mtd/chips/gen_probe.c
@@ -194,20 +194,23 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
{
struct cfi_private *cfi = map->fldrv_priv;
__u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID;
-#if defined(CONFIG_MODULES) && defined(HAVE_INTER_MODULE)
+#ifdef CONFIG_MODULES
char probename[32];
cfi_cmdset_fn_t *probe_function;
sprintf(probename, "cfi_cmdset_%4.4X", type);
-
- probe_function = inter_module_get_request(probename, probename);
+ probe_function = (void *)symbol_get(probename);
+ if (!probe_function) {
+ request_module(probename);
+ probe_function = (void *)symbol_get(probename);
+ }
if (probe_function) {
struct mtd_info *mtd;
mtd = (*probe_function)(map, primary);
/* If it was happy, it'll have increased its own use count */
- inter_module_put(probename);
+ symbol_put_addr(probename);
return mtd;
}
#endif
@@ -226,12 +229,9 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
return NULL;
switch(type){
- /* Urgh. Ifdefs. The version with weak symbols was
- * _much_ nicer. Shame it didn't seem to work on
- * anything but x86, really.
- * But we can't rely in inter_module_get() because
- * that'd mean we depend on link order.
- */
+ /* We need these for the !CONFIG_MODULES case,
+ because symbol_get() doesn't work there */
+
#ifdef CONFIG_MTD_CFI_INTELEXT
case 0x0001:
case 0x0003:
@@ -242,12 +242,12 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
return cfi_cmdset_0002(map, primary);
#endif
#ifdef CONFIG_MTD_CFI_STAA
- case 0x0020:
+ case 0x0020:
return cfi_cmdset_0020(map, primary);
#endif
+ default:
+ return cfi_cmdset_unknown(map, primary);
}
-
- return cfi_cmdset_unknown(map, primary);
}
MODULE_LICENSE("GPL");
diff --git a/linux-2.6.10/drivers/mtd/maps/spk200-flash.c b/linux-2.6.10/drivers/mtd/maps/spk200-flash.c
index f19130acf0..dba4f0520e 100755
--- a/linux-2.6.10/drivers/mtd/maps/spk200-flash.c
+++ b/linux-2.6.10/drivers/mtd/maps/spk200-flash.c
@@ -171,7 +171,7 @@ static int __init spk200_default_partitions(struct mtd_info *master, struct mtd_
uint32_t offset;
size_t size;
int rgn;
- int i,j,k;
+ int i,j;
printk(KERN_NOTICE "Using default partitions for %s\n","spk200");
diff --git a/linux-2.6.10/drivers/net/arm/ape110.c b/linux-2.6.10/drivers/net/arm/ape110.c
index 17b628f4f4..97481e267a 100755
--- a/linux-2.6.10/drivers/net/arm/ape110.c
+++ b/linux-2.6.10/drivers/net/arm/ape110.c
@@ -316,7 +316,7 @@ static struct net_device ape110_dev;
// -----------------------------------------------------------------------------
-// Définition des Types de Strutures
+// D�finition des Types de Strutures
// -----------------------------------------------------------------------------
typedef struct __attribute__ ((packed))
@@ -422,6 +422,9 @@ static uint32_t phy_modes = ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100H
#define strtoul simple_strtoul
+static int mdio_read(struct net_device *, int, int);
+static int ape110_autonegotiate(struct net_device *, int);
+
extern void wd_trigger(void);
static struct ctl_table_header *eth_table_header;
@@ -1789,7 +1792,7 @@ static int ape110_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
rq->ifr_data = (void*)ape110_scan_link(dev);
break;
case SIOCGSETLINKSPEED:
- eth_speed = rq->ifr_data;
+ eth_speed = (int)rq->ifr_data;
switch (eth_duplex_mode) {
case 0: phy_modes = (!eth_speed)?ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100HALF | ADVERTISE_100FULL:
(eth_speed==10)?ADVERTISE_10HALF | ADVERTISE_10FULL:ADVERTISE_100HALF | ADVERTISE_100FULL;
@@ -1804,17 +1807,17 @@ static int ape110_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
ape110_autonegotiate(dev, 1);
break;
case SIOCGGETLINKSETUPSPEED:
- rq->ifr_data = eth_speed;
+ rq->ifr_data = (void *)eth_speed;
break;
case SIOCGGETLINKCURRENTSPEED:
reg = mdio_read(dev, PHY_ADDR, MII_QPDSR);
if (reg & QPDSR_SPEED100)
- rq->ifr_data = 100;
+ rq->ifr_data = (void *)100;
else
- rq->ifr_data = 10;
+ rq->ifr_data = (void *)10;
break;
case SIOCGSETLINKMODE:
- eth_duplex_mode = rq->ifr_data;
+ eth_duplex_mode = (int)rq->ifr_data;
switch (eth_duplex_mode) {
case 0: phy_modes = (!eth_speed)?ADVERTISE_10HALF | ADVERTISE_10FULL | ADVERTISE_100HALF | ADVERTISE_100FULL:
(eth_speed==10)?ADVERTISE_10HALF | ADVERTISE_10FULL:ADVERTISE_100HALF | ADVERTISE_100FULL;
@@ -1829,14 +1832,14 @@ static int ape110_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
ape110_autonegotiate(dev, 1);
break;
case SIOCGGETLINKSETUPMODE:
- rq->ifr_data = eth_duplex_mode;
+ rq->ifr_data = (void *)eth_duplex_mode;
break;
case SIOCGGETLINKCURRENTMODE:
reg = mdio_read(dev, PHY_ADDR, MII_QPDSR);
if (reg & QPDSR_FULLDPLX)
- rq->ifr_data = ETH_MODE_FD;
+ rq->ifr_data = (void *)ETH_MODE_FD;
else
- rq->ifr_data = ETH_MODE_HD;
+ rq->ifr_data = (void *)ETH_MODE_HD;
break;
default:
rc = -EOPNOTSUPP;
diff --git a/linux-2.6.10/drivers/plc/Kconfig b/linux-2.6.10/drivers/plc/Kconfig
index 651eb2ad1e..1a0550b754 100644
--- a/linux-2.6.10/drivers/plc/Kconfig
+++ b/linux-2.6.10/drivers/plc/Kconfig
@@ -120,18 +120,19 @@ config PLC_CRYPTO
help
Enable the encryption of the CE messages and data
-config PLC_8021X
- bool "802.1x authentication"
- default n
- help
- Enable 802.1x authentication between master and slave nodes
-
config PLC_IRQS
bool "Multiple IRQs"
default y
help
Use multiple IRQs line for the phlic interrupt
+config PLC_EVENT_NOTIFICATION
+ bool "Event notification support"
+ depends PLC
+ default n
+ help
+ Enable notification of registered hosts.
+
endmenu
endif
diff --git a/linux-2.6.10/drivers/voip/Kconfig b/linux-2.6.10/drivers/voip/Kconfig
index de2e727685..0c4d5f6f7f 100644
--- a/linux-2.6.10/drivers/voip/Kconfig
+++ b/linux-2.6.10/drivers/voip/Kconfig
@@ -5,7 +5,7 @@
menu "VoIP support"
config VOIP
- tristate "VoIP support"
+ bool "VoIP support"
default n
help
Enable the VoIP support.
@@ -16,11 +16,17 @@ choice
help
Choose the targetting VoIP chipset (card) (ARETHA by default).
-config ARETHA
- bool "ARETHA"
+config ARETHA3
+ bool "ARETHA up to v1.3"
+ depends VOIP
+ help
+ Enable ARETHA up to v1.3 chipset target.
+
+config ARETHA4
+ bool "ARETHA v1.4 and higher"
depends VOIP
help
- Enable ARETHA chipset target.
+ Enable ARETHA v1.4+ chipset target.
config SOPHIA
bool "SOPHIA"
@@ -30,6 +36,14 @@ config SOPHIA
endchoice
+config ARETHA
+ default ARETHA3 || ARETHA4
+ bool
+
+config INTEL_BUS
+ default ARETHA4
+ bool
+
choice
prompt "VoIP protocol"
depends VOIP
@@ -51,19 +65,5 @@ config H323
endchoice
-#choice
-# prompt "VoIP Access"
-# depends VOIP
-# default Motorola
-# help
-# Choose if the Intel access bus is going to be used (Motorola by default).
-
-config INTEL_BUS
- bool "INTEL_BUS"
- depends VOIP
- help
- Enable INTEL access bus.
-
-#endchoice
endmenu
diff --git a/linux-2.6.10/fs/binfmt_flat.c b/linux-2.6.10/fs/binfmt_flat.c
index d7442a2bcb..6aff652888 100644
--- a/linux-2.6.10/fs/binfmt_flat.c
+++ b/linux-2.6.10/fs/binfmt_flat.c
@@ -292,7 +292,6 @@ out_free_buf:
kfree(buf);
out_free:
kfree(strm.workspace);
-out:
return retval;
}
@@ -425,7 +424,8 @@ static int load_flat_file(struct linux_binprm * bprm,
unsigned long extra, rlim;
unsigned long *reloc = 0, *rp;
struct inode *inode;
- int i, rev, relocs = 0;
+ int i, rev;
+ unsigned long relocs = 0;
loff_t fpos;
unsigned long start_code, end_code;
diff --git a/linux-2.6.10/include/asm-arm/arch-s3c2410/io.h b/linux-2.6.10/include/asm-arm/arch-s3c2410/io.h
index dd2961d841..c54af2405e 100644
--- a/linux-2.6.10/include/asm-arm/arch-s3c2410/io.h
+++ b/linux-2.6.10/include/asm-arm/arch-s3c2410/io.h
@@ -65,12 +65,9 @@ static inline unsigned sz __in##fnsuffix (unsigned int port) \
return (unsigned sz)value; \
}
-static inline unsigned int __ioaddr (unsigned int port)
+static inline void __iomem *__ioaddr (unsigned int port)
{
- if (__PORT_PCIO(port))
- return (unsigned int)(PCIO_BASE + (port));
- else
- return (unsigned int)(0 + (port));
+ return (void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + port : port);
}
#define DECLARE_IO(sz,fnsuffix,instr) \
@@ -170,7 +167,7 @@ DECLARE_IO(int,l,"")
result; \
})
-#define __ioaddrc(port) (__PORT_PCIO((port)) ? PCIO_BASE + ((port)) : ((port)))
+#define __ioaddrc(port) ((void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + (port) : (port)))
#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
diff --git a/linux-2.6.10/include/asm-arm/arch-spc2xx/uncompress.h b/linux-2.6.10/include/asm-arm/arch-spc2xx/uncompress.h
index 4a510f2bd0..04f8f15d5b 100644
--- a/linux-2.6.10/include/asm-arm/arch-spc2xx/uncompress.h
+++ b/linux-2.6.10/include/asm-arm/arch-spc2xx/uncompress.h
@@ -56,8 +56,12 @@ static void putstr(const char *s)
/*
*
*/
-#ifdef ANGELINA
-#define arch_decomp_wdog() *((unsigned int *)(GPIO_BASE+10)) ^= 0x20
-#else
-#define arch_decomp_wdog()
-#endif
+
+int slow_counter = 0;
+
+#define arch_decomp_wdog() \
+ { \
+ slow_counter ++; \
+ slow_counter &= 0x3; \
+ if (slow_counter == 0) { *((volatile unsigned int *)(GPIO_BASE+0x14)) ^= 0x20; /*putstr ("#");*/ } \
+ }
diff --git a/linux-2.6.10/init/main.c b/linux-2.6.10/init/main.c
index ecc39fafe5..54639e6eac 100644
--- a/linux-2.6.10/init/main.c
+++ b/linux-2.6.10/init/main.c
@@ -51,6 +51,10 @@
#include <asm/bugs.h>
#include <asm/setup.h>
+#include <platform.h>
+
+extern void wd_trigger (void);
+
/*
* This is one of the first .c files built. Error out early
* if we have compiler trouble..
@@ -498,6 +502,7 @@ asmlinkage void __init start_kernel(void)
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();
+
/*
* Mark the boot cpu "online" so that it can call console drivers in
@@ -514,6 +519,7 @@ asmlinkage void __init start_kernel(void)
build_all_zonelists();
page_alloc_init();
printk("Kernel command line: %s\n", saved_command_line);
+
parse_early_param();
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
@@ -545,6 +551,7 @@ asmlinkage void __init start_kernel(void)
initrd_start = 0;
}
#endif
+
vfs_caches_init_early();
mem_init();
kmem_cache_init();
diff --git a/linux-2.6.10/kernel/Makefile b/linux-2.6.10/kernel/Makefile
index db7281f1f0..6e06700b00 100644
--- a/linux-2.6.10/kernel/Makefile
+++ b/linux-2.6.10/kernel/Makefile
@@ -6,7 +6,7 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
exit.o itimer.o time.o softirq.o resource.o \
sysctl.o capability.o ptrace.o timer.o user.o \
signal.o sys.o kmod.o workqueue.o pid.o \
- rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+ rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o
obj-$(CONFIG_FUTEX) += futex.o
diff --git a/linux-2.6.10/kernel/intermodule.c b/linux-2.6.10/kernel/intermodule.c
deleted file mode 100644
index 09f556507f..0000000000
--- a/linux-2.6.10/kernel/intermodule.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* Deprecated, do not use. Moved from module.c to here. --RR */
-
-/* Written by Keith Owens <kaos@ocs.com.au> Oct 2000 */
-#include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/spinlock.h>
-#include <linux/list.h>
-#include <linux/slab.h>
-
-/* inter_module functions are always available, even when the kernel is
- * compiled without modules. Consumers of inter_module_xxx routines
- * will always work, even when both are built into the kernel, this
- * approach removes lots of #ifdefs in mainline code.
- */
-
-static struct list_head ime_list = LIST_HEAD_INIT(ime_list);
-static spinlock_t ime_lock = SPIN_LOCK_UNLOCKED;
-static int kmalloc_failed;
-
-struct inter_module_entry {
- struct list_head list;
- const char *im_name;
- struct module *owner;
- const void *userdata;
-};
-
-/**
- * inter_module_register - register a new set of inter module data.
- * @im_name: an arbitrary string to identify the data, must be unique
- * @owner: module that is registering the data, always use THIS_MODULE
- * @userdata: pointer to arbitrary userdata to be registered
- *
- * Description: Check that the im_name has not already been registered,
- * complain if it has. For new data, add it to the inter_module_entry
- * list.
- */
-void inter_module_register(const char *im_name, struct module *owner, const void *userdata)
-{
- struct list_head *tmp;
- struct inter_module_entry *ime, *ime_new;
-
- if (!(ime_new = kmalloc(sizeof(*ime), GFP_KERNEL))) {
- /* Overloaded kernel, not fatal */
- printk(KERN_ERR
- "Aiee, inter_module_register: cannot kmalloc entry for '%s'\n",
- im_name);
- kmalloc_failed = 1;
- return;
- }
- memset(ime_new, 0, sizeof(*ime_new));
- ime_new->im_name = im_name;
- ime_new->owner = owner;
- ime_new->userdata = userdata;
-
- spin_lock(&ime_lock);
- list_for_each(tmp, &ime_list) {
- ime = list_entry(tmp, struct inter_module_entry, list);
- if (strcmp(ime->im_name, im_name) == 0) {
- spin_unlock(&ime_lock);
- kfree(ime_new);
- /* Program logic error, fatal */
- printk(KERN_ERR "inter_module_register: duplicate im_name '%s'", im_name);
- BUG();
- }
- }
- list_add(&(ime_new->list), &ime_list);
- spin_unlock(&ime_lock);
-}
-
-/**
- * inter_module_unregister - unregister a set of inter module data.
- * @im_name: an arbitrary string to identify the data, must be unique
- *
- * Description: Check that the im_name has been registered, complain if
- * it has not. For existing data, remove it from the
- * inter_module_entry list.
- */
-void inter_module_unregister(const char *im_name)
-{
- struct list_head *tmp;
- struct inter_module_entry *ime;
-
- spin_lock(&ime_lock);
- list_for_each(tmp, &ime_list) {
- ime = list_entry(tmp, struct inter_module_entry, list);
- if (strcmp(ime->im_name, im_name) == 0) {
- list_del(&(ime->list));
- spin_unlock(&ime_lock);
- kfree(ime);
- return;
- }
- }
- spin_unlock(&ime_lock);
- if (kmalloc_failed) {
- printk(KERN_ERR
- "inter_module_unregister: no entry for '%s', "
- "probably caused by previous kmalloc failure\n",
- im_name);
- return;
- }
- else {
- /* Program logic error, fatal */
- printk(KERN_ERR "inter_module_unregister: no entry for '%s'", im_name);
- BUG();
- }
-}
-
-/**
- * inter_module_get - return arbitrary userdata from another module.
- * @im_name: an arbitrary string to identify the data, must be unique
- *
- * Description: If the im_name has not been registered, return NULL.
- * Try to increment the use count on the owning module, if that fails
- * then return NULL. Otherwise return the userdata.
- */
-const void *inter_module_get(const char *im_name)
-{
- struct list_head *tmp;
- struct inter_module_entry *ime;
- const void *result = NULL;
-
- spin_lock(&ime_lock);
- list_for_each(tmp, &ime_list) {
- ime = list_entry(tmp, struct inter_module_entry, list);
- if (strcmp(ime->im_name, im_name) == 0) {
- if (try_module_get(ime->owner))
- result = ime->userdata;
- break;
- }
- }
- spin_unlock(&ime_lock);
- return(result);
-}
-
-/**
- * inter_module_get_request - im get with automatic request_module.
- * @im_name: an arbitrary string to identify the data, must be unique
- * @modname: module that is expected to register im_name
- *
- * Description: If inter_module_get fails, do request_module then retry.
- */
-const void *inter_module_get_request(const char *im_name, const char *modname)
-{
- const void *result = inter_module_get(im_name);
- if (!result) {
- request_module("%s", modname);
- result = inter_module_get(im_name);
- }
- return(result);
-}
-
-/**
- * inter_module_put - release use of data from another module.
- * @im_name: an arbitrary string to identify the data, must be unique
- *
- * Description: If the im_name has not been registered, complain,
- * otherwise decrement the use count on the owning module.
- */
-void inter_module_put(const char *im_name)
-{
- struct list_head *tmp;
- struct inter_module_entry *ime;
-
- spin_lock(&ime_lock);
- list_for_each(tmp, &ime_list) {
- ime = list_entry(tmp, struct inter_module_entry, list);
- if (strcmp(ime->im_name, im_name) == 0) {
- if (ime->owner)
- module_put(ime->owner);
- spin_unlock(&ime_lock);
- return;
- }
- }
- spin_unlock(&ime_lock);
- printk(KERN_ERR "inter_module_put: no entry for '%s'", im_name);
- BUG();
-}
-
-EXPORT_SYMBOL(inter_module_register);
-EXPORT_SYMBOL(inter_module_unregister);
-EXPORT_SYMBOL(inter_module_get);
-EXPORT_SYMBOL(inter_module_get_request);
-EXPORT_SYMBOL(inter_module_put);
diff --git a/linux-2.6.10/kernel/module.c b/linux-2.6.10/kernel/module.c
index 738d450a6a..c4593a94ff 100644
--- a/linux-2.6.10/kernel/module.c
+++ b/linux-2.6.10/kernel/module.c
@@ -1768,9 +1768,9 @@ static struct module *load_module(void __user *umod,
module_unload_free(mod);
#ifdef CONFIG_MMU
module_free(mod, mod->module_init);
-#endif /* CONFIG_MMU */
free_core:
module_free(mod, mod->module_core);
+#endif /* CONFIG_MMU */
free_percpu:
if (percpu)
percpu_modfree(percpu);
diff --git a/linux-2.6.10/lib/iomap.c b/linux-2.6.10/lib/iomap.c
index 5e74390852..95b2e8b794 100644
--- a/linux-2.6.10/lib/iomap.c
+++ b/linux-2.6.10/lib/iomap.c
@@ -137,15 +137,15 @@ static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count)
void fastcall ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
{
- IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count));
+ IO_COND(addr, insb((int *)port,dst,count), mmio_insb(addr, dst, count));
}
void fastcall ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
{
- IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count));
+ IO_COND(addr, insw((int *)port,dst,count), mmio_insw(addr, dst, count));
}
void fastcall ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
{
- IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count));
+ IO_COND(addr, insl((int *)port,dst,count), mmio_insl(addr, dst, count));
}
EXPORT_SYMBOL(ioread8_rep);
EXPORT_SYMBOL(ioread16_rep);
@@ -153,15 +153,15 @@ EXPORT_SYMBOL(ioread32_rep);
void fastcall iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
{
- IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count));
+ IO_COND(addr, outsb((int *)port, src, count), mmio_outsb(addr, src, count));
}
void fastcall iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
{
- IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count));
+ IO_COND(addr, outsw((int *)port, src, count), mmio_outsw(addr, src, count));
}
void fastcall iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
{
- IO_COND(addr, outsl(port, src,count), mmio_outsl(addr, src, count));
+ IO_COND(addr, outsl((int *)port, src,count), mmio_outsl(addr, src, count));
}
EXPORT_SYMBOL(iowrite8_rep);
EXPORT_SYMBOL(iowrite16_rep);
diff --git a/linux-2.6.10/mm/slab.c b/linux-2.6.10/mm/slab.c
index 0f9f16432a..b1a71ee269 100644
--- a/linux-2.6.10/mm/slab.c
+++ b/linux-2.6.10/mm/slab.c
@@ -875,16 +875,13 @@ static void *kmem_getpages(kmem_cache_t *cachep, int flags, int nodeid)
flags |= cachep->gfpflags;
if (likely(nodeid == -1)) {
- addr = (void*)__get_free_pages(flags, cachep->gfporder);
- if (!addr)
- return NULL;
- page = virt_to_page(addr);
+ page = alloc_pages(flags, cachep->gfporder);
} else {
page = alloc_pages_node(nodeid, flags, cachep->gfporder);
- if (!page)
- return NULL;
- addr = page_address(page);
}
+ if(!page)
+ return NULL;
+ addr = page_address(page);
i = (1 << cachep->gfporder);
if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
diff --git a/linux-2.6.10/net/Kconfig b/linux-2.6.10/net/Kconfig
index 155754c8e1..6dcdc0a25e 100644
--- a/linux-2.6.10/net/Kconfig
+++ b/linux-2.6.10/net/Kconfig
@@ -108,7 +108,7 @@ source "net/ipv4/Kconfig"
# IPv6 as module will cause a CRASH if you try to unload it
config IPV6
tristate "The IPv6 protocol (EXPERIMENTAL)"
- depends on INET && EXPERIMENTAL
+ depends on INET
select CRYPTO if IPV6_PRIVACY
select CRYPTO_MD5 if IPV6_PRIVACY
---help---
diff --git a/linux-2.6.10/net/bridge/br_input.c b/linux-2.6.10/net/bridge/br_input.c
index b7f69d13dd..f2132fea97 100644
--- a/linux-2.6.10/net/bridge/br_input.c
+++ b/linux-2.6.10/net/bridge/br_input.c
@@ -114,7 +114,9 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
if (p->br->stp_enabled &&
!memcmp(dest, bridge_ula, 5) &&
- !(dest[5] & 0xF0)) {
+ !(dest[5] & 0xF0)
+ /* dest[5]!=0x03 is added for 802.1x support */
+ && (dest[5]!=0x03)) {
if (!dest[5]) {
NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
NULL, br_stp_handle_bpdu);
diff --git a/linux-2.6.10/net/bridge/br_stp_if.c b/linux-2.6.10/net/bridge/br_stp_if.c
index e1a4fb3cb4..7dca7561c2 100644
--- a/linux-2.6.10/net/bridge/br_stp_if.c
+++ b/linux-2.6.10/net/bridge/br_stp_if.c
@@ -151,14 +151,37 @@ void br_stp_recalculate_bridge_id(struct net_bridge *br)
{
const unsigned char *addr = br_mac_zero;
struct net_bridge_port *p;
-
+
+ // If exists plc0 interface use its MAC addr for bridge MAC addr.
list_for_each_entry(p, &br->port_list, list) {
- if (addr == br_mac_zero ||
- memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0)
+ if (strcmp(p->dev->name, "plc0")==0){
addr = p->dev->dev_addr;
-
+ break;
+ }
}
-
+
+ // If plc0 interface doesnt' exist try to find some other
+ // plc interface and use first founded.
+ if (addr == br_mac_zero){
+ list_for_each_entry(p, &br->port_list, list) {
+ if (strncmp(p->dev->name, "plc", 3)==0)
+ {
+ addr = p->dev->dev_addr;
+ break;
+ }
+ }
+ }
+
+ // If PLC interface doesn't exist use interface with minimal MAC address.
+ if (addr == br_mac_zero){
+ list_for_each_entry(p, &br->port_list, list) {
+ if (addr == br_mac_zero ||
+ memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0)
+ addr = p->dev->dev_addr;
+
+ }
+ }
+
if (memcmp(br->bridge_id.addr, addr, ETH_ALEN))
br_stp_change_bridge_id(br, addr);
}
diff --git a/linux-2.6.10/scripts/basic/docproc.c b/linux-2.6.10/scripts/basic/docproc.c
index 8ca7ecdb68..397c321cd3 100644
--- a/linux-2.6.10/scripts/basic/docproc.c
+++ b/linux-2.6.10/scripts/basic/docproc.c
@@ -52,7 +52,7 @@ FILEONLY *internalfunctions;
FILEONLY *externalfunctions;
FILEONLY *symbolsonly;
-typedef void FILELINE(char * file, signed char * line);
+typedef void FILELINE(char * file, char * line);
FILELINE * singlefunctions;
FILELINE * entity_system;
@@ -148,9 +148,9 @@ struct symfile * filename_exist(char * filename)
* Files are separated by tabs.
*/
void adddep(char * file) { printf("\t%s", file); }
-void adddep2(char * file, signed char * line) { line = line; adddep(file); }
+void adddep2(char * file, char * line) { line = line; adddep(file); }
void noaction(char * line) { line = line; }
-void noaction2(char * file, signed char * line) { file = file; line = line; }
+void noaction2(char * file, char * line) { file = file; line = line; }
/* Echo the line without further action */
void printline(char * line) { printf("%s", line); }
@@ -179,8 +179,8 @@ void find_export_symbols(char * filename)
perror(real_filename);
}
while(fgets(line, MAXLINESZ, fp)) {
- signed char *p;
- signed char *e;
+ char *p;
+ char *e;
if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) ||
((p = strstr(line, "EXPORT_SYMBOL")) != 0)) {
/* Skip EXPORT_SYMBOL{_GPL} */
@@ -249,11 +249,11 @@ void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
/*
- * Document spåecific function(s) in a file.
+ * Document sp�ecific function(s) in a file.
* Call kernel-doc with the following parameters:
* kernel-doc -docbook -function function1 [-function function2]
*/
-void singfunc(char * filename, signed char * line)
+void singfunc(char * filename, char * line)
{
char *vec[200]; /* Enough for specific functions */
int i, idx = 0;
@@ -290,7 +290,7 @@ void singfunc(char * filename, signed char * line)
void parse_file(FILE *infile)
{
char line[MAXLINESZ];
- signed char * s;
+ char * s;
while(fgets(line, MAXLINESZ, infile)) {
if (line[0] == '!') {
s = line + 2;
diff --git a/linux-2.6.10/scripts/basic/fixdep.c b/linux-2.6.10/scripts/basic/fixdep.c
index 7f42c5d8a5..668a11a8b3 100644
--- a/linux-2.6.10/scripts/basic/fixdep.c
+++ b/linux-2.6.10/scripts/basic/fixdep.c
@@ -130,6 +130,9 @@ void usage(void)
exit(1);
}
+/*
+ * Print out the commandline prefixed with cmd_<target filename> :=
+ */
void print_cmdline(void)
{
printf("cmd_%s := %s\n\n", target, cmdline);
@@ -212,23 +215,23 @@ void use_config(char *m, int slen)
if (*p == '_')
*p = '/';
else
- *p = tolower((unsigned char)*p);
+ *p = tolower((int)*p);
}
printf(" $(wildcard include/config/%s.h) \\\n", s);
}
-void parse_config_file(signed char *map, size_t len)
+void parse_config_file(char *map, size_t len)
{
int *end = (int *) (map + len);
/* start at +1, so that p can never be < map */
int *m = (int *) map + 1;
- signed char *p, *q;
+ char *p, *q;
for (; m < end; m++) {
- if (*m == INT_CONF) { p = (signed char *) m ; goto conf; }
- if (*m == INT_ONFI) { p = (signed char *) m-1; goto conf; }
- if (*m == INT_NFIG) { p = (signed char *) m-2; goto conf; }
- if (*m == INT_FIG_) { p = (signed char *) m-3; goto conf; }
+ if (*m == INT_CONF) { p = (char *) m ; goto conf; }
+ if (*m == INT_ONFI) { p = (char *) m-1; goto conf; }
+ if (*m == INT_NFIG) { p = (char *) m-2; goto conf; }
+ if (*m == INT_FIG_) { p = (char *) m-3; goto conf; }
continue;
conf:
if (p > map + len - 7)
@@ -291,9 +294,9 @@ void do_config_file(char *filename)
void parse_dep_file(void *map, size_t len)
{
- signed char *m = map;
- signed char *end = m + len;
- signed char *p;
+ char *m = map;
+ char *end = m + len;
+ char *p;
char s[PATH_MAX];
p = strchr(m, ':');
diff --git a/linux-2.6.10/scripts/basic/split-include.c b/linux-2.6.10/scripts/basic/split-include.c
index 60fc4d8eba..459c45276c 100644
--- a/linux-2.6.10/scripts/basic/split-include.c
+++ b/linux-2.6.10/scripts/basic/split-include.c
@@ -104,7 +104,7 @@ int main(int argc, const char * argv [])
/* Read config lines. */
while (fgets(line, buffer_size, fp_config))
{
- const signed char * str_config;
+ const char * str_config;
int is_same;
int itarget;
diff --git a/linux-2.6.10/scripts/gen_initramfs_list.sh b/linux-2.6.10/scripts/gen_initramfs_list.sh
index 2a697c3713..43f75d6e4d 100755
--- a/linux-2.6.10/scripts/gen_initramfs_list.sh
+++ b/linux-2.6.10/scripts/gen_initramfs_list.sh
@@ -1,61 +1,120 @@
#!/bin/bash
# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
-# Released under the terms of the GNU GPL
-#
-# Generate a newline separated list of entries from the file/directory pointed
-# out by the environment variable: CONFIG_INITRAMFS_SOURCE
-#
-# If CONFIG_INITRAMFS_SOURCE is non-existing then generate a small dummy file.
+# Copyright (C) 2006 Sam Ravnborg <sam@ravnborg.org>
#
-# The output is suitable for gen_init_cpio as found in usr/Makefile.
+# Released under the terms of the GNU GPL
#
-# TODO: Add support for symlinks, sockets and pipes when gen_init_cpio
-# supports them.
+# Generate a cpio packed initramfs. It uses gen_init_cpio to generate
+# the cpio archive, and gzip to pack it.
+# The script may also be used to generate the inputfile used for gen_init_cpio
+# This script assumes that gen_init_cpio is located in usr/ directory
+
+# error out on errors
+set -e
+
+usage() {
+cat << EOF
+Usage:
+$0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
+ -o <file> Create gzipped initramfs file named <file> using
+ gen_init_cpio and gzip
+ -u <uid> User ID to map to user ID 0 (root).
+ <uid> is only meaningful if <cpio_source>
+ is a directory.
+ -g <gid> Group ID to map to group ID 0 (root).
+ <gid> is only meaningful if <cpio_source>
+ is a directory.
+ <cpio_source> File list or directory for cpio archive.
+ If <cpio_source> is a .cpio file it will be used
+ as direct input to initramfs.
+ -d Output the default cpio list.
+
+All options except -o and -l may be repeated and are interpreted
+sequentially and immediately. -u and -g states are preserved across
+<cpio_source> options so an explicit "-u 0 -g 0" is required
+to reset the root/group mapping.
+EOF
+}
+
+# awk style field access
+# $1 - field number; rest is argument string
+field() {
+ shift $1 ; echo $1
+}
+
+list_default_initramfs() {
+ # echo usr/kinit/kinit
+ :
+}
-simple_initramfs() {
- cat <<-EOF
- # This is a very simple initramfs
+default_initramfs() {
+ cat <<-EOF >> ${output}
+ # This is a very simple, default initramfs
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
dir /root 0700 0 0
+ # file /kinit usr/kinit/kinit 0755 0 0
+ # slink /init kinit 0755 0 0
EOF
}
filetype() {
local argv1="$1"
- if [ -f "${argv1}" ]; then
+ # symlink test must come before file test
+ if [ -L "${argv1}" ]; then
+ echo "slink"
+ elif [ -f "${argv1}" ]; then
echo "file"
elif [ -d "${argv1}" ]; then
echo "dir"
elif [ -b "${argv1}" -o -c "${argv1}" ]; then
echo "nod"
+ elif [ -p "${argv1}" ]; then
+ echo "pipe"
+ elif [ -S "${argv1}" ]; then
+ echo "sock"
else
echo "invalid"
fi
return 0
}
+list_print_mtime() {
+ :
+}
+
print_mtime() {
- local argv1="$1"
local my_mtime="0"
- if [ -e "${argv1}" ]; then
- my_mtime=$(find "${argv1}" -printf "%T@\n" | sort -r | head -n 1)
+ if [ -e "$1" ]; then
+ my_mtime=$(find "$1" -printf "%T@\n" | sort -r | head -n 1)
fi
-
- echo "# Last modified: ${my_mtime}"
- echo
+
+ echo "# Last modified: ${my_mtime}" >> ${output}
+ echo "" >> ${output}
+}
+
+list_parse() {
+ echo "$1 \\"
}
+# for each file print a line in following format
+# <filetype> <name> <path to file> <octal mode> <uid> <gid>
+# for links, devices etc the format differs. See gen_init_cpio for details
parse() {
local location="$1"
local name="${location/${srcdir}//}"
+ # change '//' into '/'
+ name="${name//\/\///}"
local mode="$2"
local uid="$3"
local gid="$4"
local ftype=$(filetype "${location}")
+ # remap uid/gid to 0 if necessary
+ [ "$uid" -eq "$root_uid" ] && uid=0
+ [ "$gid" -eq "$root_gid" ] && gid=0
local str="${mode} ${uid} ${gid}"
[ "${ftype}" == "invalid" ] && return 0
@@ -66,53 +125,164 @@ parse() {
str="${ftype} ${name} ${location} ${str}"
;;
"nod")
- local dev_type=
- local maj=$(LC_ALL=C ls -l "${location}" | \
- gawk '{sub(/,/, "", $5); print $5}')
- local min=$(LC_ALL=C ls -l "${location}" | \
- gawk '{print $6}')
-
- if [ -b "${location}" ]; then
- dev_type="b"
- else
- dev_type="c"
- fi
- str="${ftype} ${name} ${str} ${dev_type} ${maj} ${min}"
+ local dev=`LC_ALL=C ls -l "${location}"`
+ local maj=`field 5 ${dev}`
+ local min=`field 6 ${dev}`
+ maj=${maj%,}
+
+ [ -b "${location}" ] && dev="b" || dev="c"
+
+ str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
+ ;;
+ "slink")
+ local target=`field 11 $(LC_ALL=C ls -l "${location}")`
+ str="${ftype} ${name} ${target} ${str}"
;;
*)
str="${ftype} ${name} ${str}"
;;
esac
- echo "${str}"
+ echo "${str}" >> ${output}
return 0
}
-if [ -z "$1" ]; then
- simple_initramfs
-elif [ -f "$1" ]; then
- print_mtime "$1"
- cat "$1"
-elif [ -d "$1" ]; then
+unknown_option() {
+ printf "ERROR: unknown option \"$arg\"\n" >&2
+ printf "If the filename validly begins with '-', " >&2
+ printf "then it must be prefixed\n" >&2
+ printf "by './' so that it won't be interpreted as an option." >&2
+ printf "\n" >&2
+ usage >&2
+ exit 1
+}
+
+list_header() {
+ :
+}
+
+header() {
+ printf "\n#####################\n# $1\n" >> ${output}
+}
+
+# process one directory (incl sub-directories)
+dir_filelist() {
+ ${dep_list}header "$1"
+
srcdir=$(echo "$1" | sed -e 's://*:/:g')
dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
# If $dirlist is only one line, then the directory is empty
if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
- print_mtime "$1"
-
+ ${dep_list}print_mtime "$1"
+
echo "${dirlist}" | \
while read x; do
- parse ${x}
+ ${dep_list}parse ${x}
done
+ fi
+}
+
+# if only one file is specified and it is .cpio file then use it direct as fs
+# if a directory is specified then add all files in given direcotry to fs
+# if a regular file is specified assume it is in gen_initramfs format
+input_file() {
+ source="$1"
+ if [ -f "$1" ]; then
+ ${dep_list}header "$1"
+ is_cpio="$(echo "$1" | sed 's/^.*\.cpio/cpio/')"
+ if [ $2 -eq 0 -a ${is_cpio} == "cpio" ]; then
+ cpio_file=$1
+ [ ! -z ${dep_list} ] && echo "$1"
+ return 0
+ fi
+ if [ -z ${dep_list} ]; then
+ print_mtime "$1" >> ${output}
+ cat "$1" >> ${output}
+ else
+ cat "$1" | while read type dir file perm ; do
+ if [ "$type" == "file" ]; then
+ echo "$file \\";
+ fi
+ done
+ fi
+ elif [ -d "$1" ]; then
+ dir_filelist "$1"
else
- # Failsafe in case directory is empty
- simple_initramfs
+ echo " ${prog}: Cannot open '$1'" >&2
+ exit 1
fi
-else
- echo " $0: Cannot open '$1' (CONFIG_INITRAMFS_SOURCE)" >&2
- exit 1
-fi
+}
+prog=$0
+root_uid=0
+root_gid=0
+dep_list=
+cpio_file=
+cpio_list=
+output="/dev/stdout"
+output_file=""
+
+arg="$1"
+case "$arg" in
+ "-l") # files included in initramfs - used by kbuild
+ dep_list="list_"
+ echo "deps_initramfs := \\"
+ shift
+ ;;
+ "-o") # generate gzipped cpio image named $1
+ shift
+ output_file="$1"
+ cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"
+ output=${cpio_list}
+ shift
+ ;;
+esac
+while [ $# -gt 0 ]; do
+ arg="$1"
+ shift
+ case "$arg" in
+ "-u") # map $1 to uid=0 (root)
+ root_uid="$1"
+ shift
+ ;;
+ "-g") # map $1 to gid=0 (root)
+ root_gid="$1"
+ shift
+ ;;
+ "-d") # display default initramfs list
+ default_list="$arg"
+ ${dep_list}default_initramfs
+ ;;
+ "-h")
+ usage
+ exit 0
+ ;;
+ *)
+ case "$arg" in
+ "-"*)
+ unknown_option
+ ;;
+ *) # input file/dir - process it
+ input_file "$arg" "$#"
+ ;;
+ esac
+ ;;
+ esac
+done
+
+# If output_file is set we will generate cpio archive and gzip it
+# we are carefull to delete tmp files
+if [ ! -z ${output_file} ]; then
+ if [ -z ${cpio_file} ]; then
+ cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)"
+ usr/gen_init_cpio ${cpio_list} > ${cpio_tfile}
+ else
+ cpio_tfile=${cpio_file}
+ fi
+ rm ${cpio_list}
+ cat ${cpio_tfile} | gzip -f -9 - > ${output_file}
+ [ -z ${cpio_file} ] && rm ${cpio_tfile}
+fi
exit 0
diff --git a/linux-2.6.10/scripts/kallsyms.c b/linux-2.6.10/scripts/kallsyms.c
index c07ccfad03..574dd1297f 100644
--- a/linux-2.6.10/scripts/kallsyms.c
+++ b/linux-2.6.10/scripts/kallsyms.c
@@ -67,8 +67,9 @@ struct sym_entry {
static struct sym_entry *table;
static int size, cnt;
-static unsigned long long _stext, _etext, _sinittext, _einittext;
+static unsigned long long _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext;
static int all_symbols = 0;
+static char symbol_prefix_char = '\0';
struct token {
unsigned char data[MAX_TOK_SIZE];
@@ -93,7 +94,7 @@ unsigned char best_table_len[256];
static void
usage(void)
{
- fprintf(stderr, "Usage: kallsyms [--all-symbols] < in.map > out.S\n");
+ fprintf(stderr, "Usage: kallsyms [--all-symbols] [--symbol-prefix=<prefix char>] < in.map > out.S\n");
exit(1);
}
@@ -112,6 +113,7 @@ static int
read_symbol(FILE *in, struct sym_entry *s)
{
char str[500];
+ char *sym;
int rc;
rc = fscanf(in, "%llx %c %499s\n", &s->addr, &s->type, str);
@@ -123,34 +125,43 @@ read_symbol(FILE *in, struct sym_entry *s)
return -1;
}
+ sym = str;
+ /* skip prefix char */
+ if (symbol_prefix_char && str[0] == symbol_prefix_char)
+ sym++;
+
/* Ignore most absolute/undefined (?) symbols. */
- if (strcmp(str, "_stext") == 0)
+ if (strcmp(sym, "_stext") == 0)
_stext = s->addr;
- else if (strcmp(str, "_etext") == 0)
+ else if (strcmp(sym, "_etext") == 0)
_etext = s->addr;
- else if (strcmp(str, "_sinittext") == 0)
+ else if (strcmp(sym, "_sinittext") == 0)
_sinittext = s->addr;
- else if (strcmp(str, "_einittext") == 0)
+ else if (strcmp(sym, "_einittext") == 0)
_einittext = s->addr;
+ else if (strcmp(sym, "_sextratext") == 0)
+ _sextratext = s->addr;
+ else if (strcmp(sym, "_eextratext") == 0)
+ _eextratext = s->addr;
else if (toupper(s->type) == 'A')
{
/* Keep these useful absolute symbols */
- if (strcmp(str, "__kernel_syscall_via_break") &&
- strcmp(str, "__kernel_syscall_via_epc") &&
- strcmp(str, "__kernel_sigtramp") &&
- strcmp(str, "__gp"))
+ if (strcmp(sym, "__kernel_syscall_via_break") &&
+ strcmp(sym, "__kernel_syscall_via_epc") &&
+ strcmp(sym, "__kernel_sigtramp") &&
+ strcmp(sym, "__gp"))
return -1;
}
else if (toupper(s->type) == 'U' ||
- is_arm_mapping_symbol(str))
+ is_arm_mapping_symbol(sym))
return -1;
/* include the type field in the symbol name, so that it gets
* compressed together */
s->len = strlen(str) + 1;
- s->sym = (char *) malloc(s->len + 1);
- strcpy(s->sym + 1, str);
+ s->sym = (unsigned char *) malloc(s->len + 1);
+ strcpy((char *)s->sym + 1, str);
s->sym[0] = s->type;
return 0;
@@ -177,21 +188,37 @@ symbol_valid(struct sym_entry *s)
"_SDA2_BASE_", /* ppc */
NULL };
int i;
+ int offset = 1;
+
+ /* skip prefix char */
+ if (symbol_prefix_char && *(s->sym + 1) == symbol_prefix_char)
+ offset++;
/* if --all-symbols is not specified, then symbols outside the text
* and inittext sections are discarded */
if (!all_symbols) {
if ((s->addr < _stext || s->addr > _etext)
- && (s->addr < _sinittext || s->addr > _einittext))
+ && (s->addr < _sinittext || s->addr > _einittext)
+ && (s->addr < _sextratext || s->addr > _eextratext))
+ return 0;
+ /* Corner case. Discard any symbols with the same value as
+ * _etext _einittext or _eextratext; they can move between pass
+ * 1 and 2 when the kallsyms data are added. If these symbols
+ * move then they may get dropped in pass 2, which breaks the
+ * kallsyms rules.
+ */
+ if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
+ (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) ||
+ (s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext")))
return 0;
}
/* Exclude symbols which vary between passes. */
- if (strstr(s->sym + 1, "_compiled."))
+ if (strstr((char *)s->sym + offset, "_compiled."))
return 0;
for (i = 0; special_symbols[i]; i++)
- if( strcmp(s->sym + 1, special_symbols[i]) == 0 )
+ if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 )
return 0;
return 1;
@@ -216,9 +243,15 @@ read_map(FILE *in)
static void output_label(char *label)
{
- printf(".globl %s\n",label);
+ if (symbol_prefix_char)
+ printf(".globl %c%s\n", symbol_prefix_char, label);
+ else
+ printf(".globl %s\n", label);
printf("\tALGN\n");
- printf("%s:\n",label);
+ if (symbol_prefix_char)
+ printf("%c%s:\n", symbol_prefix_char, label);
+ else
+ printf("%s:\n", label);
}
/* uncompress a compressed symbol. When this function is called, the best table
@@ -656,6 +689,13 @@ static void optimize_token_table(void)
insert_real_symbols_in_table();
+ /* When valid symbol is not registered, exit to error */
+ if (good_head.left == good_head.right &&
+ bad_head.left == bad_head.right) {
+ fprintf(stderr, "No valid symbol.\n");
+ exit(1);
+ }
+
optimize_result();
}
@@ -663,9 +703,21 @@ static void optimize_token_table(void)
int
main(int argc, char **argv)
{
- if (argc == 2 && strcmp(argv[1], "--all-symbols") == 0)
- all_symbols = 1;
- else if (argc != 1)
+ if (argc >= 2) {
+ int i;
+ for (i = 1; i < argc; i++) {
+ if(strcmp(argv[i], "--all-symbols") == 0)
+ all_symbols = 1;
+ else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) {
+ char *p = &argv[i][16];
+ /* skip quote */
+ if ((*p == '"' && *(p+2) == '"') || (*p == '\'' && *(p+2) == '\''))
+ p++;
+ symbol_prefix_char = *p;
+ } else
+ usage();
+ }
+ } else if (argc != 1)
usage();
read_map(stdin);
@@ -674,4 +726,3 @@ main(int argc, char **argv)
return 0;
}
-
diff --git a/linux-2.6.10/scripts/kconfig/conf.c b/linux-2.6.10/scripts/kconfig/conf.c
index a494d1aeb9..cdc72014d4 100644
--- a/linux-2.6.10/scripts/kconfig/conf.c
+++ b/linux-2.6.10/scripts/kconfig/conf.c
@@ -31,14 +31,14 @@ char *defconfig_file;
static int indent = 1;
static int valid_stdin = 1;
static int conf_cnt;
-static signed char line[128];
+static char line[128];
static struct menu *rootEntry;
static char nohelp_text[] = "Sorry, no help available for this option yet.\n";
-static void strip(signed char *str)
+static void strip(char *str)
{
- signed char *p = str;
+ char *p = str;
int l;
while ((isspace(*p)))
diff --git a/linux-2.6.10/scripts/kconfig/confdata.c b/linux-2.6.10/scripts/kconfig/confdata.c
index 1e82ae390a..b7db64217d 100644
--- a/linux-2.6.10/scripts/kconfig/confdata.c
+++ b/linux-2.6.10/scripts/kconfig/confdata.c
@@ -27,10 +27,10 @@ const char *conf_confnames[] = {
NULL,
};
-static char *conf_expand_value(const signed char *in)
+static char *conf_expand_value(const char *in)
{
struct symbol *sym;
- const signed char *src;
+ const char *src;
static char res_value[SYMBOL_MAXLENGTH];
char *dst, name[SYMBOL_MAXLENGTH];
diff --git a/linux-2.6.10/scripts/kconfig/mconf.c b/linux-2.6.10/scripts/kconfig/mconf.c
index 995f800b1b..91789cc9d2 100644
--- a/linux-2.6.10/scripts/kconfig/mconf.c
+++ b/linux-2.6.10/scripts/kconfig/mconf.c
@@ -82,8 +82,8 @@ save_config_help[] =
"leave this blank.\n"
;
-static signed char buf[4096], *bufptr = buf;
-static signed char input_buf[4096];
+static char buf[4096], *bufptr = buf;
+static char input_buf[4096];
static char filename[PATH_MAX+1] = ".config";
static char *args[1024], **argptr = args;
static int indent;
diff --git a/linux-2.6.10/scripts/lxdialog/dialog.h b/linux-2.6.10/scripts/lxdialog/dialog.h
index c571548daa..eb63e1bb63 100644
--- a/linux-2.6.10/scripts/lxdialog/dialog.h
+++ b/linux-2.6.10/scripts/lxdialog/dialog.h
@@ -163,7 +163,7 @@ int dialog_menu (const char *title, const char *prompt, int height, int width,
int dialog_checklist (const char *title, const char *prompt, int height,
int width, int list_height, int item_no,
const char * const * items, int flag);
-extern unsigned char dialog_input_result[];
+extern char dialog_input_result[];
int dialog_inputbox (const char *title, const char *prompt, int height,
int width, const char *init);
diff --git a/linux-2.6.10/scripts/lxdialog/inputbox.c b/linux-2.6.10/scripts/lxdialog/inputbox.c
index fa7bebc693..34787d8ed1 100644
--- a/linux-2.6.10/scripts/lxdialog/inputbox.c
+++ b/linux-2.6.10/scripts/lxdialog/inputbox.c
@@ -21,7 +21,7 @@
#include "dialog.h"
-unsigned char dialog_input_result[MAX_LEN + 1];
+char dialog_input_result[MAX_LEN + 1];
/*
* Print the termination buttons
@@ -48,7 +48,7 @@ dialog_inputbox (const char *title, const char *prompt, int height, int width,
{
int i, x, y, box_y, box_x, box_width;
int input_x = 0, scroll = 0, key = 0, button = -1;
- unsigned char *instr = dialog_input_result;
+ char *instr = dialog_input_result;
WINDOW *dialog;
/* center dialog box on screen */
diff --git a/linux-2.6.10/scripts/mod/sumversion.c b/linux-2.6.10/scripts/mod/sumversion.c
index 4f811b098c..732fa4877d 100644
--- a/linux-2.6.10/scripts/mod/sumversion.c
+++ b/linux-2.6.10/scripts/mod/sumversion.c
@@ -252,9 +252,9 @@ static int parse_comment(const char *file, unsigned long len)
}
/* FIXME: Handle .s files differently (eg. # starts comments) --RR */
-static int parse_file(const signed char *fname, struct md4_ctx *md)
+static int parse_file(const char *fname, struct md4_ctx *md)
{
- signed char *file;
+ char *file;
unsigned long i, len;
file = grab_file(fname, &len);
@@ -332,7 +332,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
Sum all files in the same dir or subdirs.
*/
while ((line = get_next_line(&pos, file, flen)) != NULL) {
- signed char* p = line;
+ char* p = line;
if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) {
check_files = 1;
continue;
@@ -456,7 +456,7 @@ out:
close(fd);
}
-static int strip_rcs_crap(signed char *version)
+static int strip_rcs_crap(char *version)
{
unsigned int len, full_len;
diff --git a/linux-2.6.10/usr/Makefile b/linux-2.6.10/usr/Makefile
index 41e03f433d..ce133d9b75 100644
--- a/linux-2.6.10/usr/Makefile
+++ b/linux-2.6.10/usr/Makefile
@@ -8,7 +8,7 @@ clean-files := initramfs_data.cpio.gz initramfs_list
# If you want a different list of files in the initramfs_data.cpio
# then you can either overwrite the cpio_list in this directory
# or set INITRAMFS_LIST to another filename.
-INITRAMFS_LIST := $(obj)/initramfs_list
+INITRAMFS_LIST := $(obj)/../../linux-tools/rootfs/initramfs_list
#INITRAMFS_LIST :=cpio_list
# initramfs_data.o contains the initramfs_data.cpio.gz image.
diff --git a/linux-2.6.10/usr/gen_init_cpio.c b/linux-2.6.10/usr/gen_init_cpio.c
index c1ac99961c..8365db6cfe 100644
--- a/linux-2.6.10/usr/gen_init_cpio.c
+++ b/linux-2.6.10/usr/gen_init_cpio.c
@@ -10,13 +10,20 @@
#include <ctype.h>
#include <limits.h>
+/*
+ * Original work by Jeff Garzik
+ *
+ * External file lists, symlink, pipe and fifo support by Thayne Harbaugh
+ * Hard link support by Luciano Rocha
+ */
+
#define xstr(s) #s
#define str(s) xstr(s)
static unsigned int offset;
static unsigned int ino = 721;
-struct file_type {
+struct file_handler {
const char *type;
int (*handler)(const char *line);
};
@@ -80,7 +87,7 @@ static void cpio_trailer(void)
0, /* minor */
0, /* rmajor */
0, /* rminor */
- (unsigned)strlen(name) + 1, /* namesize */
+ (unsigned)strlen(name)+1, /* namesize */
0); /* chksum */
push_hdr(s);
push_rest(name);
@@ -91,7 +98,55 @@ static void cpio_trailer(void)
}
}
-static int cpio_mkdir(const char *name, unsigned int mode,
+static int cpio_mkslink(const char *name, const char *target,
+ unsigned int mode, uid_t uid, gid_t gid)
+{
+ char s[256];
+ time_t mtime = time(NULL);
+
+ sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
+ "%08X%08X%08X%08X%08X%08X%08X",
+ "070701", /* magic */
+ ino++, /* ino */
+ S_IFLNK | mode, /* mode */
+ (long) uid, /* uid */
+ (long) gid, /* gid */
+ 1, /* nlink */
+ (long) mtime, /* mtime */
+ (unsigned)strlen(target)+1, /* filesize */
+ 3, /* major */
+ 1, /* minor */
+ 0, /* rmajor */
+ 0, /* rminor */
+ (unsigned)strlen(name) + 1,/* namesize */
+ 0); /* chksum */
+ push_hdr(s);
+ push_string(name);
+ push_pad();
+ push_string(target);
+ push_pad();
+ return 0;
+}
+
+static int cpio_mkslink_line(const char *line)
+{
+ char name[PATH_MAX + 1];
+ char target[PATH_MAX + 1];
+ unsigned int mode;
+ int uid;
+ int gid;
+ int rc = -1;
+
+ if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) {
+ fprintf(stderr, "Unrecognized dir format '%s'", line);
+ goto fail;
+ }
+ rc = cpio_mkslink(name, target, mode, uid, gid);
+ fail:
+ return rc;
+}
+
+static int cpio_mkgeneric(const char *name, unsigned int mode,
uid_t uid, gid_t gid)
{
char s[256];
@@ -101,7 +156,7 @@ static int cpio_mkdir(const char *name, unsigned int mode,
"%08X%08X%08X%08X%08X%08X%08X",
"070701", /* magic */
ino++, /* ino */
- S_IFDIR | mode, /* mode */
+ mode, /* mode */
(long) uid, /* uid */
(long) gid, /* gid */
2, /* nlink */
@@ -118,25 +173,66 @@ static int cpio_mkdir(const char *name, unsigned int mode,
return 0;
}
-static int cpio_mkdir_line(const char *line)
+enum generic_types {
+ GT_DIR,
+ GT_PIPE,
+ GT_SOCK
+};
+
+struct generic_type {
+ const char *type;
+ mode_t mode;
+};
+
+static struct generic_type generic_type_table[] = {
+ [GT_DIR] = {
+ .type = "dir",
+ .mode = S_IFDIR
+ },
+ [GT_PIPE] = {
+ .type = "pipe",
+ .mode = S_IFIFO
+ },
+ [GT_SOCK] = {
+ .type = "sock",
+ .mode = S_IFSOCK
+ }
+};
+
+static int cpio_mkgeneric_line(const char *line, enum generic_types gt)
{
char name[PATH_MAX + 1];
unsigned int mode;
int uid;
int gid;
int rc = -1;
- char fmt[32];
- sprintf(fmt,"%%%ds %%o %%d %%d",PATH_MAX);
- if (4 != sscanf(line, fmt, name, &mode, &uid, &gid)) {
- fprintf(stderr, "Unrecognized dir format '%s'", line);
+ if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) {
+ fprintf(stderr, "Unrecognized %s format '%s'",
+ line, generic_type_table[gt].type);
goto fail;
}
- rc = cpio_mkdir(name, mode, uid, gid);
+ mode |= generic_type_table[gt].mode;
+ rc = cpio_mkgeneric(name, mode, uid, gid);
fail:
return rc;
}
+static int cpio_mkdir_line(const char *line)
+{
+ return cpio_mkgeneric_line(line, GT_DIR);
+}
+
+static int cpio_mkpipe_line(const char *line)
+{
+ return cpio_mkgeneric_line(line, GT_PIPE);
+}
+
+static int cpio_mksock_line(const char *line)
+{
+ return cpio_mkgeneric_line(line, GT_SOCK);
+}
+
static int cpio_mknod(const char *name, unsigned int mode,
uid_t uid, gid_t gid, char dev_type,
unsigned int maj, unsigned int min)
@@ -180,10 +276,8 @@ static int cpio_mknod_line(const char *line)
unsigned int maj;
unsigned int min;
int rc = -1;
- char fmt[32];
- sprintf(fmt,"%%%ds %%o %%d %%d %%c %%u %%u",PATH_MAX);
- if (7 != sscanf(line, fmt,
+ if (7 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d %c %u %u",
name, &mode, &uid, &gid, &dev_type, &maj, &min)) {
fprintf(stderr, "Unrecognized nod format '%s'", line);
goto fail;
@@ -193,17 +287,19 @@ static int cpio_mknod_line(const char *line)
return rc;
}
-/* Not marked static to keep the compiler quiet, as no one uses this yet... */
static int cpio_mkfile(const char *name, const char *location,
- unsigned int mode, uid_t uid, gid_t gid)
+ unsigned int mode, uid_t uid, gid_t gid,
+ unsigned int nlinks)
{
char s[256];
char *filebuf = NULL;
struct stat buf;
+ long size;
int file = -1;
int retval;
- int i;
int rc = -1;
+ int namesize;
+ int i;
mode |= S_IFREG;
@@ -231,30 +327,41 @@ static int cpio_mkfile(const char *name, const char *location,
goto error;
}
- sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
- "%08X%08X%08X%08X%08X%08X%08X",
- "070701", /* magic */
- ino++, /* ino */
- mode, /* mode */
- (long) uid, /* uid */
- (long) gid, /* gid */
- 1, /* nlink */
- (long) buf.st_mtime, /* mtime */
- (int) buf.st_size, /* filesize */
- 3, /* major */
- 1, /* minor */
- 0, /* rmajor */
- 0, /* rminor */
- (unsigned)strlen(name) + 1,/* namesize */
- 0); /* chksum */
- push_hdr(s);
- push_string(name);
- push_pad();
+ size = 0;
+ for (i = 1; i <= nlinks; i++) {
+ /* data goes on last link */
+ if (i == nlinks) size = buf.st_size;
+
+ namesize = strlen(name) + 1;
+ sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
+ "%08lX%08X%08X%08X%08X%08X%08X",
+ "070701", /* magic */
+ ino, /* ino */
+ mode, /* mode */
+ (long) uid, /* uid */
+ (long) gid, /* gid */
+ nlinks, /* nlink */
+ (long) buf.st_mtime, /* mtime */
+ size, /* filesize */
+ 3, /* major */
+ 1, /* minor */
+ 0, /* rmajor */
+ 0, /* rminor */
+ namesize, /* namesize */
+ 0); /* chksum */
+ push_hdr(s);
+ push_string(name);
+ push_pad();
+
+ if (size) {
+ fwrite(filebuf, size, 1, stdout);
+ offset += size;
+ push_pad();
+ }
- for (i = 0; i < buf.st_size; ++i)
- fputc(filebuf[i], stdout);
- offset += buf.st_size;
- push_pad();
+ name += namesize;
+ }
+ ino++;
rc = 0;
error:
@@ -266,20 +373,51 @@ error:
static int cpio_mkfile_line(const char *line)
{
char name[PATH_MAX + 1];
+ char *dname = NULL; /* malloc'ed buffer for hard links */
char location[PATH_MAX + 1];
unsigned int mode;
int uid;
int gid;
+ int nlinks = 1;
+ int end = 0, dname_len = 0;
int rc = -1;
- char fmt[32];
- sprintf(fmt,"%%%ds %%%ds %%o %%d %%d",PATH_MAX,PATH_MAX);
- if (5 != sscanf(line, fmt, name, location, &mode, &uid, &gid)) {
+ if (5 > sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX)
+ "s %o %d %d %n",
+ name, location, &mode, &uid, &gid, &end)) {
fprintf(stderr, "Unrecognized file format '%s'", line);
goto fail;
}
- rc = cpio_mkfile(name, location, mode, uid, gid);
+ if (end && isgraph(line[end])) {
+ int len;
+ int nend;
+
+ dname = malloc(strlen(line));
+ if (!dname) {
+ fprintf (stderr, "out of memory (%d)\n", dname_len);
+ goto fail;
+ }
+
+ dname_len = strlen(name) + 1;
+ memcpy(dname, name, dname_len);
+
+ do {
+ nend = 0;
+ if (sscanf(line + end, "%" str(PATH_MAX) "s %n",
+ name, &nend) < 1)
+ break;
+ len = strlen(name) + 1;
+ memcpy(dname + dname_len, name, len);
+ dname_len += len;
+ nlinks++;
+ end += nend;
+ } while (isgraph(line[end]));
+ } else {
+ dname = name;
+ }
+ rc = cpio_mkfile(dname, location, mode, uid, gid, nlinks);
fail:
+ if (dname_len) free(dname);
return rc;
}
@@ -292,18 +430,23 @@ void usage(const char *prog)
"describe the files to be included in the initramfs archive:\n"
"\n"
"# a comment\n"
- "file <name> <location> <mode> <uid> <gid> \n"
+ "file <name> <location> <mode> <uid> <gid> [<hard links>]\n"
"dir <name> <mode> <uid> <gid>\n"
"nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n"
+ "slink <name> <target> <mode> <uid> <gid>\n"
+ "pipe <name> <mode> <uid> <gid>\n"
+ "sock <name> <mode> <uid> <gid>\n"
"\n"
- "<name> name of the file/dir/nod in the archive\n"
- "<location> location of the file in the current filesystem\n"
- "<mode> mode/permissions of the file\n"
- "<uid> user id (0=root)\n"
- "<gid> group id (0=root)\n"
- "<dev_type> device type (b=block, c=character)\n"
- "<maj> major number of nod\n"
- "<min> minor number of nod\n"
+ "<name> name of the file/dir/nod/etc in the archive\n"
+ "<location> location of the file in the current filesystem\n"
+ "<target> link target\n"
+ "<mode> mode/permissions of the file\n"
+ "<uid> user id (0=root)\n"
+ "<gid> group id (0=root)\n"
+ "<dev_type> device type (b=block, c=character)\n"
+ "<maj> major number of nod\n"
+ "<min> minor number of nod\n"
+ "<hard links> space separated list of other links to file\n"
"\n"
"example:\n"
"# A simple initramfs\n"
@@ -315,7 +458,7 @@ void usage(const char *prog)
prog);
}
-struct file_type file_type_table[] = {
+struct file_handler file_handler_table[] = {
{
.type = "file",
.handler = cpio_mkfile_line,
@@ -326,6 +469,15 @@ struct file_type file_type_table[] = {
.type = "dir",
.handler = cpio_mkdir_line,
}, {
+ .type = "slink",
+ .handler = cpio_mkslink_line,
+ }, {
+ .type = "pipe",
+ .handler = cpio_mkpipe_line,
+ }, {
+ .type = "sock",
+ .handler = cpio_mksock_line,
+ }, {
.type = NULL,
.handler = NULL,
}
@@ -369,6 +521,7 @@ int main (int argc, char *argv[])
"ERROR: incorrect format, could not locate file type line %d: '%s'\n",
line_nr, line);
ec = -1;
+ break;
}
if ('\n' == *type) {
@@ -388,10 +541,10 @@ int main (int argc, char *argv[])
ec = -1;
}
- for (type_idx = 0; file_type_table[type_idx].type; type_idx++) {
+ for (type_idx = 0; file_handler_table[type_idx].type; type_idx++) {
int rc;
- if (! strcmp(line, file_type_table[type_idx].type)) {
- if ((rc = file_type_table[type_idx].handler(args))) {
+ if (! strcmp(line, file_handler_table[type_idx].type)) {
+ if ((rc = file_handler_table[type_idx].handler(args))) {
ec = rc;
fprintf(stderr, " line %d\n", line_nr);
}
@@ -399,12 +552,13 @@ int main (int argc, char *argv[])
}
}
- if (NULL == file_type_table[type_idx].type) {
+ if (NULL == file_handler_table[type_idx].type) {
fprintf(stderr, "unknown file type line %d: '%s'\n",
line_nr, line);
}
}
- cpio_trailer();
+ if (ec == 0)
+ cpio_trailer();
exit(ec);
}
diff --git a/linux-tools/boa-0.94.13/CREDITS b/linux-tools/boa-0.94.13/CREDITS
deleted file mode 100644
index 1b11f9752e..0000000000
--- a/linux-tools/boa-0.94.13/CREDITS
+++ /dev/null
@@ -1,38 +0,0 @@
-Liam Widdowson <lbw@telstra.com>
- Lots of improvement for Solaris support
-
-Wes Hardaker <wjhardaker@ucdavis.edu>
-
-Michal Kara <lemming@netcentrum.cz>
- mmap_cache buglet fix
-
-Matt Callaway <matt@securepipe.com>
- CGI chdir issue
-
-Jari Korva <jpkorva@iki.fi>
- IPv6 patch
-
-William Meadows <wmeadows@linux-support.net>
- escape.c bug notification and (first) fix
-
-Thomas Neumann <tn@tmr-online.de>
- *BSD compilation/core bugfixes
-
-Paul Saab <paul@mu.org>
- Remove SO_REUSEADDR setting on each client socket
-
-David N. Welton <davidw@linuxcare.com>
- Added "Listen" directive for server bind address
-
-Craig Silverstein <csilvers@google.com>
- patches for config.h and config.c
-
-Russ Nelson <nelson@crynwr.com>
- Original, Experimental IP-based Virtual Host code
-
-Landon Curt Noll http://www.isthe.com/chongo
- Allow non-standard date format 31 September 2000 23:59:59 GMT
- Skip whitespace before HTTP/major.minor
-
-Brieuc Jeunhomme <bbp@via.ecp.fr>
- fix buglet in alias expansion
diff --git a/linux-tools/boa-0.94.13/ChangeLog b/linux-tools/boa-0.94.13/ChangeLog
deleted file mode 100644
index 5558c0886f..0000000000
--- a/linux-tools/boa-0.94.13/ChangeLog
+++ /dev/null
@@ -1,433 +0,0 @@
-** Changes from 0.94.12 to 0.94.13
- * Change many instances of log_error_mesg + exit to DIE macro
- * Change all instance of log_error_mesg (without exit) to WARN macro
- * do a much better job of checking return values from malloc and
- especially strdup.
- * check results of calling umask and getrlimit
- * server_s is no longer a global int
- * check results of fork via switch instead of if (fork())
- * check for getopt.h and include it if found
- * remove unused #defines, and add WARN macro, and replace
- many calls to log_error_mesg(..) with WARN macro
- * fix bug in get_commonlog_time where time_offset calculation was
- the opposite of what it should be ('-' and '+' were swapped)
- * fix compatability bug with old and newer versions of flex/yacc
- * add check for AC_FUNC_MMAP to configure.in
- * fix really lame thinko in normalize_path, which would prepend the
- results of earlier calls to results from later calls
- * Add MaxConnections, a configuration directive which allows the
- user to specify the maximum number of connections that Boa will
- accept concurrently.
- * add SERVER_ADDR and REQUEST_URI to environment of CGI
- * handle SIGBUS during writes of data that has been memory mapped
- * minor optimization in select.c that prevents DEAD requests from
- being added to the block set
- * fix bug in CGI environment script_name - closes sf.net bug #576725
- * make 'status' variable local to requests.c, not local to every file
- by forgetting to declare 'extern' in globals.h :-|
- * make getsockname non-fatal, and do it every time because we may
- need it for the CGI
- * some minor refactoring optimizations in hash.c
-
-** Changes from 0.94.11 to 0.94.12
- * Renamed Changelog ChangeLog, and moved up to top-level directory
- * Next 3 items due in part or whole thanks to
- Liam Widdowson
- * when printf'ing a pid type, force to int, because it could be
- something else on other platforms. Should probably change it to
- a long, and use that.
- * backported chroot commandline support from 0.95
- * backported support for strdup, strstr, alphasort, and scandir
- from 0.95
- * Fixed src/Makefile.in -- it didn't remove index_dir.o
- * backport create_temporary_file from 0.95
- (instead of using tmpnam)
- * Allow non-standard date format 31 September 2000 23:59:59 GMT
- Patch by Landon Curt Noll
- * Skip whitespace before HTTP/major.minor
- Adapted patch from Landon Curt Noll
- * open /dev/null first thing (affects chrooting)
- * properly handle sigalrm -- use sigalrm_flag and sigalrm_run
- instead of handling the signal in the signal handler
- * update manpage slightly
- * send 400 BAD Request when resource does not start with '/'
- * add grp.h to boa.h's includes -- remove from boa.c and config.c
- * removed duplicate header includes from boa.c, config.c, get.c,
- ip.c, request.c, response.c
- * factor out creating the server socket and dropping privs
- into create_server_socket and drop_privs
- * type all functions in boa.c (except main) as static
- * set umask after opening /dev/null
- * tie stdin/stdout to /dev/null before commandline parse
- * removed old, unused chroot code
- * move builds_needs_escape earlier in the startup
- * move fork later in the startup
- * type all c_set_* as static in config.c
- * don't bother trying to change uid/gid (or error if the
- requested uid/gid doesn't exist) if not UID 0
- * return more appropriate error code when foo.html gives
- access denied, but foo.html.gz gives some other error
- (essentially report error associated with foo.html, not foo.html.gz)
- * send NOT Implemented when an unknown method is attempted
- * always attempt a 32k read right before close
- (stopgap until blackhole can be merged)
- * allow more than 1 space in logline between method, resource,
- and http version
- * don't use inline functions
- * update configure.in so that autoconf 2.50 doesn't complain (as much)
- * properly use VPATH and srcdir according to autoconf docs
- * change curly-braces to parentheses in Makefilein
- * use $^ instead of manually listing the dependencies in Makefile.in
- * remove tests section in Makefile.in
- * write tags not TAGS in Makefile.in
- * Add gethostbyname and inet_aton to function checks
- * Add code from 0.95 which checks for socket in -lsocket,
- inet_aton in -lresolv, and gethost{by}name in -lnsl
- * Also remove broken bc-based "how big is an unsigned int" checks:
- assume minimum of 32 bits and check in escape.c at runtime.
- * Added new file: README.chroot.solaris, based on a
- modified version by Liam Widdowson
- * Add check_struct_for.m4, which allows us to check a structure
- for a member (found at http://www.gnu.org/software/ac-archive/
- authored by Wes Hardaker
- * Call "aclocal -I ." to rebuild aclocal.m4
- * Using new check-struct-for-member autoconf macro, check
- for tm_gmtoff and tm_zone in struct tm -- useful in
- portability tests for localtime.
- * Also check sockaddr_in for structure sin_len so we can set
- it properly.
- * index_dir.c (which ends up in boa_indexer) can now be compiled
- with USE_LOCALTIME, and if so, it will report the local time
- using the timezone name. Otherwise it uses UTC time and UTC
- timezone designation.
- * fix buglet in mmap_cache.c which shows up when under
- heavy load by many different files.
- Found and squashed by Michal Kara
- * normalize paths on Aliases, log files, server root, dirmaker
- This makes sure that paths are 'absolute'
- * don't generate DOCUMENT_ROOT or SERVER_ROOT,
- CGIs have no business knowing that information
- * if CGI, chdir to the cgi's root path
- Bug found by Matt Callaway
- * remove ChrootPath and PidFile directives from the parser
- (they aren't used anyway)
- * keep track of maximum file descriptor in use to optimize call
- to select()
- * apply IPv6 patch from Jari Korva
- * optimize keep-alive copy data routine
- * try to use memcpy instead of strcpy/strcat in more places (alias.c)
- * update .depend file
- * use fcntl + GET_FL to get a file descriptor's flags, then
- add or remove only the bits we want to set. This prevents
- accidentally setting or unsettings bits we don't have anything
- to do with inadvertantly. (removed, at least temporarily.
- Show me a system where it is needed -- LRD)
- * make sure to call FD_ZERO when we handle a restart
- * in read.c, don't call boa_perror on read failure -- socket is
- dead or messed up anyway, no reason to try to write to it.
- * explicit .SUFFIXES in Makefile.in
- * boa.objdump target added
- * use @MAKE_SET@ (for when $(MAKE) != "make")
- * add -Wundef -Wwrite-strings -Wredundant-decls -Winline to GCC_FLAGS
- * change Paul Phillips' and Larry Doolittle's emails in source
- * add --disable-debug, --enable-profile, --with-dmalloc, and --with-efence
- * test for failed-but-return-was-successful setuid:
- http://www.securityfocus.com/bid/1322
- * use _exit not exit in CGI child
- * always place new keepalive request on blocked list, we can't be
- sure of the state of the active list, and since enqueue places
- things at the *front* of the list, it doesn't do us much good
- to place the new request on the active list anyway.
- * update some Copyright statements for 2002
- * When comparing the uri to an alias, only compare if
- the uri length is greater than or equal to the length of the alias
- * in init_script_alias, make sure to check for document_root before
- trying to use it
- * script_name is now just a copy of the request, rather
- than some complicated variation on the pathname
- * change the way the CGI environment is handled.
- Now, it is allocated at request allocation time, and exists
- throughout the life of the structure.
- * check memory allocations, etc.. when creating the static
- CGI environment and when making new CGI environment variables
- * wait until process_option_end to call unescape_uri, clean_pathname,
- and translate_uri
- * remove debian package information
- * move RedHat packaging information to contrib
- * remove tests -- they weren't usable anyway
- * add some new hash routines, and use djb2 (a variant on a
- hash algorithm popularized by Dan J. Bernstein)
- * a side-effect of the new hash routines is a bugfix,
- involving negative return values from hash routines.
- This has been fixed.
- * add a routine, show_hash_stats, which is called with other
- statistical output via sigalarm
- * remove some duplicate prototypes from config.c
- * make simple_itoa take an unsigned int
- * try to make NOBLOCK handling in compat.h compatible with Solaris
- * make sure to update current_time before calling signal handlers
- * alter primary loop to make sure that select gets called even
- when there are requests that are not blocking, and call fdset_update
- and process_requests (when appropriate) after signal handlers but
- before select to make sure that blocked requests are still handled
- by select after a sighup. (Thanks to Karl Olsen)
- * pull select loop into select.c
- * poll server socket once per active connection
- * add send_r_service_unavailable and use it when appropriate
- * state uptime in seconds at normal program termination
- * include sys/fcntl.h if it is found by configure
- * fix POST bug where a content-length < 0 would cause Boa to
- consume its full share of CPU until killed
- Bug report by Landon Curt Noll
- * add CGIPath configuration variable
- based upon a patch by Landon Curt Noll
- * add function boa_atoi, which wraps atoi, but does not
- accept negative values. Additionally, it checks to make sure
- the converted value and the original value are the same, avoiding
- issues like "124.3" -> "123" and "123abc" -=> "123".
- Either a value is an int or it isn't - no middle ground.
- * use boa_atoi to convert content-length from client.
- * add new #define - SINGLE_POST_LIMIT_DEFAULT, which defines
- (in bytes) the *default* single_post_limit.
- * single_post_limit is now in bytes.
- * when adding aliases, only "normalize" paths that start
- with "./" - this is a departure from previous behavior
- * add "?" to the list of characters that it is safe to leave unescaped
- * clean up Makefile.in of no-longer-pertinent comments
- * add send_r_bad_gateway and use it
- * tie stderr to either cgi_log_fd or devnullfd - either way
- make sure stderr is a valid filehandle before cgi execution
- * cgi_env is no longer allocated, it's part of the struct now
- * fix bug in CgiPath logic
- * when unable to allocate memory for an environment variable, log it
- * add clear_common_env, which de-allocates the cgi_common_env stuff
- [NEVER USE THIS outside of a terminal signal handler!]
- * don't be so wasteful of memory in normalize_path
- * adapted fix for alias expansion from Brieuc Jeunhomme
-
-** Changes from 0.94.10.1 to 0.94.11
- * use LIBS in Makefile.in (which propagates from autoconf)
- * properly free memory allocated by scandir in index_dir.c
- * rearrange some header files and includes
- * on reads and writes, don't check for -1, check for < 0
- * include fix by William Meadows
- for escape.c which fixes segfaults due to improper allocation
- * above fix by William Meadows no longer needed;
- escape.c and escape.h rewritten by Larry Doolittle -- requires
- at least 32 bit words, but is correct (jdn's 1st attempt was faulty)
-
-** Changes from 0.94.10 to 0.94.10.1
- * Actually update the SERVER_VERSION in src/defines.h
-
-** Changes from 0.94.9 to 0.94.10
- * Fixes escaping rules
- * Fixes segfault when directory_index is undefined and
- directory needs to be generated
- * adds dummy signal handlers for SIGUSR1 and SIGUSR2 (Closes SF #425921)
- * Update documentation regarding mime.types (Closes Debian #69991)
- * Make sure documentation builds (Closes Debian #110818)
-
-** Changes from 0.94.8.3 to 0.94.9
- * src/Makefile.in updated to take CFLAGS, LIBS, and LDFLAGS
- from autoconf
- * Update escaping rules with latest RFC
- * unescape_uri skips fragments and also stop parsing at '?'
- * Don't accept fd over FD_SETSIZE in request.c:get_request
- * use backported documentation from 0.95
- * make sure POST fd gets closed even on client cancel
- * use backported index_dir.c from 0.95
- * support subdirectories in ScriptAlias directories
- * add SinglePostLimit (int, in Kilobytes) to config system
- * check for ENOSPC on body write
- * use environment variable TMP (or "/tmp" if not available),
- and chdir there when boa exits.
- * add 1-time-only hack to make a 32kB read at the end of a request
- on POST or PUT
- * close unused file descriptors (/dev/null in boa.c, and the
- unused part of the pipes call in cgi.c)
- * made Makefile.in VPATH happy
-
-** Changes from 0.94.8.2 to 0.94.8.3
- * Move unescape_uri *before* clean_pathname to prevent
- encoding of / and .. in pathname
- * wrap execution of GUNZIP in cgi.c with #ifdef GUNZIP
- * stop parsing when fragment found in URL ('#')
-
-** Changes from 0.94.8.1 to 0.94.8.2
- * close pipes[1] in child and generate HTTP_REFERER environment
- variable in cgi.c
- * Minor changes to the Debian package
-
-** Changes from 0.94.8 to 0.94.8.1
- * Change umask call from (umask(0600)) to (umask(~0600))
-
-** Changes from 0.94.7 to 0.94.8
- * Fix major thinko in temp file permissions
- * unlink temporary file immediately following creation
- * implement maximum # of active connections at 10 less than RLIMIT_NOFILE
- to avoid or eliminate crashes resulting from running out of
- file descriptors
- * Fix thinko in POST
-
-** Changes from 0.94.6 to 0.94.7
- * STDIN and STDOUT are now tied to /dev/null
- * sets PATH_MAX to 2048 if not defined (for Hurd)
- * core dumps (should never happen) would be located in /tmp
- * alter behavior when select gets a EBADF
- * add translation for the \" char -> &quot;
- * remove use of sys_errlist. Use perror.
- * better makedist.sh (still a stupid program though)
-
-** Changes from 0.94.5 to 0.94.6
- * Removed doc++ commenting
- * Removed erroneous debugging statments
- * Move some stuff out of config.c (read_config_file) to boa.c
- * Altered some of fixup_server_root()
- * Bug fix in get.c re: automatic gunzip
- * Added some stubs for chroot code (*not* ready yet)
-
-** Changes from 0.94.4 to 0.94.5
- * Alteration of most of the comments and such for doc++ use
- * Fixed buffer overflow in alias.c
- * Fixed buffer underflow in util.c
-
-** Changes from 0.94.3 to 0.94.4
- * Better escaping of data to user, both for HTTP headers and HTML body
- * Proper escaping of output in CGI example perl scripts
-
-** Changes from 0.94.0 to 0.94.2
- * Fixed obnoxious pipeline bug
- * Fixed (sorta) a compilation/core bug for *BSD systems
- Original code by Thomas Neumann
- * Moved to GPLv2
- * Changed manpage to section 8
- * boa.sgml now references a .png file instead of evil .gif
-
-** Changes from 0.93.19.2 to 0.94.0
- * Added UseGMT to the configuration parser
- * util.c commonlog now logs in Apache-style commonlog time format
- * Remove SO_SNDBUF on-start message
-
-** Changes from 0.93.19 to 0.93.19.2
- * Changed to combined log (from NCSA access_log format) ala Drew Streib
- * Altered POST cgi code to handle bug in Netscape
- * SO_SNDBUF changes by Larry
-
-** Changes from 0.93.17.2 to 0.93.19 (all 0.93.18.x changes inclusive)
- * Update of some copyright statements for 99
- * Replacement of sprintf with strlen/memcpy or strcpy/strcat
- wherever possible
- * Significant rearrangement in alias.c, minor functional differences
- (some CGI environment variables handled differently)
- * Removal of die function. Replace with log_err_mesg and exit.
- * initial IPv6 stubs and support
- * Move #include "config.h" to top of boa.h where it will do some good
- * Stubs and functions for strstr and strdup
- * Seperation of buffer code into it's own file
- * Significant changes to cgi.c et al (cgi_header.c, etc...)
- * Speed patches by removal of "extra" calls to time(): Use global variable!
- * pipelining changes... it works now.
- * require content-length from clients (ala rfc1945)
- * alter body_read and body_write to work more efficiently with known content-length
- * move read(2) part to *after* parsing...
- * added support for additional header message in send_redirect_temp
- * change use of NO_ZERO_FILL_LENGTH to offsetof() use
- * Remove SO_REUSEADDR setting on each client socket, Paul Saab
- * Avoid SO_SNDBUF setting if possible
- * Large quantities of otherwise not-insignificant changes
-
-** Changes from 0.93.17.2 to 0.93.17.3
- * Put on-the-fly directories back in, stripped down from the 0.92 version
- * Fixed DocumentRoot, ServerAdmin and ServerName null-value handling in
- CGI environment generation
- * Fixed argument order in Script* directives (bug introduced in 0.93.17.2)
- * Got rid of MAX_CGI_VARS because it was not being used consistently, or
- for that matter, at all, really.
- * Added some more FASCIST_LOGGING to cgi.c
- * Minor mmap patch by LRD for request.c
-
-** Changes from 0.93.17.1 to 0.93.17.2
- * Added "Listen" directive for server bind address, as most recently
- suggested by David N. Welton
- * Put virtualhost feature in, was experimental in 0.92q
-
-** Changes from 0.93.16.2 to 0.93.17.1
- * New config file parser (supposed to be more maintainable) (LRD)
- * Support for "|command" and ":host:port" syntax for logfiles (untested) (LRD)
-
-** Changes for the 0.93 version **
- * Huge quantities of changes
- * keepalive Bugfix in 0.93.16.2 by Jon Nelson
- report by Craig Silverstein of Google fame.
- * patch for config.h by Craig Silverstein
- * fixed "Parent Directory" problem in boa_indexer for title "/"
- (Debian bug #36165)
- * More Craig Silverstein
- modifications, namely:
- ErrorLog (if omitted, print to stderr)
- DocumentRoot (if omitted, can only server user-dir files)
- DirectoryIndex (if omitted, always use DirectoryMaker)
- MimeTypes (if omitted, don't load -- users can use AddType instead)
-
-
-** Changes from v0.92o to v0.92p **
-
- * Documented misbehavior of CGI, SIGHUP, short aliases, stale dircache.
- * Documented how to patch signals.c for use on SunOS.
- * Closed file descriptor leak when redirecting a bare directory URL to
- one with an appended "/".
- * Closed potential file descriptor leak if errors encountered generating
- on-the-fly index.
- * Cleaned up include file handling to be simultaneously compatible with
- Linux, SunOS, HP-UX, and AIX.
- * Supress message body for codes 302, 400, 403, 404, 500, and 501 if
- incoming request is "HEAD".
-
-** Changes from v0.91 to v0.92o **
- (0.92o released 27 December, 1996)
-
- * Maintenance handover from Paul Phillips to Larry Doolittle
- * Changed (char)NULL to '\0'
- * Cleaned up signal handler prototypes in signals.c
- * Modified handling of CGI environment variable PATH_TRANSLATED,
- should now work the same as NCSA.
- * More conservative buffer size in add_cgi_env()
- * Build argv list for a CGI script according to spec
- * Speedup process_header_line, eliminate potential memory leak
- * Occasional spelling fixes and lint removal
- * Added REMOTE_PORT env var for CGI scripts, to allow easy ident lookups
- * Changed rfc822 time format
- * Log timeouts and broken connections
- * Fix mime suffix handling for filenames with multiple "."s
- * Initialize conn->time_last, fixes bug with rapid-fire connections
- * Performance tweak to req_write()
- * Changed http_version from float to char[8]
- * Rewrote on-the-fly directory generation; it works now
- * Added user configurable dircache directory in boa.conf
- * Fixed "simple" response bugs, including incorrect CGI handling
- * Keepalive (HTTP/1.1 draft) support, mostly by Jon Nelson
- * Close data_fd in 304 Not Modified flow of control
- * Switch socket flags to non-blocking before cgi handoff
- * Try to handle errno properly in the face of multiple errors
- * Close fd's of all other transactions before cgi handoff
- * Move real work for sighup and sigchld out of signal handler
- * Fix free(req->cgi_env) in request.c
- * Response message cleanup - better match to HTML-2.0 DTD
- * Experimental Virtual Host code from Russ Nelson
- * Expand buffer for escaped URI in init_get()
- * SIGTERM triggers lame duck mode until all pending transactions complete
- * Close and unlink temp file for POST in parent process
-
-** Changes from v0.90 to v0.91 **
-
- * Cleaned up main while loop
- * Optimized request line parsing
- * Added state machine for header reads -- necessary to deal wtih
- possibility of obtaining header data in multiple reads. This
- also allows interactive use of server.
- * Added 500/501 return codes for various conditions
-
-** v0.90 **
-
- * Initial release
-
diff --git a/linux-tools/boa-0.94.13/Gnu_License b/linux-tools/boa-0.94.13/Gnu_License
deleted file mode 100644
index d60c31a97a..0000000000
--- a/linux-tools/boa-0.94.13/Gnu_License
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/linux-tools/boa-0.94.13/README b/linux-tools/boa-0.94.13/README
deleted file mode 100644
index 6ba94d7905..0000000000
--- a/linux-tools/boa-0.94.13/README
+++ /dev/null
@@ -1,15 +0,0 @@
-This is Boa, a high performance web server for Unix-alike computers,
-covered by the Gnu General Public License. This is version 0.94,
-released January 2000. It is well tested and appears to be of
-at least "gamma" quality.
-
-Boa was created in 1991 by Paul Phillips <paulp@go2net.com>. It is now being
-maintained and enhanced by Larry Doolittle <ldoolitt@boa.org>
-and Jon Nelson <jnelson@boa.org>.
-
-For more information (including installation instructions) examine
-the file docs/boa.txt or docs/boa.dvi, point your web browser to docs/boa.html,
-or visit the Boa homepage at
-
- http://www.boa.org/
-
diff --git a/linux-tools/boa-0.94.13/boa.conf b/linux-tools/boa-0.94.13/boa.conf
deleted file mode 100644
index 2e4f3a0d8c..0000000000
--- a/linux-tools/boa-0.94.13/boa.conf
+++ /dev/null
@@ -1,194 +0,0 @@
-# Boa v0.94 configuration file
-# File format has not changed from 0.93
-# File format has changed little from 0.92
-# version changes are noted in the comments
-#
-# The Boa configuration file is parsed with a lex/yacc or flex/bison
-# generated parser. If it reports an error, the line number will be
-# provided; it should be easy to spot. The syntax of each of these
-# rules is very simple, and they can occur in any order. Where possible
-# these directives mimic those of NCSA httpd 1.3; I saw no reason to
-# introduce gratuitous differences.
-
-# $Id: boa.conf,v 1.1.1.1 2006/05/19 13:20:15 fleury Exp $
-
-# The "ServerRoot" is not in this configuration file. It can be compiled
-# into the server (see defines.h) or specified on the command line with
-# the -c option, for example:
-#
-# boa -c /usr/local/boa
-
-
-# Port: The port Boa runs on. The default port for http servers is 80.
-# If it is less than 1024, the server must be started as root.
-
-Port 80
-
-# Listen: the Internet address to bind(2) to. If you leave it out,
-# it takes the behavior before 0.93.17.2, which is to bind to all
-# addresses (INADDR_ANY). You only get one "Listen" directive,
-# if you want service on multiple IP addresses, you have three choices:
-# 1. Run boa without a "Listen" directive
-# a. All addresses are treated the same; makes sense if the addresses
-# are localhost, ppp, and eth0.
-# b. Use the VirtualHost directive below to point requests to different
-# files. Should be good for a very large number of addresses (web
-# hosting clients).
-# 2. Run one copy of boa per IP address, each has its own configuration
-# with a "Listen" directive. No big deal up to a few tens of addresses.
-# Nice separation between clients.
-# The name you provide gets run through inet_aton(3), so you have to use dotted
-# quad notation. This configuration is too important to trust some DNS.
-
-#Listen 192.68.0.5
-
-# User: The name or UID the server should run as.
-# Group: The group name or GID the server should run as.
-
-User nobody
-Group nogroup
-
-# ServerAdmin: The email address where server problems should be sent.
-# Note: this is not currently used, except as an environment variable
-# for CGIs.
-
-#ServerAdmin root@localhost
-
-# ErrorLog: The location of the error log file. If this does not start
-# with /, it is considered relative to the server root.
-# Set to /dev/null if you don't want errors logged.
-# If unset, defaults to /dev/stderr
-
-ErrorLog /var/log/boa/error_log
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"
-
-# AccessLog: The location of the access log file. If this does not
-# start with /, it is considered relative to the server root.
-# Comment out or set to /dev/null (less effective) to disable
-# Access logging.
-
-AccessLog /var/log/boa/access_log
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"
-
-# UseLocaltime: Logical switch. Uncomment to use localtime
-# instead of UTC time
-#UseLocaltime
-
-# VerboseCGILogs: this is just a logical switch.
-# It simply notes the start and stop times of cgis in the error log
-# Comment out to disable.
-
-#VerboseCGILogs
-
-# ServerName: the name of this server that should be sent back to
-# clients if different than that returned by gethostname + gethostbyname
-
-#ServerName www.your.org.here
-
-# VirtualHost: a logical switch.
-# Comment out to disable.
-# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
-# become /var/www/IP-A.
-# Example: http://localhost/ becomes /var/www/127.0.0.1
-#
-# Not used until version 0.93.17.2. This "feature" also breaks commonlog
-# output rules, it prepends the interface number to each access_log line.
-# You are expected to fix that problem with a postprocessing script.
-
-#VirtualHost
-
-# DocumentRoot: The root directory of the HTML documents.
-# Comment out to disable server non user files.
-
-DocumentRoot /var/www
-
-# UserDir: The name of the directory which is appended onto a user's home
-# directory if a ~user request is recieved.
-
-UserDir public_html
-
-# DirectoryIndex: Name of the file to use as a pre-written HTML
-# directory index. Please MAKE AND USE THESE FILES. On the
-# fly creation of directory indexes can be _slow_.
-# Comment out to always use DirectoryMaker
-
-DirectoryIndex index.html
-
-# DirectoryMaker: Name of program used to create a directory listing.
-# Comment out to disable directory listings. If both this and
-# DirectoryIndex are commented out, accessing a directory will give
-# an error (though accessing files in the directory are still ok).
-
-DirectoryMaker /usr/lib/boa/boa_indexer
-
-# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
-# has been commented out, the the on-the-fly indexing of Boa can be used
-# to generate indexes of directories. Be warned that the output is
-# extremely minimal and can cause delays when slow disks are used.
-# Note: The DirectoryCache must be writable by the same user/group that
-# Boa runs as.
-
-# DirectoryCache /var/spool/boa/dircache
-
-# KeepAliveMax: Number of KeepAlive requests to allow per connection
-# Comment out, or set to 0 to disable keepalive processing
-
-KeepAliveMax 1000
-
-# KeepAliveTimeout: seconds to wait before keepalive connection times out
-
-KeepAliveTimeout 10
-
-# MimeTypes: This is the file that is used to generate mime type pairs
-# and Content-Type fields for boa.
-# Set to /dev/null if you do not want to load a mime types file.
-# Do *not* comment out (better use AddType!)
-
-MimeTypes /etc/mime.types
-
-# DefaultType: MIME type used if the file extension is unknown, or there
-# is no file extension.
-
-DefaultType text/plain
-
-# CGIPath: The value of the $PATH environment variable given to CGI progs.
-
-CGIPath /bin:/usr/bin:/usr/local/bin
-
-# SinglePostLimit: The maximum allowable number of bytes in
-# a single POST. Default is normally 1MB.
-
-# AddType: adds types without editing mime.types
-# Example: AddType type extension [extension ...]
-
-# Uncomment the next line if you want .cgi files to execute from anywhere
-#AddType application/x-httpd-cgi cgi
-
-# Redirect, Alias, and ScriptAlias all have the same semantics -- they
-# match the beginning of a request and take appropriate action. Use
-# Redirect for other servers, Alias for the same server, and ScriptAlias
-# to enable directories for script execution.
-
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Example: Redirect /bar http://elsewhere/feh/bar
-
-# Aliases: Aliases one path to another.
-# Example: Alias /path1/bar /path2/foo
-
-Alias /doc /usr/doc
-
-# ScriptAlias: Maps a virtual path to a directory for serving scripts
-# Example: ScriptAlias /htbin/ /www/htbin/
-
-ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
-
diff --git a/linux-tools/boa-0.94.13/contrib/README.chroot.solaris b/linux-tools/boa-0.94.13/contrib/README.chroot.solaris
deleted file mode 100644
index afc2bdc21d..0000000000
--- a/linux-tools/boa-0.94.13/contrib/README.chroot.solaris
+++ /dev/null
@@ -1,158 +0,0 @@
-Boa chroot mini-HOWTO
-===================================================
-by Liam Widdowson <lbw@telstra.com>
-modified slightly by Jon Nelson <jnelson@boa.org>
-
-The following is required to get Boa working in a chroot jail. Whilst this
-README is about Solaris specifically, the principals here will apply to
-other operating systems.
-
-The following assumptions are made:
-
- - Boa has been compiled and installed in /opt/boa
- - The chroot jail will be created in /var/www
- - A user and group 'www' have been created.
-
-Make sure you change the above directories to suit your system.
-
-Your boa.conf should look something like the following:
-
-## begin config file
-
-Port 80
-User www
-Group www
-
-# Note, these paths are used releative to the chroot jail. i.e /var/log is
-# really /var/www/var/log
-ErrorLog /var/log/error_log
-AccessLog /var/log/access_log
-DocumentRoot /var/www
-
-# You won't be able to access user home directories outside of the chroot
-# but you may replicate them into the chroot jail. You'll need a working
-# and valid /etc/passwd as well
-UserDir public_html
-
-DirectoryIndex index.html
-
-# this binary must exist in the chroot jail. Again, the path is relative.
-DirectoryMaker /usr/bin/boa_indexer
-
-KeepAliveMax 1000
-KeepAliveTimeout 10
-
-# this file must exist inside AND outside the chroot jail.
-MimeTypes /opt/boa/mime.types
-
-DefaultType text/plain
-
-## end config file
-
-Once the configuration file is created, you must begin creating your
-chroot jail. A variety of libraries, timezone files, device files and other
-bits and pieces must be copied in order for this to work. Below is a ls -lR
-of what your jail should be at a minimum:
-
-.:
-total 10
-drwxr-xr-x 2 root other 512 Jan 21 18:58 dev
-drwxr-xr-x 2 root other 512 Jan 21 19:20 etc
-drwxr-xr-x 3 root other 512 Jan 21 19:20 opt
-drwxr-xr-x 5 root other 512 Jan 21 19:08 usr
-drwxr-xr-x 4 root other 512 Jan 21 18:57 var
-
-./dev:
-total 0
-crw-rw-rw- 1 root other 13, 2 Jan 21 18:58 null
-crw-rw-rw- 1 root other 41, 0 Jan 21 18:58 udp
-
-./etc:
-total 16
--r-xr-xr-x 1 root other 482 Jan 21 19:20 TIMEZONE
--r--r--r-- 1 root other 74 Jan 21 19:20 hosts
--rw-r--r-- 1 root other 1239 Jan 21 19:20 netconfig
--rw-r--r-- 1 root other 1298 Jan 21 19:20 nsswitch.conf
--r--r--r-- 1 root other 514 Jan 21 19:44 passwd
--rw-r--r-- 1 root other 94 Jan 21 19:20 resolv.conf
-drwx------ 2 root other 512 Jan 21 19:20 boa
-
-./boa:
-total 4
--rw-r--r-- 1 root other 1234 Jan 21 19:26 boa.conf
-
-./opt:
-total 2
-drwxr-xr-x 2 root other 512 Jan 21 19:26 boa
-
-./opt/boa:
-total 20
--rw-r--r-- 1 root other 9964 Jan 21 19:26 mime.types
-
-./usr:
-total 6
-drwxr-xr-x 2 root other 512 Jan 21 19:21 bin
-drwxr-xr-x 2 root other 512 Jan 21 19:03 lib
-drwxr-xr-x 3 root other 512 Jan 21 19:08 share
-
-./usr/bin:
-total 18
--rwxr-xr-x 1 root other 8944 Jan 21 19:23 boa_indexer
-
-./usr/lib:
-total 5094
--rwxr-xr-x 1 root other 185020 Jan 21 19:03 ld.so.1
--rwxr-xr-x 1 root other 1126652 Jan 21 18:56 libc.so.1
--rwxr-xr-x 1 root other 4308 Jan 21 18:56 libdl.so.1
--rwxr-xr-x 1 root other 24968 Jan 21 18:56 libmp.so.2
--rwxr-xr-x 1 root other 883500 Jan 21 18:56 libnsl.so.1
--rwxr-xr-x 1 root other 265860 Jan 21 18:56 libresolv.so.2
--rwxr-xr-x 1 root other 70260 Jan 21 18:56 libsocket.so.1
-
-./usr/share:
-total 2
-drwxr-xr-x 3 root other 512 Jan 21 19:08 lib
-
-./usr/share/lib:
-total 2
-drwxr-xr-x 3 root other 512 Jan 21 19:08 zoneinfo
-
-./usr/share/lib/zoneinfo:
-total 2
-drwxr-xr-x 2 root other 512 Jan 21 19:09 Australia
-
-./usr/share/lib/zoneinfo/Australia:
-total 22
--rw-r--r-- 1 root other 785 Jan 21 19:09 ACT
--rw-r--r-- 1 root other 785 Jan 21 19:09 Broken_Hill
--rw-r--r-- 1 root other 663 Jan 21 19:09 LHI
--rw-r--r-- 1 root other 785 Jan 21 19:09 NSW
--rw-r--r-- 1 root other 104 Jan 21 19:09 North
--rw-r--r-- 1 root other 160 Jan 21 19:09 Queensland
--rw-r--r-- 1 root other 785 Jan 21 19:09 South
--rw-r--r-- 1 root other 825 Jan 21 19:09 Tasmania
--rw-r--r-- 1 root other 785 Jan 21 19:09 Victoria
--rw-r--r-- 1 root other 150 Jan 21 19:09 West
--rw-r--r-- 1 root other 785 Jan 21 19:09 Yancowinna
-
-./var:
-total 4
-drwxr-xr-x 2 www www 512 Jan 21 19:44 log
-drwxr-xr-x 2 root other 512 Jan 21 18:57 www
-
-./var/log:
-total 4
--rw-r--r-- 1 root other 202 Jan 21 19:47 access_log
--rw-r--r-- 1 root other 590 Jan 21 19:49 error_log
-
-./var/www:
-total 0
-
-Note, your boa binary should be kept outside of the chroot jail as
-they are not required.
-
-The commandline issued to boa requires "-r /var/www" which tells
-boa to chroot to /var/www before it does anything else, including
-reading its configuration file.
-
-That's all that's required. Start your new chrooting boa up and enjoy!
diff --git a/linux-tools/boa-0.94.13/contrib/redhat/boa.conf b/linux-tools/boa-0.94.13/contrib/redhat/boa.conf
deleted file mode 100644
index eb84d4db34..0000000000
--- a/linux-tools/boa-0.94.13/contrib/redhat/boa.conf
+++ /dev/null
@@ -1,183 +0,0 @@
-# Boa v0.94 configuration file
-# File format has not changed from 0.93
-# File format has changed little from 0.92
-# version changes are noted in the comments
-#
-# The Boa configuration file is parsed with a lex/yacc or flex/bison
-# generated parser. If it reports an error, the line number will be
-# provided; it should be easy to spot. The syntax of each of these
-# rules is very simple, and they can occur in any order. Where possible
-# these directives mimic those of NCSA httpd 1.3; I saw no reason to
-# introduce gratuitous differences.
-
-# $Id: boa.conf,v 1.1.1.1 2006/05/19 13:20:15 fleury Exp $
-
-# The "ServerRoot" is not in this configuration file. It can be compiled
-# into the server (see defines.h) or specified on the command line with
-# the -c option, for example:
-#
-# boa -c /usr/local/boa
-
-
-# Port: The port Boa runs on. The default port for http servers is 80.
-# If it is less than 1024, the server must be started as root.
-
-Port 80
-
-# Listen: the Internet address to bind(2) to. If you leave it out,
-# it takes the behavior before 0.93.17.2, which is to bind to all
-# addresses (INADDR_ANY). You only get one "Listen" directive,
-# if you want service on multiple IP addresses, you have three choices:
-# 1. Run boa without a "Listen" directive
-# a. All addresses are treated the same; makes sense if the addresses
-# are localhost, ppp, and eth0.
-# b. Use the VirtualHost directive below to point requests to different
-# files. Should be good for a very large number of addresses (web
-# hosting clients).
-# 2. Run one copy of boa per IP address, each has its own configuration
-# with a "Listen" directive. No big deal up to a few tens of addresses.
-# Nice separation between clients.
-# The name you provide gets run through inet_aton(3), so you have to use dotted
-# quad notation. This configuration is too important to trust some DNS.
-
-#Listen 192.68.0.5
-
-# User: The name or UID the server should run as.
-# Group: The group name or GID the server should run as.
-
-User nobody
-Group nobody
-
-# ServerAdmin: The email address where server problems should be sent.
-# Note: this is not currently used, except as an environment variable
-# for CGIs.
-
-#ServerAdmin root@localhost
-
-# ErrorLog: The location of the error log file. If this does not start
-# with /, it is considered relative to the server root.
-# Set to /dev/null if you don't want errors logged.
-# If unset, defaults to /dev/stderr
-
-ErrorLog /var/log/boa/error_log
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"
-
-# AccessLog: The location of the access log file. If this does not
-# start with /, it is considered relative to the server root.
-# Comment out or set to /dev/null (less effective) to disable
-# Access logging.
-
-AccessLog /var/log/boa/access_log
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"
-
-# VerboseCGILogs: this is just a logical switch.
-# It simply notes the start and stop times of cgis in the error log
-# Comment out to disable.
-
-#VerboseCGILogs
-
-# ServerName: the name of this server that should be sent back to
-# clients if different than that returned by gethostname + gethostbyname
-
-#ServerName www.your.org.here
-
-# VirtualHost: a logical switch.
-# Comment out to disable.
-# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
-# become /var/www/IP-A.
-# Example: http://localhost/ becomes /var/www/127.0.0.1
-#
-# Not used until version 0.93.17.2. This "feature" also breaks commonlog
-# output rules, it prepends the interface number to each access_log line.
-# You are expected to fix that problem with a postprocessing script.
-
-#VirtualHost
-
-# DocumentRoot: The root directory of the HTML documents.
-# Comment out to disable server non user files.
-
-DocumentRoot /home/httpd/html
-
-# UserDir: The name of the directory which is appended onto a user's home
-# directory if a ~user request is recieved.
-
-UserDir public_html
-
-# DirectoryIndex: Name of the file to use as a pre-written HTML
-# directory index. Please MAKE AND USE THESE FILES. On the
-# fly creation of directory indexes can be _slow_.
-# Comment out to always use DirectoryMaker
-
-DirectoryIndex index.html
-
-# DirectoryMaker: Name of program used to create a directory listing.
-# Comment out to disable directory listings. If both this and
-# DirectoryIndex are commented out, accessing a directory will give
-# an error (though accessing files in the directory are still ok).
-
-DirectoryMaker /usr/lib/boa/boa_indexer
-
-# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
-# has been commented out, the the on-the-fly indexing of Boa can be used
-# to generate indexes of directories. Be warned that the output is
-# extremely minimal and can cause delays when slow disks are used.
-# Note: The DirectoryCache must be writable by the same user/group that
-# Boa runs as.
-
-# DirectoryCache /var/spool/boa/dircache
-
-# KeepAliveMax: Number of KeepAlive requests to allow per connection
-# Comment out, or set to 0 to disable keepalive processing
-
-KeepAliveMax 1000
-
-# KeepAliveTimeout: seconds to wait before keepalive connection times out
-
-KeepAliveTimeout 10
-
-# MimeTypes: This is the file that is used to generate mime type pairs
-# and Content-Type fields for boa.
-# Set to /dev/null if you do not want to load a mime types file.
-# Do *not* comment out (better use AddType!)
-
-MimeTypes /etc/mime.types
-
-# DefaultType: MIME type used if the file extension is unknown, or there
-# is no file extension.
-
-DefaultType text/plain
-
-# AddType: adds types without editing mime.types
-# Example: AddType type extension [extension ...]
-
-# Uncomment the next line if you want .cgi files to execute from anywhere
-#AddType application/x-httpd-cgi cgi
-
-# Redirect, Alias, and ScriptAlias all have the same semantics -- they
-# match the beginning of a request and take appropriate action. Use
-# Redirect for other servers, Alias for the same server, and ScriptAlias
-# to enable directories for script execution.
-
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Example: Redirect /bar http://elsewhere/feh/bar
-
-# Aliases: Aliases one path to another.
-# Example: Alias /path1/bar /path2/foo
-
-Alias /doc /usr/doc
-
-# ScriptAlias: Maps a virtual path to a directory for serving scripts
-# Example: ScriptAlias /htbin/ /www/htbin/
-
-ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
-
diff --git a/linux-tools/boa-0.94.13/contrib/redhat/boa.init b/linux-tools/boa-0.94.13/contrib/redhat/boa.init
deleted file mode 100644
index d416652181..0000000000
--- a/linux-tools/boa-0.94.13/contrib/redhat/boa.init
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-# The following two lines enable chkconfig(1) to manipulate this script
-# chkconfig: 345 87 13
-# description: Boa is a World Wide Web server. It is used to serve \
-# HTML files and CGI.
-# processname: boa
-# config: /etc/boa/boa.conf
-# There is no pid file
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# See how we were called.
-case "$1" in
- start)
- echo -n "Starting boa: "
- daemon boa
- touch /var/lock/subsys/boa
- echo
- ;;
- stop)
- echo -n "Shutting down boa: "
- killproc boa
- echo
- rm -f /var/lock/subsys/boa
- rm -f /var/run/boa.pid
- ;;
- status)
- status boa
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- reload)
- echo -n "Reloading boa: "
- killproc boa -HUP
- echo
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|reload|status}"
- exit 1
-esac
-
-exit 0
diff --git a/linux-tools/boa-0.94.13/contrib/redhat/boa.logrotate b/linux-tools/boa-0.94.13/contrib/redhat/boa.logrotate
deleted file mode 100644
index 23770e54e1..0000000000
--- a/linux-tools/boa-0.94.13/contrib/redhat/boa.logrotate
+++ /dev/null
@@ -1,6 +0,0 @@
-/var/log/boa/*_log {
- weekly
- compress
- copytruncate
- missingok
-}
diff --git a/linux-tools/boa-0.94.13/contrib/redhat/boa.spec b/linux-tools/boa-0.94.13/contrib/redhat/boa.spec
deleted file mode 100644
index a6697df496..0000000000
--- a/linux-tools/boa-0.94.13/contrib/redhat/boa.spec
+++ /dev/null
@@ -1,89 +0,0 @@
-Summary: a single-tasking high performance http server
-Name: boa
-Version: 0.94.9
-Release: 1
-Group: System Environment/Daemons
-Source: http://www.boa.org/boa-%{version}.tar.gz
-Copyright: GNU general public license
-Requires: /etc/mime.types
-Prereq: /sbin/chkconfig, man, gzip
-Provides: setup webserver
-Buildroot: /usr/tmp/boa
-
-%description
-Boa is a single-tasking HTTP server. That means that
-unlike traditional web servers, it does not fork for each
-incoming connection, nor does it fork many copies of
-itself to handle multiple connections. It internally mul­
-tiplexes all of the ongoing HTTP connections, and forks
-only for CGI programs (which must be separate processes.)
-Preliminary tests show Boa is more than twice as fast as
-Apache.
-
-Boa was created in 1991 by Paul Phillips <psp@well.com>. It is now being
-maintained and enhanced by Larry Doolittle <ldoolitt@boa.org>
-and Jon Nelson <jnelson@boa.org>.
-
-For more information (including installation instructions) examine
-the file docs/boa.txt or docs/boa.dvi, point your web browser to docs/boa.html,
-or visit the Boa homepage at
-
- http://www.boa.org/
-
-%changelog
-* Thu Aug 6 2000 Jonathon D Nelson <jnelson@boa.org>
-- revamp packaging based upon examples provided by
- Jules Stuifbergen <jules@zjuul.net> and others
-
-%prep
-%setup -T -b 0
-%build
-(cd src && CFLAGS=$RPM_OPT_FLAGS ./configure --prefix=$RPM_BUILD_ROOT)
-(cd src && make)
-(cd docs && gzip -c boa.8 > boa.8.gz)
-(cd docs && make boa.html)
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-mkdir -p $RPM_BUILD_ROOT/etc/{boa,logrotate.d}
-mkdir -p $RPM_BUILD_ROOT/usr/sbin
-mkdir -p $RPM_BUILD_ROOT/home/httpd/{html,cgi-bin}
-mkdir -p $RPM_BUILD_ROOT/var/log/boa
-mkdir -p $RPM_BUILD_ROOT/usr/lib/boa
-mkdir -p $RPM_BUILD_ROOT/usr/man/man8
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-
-install -m755 src/boa $RPM_BUILD_ROOT/usr/sbin/
-install -m755 src/boa_indexer $RPM_BUILD_ROOT/usr/lib/boa/
-install -m644 redhat/boa.conf $RPM_BUILD_ROOT/etc/boa/
-install -m755 redhat/boa.init $RPM_BUILD_ROOT/etc/rc.d/init.d/boa
-mv docs/boa.8.gz $RPM_BUILD_ROOT/usr/man/man8/
-install -m644 redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/boa
-
-touch $RPM_BUILD_ROOT/var/log/boa/{error,access}_log
-
-%post
-/sbin/chkconfig boa reset
-
-%preun
-/etc/rc.d/init.d/boa stop
-/sbin/chkconfig --del boa
-
-%files
-%defattr(-,root,root)
-%dir /home/httpd/html
-%dir /home/httpd/cgi-bin
-%dir /var/log/boa
-%doc Gnu_License README docs/*
-%doc /usr/man/man8/*
-%config /etc/boa/boa.conf
-%config /etc/rc.d/init.d/boa
-%config /etc/logrotate.d/boa
-%attr(600,nobody,nobody)/var/log/boa/error_log
-%attr(600,nobody,nobody)/var/log/boa/access_log
-/usr/sbin/boa
-/usr/lib/boa/boa_indexer
diff --git a/linux-tools/boa-0.94.13/docs/Makefile b/linux-tools/boa-0.94.13/docs/Makefile
deleted file mode 100644
index 36a7342f5a..0000000000
--- a/linux-tools/boa-0.94.13/docs/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-all: boa.html boa_toc.html boa.dvi boa.info boa.txt
-
-boa.info: boa.texi
- makeinfo --number-sections boa.texi
-
-boa.dvi: boa.texi
- texi2dvi --clean boa.texi
-
-boa.pdf: boa.texi
- texi2dvi --pdf --clean boa.texi
-
-boa.ps: boa.dvi
- dvips -o boa.ps boa.dvi
-
-boa_toc.html: boa.texi
- texi2html -split_chapter -menu boa.texi
-
-boa.html: boa.texi
- makeinfo --html --number-sections --no-split -o - boa.texi | \
- sed -e 's/Node:.*//' | sed -e 's/Next:.*//' | \
- sed -e 's/Previous:.*//' | sed -e 's/Up:.*//' > boa.html
-
-boa.txt: boa.texi
- makeinfo --no-headers --no-split -o boa.txt boa.texi
-
-
-cleanup:
- rm -f boa.{cp,fn,fns,ky,log,pg,toc,tp,vr,vrs,aux} *~
-
-clean: cleanup
- rm -f boa.{html,txt,dvi,ps,pdf,info} boa_*.html
diff --git a/linux-tools/boa-0.94.13/docs/boa.8 b/linux-tools/boa-0.94.13/docs/boa.8
deleted file mode 100644
index 15a8caa44d..0000000000
--- a/linux-tools/boa-0.94.13/docs/boa.8
+++ /dev/null
@@ -1,196 +0,0 @@
-.TH BOA 8 "Jan 22 2000" "Version 0.94"
-.SH NAME
-.B boa \- a single\-tasking high performance http server
-.SH SYNOPSIS
-.B boa
-.RB [ -c
-.IR server_root ]
-.RB [ -r
-.IR chroot ]
-.RB [ -d ]
-.SH DESCRIPTION
-Boa is a single-tasking HTTP server. That means that unlike traditional web
-servers, it does not fork for each incoming connection, nor does it fork many
-copies of itself to handle multiple connections. It internally multiplexes all
-of the ongoing HTTP connections, and forks only for CGI programs (which must be
-separate processes.) Preliminary tests show Boa is more than twice as fast as
-Apache.
-.PP
-The primary design goals of Boa are speed and security. Security, in the sense
-of "can't be subverted by a malicious user", not "fine grained access control
-and encrypted communications". Boa is not intended as a feature-packed server;
-if you want one of those, check out WN from John Franks. Modifications to Boa
-that improve its speed, security, robustness, and portability, are eagerly
-sought. Other features may be added if they can be achieved without hurting the
-primary goals.
-.SH OPTIONS
-.IP \fB-d\fR
-instruct Boa not to fork itself (non-daemonize).
-
-.IP "\fB-c \fIserver_root\fR"
-choose a server root overriding the default SERVER_ROOT #define in
-.I defines.h
-
-The server root must hold your local copy of the configuration file
-
-.IP "\fB-r \fIchroot\fR"
-instruct Boa where to chdir and chroot to. The chdir/chroot
-is done before the configuration file is read, or any log
-files are opened.
-
-.SH FILES
-.TP
-\fBboa.conf\fR \- the sole configuration file for Boa.
-The directives in this file are defined in the
-.B DIRECTIVES
-section.
-
-.TP
-\fBmime.types\fR \- the
-MimeTypes <filename>
-defines what Content-Type Boa will send in an HTTP/1.0
-or better transaction.
-.SH DIRECTIVES
-
-The Boa configuration file is parsed with a lex/yacc or flex/bison generated
-parser. If it reports an error, the line number will be provided; it should
-be easy to spot. The syntax of each of these rules is very simple, and they
-can occur in any order. Where possible, these directives mimic those of NCSA
-httpd 1.3; We saw no reason to introduce gratuitous differences.
-.PP
-Note: the "ServerRoot" is not in this configuration file. It can be compiled
-into the server (see
-.I defines.h
-) or specified on the command line with the
-.B -c
-option.
-
-The following directives are contained in the
-.I boa.conf
-file, and most, but not all, are required.
-.TP
-Port <integer>
-This is the port that Boa runs on. The default port for http servers is 80.
-If it is less than 1024, the server must be started as root.
-.TP
-User <user name or UID>
-The name or UID the server should run as. For Boa to attempt this, the
-server must be started as root.
-.TP
-Group <group name or GID>
-The group name or GID the server should run as. For Boa to attempt this,
-the server must be started as root.
-.TP
-ServerAdmin <email address>
-The email address where server problems should be sent.
-Note: this is not currently used.
-.TP
-ErrorLog <filename>
-The location of the error log file. If this does not start with
-/, it is considered relative to the server root.
-Set to /dev/null if you don't want errors logged.
-.TP
-AccessLog <filename>
-The location of the access log file. If this does not start with /, it is
-considered relative to the server root.
-Comment out or set to /dev/null (less effective) to disable access logging.
-.TP
-VerboseCGILogs
-This is a logical switch and does not take any parameters.
-Comment out to disable.
-.TP
-ServerName <server_name>
-The name of this server that should be sent back to
-clients if different than that returned by gethostname.
-.Tp
-VirtualHost
-This is a logical switch and does not take any parameters.
-Comment out to disable.
-Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
-become /var/www/IP-A.
-Example: http://localhost/ becomes /var/www/127.0.0.1
-.TP
-DocumentRoot <directory>
-The root directory of the HTML documents. If this does not start with
-/, it is considered relative to the server root.
-.TP
-UserDir <directory>
-The name of the directory which is appended onto a user's home directory if a
-~user request is received.
-.TP
-DirectoryIndex <filename>
-Name of the file to use as a pre-written HTML directory index. Please make
-and use these files. On the fly creation of directory indexes can be slow.
-.TP
-DirectoryMaker <directory>
-Name of the program used to generate on-the-fly directory listings.
-The program must take one or two command-line arguments, the first
-being the directory to index (absolute), and the second, which is optional,
-contains what Boa would have the "title" of the document be.
-Comment out if you don't want on the fly directory listings.
-If this does not start with
-/, it is considered relative to the server root.
-.TP
-KeepAliveMax <integer>
-Number of KeepAlive requests to allow per connection. Comment out, or set
-to 0 to disable keepalive processing.
-.TP
-KeepAliveTimeout <integer>
-Number of seconds to wait before keepalive connections time out.
-.TP
-MimeTypes <file>
-The location of the
-.I mime.types
-file. If this does not start with /, it is considered relative to
-the server root. Set to /dev/null if you do not want to load a mime types
-file. Do *not* comment out (better use AddType!)
-.TP
-DefaultType <mime type>
-MIME type used if the file extension is unknown, or there is no file extension.
-.TP
-AddType <mime type> <extension> [extension...]
-Associates a MIME type with an extension or extensions.
-.TP
-Redirect, Alias, and ScriptAlias <path1> <path2>
-Redirect, Alias, and ScriptAlias all have the same semantics \-\- they
-match the beginning of a request and take appropriate action. Use
-Redirect for other servers, Alias for the same server, and ScriptAlias to
-enable directories for script execution.
-
-Redirect allows you to tell clients about documents which used to exist
-in your server's namespace, but do not anymore. This allows you tell
-the clients where to look for the relocated document.
-
-Alias aliases one path to another. Of course, symbolic links in the
-file system work fine too.
-
-ScriptAlias maps a virtual path to a directory for serving scripts.
-.PP
-Please see the included
-.I boa.conf
-for defaults and examples.
-.SH HISTORY
-Like the Linux kernel, even numbered versions are "stable", and odd numbered
-versions are "unstable", or rather, "development".
-Versions 0.91 and 0.91beta of Boa were released by Paul Phillips <paulp@go2net.com>
-.PP
-Version 0.92 was released by Larry Doolittle on
-December 12, 1996.
-.PP
-Version 0.93 was the development version of 0.94.
-.PP
-Version 0.94 was released 22 Jan 2000.
-.SH BUGS
-There are probably bugs, but we are not aware of any at this time.
-.SH AUTHOR
-Boa was created by Paul Phillips <paulp@go2net.com>. It is now being maintained and
-enhanced by Larry Doolittle
-<ldoolitt@boa.org> and
-Jon Nelson <jnelson@boa.org>.
-.PP
-Linux is the development platform at the moment, other
-OS's are known to work. If you'd like to
-contribute to this effort, contact Larry or Jon via e-mail.
-.SH LICENSE
-This program is distributed under the GNU General Public License, as noted in
-each source file.
diff --git a/linux-tools/boa-0.94.13/docs/boa.texi b/linux-tools/boa-0.94.13/docs/boa.texi
deleted file mode 100644
index 254b850139..0000000000
--- a/linux-tools/boa-0.94.13/docs/boa.texi
+++ /dev/null
@@ -1,772 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename boa.info
-@settitle The Boa HTTP Daemon
-@set UPDATED Last Updated: 2 Jan 2001
-@set COPYPHRASE Copyright @copyright{} 1996-2001 Jon Nelson and Larry Doolittle
-@set VERSION $Revision: 1.1.1.1 $
-
-@paragraphindent asis
-@iftex
-@parindent 0pt
-@end iftex
-@c @setchapternewpage odd
-@c %**end of header
-
-@iftex
-@titlepage
-@title The Boa HTTP Daemon
-@c @sp 2
-@end iftex
-
-@ifinfo
-This file documents Boa, an HTTP daemon for UN*X like machines.
-@end ifinfo
-
-@html
-<h1 align="center">The Boa HTTP Daemon</h1>
-<center><img src="boa_banner.png"></center>
-@end html
-
-@ifinfo
-@dircategory Networking
-@direntry
-* Boa: (boa). The Boa Webserver
-@end direntry
-@end ifinfo
-
-@comment node-name, next, previous, up
-@node Top, Introduction, , (dir)
-
-Welcome to the documentation for Boa, a high performance
-HTTP Server for UN*X-alike computers, covered by the
-@uref{Gnu_License,GNU General Public License}.
-The on-line, updated copy of this documentation lives at
-@uref{http://www.boa.org/,http://www.boa.org/}
-@sp 1
-@center @value{COPYPHRASE}
-@center @value{UPDATED}, @value{VERSION}
-
-@iftex
-@end titlepage
-@contents
-@end iftex
-
-@menu
-* Introduction::
-* Installation and Usage::
-* Limits and Design Philosophy::
-* Appendix::
-
- -- Detailed Node Listing --
-
-Installation
-
-* Files Used by Boa::
-* Compile-Time and Command-Line Options::
-* boa.conf Directives::
-* Security::
-
-Limits and Design Philosophy
-
-* Limits::
-* Differences between Boa and other web servers::
-* Unexpected Behavior::
-
-Appendix
-
-* License::
-* Acknowledgments::
-* Reference Documents::
-* Other HTTP Servers::
-* Benchmarks::
-* Tools::
-* Authors::
-
-@end menu
-
-@comment node-name, next, previous, up
-@node Introduction, Installation and Usage,top,top
-@chapter Introduction
-
-Boa is a single-tasking HTTP server. That means that unlike
-traditional web servers, it does not fork for each incoming
-connection, nor does it fork many copies of itself to handle multiple
-connections. It internally multiplexes all of the ongoing HTTP
-connections, and forks only for CGI programs (which must be separate
-processes), automatic directory generation, and automatic file
-gunzipping. Preliminary tests show Boa is capable of
-handling several thousand hits per second on a 300 MHz Pentium and
-dozens of hits per second on a lowly 20 MHz 386/SX.
-
-The primary design goals of Boa are speed and security. Security,
-in the sense of @emph{can't be subverted by a malicious user,} not
-@emph{fine grained access control and encrypted communications}.
-Boa is not intended as a feature-packed server; if you want one of those,
-check out
-WN (@uref{http://hopf.math.nwu.edu/}) from John Franks.
-Modifications to Boa that improve its speed, security, robustness, and
-portability, are eagerly sought. Other features may be added if they
-can be achieved without hurting the primary goals.
-
-Boa was created in 1991 by Paul Phillips (@email{psp@@well.com}).
-It is now being maintained and enhanced by Larry Doolittle
-(@email{ldoolitt@@boa.org}) and Jon Nelson
-(@email{jnelson@@boa.org}).
-Please see the acknowledgement section for further
-details.
-
-GNU/Linux is the development platform at the moment, other OS's are known to work.
-If you'd like to contribute to this effort, contact Larry or Jon via e-mail.
-
-@comment node-name, next, previous, up
-@node Installation and Usage, Limits and Design Philosophy, Introduction,top
-@chapter Installation and Usage
-
-Boa is currently being developed and tested on GNU/Linux/i386.
-The code is straightforward (more so than most other servers),
-so it should run easily on most modern Unix-alike platforms. Recent
-versions of Boa worked fine on FreeBSD, SunOS 4.1.4, GNU/Linux-SPARC,
-and HP-UX 9.0. Pre-1.2.0 GNU/Linux kernels may not work because of
-deficient mmap() implementations.
-
-@menu
-* Installation::
-* Files Used by Boa::
-* Compile-Time and Command-Line Options::
-* Security::
-@end menu
-
-@comment node-name, next, previous, up
-@node Installation,Files Used by Boa,,Installation and Usage
-@section Installation
-
-@enumerate
- @item Unpack
- @enumerate
- @item Choose, and cd into, a convenient directory for the package.
- @item @kbd{tar -xvzf boa-0.94.tar.gz}, or for those of you with an archaic
-(non-GNU) tar; @kbd{gzip -cd &lt; boa-0.94.tar.gz | tar -xvf -}
- @item Read the documentation. Really.
- @end enumerate
- @item Build
- @enumerate
- @item cd into the @t{src} directory.
- @item (optional) Change the default SERVER_ROOT by setting the #define
- at the top of src/defines.h
- @item Type @kbd{./configure; make}
- @item Report any errors to the maintainers for resolution, or strike
- out on your own.
- @end enumerate
- @item Configure
- @enumerate
- @item Choose a user and server port under which Boa can run. The
- traditional port is 80, and user @t{nobody} (create if
- you need to) is often a good selection for security purposes.
- If you don't have (or choose not to use) root privileges, you
- can not use port numbers less than 1024, nor can you switch user id.
- @item Choose a server root. The @t{conf} directory within the
- server root must hold your copy of the configuration file
- @emph{boa.conf}
- @item Choose locations for log files, CGI programs (if any), and
- the base of your URL tree.
- @item Set the location of the @t{mime.types} file.
- @item Edit @emph{conf/boa.conf} according to your
- choices above (this file documents itself). Read through this file
- to see what other features you can configure.
- @end enumerate
- @item Start
- @itemize
- @item Start Boa. If you didn't build the right SERVER_ROOT into the
- binary, you can specify it on the command line with the -c option
- (command line takes precedence).
- @example
- Example: ./boa -c /usr/local/boa
- @end example
- @end itemize
-
- @item Test
- @itemize
- @item At this point the server should run and serve documents.
- If not, check the error_log file for clues.
- @end itemize
-
- @item Install
- @itemize
- @item Copy the binary to a safe place, and put the invocation into
- your system startup scripts. Use the same -c option you used
- in your initial tests.
- @end itemize
-@end enumerate
-
-@comment node-name, next, previous, up
-@node Files Used by Boa, Compile-Time and Command-Line Options, Installation,Installation and Usage
-@section Files Used by Boa
-
-@ftable @file
-@item boa.conf
- This file is the sole configuration file for Boa. The directives in this
- file are defined in the DIRECTIVES section.
-@item mime.types
- The MimeTypes <filename> defines what Content-Type Boa will
- send in an HTTP/1.0 or better transaction.
- Set to /dev/null if you do not want to load a mime types file.
- Do *not* comment out (better use AddType!)
-@end ftable
-
-@comment node-name, next, previous, up
-@node Compile-Time and Command-Line Options, boa.conf Directives, Files Used by Boa,Installation and Usage
-@section Compile-Time and Command-Line Options
-
-@table @var
-@item SERVER_ROOT
-@itemx -c
- The default server root as #defined by @var{SERVER_ROOT} in
- @file{defines.h} can be overridden on the commandline using the
- @option{-c} option. The server root must hold your local copy of the
- configuration file @file{boa.conf}.
- @example
- Example: /usr/sbin/boa -c /etc/boa
- @end example
-
-@end table
-
-@comment node-name, next, previous, up
-@node boa.conf Directives, Security, Compile-Time and Command-Line Options, (top)
-@section boa.conf Directives
-
-The Boa configuration file is parsed with a lex/yacc or flex/bison
-generated parser. If it reports an error, the line number will be
-provided; it should be easy to spot. The syntax of each of these rules
-is very simple, and they can occur in any order. Where possible, these
-directives mimic those of NCSA httpd 1.3; I (Paul Phillips) saw no reason
-to introduce gratuitous differences.
-
-Note: the "ServerRoot" is not in this configuration file. It can be
-compiled into the server (see @file{defines.h}) or specified on the command
-line with the @command{-c} option.
-
-The following directives are contained in the @file{boa.conf} file, and most,
-but not all, are required.
-
-@table @option
- @item Port <Integer>
- This is the port that Boa runs on. The default port for http servers is 80.
- If it is less than 1024, the server must be started as root.
-
- @item Listen <IP>
- The Internet address to bind(2) to, in quadded-octet form (numbers).
- If you leave it out, it binds to all addresses (INADDR_ANY).
-
- The name you provide gets run through inet_aton(3), so you have to
- use dotted quad notation. This configuration is too important to trust some DNS.
-
- You only get one "Listen" directive, if you want service on multiple
- IP addresses, you have three choices:
-
- @enumerate
- @item Run boa without a "Listen" directive:
- @itemize @bullet
- @item All addresses are treated the same; makes sense if the addresses
- are localhost, ppp, and eth0.
- @item Use the VirtualHost directive below to point requests to different files.
- Should be good for a very large number of addresses (web hosting clients).
- @end itemize
- @item Run one copy of boa per IP address:
- @itemize @bullet
- @item Each instance has its own configuration with its own
- "Listen" directive. No big deal up to a few tens of addresses. Nice separation
- between clients.
- @end itemize
- @end enumerate
-
- @item User <username or UID>
- The name or UID the server should run as. For Boa to attempt this, the
- server must be started as root.
-
- @item Group <groupname or GID>
- The group name or GID the server should run as. For Boa to attempt this,
- the server must be started as root.
-
- @item ServerAdmin <email address>
- The email address where server problems should be sent. Note: this is not
- currently used.
-
- @item ErrorLog <filename>
- The location of the error log file. If this does not start with /, it is
- considered relative to the server root. Set to /dev/null if you don't want
- errors logged.
-
- @item AccessLog <filename>
- The location of the access log file. If this does not start with /, it is
- considered relative to the server root. Comment out or set to /dev/null
- (less effective) to disable access logging.
-
- @item VerboseCGILogs
- This is a logical switch and does not take any parameters. Comment out to
- disable. All it does is switch on or off logging of when CGIs are launched and when
- the children return.
-
- @item CgiLog <filename>
- The location of the CGI error log file. If
- specified, this is the file that the stderr of CGIs is tied to. Otherwise, writes
- to stderr meet the bit bucket.
-
- @item ServerName <server_name>
- The name of this server that should be sent back to clients if different
- than that returned by gethostname.
-
- @item VirtualHost
- This is a logical switch and does not take any parameters.
- Comment out to disable. Given DocumentRoot /var/www, requests on interface `A' or
- IP `IP-A' become /var/www/IP-A. Example: http://localhost/ becomes
- /var/www/127.0.0.1
-
- @item DocumentRoot <directory>
- The root directory of the HTML documents. If this does not start with /,
- it is considered relative to the server root.
-
- @item UserDir <directory>
- The name of the directory which is appended onto a user's home directory
- if a ~user request is received.
-
- @item DirectoryIndex <filename>
- Name of the file to use as a pre-written HTML directory index. Please
- make and use these files. On the fly creation of directory indexes
- can be slow.
-
- @item DirectoryMaker <full pathname to program>
- Name of the program used
- to generate on-the-fly directory listings. The program must take one or two
- command-line arguments, the first being the directory to index (absolute), and the
- second, which is optional, should be the "title" of the document be. Comment out if
- you don't want on the fly directory listings. If this does not start with /, it is
- considered relative to the server root.
-
- @item DirectoryCache <directory>
- DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker has been
- commented out, the the on-the-fly indexing of Boa can be used to generate indexes
- of directories. Be warned that the output is extremely minimal and can cause
- delays when slow disks are used. Note: The DirectoryCache must be writable by the
- same user/group that Boa runs as.
-
- @item KeepAliveMax <integer>
- Number of KeepAlive requests to allow per connection. Comment out, or set
- to 0 to disable keepalive processing.
-
- @item KeepAliveTimeout <integer>
- Number of seconds to wait before keepalive connections time out.
-
- @item MimeTypes <file>
- The location of the mime.types file. If this does not start with /, it is
- considered relative to the server root.
- Comment out to avoid loading mime.types (better use AddType!)
-
- @item DefaultType <mime type>
- MIME type used if the file extension is unknown, or there is no file
- extension.
-
- @item AddType <mime type> <extension> extension...
- Associates a MIME type
- with an extension or extensions.
-
- @item Redirect, Alias, and ScriptAlias
- Redirect, Alias, and ScriptAlias all have the same semantics --
- they match the beginning of a request and take appropriate action.
- Use Redirect for other servers, Alias for the same server, and
- ScriptAlias to enable directories for script execution.
-
- @item Redirect <path1> <path2>
- allows you to tell clients about documents which used to exist
- in your server's namespace, but do not anymore. This allows you
- tell the clients where to look for the relocated document.
-
- @item Alias <path1> <path2>
- aliases one path to another. Of course, symbolic links in the
- file system work fine too.
-
- @item ScriptAlias <path1> <path2>
- maps a virtual path to a directory for serving scripts.
-@end table
-
-@comment node-name, next, previous, up
-@node Security, , boa.conf Directives, Installation and Usage
-@section Security
-
-Boa has been designed to use the existing file system security. In
-@file{boa.conf}, the directives @emph{user} and
-@emph{group} determine who Boa will run as, if launched by root.
-By default, the user/group is nobody/nogroup. This allows quite a bit
-of flexibility. For example, if you want to disallow access to otherwise
-accessible directories or files, simply make them inaccessible to
-nobody/nogroup. If the user that Boa runs as is "boa" and the groups that
-"boa" belongs to include "web-stuff" then files/directories accessible
-by users with group "web-stuff" will also be accessible to Boa.
-
-The February 2000 hoo-rah from
-@uref{http://www.cert.org/advisories/CA-2000-02.html,CERT advisory CA-2000-02}
-has little to do with Boa. As of version 0.94.4, Boa's escaping rules have
-been cleaned up a little, but they weren't that bad before. The example CGI
-programs have been updated to show what effort is needed there. If you
-write, maintain, or use CGI programs under Boa (or any other server) it's
-worth your while to read and understand this advisory. The real problem,
-however, boils down to browser and web page designers emphasizing frills
-over content and security. The market leading browsers assume (incorrectly)
-that all web pages are trustworthy.
-
-@comment node-name, next, previous, up
-@node Limits and Design Philosophy,Appendix, Installation and Usage,top
-@chapter Limits and Design Philosophy
-
-There are many issues that become more difficult to resolve in a single
-tasking web server than in the normal forking model. Here is a partial
-list -- there are probably others that haven't been encountered yet.
-
-@menu
-* Limits::
-* Differences between Boa and other web servers::
-* Unexpected Behavior::
-@end menu
-
-@comment node-name, next, previous, up
-@node Limits,Differences between Boa and other web servers,,Limits and Design Philosophy
-@section Limits
-
-@itemize @bullet
- @item Slow file systems
-
- The file systems being served should be much faster than the
- network connection to the HTTP requests, or performance will suffer.
- For instance, if a document is served from a CD-ROM, the whole server
- (including all other currently incomplete data transfers) will stall
- while the CD-ROM spins up. This is a consequence of the fact that Boa
- mmap()'s each file being served, and lets the kernel read and cache
- pages as best it knows how. When the files come from a local disk
- (the faster the better), this is no problem, and in fact delivers
- nearly ideal performance under heavy load. Avoid serving documents
- from NFS and CD-ROM unless you have even slower inbound net
- connections (e.g., POTS SLIP).
-
- @item DNS lookups
-
- Writing a nonblocking gethostbyaddr is a difficult and not very
- enjoyable task. Paul Phillips experimented with several methods,
- including a separate logging process, before removing hostname
- lookups entirely. There is a companion program with Boa
- @file{util/resolver.pl} that will postprocess the logfiles and
- replace IP addresses with hostnames, which is much faster no matter
- what sort of server you run.
-
- @item Identd lookups
-
- Same difficulties as hostname lookups; not included.
- Boa provides a REMOTE_PORT environment variable, in addition
- to REMOTE_ADDR, so that a CGI program can do its own ident.
- See the end of @t{examples/cgi-test.cgi}.
-
- @item Password file lookups via NIS
-
- If users are allowed to serve HTML from their home directories,
- password file lookups can potentially block the process. To lessen
- the impact, each user's home directory is cached by Boa so it need
- only be looked up once.
-
- @item Running out of file descriptors
-
- Since a file descriptor is needed for every ongoing connection
- (two for non-nph CGIs, directories, and automatic gunzipping of files),
- it is possible though highly improbable to run out of file
- descriptors. The symptoms of this conditions may vary with
- your particular unix variant, but you will probably see log
- entries giving an error message for @t{accept}.
- Try to build your kernel to give an adequate number for
- your usage - GNU/Linux provides 256 out of the box, more than
- enough for most people.
-@end itemize
-
-@comment node-name, next, previous, up
-@node Differences between Boa and other web servers,Unexpected Behavior,Limits,Limits and Design Philosophy
-@section Differences between Boa and other web servers
-
-In the pursuit of speed and simplicity, some aspects of Boa differ
-from the popular web servers. In no particular order:
-
-@itemize @bullet
- @item @var{REMOTE_HOST} environment variable not set for CGI programs
-
- The @var{REMOTE_HOST} environment variable is not set for CGI programs,
- for reasons already described. This is easily worked around because the
- IP address is provided in the @var{REMOTE_HOST} variable, so (if the CGI
- program actually cares) gethostbyaddr or a variant can be used.
-
- @item There are no server side includes (@acronym{SSI}) in Boa
-
- We don't like them, and they are too slow to parse. We will consider
- more efficient alternatives.
-
- @item There are no access control features
-
- Boa will follow symbolic links, and serve any file that it can
- read. The expectation is that you will configure Boa to run as user
- "nobody", and only files configured world readable will come
- out.
-
- @item No chroot option
-
- There is no option to run chrooted. If anybody wants this, and is
- willing to try out experimental code, contact the maintainers.
-@end itemize
-
-@comment node-name, next, previous, up
-@node Unexpected Behavior,,Differences between Boa and other web servers,Limits and Design Philosophy
-@section Unexpected Behavior
-
-@itemize @bullet
- @item SIGHUP handling
-
- Like any good server, Boa traps SIGHUP and rereads @file{boa.conf}.
- However, under normal circumstances, it has already given away
- permissions, so many items listed in @file{boa.conf} can not take effect.
- No attempt is made to change uid, gid, log files, or server port.
- All other configuration changes should take place smoothly.
-
- @item Relative URL handling
-
- Not all browsers handle relative URLs correctly. Boa will not
- cover up for this browser bug, and will typically report 404 Not Found
- for URL's containing odd combinations of "../" 's.
-
- Note: As of version 0.95.0 (unreleased) the URL parser has been
- rewritten and *does* correctly handle relative URLs.
-@end itemize
-
-@comment node-name, next, previous, up
-@node Appendix,,Limits and Design Philosophy,top
-@appendix Appendix
-
-@menu
-* License::
-* Acknowledgments::
-* Reference Documents::
-* Other HTTP Servers::
-* Benchmarks::
-* Tools::
-* Authors::
-@end menu
-
-@comment node-name, next, previous, up
-@node License,Acknowledgments,,Appendix
-@section License
-
-This program is distributed under the
- @uref{http://www.gnu.org/copyleft/gpl.html,GNU General Public License}.
-as noted in each source file:
-@*
-
-@smallexample
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <psp@@well.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-@end smallexample
-
-@comment node-name, next, previous, up
-@node Acknowledgments,Reference Documents,License,Appendix
-@section Acknowledgments
-
-Paul Phillips wrote the first versions of Boa, up to and including
-version 0.91. Version 0.92 of Boa was officially released December 1996
-by Larry Doolittle. Version 0.93 was the development version of 0.94,
-which was released in February 2000.
-
-The Boa Webserver is currently (Feb 2000) maintained and enhanced by
-Larry Doolittle (@email{ldoolitt@@boa.org})
-and Jon Nelson (@email{jnelson@@boa.org}).
-
-We would like to thank Russ Nelson (@email{nelson@@crynwr.com})
-for hosting the @uref{http://www.boa.org,web site}.
-
-We would also like to thank Paul Philips for writing code that is
-worth maintaining and supporting.
-
-Many people have contributed to Boa, including (but not
-limited to) Charles F. Randall (@email{randall@@goldsys.com})
-Christoph Lameter (@email{<chris@@waterf.org>}),
-Russ Nelson (@email{<nelson@@crynwr.com>}), Alain Magloire
-(@email{<alain.magloire@@rcsm.ee.mcgill.ca>}),
-and more recently, M. Drew Streib (@email{<dtype@@linux.com>}).
-
-Paul Phillips records his acknowledgments as follows:
-@quotation
-Thanks to everyone in the WWW community, in general a great bunch of people.
-Special thanks to Clem Taylor (@email{<ctaylor@@eecis.udel.edu>}), who
-provided invaluable feedback on many of my ideas, and offered good
-ones of his own. Also thanks to John Franks, author of wn, for
-writing what I believe is the best webserver out there.
-@end quotation
-
-@comment node-name, next, previous, up
-@node Reference Documents,Other HTTP Servers,Acknowledgments,Appendix
-@section Reference Documents
-
-Links to documents relevant to
-@uref{http://www.boa.org/,Boa}
-development and usage. Incomplete, we're still working on this.
-NCSA has a decent
-@uref{http://hoohoo.ncsa.uiuc.edu/docs/Library.html,page} along
-these lines, too.
-
-Also see Yahoo's List
-@* @uref{http://www.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/}
-
-@itemize
- @item W3O HTTP page
- @* @uref{http://www.w3.org/pub/WWW/Protocols/}
-
- @item RFC 1945 HTTP-1.0 (informational)
- @* @uref{http://ds.internic.net/rfc/rfc1945.txt}
-
- @item IETF Working Group Draft 07 of HTTP-1.1
- @* @uref{http://www.w3.org/pub/WWW/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-07.txt}
-
- @item HTTP: A protocol for networked information
- @* @uref{http://www.w3.org/pub/WWW/Protocols/HTTP/HTTP2.html}
-
- @item The Common Gateway Interface (CGI)
- @* @uref{http://hoohoo.ncsa.uiuc.edu/cgi/overview.html}
-
- @item RFC 1738 URL syntax and semantics
- @* @uref{http://ds.internic.net/rfc/rfc1738.txt}
-
- @item RFC 1808 Relative URL syntax and semantics
- @* @uref{http://ds.internic.net/rfc/rfc1808.txt}
-@end itemize
-
-@comment node-name, next, previous, up
-@node Other HTTP Servers,Benchmarks,Reference Documents,Appendix
-@section Other HTTP Servers
-
-For unix-alike platforms, with published source code.
-
-@itemize
- @item tiny/turbo/throttling httpd very similar to Boa, with a throttling
- feature
- @* @uref{http://www.acme.com/software/thttpd/}
-
- @item Roxen: based on ulpc interpreter, non-forking (interpreter implements
- threading), GPL'd
- @* @uref{http://www.roxen.com/}
-
- @item WN: featureful, GPL'd
- @* @uref{http://hopf.math.nwu.edu/}
-
- @item Apache: fast, PD
- @* @uref{http://www.apache.org/}
-
- @item NCSA: standard, legal status?
- @* @uref{http://hoohoo.ncsa.uiuc.edu/}
-
- @item CERN: standard, PD, supports proxy
- @* @uref{http://www.w3.org/pub/WWW/Daemon/Status.html}
-
- @item xs-httpd 2.0: small, fast, pseudo-GPL'd
- @* @uref{http://www.stack.nl/~sven/xs-httpd/}
-
- @item bozohttpd.tar.gz sources, in perl
- @* @uref{ftp://ftp.eterna.com.au/bozo/bsf/attware/bozohttpd.tar.gz}
-
- @item Squid is actually an "Internet Object Cache"
- @* @uref{http://squid.nlanr.net/Squid/}
-@end itemize
-
-Also worth mentioning is Zeus.
-It is commercial, with a free demo, so it doesn't belong on the list above.
-Zeus seems to be based on technology similar to Boa and thttpd,
-but with more bells and whistles.
-@* @uref{http://www.zeus.co.uk/products/server/}
-
-@comment node-name, next, previous, up
-@node Benchmarks,Tools,Other HTTP Servers,Appendix
-@section Benchmarks
-
-@itemize
-@item ZeusBench (broken link)
-@* @uref{http://www.zeus.co.uk/products/server/intro/bench2/zeusbench.shtml}
-
-@item WebBench (binary-ware)
-@* @uref{http://web1.zdnet.com/zdbop/webbench/webbench.html}
-
-@item WebStone
-@* @uref{http://www.mindcraft.com/benchmarks/webstone/}
-
-@item SpecWeb96
-@* @uref{http://www.specbench.org/osg/web96/}
-@end itemize
-
-@comment node-name, next, previous, up
-@node Tools,Authors,Benchmarks,Appendix
-@section Tools
-
-@itemize
-@item Analog logfile analyzer
-@* @uref{http://www.statslab.cam.ac.uk/@~sret1/analog/}
-
-@item wwwstat logfile analyzer
-@* @uref{http://www.ics.uci.edu/pub/websoft/wwwstat/}
-
-@item gwstat wwwstat postprocessor
-@* @uref{http://dis.cs.umass.edu/stats/gwstat.html}
-
-@item The Webalizer logfile analyzer
-@* @uref{http://www.usagl.net/webalizer/}
-
-@item cgiwrap
-@* @uref{http://www.umr.edu/@~cgiwrap/}
-
-@item suEXEC (Boa would need to be ..umm.. "adjusted" to support this)
-@* @uref{http://www.apache.org/docs/suexec.html}
-@end itemize
-
-Note: References last checked: 06 October 1997
-
-@comment node-name, next, previous, up
-@node Authors,,Tools,Appendix
-@section Authors
-
-@itemize
- @item Conversion from linuxdoc SGML to texinfo by Jon Nelson
- @item Conversion to linuxdoc SGML by Jon Nelson
- @item Original HTML documentation by Larry Doolittle
- @item @value{COPYPHRASE}
-@end itemize
-
-@c variable
-@c @printindex vr
-@c concept
-@c @printindex cp
-@c function
-@c @printindex fn
-@c key
-@c @printindex ky
-@c program
-@c @printindex pg
-@c data type
-@c @printindex tp
-
-@bye
diff --git a/linux-tools/boa-0.94.13/docs/boa_banner.png b/linux-tools/boa-0.94.13/docs/boa_banner.png
deleted file mode 100755
index a5b100e61e..0000000000
--- a/linux-tools/boa-0.94.13/docs/boa_banner.png
+++ /dev/null
Binary files differ
diff --git a/linux-tools/boa-0.94.13/examples/cgi-test.cgi b/linux-tools/boa-0.94.13/examples/cgi-test.cgi
deleted file mode 100644
index aeb252ba97..0000000000
--- a/linux-tools/boa-0.94.13/examples/cgi-test.cgi
+++ /dev/null
@@ -1,120 +0,0 @@
-#! /usr/bin/perl
-
-# Remember that CGI programs have to close out the HTTP header
-# (with a pair of newlines), after giving the Content-type:
-# and any other relevant or available header information.
-
-# Unlike CGI programs running under Apache, CGI programs under Boa
-# should understand some simple HTTP options. The header (and the
-# double-newline) should not be printed if the incoming request was
-# in HTTP/0.9. Also, we should stop after the header if
-# REQUEST_METHOD == "HEAD". Under Apache, nph- programs also have
-# to worry about such stuff.
-
-# Feb 3, 2000 -- updated to support POST, and avoid passing
-# Malicious HTML Tags as described in CERT's CA-2000-02 advisory.
-
-if ($ENV{"SERVER_PROTOCOL"} ne "HTTP/0.9") {
- print "Content-type: text/html; charset=ISO-8859-1\r\n\r\n";
-}
-
-exit 0 if ($ENV{"REQUEST_METHOD"} eq "HEAD");
-
-print "<html><head><title>Boa CGI test</title></head><body>\n";
-print "<H2>Boa CGI test</H2>\n\n";
-
-$now=`date`;
-chomp($now);
-
-print "Date: $now\n";
-print "<p>\n";
-
-print "Method: $ENV{\"REQUEST_METHOD\"}\n";
-print "<p>\n";
-
-print "<table border=1>\n";
-print "<tr><td>Basic GET Form:<br>";
-print " <form method=\"get\">\n\
- <input type=\"text\" name=\"parameter_1\" size=5 maxlength=5>\
- <select name=\"select_1\">\
- <option>foo</option>\
- <option>bar</option>\
- </select>\
- <input type=\"submit\" NAME=SUBMIT VALUE=\"Submit\">\
- </form>";
-print "</td>";
-print "<td>Basic POST Form:<br>";
-print "<form method=\"post\">\n\
- <input type=\"text\" name=\"parameter_1\" size=5 maxlength=5>\
- <select name=\"select_1\">\
- <option>foo</option>\
- <option>bar</option>\
- </select>\
- <input type=\"submit\" NAME=SUBMIT VALUE=\"Submit\">\
- </form>";
-print "</td>";
-print "</tr>\n";
-print "<tr><td colspan=2>Sample ISINDEX form:<br>\n";
-print "<a href=\"$ENV{\"SCRIPT_NAME\"}?param1+param2+param3\">$ENV{\"SCRIPT_NAME\"}?param1+param2+param3</a>\n";
-print "</td></tr>";
-print "</table>\n";
-
-print "<p>Query String: $ENV{\"QUERY_STRING\"}\n";
-
-# arguments list
-print "<p>\nArguments:\n<ol>\n";
-if ($#ARGV >= 0) {
- while ($a=shift(@ARGV)) {
- $a=~s/&/&amp;/g;
- $a=~s/</&lt;/g;
- $a=~s/>/&gt;/g;
- print "<li>$a\n";
- }
-}
-print "</ol>\n";
-
-# environment list
-print "<P>\nEnvironment:\n<UL>\n";
-foreach $i (keys %ENV) {
- $a=$ENV{$i};
- $a=~s/&/&amp;/g;
- $a=~s/</&lt;/g;
- $a=~s/>/&gt;/g;
- $i=~s/&/&amp;/g;
- $i=~s/</&lt;/g;
- $i=~s/>/&gt;/g;
- print "<li>$i = $a\n";
-}
-print "</UL>\n";
-
-if ($ENV{REQUEST_METHOD} eq "POST") {
- print "Input stream:<br><hr><pre>\n";
- while (<stdin>) {
- s/&/&amp;/g;
- s/</&lt;/g;
- s/>/&gt;/g;
- print "$_";
- }
- print "</pre><hr>\n";
-} else {
- print "No input stream: (not POST)<p>";
-}
-
-print "id: ", `id`, "\n<p>\n";
-
-if ($ENV{"QUERY_STRING"}=~/ident/ && $ENV{"REMOTE_PORT"} ne "") {
-
-# Uses idlookup-1.2 from Peter Eriksson <pen@lysator.liu.se>
-# ftp://coast.cs.purdue.edu/pub/tools/unix/ident/tools/idlookup-1.2.tar.gz
-# Could use modification to timeout and trap stderr messages
- $a="idlookup ".
- $ENV{"REMOTE_ADDR"}." ".$ENV{"REMOTE_PORT"}." ".$ENV{"SERVER_PORT"};
- $b=qx/$a/;
- print "ident output:<br><pre>\n$b</pre>\n";
-}
-
-print "\n<EM>Boa http server</EM>\n";
-print "</body></html>\n";
-
-exit 0;
-
diff --git a/linux-tools/boa-0.94.13/examples/nph-test.cgi b/linux-tools/boa-0.94.13/examples/nph-test.cgi
deleted file mode 100644
index a935026ce2..0000000000
--- a/linux-tools/boa-0.94.13/examples/nph-test.cgi
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/perl
-
-# Remember that CGI programs have to close out the HTTP header
-# (with a pair of newlines), after giving the Content-type:
-# and any other relevant or available header information.
-
-# This test program always reports success (200 OK), and
-# correctly uses SERVER_PROTOCOL and REQUEST_METHOD to decide
-# whether or not to send the headers and content.
-
-# Feb 3, 2000 -- updated to support POST, and avoid passing
-# Malicious HTML Tags as described in CERT's CA-2000-02 advisory.
-
-$now=`date`;
-chomp($now);
-if ($ENV{"SERVER_PROTOCOL"} ne "HTTP/0.9") {
- print "HTTP/1.0 200 OK\r\nDate: $now\r\n";
- print "Connection: close\r\n";
- print "Content-type: text/html; charset=ISO-8859-1\r\n\r\n";
-}
-
-exit 0 if ($ENV{"REQUEST_METHOD"} eq "HEAD");
-
-print "<html><head><title>Boa nph-CGI test</title></head><body>\n";
-print "<H2>Boa nph-CGI test</H2>\n\n";
-
-print "Date: $now\n";
-
-print "<P>\n\n<UL>\n";
-
-foreach (keys %ENV) {
- $a= $ENV{$_};
- $a=~s/&/&amp;/g;
- $a=~s/</&lt;/g;
- $a=~s/>/&gt;/g;
- print "<LI>$_ == $a\n";
-}
-
-print "</UL>\n";
-
-if ($ENV{REQUEST_METHOD} eq "POST") {
- print "Input stream:<br><hr><pre>\n";
- while (<stdin>) {
- s/&/&amp;/g;
- s/</&lt;/g;
- s/>/&gt;/g;
- print "$_";
- }
- print "</pre><hr>\n";
-}
-
-print "id: ", `id`, "\n<p>\n";
-
-if ($ENV{"QUERY_STRING"}=~/ident/ && $ENV{"REMOTE_PORT"} ne "") {
-
-# Uses idlookup-1.2 from Peter Eriksson <pen@lysator.liu.se>
-# ftp://coast.cs.purdue.edu/pub/tools/unix/ident/tools/idlookup-1.2.tar.gz
-# Could use modification to timeout and trap stderr messages
- $a="idlookup ".
- $ENV{"REMOTE_ADDR"}." ".$ENV{"REMOTE_PORT"}." ".$ENV{"SERVER_PORT"};
- $b=qx/$a/;
- print "ident output:<br><pre>\n$b</pre>\n";
-}
-
-print "\n<EM>Boa http server</EM>\n";
-print "</body></html>\n";
-
-exit 0;
-
diff --git a/linux-tools/boa-0.94.13/examples/resolver.pl b/linux-tools/boa-0.94.13/examples/resolver.pl
deleted file mode 100644
index b535a8b0a2..0000000000
--- a/linux-tools/boa-0.94.13/examples/resolver.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/perl
-
-# IP address resolver for Boa
-
-# If you want an "in place" change to the log file,
-# change the first line to
-#!/usr/local/bin/perl -i.bak
-# Otherwise, send the output of this program wherever you want:
-# resolver.pl access_log >access_log_resolved
-
-$AF_INET = 2;
-
-while(<>) {
- next unless (($ip, $rest) = /([\d\.]+) (.*)/o);
-
- if(!$hosts{$ip}) {
- $packed_ip = pack('C4', split(/\./, $ip));
- $host = (gethostbyaddr($packed_ip, $AF_INET))[0];
- $hosts{$ip} = ($host ? $host : $ip);
- }
-
- print "$hosts{$ip} $rest\n";
-}
-
diff --git a/linux-tools/boa-0.94.13/extras/alphasort.c b/linux-tools/boa-0.94.13/extras/alphasort.c
deleted file mode 100644
index 2e4c932c55..0000000000
--- a/linux-tools/boa-0.94.13/extras/alphasort.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <string.h>
-#include "compat.h"
-
-int alphasort(const struct dirent **a, const struct dirent **b)
-{
- return (strcmp((*a)->d_name, (*b)->d_name));
-}
diff --git a/linux-tools/boa-0.94.13/extras/scandir.c b/linux-tools/boa-0.94.13/extras/scandir.c
deleted file mode 100644
index a4a3427bfb..0000000000
--- a/linux-tools/boa-0.94.13/extras/scandir.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu" -*- */
-/*
- Copyright (c) 2000 Petter Reinholdtsen
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use, copy,
- modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-*/
-
-/*
- * scandir.c -- if scandir() is missing, make a replacement
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-#include "compat.h"
-
-/*
- * XXX This is a simple hack version which doesn't sort the data, and
- * just passes all unsorted.
- */
-
-int
-scandir(const char *dir, struct dirent ***namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **))
-{
- DIR *d = opendir(dir);
- struct dirent *current;
- struct dirent **names;
- int count = 0;
- int pos = 0;
- int result = -1;
-
- if (NULL == d)
- return -1;
-
- while (NULL != readdir(d))
- count++;
-
- names = malloc(sizeof (struct dirent *) * count);
-
- closedir(d);
- d = opendir(dir);
- if (NULL == d)
- return -1;
-
- while (NULL != (current = readdir(d))) {
- if (NULL == select || select(current)) {
- struct dirent *copyentry = malloc(current->d_reclen);
-
- memcpy(copyentry, current, current->d_reclen);
-
- names[pos] = copyentry;
- pos++;
- }
- }
- result = closedir(d);
-
- if (pos != count)
- names = realloc(names, sizeof (struct dirent *) * pos);
-
- *namelist = names;
-
- return pos;
-}
diff --git a/linux-tools/boa-0.94.13/extras/strutil.c b/linux-tools/boa-0.94.13/extras/strutil.c
deleted file mode 100644
index f0727b5d8f..0000000000
--- a/linux-tools/boa-0.94.13/extras/strutil.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Name: strstr and strdup
- *
- * These are the standard library utilities. We define them here for
- * systems that don't have them.
- */
-
-#ifndef HAVE_STRSTR
-char *strstr(char *s1, char *s2)
-{ /* from libiberty */
- char *p;
- int len = strlen(s2);
-
- if (*s2 == '\0') /* everything matches empty string */
- return s1;
- for (p = s1; (p = strchr(p, *s2)) != NULL; p = strchr(p + 1, *s2)) {
- if (strncmp(p, s2, len) == 0)
- return (p);
- }
- return NULL;
-}
-#endif
-
-#ifndef HAVE_STRDUP
-char *strdup(char *s)
-{
- char *retval;
-
- retval = (char *) malloc(strlen(s) + 1);
- if (retval == NULL) {
- perror("boa: out of memory in strdup");
- exit(1);
- }
- return strcpy(retval, s);
-}
-#endif
diff --git a/linux-tools/boa-0.94.13/spc200/README b/linux-tools/boa-0.94.13/spc200/README
deleted file mode 100755
index 0236d6aa2a..0000000000
--- a/linux-tools/boa-0.94.13/spc200/README
+++ /dev/null
@@ -1,255 +0,0 @@
-The following configuration has been tested on SPC200:
-
-On the SPC200, boa was installed in /usr/local/boa. Although it is convenient place for testing, since all files reside in flash memory, it shall be moved to the rootfs in the final product.
-
-Boa server has been tested successfully for html pages, images and CGI scripts.
-It has been modified to use vfork, and avoid closing some descriptors in the child process. CGI scripts have been tested for both C and shell scripts.
-The busybox had to be fixed in order to pass correctly the environment variables to the shell CGI scripts.
-
-
-All the files used for this configuration can be found in spc200.
-
-boa is installed in /usr/local/boa
-
-$ cd /usr/local/boa/
-$ ls -la
-drwxr-xr-x 2 0 0 0 cgi-bin
--rwxr-xr-x 1 0 0 7515 boa.conf
-drwxr-xr-x 2 0 0 0 www
--rwxrwxrwx 1 0 0 106788 boa
-drwxr-xr-x 10 0 0 0 ..
-drwxr-xr-x 4 0 0 0 .
-$
-
-the /usr/local/boa/www directory contains html and images
-$ ls -la www
--rwxr-xr-x 1 0 0 24753 SPC200-e_PB_v1_01_2005-HR2.gif
--rwxrwxrwx 1 0 0 9988 index.html
--rwxr-xr-x 1 0 0 11831 SPC200-e.gif
-drwxr-xr-x 4 0 0 0 ..
-drwxr-xr-x 2 0 0 0 .
-$
-
-the /usr/local/boa/cgi-bin directory contains the CGI scripts
-$ ls -la cgi-bin/
--rwxr-xr-x 1 0 0 109 bridge.sh
--rwxr-xr-x 1 0 0 91 netstat.sh
--rwxr-xr-x 1 0 0 93 ifconfig.sh
--rwxr-xr-x 1 0 0 87 route.sh
--rwxr-xr-x 1 0 0 19 test.sh
--rwxr-xr-x 1 0 0 15988 envp
-drwxr-xr-x 4 0 0 0 ..
-drwxr-xr-x 2 0 0 0 .
-$
-
-The boa.conf file is configured as follows:
-$ cat boa.conf
-# Boa v0.94 configuration file
-# File format has not changed from 0.93
-# File format has changed little from 0.92
-# version changes are noted in the comments
-#
-# The Boa configuration file is parsed with a lex/yacc or flex/bison
-# generated parser. If it reports an error, the line number will be
-# provided; it should be easy to spot. The syntax of each of these
-# rules is very simple, and they can occur in any order. Where possible
-# these directives mimic those of NCSA httpd 1.3; I saw no reason to
-# introduce gratuitous differences.
-
-# $Id: README,v 1.1.1.1.6.1 2007/03/01 16:13:22 sumrak Exp $
-
-# The "ServerRoot" is not in this configuration file. It can be compiled
-# into the server (see defines.h) or specified on the command line with
-# the -c option, for example:
-#
-# boa -c /usr/local/boa
-
-
-# Port: The port Boa runs on. The default port for http servers is 80.
-# If it is less than 1024, the server must be started as root.
-
-Port 80
-
-# Listen: the Internet address to bind(2) to. If you leave it out,
-# it takes the behavior before 0.93.17.2, which is to bind to all
-# addresses (INADDR_ANY). You only get one "Listen" directive,
-# if you want service on multiple IP addresses, you have three choices:
-# 1. Run boa without a "Listen" directive
-# a. All addresses are treated the same; makes sense if the addresses
-# are localhost, ppp, and eth0.
-# b. Use the VirtualHost directive below to point requests to different
-# files. Should be good for a very large number of addresses (web
-# hosting clients).
-# 2. Run one copy of boa per IP address, each has its own configuration
-# with a "Listen" directive. No big deal up to a few tens of addresses.
-# Nice separation between clients.
-# The name you provide gets run through inet_aton(3), so you have to use dotted
-# quad notation. This configuration is too important to trust some DNS.
-
-#Listen 192.68.0.5
-
-# User: The name or UID the server should run as.
-# Group: The group name or GID the server should run as.
-
-User root
-Group root
-
-# ServerAdmin: The email address where server problems should be sent.
-# Note: this is not currently used, except as an environment variable
-# for CGIs.
-
-#ServerAdmin root@localhost
-
-# ErrorLog: The location of the error log file. If this does not start
-# with /, it is considered relative to the server root.
-# Set to /dev/null if you don't want errors logged.
-# If unset, defaults to /dev/stderr
-
-ErrorLog /dev/console
-CgiLog /dev/console
-
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"
-
-# AccessLog: The location of the access log file. If this does not
-# start with /, it is considered relative to the server root.
-# Comment out or set to /dev/null (less effective) to disable
-# Access logging.
-
-#AccessLog /var/log/boa/access_log
-AccessLog /dev/console
-
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"
-
-# UseLocaltime: Logical switch. Uncomment to use localtime
-# instead of UTC time
-#UseLocaltime
-
-# VerboseCGILogs: this is just a logical switch.
-# It simply notes the start and stop times of cgis in the error log
-# Comment out to disable.
-
-VerboseCGILogs
-
-# ServerName: the name of this server that should be sent back to
-# clients if different than that returned by gethostname + gethostbyname
-
-#ServerName www.your.org.here
-
-# VirtualHost: a logical switch.
-# Comment out to disable.
-# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
-# become /var/www/IP-A.
-# Example: http://localhost/ becomes /var/www/127.0.0.1
-#
-# Not used until version 0.93.17.2. This "feature" also breaks commonlog
-# output rules, it prepends the interface number to each access_log line.
-# You are expected to fix that problem with a postprocessing script.
-
-#VirtualHost
-
-# documentRoot: The root directory of the HTML documents.
-# Comment out to disable server non user files.
-
-DocumentRoot /usr/local/boa/www
-
-# UserDir: The name of the directory which is appended onto a user's home
-# directory if a ~user request is recieved.
-
-UserDir public_html
-
-# DirectoryIndex: Name of the file to use as a pre-written HTML
-# directory index. Please MAKE AND USE THESE FILES. On the
-# fly creation of directory indexes can be _slow_.
-# Comment out to always use DirectoryMaker
-
-DirectoryIndex index.html
-
-# DirectoryMaker: Name of program used to create a directory listing.
-# Comment out to disable directory listings. If both this and
-# DirectoryIndex are commented out, accessing a directory will give
-# an error (though accessing files in the directory are still ok).
-
-DirectoryMaker /usr/lib/boa/boa_indexer
-
-# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
-# has been commented out, the the on-the-fly indexing of Boa can be used
-# to generate indexes of directories. Be warned that the output is
-# extremely minimal and can cause delays when slow disks are used.
-# Note: The DirectoryCache must be writable by the same user/group that
-# Boa runs as.
-
-# DirectoryCache /var/spool/boa/dircache
-
-# KeepAliveMax: Number of KeepAlive requests to allow per connection
-# Comment out, or set to 0 to disable keepalive processing
-
-KeepAliveMax 1000
-
-# KeepAliveTimeout: seconds to wait before keepalive connection times out
-
-KeepAliveTimeout 10
-
-# MimeTypes: This is the file that is used to generate mime type pairs
-# and Content-Type fields for boa.
-# Set to /dev/null if you do not want to load a mime types file.
-# Do *not* comment out (better use AddType!)
-
-#MimeTypes /etc/mime.types
-MimeTypes /dev/null
-
-# DefaultType: MIME type used if the file extension is unknown, or there
-# is no file extension.
-
-DefaultType text/plain
-
-# CGIPath: The value of the $PATH environment variable given to CGI progs.
-
-CGIPath /bin:/usr/bin:/usr/local/bin:/usr/local/boa/cgi-bin
-
-# SinglePostLimit: The maximum allowable number of bytes in
-# a single POST. Default is normally 1MB.
-
-# AddType: adds types without editing mime.types
-# Example: AddType type extension [extension ...]
-
-# Uncomment the next line if you want .cgi files to execute from anywhere
-#AddType application/x-httpd-cgi cgi
-
-# Redirect, Alias, and ScriptAlias all have the same semantics -- they
-# match the beginning of a request and take appropriate action. Use
-# Redirect for other servers, Alias for the same server, and ScriptAlias
-# to enable directories for script execution.
-
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Example: Redirect /bar http://elsewhere/feh/bar
-
-# Aliases: Aliases one path to another.
-# Example: Alias /path1/bar /path2/foo
-
-Alias /doc /usr/doc
-
-# ScriptAlias: Maps a virtual path to a directory for serving scripts
-# Example: ScriptAlias /htbin/ /www/htbin/
-
-#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
-ScriptAlias /cgi-bin/ /usr/local/boa/cgi-bin/
-
-ServerName localhost
-
-
-The server is run using the command
-boa -c /usr/local/boa
-
-
-
-
diff --git a/linux-tools/boa-0.94.13/spc200/boa.conf b/linux-tools/boa-0.94.13/spc200/boa.conf
deleted file mode 100644
index f29f0e5b68..0000000000
--- a/linux-tools/boa-0.94.13/spc200/boa.conf
+++ /dev/null
@@ -1,201 +0,0 @@
-# Boa v0.94 configuration file
-# File format has not changed from 0.93
-# File format has changed little from 0.92
-# version changes are noted in the comments
-#
-# The Boa configuration file is parsed with a lex/yacc or flex/bison
-# generated parser. If it reports an error, the line number will be
-# provided; it should be easy to spot. The syntax of each of these
-# rules is very simple, and they can occur in any order. Where possible
-# these directives mimic those of NCSA httpd 1.3; I saw no reason to
-# introduce gratuitous differences.
-
-# $Id: boa.conf,v 1.1.1.1 2006/05/23 09:19:47 fleury Exp $
-
-# The "ServerRoot" is not in this configuration file. It can be compiled
-# into the server (see defines.h) or specified on the command line with
-# the -c option, for example:
-#
-# boa -c /usr/local/boa
-
-
-# Port: The port Boa runs on. The default port for http servers is 80.
-# If it is less than 1024, the server must be started as root.
-
-Port 80
-
-# Listen: the Internet address to bind(2) to. If you leave it out,
-# it takes the behavior before 0.93.17.2, which is to bind to all
-# addresses (INADDR_ANY). You only get one "Listen" directive,
-# if you want service on multiple IP addresses, you have three choices:
-# 1. Run boa without a "Listen" directive
-# a. All addresses are treated the same; makes sense if the addresses
-# are localhost, ppp, and eth0.
-# b. Use the VirtualHost directive below to point requests to different
-# files. Should be good for a very large number of addresses (web
-# hosting clients).
-# 2. Run one copy of boa per IP address, each has its own configuration
-# with a "Listen" directive. No big deal up to a few tens of addresses.
-# Nice separation between clients.
-# The name you provide gets run through inet_aton(3), so you have to use dotted
-# quad notation. This configuration is too important to trust some DNS.
-
-#Listen 192.68.0.5
-
-# User: The name or UID the server should run as.
-# Group: The group name or GID the server should run as.
-
-User root
-Group root
-
-# ServerAdmin: The email address where server problems should be sent.
-# Note: this is not currently used, except as an environment variable
-# for CGIs.
-
-#ServerAdmin root@localhost
-
-# ErrorLog: The location of the error log file. If this does not start
-# with /, it is considered relative to the server root.
-# Set to /dev/null if you don't want errors logged.
-# If unset, defaults to /dev/stderr
-
-ErrorLog /dev/console
-CgiLog /dev/console
-
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"
-
-# AccessLog: The location of the access log file. If this does not
-# start with /, it is considered relative to the server root.
-# Comment out or set to /dev/null (less effective) to disable
-# Access logging.
-
-#AccessLog /var/log/boa/access_log
-AccessLog /dev/console
-
-# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
-# is somewhat experimental and might fail under heavy load.
-# "Usual libc implementations of printf will stall the whole
-# process if the receiving end of a pipe stops reading."
-#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"
-
-# UseLocaltime: Logical switch. Uncomment to use localtime
-# instead of UTC time
-#UseLocaltime
-
-# VerboseCGILogs: this is just a logical switch.
-# It simply notes the start and stop times of cgis in the error log
-# Comment out to disable.
-
-VerboseCGILogs
-
-# ServerName: the name of this server that should be sent back to
-# clients if different than that returned by gethostname + gethostbyname
-
-#ServerName www.your.org.here
-
-# VirtualHost: a logical switch.
-# Comment out to disable.
-# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
-# become /var/www/IP-A.
-# Example: http://localhost/ becomes /var/www/127.0.0.1
-#
-# Not used until version 0.93.17.2. This "feature" also breaks commonlog
-# output rules, it prepends the interface number to each access_log line.
-# You are expected to fix that problem with a postprocessing script.
-
-#VirtualHost
-
-# documentRoot: The root directory of the HTML documents.
-# Comment out to disable server non user files.
-
-DocumentRoot /usr/local/boa/www
-
-# UserDir: The name of the directory which is appended onto a user's home
-# directory if a ~user request is recieved.
-
-UserDir public_html
-
-# DirectoryIndex: Name of the file to use as a pre-written HTML
-# directory index. Please MAKE AND USE THESE FILES. On the
-# fly creation of directory indexes can be _slow_.
-# Comment out to always use DirectoryMaker
-
-DirectoryIndex index.html
-
-# DirectoryMaker: Name of program used to create a directory listing.
-# Comment out to disable directory listings. If both this and
-# DirectoryIndex are commented out, accessing a directory will give
-# an error (though accessing files in the directory are still ok).
-
-DirectoryMaker /usr/lib/boa/boa_indexer
-
-# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
-# has been commented out, the the on-the-fly indexing of Boa can be used
-# to generate indexes of directories. Be warned that the output is
-# extremely minimal and can cause delays when slow disks are used.
-# Note: The DirectoryCache must be writable by the same user/group that
-# Boa runs as.
-
-# DirectoryCache /var/spool/boa/dircache
-
-# KeepAliveMax: Number of KeepAlive requests to allow per connection
-# Comment out, or set to 0 to disable keepalive processing
-
-KeepAliveMax 1000
-
-# KeepAliveTimeout: seconds to wait before keepalive connection times out
-
-KeepAliveTimeout 10
-
-# MimeTypes: This is the file that is used to generate mime type pairs
-# and Content-Type fields for boa.
-# Set to /dev/null if you do not want to load a mime types file.
-# Do *not* comment out (better use AddType!)
-
-#MimeTypes /etc/mime.types
-MimeTypes /dev/null
-
-# DefaultType: MIME type used if the file extension is unknown, or there
-# is no file extension.
-
-DefaultType text/plain
-
-# CGIPath: The value of the $PATH environment variable given to CGI progs.
-
-CGIPath /bin:/usr/bin:/usr/local/bin:/usr/local/boa/cgi-bin
-
-# SinglePostLimit: The maximum allowable number of bytes in
-# a single POST. Default is normally 1MB.
-
-# AddType: adds types without editing mime.types
-# Example: AddType type extension [extension ...]
-
-# Uncomment the next line if you want .cgi files to execute from anywhere
-#AddType application/x-httpd-cgi cgi
-
-# Redirect, Alias, and ScriptAlias all have the same semantics -- they
-# match the beginning of a request and take appropriate action. Use
-# Redirect for other servers, Alias for the same server, and ScriptAlias
-# to enable directories for script execution.
-
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Example: Redirect /bar http://elsewhere/feh/bar
-
-# Aliases: Aliases one path to another.
-# Example: Alias /path1/bar /path2/foo
-
-Alias /doc /usr/doc
-
-# ScriptAlias: Maps a virtual path to a directory for serving scripts
-# Example: ScriptAlias /htbin/ /www/htbin/
-
-#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
-ScriptAlias /cgi-bin/ /usr/local/boa/cgi-bin/
-
-ServerName localhost
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/Makefile b/linux-tools/boa-0.94.13/spc200/cgi-bin/Makefile
deleted file mode 100644
index 7ea0913f64..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# $Id: Makefile,v 1.1.1.1 2006/05/23 09:19:47 fleury Exp $
-
-.SUFFIXES:
-.SUFFIXES: .o .c
-.PHONY: clean mrclean distclean depend all dist
-
-KERNEL_HEADERS=-I/usr/src/linux/include
-
-srcdir = .
-VPATH = .:./../extras
-
-CFLAGS= -Wall -Os -fstrict-aliasing -msoft-float -march=armv5 -mtune=arm926ejs -mapcs-32 -fomit-frame-pointer -DFASCIST_LOGGING
-LDFLAGS=-Wl,-elf2flt='-s 4000' -Os -msoft-float -march=armv5 -mtune=arm926ejs -mapcs-32 -fomit-frame-pointer
-INCLUDE=$(KERNEL_HEADERS)
-LIBS=
-
-# Change these if necessary
-
-CC = arm-uclinux-gcc
-CPP = arm-uclinux-gcc -E
-
-SOURCES = envp.c
-
-OBJS = $(SOURCES:.c=.o)
-
-all: envp
-
-envp: $(OBJS)
- $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-
-clean:
- rm -f $(OBJS) envp
-
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/bridge.sh b/linux-tools/boa-0.94.13/spc200/cgi-bin/bridge.sh
deleted file mode 100755
index ea4c4fd364..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/bridge.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-echo "Content-type:text/html"
-echo ""
-echo "<PRE>"
-echo "$QUERY_STRING"
-/sbin/bridge
-echo "</PRE>"
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/envp.c b/linux-tools/boa-0.94.13/spc200/cgi-bin/envp.c
deleted file mode 100755
index acf6b30916..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/envp.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-
-int main(int argc, char **argv, char **envp) {
-
- int i;
-
- printf("Content-type:text/html\n\n");
-
- for (i=0;i<argc;i++) {
- printf("<p>argv[0]=%s</p>", argv[0]);
- }
-
- if (envp) {
- while (*envp) {
- printf("<p>%s</p>", *envp);
- envp++;
- }
- }
-
- return 0;
-}
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/ifconfig.sh b/linux-tools/boa-0.94.13/spc200/cgi-bin/ifconfig.sh
deleted file mode 100755
index b9c01160c4..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/ifconfig.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-echo "Content-type:text/html"
-echo ""
-echo "<PRE>"
-/sbin/ifconfig -a
-echo "</PRE>"
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/netstat.sh b/linux-tools/boa-0.94.13/spc200/cgi-bin/netstat.sh
deleted file mode 100755
index 36f751c1e9..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/netstat.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-echo "Content-type:text/html"
-echo ""
-echo "<PRE>"
-/bin/netstat -a
-echo "</PRE>"
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/route.sh b/linux-tools/boa-0.94.13/spc200/cgi-bin/route.sh
deleted file mode 100755
index d40ac09af1..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/route.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-echo "Content-type:text/html"
-echo ""
-echo "<PRE>"
-/sbin/route
-echo "</PRE>"
diff --git a/linux-tools/boa-0.94.13/spc200/cgi-bin/test.sh b/linux-tools/boa-0.94.13/spc200/cgi-bin/test.sh
deleted file mode 100755
index 2b58752c5e..0000000000
--- a/linux-tools/boa-0.94.13/spc200/cgi-bin/test.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set
-#env
diff --git a/linux-tools/boa-0.94.13/spc200/www/SPC200-e.gif b/linux-tools/boa-0.94.13/spc200/www/SPC200-e.gif
deleted file mode 100755
index 7f4da1a10c..0000000000
--- a/linux-tools/boa-0.94.13/spc200/www/SPC200-e.gif
+++ /dev/null
Binary files differ
diff --git a/linux-tools/boa-0.94.13/spc200/www/SPC200-e_PB_v1_01_2005-HR2.gif b/linux-tools/boa-0.94.13/spc200/www/SPC200-e_PB_v1_01_2005-HR2.gif
deleted file mode 100755
index c5553f221d..0000000000
--- a/linux-tools/boa-0.94.13/spc200/www/SPC200-e_PB_v1_01_2005-HR2.gif
+++ /dev/null
Binary files differ
diff --git a/linux-tools/boa-0.94.13/spc200/www/index.html b/linux-tools/boa-0.94.13/spc200/www/index.html
deleted file mode 100755
index 000887af70..0000000000
--- a/linux-tools/boa-0.94.13/spc200/www/index.html
+++ /dev/null
@@ -1,165 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
- <TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Win32)">
- <META NAME="CREATED" CONTENT="20060519;16580661">
- <META NAME="CHANGED" CONTENT="20060519;17331969">
- <STYLE>
- <!--
- @page { size: 21cm 29.7cm; margin: 2cm }
- TD P { margin-bottom: 0.21cm }
- P { margin-bottom: 0.21cm }
- -->
- </STYLE>
-</HEAD>
-<BODY LANG="fr-FR" DIR="LTR">
-<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0 STYLE="page-break-before: always">
- <COL WIDTH=123*>
- <COL WIDTH=133*>
- <THEAD>
- <TR VALIGN=TOP>
- <TD WIDTH=48%>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><IMG SRC="SPC200-e.gif" NAME="Image1" ALIGN=LEFT WIDTH=140 HEIGHT=134 BORDER=0><BR CLEAR=LEFT><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Features</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Raw
- data rate of 224 Mbps </FONT></FONT>&bull; <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">OFDM
- with independent power</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2>output
- levels and modulation (up to 256-QAM) per carrier.</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">7
- independent sub-bands from 2 MHz to 30 MHz</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">TDD/FDD,
- CSMA/CA and TDMA </FONT></FONT></FONT>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Transparent
- bridging and spanning tree (802.1D)</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">VLAN
- (802.1Q), QoS (802.1p)</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">V1, V2c
- SNMP agent</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Power
- Supply : 1.8V for the core and 3.3V for the I/O</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Package:
- 512 EP-BGA, 27mm body</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">ARM
- based CPU core (ARM926EJ)</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Ethernet,
- PCI and extended synchronous application interfaces</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">2 x
- UART (up to 115Kbps), 2 x I2C, 32-bit GPIO user interfaces</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Debug
- support including embedded ICE with JTAG interface</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#0066b4">&bull;
- <FONT SIZE=2><FONT FACE="HelveticaNeue-Roman, sans-serif">Complies
- with 2004 FCC PLC regulations and all CE mark standards</FONT></FONT></FONT></P>
- <P><BR><BR>
- </P>
- <P><IMG SRC="SPC200-e_PB_v1_01_2005-HR2.gif" NAME="Image2" ALIGN=LEFT WIDTH=430 HEIGHT=278 BORDER=0><BR CLEAR=LEFT><BR>
- </P>
- </TD>
- <TD WIDTH=52%>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>System
- Integration Optimisation</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">In
- addition to reducing the cost per chip, the SPC200-e has a 50%
- smaller chip area than the SPC200, allowing for a smaller PCB
- size. The cost of the host PCB is further reduced using the
- SPC200-e as a 4-layer PCB is now practicable.</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Multiple
- Applications and Flexible AFE</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">The
- SPC200-e is designed for both indoor (data, voice, audio and
- HDTV) and outdoor (medium and low voltage) PLC applications. The
- implementation of the critical functions of HF filtering, digital
- conversion and power amplification for the AFE (Analog Front End)
- can be optimised separately for each type of applications as
- needed. The AFE can be implemented using low-cost discrete
- standard components.</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Patented
- OFDM Application</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">Spectrum
- management is implemented using a 1024-OFDM with an innovative
- digital signal processing based on multiband OFDM. This allows a
- lowcost chip solution with high performance while remaining fully
- compatible with a classical 1024-OFDM. </FONT></FONT></FONT>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Flexible
- Regulatory Compliance</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">The
- PHY layer allows management of the global transmit power and the
- power spectrum density mask. This allows interference mitigation
- with flexible frequency notching and relative power management.
- Access to carrier modulations (BPSK, QPSK, 16-QAM, 64-QAM and
- 256-QAM) and forward error correction (Viterbi &amp; Reed
- Solomon) ensure the most robust communication possible on each
- subband.</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Robust
- MAC Layer Implementation</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">The
- MAC layer provides a mechanism, based on TDMA and CSMA/CA, with
- prioritisation and automatic resending for reliable delivery of
- Ethernet packets. Bandwidth can be shared using either TDD or FDD
- methods. Bridging from PLC-to-PLC or from ETH-to-PLC is
- implemented using transparent bridging and spanning tree (802.1D)
- and 802.1p for prioritisation. The standard based QoS (802.1p)
- implementation provides bandwidth management for multimedia
- applications including voice, data, audio and video. Privacy and
- minimizing broadcast domains is ensured using VLAN (802.1Q).</FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
- </P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Bold, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Remote
- Management using SNMP</B></FONT></FONT></FONT></P>
- <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT COLOR="#231f20"><FONT FACE="HelveticaNeue-Roman, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">To
- allow remote management the SPC200-e embeds a SNMP agent. It
- allows the configuration of carriers, frequency notches, power,
- pilots and link modulations. Monitoring and logging of statistics
- for SNR, BER, data rates and spectrum is available through the
- SNMP agent.</FONT></FONT></FONT></P>
- <P ALIGN=LEFT><BR><BR>
- </P>
- <P ALIGN=LEFT><A HREF="/cgi-bin/ifconfig.sh">ifconfig</A></P>
- <P ALIGN=LEFT><A HREF="/cgi-bin/netstat.sh">netstat</A></P>
- <P ALIGN=LEFT><A HREF="/cgi-bin/route.sh">route</A></P>
- </TD>
- </TR>
- </THEAD>
-</TABLE>
-<form name="bridge" action="/cgi-bin/bridge.sh">
-<input type="radio" name="bridge" value="on"checked> Bridge ON<br>
-<input type="radio" name="bridge" value="off"> Bridge OFF<br>
-<INPUT TYPE=SUBMIT VALUE="apply">
-</form>
-
-<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
-</P>
-<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
-</P>
-</BODY>
-</HTML>
diff --git a/linux-tools/boa-0.94.13/src/.depend b/linux-tools/boa-0.94.13/src/.depend
deleted file mode 100644
index f0a9fe9362..0000000000
--- a/linux-tools/boa-0.94.13/src/.depend
+++ /dev/null
@@ -1,28 +0,0 @@
-alias.o: alias.c boa.h config.h compat.h defines.h globals.h escape.h
-boa.o: boa.c boa.h config.h compat.h defines.h globals.h escape.h
-buffer.o: buffer.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-cgi.o: cgi.c boa.h config.h compat.h defines.h globals.h escape.h
-cgi_header.o: cgi_header.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-config.o: config.c boa.h config.h compat.h defines.h globals.h \
- escape.h y.tab.h parse.h
-escape.o: escape.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-get.o: get.c boa.h config.h compat.h defines.h globals.h escape.h
-hash.o: hash.c boa.h config.h compat.h defines.h globals.h escape.h
-ip.o: ip.c boa.h config.h compat.h defines.h globals.h escape.h
-log.o: log.c boa.h config.h compat.h defines.h globals.h escape.h
-mmap_cache.o: mmap_cache.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-pipe.o: pipe.c boa.h config.h compat.h defines.h globals.h escape.h
-queue.o: queue.c boa.h config.h compat.h defines.h globals.h escape.h
-read.o: read.c boa.h config.h compat.h defines.h globals.h escape.h
-request.o: request.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-response.o: response.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-signals.o: signals.c boa.h config.h compat.h defines.h globals.h \
- escape.h
-util.o: util.c boa.h config.h compat.h defines.h globals.h escape.h
-sublog.o: sublog.c
diff --git a/linux-tools/boa-0.94.13/src/Makefile b/linux-tools/boa-0.94.13/src/Makefile
deleted file mode 100644
index 205a2e35a7..0000000000
--- a/linux-tools/boa-0.94.13/src/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# $Id: Makefile,v 1.2 2006/05/23 09:24:37 fleury Exp $
-
-.SUFFIXES:
-.SUFFIXES: .o .c
-.PHONY: clean mrclean distclean depend all dist
-
-KERNEL_HEADERS=-I/usr/src/linux/include
-
-srcdir = .
-VPATH = .:./../extras
-
-#CFLAGS= -Wall -Os -fstrict-aliasing -msoft-float -march=armv5 -mtune=arm926ejs -mapcs-32 -fomit-frame-pointer -DFASCIST_LOGGING
-CFLAGS= -Wall -Os -fstrict-aliasing -msoft-float -march=armv5 -mtune=arm926ejs -mapcs-32 -fomit-frame-pointer -DFASCIST_LOGGING
-LDFLAGS=-Wl,-elf2flt='-s 4000' -Os -msoft-float -march=armv5 -mtune=arm926ejs -mapcs-32 -fomit-frame-pointer
-INCLUDE=-I../libbridge $(KERNEL_HEADERS)
-LIBS=
-
-# Change these if necessary
-
-YACC = bison -y
-LEX = flex
-CC = arm-uclinux-gcc
-CPP = arm-uclinux-gcc -E
-
-SOURCES = alias.c boa.c buffer.c cgi.c cgi_header.c config.c escape.c \
- get.c hash.c ip.c log.c mmap_cache.c pipe.c queue.c read.c \
- request.c response.c select.c signals.c util.c sublog.c
-
-OBJS = y.tab.o lex.yy.o $(SOURCES:.c=.o) timestamp.o
-
-all: boa boa_indexer
-
-boa: $(OBJS)
- $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-
-boa_indexer: index_dir.o escape.o
- $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-
-clean:
- rm -f $(OBJS) boa core lex.yy.c y.tab.c y.tab.h *~ boa_indexer index_dir.o
-
-distclean: mrclean
-
-mrclean: clean
- rm -f config.status config.cache config.h Makefile config.log
-
-# parser dependencies
-
-y.tab.c y.tab.h: boa_grammar.y
- $(YACC) -d $^
-
-lex.yy.c: boa_lexer.l
- $(LEX) $^
-
-# timestamp
-
-timestamp.o: $(SOURCES) boa_grammar.y boa_lexer.l
-
-# depend stuff
-.depend:
- $(CPP) -MM $(SOURCES) > .depend
-
-depend:
- -rm -f .depend
- $(MAKE) .depend
-
-include .depend
-
-# tags
-tags: $(SOURCES)
- ctags -o tags $^ *.h
-
-# dist
-dist:
- $(MAKE) clean
- ./makedist.sh
-
-# object dump
-boa.objdump: boa
- arm-uclinux-objdump --disassemble-all --source boa > $@
-
diff --git a/linux-tools/boa-0.94.13/src/Makefile.in b/linux-tools/boa-0.94.13/src/Makefile.in
deleted file mode 100644
index 3393d0aad3..0000000000
--- a/linux-tools/boa-0.94.13/src/Makefile.in
+++ /dev/null
@@ -1,89 +0,0 @@
-# $Id: Makefile.in,v 1.1.1.1 2006/05/19 13:20:15 fleury Exp $
-
-.SUFFIXES:
-.SUFFIXES: .o .c
-.PHONY: clean mrclean distclean depend all dist
-
-@SET_MAKE@
-
-GCC_FLAGS = -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wcast-qual\
- -Wtraditional\
- -Wshadow\
- -Wconversion\
- -Waggregate-return\
- -Wmissing-prototypes\
- -Wnested-externs\
- -Wall \
- -Wundef -Wwrite-strings -Wredundant-decls -Winline
-
-
-srcdir = @srcdir@
-VPATH = @srcdir@:@srcdir@/../extras
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-CFLAGS = @CFLAGS@ -I.
-
-# Change these if necessary
-
-YACC = @YACC@
-LEX = @LEX@
-CC = @CC@
-CPP = @CPP@
-
-SOURCES = alias.c boa.c buffer.c cgi.c cgi_header.c config.c escape.c \
- get.c hash.c ip.c log.c mmap_cache.c pipe.c queue.c read.c \
- request.c response.c select.c signals.c util.c sublog.c
-
-OBJS = y.tab.o lex.yy.o $(SOURCES:.c=.o) timestamp.o @STRUTIL@
-
-all: boa boa_indexer
-
-boa: $(OBJS)
- $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-
-boa_indexer: index_dir.o escape.o @SCANDIR@ @ALPHASORT@ @STRUTIL@
- $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-
-clean:
- rm -f $(OBJS) boa core lex.yy.c y.tab.c y.tab.h *~ boa_indexer index_dir.o @SCANDIR@ @ALPHASORT@ @STRUTIL@
-
-distclean: mrclean
-
-mrclean: clean
- rm -f config.status config.cache config.h Makefile config.log
-
-# parser dependencies
-
-y.tab.c y.tab.h: boa_grammar.y
- $(YACC) -d $^
-
-lex.yy.c: boa_lexer.l
- $(LEX) $^
-
-# timestamp
-
-timestamp.o: $(SOURCES) boa_grammar.y boa_lexer.l
-
-# depend stuff
-.depend:
- $(CPP) -MM $(SOURCES) > .depend
-
-depend:
- -rm -f .depend
- $(MAKE) .depend
-
-include .depend
-
-# tags
-tags: $(SOURCES)
- ctags -o tags $^ *.h
-
-# dist
-dist:
- $(MAKE) clean
- ./makedist.sh
-
-# object dump
-boa.objdump: boa
- objdump --disassemble-all --source boa > $@
-
diff --git a/linux-tools/boa-0.94.13/src/acconfig.h b/linux-tools/boa-0.94.13/src/acconfig.h
deleted file mode 100644
index fd696c71af..0000000000
--- a/linux-tools/boa-0.94.13/src/acconfig.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* define if GUNZIP found */
-#undef GUNZIP
-
-/* sockaddr_in has sin_len member */
-#undef HAVE_SIN_LEN
-
-/* how many times we shift left for unsigned long */
-#undef NEEDS_ESCAPE_SHIFT
-
-/* if struct tm has tm_gmtoff structure */
-#undef HAVE_TM_GMTOFF
-
-/* if struct tm has tm_zone structure */
-#undef HAVE_TM_ZONE
-
diff --git a/linux-tools/boa-0.94.13/src/aclocal.m4 b/linux-tools/boa-0.94.13/src/aclocal.m4
deleted file mode 100644
index 68ad433711..0000000000
--- a/linux-tools/boa-0.94.13/src/aclocal.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-AC_DEFUN([AC_CHECK_STRUCT_FOR],[
-ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'`
-ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'`
-ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
-changequote(, )dnl
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-changequote([, ])dnl
-
-AC_MSG_CHECKING([for $2.$3])
-AC_CACHE_VAL($ac_safe_all,
-[
-if test "x$4" = "x"; then
- defineit="= 0"
-elif test "x$4" = "xno"; then
- defineit=""
-else
- defineit="$4"
-fi
-AC_TRY_COMPILE([
-$1
-],[
-struct $2 testit;
-testit.$3 $defineit;
-], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" )
-])
-
-if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
- AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED($ac_uc_define)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-dnl AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no])
-dnl 1.1 (2000/09/19)
-dnl Wes Hardaker <wjhardaker@ucdavis.edu>
-
-dnl ----------------------------------------------------------
-
-
diff --git a/linux-tools/boa-0.94.13/src/alias.c b/linux-tools/boa-0.94.13/src/alias.c
deleted file mode 100644
index 7049e768e4..0000000000
--- a/linux-tools/boa-0.94.13/src/alias.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996 Russ Nelson <nelson@crynwr.com>
- * Some changes Copyright (C) 1996-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: alias.c,v 1.1.1.1 2006/05/19 13:20:15 fleury Exp $ */
-
-#include "boa.h"
-
-static alias *alias_hashtable[ALIAS_HASHTABLE_SIZE];
-
-int get_alias_hash_value(char *file);
-
-/*
- * Name: get_alias_hash_value
- *
- * Description: adds the ASCII values of the file letters
- * and mods by the hashtable size to get the hash value
- * Note: stops at first '/' (or '\0')
- */
-
-int get_alias_hash_value(char *file)
-{
- unsigned int hash = 0;
- unsigned int index = 0;
- unsigned char c;
-
- hash = file[index++];
- while ((c = file[index++]) && c != '/')
- hash += (unsigned int) c;
-
- return hash % ALIAS_HASHTABLE_SIZE;
-}
-
-/*
- * Name: add_alias
- *
- * Description: add an Alias, Redirect, or ScriptAlias to the
- * alias hash table.
- */
-
-void add_alias(char *fakename, char *realname, int type)
-{
- int hash;
- alias *old, *new;
- int fakelen, reallen;
-
- /* sanity checking */
- if (fakename == NULL || realname == NULL) {
- DIE("NULL values sent to add_alias");
- }
-
- fakelen = strlen(fakename);
- reallen = strlen(realname);
- if (fakelen == 0 || reallen == 0) {
- DIE("empty values sent to add_alias");
- }
-
- hash = get_alias_hash_value(fakename);
-
- old = alias_hashtable[hash];
-
- if (old) {
- while (old->next) {
- if (!strcmp(fakename, old->fakename)) /* don't add twice */
- return;
- old = old->next;
- }
- }
-
- new = (alias *) malloc(sizeof (alias));
- if (!new) {
- DIE("out of memory adding alias to hash");
- }
-
- if (old)
- old->next = new;
- else
- alias_hashtable[hash] = new;
-
- new->fakename = strdup(fakename);
- if (!new->fakename) {
- DIE("failed strdup");
- }
- new->fake_len = fakelen;
- /* check for "here" */
- if (realname[0] == '.' && realname[1] == '/') {
- new->realname = normalize_path(realname+2);
- if (!new->realname) {
- /* superfluous - normalize_path checks for NULL return values. */
- DIE("normalize_path returned NULL");
- }
- reallen = strlen(new->realname);
- } else {
- new->realname = strdup(realname);
- if (!new->realname) {
- DIE("strdup of realname failed");
- }
- }
- new->real_len = reallen;
-
- new->type = type;
- new->next = NULL;
-}
-
-/*
- * Name: find_alias
- *
- * Description: Locates uri in the alias hashtable if it exists.
- *
- * Returns:
- *
- * alias structure or NULL if not found
- */
-
-alias *find_alias(char *uri, int urilen)
-{
- alias *current;
- int hash;
-
- /* Find ScriptAlias, Alias, or Redirect */
-
- if (urilen == 0)
- urilen = strlen(uri);
- hash = get_alias_hash_value(uri);
-
- current = alias_hashtable[hash];
- while (current) {
-#ifdef FASCIST_LOGGING
- fprintf(stderr,
- "%s:%d - comparing \"%s\" (request) to \"%s\" (alias): ",
- __FILE__, __LINE__, uri, current->fakename);
-#endif
- /* current->fake_len must always be:
- * shorter or equal to the uri
- */
- /*
- * when performing matches:
- * If the virtual part of the url ends in '/', and
- * we get a match, stop there.
- * Otherwise, we require '/' or '\0' at the end of the url.
- * We only check if the virtual path does *not* end in '/'
- */
- if (current->fake_len <= urilen &&
- !memcmp(uri, current->fakename, current->fake_len) &&
- (current->fakename[current->fake_len - 1] == '/' ||
- (current->fakename[current->fake_len - 1] != '/' &&
- (uri[current->fake_len] == '\0' ||
- uri[current->fake_len] == '/')))) {
-#ifdef FASCIST_LOGGING
- fprintf(stderr, "Got it!\n");
-#endif
- return current;
- }
-#ifdef FASCIST_LOGGING
- else
- fprintf(stderr, "Don't Got it!\n");
-#endif
- current = current->next;
- }
- return current;
-}
-
-/*
- * Name: translate_uri
- *
- * Description: Parse a request's virtual path.
- * Sets query_string, pathname directly.
- * Also sets path_info, path_translated, and script_name via
- * init_script_alias
- *
- * Note: NPH in user dir is currently broken
- *
- * Note -- this should be broken up.
- *
- * Return values:
- * 0: failure, close it down
- * 1: success, continue
- */
-
-int translate_uri(request * req)
-{
- static char buffer[MAX_HEADER_LENGTH + 1];
- char *req_urip;
- alias *current;
- char *p;
- int uri_len;
-
- req_urip = req->request_uri;
- if (req_urip[0] != '/') {
- send_r_bad_request(req);
- return 0;
- }
-
- uri_len = strlen(req->request_uri);
-
- current = find_alias(req->request_uri, uri_len);
- if (current) {
-
- if (current->type == SCRIPTALIAS) /* Script */
- return init_script_alias(req, current, uri_len);
-
- /* not a script alias, therefore begin filling in data */
-
- {
- int len;
- len = current->real_len;
- len += uri_len - current->fake_len;
- if (len > MAX_HEADER_LENGTH) {
- log_error_doc(req);
- fputs("uri too long!\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
- memcpy(buffer, current->realname, current->real_len);
- memcpy(buffer + current->real_len,
- req->request_uri + current->fake_len,
- uri_len - current->fake_len + 1);
- }
-
- if (current->type == REDIRECT) { /* Redirect */
- if (req->method == M_POST) { /* POST to non-script */
- /* it's not a cgi, but we try to POST??? */
- send_r_bad_request(req);
- return 0; /* not a script alias, therefore begin filling in data */
- }
- send_r_moved_temp(req, buffer, "");
- return 0;
- } else { /* Alias */
- req->pathname = strdup(buffer);
- if (!req->pathname) {
- send_r_error(req);
- WARN("unable to strdup buffer onto req->pathname");
- return 0;
- }
- return 1;
- }
- }
-
- /*
- The reason why this is *not* an 'else if' is that,
- after aliasing, we still have to check for '~' expansion
- */
-
- if (user_dir && req->request_uri[1] == '~') {
- char *user_homedir;
-
- req_urip = req->request_uri + 2;
-
- /* since we have uri_len which is from strlen(req->request_uri) */
- p = memchr(req_urip, '/', uri_len - 2);
- if (p)
- *p = '\0';
-
- user_homedir = get_home_dir(req_urip);
- if (p) /* have to restore request_uri in case of error */
- *p = '/';
-
- if (!user_homedir) { /*no such user */
- send_r_not_found(req);
- return 0;
- }
- {
- int l1 = strlen(user_homedir);
- int l2 = strlen(user_dir);
- int l3 = (p ? strlen(p) : 0);
-
- if (l1 + l2 + l3 + 1 > MAX_HEADER_LENGTH) {
- log_error_doc(req);
- fputs("uri too long!\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
-
- memcpy(buffer, user_homedir, l1);
- buffer[l1] = '/';
- memcpy(buffer + l1 + 1, user_dir, l2 + 1);
- if (p)
- memcpy(buffer + l1 + 1 + l2, p, l3 + 1);
- }
- } else if (document_root) {
- /* no aliasing, no userdir... */
- int l1, l2, l3;
-
- l1 = strlen(document_root);
- l2 = strlen(req->request_uri);
- if (virtualhost)
- l3 = strlen(req->local_ip_addr);
- else
- l3 = 0;
-
- if (l1 + l2 + l3 + 1 > MAX_HEADER_LENGTH) {
- log_error_doc(req);
- fputs("uri too long!\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
-
- /* the 'l2 + 1' is there so we copy the '\0' as well */
- memcpy(buffer, document_root, l1);
- if (virtualhost) {
- buffer[l1] = '/';
- memcpy(buffer + l1 + 1, req->local_ip_addr, l3);
- memcpy(buffer + l1 + 1 + l3, req->request_uri, l2 + 1);
- } else
- memcpy(buffer + l1, req->request_uri, l2 + 1);
- } else {
- /* not aliased. not userdir. not part of document_root. BAIL */
- send_r_not_found(req);
- return 0;
- }
-
- /* if here,
- * o it may be aliased but it's not a redirect or a script...
- * o it may be a homedir
- * o it may be a document_root resource (with or without virtual host)
- */
-
- req->pathname = strdup(buffer);
- if (!req->pathname) {
- WARN("Could not strdup buffer for req->pathname!");
- send_r_error(req);
- return 0;
- }
-
- /* below we support cgis outside of a ScriptAlias */
- if (strcmp(CGI_MIME_TYPE, get_mime_type(buffer)) == 0) { /* cgi */
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "%s:%d - buffer is: \"%s\"\n",
- __FILE__, __LINE__, buffer);
-#endif
- /* FIXME */
- /* script_name could end up as /cgi-bin/bob/extra_path */
- req->script_name = strdup(req->request_uri);
- if (!req->script_name) {
- WARN("Could not strdup req->request_uri for req->script_name");
- send_r_error(req);
- return 0;
- }
- if (req->simple)
- req->is_cgi = NPH;
- else
- req->is_cgi = CGI;
- return 1;
- } else if (req->method == M_POST) { /* POST to non-script */
- /* it's not a cgi, but we try to POST??? */
- send_r_bad_request(req);
- return 0;
- } else /* we are done!! */
- return 1;
-}
-
-/*
- * Name: init_script_alias
- *
- * Description: Performs full parsing on a ScriptAlias request
- * Sets path_info and script_name
- *
- * Return values:
- *
- * 0: failure, shut down
- * 1: success, continue
- */
-
-int init_script_alias(request * req, alias * current1, int uri_len)
-{
- static char pathname[MAX_HEADER_LENGTH + 1];
- struct stat statbuf;
- static char buffer[MAX_HEADER_LENGTH + 1];
-
- int index = 0;
- char c;
- int err;
-
- /* copies the "real" path + the non-alias portion of the
- uri to pathname.
- */
-
- if (uri_len - current1->fake_len + current1->real_len >
- MAX_HEADER_LENGTH) {
- log_error_doc(req);
- fputs("uri too long!\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
-
- memcpy(pathname, current1->realname, current1->real_len);
- memcpy(pathname + current1->real_len,
- &req->request_uri[current1->fake_len],
- uri_len - current1->fake_len + 1); /* the +1 copies the NUL */
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr,
- "%s:%d - pathname in init_script_alias is: \"%s\" (\"%s\")\n",
- __FILE__, __LINE__, pathname, pathname + current1->real_len);
-#endif
- if (strncmp("nph-", pathname + current1->real_len, 4) == 0
- || req->simple) req->is_cgi = NPH;
- else
- req->is_cgi = CGI;
-
-
- /* start at the beginning of the actual uri...
- (in /cgi-bin/bob, start at the 'b' in bob */
- index = current1->real_len;
-
- /* go to first and successive '/' and keep checking
- * if it is a full pathname
- * on success (stat (not lstat) of file is a *regular file*)
- */
- do {
- c = pathname[++index];
- if (c == '/') {
- pathname[index] = '\0';
- err = stat(pathname, &statbuf);
- pathname[index] = '/';
- if (err == -1) {
- send_r_not_found(req);
- return 0;
- }
-
- /* is it a dir? */
- if (!S_ISDIR(statbuf.st_mode)) {
- /* check access */
- if (!(statbuf.st_mode &
- (S_IFREG | /* regular file */
- (S_IRUSR | S_IXUSR) | /* u+rx */
- (S_IRGRP | S_IXGRP) | /* g+rx */
- (S_IROTH | S_IXOTH)))) { /* o+rx */
- send_r_forbidden(req);
- return 0;
- }
- /* stop here */
- break;
- }
- }
- } while (c != '\0');
-
- req->script_name = strdup(req->request_uri);
- if (!req->script_name) {
- send_r_error(req);
- WARN("unable to strdup req->request_uri for req->script_name");
- return 0;
- }
-
- if (c == '\0') {
- err = stat(pathname, &statbuf);
- if (err == -1) {
- send_r_not_found(req);
- return 0;
- }
-
- /* is it a dir? */
- if (!S_ISDIR(statbuf.st_mode)) {
- /* check access */
- if (!(statbuf.st_mode &
- (S_IFREG | /* regular file */
- (S_IRUSR | S_IXUSR) | /* u+rx */
- (S_IRGRP | S_IXGRP) | /* g+rx */
- (S_IROTH | S_IXOTH)))) { /* o+rx */
- send_r_forbidden(req);
- return 0;
- }
- /* stop here */
- } else {
- send_r_forbidden(req);
- return 0;
- }
- }
-
- /* we have path_info if c == '/'... still have to check for query */
- else if (c == '/') {
- int hash;
- alias *current;
- int path_len;
-
- req->path_info = strdup(pathname + index);
- if (!req->path_info) {
- send_r_error(req);
- WARN("unable to strdup pathname + index for req->path_info");
- return 0;
- }
- pathname[index] = '\0'; /* strip path_info from path */
- path_len = strlen(req->path_info);
- /* we need to fix script_name here */
- /* index points into pathname, which is
- * realname/cginame/foo
- * and index points to the '/foo' part
- */
- req->script_name[strlen(req->script_name) - path_len] = '\0'; /* zap off the /foo part */
-
- /* now, we have to re-alias the extra path info....
- this sucks.
- */
- hash = get_alias_hash_value(req->path_info);
- current = alias_hashtable[hash];
- while (current && !req->path_translated) {
- if (!strncmp(req->path_info, current->fakename,
- current->fake_len)) {
-
- if (current->real_len +
- path_len - current->fake_len > MAX_HEADER_LENGTH) {
- log_error_doc(req);
- fputs("uri too long!\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
-
- memcpy(buffer, current->realname, current->real_len);
- strcpy(buffer + current->real_len,
- &req->path_info[current->fake_len]);
- req->path_translated = strdup(buffer);
- if (!req->path_translated) {
- send_r_error(req);
- WARN("unable to strdup buffer for req->path_translated");
- return 0;
- }
- }
- current = current->next;
- }
- /* no alias... try userdir */
- if (!req->path_translated && user_dir && req->path_info[1] == '~') {
- char *user_homedir;
- char *p;
-
- p = strchr(pathname + index + 1, '/');
- if (p)
- *p = '\0';
-
- user_homedir = get_home_dir(pathname + index + 2);
- if (p)
- *p = '/';
-
- if (!user_homedir) { /* no such user */
- send_r_not_found(req);
- return 0;
- }
- {
- int l1 = strlen(user_homedir);
- int l2 = strlen(user_dir);
- int l3;
- if (p)
- l3 = strlen(p);
- else
- l3 = 0;
-
- req->path_translated = malloc(l1 + l2 + l3 + 2);
- if (req->path_translated == NULL) {
- send_r_error(req);
- WARN("unable to malloc memory for req->path_translated");
- return 0;
- }
- memcpy(req->path_translated, user_homedir, l1);
- req->path_translated[l1] = '/';
- memcpy(req->path_translated + l1 + 1, user_dir, l2 + 1);
- if (p)
- memcpy(req->path_translated + l1 + 1 + l2, p, l3 + 1);
- }
- }
- if (!req->path_translated && document_root) {
- /* no userdir, no aliasing... try document root */
- int l1, l2;
- l1 = strlen(document_root);
- l2 = path_len;
-
- req->path_translated = malloc(l1 + l2 + 1);
- if (req->path_translated == NULL) {
- send_r_error(req);
- WARN("unable to malloc memory for req->path_translated");
- return 0;
- }
- memcpy(req->path_translated, document_root, l1);
- memcpy(req->path_translated + l1, req->path_info, l2 + 1);
- }
- }
-
- req->pathname = strdup(pathname);
- if (!req->pathname) {
- send_r_error(req);
- WARN("unable to strdup pathname for req->pathname");
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Empties the alias hashtable, deallocating any allocated memory.
- */
-
-void dump_alias(void)
-{
- int i;
- alias *temp;
-
- for (i = 0; i < ALIAS_HASHTABLE_SIZE; ++i) { /* these limits OK? */
- if (alias_hashtable[i]) {
- temp = alias_hashtable[i];
- while (temp) {
- alias *temp_next;
-
- if (temp->fakename)
- free(temp->fakename);
- if (temp->realname)
- free(temp->realname);
- temp_next = temp->next;
- free(temp);
- temp = temp_next;
- }
- alias_hashtable[i] = NULL;
- }
- }
-}
diff --git a/linux-tools/boa-0.94.13/src/boa.c b/linux-tools/boa-0.94.13/src/boa.c
deleted file mode 100644
index e7f50876fe..0000000000
--- a/linux-tools/boa-0.94.13/src/boa.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Charles F. Randall <crandall@goldsys.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: boa.c,v 1.2 2006/05/23 09:24:37 fleury Exp $*/
-
-#include "boa.h"
-#include <sys/resource.h>
-
-/* globals */
-int backlog = SO_MAXCONN;
-time_t start_time;
-
-int sighup_flag = 0; /* 1 => signal has happened, needs attention */
-int sigchld_flag = 0; /* 1 => signal has happened, needs attention */
-int sigalrm_flag = 0; /* 1 => signal has happened, needs attention */
-int sigterm_flag = 0; /* lame duck mode */
-time_t current_time;
-int max_fd = 0;
-int pending_requests = 0;
-
-/* static to boa.c */
-static void fixup_server_root(void);
-static int create_server_socket(void);
-static void drop_privs(void);
-
-static int sock_opt = 1;
-static int do_fork = 1;
-int devnullfd = -1;
-
-int main(int argc, char **argv)
-{
- int c; /* command line arg */
- int server_s; /* boa socket */
-
- /* set umask to u+rw, u-x, go-rwx */
- c = umask(~0600);
- if (c == -1) {
- perror("umask");
- exit(1);
- }
-
- devnullfd = open("/dev/null", 0);
-
- /* make STDIN and STDOUT point to /dev/null */
- if (devnullfd == -1) {
- DIE("can't open /dev/null");
- }
-
- if (dup2(devnullfd, STDIN_FILENO) == -1) {
- DIE("can't dup2 /dev/null to STDIN_FILENO");
- }
-
- if (dup2(devnullfd, STDOUT_FILENO) == -1) {
- DIE("can't dup2 /dev/null to STDOUT_FILENO");
- }
-
- /* but first, update timestamp, because log_error_time uses it */
- (void) time(&current_time);
-
- while ((c = getopt(argc, argv, "c:r:d")) != -1) {
- switch (c) {
- case 'c':
- if (server_root)
- free(server_root);
- server_root = strdup(optarg);
- if (!server_root) {
- perror("strdup (for server_root)");
- exit(1);
- }
- break;
- case 'r':
- if (chdir(optarg) == -1) {
- log_error_time();
- perror("chdir (to chroot)");
- exit(1);
- }
- if (chroot(optarg) == -1) {
- log_error_time();
- perror("chroot");
- exit(1);
- }
- if (chdir("/") == -1) {
- log_error_time();
- perror("chdir (after chroot)");
- exit(1);
- }
- break;
- case 'd':
- do_fork = 0;
- break;
- default:
- fprintf(stderr, "Usage: %s [-c serverroot] [-r chroot] [-d]\n", argv[0]);
- exit(1);
- }
- }
-
- fixup_server_root();
- read_config_files();
- open_logs();
- server_s = create_server_socket();
- init_signals();
- drop_privs();
- create_common_env();
- build_needs_escape();
-
- if (max_connections < 1) {
- struct rlimit rl;
-
- /* has not been set explicitly */
- c = getrlimit(RLIMIT_NOFILE, &rl);
- if (c < 0) {
- perror("getrlimit");
- exit(1);
- }
- max_connections = rl.rlim_cur;
- }
-
- /* background ourself */
- if (do_fork) {
- switch(vfork()) {
- case -1:
- /* error */
- perror("vfork");
- exit(1);
- break;
- case 0:
- /* child, success */
- break;
- default:
- /* parent, success */
- exit(0);
- break;
- }
- }
-
- /* main loop */
- timestamp();
-
- status.requests = 0;
- status.errors = 0;
-
- start_time = current_time;
- select_loop(server_s);
- return 0;
-}
-
-static int create_server_socket(void)
-{
- int server_s;
-
- server_s = socket(SERVER_AF, SOCK_STREAM, IPPROTO_TCP);
- if (server_s == -1) {
- DIE("unable to create socket");
- }
-
- /* server socket is nonblocking */
- if (set_nonblock_fd(server_s) == -1) {
- DIE("fcntl: unable to set server socket to nonblocking");
- }
-
- /* close server socket on exec so cgi's can't write to it */
- if (fcntl(server_s, F_SETFD, 1) == -1) {
- DIE("can't set close-on-exec on server socket!");
- }
-
- /* reuse socket addr */
- if ((setsockopt(server_s, SOL_SOCKET, SO_REUSEADDR, (void *) &sock_opt,
- sizeof (sock_opt))) == -1) {
- DIE("setsockopt");
- }
-
- /* internet family-specific code encapsulated in bind_server() */
- if (bind_server(server_s, server_ip) == -1) {
- DIE("unable to bind");
- }
-
- /* listen: large number just in case your kernel is nicely tweaked */
- if (listen(server_s, backlog) == -1) {
- DIE("unable to listen");
- }
- return server_s;
-}
-
-static void drop_privs(void)
-{
- /* give away our privs if we can */
- if (getuid() == 0) {
- struct passwd *passwdbuf;
- passwdbuf = getpwuid(server_uid);
- if (passwdbuf == NULL) {
- DIE("getpwuid");
- }
- if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {
- DIE("initgroups");
- }
- if (setgid(server_gid) == -1) {
- DIE("setgid");
- }
- if (setuid(server_uid) == -1) {
- DIE("setuid");
- }
- /* test for failed-but-return-was-successful setuid
- * http://www.securityportal.com/list-archive/bugtraq/2000/Jun/0101.html
- */
-#if 0
- if (setuid(0) != -1) {
- DIE("icky Linux kernel bug!");
- }
-#endif
- } else {
- if (server_gid || server_uid) {
- log_error_time();
- fprintf(stderr, "Warning: "
- "Not running as root: no attempt to change"
- " to uid %d gid %d\n", server_uid, server_gid);
- }
- server_gid = getgid();
- server_uid = getuid();
- }
-}
-
-/*
- * Name: fixup_server_root
- *
- * Description: Makes sure the server root is valid.
- *
- */
-
-static void fixup_server_root()
-{
- char *dirbuf;
-
- if (!server_root) {
-#ifdef SERVER_ROOT
- server_root = strdup(SERVER_ROOT);
- if (!server_root) {
- perror("strdup (SERVER_ROOT)");
- exit(1);
- }
-#else
- fputs("boa: don't know where server root is. Please #define "
- "SERVER_ROOT in boa.h\n"
- "and recompile, or use the -c command line option to "
- "specify it.\n", stderr);
- exit(1);
-#endif
- }
-
- if (chdir(server_root) == -1) {
- fprintf(stderr, "Could not chdir to \"%s\": aborting\n",
- server_root);
- exit(1);
- }
-
- dirbuf = normalize_path(server_root);
- free(server_root);
- server_root = dirbuf;
-}
-
diff --git a/linux-tools/boa-0.94.13/src/boa.h b/linux-tools/boa-0.94.13/src/boa.h
deleted file mode 100644
index 814632d284..0000000000
--- a/linux-tools/boa-0.94.13/src/boa.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996-99 Larry Doolittle <ldoolitt@jlab.org>
- * Some changes Copyright (C) 1997-99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: boa.h,v 1.1.1.1 2006/05/19 13:20:15 fleury Exp $*/
-
-#ifndef _BOA_H
-#define _BOA_H
-
-#include <errno.h>
-#include <stdlib.h> /* malloc, free, etc. */
-#include <stdio.h> /* stdin, stdout, stderr */
-#include <string.h> /* strdup */
-#include <ctype.h>
-#include <time.h> /* localtime, time */
-#include <pwd.h>
-#include <grp.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <limits.h> /* OPEN_MAX */
-#include <setjmp.h>
-
-#include <netdb.h>
-#include <netinet/in.h>
-
-#include <sys/mman.h>
-#include <sys/select.h>
-#include <sys/types.h> /* socket, bind, accept */
-#include <sys/socket.h> /* socket, bind, accept, setsockopt, */
-#include <sys/stat.h> /* open */
-
-#include "compat.h" /* oh what fun is porting */
-#include "defines.h"
-#include "globals.h"
-
-/* alias */
-void add_alias(char *fakename, char *realname, int script);
-int translate_uri(request * req);
-int init_script_alias(request * req, alias * current, int uri_len);
-void dump_alias(void);
-
-/* config */
-void read_config_files(void);
-
-/* escape */
-#include "escape.h"
-
-/* get */
-
-int init_get(request * req);
-int process_get(request * req);
-int get_dir(request * req, struct stat *statbuf);
-
-/* hash */
-unsigned get_mime_hash_value(char *extension);
-char *get_mime_type(char *filename);
-char *get_home_dir(char *name);
-void dump_mime(void);
-void dump_passwd(void);
-void show_hash_stats(void);
-
-/* log */
-void open_logs(void);
-void close_access_log(void);
-void log_access(request * req);
-void log_error_doc(request * req);
-void boa_perror(request * req, char *message);
-void log_error_time(void);
-void log_error_mesg(char *file, int line, char *mesg);
-
-/* queue */
-void block_request(request * req);
-void ready_request(request * req);
-void dequeue(request ** head, request * req);
-void enqueue(request ** head, request * req);
-
-/* read */
-int read_header(request * req);
-int read_body(request * req);
-int write_body(request * req);
-
-/* request */
-request *new_request(void);
-void get_request(int);
-void process_requests(int server_s);
-int process_header_end(request * req);
-int process_header_line(request * req);
-int process_logline(request * req);
-int process_option_line(request * req);
-void add_accept_header(request * req, char *mime_type);
-void free_requests(void);
-
-/* response */
-void print_ka_phrase(request * req);
-void print_content_type(request * req);
-void print_content_length(request * req);
-void print_last_modified(request * req);
-void print_http_headers(request * req);
-
-void send_r_request_ok(request * req); /* 200 */
-void send_r_moved_perm(request * req, char *url); /* 301 */
-void send_r_moved_temp(request * req, char *url, char *more_hdr); /* 302 */
-void send_r_not_modified(request * req); /* 304 */
-void send_r_bad_request(request * req); /* 400 */
-void send_r_unauthorized(request * req, char *name); /* 401 */
-void send_r_forbidden(request * req); /* 403 */
-void send_r_not_found(request * req); /* 404 */
-void send_r_error(request * req); /* 500 */
-void send_r_not_implemented(request * req); /* 501 */
-void send_r_bad_gateway(request * req); /* 502 */
-void send_r_service_unavailable(request * req); /* 503 */
-void send_r_bad_version(request * req); /* 505 */
-
-/* cgi */
-void create_common_env(void);
-void clear_common_env(void);
-int add_cgi_env(request * req, char *key, char *value, int http_prefix);
-int complete_env(request * req);
-void create_argv(request * req, char **aargv);
-int init_cgi(request * req);
-
-/* signals */
-void init_signals(void);
-void sighup_run(void);
-void sigchld_run(void);
-void sigalrm_run(void);
-void sigterm_stage1_run(int);
-void sigterm_stage2_run();
-
-/* util.c */
-void clean_pathname(char *pathname);
-char *get_commonlog_time(void);
-void rfc822_time_buf(char *buf, time_t s);
-char *simple_itoa(unsigned int i);
-int boa_atoi(char *s);
-char *escape_string(char *inp, char *buf);
-int month2int(char *month);
-int modified_since(time_t * mtime, char *if_modified_since);
-char *to_upper(char *str);
-int unescape_uri(char *uri, char **query_string);
-int create_temporary_file(short want_unlink, char *storage, int size);
-char * normalize_path(char *path);
-int real_set_block_fd(int fd);
-int real_set_nonblock_fd(int fd);
-
-/* buffer */
-int req_write(request * req, char *msg);
-void reset_output_buffer(request *req);
-int req_write_escape_http(request * req, char *msg);
-int req_write_escape_html(request * req, char *msg);
-int req_flush(request * req);
-char *escape_uri(char *uri);
-
-/* timestamp */
-void timestamp(void);
-
-/* mmap_cache */
-struct mmap_entry *find_mmap(int data_fd, struct stat *s);
-void release_mmap(struct mmap_entry *e);
-
-/* sublog */
-int open_gen_fd(char *spec);
-int process_cgi_header(request * req);
-
-/* pipe */
-int read_from_pipe(request * req);
-int write_from_pipe(request * req);
-
-/* ip */
-int bind_server(int server_s, char *ip);
-char *ascii_sockaddr(struct SOCKADDR *s, char *dest, int len);
-int net_port(struct SOCKADDR *s);
-
-/* select */
-void select_loop(int server_s);
-
-#endif
diff --git a/linux-tools/boa-0.94.13/src/boa_grammar.y b/linux-tools/boa-0.94.13/src/boa_grammar.y
deleted file mode 100644
index 06f0742163..0000000000
--- a/linux-tools/boa-0.94.13/src/boa_grammar.y
+++ /dev/null
@@ -1,127 +0,0 @@
-%{
-
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <psp@well.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: boa_grammar.y,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-/* #include "boa.h" */
-#include "parse.h"
-
-int yyerror(char * msg);
-
-/* yydebug = 1; */
-
-#ifdef DEBUG
-#define DBG(x) x
-#else
-#define DBG(x)
-#endif
-
-char *arg1hold;
-char mime_type[256]; /* global to inherit */
-
-%}
-
-%union {
- char * sval;
- int ival;
- struct ccommand * cval;
-};
-
-/* boa.conf tokens */
-%token <cval> STMT_NO_ARGS STMT_ONE_ARG STMT_TWO_ARGS
-
-/* mime.type tokens */
-%token <sval> MIMETYPE
-%token <sval> STRING
-%token <ival> INTEGER
-
-%start ConfigFiles
-
-%%
-
-ConfigFiles: BoaConfigStmts MimeTypeStmts
- ;
-
-BoaConfigStmts: BoaConfigStmts BoaConfigStmt
- | /* empty */
- ;
-
-BoaConfigStmt:
- StmtNoArgs
- | StmtOneArg
- | StmtTwoArgs
- ;
-
-StmtNoArgs: STMT_NO_ARGS
- { if ($1->action) {
- DBG(printf("StmtNoArgs: %s\n",$1->name);)
- $1->action(NULL,NULL,$1->object);
- }
- }
- ;
-
-StmtOneArg: STMT_ONE_ARG STRING
- { if ($1->action) {
- DBG(printf("StmtOneArg: %s %s\n",$1->name,$2);)
- $1->action($2,NULL,$1->object);
- }
- }
- ;
-
-StmtTwoArgs: STMT_TWO_ARGS STRING
- { arg1hold = strdup($2); }
- STRING
- { if ($1->action) {
- DBG(printf("StmtTwoArgs: '%s' '%s' '%s'\n",
- $1->name,arg1hold,$4);)
- $1->action($4,arg1hold,$1->object);
- }
- free(arg1hold);
- }
- ;
-
-
-/******************* mime.types **********************/
-
-MimeTypeStmts: MimeTypeStmts MimeTypeStmt
- | /* empty */
- ;
-
-MimeTypeStmt: MIMETYPE
- { strcpy(mime_type, $1); }
- ExtensionList
- ;
-
-ExtensionList: ExtensionList Extension
- | /* empty */
- ;
-
-Extension: STRING
- { add_mime_type($1, mime_type); }
- ;
-
-%%
-
diff --git a/linux-tools/boa-0.94.13/src/boa_lexer.l b/linux-tools/boa-0.94.13/src/boa_lexer.l
deleted file mode 100644
index e2cb2a429f..0000000000
--- a/linux-tools/boa-0.94.13/src/boa_lexer.l
+++ /dev/null
@@ -1,155 +0,0 @@
-%{
-
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <psp@well.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: boa_lexer.l,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "y.tab.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include "parse.h"
-
-#define MAX_STR_CONST 1024
-#define qspush(c) \
- if (string_buf_ptr < string_buf+MAX_STR_CONST) \
- *string_buf_ptr++ = c; \
- else \
- yyerror("quoted string overflow");
-
-char *mime_types = NULL;
-
-static int file = 0;
-int lineno = 1;
-struct ccommand *k;
-char string_buf[MAX_STR_CONST];
-char *string_buf_ptr;
-%}
-
-%s MIME
-/* Quoted string handling (almost) straight out of
- the flex 2.5 man page, April 1995 */
-%x STR
-
-%%
-
-[ \t]+ ;
-#.* ;
-
-<MIME>[^ \t\n]+\/[^ \t\n]+ { yylval.sval = yytext; return MIMETYPE; }
-
-[^ \"\t\n]+ { /* XXX could use better checks that we are in a state to
- * accept keywords; this version matches original behavior */
- if ((YYSTATE==INITIAL) && (k=lookup_keyword(yytext))) {
- yylval.cval=k;
- return (k->type);
- } else { yylval.sval = yytext; return STRING; }
- }
-
-\" {
- string_buf_ptr = string_buf;
- BEGIN(STR);
- }
-
-<STR>{
-\" { /* saw closing quote - all done */
- BEGIN(INITIAL);
- *string_buf_ptr = '\0';
- /* return string constant token type and value to parser */
- yylval.sval = string_buf; return STRING;
- }
-
-\n {
- /* error - unterminated string constant */
- /* generate error message */
- yyerror("unterminated string constant");
- }
-
-\\[0-7]{1,3} {
- /* octal escape sequence */
- int result;
-
- (void) sscanf( yytext + 1, "%o", &result );
-
- if ( result > 0xff )
- { /* error, constant is out-of-bounds */ }
-
- qspush(result);
- }
-
-\\[0-9]+ {
- /* generate error - bad escape sequence; something
- * like '\48' or '\0777777'
- */
- yyerror("bad escape sequence");
- }
-
-\\n qspush('\n');
-\\t qspush('\t');
-\\r qspush('\r');
-\\b qspush('\b');
-\\f qspush('\f');
-
-\\(.|\n) *string_buf_ptr++ = yytext[1];
-
-[^\\\n\"]+ {
- char *yptr = yytext;
- while ( *yptr )
- qspush(*yptr++);
- }
-}
- /* End of <STR> dependence */
-\n { lineno++; }
-%%
-
-/* In yywrap we track which file we are on.
- * 1: close boa.conf, open mime.types
- * 2: return 1;
- */
-
-int yywrap()
-{
- fclose(yyin);
- file++;
-
- switch(file) {
- case 1:
- yyin = fopen(mime_types, "r");
- if(!yyin) {
- fprintf(stderr, "Could not open mime.types file, \"%s\", "
- "for reading\n", mime_types);
- exit(1);
- }
- BEGIN MIME;
- return 0;
- default:
- BEGIN INITIAL;
- file = 0; /* in case we reread config files */
- return 1;
- }
-}
-
-int yyerror(char * msg)
-{
- fprintf(stderr, "Error on line %d of %s: %s\n", lineno,
- (file == 0 ? "boa.conf" : "mime.types"), msg);
- return 1;
-}
-
diff --git a/linux-tools/boa-0.94.13/src/buffer.c b/linux-tools/boa-0.94.13/src/buffer.c
deleted file mode 100644
index ce7f5f601c..0000000000
--- a/linux-tools/boa-0.94.13/src/buffer.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1999 Jon Nelson <jnelson@boa.org>
-
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: buffer.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $ */
-
-#include "boa.h"
-#include "escape.h"
-
-#define INT_TO_HEX(x) \
- ((((x)-10)>=0)?('A'+((x)-10)):('0'+(x)))
-
-/*
- * Name: req_write
- *
- * Description: Buffers data before sending to client.
- * Returns: -1 for error, otherwise how much is stored
- */
-
-int req_write(request * req, char *msg)
-{
- int msg_len;
-
- msg_len = strlen(msg);
-
- if (!msg_len || req->status == DEAD)
- return req->buffer_end;
-
- if (req->buffer_end + msg_len > BUFFER_SIZE) {
- log_error_time();
- fprintf(stderr, "Ran out of Buffer space!\n");
- req->status = DEAD;
- return -1;
- }
- memcpy(req->buffer + req->buffer_end, msg, msg_len);
- req->buffer_end += msg_len;
- return req->buffer_end;
-}
-
-void reset_output_buffer(request *req)
-{
- req->buffer_end = 0;
-}
-
-/*
- * Name: req_write_escape_http
- * Description: Buffers and "escapes" data before sending to client.
- * as above, but translates as it copies, into a form suitably
- * encoded for URLs in HTTP headers.
- * Returns: -1 for error, otherwise how much is stored
- */
-int req_write_escape_http(request * req, char *msg)
-{
- char c, *inp, *dest;
- int left;
- inp = msg;
- dest = req->buffer + req->buffer_end;
- /* 3 is a guard band, since we don't check the destination pointer
- * in the middle of a transfer of up to 3 bytes */
- left = BUFFER_SIZE - req->buffer_end - 3;
- while ((c = *inp++) && left > 0) {
- if (needs_escape((unsigned int) c)) {
- *dest++ = '%';
- *dest++ = INT_TO_HEX(c >> 4);
- *dest++ = INT_TO_HEX(c & 15);
- left -= 3;
- } else {
- *dest++ = c;
- left--;
- }
- }
- req->buffer_end = dest - req->buffer;
- if (left == 0) {
- log_error_time();
- fprintf(stderr, "Ran out of Buffer space!\n");
- req->status = DEAD;
- return -1;
- }
- return req->buffer_end;
-}
-
-/*
- * Name: req_write_escape_html
- * Description: Buffers and "escapes" data before sending to client.
- * as above, but translates as it copies, into a form suitably
- * encoded for HTML bodies.
- * Returns: -1 for error, otherwise how much is stored
- */
-int req_write_escape_html(request * req, char *msg)
-{
- char c, *inp, *dest;
- int left;
- inp = msg;
- dest = req->buffer + req->buffer_end;
- /* 5 is a guard band, since we don't check the destination pointer
- * in the middle of a transfer of up to 5 bytes */
- left = BUFFER_SIZE - req->buffer_end - 5;
- while ((c = *inp++) && left > 0) {
- switch (c) {
- case '>':
- *dest++ = '&';
- *dest++ = 'g';
- *dest++ = 't';
- *dest++ = ';';
- left -= 4;
- break;
- case '<':
- *dest++ = '&';
- *dest++ = 'l';
- *dest++ = 't';
- *dest++ = ';';
- left -= 4;
- break;
- case '&':
- *dest++ = '&';
- *dest++ = 'a';
- *dest++ = 'm';
- *dest++ = 'p';
- *dest++ = ';';
- left -= 5;
- break;
- case '\"':
- *dest++ = '&';
- *dest++ = 'q';
- *dest++ = 'u';
- *dest++ = 'o';
- *dest++ = 't';
- *dest++ = ';';
- left -= 6;
- break;
- default:
- *dest++ = c;
- left--;
- }
- }
- req->buffer_end = dest - req->buffer;
- if (left == 0) {
- log_error_time();
- fprintf(stderr, "Ran out of Buffer space!\n");
- req->status = DEAD;
- return -1;
- }
- return req->buffer_end;
-}
-
-
-/*
- * Name: flush_req
- *
- * Description: Sends any backlogged buffer to client.
- *
- * Returns: -2 for error, -1 for blocked, otherwise how much is stored
- */
-
-int req_flush(request * req)
-{
- int bytes_to_write;
-
- bytes_to_write = req->buffer_end - req->buffer_start;
- if (req->status == DEAD)
- return -2;
-
- if (bytes_to_write) {
- int bytes_written;
-
- bytes_written = write(req->fd, req->buffer + req->buffer_start,
- bytes_to_write);
-
- if (bytes_written < 0) {
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return -1; /* request blocked at the pipe level, but keep going */
- else {
- req->buffer_start = req->buffer_end = 0;
- if (errno != EPIPE)
- perror("buffer flush"); /* OK to disable if your logs get too big */
- req->status = DEAD;
- req->buffer_end = 0;
- return -2;
- }
- }
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "%s:%d - Wrote \"", __FILE__, __LINE__);
- fwrite(req->buffer + req->buffer_start, sizeof (char),
- bytes_written, stderr);
- fprintf(stderr, "\" (%d bytes)\n", bytes_written);
-#endif
- req->buffer_start += bytes_written;
- }
- if (req->buffer_start == req->buffer_end)
- req->buffer_start = req->buffer_end = 0;
- return req->buffer_end; /* successful */
-}
-
-/*
- * Name: escape_string
- *
- * Description: escapes the string inp. Uses variable buf. If buf is
- * NULL when the program starts, it will attempt to dynamically allocate
- * the space that it needs, otherwise it will assume that the user
- * has already allocated enough space for the variable buf, which
- * could be up to 3 times the size of inp. If the routine dynamically
- * allocates the space, the user is responsible for freeing it afterwords
- * Returns: NULL on error, pointer to string otherwise.
- * Note: this function doesn't really belong here, I plopped it here to
- * work around a "bug" in escape.h (it defines a global, so can't be
- * used in multiple source files). Actually, this routine shouldn't
- * exist anywhere, it's only usage is in get.c's handling of on-the-fly
- * directory generation, which would be better configured to use a combination
- * of req_write_escape_http and req_write_escape_html. That would involve
- * more work than I'm willing to put in right now, though, so here we are.
- */
-
-char *escape_string(char *inp, char *buf)
-{
- int max;
- char *index;
- unsigned char c;
-
- max = strlen(inp) * 3;
-
- if (buf == NULL && max)
- buf = malloc(sizeof (char) * max + 1);
-
- if (buf == NULL) {
- log_error_time();
- perror("malloc");
- return NULL;
- }
-
- index = buf;
- while ((c = *inp++) && max > 0) {
- if (needs_escape((unsigned int) c)) {
- *index++ = '%';
- *index++ = INT_TO_HEX(c >> 4);
- *index++ = INT_TO_HEX(c & 15);
- } else
- *index++ = c;
- }
- *index = '\0';
- return buf;
-}
diff --git a/linux-tools/boa-0.94.13/src/cgi.c b/linux-tools/boa-0.94.13/src/cgi.c
deleted file mode 100644
index f157621d80..0000000000
--- a/linux-tools/boa-0.94.13/src/cgi.c
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,97 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996 Charles F. Randall <crandall@goldsys.com>
- * Some changes Copyright (C) 1997-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: cgi.c,v 1.2 2006/05/23 09:24:37 fleury Exp $ */
-
-#include "boa.h"
-
-static char *env_gen_extra(const char *key, const char *value, int extra);
-
-int verbose_cgi_logs = 0;
-/* The +1 is for the the NULL in complete_env */
-static char *common_cgi_env[COMMON_CGI_COUNT + 1];
-
-/*
- * Name: create_common_env
- *
- * Description: Set up the environment variables that are common to
- * all CGI scripts
- */
-
-void create_common_env()
-{
- int index = 0, i;
-
-
- /* NOTE NOTE NOTE:
- If you (the reader) someday modify this chunk of code to
- handle more "common" CGI environment variables, then bump the
- value COMMON_CGI_COUNT in defines.h UP
-
- Also, in the case of document_root and server_admin, two variables
- that may or may not be defined depending on the way the server
- is configured, we check for null values and use an empty
- string to denote a NULL value to the environment, as per the
- specification. The quote for which follows:
-
- "In all cases, a missing environment variable is
- equivalent to a zero-length (NULL) value, and vice versa."
- */
- common_cgi_env[index++] = env_gen_extra("PATH",
- ((cgi_path != NULL) ? cgi_path : DEFAULT_PATH), 0);
- common_cgi_env[index++] = env_gen_extra("SERVER_SOFTWARE", SERVER_VERSION, 0);
- common_cgi_env[index++] = env_gen_extra("SERVER_NAME", server_name, 0);
- common_cgi_env[index++] = env_gen_extra("GATEWAY_INTERFACE", CGI_VERSION, 0);
-
- common_cgi_env[index++] =
- env_gen_extra("SERVER_PORT", simple_itoa(server_port), 0);
-
- /* NCSA and APACHE added -- not in CGI spec */
- /* common_cgi_env[index++] = env_gen_extra("DOCUMENT_ROOT", document_root); */
-
- /* NCSA added */
- /* common_cgi_env[index++] = env_gen_extra("SERVER_ROOT", server_root); */
-
- /* APACHE added */
- common_cgi_env[index++] = env_gen_extra("SERVER_ADMIN", server_admin, 0);
- common_cgi_env[index] = NULL;
-
- /* Sanity checking -- make *sure* the memory got allocated */
- if (index > COMMON_CGI_COUNT) {
- log_error_time();
- fprintf(stderr, "COMMON_CGI_COUNT not high enough.\n");
- exit(1);
- }
-
- for(i = 0;i < index;++i) {
- if (common_cgi_env[i] == NULL) {
- log_error_time();
- fprintf(stderr, "Unable to allocate a component of common_cgi_env - out of memory.\n");
- exit(1);
- }
- }
-}
-
-void clear_common_env(void)
-{
- int i;
-
- for(i = 0;i <= COMMON_CGI_COUNT;++i) {
- if (common_cgi_env[i] != NULL) {
- free(common_cgi_env[i]);
- common_cgi_env[i] = NULL;
- }
- }
-}
-
-/*
- * Name: env_gen_extra
- * (and via a not-so-tricky #define, env_gen)
- * This routine calls malloc: please free the memory when you are done
- */
-static char *env_gen_extra(const char *key, const char *value, int extra)
-{
- char *result;
- int key_len, value_len;
-
- if (value == NULL) /* ServerAdmin may not be defined, eg */
- value = "";
- key_len = strlen(key);
- value_len = strlen(value);
-
- /* leave room for '=' sign and null terminator */
- result = malloc(extra + key_len + value_len + 2);
- if (result) {
- memcpy(result + extra, key, key_len);
- *(result + extra + key_len) = '=';
- memcpy(result + extra + key_len + 1, value, value_len);
- *(result + extra + key_len + value_len + 1) = '\0';
- } else {
- log_error_time();
- perror("malloc");
- log_error_time();
- fprintf(stderr,
- "tried to allocate (key=value) extra=%d: %s=%s\n",
- extra, key, value);
- }
- return result;
-}
-
-/*
- * Name: add_cgi_env
- *
- * Description: adds a variable to CGI's environment
- * Used for HTTP_ headers
- */
-
-int add_cgi_env(request * req, char *key, char *value, int http_prefix)
-{
- char *p;
- int prefix_len;
-
- if (http_prefix) {
- prefix_len = 5;
- } else {
- prefix_len = 0;
- }
-
- if (req->cgi_env_index < CGI_ENV_MAX) {
- p = env_gen_extra(key, value, prefix_len);
- if (!p) {
- log_error_time();
- fprintf(stderr, "Unable to generate additional CGI Environment"
- "variable -- ran out of memory!\n");
- }
- if (prefix_len)
- memcpy(p, "HTTP_", 5);
- req->cgi_env[req->cgi_env_index++] = p;
- return 1;
- } else {
- log_error_time();
- fprintf(stderr, "Unable to generate additional CGI Environment"
- "variable -- not enough space!\n");
- }
- return 0;
-}
-
-#define my_add_cgi_env(req, key, value) { \
- int ok = add_cgi_env(req, key, value, 0); \
- if (!ok) return 0; \
- }
-
-/*
- * Name: complete_env
- *
- * Description: adds the known client header env variables
- * and terminates the environment array
- */
-
-int complete_env(request * req)
-{
- int i;
-
- for (i = 0; common_cgi_env[i]; i++)
- req->cgi_env[i] = common_cgi_env[i];
-
- {
- char *w;
- switch (req->method) {
- case M_POST:
- w = "POST";
- break;
- case M_HEAD:
- w = "HEAD";
- break;
- case M_GET:
- w = "GET";
- break;
- default:
- w = "UNKNOWN";
- break;
- }
- my_add_cgi_env(req, "REQUEST_METHOD", w);
- }
-
- my_add_cgi_env(req, "SERVER_ADDR", req->local_ip_addr);
- my_add_cgi_env(req, "SERVER_PROTOCOL", req->http_version);
- my_add_cgi_env(req, "REQUEST_URI", req->request_uri);
-
- if (req->path_info)
- my_add_cgi_env(req, "PATH_INFO", req->path_info);
-
- if (req->path_translated)
- /* while path_translated depends on path_info,
- * there are cases when path_translated might
- * not exist when path_info does
- */
- my_add_cgi_env(req, "PATH_TRANSLATED", req->path_translated);
-
- my_add_cgi_env(req, "SCRIPT_NAME", req->script_name);
-
- if (req->query_string)
- my_add_cgi_env(req, "QUERY_STRING", req->query_string);
- my_add_cgi_env(req, "REMOTE_ADDR", req->remote_ip_addr);
- my_add_cgi_env(req, "REMOTE_PORT", simple_itoa(req->remote_port));
-
- if (req->method == M_POST) {
- if (req->content_type) {
- my_add_cgi_env(req, "CONTENT_TYPE", req->content_type);
- } else {
- my_add_cgi_env(req, "CONTENT_TYPE", default_type);
- }
- if (req->content_length) {
- my_add_cgi_env(req, "CONTENT_LENGTH", req->content_length);
- }
- }
-#ifdef ACCEPT_ON
- if (req->accept[0])
- my_add_cgi_env(req, "HTTP_ACCEPT", req->accept);
-#endif
-
- if (req->cgi_env_index < CGI_ENV_MAX + 1) {
- req->cgi_env[req->cgi_env_index] = NULL; /* terminate */
- return 1;
- }
- log_error_time();
- fprintf(stderr, "Not enough space in CGI environment for remainder"\
- " of variables.\n");
- return 0;
-}
-
-/*
- * Name: make_args_cgi
- *
- * Build argv list for a CGI script according to spec
- *
- */
-
-void create_argv(request * req, char **aargv)
-{
- char *p, *q, *r;
- int aargc;
-
- q = req->query_string;
- aargv[0] = req->pathname;
-
- /* here, we handle a special "indexed" query string.
- * Taken from the CGI/1.1 SPEC:
- * This is identified by a GET or HEAD request with a query string
- * with no *unencoded* '=' in it.
- * For such a request, I'm supposed to parse the search string
- * into words, according to the following rules:
-
- search-string = search-word *( "+" search-word )
- search-word = 1*schar
- schar = xunreserved | escaped | xreserved
- xunreserved = alpha | digit | xsafe | extra
- xsafe = "$" | "-" | "_" | "."
- xreserved = ";" | "/" | "?" | ":" | "@" | "&"
-
- After parsing, each word is URL-decoded, optionally encoded in a system
- defined manner, and then the argument list
- is set to the list of words.
-
-
- Thus, schar is alpha|digit|"$"|"-"|"_"|"."|";"|"/"|"?"|":"|"@"|"&"
-
- As of this writing, escape.pl escapes the following chars:
-
- "-", "_", ".", "!", "~", "*", "'", "(", ")",
- "0".."9", "A".."Z", "a".."z",
- ";", "/", "?", ":", "@", "&", "=", "+", "\$", ","
-
- Which therefore means
- "=", "+", "~", "!", "*", "'", "(", ")", ","
- are *not* escaped and should be?
- Wait, we don't do any escaping, and nor should we.
- According to the RFC draft, we unescape and then re-escape
- in a "system defined manner" (here: none).
-
- The CGI/1.1 draft (03, latest is 1999???) is very unclear here.
-
- I am using the latest published RFC, 2396, for what does and does
- not need escaping.
-
- Since boa builds the argument list and does not call /bin/sh,
- (boa uses execve for CGI)
- */
-
- if (q && !strchr(q, '=')) {
- /* we have an 'index' style */
- q = strdup(q);
- if (!q) {
- WARN("unable to strdup 'q' in create_argv!");
- }
- for (aargc = 1; q && (aargc < CGI_ARGC_MAX);) {
- r = q;
- /* for an index-style CGI, + is used to seperate arguments
- * an escaped '+' is of no concern to us
- */
- if ((p = strchr(q, '+'))) {
- *p = '\0';
- q = p + 1;
- } else {
- q = NULL;
- }
- if (unescape_uri(r, NULL)) {
- /* printf("parameter %d: %s\n",aargc,r); */
- aargv[aargc++] = r;
- }
- }
- aargv[aargc] = NULL;
- } else {
- aargv[1] = NULL;
- }
-}
-
-/*
- * Name: init_cgi
- *
- * Description: Called for GET/POST requests that refer to ScriptAlias
- * directories or application/x-httpd-cgi files. Ties stdout to socket,
- * stdin to data if POST, and execs CGI.
- * stderr remains tied to our log file; is this good?
- *
- * Returns:
- * 0 - error or NPH, either way the socket is closed
- * 1 - success
- */
-
-int init_cgi(request * req)
-{
- int child_pid;
- int pipes[2];
- int use_pipes = 0;
-
- SQUASH_KA(req);
-
- if (req->is_cgi) {
- if (complete_env(req) == 0) {
- return 0;
- }
- }
-#ifdef FASCIST_LOGGING
- {
- int i;
- for (i = 0; i < req->cgi_env_index; ++i)
- fprintf(stderr, "%s - environment variable for cgi: \"%s\"\n",
- __FILE__, req->cgi_env[i]);
- }
-#endif
-
- if (req->is_cgi == CGI || 1) {
- use_pipes = 1;
- if (pipe(pipes) == -1) {
- log_error_time();
- perror("pipe");
- return 0;
- }
-
- /* set the read end of the socket to non-blocking */
- if (set_nonblock_fd(pipes[0]) == -1) {
- log_error_time();
- perror("cgi-fcntl");
- close(pipes[0]);
- close(pipes[1]);
- return 0;
- }
- }
-
- child_pid = vfork();
- switch(child_pid) {
- case -1:
- fprintf(stderr, "vfork failed \n");
-
- /* fork unsuccessful */
- log_error_time();
- perror("vfork");
-
- if (use_pipes) {
- close(pipes[0]);
- close(pipes[1]);
- }
- send_r_error(req);
- /* FIXME: There is aproblem here. send_r_error would work
- for NPH and CGI, but not for GUNZIP. Fix that. */
- /* i'd like to send_r_error, but.... */
- return 0;
- break;
- case 0:
- /* child */
- if (req->is_cgi == CGI || req->is_cgi == NPH) {
- char *foo = strdup(req->pathname);
- char *c;
-
- if (!foo) {
- WARN("unable to strdup pathname for req->pathname");
- _exit(1);
- }
- c = strrchr(foo, '/');
- if (c) {
- ++c;
- *c = '\0';
- } else {
- /* we have a serious problem */
- log_error_time();
- perror("chdir");
- if (use_pipes)
- close(pipes[1]);
- _exit(1);
- }
- if (chdir(foo) != 0) {
- log_error_time();
- perror("chdir");
- if (use_pipes)
- close(pipes[1]);
- _exit(1);
- }
- }
- if (use_pipes) {
- close(pipes[0]);
- /* tie cgi's STDOUT to it's write end of pipe */
- if (dup2(pipes[1], STDOUT_FILENO) == -1) {
- log_error_time();
- perror("dup2 - pipes");
- close(pipes[1]);
- _exit(1);
- }
- close(pipes[1]);
- if (set_block_fd(STDOUT_FILENO) == -1) {
- log_error_time();
- perror("cgi-fcntl");
- _exit(1);
- }
- } else {
- /* tie stdout to socket */
- if (dup2(req->fd, STDOUT_FILENO) == -1) {
- log_error_time();
- perror("dup2 - fd");
- _exit(1);
- }
- /* Switch socket flags back to blocking */
- if (set_block_fd(req->fd) == -1) {
- log_error_time();
- perror("cgi-fcntl");
- _exit(1);
- }
- }
- /* tie post_data_fd to POST stdin */
- if (req->method == M_POST) { /* tie stdin to file */
- lseek(req->post_data_fd, SEEK_SET, 0);
- dup2(req->post_data_fd, STDIN_FILENO);
- close(req->post_data_fd);
- }
- /* Close access log, so CGI program can't scribble
- * where it shouldn't
- */
- //close_access_log();
-
- /*
- * tie STDERR to cgi_log_fd
- * cgi_log_fd will automatically close, close-on-exec rocks!
- * if we don't tied STDERR (current log_error) to cgi_log_fd,
- * then we ought to close it.
- */
- if (!cgi_log_fd)
- dup2(devnullfd, STDERR_FILENO);
- else
- dup2(cgi_log_fd, STDERR_FILENO);
-
- if (req->is_cgi) {
- char *aargv[CGI_ARGC_MAX + 1];
- create_argv(req, aargv);
- execve(req->pathname, aargv, req->cgi_env);
- } else {
- if (req->pathname[strlen(req->pathname) - 1] == '/')
- execl(dirmaker, dirmaker, req->pathname, req->request_uri,
- NULL);
-#ifdef GUNZIP
- else
- execl(GUNZIP, GUNZIP, "--stdout", "--decompress",
- req->pathname, NULL);
-#endif
- }
- /* execve failed */
- WARN(req->pathname);
- _exit(1);
- break;
-
- default:
- /* parent */
- /* if here, fork was successful */
- if (verbose_cgi_logs) {
- log_error_time();
- fprintf(stderr, "Forked child \"%s\" pid %d\n",
- req->pathname, child_pid);
- }
-
- if (req->method == M_POST) {
- close(req->post_data_fd); /* child closed it too */
- req->post_data_fd = 0;
- }
-
- /* NPH, GUNZIP, etc... all go straight to the fd */
- if (!use_pipes)
- return 0;
-
- close(pipes[1]);
- req->data_fd = pipes[0];
-
- req->status = PIPE_READ;
- if (req->is_cgi == CGI) {
- req->cgi_status = CGI_PARSE; /* got to parse cgi header */
- /* for cgi_header... I get half the buffer! */
- req->header_line = req->header_end =
- (req->buffer + BUFFER_SIZE / 2);
- } else {
- req->cgi_status = CGI_BUFFER;
- /* I get all the buffer! */
- req->header_line = req->header_end = req->buffer;
- }
-
- /* reset req->filepos for logging (it's used in pipe.c) */
- /* still don't know why req->filesize might be reset though */
- req->filepos = 0;
- break;
- }
-
- return 1;
-}
diff --git a/linux-tools/boa-0.94.13/src/cgi_header.c b/linux-tools/boa-0.94.13/src/cgi_header.c
deleted file mode 100644
index c2ae3a6b7c..0000000000
--- a/linux-tools/boa-0.94.13/src/cgi_header.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Boa, an http server
- * cgi_header.c - cgi header parsing and control
- * Copyright (C) 1997-99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include "boa.h"
-
-/* process_cgi_header
-
-* returns 0 -=> error or HEAD, close down.
-* returns 1 -=> done processing
-* leaves req->cgi_status as WRITE
-*/
-
-/*
- The server MUST also resolve any conflicts between header fields returned by
- the script and header fields that it would otherwise send itself.
-
- ...
-
- At least one CGI-Field MUST be supplied, but no CGI field name may be used
- more than once in a response. If a body is supplied, then a
- "Content-type" header field MUST be supplied by the script,
- otherwise the script MUST send a "Location" or "Status" header
- field. If a Location CGI-Field is returned, then the script
- MUST NOT supply any HTTP-Fields.
- */
-
-/* TODO:
- We still need to cycle through the data before the end of the headers,
- line-by-line, and check for any problems with the CGI
- outputting overriding http responses, etc...
- */
-
-int process_cgi_header(request * req)
-{
- char *buf;
- char *c;
-
- if (req->cgi_status != CGI_DONE)
- req->cgi_status = CGI_BUFFER;
-
- buf = req->header_line;
-
- c = strstr(buf, "\n\r\n");
- if (c == NULL) {
- c = strstr(buf, "\n\n");
- if (c == NULL) {
- log_error_time();
- fputs("cgi_header: unable to find LFLF\n", stderr);
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "\"%s\"\n", buf);
-#endif
- send_r_bad_gateway(req);
- return 0;
- }
- }
- if (req->simple) {
- if (*(c + 1) == '\r')
- req->header_line = c + 2;
- else
- req->header_line = c + 1;
- return 1;
- }
- if (!strncasecmp(buf, "Status: ", 8)) {
- req->header_line--;
- memcpy(req->header_line, "HTTP/1.0 ", 9);
- } else if (!strncasecmp(buf, "Location: ", 10)) { /* got a location header */
-#ifdef FASCIST_LOGGING
-
- log_error_time();
- fprintf(stderr, "%s:%d - found Location header \"%s\"\n",
- __FILE__, __LINE__, buf + 10);
-#endif
-
-
- if (buf[10] == '/') { /* virtual path */
- log_error_time();
- fprintf(stderr,
- "server does not support internal redirection: " \
- "\"%s\"\n", buf + 10);
- send_r_bad_request(req);
-
- /*
- * We (I, Jon) have declined to support absolute-path parsing
- * because I see it as a major security hole.
- * Location: /etc/passwd or Location: /etc/shadow is not funny.
- *
- * Also, the below code is borked.
- * request_uri could contain /cgi-bin/bob/extra_path
- */
-
- /*
- strcpy(req->request_uri, buf + 10);
- return internal_redirect(req);
- */
- } else { /* URL */
- char *c2;
- c2 = strchr(buf + 10, '\n');
- /* c2 cannot ever equal NULL here because we already have found one */
-
- --c2;
- while (*c2 == '\r')
- --c2;
- ++c2;
- /* c2 now points to a '\r' or the '\n' */
- *c2++ = '\0'; /* end header */
-
- /* first next header, or is at req->header_end */
- while ((*c2 == '\n' || *c2 == '\r') && c2 < req->header_end)
- ++c2;
- if (c2 == req->header_end)
- send_r_moved_temp(req, buf + 10, "");
- else
- send_r_moved_temp(req, buf + 10, c2);
- }
- req->status = DONE;
- return 1;
- } else { /* not location and not status */
- char *dest;
- int howmuch;
- send_r_request_ok(req); /* does not terminate */
- /* got to do special things because
- a) we have a single buffer divided into 2 pieces
- b) we need to merge those pieces
- Easiest way is to memmove the cgi data backward until
- it touches the buffered data, then reset the cgi data pointers
- */
- dest = req->buffer + req->buffer_end;
- if (req->method == M_HEAD) {
- if (*(c + 1) == '\r')
- req->header_end = c + 2;
- else
- req->header_end = c + 1;
- req->cgi_status = CGI_DONE;
- }
- howmuch = req->header_end - req->header_line;
-
- if (dest + howmuch > req->buffer + BUFFER_SIZE) {
- /* big problem */
- log_error_time();
- fprintf(stderr, "Too much data to move! Aborting! %s %d\n",
- __FILE__, __LINE__);
- /* reset buffer pointers because we already called
- send_r_request_ok... */
- req->buffer_start = req->buffer_end = 0;
- send_r_error(req);
- return 0;
- }
- memmove(dest, req->header_line, howmuch);
- req->buffer_end += howmuch;
- req->header_line = req->buffer + req->buffer_end;
- req->header_end = req->header_line;
- req_flush(req);
- if (req->method == M_HEAD)
- return 0;
- }
- return 1;
-}
diff --git a/linux-tools/boa-0.94.13/src/check_struct_for.m4 b/linux-tools/boa-0.94.13/src/check_struct_for.m4
deleted file mode 100644
index 98940f610a..0000000000
--- a/linux-tools/boa-0.94.13/src/check_struct_for.m4
+++ /dev/null
@@ -1,40 +0,0 @@
-AC_DEFUN([AC_CHECK_STRUCT_FOR],[
-ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'`
-ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'`
-ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
-changequote(, )dnl
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-changequote([, ])dnl
-
-AC_MSG_CHECKING([for $2.$3])
-AC_CACHE_VAL($ac_safe_all,
-[
-if test "x$4" = "x"; then
- defineit="= 0"
-elif test "x$4" = "xno"; then
- defineit=""
-else
- defineit="$4"
-fi
-AC_TRY_COMPILE([
-$1
-],[
-struct $2 testit;
-testit.$3 $defineit;
-], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" )
-])
-
-if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
- AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED($ac_uc_define)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-dnl AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no])
-dnl 1.1 (2000/09/19)
-dnl Wes Hardaker <wjhardaker@ucdavis.edu>
-
-dnl ----------------------------------------------------------
-
diff --git a/linux-tools/boa-0.94.13/src/compat.h b/linux-tools/boa-0.94.13/src/compat.h
deleted file mode 100644
index 2833dc4a2f..0000000000
--- a/linux-tools/boa-0.94.13/src/compat.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1999-2000 Jon Nelson <jnelson@boa.org>
- * and Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: compat.h,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#ifndef _COMPAT_H
-#define _COMPAT_H
-
-#include "config.h"
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_SYS_FCNTL_H
-#include <sys/fcntl.h>
-#endif
-
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-
-#ifndef NI_MAXHOST
-#define NI_MAXHOST 20
-#endif
-
-#include <sys/socket.h>
-#ifndef SO_MAXCONN
-#define SO_MAXCONN 250
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 2048
-#endif
-
-/* Wild guess time, probably better done with configure */
-#ifdef O_NONBLOCK
-#define NOBLOCK O_NONBLOCK /* Linux */
-#else /* O_NONBLOCK */
-#ifdef O_NDELAY
-#define NOBLOCK O_NDELAY /* Sun */
-#else /* O_NDELAY */
-#error "Can't find a way to #define NOBLOCK"
-#endif /* O_NDELAY */
-#endif /* O_NONBLOCK */
-
-#ifndef MAP_FILE
-#define MAP_OPTIONS MAP_PRIVATE /* Sun */
-#else
-#define MAP_OPTIONS MAP_FILE|MAP_PRIVATE /* Linux */
-#endif
-
-#ifdef INET6
-#define SOCKADDR sockaddr_storage
-#define S_FAMILY __s_family
-#define SERVER_AF AF_INET6
-#else
-#define SOCKADDR sockaddr_in
-#define S_FAMILY sin_family
-#define SERVER_AF AF_INET
-#endif
-
-#if HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-#else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
-/* below here, functions are provided in extras */
-#ifndef HAVE_SCANDIR
-int
-scandir(const char *dir, struct dirent ***namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **));
-#endif
-
-#ifndef HAVE_ALPHASORT
-int alphasort(const struct dirent **a, const struct dirent **b);
-#endif
-
-#ifndef HAVE_STRSTR
-char *strstr(char *s1, char *s2);
-#endif
-
-#ifndef HAVE_STRDUP
-char *strdup(char *s);
-#endif
-
-#ifdef HAVE_TM_GMTOFF
-#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
-#else
-#define TIMEZONE_OFFSET(foo) timezone
-#endif
-
-#ifdef HAVE_TM_ZONE
-#define TIMEZONE(foo) foo##->tm_zone
-#else
-#define TIMEZONE(foo) *tzname
-#endif
-
-#ifdef HAVE_LIBDMALLOC
-#define DMALLOC_FUNC_CHECK
-#include <dmalloc.h>
-#endif
-
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
-
-#endif
diff --git a/linux-tools/boa-0.94.13/src/config.c b/linux-tools/boa-0.94.13/src/config.c
deleted file mode 100644
index 58423fe833..0000000000
--- a/linux-tools/boa-0.94.13/src/config.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1999 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: config.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-#include "y.tab.h"
-#include "parse.h"
-
-int yyparse(void); /* Better match the output of lex */
-
-#ifdef DEBUG
-#define DBG(x) x
-#else
-#define DBG(x)
-#endif
-
-int server_port;
-uid_t server_uid;
-gid_t server_gid;
-char *server_root;
-char *server_name;
-char *server_admin;
-char *server_ip;
-int virtualhost;
-long int max_connections;
-
-char *document_root;
-char *user_dir;
-char *directory_index;
-char *default_type;
-char *dirmaker;
-char *cachedir;
-
-char *tempdir;
-
-char *cgi_path = NULL;
-int single_post_limit = SINGLE_POST_LIMIT_DEFAULT;
-
-int ka_timeout;
-int ka_max;
-
-/* These came from log.c */
-char *error_log_name;
-char *access_log_name;
-char *cgi_log_name;
-
-int use_localtime;
-
-/* These are new */
-static void c_set_user(char *v1, char *v2, void *t);
-static void c_set_group(char *v1, char *v2, void *t);
-static void c_set_string(char *v1, char *v2, void *t);
-static void c_set_int(char *v1, char *v2, void *t);
-static void c_set_unity(char *v1, char *v2, void *t);
-static void c_add_type(char *v1, char *v2, void *t);
-static void c_add_alias(char *v1, char *v2, void *t);
-
-/* Fakery to keep the value passed to action() a void *,
- see usage in table and c_add_alias() below */
-static int script_number = SCRIPTALIAS;
-static int redirect_number = REDIRECT;
-static int alias_number = ALIAS;
-static uid_t current_uid=0;
-
-/* Help keep the table below compact */
-#define S0A STMT_NO_ARGS
-#define S1A STMT_ONE_ARG
-#define S2A STMT_TWO_ARGS
-
-struct ccommand clist[] = {
- {"Port", S1A, c_set_int, &server_port},
- {"Listen", S1A, c_set_string, &server_ip},
- {"BackLog", S1A, c_set_int, &backlog},
- {"User", S1A, c_set_user, NULL},
- {"Group", S1A, c_set_group, NULL},
- {"ServerAdmin", S1A, c_set_string, &server_admin},
- {"ServerRoot", S1A, c_set_string, &server_root},
- {"ErrorLog", S1A, c_set_string, &error_log_name},
- {"AccessLog", S1A, c_set_string, &access_log_name},
- {"UseLocaltime", S0A, c_set_unity, &use_localtime},
- {"CgiLog", S1A, c_set_string, &cgi_log_name},
- {"VerboseCGILogs", S0A, c_set_unity, &verbose_cgi_logs},
- {"ServerName", S1A, c_set_string, &server_name},
- {"VirtualHost", S0A, c_set_unity, &virtualhost},
- {"DocumentRoot", S1A, c_set_string, &document_root},
- {"UserDir", S1A, c_set_string, &user_dir},
- {"DirectoryIndex", S1A, c_set_string, &directory_index},
- {"DirectoryMaker", S1A, c_set_string, &dirmaker},
- {"DirectoryCache", S1A, c_set_string, &cachedir},
- {"KeepAliveMax", S1A, c_set_int, &ka_max},
- {"KeepAliveTimeout", S1A, c_set_int, &ka_timeout},
- {"MimeTypes", S1A, c_set_string, &mime_types},
- {"DefaultType", S1A, c_set_string, &default_type},
- {"AddType", S2A, c_add_type, NULL},
- {"ScriptAlias", S2A, c_add_alias, &script_number},
- {"Redirect", S2A, c_add_alias, &redirect_number},
- {"Alias", S2A, c_add_alias, &alias_number},
- {"SinglePostLimit", S1A, c_set_int, &single_post_limit},
- {"CGIPath", S1A, c_set_string, &cgi_path},
- {"MaxConnections", S1A, c_set_int, &max_connections},
-};
-
-static void c_set_user(char *v1, char *v2, void *t)
-{
- struct passwd *passwdbuf;
- char *endptr;
- int i;
-
- DBG(printf("User %s = ", v1);
- )
- i = strtol(v1, &endptr, 0);
- if (*v1 != '\0' && *endptr == '\0') {
- server_uid = i;
- } else {
- passwdbuf = getpwnam(v1);
- if (!passwdbuf) {
- if (current_uid)
- return;
- fprintf(stderr, "No such user: %s\n", v1);
- exit(1);
- }
- server_uid = passwdbuf->pw_uid;
- }
- DBG(printf("%d\n", server_uid);
- )
-}
-
-static void c_set_group(char *v1, char *v2, void *t)
-{
- struct group *groupbuf;
- char *endptr;
- int i;
- DBG(printf("Group %s = ", v1);
- )
- i = strtol(v1, &endptr, 0);
- if (*v1 != '\0' && *endptr == '\0') {
- server_gid = i;
- } else {
- groupbuf = getgrnam(v1);
- if (!groupbuf) {
- if (current_uid)
- return;
- fprintf(stderr, "No such group: %s\n", v1);
- exit(1);
- }
- server_gid = groupbuf->gr_gid;
- }
- DBG(printf("%d\n", server_gid);
- )
-}
-
-static void c_set_string(char *v1, char *v2, void *t)
-{
- char *s;
- DBG(printf("Setting pointer %p to string %s ..", t, v1);
- )
- if (t) {
- s = *(char **) t;
- if (s)
- free(s);
- *(char **) t = strdup(v1);
- if (!*(char **) t) {
- DIE("Unable to strdup in c_set_string");
- }
- DBG(printf("done.\n");
- )
- } else {
- DBG(printf("skipped.\n");
- )
- }
-}
-
-static void c_set_int(char *v1, char *v2, void *t)
-{
- char *endptr;
- int i;
- DBG(printf("Setting pointer %p to integer string %s ..", t, v1);
- )
- if (t) {
- i = strtol(v1, &endptr, 0); /* Automatic base 10/16/8 switching */
- if (*v1 != '\0' && *endptr == '\0') {
- *(int *) t = i;
- DBG(printf(" Integer converted as %d, done\n", i);
- )
- } else {
- /* XXX should tell line number to user */
- fprintf(stderr, "Error: %s found where integer expected\n",
- v1);
- }
- } else {
- DBG(printf("skipped.\n");
- )
- }
-}
-
-static void c_set_unity(char *v1, char *v2, void *t)
-{
- DBG(printf("Setting pointer %p to unity\n", t);
- )
- if (t)
- *(int *) t = 1;
-}
-
-static void c_add_type(char *v1, char *v2, void *t)
-{
- add_mime_type(v1, v2);
-}
-
-static void c_add_alias(char *v1, char *v2, void *t)
-{
- add_alias(v2, v1, *(int *) t);
-}
-
-struct ccommand *lookup_keyword(char *c)
-{
- struct ccommand *p;
- DBG(printf("Checking string '%s' against keyword list\n", c);
- )
- for (p = clist;
- p < clist + (sizeof (clist) / sizeof (struct ccommand)); p++) {
- if (strcmp(c, p->name) == 0)
- return p;
- }
- return NULL;
-}
-
-/*
- * Name: read_config_files
- *
- * Description: Reads config files via yyparse, then makes sure that
- * all required variables were set properly.
- */
-void read_config_files(void)
-{
- char *temp;
- current_uid = getuid();
- yyin = fopen("boa.conf", "r");
-
- if (!yyin) {
- fputs("Could not open boa.conf for reading.\n", stderr);
- exit(1);
- }
- if (yyparse()) {
- fputs("Error parsing config files, exiting\n", stderr);
- exit(1);
- }
-
- if (!server_name) {
- struct hostent *he;
- char temp_name[100];
-
- if (gethostname(temp_name, 100) == -1) {
- perror("gethostname:");
- exit(1);
- }
-
- he = gethostbyname(temp_name);
- if (he == NULL) {
- perror("gethostbyname:");
- exit(1);
- }
-
- server_name = strdup(he->h_name);
- if (server_name == NULL) {
- perror("strdup:");
- exit(1);
- }
- }
- tempdir = getenv("TMP");
- if (tempdir == NULL)
- tempdir = "/tmp";
-
- if (single_post_limit < 0) {
- fprintf(stderr, "Invalid value for single_post_limit: %d\n",
- single_post_limit);
- exit(1);
- }
-
- if (document_root) {
- temp = normalize_path(document_root);
- free(document_root);
- document_root = temp;
- }
-
- if (error_log_name) {
- temp = normalize_path(error_log_name);
- free(error_log_name);
- error_log_name = temp;
- }
-
- if (access_log_name) {
- temp = normalize_path(access_log_name);
- free(access_log_name);
- access_log_name = temp;
- }
-
- if (cgi_log_name) {
- temp = normalize_path(cgi_log_name);
- free(cgi_log_name);
- cgi_log_name = temp;
- }
-
- if (dirmaker) {
- temp = normalize_path(dirmaker);
- free(dirmaker);
- dirmaker = temp;
- }
-
-#if 0
- if (mime_types) {
- temp = normalize_path(mime_types);
- free(mime_types);
- mime_types = temp;
- }
-#endif
-}
diff --git a/linux-tools/boa-0.94.13/src/config.h.in b/linux-tools/boa-0.94.13/src/config.h.in
deleted file mode 100644
index f7efdc49a9..0000000000
--- a/linux-tools/boa-0.94.13/src/config.h.in
+++ /dev/null
@@ -1,117 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef gid_t
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define if your struct tm has tm_zone. */
-#undef HAVE_TM_ZONE
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef pid_t
-
-/* Define if the setvbuf function takes the buffering type as its second
- argument and the buffer pointer as the third, as on System V
- before release 3. */
-#undef SETVBUF_REVERSED
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef uid_t
-
-/* define if GUNZIP found */
-#undef GUNZIP
-
-/* sockaddr_in has sin_len member */
-#undef HAVE_SIN_LEN
-
-/* if struct tm has tm_gmtoff structure */
-#undef HAVE_TM_GMTOFF
-
-/* if struct tm has tm_zone structure */
-#undef HAVE_TM_ZONE
-
-/* Define if you have the alphasort function. */
-#undef HAVE_ALPHASORT
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the gethostbyname function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* Define if you have the gethostname function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the inet_aton function. */
-#undef HAVE_INET_ATON
-
-/* Define if you have the scandir function. */
-#undef HAVE_SCANDIR
-
-/* Define if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define if you have the socket function. */
-#undef HAVE_SOCKET
-
-/* Define if you have the strdup function. */
-#undef HAVE_STRDUP
-
-/* Define if you have the strstr function. */
-#undef HAVE_STRSTR
-
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
-
-/* Define if you have the <sys/dir.h> header file. */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <sys/fcntl.h> header file. */
-#undef HAVE_SYS_FCNTL_H
-
-/* Define if you have the <sys/ndir.h> header file. */
-#undef HAVE_SYS_NDIR_H
-
-/* Define if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the dmalloc library (-ldmalloc). */
-#undef HAVE_LIBDMALLOC
-
-/* Define if you have the efence library (-lefence). */
-#undef HAVE_LIBEFENCE
diff --git a/linux-tools/boa-0.94.13/src/configure b/linux-tools/boa-0.94.13/src/configure
deleted file mode 100644
index bda829fac7..0000000000
--- a/linux-tools/boa-0.94.13/src/configure
+++ /dev/null
@@ -1,2971 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-profiling Compile and link profiling code"
-ac_help="$ac_help
- --disable-debug Compile and link debugging code"
-ac_help="$ac_help
- --with-dmalloc link with the Dmalloc memory debugger/profiler"
-ac_help="$ac_help
- --with-efence link with the Electric Fence memory debugger "
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=boa.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-# Extract the first word of "gunzip", so it can be a program name with args.
-set dummy gunzip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:537: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GUNZIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$GUNZIP" in
- /*)
- ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GUNZIP="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-fi
-GUNZIP="$ac_cv_path_GUNZIP"
-if test -n "$GUNZIP"; then
- echo "$ac_t""$GUNZIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-cat >> confdefs.h <<EOF
-#define GUNZIP "$ac_cv_path_GUNZIP"
-EOF
-
-
-# Extract the first word of "flex", so it can be a program name with args.
-set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:577: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LEX"; then
- ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LEX="flex"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
-fi
-fi
-LEX="$ac_cv_prog_LEX"
-if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$LEXLIB"
-then
- case "$LEX" in
- flex*) ac_lib=fl ;;
- *) ac_lib=l ;;
- esac
- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:611: checking for yywrap in -l$ac_lib" >&5
-ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-l$ac_lib $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 619 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap();
-
-int main() {
-yywrap()
-; return 0; }
-EOF
-if { (eval echo configure:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LEXLIB="-l$ac_lib"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-for ac_prog in 'bison -y' byacc
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:657: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_YACC="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:690: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:720: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:771: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 814 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:845: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:850: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:878: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:910: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 925 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 942 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 959 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:990: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1025: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1030 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:1038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1063: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1071 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1104: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1112 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1146: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1151 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1176 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1194 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 1215 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1250: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1255 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_sys_wait_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
-if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_WAIT_H 1
-EOF
-
-fi
-
-for ac_hdr in fcntl.h sys/fcntl.h limits.h sys/time.h sys/select.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1295: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1300 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in getopt.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1335: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1340 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1373: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1378 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1448: checking for uid_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1453 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_uid_t=yes
-else
- rm -rf conftest*
- ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_type_uid_t" 1>&6
-if test $ac_cv_type_uid_t = no; then
- cat >> confdefs.h <<\EOF
-#define uid_t int
-EOF
-
- cat >> confdefs.h <<\EOF
-#define gid_t int
-EOF
-
-fi
-
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1482: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1487 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_pid_t=yes
-else
- rm -rf conftest*
- ac_cv_type_pid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1515: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1520 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:1529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-
-echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
-echo "configure:1551: checking whether setvbuf arguments are reversed" >&5
-if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
- cat > conftest.$ac_ext <<EOF
-#line 1559 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-/* If setvbuf has the reversed format, exit 0. */
-main () {
- /* This call has the arguments reversed.
- A reversed system may check and see that the address of main
- is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
- if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
- exit(1);
- putc('\r', stdout);
- exit(0); /* Non-reversed systems segv here. */
-}
-EOF
-if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_setvbuf_reversed=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_setvbuf_reversed=no
-fi
-rm -fr conftest*
-fi
-
-rm -f core core.* *.core
-fi
-
-echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
-if test $ac_cv_func_setvbuf_reversed = yes; then
- cat >> confdefs.h <<\EOF
-#define SETVBUF_REVERSED 1
-EOF
-
-fi
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1600: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1605 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1639: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1644 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1692: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 1700 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
-}
-
-EOF
-if { (eval echo configure:1840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-for ac_func in getcwd strdup strstr
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1865: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1870 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in gethostname gethostbyname select socket inet_aton
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1920: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1925 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in scandir alphasort
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1975: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1980 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-ac_safe_struct=`echo "tm" | sed 'y%./+-%__p_%'`
-ac_safe_member=`echo "tm_gmtoff" | sed 'y%./+-%__p_%'`
-ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-
-echo $ac_n "checking for tm.tm_gmtoff""... $ac_c" 1>&6
-echo "configure:2035: checking for tm.tm_gmtoff" >&5
-if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-if test "x" = "x"; then
- defineit="= 0"
-elif test "x" = "xno"; then
- defineit=""
-else
- defineit=""
-fi
-cat > conftest.$ac_ext <<EOF
-#line 2048 "configure"
-#include "confdefs.h"
-
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-
-int main() {
-
-struct tm testit;
-testit.tm_gmtoff $defineit;
-
-; return 0; }
-EOF
-if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "${ac_safe_all}=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "${ac_safe_all}=no"
-fi
-rm -f conftest*
-
-fi
-
-
-if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define $ac_uc_define 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test "$ac_cv_struct_tm_has_tm_gmtoff" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_TM_GMTOFF 1
-EOF
-
-fi
-
-
-ac_safe_struct=`echo "tm" | sed 'y%./+-%__p_%'`
-ac_safe_member=`echo "tm_zone" | sed 'y%./+-%__p_%'`
-ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-
-echo $ac_n "checking for tm.tm_zone""... $ac_c" 1>&6
-echo "configure:2110: checking for tm.tm_zone" >&5
-if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-if test "x" = "x"; then
- defineit="= 0"
-elif test "x" = "xno"; then
- defineit=""
-else
- defineit=""
-fi
-cat > conftest.$ac_ext <<EOF
-#line 2123 "configure"
-#include "confdefs.h"
-
-
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-
-int main() {
-
-struct tm testit;
-testit.tm_zone $defineit;
-
-; return 0; }
-EOF
-if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "${ac_safe_all}=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "${ac_safe_all}=no"
-fi
-rm -f conftest*
-
-fi
-
-
-if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define $ac_uc_define 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test "$ac_cv_struct_tm_has_tm_zone" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_TM_ZONE 1
-EOF
-
-fi
-
-
-ac_safe_struct=`echo "sockaddr_in" | sed 'y%./+-%__p_%'`
-ac_safe_member=`echo "sin_len" | sed 'y%./+-%__p_%'`
-ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
- ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-
-echo $ac_n "checking for sockaddr_in.sin_len""... $ac_c" 1>&6
-echo "configure:2186: checking for sockaddr_in.sin_len" >&5
-if eval "test \"`echo '$''{'$ac_safe_all'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-if test "x" = "x"; then
- defineit="= 0"
-elif test "x" = "xno"; then
- defineit=""
-else
- defineit=""
-fi
-cat > conftest.$ac_ext <<EOF
-#line 2199 "configure"
-#include "confdefs.h"
-
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-
-int main() {
-
-struct sockaddr_in testit;
-testit.sin_len $defineit;
-
-; return 0; }
-EOF
-if { (eval echo configure:2214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "${ac_safe_all}=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "${ac_safe_all}=no"
-fi
-rm -f conftest*
-
-fi
-
-
-if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define $ac_uc_define 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test "$ac_cv_struct_sockaddr_in_has_sin_len" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SIN_LEN 1
-EOF
-
-fi
-
-if test $ac_cv_func_socket = no; then
- # socket is not in the default libraries.
- echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2249: checking for socket in -lsocket" >&5
-ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2257 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char socket();
-
-int main() {
-socket()
-; return 0; }
-EOF
-if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- MYLIBS="$MYLIBS -lsocket"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-if test $ac_cv_func_inet_aton = no; then
- # inet_aton is not in the default libraries.
- echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:2293: checking for inet_aton in -lresolv" >&5
-ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lresolv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2301 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char inet_aton();
-
-int main() {
-inet_aton()
-; return 0; }
-EOF
-if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- MYLIBS="$MYLIBS -lresolv"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-if test $ac_cv_func_gethostname = no; then
- echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:2336: checking for gethostname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostname();
-
-int main() {
-gethostname()
-; return 0; }
-EOF
-if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- MYLIBS="$MYLIBS -lnsl"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-if test $ac_cv_func_gethostbyname = no; then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2379: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2387 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- MYLIBS="$MYLIBS -lnsl"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-LIBS="$LIBS $MYLIBS"
-
-if test $ac_cv_func_scandir = no; then
- # scandir not defined, add it
- SCANDIR="scandir.o"
-fi
-
-if test $ac_cv_func_alphasort = no; then
- # alphasort not defined, add it
- ALPHASORT="alphasort.o"
-fi
-
-if test $ac_cv_func_strdup = no -o $ac_cv_func_strstr = no; then
- # strdup or strstr not defined
- STRUTIL="strutil.o"
-fi
-
-if test -n "$GCC"; then
- test -n "$GCC" && CFLAGS="$CFLAGS -pipe"
-
- echo $ac_n "checking compile and link profiling code""... $ac_c" 1>&6
-echo "configure:2441: checking compile and link profiling code" >&5
- # Check whether --enable-profiling or --disable-profiling was given.
-if test "${enable_profiling+set}" = set; then
- enableval="$enable_profiling"
-
- if test "$enableval" = "yes" ; then
- echo "$ac_t""yes" 1>&6
- CFLAGS="$CFLAGS -pg"
- LDFLAGS="$LDFLAGS -g -pg"
- else
- echo "$ac_t""no" 1>&6
- fi
-
-else
-
- echo "$ac_t""no" 1>&6
-
-fi
-
-fi
-
-echo $ac_n "checking whether to compile and link debugging code""... $ac_c" 1>&6
-echo "configure:2463: checking whether to compile and link debugging code" >&5
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
- enableval="$enable_debug"
-
- if test "$enableval" = "yes" ; then
- echo "$ac_t""yes" 1>&6
- LDFLAGS="$LDFLAGS -g"
- test -n "$GCC" && CFLAGS="$CFLAGS -Wall"
- else
- echo "$ac_t""no" 1>&6
- fi
-
-else
-
- echo "$ac_t""yes" 1>&6
- LDFLAGS="$LDFLAGS -g"
- test -n "$GCC" && CFLAGS="$CFLAGS -Wall"
-
-fi
-
-
-echo $ac_n "checking whether to link with the Dmalloc memory debugger/profiler""... $ac_c" 1>&6
-echo "configure:2486: checking whether to link with the Dmalloc memory debugger/profiler" >&5
-# Check whether --with-dmalloc or --without-dmalloc was given.
-if test "${with_dmalloc+set}" = set; then
- withval="$with_dmalloc"
-
- if test "$withval" = "yes"; then
- echo "$ac_t""trying" 1>&6
- echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
-echo "configure:2494: checking for dmalloc_shutdown in -ldmalloc" >&5
-ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldmalloc $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dmalloc_shutdown();
-
-int main() {
-dmalloc_shutdown()
-; return 0; }
-EOF
-if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-ldmalloc $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- echo "$ac_t""no" 1>&6
- fi
-
-else
-
- echo "$ac_t""no" 1>&6
-
-fi
-
-
-echo $ac_n "checking whether to link with the Electric Fence memory debugger""... $ac_c" 1>&6
-echo "configure:2552: checking whether to link with the Electric Fence memory debugger" >&5
-# Check whether --with-efence or --without-efence was given.
-if test "${with_efence+set}" = set; then
- withval="$with_efence"
-
- if test "$withval" = "yes"; then
- echo "$ac_t""trying" 1>&6
- echo $ac_n "checking for main in -lefence""... $ac_c" 1>&6
-echo "configure:2560: checking for main in -lefence" >&5
-ac_lib_var=`echo efence'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lefence $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2568 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo efence | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lefence $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- echo "$ac_t""no" 1>&6
- fi
-
-else
-
- echo "$ac_t""no" 1>&6
-
-fi
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@GUNZIP@%$GUNZIP%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
-s%@YACC@%$YACC%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@STRUTIL@%$STRUTIL%g
-s%@ALPHASORT@%$ALPHASORT%g
-s%@SCANDIR@%$SCANDIR%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/linux-tools/boa-0.94.13/src/configure.in b/linux-tools/boa-0.94.13/src/configure.in
deleted file mode 100644
index 0e95415798..0000000000
--- a/linux-tools/boa-0.94.13/src/configure.in
+++ /dev/null
@@ -1,196 +0,0 @@
-dnl $Id: configure.in,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(boa.c)
-
-dnl Look for gunzip
-AC_PATH_PROG(GUNZIP, gunzip)
-AC_DEFINE_UNQUOTED(GUNZIP, "$ac_cv_path_GUNZIP")
-
-dnl Checks for programs.
-AC_PROG_LEX
-AC_PROG_YACC
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_MAKE_SET
-
-dnl Checks for libraries.
-
-dnl Make config.h
-AC_CONFIG_HEADER(config.h)
-
-dnl Checks for header files.
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h sys/fcntl.h limits.h sys/time.h sys/select.h)
-AC_CHECK_HEADERS(getopt.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_UID_T
-AC_TYPE_PID_T
-AC_HEADER_TIME
-
-dnl Checks for library functions.
-AC_FUNC_SETVBUF_REVERSED
-AC_FUNC_MMAP
-AC_CHECK_FUNCS(getcwd strdup strstr)
-AC_CHECK_FUNCS(gethostname gethostbyname select socket inet_aton)
-AC_CHECK_FUNCS(scandir alphasort)
-
-AC_CHECK_STRUCT_FOR([
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-],tm,tm_gmtoff)
-
-if test "$ac_cv_struct_tm_has_tm_gmtoff" = "yes"; then
- AC_DEFINE(HAVE_TM_GMTOFF)
-fi
-
-AC_CHECK_STRUCT_FOR([
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-],tm,tm_zone)
-
-if test "$ac_cv_struct_tm_has_tm_zone" = "yes"; then
- AC_DEFINE(HAVE_TM_ZONE)
-fi
-
-AC_CHECK_STRUCT_FOR([
-#include <sys/types.h>
-#include <netinet/in.h>
-],sockaddr_in,sin_len)
-
-if test "$ac_cv_struct_sockaddr_in_has_sin_len" = "yes"; then
- AC_DEFINE(HAVE_SIN_LEN)
-fi
-
-if test $ac_cv_func_socket = no; then
- # socket is not in the default libraries.
- AC_CHECK_LIB(socket, socket,
- [ MYLIBS="$MYLIBS -lsocket" ])
-fi
-
-if test $ac_cv_func_inet_aton = no; then
- # inet_aton is not in the default libraries.
- AC_CHECK_LIB(resolv, inet_aton, MYLIBS="$MYLIBS -lresolv")
-fi
-
-if test $ac_cv_func_gethostname = no; then
- AC_CHECK_LIB(nsl, gethostname, MYLIBS="$MYLIBS -lnsl")
-fi
-
-dnl May end up with duplicate -lnsl -- oh well
-if test $ac_cv_func_gethostbyname = no; then
- AC_CHECK_LIB(nsl, gethostbyname, MYLIBS="$MYLIBS -lnsl")
-fi
-
-LIBS="$LIBS $MYLIBS"
-
-if test $ac_cv_func_scandir = no; then
- # scandir not defined, add it
- SCANDIR="scandir.o"
-fi
-
-if test $ac_cv_func_alphasort = no; then
- # alphasort not defined, add it
- ALPHASORT="alphasort.o"
-fi
-
-if test $ac_cv_func_strdup = no -o $ac_cv_func_strstr = no; then
- # strdup or strstr not defined
- STRUTIL="strutil.o"
-fi
-
-if test -n "$GCC"; then
- dnl if we are running gcc, use -pipe
- test -n "$GCC" && CFLAGS="$CFLAGS -pipe"
-
- AC_MSG_CHECKING(compile and link profiling code)
- AC_ARG_ENABLE(profiling,
- [ --enable-profiling Compile and link profiling code],
- [
- if test "$enableval" = "yes" ; then
- AC_MSG_RESULT(yes)
- CFLAGS="$CFLAGS -pg"
- LDFLAGS="$LDFLAGS -g -pg"
- else
- AC_MSG_RESULT(no)
- fi
- ],
- [
- AC_MSG_RESULT(no)
- ])
-fi
-
-AC_MSG_CHECKING(whether to compile and link debugging code)
-AC_ARG_ENABLE(debug,
-[ --disable-debug Compile and link debugging code],
-[
- if test "$enableval" = "yes" ; then
- AC_MSG_RESULT(yes)
- LDFLAGS="$LDFLAGS -g"
- test -n "$GCC" && CFLAGS="$CFLAGS -Wall"
- else
- AC_MSG_RESULT(no)
- fi
-],
-[
- AC_MSG_RESULT(yes)
- LDFLAGS="$LDFLAGS -g"
- test -n "$GCC" && CFLAGS="$CFLAGS -Wall"
-])
-
-AC_MSG_CHECKING(whether to link with the Dmalloc memory debugger/profiler)
-AC_ARG_WITH(dmalloc,
-[ --with-dmalloc link with the Dmalloc memory debugger/profiler],
-[
- if test "$withval" = "yes"; then
- AC_MSG_RESULT(trying)
- AC_CHECK_LIB(dmalloc, dmalloc_shutdown)
- else
- AC_MSG_RESULT(no)
- fi
-],
-[
- AC_MSG_RESULT(no)
-])
-
-AC_MSG_CHECKING(whether to link with the Electric Fence memory debugger)
-AC_ARG_WITH(efence,
-[ --with-efence link with the Electric Fence memory debugger ],
-[
- if test "$withval" = "yes"; then
- AC_MSG_RESULT(trying)
- AC_CHECK_LIB(efence, main)
- else
- AC_MSG_RESULT(no)
- fi
-],
-[
- AC_MSG_RESULT(no)
-])
-
-dnl For anything that wasn't found but we have source for
-AC_SUBST(STRUTIL)
-AC_SUBST(ALPHASORT)
-AC_SUBST(SCANDIR)
-
-AC_OUTPUT(Makefile)
diff --git a/linux-tools/boa-0.94.13/src/defines.h b/linux-tools/boa-0.94.13/src/defines.h
deleted file mode 100644
index 7b4bd1ebcc..0000000000
--- a/linux-tools/boa-0.94.13/src/defines.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1997 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: defines.h,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#ifndef _DEFINES_H
-#define _DEFINES_H
-
-/***** Change this, or use -c on the command line to specify it *****/
-
-#ifndef SERVER_ROOT
-#define SERVER_ROOT "/etc/boa"
-#endif
-
-/***** Change this via the CGIPath configuration value in boa.conf *****/
-#define DEFAULT_PATH "/bin:/usr/bin:/usr/local/bin"
-
-/***** Change this via the SinglePostLimit configuration value in boa.conf *****/
-#define SINGLE_POST_LIMIT_DEFAULT 1024 * 1024 /* 1 MB */
-
-/***** Various stuff that you may want to tweak, but probably shouldn't *****/
-
-#define SOCKETBUF_SIZE 8192
-#define MAX_HEADER_LENGTH 1024
-#define CLIENT_STREAM_SIZE SOCKETBUF_SIZE
-#define BUFFER_SIZE CLIENT_STREAM_SIZE
-
-#define MIME_HASHTABLE_SIZE 47
-#define ALIAS_HASHTABLE_SIZE 17
-#define PASSWD_HASHTABLE_SIZE 47
-
-#define REQUEST_TIMEOUT 60
-
-#define CGI_MIME_TYPE "application/x-httpd-cgi"
-
-/***** CHANGE ANYTHING BELOW THIS LINE AT YOUR OWN PERIL *****/
-/***** You will probably introduce buffer overruns unless you know
- what you are doing *****/
-
-#define MAX_SITENAME_LENGTH 256
-#define MAX_LOG_LENGTH MAX_HEADER_LENGTH + 1024
-#define MAX_FILE_LENGTH NAME_MAX
-#define MAX_PATH_LENGTH PATH_MAX
-
-#ifdef ACCEPT_ON
-#define MAX_ACCEPT_LENGTH MAX_HEADER_LENGTH
-#else
-#define MAX_ACCEPT_LENGTH 0
-#endif
-
-#ifndef SERVER_VERSION
-#define SERVER_VERSION "Boa/0.94.13"
-#endif
-
-#define CGI_VERSION "CGI/1.1"
-#define COMMON_CGI_COUNT 6
-#define CGI_ENV_MAX 50
-#define CGI_ARGC_MAX 128
-
-/******************* RESPONSE CLASSES *****************/
-
-#define R_INFORMATIONAL 1
-#define R_SUCCESS 2
-#define R_REDIRECTION 3
-#define R_CLIENT_ERROR 4
-#define R_SERVER_ERROR 5
-
-/******************* RESPONSE CODES ******************/
-
-#define R_REQUEST_OK 200
-#define R_CREATED 201
-#define R_ACCEPTED 202
-#define R_PROVISIONAL 203 /* provisional information */
-#define R_NO_CONTENT 204
-
-#define R_MULTIPLE 300 /* multiple choices */
-#define R_MOVED_PERM 301
-#define R_MOVED_TEMP 302
-#define R_NOT_MODIFIED 304
-
-#define R_BAD_REQUEST 400
-#define R_UNAUTHORIZED 401
-#define R_PAYMENT 402 /* payment required */
-#define R_FORBIDDEN 403
-#define R_NOT_FOUND 404
-#define R_METHOD_NA 405 /* method not allowed */
-#define R_NONE_ACC 406 /* none acceptable */
-#define R_PROXY 407 /* proxy authentication required */
-#define R_REQUEST_TO 408 /* request timeout */
-#define R_CONFLICT 409
-#define R_GONE 410
-
-#define R_ERROR 500 /* internal server error */
-#define R_NOT_IMP 501 /* not implemented */
-#define R_BAD_GATEWAY 502
-#define R_SERVICE_UNAV 503 /* service unavailable */
-#define R_GATEWAY_TO 504 /* gateway timeout */
-#define R_BAD_VERSION 505
-
-/****************** METHODS *****************/
-
-#define M_GET 1
-#define M_HEAD 2
-#define M_PUT 3
-#define M_POST 4
-#define M_DELETE 5
-#define M_LINK 6
-#define M_UNLINK 7
-
-/************** REQUEST STATUS (req->status) ***************/
-
-#define READ_HEADER 0
-#define ONE_CR 1
-#define ONE_LF 2
-#define TWO_CR 3
-#define BODY_READ 4
-#define BODY_WRITE 5
-#define WRITE 6
-#define PIPE_READ 7
-#define PIPE_WRITE 8
-#define DONE 9
-#define DEAD 10
-
-/************** CGI TYPE (req->is_cgi) ******************/
-
-#define CGI 1
-#define NPH 2
-
-/************* ALIAS TYPES (aliasp->type) ***************/
-
-#define ALIAS 0
-#define SCRIPTALIAS 1
-#define REDIRECT 2
-
-/*********** KEEPALIVE CONSTANTS (req->keepalive) *******/
-
-#define KA_INACTIVE 0
-#define KA_STOPPED 1
-#define KA_ACTIVE 2
-
-/********* CGI STATUS CONSTANTS (req->cgi_status) *******/
-#define CGI_PARSE 1
-#define CGI_BUFFER 2
-#define CGI_DONE 3
-
-/*********** MMAP_LIST CONSTANTS ************************/
-#define MMAP_LIST_SIZE 256
-#define MMAP_LIST_MASK 255
-#define MMAP_LIST_USE_MAX 128
-#define MMAP_LIST_NEXT(i) (((i)+1)&MMAP_LIST_MASK)
-#define MMAP_LIST_HASH(dev,ino,size) ((ino)&MMAP_LIST_MASK)
-
-#define MAX_FILE_MMAP 100 * 1024 /* 100K */
-
-/***************** USEFUL MACROS ************************/
-
-#define SQUASH_KA(req) (req->keepalive=KA_STOPPED)
-
-#define BOA_FD_SET(fd, where) { FD_SET(fd, where); \
- if (fd > max_fd) max_fd = fd; \
- }
-
-/* If and when everyone has a modern gcc or other near-C99 compiler,
- * change these to static inline functions. Also note that since
- * we never fuss with O_APPEND append or O_ASYNC, we shouldn't have
- * to perform an extra system call to F_GETFL first.
- */
-
-#ifdef BOA_USE_GETFL
-#define set_block_fd(fd) real_set_block_fd(fd)
-#define set_nonblock_fd(fd) real_set_nonblock_fd(fd)
-#else
-#define set_block_fd(fd) fcntl(fd, F_SETFL, 0)
-#define set_nonblock_fd(fd) fcntl(fd, F_SETFL, NOBLOCK)
-#endif
-
-#define DIE(mesg) log_error_mesg(__FILE__, __LINE__, mesg), exit(1)
-#define WARN(mesg) log_error_mesg(__FILE__, __LINE__, mesg)
-
-#endif
diff --git a/linux-tools/boa-0.94.13/src/escape.c b/linux-tools/boa-0.94.13/src/escape.c
deleted file mode 100644
index b123aa260a..0000000000
--- a/linux-tools/boa-0.94.13/src/escape.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Boa, an http server
- * escape.c
- * Copyright (C) 2001 Jon Nelson <jnelson@boa.org>
- * Based on escape.pl, Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Copyright (C) 2001 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: escape.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $ */
-
-/*
- unreserved = alnum | mark
- alnum = "0".."9" | "A".."Z" | "a".."z"
- mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
- noescape = unreserved | ":" | "@" | "&" | "=" | "+" | "$" | "," | "/"
- */
-
-#ifdef TEST
-#include <stdio.h>
-#include <stdlib.h>
-#else
-#include "boa.h"
-#endif
-
-#include "escape.h"
-
-unsigned long _needs_escape[(NEEDS_ESCAPE_BITS+NEEDS_ESCAPE_WORD_LENGTH-1)/NEEDS_ESCAPE_WORD_LENGTH];
-
-void build_needs_escape(void)
-{
- unsigned int a, b;
- const unsigned char special[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789"
- "-_.!~*'():@&=+$,/?";
- /* 21 Mar 2002 - jnelson - confirm with Apache 1.3.23 that '?'
- * is safe to leave unescaped.
- */
- unsigned short i, j;
-
- b = 1;
- for (a=0; b!=0; a++) b=b<<1;
- /* I found $a bit positions available in an unsigned long. */
- if (a < NEEDS_ESCAPE_WORD_LENGTH) {
- fprintf(stderr,
- "NEEDS_ESCAPE_SHIFT configuration error -- "\
- "%d should be <= log2(%d)\n",
- NEEDS_ESCAPE_SHIFT, a);
- exit(1);
- } else if (a >= 2*NEEDS_ESCAPE_WORD_LENGTH) {
- /* needs_escape_shift configuration suboptimal */
- } else {
- /* Ahh, just right! */;
- }
- memset(_needs_escape, ~0, sizeof(_needs_escape));
- for(i = 0; i < sizeof(special) - 1; ++i) {
- j=special[i];
- if (j>=NEEDS_ESCAPE_BITS) {
- /* warning: character $j will be needlessly escaped. */
- } else {
- _needs_escape[NEEDS_ESCAPE_INDEX(j)]&=~NEEDS_ESCAPE_MASK(j);
- }
- }
-}
-
-#ifdef TEST
-int main(void)
-{
- int i;
- build_needs_escape();
- for(i = 0; i <= NEEDS_ESCAPE_BITS; ++i) {
- if (needs_escape(i)) {
- fprintf(stdout, "%3d needs escape.\n", i);
- }
- }
- return(0);
-}
-#endif
-
diff --git a/linux-tools/boa-0.94.13/src/escape.h b/linux-tools/boa-0.94.13/src/escape.h
deleted file mode 100644
index 496791f9e4..0000000000
--- a/linux-tools/boa-0.94.13/src/escape.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Copyright (C) 2001 Jon Nelson <jnelson@boa.org>
- * Copyright (C) 2001 Larry Doolittle <ldoolitt@boa.org>
-
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: escape.h,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $ */
-
-#include "config.h"
-
-/* Highest character number that can possibly be passed through un-escaped */
-#define NEEDS_ESCAPE_BITS 128
-
-#ifndef NEEDS_ESCAPE_SHIFT
-#define NEEDS_ESCAPE_SHIFT 5 /* 1 << 5 is 32 bits */
-#endif
-
-#define NEEDS_ESCAPE_WORD_LENGTH (1<<NEEDS_ESCAPE_SHIFT)
-
-#define NEEDS_ESCAPE_INDEX(c) ((c)>>NEEDS_ESCAPE_SHIFT)
-
-/* Assume variable shift is fast, otherwise this could be a table lookup */
-#define NEEDS_ESCAPE_MASK(c) (1<<((c)&(NEEDS_ESCAPE_WORD_LENGTH - 1)))
-
-/* Newer compilers could use an inline function.
- * This macro works great, as long as you pass unsigned int or unsigned char.
- */
-#define needs_escape(c) ((c)>=NEEDS_ESCAPE_BITS || _needs_escape[NEEDS_ESCAPE_INDEX(c)]&NEEDS_ESCAPE_MASK(c))
-
-extern unsigned long _needs_escape[(NEEDS_ESCAPE_BITS+NEEDS_ESCAPE_WORD_LENGTH-1)/NEEDS_ESCAPE_WORD_LENGTH];
-void build_needs_escape(void);
diff --git a/linux-tools/boa-0.94.13/src/get.c b/linux-tools/boa-0.94.13/src/get.c
deleted file mode 100644
index 307c1a1c6c..0000000000
--- a/linux-tools/boa-0.94.13/src/get.c
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,99 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: get.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-
-/* local prototypes */
-int get_cachedir_file(request * req, struct stat *statbuf);
-int index_directory(request * req, char *dest_filename);
-
-/*
- * Name: init_get
- * Description: Initializes a non-script GET or HEAD request.
- *
- * Return values:
- * 0: finished or error, request will be freed
- * 1: successfully initialized, added to ready queue
- */
-
-int init_get(request * req)
-{
- int data_fd, saved_errno;
- struct stat statbuf;
- volatile int bytes;
-
- data_fd = open(req->pathname, O_RDONLY);
- saved_errno = errno; /* might not get used */
-
-#ifdef GUNZIP
- if (data_fd == -1 && errno == ENOENT) {
- /* cannot open */
- /* it's either a gunzipped file or a directory */
- char gzip_pathname[MAX_PATH_LENGTH];
- int len;
-
- len = strlen(req->pathname);
-
- memcpy(gzip_pathname, req->pathname, len);
- memcpy(gzip_pathname + len, ".gz", 3);
- gzip_pathname[len + 3] = '\0';
- data_fd = open(gzip_pathname, O_RDONLY);
- if (data_fd != -1) {
- close(data_fd);
-
- req->response_status = R_REQUEST_OK;
- if (req->pathname)
- free(req->pathname);
- req->pathname = strdup(gzip_pathname);
- if (!req->pathname) {
- log_error_time();
- perror("strdup");
- send_r_error(req);
- return 0;
- }
- if (!req->simple) {
- req_write(req, "HTTP/1.0 200 OK-GUNZIP\r\n");
- print_http_headers(req);
- print_content_type(req);
- print_last_modified(req);
- req_write(req, "\r\n");
- req_flush(req);
- }
- if (req->method == M_HEAD)
- return 0;
-
- return init_cgi(req);
- }
- }
-#endif
-
- if (data_fd == -1) {
- log_error_doc(req);
- errno = saved_errno;
- perror("document open");
-
- if (saved_errno == ENOENT)
- send_r_not_found(req);
- else if (saved_errno == EACCES)
- send_r_forbidden(req);
- else
- send_r_bad_request(req);
- return 0;
- }
-
- fstat(data_fd, &statbuf);
-
- if (S_ISDIR(statbuf.st_mode)) { /* directory */
- close(data_fd); /* close dir */
-
- if (req->pathname[strlen(req->pathname) - 1] != '/') {
- char buffer[3 * MAX_PATH_LENGTH + 128];
-
- if (server_port != 80)
- sprintf(buffer, "http://%s:%d%s/", server_name,
- server_port, req->request_uri);
- else
- sprintf(buffer, "http://%s%s/", server_name,
- req->request_uri);
- send_r_moved_perm(req, buffer);
- return 0;
- }
- data_fd = get_dir(req, &statbuf); /* updates statbuf */
-
- if (data_fd == -1) /* couldn't do it */
- return 0; /* errors reported by get_dir */
- else if (data_fd <= 1)
- /* data_fd == 0 -> close it down, 1 -> continue */
- return data_fd;
- /* else, data_fd contains the fd of the file... */
- }
- if (req->if_modified_since &&
- !modified_since(&(statbuf.st_mtime), req->if_modified_since)) {
- send_r_not_modified(req);
- close(data_fd);
- return 0;
- }
- req->filesize = statbuf.st_size;
- req->last_modified = statbuf.st_mtime;
-
- if (req->method == M_HEAD || req->filesize == 0) {
- send_r_request_ok(req);
- close(data_fd);
- return 0;
- }
-
- if (req->filesize > MAX_FILE_MMAP) {
- send_r_request_ok(req); /* All's well */
- req->status = PIPE_READ;
- req->cgi_status = CGI_BUFFER;
- req->data_fd = data_fd;
- req_flush(req); /* this should *always* complete due to
- the size of the I/O buffers */
- req->header_line = req->header_end = req->buffer;
- return 1;
- }
-
- if (req->filesize == 0) { /* done */
- send_r_request_ok(req); /* All's well *so far* */
- close(data_fd);
- return 1;
- }
-
- /* NOTE: I (Jon Nelson) tried performing a read(2)
- * into the output buffer provided the file data would
- * fit, before mmapping, and if successful, writing that
- * and stopping there -- all to avoid the cost
- * of a mmap. Oddly, it was *slower* in benchmarks.
- */
- req->mmap_entry_var = find_mmap(data_fd, &statbuf);
- if (req->mmap_entry_var == NULL) {
- req->buffer_end = 0;
- if (errno == ENOENT)
- send_r_not_found(req);
- else if (errno == EACCES)
- send_r_forbidden(req);
- else
- send_r_bad_request(req);
- close(data_fd);
- return 0;
- }
- req->data_mem = req->mmap_entry_var->mmap;
- close(data_fd); /* close data file */
-
- if ((long) req->data_mem == -1) {
- boa_perror(req, "mmap");
- return 0;
- }
-
- send_r_request_ok(req); /* All's well */
-
- bytes = BUFFER_SIZE - req->buffer_end;
-
- /* bytes is now how much the buffer can hold
- * after the headers
- */
-
- if (bytes > 0) {
- if (bytes > req->filesize)
- bytes = req->filesize;
-
- if (sigsetjmp(env, 1) == 0) {
- handle_sigbus = 1;
- memcpy(req->buffer + req->buffer_end, req->data_mem, bytes);
- handle_sigbus = 0;
- /* OK, SIGBUS **after** this point is very bad! */
- } else {
- /* sigbus! */
- log_error_doc(req);
- reset_output_buffer(req);
- send_r_error(req);
- fprintf(stderr, "%sGot SIGBUS in memcpy!\n", get_commonlog_time());
- return 0;
- }
- req->buffer_end += bytes;
- req->filepos += bytes;
- if (req->filesize == req->filepos) {
- req_flush(req);
- req->status = DONE;
- }
- }
-
- /* We lose statbuf here, so make sure response has been sent */
- return 1;
-}
-
-/*
- * Name: process_get
- * Description: Writes a chunk of data to the socket.
- *
- * Return values:
- * -1: request blocked, move to blocked queue
- * 0: EOF or error, close it down
- * 1: successful write, recycle in ready queue
- */
-
-int process_get(request * req)
-{
- int bytes_written;
- volatile int bytes_to_write;
-
- bytes_to_write = req->filesize - req->filepos;
- if (bytes_to_write > SOCKETBUF_SIZE)
- bytes_to_write = SOCKETBUF_SIZE;
-
-
- if (sigsetjmp(env, 1) == 0) {
- handle_sigbus = 1;
- bytes_written = write(req->fd, req->data_mem + req->filepos,
- bytes_to_write);
- handle_sigbus = 0;
- /* OK, SIGBUS **after** this point is very bad! */
- } else {
- /* sigbus! */
- log_error_doc(req);
- /* sending an error here is inappropriate
- * if we are here, the file is mmapped, and thus,
- * a content-length has been sent. If we send fewer bytes
- * the client knows there has been a problem.
- * We run the risk of accidentally sending the right number
- * of bytes (or a few too many) and the client
- * won't be the wiser.
- */
- req->status = DEAD;
- fprintf(stderr, "%sGot SIGBUS in write(2)!\n", get_commonlog_time());
- return 0;
- }
-
- if (bytes_written < 0) {
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return -1;
- /* request blocked at the pipe level, but keep going */
- else {
- if (errno != EPIPE) {
- log_error_doc(req);
- /* Can generate lots of log entries, */
- perror("write");
- /* OK to disable if your logs get too big */
- }
- req->status = DEAD;
- return 0;
- }
- }
- req->filepos += bytes_written;
-
- if (req->filepos == req->filesize) { /* EOF */
- return 0;
- } else
- return 1; /* more to do */
-}
-
-/*
- * Name: get_dir
- * Description: Called from process_get if the request is a directory.
- * statbuf must describe directory on input, since we may need its
- * device, inode, and mtime.
- * statbuf is updated, since we may need to check mtimes of a cache.
- * returns:
- * -1 error
- * 0 cgi (either gunzip or auto-generated)
- * >0 file descriptor of file
- */
-
-int get_dir(request * req, struct stat *statbuf)
-{
-
- char pathname_with_index[MAX_PATH_LENGTH];
- int data_fd;
-
- if (directory_index) { /* look for index.html first?? */
- strcpy(pathname_with_index, req->pathname);
- strcat(pathname_with_index, directory_index);
- /*
- sprintf(pathname_with_index, "%s%s", req->pathname, directory_index);
- */
-
- data_fd = open(pathname_with_index, O_RDONLY);
-
- if (data_fd != -1) { /* user's index file */
- strcpy(req->request_uri, directory_index); /* for mimetype */
- fstat(data_fd, statbuf);
- return data_fd;
- }
- if (errno == EACCES) {
- send_r_forbidden(req);
- return -1;
- } else if (errno != ENOENT) {
- /* if there is an error *other* than EACCES or ENOENT */
- send_r_not_found(req);
- return -1;
- }
-
-#ifdef GUNZIP
- /* if we are here, trying index.html didn't work
- * try index.html.gz
- */
- strcat(pathname_with_index, ".gz");
- data_fd = open(pathname_with_index, O_RDONLY);
- if (data_fd != -1) { /* user's index file */
- close(data_fd);
-
- req->response_status = R_REQUEST_OK;
- SQUASH_KA(req);
- if (req->pathname)
- free(req->pathname);
- req->pathname = strdup(pathname_with_index);
- if (!req->pathname) {
- log_error_time();
- perror("strdup");
- send_r_error(req);
- return 0;
- }
- if (!req->simple) {
- req_write(req, "HTTP/1.0 200 OK-GUNZIP\r\n");
- print_http_headers(req);
- print_last_modified(req);
- req_write(req, "Content-Type: ");
- req_write(req, get_mime_type(directory_index));
- req_write(req, "\r\n\r\n");
- req_flush(req);
- }
- if (req->method == M_HEAD)
- return 0;
- return init_cgi(req);
- }
-#endif
- }
-
- /* only here if index.html, index.html.gz don't exist */
- if (dirmaker != NULL) { /* don't look for index.html... maybe automake? */
- req->response_status = R_REQUEST_OK;
- SQUASH_KA(req);
-
- /* the indexer should take care of all headers */
- if (!req->simple) {
- req_write(req, "HTTP/1.0 200 OK\r\n");
- print_http_headers(req);
- print_last_modified(req);
- req_write(req, "Content-Type: text/html\r\n\r\n");
- req_flush(req);
- }
- if (req->method == M_HEAD)
- return 0;
-
- return init_cgi(req);
- /* in this case, 0 means success */
- } else if (cachedir) {
- return get_cachedir_file(req, statbuf);
- } else { /* neither index.html nor autogenerate are allowed */
- send_r_forbidden(req);
- return -1; /* nothing worked */
- }
-}
-
-int get_cachedir_file(request * req, struct stat *statbuf)
-{
-
- char pathname_with_index[MAX_PATH_LENGTH];
- int data_fd;
- time_t real_dir_mtime;
-
- real_dir_mtime = statbuf->st_mtime;
- sprintf(pathname_with_index, "%s/dir.%d.%ld",
- cachedir, (int) statbuf->st_dev, statbuf->st_ino);
- data_fd = open(pathname_with_index, O_RDONLY);
-
- if (data_fd != -1) { /* index cache */
-
- fstat(data_fd, statbuf);
- if (statbuf->st_mtime > real_dir_mtime) {
- statbuf->st_mtime = real_dir_mtime; /* lie */
- strcpy(req->request_uri, directory_index); /* for mimetype */
- return data_fd;
- }
- close(data_fd);
- unlink(pathname_with_index); /* cache is stale, delete it */
- }
- if (index_directory(req, pathname_with_index) == -1)
- return -1;
-
- data_fd = open(pathname_with_index, O_RDONLY); /* Last chance */
- if (data_fd != -1) {
- strcpy(req->request_uri, directory_index); /* for mimetype */
- fstat(data_fd, statbuf);
- statbuf->st_mtime = real_dir_mtime; /* lie */
- return data_fd;
- }
-
- boa_perror(req, "re-opening dircache");
- return -1; /* Nothing worked. */
-
-}
-
-/*
- * Name: index_directory
- * Description: Called from get_cachedir_file if a directory html
- * has to be generated on the fly
- * returns -1 for problem, else 0
- * This version is the fastest, ugliest, and most accurate yet.
- * It solves the "stale size or type" problem by not ever giving
- * the size or type. This also speeds it up since no per-file
- * stat() is required.
- */
-
-int index_directory(request * req, char *dest_filename)
-{
- DIR *request_dir;
- FILE *fdstream;
- struct dirent *dirbuf;
- int bytes = 0;
- char *escname = NULL;
-
- if (chdir(req->pathname) == -1) {
- if (errno == EACCES || errno == EPERM) {
- send_r_forbidden(req);
- } else {
- log_error_doc(req);
- perror("chdir");
- send_r_bad_request(req);
- }
- return -1;
- }
-
- request_dir = opendir(".");
- if (request_dir == NULL) {
- int errno_save = errno;
- send_r_error(req);
- log_error_time();
- fprintf(stderr, "directory \"%s\": ", req->pathname);
- errno = errno_save;
- perror("opendir");
- return -1;
- }
-
- fdstream = fopen(dest_filename, "w");
- if (fdstream == NULL) {
- boa_perror(req, "dircache fopen");
- closedir(request_dir);
- return -1;
- }
-
- bytes += fprintf(fdstream,
- "<HTML><HEAD>\n<TITLE>Index of %s</TITLE>\n</HEAD>\n\n",
- req->request_uri);
- bytes += fprintf(fdstream, "<BODY>\n\n<H2>Index of %s</H2>\n\n<PRE>\n",
- req->request_uri);
-
- while ((dirbuf = readdir(request_dir))) {
- if (!strcmp(dirbuf->d_name, "."))
- continue;
-
- if (!strcmp(dirbuf->d_name, "..")) {
- bytes += fprintf(fdstream,
- " [DIR] <A HREF=\"../\">Parent Directory</A>\n");
- continue;
- }
-
- if ((escname = escape_string(dirbuf->d_name, NULL)) != NULL) {
- bytes += fprintf(fdstream, " <A HREF=\"%s\">%s</A>\n",
- escname, dirbuf->d_name);
- free(escname);
- escname = NULL;
- }
- }
- closedir(request_dir);
- bytes += fprintf(fdstream, "</PRE>\n\n</BODY>\n</HTML>\n");
-
- fclose(fdstream);
-
- chdir(server_root);
-
- req->filesize = bytes; /* for logging transfer size */
- return 0; /* success */
-}
diff --git a/linux-tools/boa-0.94.13/src/globals.h b/linux-tools/boa-0.94.13/src/globals.h
deleted file mode 100644
index a98bd59cd3..0000000000
--- a/linux-tools/boa-0.94.13/src/globals.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,97 Larry Doolittle <ldoolitt@jlab.org>
- * Some changes Copyright (C) 1997 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: globals.h,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#ifndef _GLOBALS_H
-#define _GLOBALS_H
-
-struct mmap_entry {
- dev_t dev;
- ino_t ino;
- char *mmap;
- int use_count;
- size_t len;
-};
-
-struct alias {
- char *fakename; /* URI path to file */
- char *realname; /* Actual path to file */
- int type; /* ALIAS, SCRIPTALIAS, REDIRECT */
- int fake_len; /* strlen of fakename */
- int real_len; /* strlen of realname */
- struct alias *next;
-};
-
-typedef struct alias alias;
-
-struct request { /* pending requests */
- int fd; /* client's socket fd */
- int status; /* see #defines.h */
- time_t time_last; /* time of last succ. op. */
- char *pathname; /* pathname of requested file */
- int simple; /* simple request? */
- int keepalive; /* keepalive status */
- int kacount; /* keepalive count */
-
- int data_fd; /* fd of data */
- unsigned long filesize; /* filesize */
- unsigned long filepos; /* position in file */
- char *data_mem; /* mmapped/malloced char array */
- int method; /* M_GET, M_POST, etc. */
-
- char *logline; /* line to log file */
-
- char *header_line; /* beginning of un or incompletely processed header line */
- char *header_end; /* last known end of header, or end of processed data */
- int parse_pos; /* how much have we parsed */
- int client_stream_pos; /* how much have we read... */
-
- int buffer_start; /* where the buffer starts */
- int buffer_end; /* where the buffer ends */
-
- char *http_version; /* HTTP/?.? of req */
- int response_status; /* R_NOT_FOUND etc. */
-
- char *if_modified_since; /* If-Modified-Since */
- time_t last_modified; /* Last-modified: */
-
- char local_ip_addr[NI_MAXHOST]; /* for virtualhost */
-
- /* CGI vars */
-
- int remote_port; /* could be used for ident */
-
- char remote_ip_addr[NI_MAXHOST]; /* after inet_ntoa */
-
- int is_cgi; /* true if CGI/NPH */
- int cgi_status;
- int cgi_env_index; /* index into array */
-
- /* Agent and referer for logfiles */
- char *header_user_agent;
- char *header_referer;
-
- int post_data_fd; /* fd for post data tmpfile */
-
- char *path_info; /* env variable */
- char *path_translated; /* env variable */
- char *script_name; /* env variable */
- char *query_string; /* env variable */
- char *content_type; /* env variable */
- char *content_length; /* env variable */
-
- struct mmap_entry *mmap_entry_var;
-
- struct request *next; /* next */
- struct request *prev; /* previous */
-
- /* everything below this line is kept regardless */
- char buffer[BUFFER_SIZE + 1]; /* generic I/O buffer */
- char request_uri[MAX_HEADER_LENGTH + 1]; /* uri */
- char client_stream[CLIENT_STREAM_SIZE]; /* data from client - fit or be hosed */
- char *cgi_env[CGI_ENV_MAX + 4]; /* CGI environment */
-
-#ifdef ACCEPT_ON
- char accept[MAX_ACCEPT_LENGTH]; /* Accept: fields */
-#endif
-};
-
-typedef struct request request;
-
-struct status {
- long requests;
- long errors;
-};
-
-extern struct status status;
-
-extern char *optarg; /* For getopt */
-extern FILE *yyin; /* yacc input */
-
-extern request *request_ready; /* first in ready list */
-extern request *request_block; /* first in blocked list */
-extern request *request_free; /* first in free list */
-
-extern fd_set block_read_fdset; /* fds blocked on read */
-extern fd_set block_write_fdset; /* fds blocked on write */
-
-/* global server variables */
-
-extern char *access_log_name;
-extern char *error_log_name;
-extern char *cgi_log_name;
-extern int cgi_log_fd;
-extern int use_localtime;
-
-extern int server_port;
-extern uid_t server_uid;
-extern gid_t server_gid;
-extern char *server_admin;
-extern char *server_root;
-extern char *server_name;
-extern char *server_ip;
-extern int max_fd;
-extern int devnullfd;
-
-extern char *document_root;
-extern char *user_dir;
-extern char *directory_index;
-extern char *default_type;
-extern char *dirmaker;
-extern char *mime_types;
-extern char *cachedir;
-
-extern char *tempdir;
-
-extern char *cgi_path;
-extern int single_post_limit;
-
-extern int ka_timeout;
-extern int ka_max;
-
-extern int sighup_flag;
-extern int sigchld_flag;
-extern int sigalrm_flag;
-extern int sigterm_flag;
-extern time_t start_time;
-
-extern int pending_requests;
-extern long int max_connections;
-
-extern int verbose_cgi_logs;
-
-extern int backlog;
-extern time_t current_time;
-
-extern int virtualhost;
-
-extern int total_connections;
-
-extern sigjmp_buf env;
-extern int handle_sigbus;
-
-#endif
diff --git a/linux-tools/boa-0.94.13/src/hash.c b/linux-tools/boa-0.94.13/src/hash.c
deleted file mode 100644
index d02f10dfad..0000000000
--- a/linux-tools/boa-0.94.13/src/hash.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1997 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: hash.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-#include "parse.h"
-
-/*
- * There are two hash tables used, each with a key/value pair
- * stored in a hash_struct. They are:
- *
- * mime_hashtable:
- * key = file extension
- * value = mime type
- *
- * passwd_hashtable:
- * key = username
- * value = home directory
- *
- */
-
-struct _hash_struct_ {
- char *key;
- char *value;
- struct _hash_struct_ *next;
-};
-
-typedef struct _hash_struct_ hash_struct;
-
-static hash_struct *mime_hashtable[MIME_HASHTABLE_SIZE];
-static hash_struct *passwd_hashtable[PASSWD_HASHTABLE_SIZE];
-
-#ifdef WANT_ICKY_HASH
-static unsigned four_char_hash(char *buf);
-#define boa_hash four_char_hash
-#else
-#ifdef WANT_SDBM_HASH
-static unsigned sdbm_hash(char *str);
-#define boa_hash sdbm_hash
-#else
-static unsigned djb2_hash(char *str);
-#define boa_hash djb2_hash
-#endif
-#endif
-
-#ifdef WANT_ICKY_HASH
-static unsigned four_char_hash(char *buf)
-{
- unsigned int hash = (buf[0] +
- (buf[1] ? buf[1] : 241 +
- (buf[2] ? buf[2] : 251 +
- (buf[3] ? buf[3] : 257))));
-#ifdef DEBUG_HASH
- log_error_time();
- fprintf(stderr, "four_char_hash(%s) = %u\n", buf, hash);
-#endif
- return hash;
-}
-
-/* The next two hashes taken from
- * http://www.cs.yorku.ca/~oz/hash.html
- *
- * In my (admittedly) very brief testing, djb2_hash performed
- * very slightly better than sdbm_hash.
- */
-
-#else
-#define MAX_HASH_LENGTH 4
-#ifdef WANT_SDBM_HASH
-static unsigned sdbm_hash(char *str)
-{
- unsigned hash = 0;
- int c;
- short count = MAX_HASH_LENGTH;
-
-#ifdef DEBUG_HASH
- log_error_time();
- fprintf(stderr, "sdbm_hash(%s) = ", str);
-#endif
-
- while ((c = *str++) && count--)
- hash = c + (hash << 6) + (hash << 16) - hash;
-
-#ifdef DEBUG_HASH
- fprintf(stderr, "%u\n", hash);
-#endif
- return hash;
-}
-#else
-
-static unsigned djb2_hash(char *str)
-{
- unsigned hash = 5381;
- int c;
- short count = MAX_HASH_LENGTH;
-
-#ifdef DEBUG_HASH
- log_error_time();
- fprintf(stderr, "djb2_hash(%s) = ", str);
-#endif
-
- while ((c = *(str++)) && count--)
- hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
-
-#ifdef DEBUG_HASH
- fprintf(stderr, "%u\n", hash);
-#endif
- return hash;
-}
-#endif
-#endif
-
-/*
- * Name: add_mime_type
- * Description: Adds a key/value pair to the mime_hashtable
- */
-
-void add_mime_type(char *extension, char *type)
-{
- unsigned int hash;
- hash_struct *current, *next;
-
- if (!extension)
- return;
-
- hash = get_mime_hash_value(extension);
-
- current = mime_hashtable[hash];
-
- while (current) {
- if (!strcmp(current->key, extension))
- return; /* don't add extension twice */
- if (current->next)
- current = current->next;
- else
- break;
- }
-
- /* if here, we need to add a new one */
- next = (hash_struct *) malloc(sizeof (hash_struct));
- if (!next) {
- DIE("malloc of hash_struct failed!");
- }
- next->key = strdup(extension);
- if (!next->key)
- DIE("malloc of hash_struct->key failed!");
- next->value = strdup(type);
- if (!next->value)
- DIE("malloc of hash_struct->value failed!");
- next->next = NULL;
-
- if (!current) {
- mime_hashtable[hash] = next;
- } else {
- current->next = next;
- }
-}
-
-/*
- * Name: get_mime_hash_value
- *
- * Description: adds the ASCII values of the file extension letters
- * and mods by the hashtable size to get the hash value
- */
-
-unsigned get_mime_hash_value(char *extension)
-{
- unsigned int hash = 0;
-
- if (extension == NULL || extension[0] == '\0') {
- /* FIXME */
- log_error_time();
- fprintf(stderr, "Attempt to hash NULL or empty string!\n");
- return 0;
- }
-
- hash = boa_hash(extension);
- hash %= MIME_HASHTABLE_SIZE;
-
- return hash;
-}
-
-/*
- * Name: get_mime_type
- *
- * Description: Returns the mime type for a supplied filename.
- * Returns default type if not found.
- */
-
-char *get_mime_type(char *filename)
-{
- char *extension;
- hash_struct *current;
-
- unsigned int hash;
-
- extension = strrchr(filename, '.');
-
- if (!extension || *extension++ == '\0')
- return default_type;
-
- hash = get_mime_hash_value(extension);
- current = mime_hashtable[hash];
-
- while (current) {
- if (!strcmp(current->key, extension)) /* hit */
- return current->value;
- current = current->next;
- }
-
- return default_type;
-}
-
-/*
- * Name: get_homedir_hash_value
- *
- * Description: adds the ASCII values of the username letters
- * and mods by the hashtable size to get the hash value
- */
-
-unsigned get_homedir_hash_value(char *name)
-{
- unsigned int hash = 0;
-
- if (name == NULL || name[0] == '\0') {
- /* FIXME */
- log_error_time();
- fprintf(stderr, "Attempt to hash NULL or empty string!\n");
- return 0;
- }
-
- hash = boa_hash(name);
- hash %= PASSWD_HASHTABLE_SIZE;
-
- return hash;
-}
-
-
-/*
- * Name: get_home_dir
- *
- * Description: Returns a point to the supplied user's home directory.
- * Adds to the hashtable if it's not already present.
- *
- */
-
-char *get_home_dir(char *name)
-{
- struct passwd *passwdbuf;
-
- hash_struct *current, *next;
- unsigned int hash;
-
- /* first check hash table -- if username is less than four characters,
- just hash to zero (this should be very rare) */
-
- hash = get_homedir_hash_value(name);
-
- for(current = passwd_hashtable[hash];current;current = current->next) {
- if (!strcmp(current->key, name)) /* hit */
- return current->value;
- if (!current->next)
- break;
- }
-
- /* if here, we have to add a new one */
-
- passwdbuf = getpwnam(name);
-
- if (!passwdbuf) /* does not exist */
- return NULL;
-
- next = (hash_struct *) malloc(sizeof (hash_struct));
- if (!next) {
- WARN("malloc of hash_struct for passwd_hashtable failed!");
- return NULL;
- }
-
- next->key = strdup(name);
- if (!next->key) {
- WARN("malloc of passwd_hashtable[hash]->key failed!");
- free(next);
- return NULL;
- }
- next->value = strdup(passwdbuf->pw_dir);
- if (!next->value) {
- WARN("malloc of passwd_hashtable[hash]->value failed!");
- free(next->key);
- free(next);
- return NULL;
- }
- next->next = NULL;
-
- if (!current) {
- passwd_hashtable[hash] = next;
- } else {
- current->next = next;
- }
- return next->value;
-}
-
-void dump_mime(void)
-{
- int i;
- hash_struct *temp;
- for (i = 0; i < MIME_HASHTABLE_SIZE; ++i) { /* these limits OK? */
- temp = mime_hashtable[i];
- while (temp) {
- hash_struct *temp_next;
-
- temp_next = temp->next;
- free(temp->key);
- free(temp->value);
- free(temp);
-
- temp = temp_next;
- }
- mime_hashtable[i] = NULL;
- }
-}
-
-void dump_passwd(void)
-{
- int i;
- hash_struct *temp;
- for (i = 0; i < PASSWD_HASHTABLE_SIZE; ++i) { /* these limits OK? */
- temp = passwd_hashtable[i];
- while (temp) {
- hash_struct *temp_next;
-
- temp_next = temp->next;
- free(temp->key);
- free(temp->value);
- free(temp);
-
- temp = temp_next;
- }
- passwd_hashtable[i] = NULL;
- }
-}
-
-void show_hash_stats(void)
-{
- int i;
- hash_struct *temp;
- int total = 0;
- int count;
-
- for (i = 0; i < MIME_HASHTABLE_SIZE; ++i) { /* these limits OK? */
- if (mime_hashtable[i]) {
- count = 0;
- temp = mime_hashtable[i];
- while (temp) {
- temp = temp->next;
- ++count;
- }
-#ifdef NOISY_SIGALRM
- log_error_time();
- fprintf(stderr, "mime_hashtable[%d] has %d entries\n",
- i, count);
-#endif
- total += count;
- }
- }
- log_error_time();
- fprintf(stderr, "mime_hashtable has %d total entries\n",
- total);
-
- total = 0;
- for (i = 0; i < PASSWD_HASHTABLE_SIZE; ++i) { /* these limits OK? */
- if (passwd_hashtable[i]) {
- temp = passwd_hashtable[i];
- count = 0;
- while (temp) {
- temp = temp->next;
- ++count;
- }
-#ifdef NOISY_SIGALRM
- log_error_time();
- fprintf(stderr, "passwd_hashtable[%d] has %d entries\n",
- i, count);
-#endif
- total += count;
- }
- }
-
- log_error_time();
- fprintf(stderr, "passwd_hashtable has %d total entries\n",
- total);
-
-}
diff --git a/linux-tools/boa-0.94.13/src/index_dir.c b/linux-tools/boa-0.94.13/src/index_dir.c
deleted file mode 100644
index 9af8a0f22f..0000000000
--- a/linux-tools/boa-0.94.13/src/index_dir.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (C) 1997-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: index_dir.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <limits.h> /* for PATH_MAX */
-#include <time.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include "compat.h"
-
-#define MAX_FILE_LENGTH MAXNAMLEN
-#define MAX_PATH_LENGTH PATH_MAX
-
-#define INT_TO_HEX(x) \
- ((((x)-10)>=0)?('A'+((x)-10)):('0'+(x)))
-
-#include "escape.h"
-
-char *html_escape_string(char *inp, char *buf, const int len);
-char *http_escape_string(char *inp, char *buf, const int len);
-
-#if defined __GNUC__ && \
- (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 0))
-#define CONST const
-#else
-#define CONST
-#endif
-
-int select_files(CONST struct dirent *d);
-int index_directory(char *dir, char *title);
-
-/*
- * Name: html_escape_string
- */
-char *html_escape_string(char *inp, char *dest, const int len)
-{
- int max;
- char *buf;
- unsigned char c;
-
- max = len * 5;
-
- if (dest == NULL && max)
- dest = malloc(sizeof (unsigned char) * (max + 1));
-
- if (dest == NULL)
- return NULL;
-
- buf = dest;
- while ((c = *inp++)) {
- switch (c) {
- case '>':
- *dest++ = '&';
- *dest++ = 'g';
- *dest++ = 't';
- *dest++ = ';';
- break;
- case '<':
- *dest++ = '&';
- *dest++ = 'l';
- *dest++ = 't';
- *dest++ = ';';
- break;
- case '&':
- *dest++ = '&';
- *dest++ = 'a';
- *dest++ = 'm';
- *dest++ = 'p';
- *dest++ = ';';
- break;
- default:
- *dest++ = c;
- }
- }
- *dest = '\0';
- return buf;
-}
-
-
-/*
- * Name: escape_string
- *
- * Description: escapes the string inp. Uses variable buf. If buf is
- * NULL when the program starts, it will attempt to dynamically allocate
- * the space that it needs, otherwise it will assume that the user
- * has already allocated enough space for the variable buf, which
- * could be up to 3 times the size of inp. If the routine dynamically
- * allocates the space, the user is responsible for freeing it afterwords
- * Returns: NULL on error, pointer to string otherwise.
- */
-
-char *http_escape_string(char *inp, char *buf, const int len)
-{
- int max;
- char *index;
- unsigned char c;
-
- max = len * 3;
-
- if (buf == NULL && max)
- buf = malloc(sizeof (unsigned char) * (max + 1));
-
- if (buf == NULL)
- return NULL;
-
- index = buf;
- while ((c = *inp++)) {
- if (needs_escape((unsigned int) c)) {
- *index++ = '%';
- *index++ = INT_TO_HEX(c >> 4);
- *index++ = INT_TO_HEX(c & 15);
- } else
- *index++ = c;
- }
- *index = '\0';
-
- return buf;
-}
-
-void send_error(int error)
-{
- char *the_error;
-
- switch (error) {
-
- case 1:
- the_error = "Not enough arguments were passed to the indexer.";
- break;
- case 2:
- the_error = "The Directory Sorter ran out of Memory";
- break;
- case 3:
- the_error =
- "The was a problem changing to the appropriate directory.";
- break;
- case 4:
- the_error = "There was an error escaping a string.";
- case 5:
- the_error = "Too many arguments were passed to the indexer.";
- break;
- case 6:
- the_error = "No files in this directory.";
- break;
- default:
- the_error = "An unknown error occurred producing the directory.";
- break;
- }
- printf("<html>\n<head>\n<title>\n%s\n</title>\n"
- "<body>\n%s\n</body>\n</html>\n", the_error, the_error);
-}
-
-int select_files(CONST struct dirent *dirbuf)
-{
- if (dirbuf->d_name[0] == '.')
- return 0;
- else
- return 1;
-}
-
-/*
- * Name: index_directory
- * Description: Called from get_dir_mapping if a directory html
- * has to be generated on the fly
- * If no_slash is true, prepend slashes to hrefs
- * returns -1 for problem, else 0
- */
-
-int index_directory(char *dir, char *title)
-{
- struct dirent *dirbuf;
- int numdir;
- struct dirent **array;
- struct stat statbuf;
- char http_filename[MAX_FILE_LENGTH * 3];
- char html_filename[MAX_FILE_LENGTH * 4];
- int i;
-
- if (chdir(dir) == -1) {
- send_error(3);
- return -1;
- }
- numdir = scandir(".", &array, select_files, alphasort);
- if (numdir == -1) {
- send_error(2);
- return -1;
- } else if (numdir == -2) {
- send_error(6);
- return -1;
- }
- printf("<html>\n"
- "<head>\n<title>Index of %s</title>\n</head>\n\n"
- "<body bgcolor=\"#ffffff\">\n"
- "<H2>Index of %s</H2>\n"
- "<table>\n%s",
- title, title,
- (strcmp(title, "/") == 0 ? "" :
- "<tr><td colspan=3><h3>Directories</h3></td></tr>"
- "<tr><td colspan=3><a href=\"../\">Parent Directory</a></td></tr>\n"));
-
- for (i = 0; i < numdir; ++i) {
- dirbuf = array[i];
-
- if (stat(dirbuf->d_name, &statbuf) == -1)
- continue;
-
- if (!S_ISDIR(statbuf.st_mode))
- continue;
-
- if (html_escape_string(dirbuf->d_name, html_filename,
- NAMLEN(dirbuf)) == NULL) {
- send_error(4);
- return -1;
- }
- if (http_escape_string(dirbuf->d_name, http_filename,
- NAMLEN(dirbuf)) == NULL) {
- send_error(4);
- return -1;
- }
- printf("<tr>"
- "<td width=\"40%%\"><a href=\"%s/\">%s/</a></td>"
- "<td align=right>%s</td>"
- "<td align=right>%ld bytes</td>"
- "</tr>\n",
- http_filename, html_filename,
- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
- }
-
- printf
- ("<tr><td colspan=3>&nbsp;</td></tr>\n<tr><td colspan=3><h3>Files</h3></td></tr>\n");
-
- for (i = 0; i < numdir; ++i) {
- int len;
- dirbuf = array[i];
-
- if (stat(dirbuf->d_name, &statbuf) == -1)
- continue;
-
-
- if (S_ISDIR(statbuf.st_mode))
- continue;
-
- if (html_escape_string(dirbuf->d_name, html_filename,
- NAMLEN(dirbuf)) == NULL) {
- send_error(4);
- return -1;
- }
- if (http_escape_string(dirbuf->d_name, http_filename,
- NAMLEN(dirbuf)) == NULL) {
- send_error(4);
- return -1;
- }
-
- len = strlen(http_filename);
-#ifdef GUNZIP
- if (len > 3 && !memcmp(http_filename + len - 3, ".gz", 3)) {
- http_filename[len - 3] = '\0';
- html_filename[strlen(html_filename) - 3] = '\0';
-
- printf("<tr>"
- "<td width=\"40%%\"><a href=\"%s\">%s</a> "
- "<a href=\"%s.gz\">(.gz)</a></td>"
- "<td align=right>%s</td>"
- "<td align=right>%ld bytes</td>"
- "</tr>\n",
- http_filename, html_filename, http_filename,
- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
- } else {
-#endif
- printf("<tr>"
- "<td width=\"40%%\"><a href=\"%s\">%s</a></td>"
- "<td align=right>%s</td>"
- "<td align=right>%ld bytes</td>"
- "</tr>\n",
- http_filename, html_filename,
- ctime(&statbuf.st_mtime), (long) statbuf.st_size);
-#ifdef GUNZIP
- }
-#endif
- }
- /* hey -- even though this is a one-shot deal, we should
- * still free memory we ought to free
- * You never know -- this code might get used elsewhere!
- */
- for (i = 0; i < numdir; ++i) {
- free(array[i]);
- array[i] = NULL;
- }
- free(array);
- array = NULL;
-
- return 0; /* success */
-}
-
-int main(int argc, char *argv[])
-{
- time_t timep;
- struct tm *timeptr;
- char *now;
-
- if (argc < 3) {
- send_error(1);
- return -1;
- } else if (argc > 3) {
- send_error(5);
- return -1;
- }
-
- build_needs_escape();
-
- if (argv[2] == NULL)
- index_directory(argv[1], argv[1]);
- else
- index_directory(argv[1], argv[2]);
-
- time(&timep);
-#ifdef USE_LOCALTIME
- timeptr = localtime(&timep);
-#else
- timeptr = gmtime(&timep);
-#endif
- now = strdup(asctime(timeptr));
- now[strlen(now) - 1] = '\0';
-#ifdef USE_LOCALTIME
- printf("</table>\n<hr noshade>\nIndex generated %s %s\n"
- "<!-- This program is part of the Boa Webserver Copyright (C) 1991-2002 http://www.boa.org -->\n"
- "</body>\n</html>\n", now, TIMEZONE(timeptr));
-#else
- printf("</table>\n<hr noshade>\nIndex generated %s UTC\n"
- "<!-- This program is part of the Boa Webserver Copyright (C) 1991-2002 http://www.boa.org -->\n"
- "</body>\n</html>\n", now);
-#endif
-
- return 0;
-}
diff --git a/linux-tools/boa-0.94.13/src/ip.c b/linux-tools/boa-0.94.13/src/ip.c
deleted file mode 100644
index eaf467c54a..0000000000
--- a/linux-tools/boa-0.94.13/src/ip.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1999 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
-
- Encapsulation of ipv4 and ipv6 stuff, try to get rid of the ifdef's
- elsewhere in the code.
-
- The IPv6 code here is bsed on contributions from Martin Hinner <martin@tdp.cz>
- and Arkadiusz Miskiewicz <misiek@misiek.eu.org>. This incarnation of that
- code is untested. The original IPv4 code is based on original Boa code
- from Paul Phillips <paulp@go2net.com>.
-
- A goal is to compile in as many families as are supported, and
- make the final choice at runtime.
-
-globals.h:
-#ifdef INET6
- char remote_ip_addr[NI_MAXHOST];
-#else
- char remote_ip_addr[20]; after inet_ntoa
-#endif
-
- None of this code interacts with the rest of Boa except through
- the parameter lists and return values.
-
- Consider making these functions __inline__ and using this as a .h file
- */
-
-#include "boa.h"
-#include <arpa/inet.h> /* inet_ntoa */
-
-/* Binds to the existing server_s, based on the configuration string
- in server_ip. IPv6 version doesn't pay attention to server_ip yet. */
-int bind_server(int server_s, char *server_ip)
-{
-#ifdef INET6
- struct sockaddr_in6 server_sockaddr;
- server_sockaddr.sin6_family = AF_INET6;
- memcpy(&server_sockaddr.sin6_addr, &in6addr_any, sizeof (in6addr_any));
- server_sockaddr.sin6_port = htons(server_port);
-#else
- struct sockaddr_in server_sockaddr;
- memset(&server_sockaddr, 0, sizeof server_sockaddr);
-#ifdef HAVE_SIN_LEN /* uncomment for BSDs */
- server_sockaddr.sin_len = sizeof server_sockaddr;
-#endif
- server_sockaddr.sin_family = AF_INET;
- if (server_ip != NULL) {
- inet_aton(server_ip, &server_sockaddr.sin_addr);
- } else {
- server_sockaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- }
- server_sockaddr.sin_port = htons(server_port);
-#endif
-
- return bind(server_s, (struct sockaddr *) &server_sockaddr,
- sizeof (server_sockaddr));
-}
-
-char *ascii_sockaddr(struct SOCKADDR *s, char *dest, int len)
-{
-#ifdef INET6
- if (getnameinfo((struct sockaddr *) s,
- sizeof(struct SOCKADDR),
- dest, len, NULL, 0, NI_NUMERICHOST)) {
- fprintf(stderr, "[IPv6] getnameinfo failed\n");
- *dest = '\0';
- }
-#ifdef WHEN_DOES_THIS_APPLY
- if ((s->__ss_family == AF_INET6) &&
- IN6_IS_ADDR_V4MAPPED(&(((struct sockaddr_in6 *) s)->sin6_addr))) {
- memmove(dest, dest+7, NI_MAXHOST);
- }
-#endif
-#else
- memmove(dest, inet_ntoa(s->sin_addr), len);
-#endif
- return dest;
-}
-
-int net_port(struct SOCKADDR *s)
-{
- int p = -1;
-#ifdef INET6
- char serv[NI_MAXSERV];
-
- if (getnameinfo((struct sockaddr *) s,
- sizeof(struct SOCKADDR),
- NULL, 0, serv, sizeof(serv), NI_NUMERICSERV)) {
- fprintf(stderr, "[IPv6] getnameinfo failed\n");
- } else {
- p = atoi(serv);
- }
-#else
- p = ntohs(s->sin_port);
-#endif
- return p;
-}
diff --git a/linux-tools/boa-0.94.13/src/log.c b/linux-tools/boa-0.94.13/src/log.c
deleted file mode 100644
index 3e79c2f9a1..0000000000
--- a/linux-tools/boa-0.94.13/src/log.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1999 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: log.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-
-FILE *access_log;
-
-char *error_log_name;
-char *access_log_name;
-char *cgi_log_name;
-int cgi_log_fd;
-
-FILE *fopen_gen_fd(char *spec, const char *mode);
-
-FILE *fopen_gen_fd(char *spec, const char *mode)
-{
- int fd;
- if (!spec || *spec == '\0')
- return NULL;
- fd = open_gen_fd(spec);
- if (fd == -1)
- return NULL;
- return fdopen(fd, mode);
-}
-
-/*
- * Name: open_logs
- *
- * Description: Opens access log, error log, and if specified, cgi log
- * Ties stderr to error log, except during cgi execution, at which
- * time cgi log is the stderr for cgis.
- *
- * Access log is line buffered, error log is not buffered.
- *
- */
-
-void open_logs(void)
-{
- int error_log;
-
- /* if error_log_name is set, dup2 stderr to it */
- /* otherwise, leave stderr alone */
- /* we don't want to tie stderr to /dev/null */
- if (error_log_name) {
- /* open the log file */
- if (!(error_log = open_gen_fd(error_log_name))) {
- DIE("unable to open error log");
- }
-
- /* redirect stderr to error_log */
- if (dup2(error_log, STDERR_FILENO) == -1) {
- DIE("unable to dup2 the error log");
- }
- close(error_log);
- }
-
- /* set the close-on-exec to true */
- if (fcntl(STDERR_FILENO, F_SETFD, 1) == -1) {
- DIE("unable to fcntl the error log");
- }
-
- if (access_log_name) {
- /* Used the "a" flag with fopen, but fopen_gen_fd builds that in
- * implicitly when used as a file, and "a" is incompatible with
- * pipes and network sockets. */
- if (!(access_log = fopen_gen_fd(access_log_name, "w"))) {
- int errno_save = errno;
- fprintf(stderr, "Cannot open %s for logging: ",
- access_log_name);
- errno = errno_save;
- perror("logfile open");
- exit(errno);
- }
- /* line buffer the access log */
-#ifdef SETVBUF_REVERSED
- setvbuf(access_log, _IOLBF, (char *) NULL, 0);
-#else
- setvbuf(access_log, (char *) NULL, _IOLBF, 0);
-#endif
- } else
- access_log = NULL;
-
- if (cgi_log_name) {
- cgi_log_fd = open_gen_fd(cgi_log_name);
- if (cgi_log_fd == -1) {
- WARN("open cgi_log");
- free(cgi_log_name);
- cgi_log_name = NULL;
- cgi_log_fd = 0;
- } else {
- if (fcntl(cgi_log_fd, F_SETFD, 1) == -1) {
- WARN("unable to set close-on-exec flag for cgi_log");
- close(cgi_log_fd);
- cgi_log_fd = 0;
- free(cgi_log_name);
- cgi_log_name = NULL;
- }
- }
- }
-}
-
-/*
- * Name: close_access_log
- *
- * Description: closes access_log file
- */
-void close_access_log(void)
-{
- if (access_log)
- fclose(access_log);
-}
-
-/*
- * Name: log_access
- *
- * Description: Writes log data to access_log.
- */
-
-void log_access(request * req)
-{
- if (access_log) {
- if (virtualhost)
- fprintf(access_log, "%s ", req->local_ip_addr);
- fprintf(access_log, "%s - - %s\"%s\" %d %ld \"%s\" \"%s\"\n",
- req->remote_ip_addr,
- get_commonlog_time(),
- req->logline,
- req->response_status,
- req->filepos,
- (req->header_referer ? req->header_referer : "-"),
- (req->header_user_agent ? req->header_user_agent : "-"));
-
- }
-}
-
-/*
- * Name: log_error_doc
- *
- * Description: Logs the current time and transaction identification
- * to the stderr (the error log):
- * should always be followed by an fprintf to stderr
- *
- * This function used to be implemented with a big fprintf, but not
- * all fprintf's are reliable in the face of null string pointers
- * (SunOS, in particular). As long as I had to add the checks for
- * null pointers, I changed from fprintf to fputs.
- *
- * Example output:
- [08/Nov/1997:01:05:03 -0600] request from 192.228.331.232 "GET /~joeblow/dir/ HTTP/1.0" ("/usr/user1/joeblow/public_html/dir/"): write: Broken pipe
- */
-
-void log_error_doc(request * req)
-{
- int errno_save = errno;
-
- fprintf(stderr, "%srequest from %s \"%s\" (\"%s\"): ",
- get_commonlog_time(),
- req->remote_ip_addr,
- (req->logline != NULL ?
- req->logline : "(null)"),
- (req->pathname != NULL ? req->pathname : "(null)"));
-
- errno = errno_save;
-}
-
-/*
- * Name: boa_perror
- *
- * Description: logs an error to user and error file both
- *
- */
-void boa_perror(request * req, char *message)
-{
- log_error_doc(req);
- perror(message); /* don't need to save errno because log_error_doc does */
- send_r_error(req);
-}
-
-/*
- * Name: log_error_time
- *
- * Description: Logs the current time to the stderr (the error log):
- * should always be followed by an fprintf to stderr
- */
-
-void log_error_time()
-{
- int errno_save = errno;
- fputs(get_commonlog_time(), stderr);
- errno = errno_save;
-}
-
-/*
- * Name: log_error_mesg
- *
- * Description: performs a log_error_time, writes the file and lineno
- * to stderr (saving errno), and then a perror with message
- *
- */
-
-void log_error_mesg(char *file, int line, char *mesg)
-{
- int errno_save = errno;
- fprintf(stderr, "%s%s:%d - ", get_commonlog_time(), file, line);
- errno = errno_save;
- perror(mesg);
- errno = errno_save;
-}
diff --git a/linux-tools/boa-0.94.13/src/mmap_cache.c b/linux-tools/boa-0.94.13/src/mmap_cache.c
deleted file mode 100644
index 0f95405c5f..0000000000
--- a/linux-tools/boa-0.94.13/src/mmap_cache.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1999 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: mmap_cache.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-
-int mmap_list_entries_used = 0;
-int mmap_list_total_requests = 0;
-int mmap_list_hash_bounces = 0;
-
-/* define local table variable */
-static struct mmap_entry mmap_list[MMAP_LIST_SIZE];
-
-struct mmap_entry *find_mmap(int data_fd, struct stat *s)
-{
- char *m;
- int i, start;
- mmap_list_total_requests++;
- i = start = MMAP_LIST_HASH(s->st_dev, s->st_ino, s->st_size);
- for (; mmap_list[i].use_count;) {
- if (mmap_list[i].dev == s->st_dev &&
- mmap_list[i].ino == s->st_ino &&
- mmap_list[i].len == s->st_size) {
- mmap_list[i].use_count++;
-#ifdef DEBUG
- fprintf(stderr,
- "Old mmap_list entry %d use_count now %d (hash was %d)\n",
- i, mmap_list[i].use_count, start);
-#endif
- return mmap_list + i;
- }
- mmap_list_hash_bounces++;
- i = MMAP_LIST_NEXT(i);
- /* Shouldn't happen, because of size limit enforcement below */
- if (i == start)
- return NULL;
- }
- /* didn't find an entry that matches our dev/inode/size.
- There might be an entry that matches later in the table,
- but that _should_ be rare. The worst case is that we
- needlessly mmap() a file that is already mmap'd, but we
- did that all the time before this code was written,
- so it shouldn't be _too_ bad.
- */
-
- /* Enforce a size limit here */
- if (mmap_list_entries_used > MMAP_LIST_USE_MAX)
- return NULL;
-
- m = mmap(0, s->st_size, PROT_READ, MAP_OPTIONS, data_fd, 0);
-
- if ((int) m == -1) {
- /* boa_perror(req,"mmap"); */
- return NULL;
- }
-#ifdef DEBUG
- fprintf(stderr, "New mmap_list entry %d (hash was %d)\n", i, h);
-#endif
- mmap_list_entries_used++;
- mmap_list[i].dev = s->st_dev;
- mmap_list[i].ino = s->st_ino;
- mmap_list[i].len = s->st_size;
- mmap_list[i].mmap = m;
- mmap_list[i].use_count = 1;
- return mmap_list + i;
-}
-
-void release_mmap(struct mmap_entry *e)
-{
- if (!e)
- return;
- if (!e->use_count) {
-#ifdef DEBUG
- fprintf(stderr, "mmap_list(%p)->use_count already zero!\n", e);
-#endif
- return;
- }
- if (!--(e->use_count)) {
- munmap(e->mmap, e->len);
- mmap_list_entries_used--;
- }
-}
-
-struct mmap_entry *find_named_mmap(char *fname)
-{
- int data_fd;
- struct stat statbuf;
- struct mmap_entry *e;
- data_fd = open(fname, O_RDONLY);
- if (data_fd == -1) {
- perror(fname);
- return NULL;
- }
- fstat(data_fd, &statbuf);
- if (S_ISDIR(statbuf.st_mode)) {
-#ifdef DEBUG
- fprintf(stderr, "%s is a directory\n", fname);
-#endif
- return NULL;
- }
-
- e = find_mmap(data_fd, &statbuf);
- close(data_fd);
- return e;
-}
-
-/*
- int main(int argc, char *argv[])
- {
- #define MAXTEST 2048
- struct mmap_entry *mlist[MAXTEST];
- char name[1024], *s;
- int i, tests=0;
- while (fgets(name,sizeof(name),stdin) && tests < MAXTEST) {
- if (name[0]=='-') {
- i=atoi(name+1);
- release_mmap(mlist[i]);
- mlist[i]=NULL;
- } else {
- if ((s=strchr(name,'\n'))) *s='\0';
- mlist[tests] = find_named_mmap(name);
- if (mlist[tests]) tests++;
- else fprintf(stderr, "find_named_mmap(%s) failed\n",name);
- }
- }
- fprintf(stderr, "mmap_list entries_used=%d ",mmap_list_entries_used);
- fprintf(stderr, "total_requests=%d ",mmap_list_total_requests);
- fprintf(stderr, "hash_bounces=%d\n",mmap_list_hash_bounces);
- for (i=0; i<tests; i++) release_mmap(mlist[i]);
- fprintf(stderr, "mmap_list entries_used=%d ",mmap_list_entries_used);
- fprintf(stderr, "total_requests=%d ",mmap_list_total_requests);
- fprintf(stderr, "hash_bounces=%d\n",mmap_list_hash_bounces);
-
-*/
diff --git a/linux-tools/boa-0.94.13/src/parse.h b/linux-tools/boa-0.94.13/src/parse.h
deleted file mode 100644
index 065758ae2d..0000000000
--- a/linux-tools/boa-0.94.13/src/parse.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1999 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * parse.h
- * minimum interaction point between Boa's parser (boa_lexer.l and
- * boa_grammar.y) and the rest of Boa.
- */
-
-/* $Id: parse.h,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-struct ccommand {
- char *name;
- int type;
- void (*action) (char *, char *, void *);
- void *object;
-};
-struct ccommand *lookup_keyword(char *c);
-void add_mime_type(char *extension, char *type);
diff --git a/linux-tools/boa-0.94.13/src/pipe.c b/linux-tools/boa-0.94.13/src/pipe.c
deleted file mode 100644
index b36f1128de..0000000000
--- a/linux-tools/boa-0.94.13/src/pipe.c
+++ /dev/null
@@ -1,136 +0,0 @@
-
-/*
- * Boa, an http server
- * Based on code Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1997-99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: pipe.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-
-/*
- * Name: read_from_pipe
- * Description: Reads data from a pipe
- *
- * Return values:
- * -1: request blocked, move to blocked queue
- * 0: EOF or error, close it down
- * 1: successful read, recycle in ready queue
- */
-
-int read_from_pipe(request * req)
-{
- int bytes_read, bytes_to_read =
- BUFFER_SIZE - (req->header_end - req->buffer);
-
- if (bytes_to_read == 0) { /* buffer full */
- if (req->cgi_status == CGI_PARSE) { /* got+parsed header */
- req->cgi_status = CGI_BUFFER;
- *req->header_end = '\0'; /* points to end of read data */
- /* Could the above statement overwrite data???
- No, because req->header_end points to where new data
- should begin, not where old data is.
- */
- return process_cgi_header(req); /* cgi_status will change */
- }
- req->status = PIPE_WRITE;
- return 1;
- }
-
- bytes_read = read(req->data_fd, req->header_end, bytes_to_read);
-#ifdef FASCIST_LOGGING
- if (bytes_read > 0) {
- *(req->header_end + bytes_read) = '\0';
- fprintf(stderr, "pipe.c - read %d bytes: \"%s\"\n",
- bytes_read, req->header_end);
- } else
- fprintf(stderr, "pipe.c - read %d bytes\n", bytes_read);
- fprintf(stderr, "status, cgi_status: %d, %d\n", req->status,
- req->cgi_status);
-#endif
-
- if (bytes_read == -1) {
- if (errno == EINTR)
- return 1;
- else if (errno == EWOULDBLOCK || errno == EAGAIN)
- return -1; /* request blocked at the pipe level, but keep going */
- else {
- req->status = DEAD;
- log_error_doc(req);
- perror("pipe read");
- return 0;
- }
- } else if (bytes_read == 0) { /* eof, write rest of buffer */
- req->status = PIPE_WRITE;
- if (req->cgi_status == CGI_PARSE) { /* hasn't processed header yet */
- req->cgi_status = CGI_DONE;
- *req->header_end = '\0'; /* points to end of read data */
- return process_cgi_header(req); /* cgi_status will change */
- }
- req->cgi_status = CGI_DONE;
- return 1;
- }
- req->header_end += bytes_read;
- return 1;
-}
-
-/*
- * Name: write_from_pipe
- * Description: Writes data previously read from a pipe
- *
- * Return values:
- * -1: request blocked, move to blocked queue
- * 0: EOF or error, close it down
- * 1: successful write, recycle in ready queue
- */
-
-int write_from_pipe(request * req)
-{
- int bytes_written, bytes_to_write = req->header_end - req->header_line;
-
- if (bytes_to_write == 0) {
- if (req->cgi_status == CGI_DONE)
- return 0;
-
- req->status = PIPE_READ;
- req->header_end = req->header_line = req->buffer;
- return 1;
- }
-
- bytes_written = write(req->fd, req->header_line, bytes_to_write);
-
- if (bytes_written == -1) {
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return -1; /* request blocked at the pipe level, but keep going */
- else if (errno == EINTR)
- return 1;
- else {
- req->status = DEAD;
- send_r_error(req); /* maybe superfluous */
- log_error_doc(req);
- perror("pipe write");
- return 0;
- }
- }
-
- req->header_line += bytes_written;
- req->filepos += bytes_written;
-
- return 1;
-}
diff --git a/linux-tools/boa-0.94.13/src/queue.c b/linux-tools/boa-0.94.13/src/queue.c
deleted file mode 100644
index 53c8f35740..0000000000
--- a/linux-tools/boa-0.94.13/src/queue.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1997 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: queue.c,v 1.1.1.1 2006/05/19 13:20:16 fleury Exp $*/
-
-#include "boa.h"
-
-request *request_ready = NULL; /* ready list head */
-request *request_block = NULL; /* blocked list head */
-request *request_free = NULL; /* free list head */
-
-/*
- * Name: block_request
- *
- * Description: Moves a request from the ready queue to the blocked queue
- */
-
-void block_request(request * req)
-{
- dequeue(&request_ready, req);
- enqueue(&request_block, req);
-
- if (req->buffer_end) {
- BOA_FD_SET(req->fd, &block_write_fdset);
- } else {
- switch (req->status) {
- case WRITE:
- case PIPE_WRITE:
- case DONE:
- BOA_FD_SET(req->fd, &block_write_fdset);
- break;
- case PIPE_READ:
- BOA_FD_SET(req->data_fd, &block_read_fdset);
- break;
- case BODY_WRITE:
- BOA_FD_SET(req->post_data_fd, &block_write_fdset);
- break;
- default:
- BOA_FD_SET(req->fd, &block_read_fdset);
- break;
- }
- }
-}
-
-/*
- * Name: ready_request
- *
- * Description: Moves a request from the blocked queue to the ready queue
- */
-
-void ready_request(request * req)
-{
- dequeue(&request_block, req);
- enqueue(&request_ready, req);
-
- if (req->buffer_end) {
- FD_CLR(req->fd, &block_write_fdset);
- } else {
- switch (req->status) {
- case WRITE:
- case PIPE_WRITE:
- case DONE:
- FD_CLR(req->fd, &block_write_fdset);
- break;
- case PIPE_READ:
- FD_CLR(req->data_fd, &block_read_fdset);
- break;
- case BODY_WRITE:
- FD_CLR(req->post_data_fd, &block_write_fdset);
- break;
- default:
- FD_CLR(req->fd, &block_read_fdset);
- }
- }
-}
-
-
-/*
- * Name: dequeue
- *
- * Description: Removes a request from its current queue
- */
-
-void dequeue(request ** head, request * req)
-{
- if (*head == req)
- *head = req->next;
-
- if (req->prev)
- req->prev->next = req->next;
- if (req->next)
- req->next->prev = req->prev;
-
- req->next = NULL;
- req->prev = NULL;
-}
-
-/*
- * Name: enqueue
- *
- * Description: Adds a request to the head of a queue
- */
-
-void enqueue(request ** head, request * req)
-{
- if (*head)
- (*head)->prev = req; /* previous head's prev is us */
-
- req->next = *head; /* our next is previous head */
- req->prev = NULL; /* first in list */
-
- *head = req; /* now we are head */
-}
diff --git a/linux-tools/boa-0.94.13/src/read.c b/linux-tools/boa-0.94.13/src/read.c
deleted file mode 100644
index cd109ff14c..0000000000
--- a/linux-tools/boa-0.94.13/src/read.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,97 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1997,99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: read.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-
-/*
- * Name: read_header
- * Description: Reads data from a request socket. Manages the current
- * status via a state machine. Changes status from READ_HEADER to
- * READ_BODY or WRITE as necessary.
- *
- * Return values:
- * -1: request blocked, move to blocked queue
- * 0: request done, close it down
- * 1: more to do, leave on ready list
- */
-
-int read_header(request * req)
-{
- int bytes, buf_bytes_left;
- char *check, *buffer;
-
- check = req->client_stream + req->parse_pos;
- buffer = req->client_stream;
- bytes = req->client_stream_pos;
-
-#ifdef VERY_FASCIST_LOGGING
- if (check < (buffer + bytes)) {
- buffer[bytes] = '\0';
- log_error_time();
- fprintf(stderr, "%s:%d - Parsing headers (\"%s\")\n",
- __FILE__, __LINE__, check);
- }
-#endif
- while (check < (buffer + bytes)) {
- switch (req->status) {
- case READ_HEADER:
- if (*check == '\r') {
- req->status = ONE_CR;
- req->header_end = check;
- } else if (*check == '\n') {
- req->status = ONE_LF;
- req->header_end = check;
- }
- break;
-
- case ONE_CR:
- if (*check == '\n')
- req->status = ONE_LF;
- else if (*check != '\r')
- req->status = READ_HEADER;
- break;
-
- case ONE_LF:
- /* if here, we've found the end (for sure) of a header */
- if (*check == '\r') /* could be end o headers */
- req->status = TWO_CR;
- else if (*check == '\n')
- req->status = BODY_READ;
- else
- req->status = READ_HEADER;
- break;
-
- case TWO_CR:
- if (*check == '\n')
- req->status = BODY_READ;
- else if (*check != '\r')
- req->status = READ_HEADER;
- break;
-
- default:
- break;
- }
-
-#ifdef VERY_FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "status, check: %d, %d\n", req->status, *check);
-#endif
-
- req->parse_pos++; /* update parse position */
- check++;
-
- if (req->status == ONE_LF) {
- *req->header_end = '\0';
-
- /* terminate string that begins at req->header_line */
-
- if (req->logline) {
- if (process_option_line(req) == 0) {
- return 0;
- }
- } else {
- if (process_logline(req) == 0)
- return 0;
- if (req->simple)
- return process_header_end(req);
- }
- /* set header_line to point to beginning of new header */
- req->header_line = check;
- } else if (req->status == BODY_READ) {
-#ifdef VERY_FASCIST_LOGGING
- int retval;
- log_error_time();
- fprintf(stderr, "%s:%d -- got to body read.\n",
- __FILE__, __LINE__);
- retval = process_header_end(req);
-#else
- int retval = process_header_end(req);
-#endif
- /* process_header_end inits non-POST cgi's */
-
- if (retval && req->method == M_POST) {
- /* for body_{read,write}, set header_line to start of data,
- and header_end to end of data */
- req->header_line = check;
- req->header_end =
- req->client_stream + req->client_stream_pos;
-
- req->status = BODY_WRITE;
- /* so write it */
- /* have to write first, or read will be confused
- * because of the special case where the
- * filesize is less than we have already read.
- */
-
- /*
-
- As quoted from RFC1945:
-
- A valid Content-Length is required on all HTTP/1.0 POST requests. An
- HTTP/1.0 server should respond with a 400 (bad request) message if it
- cannot determine the length of the request message's content.
-
- */
-
- if (req->content_length) {
- int content_length;
-
- content_length = boa_atoi(req->content_length);
- /* Is a content-length of 0 legal? */
- if (content_length <= 0) {
- log_error_time();
- fprintf(stderr, "Invalid Content-Length [%s] on POST!\n",
- req->content_length);
- send_r_bad_request(req);
- return 0;
- }
- if (single_post_limit && content_length > single_post_limit) {
- log_error_time();
- fprintf(stderr, "Content-Length [%d] > SinglePostLimit [%d] on POST!\n",
- content_length, single_post_limit);
- send_r_bad_request(req);
- return 0;
- }
- req->filesize = content_length;
- req->filepos = 0;
- if (req->header_end - req->header_line > req->filesize) {
- req->header_end = req->header_line + req->filesize;
- }
- } else {
- log_error_time();
- fprintf(stderr, "Unknown Content-Length POST!\n");
- send_r_bad_request(req);
- return 0;
- }
- } /* either process_header_end failed or req->method != POST */
- return retval; /* 0 - close it done, 1 - keep on ready */
- } /* req->status == BODY_READ */
- } /* done processing available buffer */
-
-#ifdef VERY_FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "%s:%d - Done processing buffer. Status: %d\n",
- __FILE__, __LINE__, req->status);
-#endif
-
- if (req->status < BODY_READ) {
- /* only reached if request is split across more than one packet */
-
- buf_bytes_left = CLIENT_STREAM_SIZE - req->client_stream_pos;
- if (buf_bytes_left < 1) {
- log_error_time();
- fputs("buffer overrun - read.c, read_header - closing\n",
- stderr);
- req->status = DEAD;
- return 0;
- }
-
- bytes = read(req->fd, buffer + req->client_stream_pos, buf_bytes_left);
-
- if (bytes < 0) {
- if (errno == EINTR)
- return 1;
- if (errno == EAGAIN || errno == EWOULDBLOCK) /* request blocked */
- return -1;
- /*
- else if (errno == EBADF || errno == EPIPE) {
-
- req->status = DEAD;
- return 0;
- */
- log_error_doc(req);
- perror("header read"); /* don't need to save errno because log_error_doc does */
- return 0;
- } else if (bytes == 0) {
- /*
- log_error_time();
- fputs("unexpected end of headers\n", stderr);
- */
- return 0;
- }
-
- /* bytes is positive */
- req->client_stream_pos += bytes;
-
-#ifdef FASCIST_LOGGING1
- log_error_time();
- req->client_stream[req->client_stream_pos] = '\0';
- fprintf(stderr, "%s:%d -- We read %d bytes: \"%s\"\n",
- __FILE__, __LINE__, bytes,
-#ifdef VERY_FASCIST_LOGGING2
- req->client_stream + req->client_stream_pos - bytes);
-#else
- "");
-#endif
-#endif
-
- return 1;
- }
- return 1;
-}
-
-/*
- * Name: read_body
- * Description: Reads body from a request socket for POST CGI
- *
- * Return values:
- *
- * -1: request blocked, move to blocked queue
- * 0: request done, close it down
- * 1: more to do, leave on ready list
- *
-
- As quoted from RFC1945:
-
- A valid Content-Length is required on all HTTP/1.0 POST requests. An
- HTTP/1.0 server should respond with a 400 (bad request) message if it
- cannot determine the length of the request message's content.
-
- */
-
-int read_body(request * req)
-{
- int bytes_read, bytes_to_read, bytes_free;
-
- bytes_free = BUFFER_SIZE - (req->header_end - req->header_line);
- bytes_to_read = req->filesize - req->filepos;
-
- if (bytes_to_read > bytes_free)
- bytes_to_read = bytes_free;
-
- if (bytes_to_read <= 0) {
- req->status = BODY_WRITE; /* go write it */
- return 1;
- }
-
- bytes_read = read(req->fd, req->header_end, bytes_to_read);
-
- if (bytes_read == -1) {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
- /*
- req->status = BODY_WRITE;
- return 1;
- */
- return -1;
- } else {
- boa_perror(req, "read body");
- return 0;
- }
- } else if (bytes_read == 0) {
- /* this is an error. premature end of body! */
- log_error_time();
- fprintf(stderr, "%s:%d - Premature end of body!!\n",
- __FILE__, __LINE__);
- send_r_bad_request(req);
- return 0;
- }
-
- req->status = BODY_WRITE;
-
-#ifdef FASCIST_LOGGING1
- log_error_time();
- fprintf(stderr, "%s:%d - read %d bytes.\n",
- __FILE__, __LINE__, bytes_to_read);
-#endif
-
- req->header_end += bytes_read;
-
- return 1;
-}
-
-/*
- * Name: write_body
- * Description: Writes a chunk of data to a file
- *
- * Return values:
- * -1: request blocked, move to blocked queue
- * 0: EOF or error, close it down
- * 1: successful write, recycle in ready queue
- */
-
-int write_body(request * req)
-{
- int bytes_written, bytes_to_write = req->header_end - req->header_line;
- if (req->filepos + bytes_to_write > req->filesize)
- bytes_to_write = req->filesize - req->filepos;
-
- if (bytes_to_write == 0) { /* nothing left in buffer to write */
- req->header_line = req->header_end = req->buffer;
- if (req->filepos >= req->filesize)
- return init_cgi(req);
- /* if here, we can safely assume that there is more to read */
- req->status = BODY_READ;
- return 1;
- }
- bytes_written = write(req->post_data_fd,
- req->header_line, bytes_to_write);
-
- if (bytes_written == -1) {
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return -1; /* request blocked at the pipe level, but keep going */
- else if (errno == EINTR)
- return 1;
- else if (errno == ENOSPC) {
- /* 20010520 - Alfred Fluckiger */
- /* No test was originally done in this case, which might */
- /* lead to a "no space left on device" error. */
- boa_perror(req, "write body"); /* OK to disable if your logs get too big */
- return 0;
- } else {
- boa_perror(req, "write body"); /* OK to disable if your logs get too big */
- return 0;
- }
- }
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "%s:%d - wrote %d bytes. %ld of %ld\n",
- __FILE__, __LINE__,
- bytes_written, req->filepos, req->filesize);
-#endif
-
- req->filepos += bytes_written;
- req->header_line += bytes_written;
-
- return 1; /* more to do */
-}
diff --git a/linux-tools/boa-0.94.13/src/request.c b/linux-tools/boa-0.94.13/src/request.c
deleted file mode 100644
index 66947da80e..0000000000
--- a/linux-tools/boa-0.94.13/src/request.c
+++ /dev/null
@@ -1,749 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,97 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: request.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-#include <stddef.h> /* for offsetof */
-
-int total_connections;
-struct status status;
-
-static int sockbufsize = SOCKETBUF_SIZE;
-
-/* function prototypes located in this file only */
-static void free_request(request ** list_head_addr, request * req);
-
-/*
- * Name: new_request
- * Description: Obtains a request struct off the free list, or if the
- * free list is empty, allocates memory
- *
- * Return value: pointer to initialized request
- */
-
-request *new_request(void)
-{
- request *req;
-
- if (request_free) {
- req = request_free; /* first on free list */
- dequeue(&request_free, request_free); /* dequeue the head */
- } else {
- req = (request *) malloc(sizeof (request));
- if (!req) {
- log_error_time();
- perror("malloc for new request");
- return NULL;
- }
- }
-
- memset(req, 0, offsetof(request, buffer) + 1);
-
- return req;
-}
-
-/*
- * Name: get_request
- *
- * Description: Polls the server socket for a request. If one exists,
- * does some basic initialization and adds it to the ready queue;.
- */
-
-void get_request(int server_s)
-{
- int fd; /* socket */
- struct SOCKADDR remote_addr; /* address */
- struct SOCKADDR salocal;
- int remote_addrlen = sizeof (struct SOCKADDR);
- request *conn; /* connection */
- size_t len;
- static int system_bufsize = 0; /* Default size of SNDBUF given by system */
-
- remote_addr.S_FAMILY = 0xdead;
- fd = accept(server_s, (struct sockaddr *) &remote_addr,
- &remote_addrlen);
-
- if (fd == -1) {
- if (errno != EAGAIN && errno != EWOULDBLOCK)
- /* abnormal error */
- WARN("accept");
- else
- /* no requests */
- pending_requests = 0;
- return;
- }
- if (fd >= FD_SETSIZE) {
- WARN("Got fd >= FD_SETSIZE.");
- close(fd);
- return;
- }
-#ifdef DEBUGNONINET
- /* This shows up due to race conditions in some Linux kernels
- when the client closes the socket sometime between
- the select() and accept() syscalls.
- Code and description by Larry Doolittle <ldoolitt@boa.org>
- */
-#define HEX(x) (((x)>9)?(('a'-10)+(x)):('0'+(x)))
- if (remote_addr.sin_family != AF_INET) {
- struct sockaddr *bogus = (struct sockaddr *) &remote_addr;
- char *ap, ablock[44];
- int i;
- close(fd);
- log_error_time();
- for (ap = ablock, i = 0; i < remote_addrlen && i < 14; i++) {
- *ap++ = ' ';
- *ap++ = HEX((bogus->sa_data[i] >> 4) & 0x0f);
- *ap++ = HEX(bogus->sa_data[i] & 0x0f);
- }
- *ap = '\0';
- fprintf(stderr, "non-INET connection attempt: socket %d, "
- "sa_family = %hu, sa_data[%d] = %s\n",
- fd, bogus->sa_family, remote_addrlen, ablock);
- return;
- }
-#endif
-
-/* XXX Either delete this, or document why it's needed */
-/* Pointed out 3-Oct-1999 by Paul Saab <paul@mu.org> */
-#ifdef REUSE_EACH_CLIENT_CONNECTION_SOCKET
- if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *) &sock_opt,
- sizeof (sock_opt))) == -1) {
- DIE("setsockopt: unable to set SO_REUSEADDR");
- }
-#endif
-
- len = sizeof(salocal);
-
- if (getsockname(fd, (struct sockaddr *) &salocal, &len) != 0) {
- WARN("getsockname");
- close(fd);
- return;
- }
-
- conn = new_request();
- if (!conn) {
- close(fd);
- return;
- }
- conn->fd = fd;
- conn->status = READ_HEADER;
- conn->header_line = conn->client_stream;
- conn->time_last = current_time;
- conn->kacount = ka_max;
-
- ascii_sockaddr(&salocal, conn->local_ip_addr, NI_MAXHOST);
-
- /* nonblocking socket */
- if (set_nonblock_fd(conn->fd) == -1)
- WARN("fcntl: unable to set new socket to non-block");
-
- /* set close on exec to true */
- if (fcntl(conn->fd, F_SETFD, 1) == -1)
- WARN("fctnl: unable to set close-on-exec for new socket");
-
- /* Increase buffer size if we have to.
- * Only ask the system the buffer size on the first request,
- * and assume all subsequent sockets have the same size.
- */
- if (system_bufsize == 0) {
- len = sizeof (system_bufsize);
- if (getsockopt
- (conn->fd, SOL_SOCKET, SO_SNDBUF, &system_bufsize, &len) == 0
- && len == sizeof (system_bufsize)) {
- /*
- fprintf(stderr, "%sgetsockopt reports SNDBUF %d\n",
- get_commonlog_time(), system_bufsize);
- */
- ;
- } else {
- WARN("getsockopt(SNDBUF)");
- system_bufsize = 1;
- }
- }
- if (system_bufsize < sockbufsize) {
- if (setsockopt
- (conn->fd, SOL_SOCKET, SO_SNDBUF, (void *) &sockbufsize,
- sizeof (sockbufsize)) == -1) {
- WARN("setsockopt: unable to set socket buffer size");
-#ifdef DIE_ON_ERROR_TUNING_SNDBUF
- exit(errno);
-#endif
- }
- }
-
- /* for log file and possible use by CGI programs */
- ascii_sockaddr(&remote_addr, conn->remote_ip_addr, NI_MAXHOST);
-
- /* for possible use by CGI programs */
- conn->remote_port = net_port(&remote_addr);
-
- status.requests++;
-
-#ifdef USE_TCPNODELAY
- /* Thanks to Jef Poskanzer <jef@acme.com> for this tweak */
- {
- int one = 1;
- if (setsockopt(conn->fd, IPPROTO_TCP, TCP_NODELAY,
- (void *) &one, sizeof (one)) == -1) {
- DIE("setsockopt: unable to set TCP_NODELAY");
- }
-
- }
-#endif
-
-#ifndef NO_RATE_LIMIT
- if (conn->fd > max_connections) {
- send_r_service_unavailable(conn);
- conn->status = DONE;
- pending_requests = 0;
- }
-#endif /* NO_RATE_LIMIT */
-
- total_connections++;
- enqueue(&request_ready, conn);
-}
-
-
-/*
- * Name: free_request
- *
- * Description: Deallocates memory for a finished request and closes
- * down socket.
- */
-
-static void free_request(request ** list_head_addr, request * req)
-{
- int i;
- /* free_request should *never* get called by anything but
- process_requests */
-
- if (req->buffer_end && req->status != DEAD) {
- req->status = DONE;
- return;
- }
- /* put request on the free list */
- dequeue(list_head_addr, req); /* dequeue from ready or block list */
-
- if (req->logline) /* access log */
- log_access(req);
-
- if (req->mmap_entry_var)
- release_mmap(req->mmap_entry_var);
- else if (req->data_mem)
- munmap(req->data_mem, req->filesize);
-
- if (req->data_fd)
- close(req->data_fd);
-
- if (req->post_data_fd)
- close(req->post_data_fd);
-
- if (req->response_status >= 400)
- status.errors++;
-
- for (i = COMMON_CGI_COUNT; i < req->cgi_env_index; ++i) {
- if (req->cgi_env[i]) {
- free(req->cgi_env[i]);
- } else {
- log_error_time();
- fprintf(stderr, "Warning: CGI Environment contains NULL value" \
- "(index %d of %d).\n", i, req->cgi_env_index);
- }
- }
-
- if (req->pathname)
- free(req->pathname);
- if (req->path_info)
- free(req->path_info);
- if (req->path_translated)
- free(req->path_translated);
- if (req->script_name)
- free(req->script_name);
-
- if ((req->keepalive == KA_ACTIVE) &&
- (req->response_status < 500) && req->kacount > 0) {
- int bytes_to_move;
-
- request *conn = new_request();
- if (!conn) {
- /* errors already reported */
- enqueue(&request_free, req);
- close(req->fd);
- total_connections--;
- return;
- }
- conn->fd = req->fd;
- conn->status = READ_HEADER;
- conn->header_line = conn->client_stream;
- conn->kacount = req->kacount - 1;
-
- /* close enough and we avoid a call to time(NULL) */
- conn->time_last = req->time_last;
-
- /* for log file and possible use by CGI programs */
- memcpy(conn->remote_ip_addr, req->remote_ip_addr, NI_MAXHOST);
- memcpy(conn->local_ip_addr, req->local_ip_addr, NI_MAXHOST);
-
- /* for possible use by CGI programs */
- conn->remote_port = req->remote_port;
-
- status.requests++;
-
- /* we haven't parsed beyond req->parse_pos, so... */
- bytes_to_move = req->client_stream_pos - req->parse_pos;
-
- if (bytes_to_move) {
- memcpy(conn->client_stream,
- req->client_stream + req->parse_pos, bytes_to_move);
- conn->client_stream_pos = bytes_to_move;
- }
- enqueue(&request_block, conn);
- BOA_FD_SET(conn->fd, &block_read_fdset);
-
- enqueue(&request_free, req);
- return;
- }
-
- /*
- While debugging some weird errors, Jon Nelson learned that
- some versions of Netscape Navigator break the
- HTTP specification.
-
- Some research on the issue brought up:
-
- http://www.apache.org/docs/misc/known_client_problems.html
-
- As quoted here:
-
- "
- Trailing CRLF on POSTs
-
- This is a legacy issue. The CERN webserver required POST
- data to have an extra CRLF following it. Thus many
- clients send an extra CRLF that is not included in the
- Content-Length of the request. Apache works around this
- problem by eating any empty lines which appear before a
- request.
- "
-
- Boa will (for now) hack around this stupid bug in Netscape
- (and Internet Exploder)
- by reading up to 32k after the connection is all but closed.
- This should eliminate any remaining spurious crlf sent
- by the client.
-
- Building bugs *into* software to be compatable is
- just plain wrong
- */
-
- if (req->method == M_POST) {
- char buf[32768];
- read(req->fd, buf, 32768);
- }
- close(req->fd);
- total_connections--;
-
- enqueue(&request_free, req);
-
- return;
-}
-
-/*
- * Name: process_requests
- *
- * Description: Iterates through the ready queue, passing each request
- * to the appropriate handler for processing. It monitors the
- * return value from handler functions, all of which return -1
- * to indicate a block, 0 on completion and 1 to remain on the
- * ready list for more procesing.
- */
-
-void process_requests(int server_s)
-{
- int retval = 0;
- request *current, *trailer;
-
- if (pending_requests) {
- get_request(server_s);
-#ifdef ORIGINAL_BEHAVIOR
- pending_requests = 0;
-#endif
- }
-
- current = request_ready;
-
- while (current) {
- time(&current_time);
- if (current->buffer_end && /* there is data in the buffer */
- current->status != DEAD && current->status != DONE) {
- retval = req_flush(current);
- /*
- * retval can be -2=error, -1=blocked, or bytes left
- */
- if (retval == -2) { /* error */
- current->status = DEAD;
- retval = 0;
- } else if (retval >= 0) {
- /* notice the >= which is different from below?
- Here, we may just be flushing headers.
- We don't want to return 0 because we are not DONE
- or DEAD */
-
- retval = 1;
- }
- } else {
- switch (current->status) {
- case READ_HEADER:
- case ONE_CR:
- case ONE_LF:
- case TWO_CR:
- retval = read_header(current);
- break;
- case BODY_READ:
- retval = read_body(current);
- break;
- case BODY_WRITE:
- retval = write_body(current);
- break;
- case WRITE:
- retval = process_get(current);
- break;
- case PIPE_READ:
- retval = read_from_pipe(current);
- break;
- case PIPE_WRITE:
- retval = write_from_pipe(current);
- break;
- case DONE:
- /* a non-status that will terminate the request */
- retval = req_flush(current);
- /*
- * retval can be -2=error, -1=blocked, or bytes left
- */
- if (retval == -2) { /* error */
- current->status = DEAD;
- retval = 0;
- } else if (retval > 0) {
- retval = 1;
- }
- break;
- case DEAD:
- retval = 0;
- current->buffer_end = 0;
- SQUASH_KA(current);
- break;
- default:
- retval = 0;
- fprintf(stderr, "Unknown status (%d), "
- "closing!\n", current->status);
- current->status = DEAD;
- break;
- }
-
- }
-
- if (sigterm_flag)
- SQUASH_KA(current);
-
- /* we put this here instead of after the switch so that
- * if we are on the last request, and get_request is successful,
- * current->next is valid!
- */
- if (pending_requests)
- get_request(server_s);
-
- switch (retval) {
- case -1: /* request blocked */
- trailer = current;
- current = current->next;
- block_request(trailer);
- break;
- case 0: /* request complete */
- current->time_last = current_time;
- trailer = current;
- current = current->next;
- free_request(&request_ready, trailer);
- break;
- case 1: /* more to do */
- current->time_last = current_time;
- current = current->next;
- break;
- default:
- log_error_time();
- fprintf(stderr, "Unknown retval in process.c - "
- "Status: %d, retval: %d\n", current->status, retval);
- current = current->next;
- break;
- }
- }
-}
-
-/*
- * Name: process_logline
- *
- * Description: This is called with the first req->header_line received
- * by a request, called "logline" because it is logged to a file.
- * It is parsed to determine request type and method, then passed to
- * translate_uri for further parsing. Also sets up CGI environment if
- * needed.
- */
-
-int process_logline(request * req)
-{
- char *stop, *stop2;
- static char *SIMPLE_HTTP_VERSION = "HTTP/0.9";
-
- req->logline = req->client_stream;
- if (!memcmp(req->logline, "GET ", 4))
- req->method = M_GET;
- else if (!memcmp(req->logline, "HEAD ", 5))
- /* head is just get w/no body */
- req->method = M_HEAD;
- else if (!memcmp(req->logline, "POST ", 5))
- req->method = M_POST;
- else {
- log_error_time();
- fprintf(stderr, "malformed request: \"%s\"\n", req->logline);
- send_r_not_implemented(req);
- return 0;
- }
-
- req->http_version = SIMPLE_HTTP_VERSION;
- req->simple = 1;
-
- /* Guaranteed to find ' ' since we matched a method above */
- stop = req->logline + 3;
- if (*stop != ' ')
- ++stop;
-
- /* scan to start of non-whitespace */
- while (*(++stop) == ' ');
-
- stop2 = stop;
-
- /* scan to end of non-whitespace */
- while (*stop2 != '\0' && *stop2 != ' ')
- ++stop2;
-
- if (stop2 - stop > MAX_HEADER_LENGTH) {
- log_error_time();
- fprintf(stderr, "URI too long %d: \"%s\"\n", MAX_HEADER_LENGTH,
- req->logline);
- send_r_bad_request(req);
- return 0;
- }
- memcpy(req->request_uri, stop, stop2 - stop);
- req->request_uri[stop2 - stop] = '\0';
-
- if (*stop2 == ' ') {
- /* if found, we should get an HTTP/x.x */
- unsigned int p1, p2;
-
- /* scan to end of whitespace */
- ++stop2;
- while (*stop2 == ' ' && *stop2 != '\0')
- ++stop2;
-
- /* scan in HTTP/major.minor */
- if (sscanf(stop2, "HTTP/%u.%u", &p1, &p2) == 2) {
- /* HTTP/{0.9,1.0,1.1} */
- if (p1 == 1 && (p2 == 0 || p2 == 1)) {
- req->http_version = stop2;
- req->simple = 0;
- } else if (p1 > 1 || (p1 != 0 && p2 > 1)) {
- goto BAD_VERSION;
- }
- } else {
- goto BAD_VERSION;
- }
- }
-
- if (req->method == M_HEAD && req->simple) {
- send_r_bad_request(req);
- return 0;
- }
- req->cgi_env_index = COMMON_CGI_COUNT;
-
- return 1;
-
-BAD_VERSION:
- log_error_time();
- fprintf(stderr, "bogus HTTP version: \"%s\"\n", stop2);
- send_r_bad_request(req);
- return 0;
-}
-
-/*
- * Name: process_header_end
- *
- * Description: takes a request and performs some final checking before
- * init_cgi or init_get
- * Returns 0 for error or NPH, or 1 for success
- */
-
-int process_header_end(request * req)
-{
- if (!req->logline) {
- send_r_error(req);
- return 0;
- }
-
- /* Percent-decode request */
- if (unescape_uri(req->request_uri, &(req->query_string)) == 0) {
- log_error_doc(req);
- fputs("Problem unescaping uri\n", stderr);
- send_r_bad_request(req);
- return 0;
- }
-
- /* clean pathname */
- clean_pathname(req->request_uri);
-
- if (req->request_uri[0] != '/') {
- send_r_bad_request(req);
- return 0;
- }
-
- if (translate_uri(req) == 0) { /* unescape, parse uri */
- SQUASH_KA(req);
- return 0; /* failure, close down */
- }
-
- if (req->method == M_POST) {
- req->post_data_fd = create_temporary_file(1, NULL, 0);
- if (req->post_data_fd == 0)
- return(0);
- return(1); /* success */
- }
-
- if (req->is_cgi) {
- return init_cgi(req);
- }
-
- req->status = WRITE;
- return init_get(req); /* get and head */
-}
-
-/*
- * Name: process_option_line
- *
- * Description: Parses the contents of req->header_line and takes
- * appropriate action.
- */
-
-int process_option_line(request * req)
-{
- char c, *value, *line = req->header_line;
-
- /* Start by aggressively hacking the in-place copy of the header line */
-
-#ifdef FASCIST_LOGGING
- log_error_time();
- fprintf(stderr, "%s:%d - Parsing \"%s\"\n", __FILE__, __LINE__, line);
-#endif
-
- value = strchr(line, ':');
- if (value == NULL)
- return 0;
- *value++ = '\0'; /* overwrite the : */
- to_upper(line); /* header types are case-insensitive */
- while ((c = *value) && (c == ' ' || c == '\t'))
- value++;
-
- if (!memcmp(line, "IF_MODIFIED_SINCE", 18) && !req->if_modified_since)
- req->if_modified_since = value;
-
- else if (!memcmp(line, "CONTENT_TYPE", 13) && !req->content_type)
- req->content_type = value;
-
- else if (!memcmp(line, "CONTENT_LENGTH", 15) && !req->content_length)
- req->content_length = value;
-
- else if (!memcmp(line, "CONNECTION", 11) &&
- ka_max && req->keepalive != KA_STOPPED) {
- req->keepalive = (!strncasecmp(value, "Keep-Alive", 10) ?
- KA_ACTIVE : KA_STOPPED);
- }
- /* #ifdef ACCEPT_ON */
- else if (!memcmp(line, "ACCEPT", 7))
- add_accept_header(req, value);
- /* #endif */
-
- /* Need agent and referer for logs */
- else if (!memcmp(line, "REFERER", 8)) {
- req->header_referer = value;
- if (!add_cgi_env(req, "REFERER", value, 1))
- return 0;
- } else if (!memcmp(line, "USER_AGENT", 11)) {
- req->header_user_agent = value;
- if (!add_cgi_env(req, "USER_AGENT", value, 1))
- return 0;
- } else {
- if (!add_cgi_env(req, line, value, 1))
- return 0;
- }
- return 1;
-}
-
-/*
- * Name: add_accept_header
- * Description: Adds a mime_type to a requests accept char buffer
- * silently ignore any that don't fit -
- * shouldn't happen because of relative buffer sizes
- */
-
-void add_accept_header(request * req, char *mime_type)
-{
-#ifdef ACCEPT_ON
- int l = strlen(req->accept);
- int l2 = strlen(mime_type);
-
- if ((l + l2 + 2) >= MAX_HEADER_LENGTH)
- return;
-
- if (req->accept[0] == '\0')
- strcpy(req->accept, mime_type);
- else {
- req->accept[l] = ',';
- req->accept[l + 1] = ' ';
- memcpy(req->accept + l + 2, mime_type, l2 + 1);
- /* the +1 is for the '\0' */
- /*
- sprintf(req->accept + l, ", %s", mime_type);
- */
- }
-#endif
-}
-
-void free_requests(void)
-{
- request *ptr, *next;
-
- ptr = request_free;
- while (ptr != NULL) {
- next = ptr->next;
- free(ptr);
- ptr = next;
- }
- request_free = NULL;
-}
diff --git a/linux-tools/boa-0.94.13/src/response.c b/linux-tools/boa-0.94.13/src/response.c
deleted file mode 100644
index 6cb2a8c3ef..0000000000
--- a/linux-tools/boa-0.94.13/src/response.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: response.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-
-#define HTML "text/html; charset=ISO-8859-1"
-#define CRLF "\r\n"
-
-void print_content_type(request * req)
-{
- req_write(req, "Content-Type: ");
- req_write(req, get_mime_type(req->request_uri));
- req_write(req, "\r\n");
-}
-
-void print_content_length(request * req)
-{
- req_write(req, "Content-Length: ");
- req_write(req, simple_itoa(req->filesize));
- req_write(req, "\r\n");
-}
-
-void print_last_modified(request * req)
-{
- static char lm[] = "Last-Modified: "
- " " "\r\n";
- rfc822_time_buf(lm + 15, req->last_modified);
- req_write(req, lm);
-}
-
-void print_ka_phrase(request * req)
-{
- if (req->kacount > 0 &&
- req->keepalive == KA_ACTIVE && req->response_status < 500) {
- req_write(req, "Connection: Keep-Alive\r\nKeep-Alive: timeout=");
- req_write(req, simple_itoa(ka_timeout));
- req_write(req, ", max=");
- req_write(req, simple_itoa(req->kacount));
- req_write(req, "\r\n");
- } else
- req_write(req, "Connection: close\r\n");
-}
-
-void print_http_headers(request * req)
-{
- static char stuff[] = "Date: "
- " "
- "\r\nServer: " SERVER_VERSION "\r\n";
-
- rfc822_time_buf(stuff + 6, 0);
- req_write(req, stuff);
- print_ka_phrase(req);
-}
-
-/* The routines above are only called by the routines below.
- * The rest of Boa only enters through the routines below.
- */
-
-/* R_REQUEST_OK: 200 */
-void send_r_request_ok(request * req)
-{
- req->response_status = R_REQUEST_OK;
- if (req->simple)
- return;
-
- req_write(req, "HTTP/1.0 200 OK\r\n");
- print_http_headers(req);
-
- if (!req->is_cgi) {
- print_content_length(req);
- print_last_modified(req);
- print_content_type(req);
- req_write(req, "\r\n");
- }
-}
-
-/* R_MOVED_PERM: 301 */
-void send_r_moved_perm(request * req, char *url)
-{
- SQUASH_KA(req);
- req->response_status = R_MOVED_PERM;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 301 Moved Permanently\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n");
-
- req_write(req, "Location: ");
- req_write_escape_http(req, url);
- req_write(req, "\r\n\r\n");
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>301 Moved Permanently</TITLE></HEAD>\n"
- "<BODY>\n<H1>301 Moved</H1>The document has moved\n"
- "<A HREF=\"");
- req_write_escape_html(req, url);
- req_write(req, "\">here</A>.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_MOVED_TEMP: 302 */
-void send_r_moved_temp(request * req, char *url, char *more_hdr)
-{
- SQUASH_KA(req);
- req->response_status = R_MOVED_TEMP;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 302 Moved Temporarily\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n");
-
- req_write(req, "Location: ");
- req_write_escape_http(req, url);
- req_write(req, "\r\n");
- req_write(req, more_hdr);
- req_write(req, "\r\n\r\n");
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>302 Moved Temporarily</TITLE></HEAD>\n"
- "<BODY>\n<H1>302 Moved</H1>The document has moved\n"
- "<A HREF=\"");
- req_write_escape_html(req, url);
- req_write(req, "\">here</A>.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_NOT_MODIFIED: 304 */
-void send_r_not_modified(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_NOT_MODIFIED;
- req_write(req, "HTTP/1.0 304 Not Modified\r\n");
- print_http_headers(req);
- print_content_type(req);
- req_write(req, "\r\n");
- req_flush(req);
-}
-
-/* R_BAD_REQUEST: 400 */
-void send_r_bad_request(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_BAD_REQUEST;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 400 Bad Request\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD)
- req_write(req,
- "<HTML><HEAD><TITLE>400 Bad Request</TITLE></HEAD>\n"
- "<BODY><H1>400 Bad Request</H1>\nYour client has issued "
- "a malformed or illegal request.\n</BODY></HTML>\n");
- req_flush(req);
-}
-
-/* R_UNAUTHORIZED: 401 */
-void send_r_unauthorized(request * req, char *realm_name)
-{
- SQUASH_KA(req);
- req->response_status = R_UNAUTHORIZED;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 401 Unauthorized\r\n");
- print_http_headers(req);
- req_write(req, "WWW-Authenticate: Basic realm=\"");
- req_write(req, realm_name);
- req_write(req, "\"\r\n");
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>401 Unauthorized</TITLE></HEAD>\n"
- "<BODY><H1>401 Unauthorized</H1>\nYour client does not "
- "have permission to get URL ");
- req_write_escape_html(req, req->request_uri);
- req_write(req, " from this server.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_FORBIDDEN: 403 */
-void send_r_forbidden(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_FORBIDDEN;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 403 Forbidden\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req, "<HTML><HEAD><TITLE>403 Forbidden</TITLE></HEAD>\n"
- "<BODY><H1>403 Forbidden</H1>\nYour client does not "
- "have permission to get URL ");
- req_write_escape_html(req, req->request_uri);
- req_write(req, " from this server.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_NOT_FOUND: 404 */
-void send_r_not_found(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_NOT_FOUND;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 404 Not Found\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req, "<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>\n"
- "<BODY><H1>404 Not Found</H1>\nThe requested URL ");
- req_write_escape_html(req, req->request_uri);
- req_write(req, " was not found on this server.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_ERROR: 500 */
-void send_r_error(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_ERROR;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 500 Server Error\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>500 Server Error</TITLE></HEAD>\n"
- "<BODY><H1>500 Server Error</H1>\nThe server encountered "
- "an internal error and could not complete your request.\n"
- "</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_NOT_IMP: 501 */
-void send_r_not_implemented(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_NOT_IMP;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 501 Not Implemented\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>501 Not Implemented</TITLE></HEAD>\n"
- "<BODY><H1>501 Not Implemented</H1>\nPOST to non-script "
- "is not supported in Boa.\n</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_BAD_GATEWAY: 502 */
-void send_r_bad_gateway(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_BAD_GATEWAY;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 502 Bad Gateway" CRLF);
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML CRLF CRLF); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>502 Bad Gateway</TITLE></HEAD>\n"
- "<BODY><H1>502 Bad Gateway</H1>\nThe CGI was "
- "not CGI/1.1 compliant.\n" "</BODY></HTML>\n");
- }
- req_flush(req);
-}
-
-/* R_SERVICE_UNAVAILABLE: 503 */
-void send_r_service_unavailable(request * req) /* 503 */
-{
- static char body[] =
- "<HTML><HEAD><TITLE>503 Service Unavailable</TITLE></HEAD>\n"
- "<BODY><H1>503 Service Unavailable</H1>\n"
- "There are too many connections in use right now.\r\n"
- "Please try again later.\r\n</BODY></HTML>\n";
- static int _body_len;
- static char *body_len;
-
- if (!_body_len)
- _body_len = strlen(body);
- if (!body_len)
- body_len = strdup(simple_itoa(_body_len));
- if (!body_len) {
- log_error_time();
- perror("strdup of _body_len from simple_itoa");
- }
-
-
- SQUASH_KA(req);
- req->response_status = R_SERVICE_UNAV;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 503 Service Unavailable\r\n");
- print_http_headers(req);
- if (body_len) {
- req_write(req, "Content-Length: ");
- req_write(req, body_len);
- req_write(req, "\r\n");
- }
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header
- */
- }
- if (req->method != M_HEAD) {
- req_write(req, body);
- }
- req_flush(req);
-}
-
-
-/* R_NOT_IMP: 505 */
-void send_r_bad_version(request * req)
-{
- SQUASH_KA(req);
- req->response_status = R_BAD_VERSION;
- if (!req->simple) {
- req_write(req, "HTTP/1.0 505 HTTP Version Not Supported\r\n");
- print_http_headers(req);
- req_write(req, "Content-Type: " HTML "\r\n\r\n"); /* terminate header */
- }
- if (req->method != M_HEAD) {
- req_write(req,
- "<HTML><HEAD><TITLE>505 HTTP Version Not Supported</TITLE></HEAD>\n"
- "<BODY><H1>505 HTTP Version Not Supported</H1>\nHTTP versions "
- "other than 0.9 and 1.0 "
- "are not supported in Boa.\n<p><p>Version encountered: ");
- req_write(req, req->http_version);
- req_write(req, "<p><p></BODY></HTML>\n");
- }
- req_flush(req);
-}
diff --git a/linux-tools/boa-0.94.13/src/select.c b/linux-tools/boa-0.94.13/src/select.c
deleted file mode 100644
index ebbe3c9a10..0000000000
--- a/linux-tools/boa-0.94.13/src/select.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Charles F. Randall <crandall@goldsys.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-2002 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: select.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-
-static void fdset_update(void);
-fd_set block_read_fdset;
-fd_set block_write_fdset;
-static struct timeval req_timeout; /* timeval for select */
-
-void select_loop(int server_s)
-{
- FD_ZERO(&block_read_fdset);
- FD_ZERO(&block_write_fdset);
- /* set server_s and req_timeout */
- req_timeout.tv_sec = (ka_timeout ? ka_timeout : REQUEST_TIMEOUT);
- req_timeout.tv_usec = 0l; /* reset timeout */
-
- /* preset max_fd */
- max_fd = -1;
-
- while (1) {
- if (sighup_flag)
- sighup_run();
- if (sigchld_flag)
- sigchld_run();
- if (sigalrm_flag)
- sigalrm_run();
-
- if (sigterm_flag) {
- if (sigterm_flag == 1)
- sigterm_stage1_run(server_s);
- if (sigterm_flag == 2 && !request_ready && !request_block) {
- sigterm_stage2_run();
- }
- }
-
- /* reset max_fd */
- max_fd = -1;
-
- if (request_block)
- /* move selected req's from request_block to request_ready */
- fdset_update();
-
- /* any blocked req's move from request_ready to request_block */
- process_requests(server_s);
-
- if (!sigterm_flag && total_connections < (max_connections - 10)) {
- BOA_FD_SET(server_s, &block_read_fdset); /* server always set */
- }
-
- req_timeout.tv_sec = (request_ready ? 0 :
- (ka_timeout ? ka_timeout : REQUEST_TIMEOUT));
- req_timeout.tv_usec = 0l; /* reset timeout */
-
- if (select(max_fd + 1, &block_read_fdset,
- &block_write_fdset, NULL,
- (request_ready || request_block ? &req_timeout : NULL)) == -1) {
- /* what is the appropriate thing to do here on EBADF */
- if (errno == EINTR)
- continue; /* while(1) */
- else if (errno != EBADF) {
- DIE("select");
- }
- }
-
- time(&current_time);
- if (FD_ISSET(server_s, &block_read_fdset))
- pending_requests = 1;
- }
-}
-
-/*
- * Name: fdset_update
- *
- * Description: iterate through the blocked requests, checking whether
- * that file descriptor has been set by select. Update the fd_set to
- * reflect current status.
- *
- * Here, we need to do some things:
- * - keepalive timeouts simply close
- * (this is special:: a keepalive timeout is a timeout where
- keepalive is active but nothing has been read yet)
- * - regular timeouts close + error
- * - stuff in buffer and fd ready? write it out
- * - fd ready for other actions? do them
- */
-
-static void fdset_update(void)
-{
- request *current, *next;
-
- for(current = request_block;current;current = next) {
- time_t time_since = current_time - current->time_last;
- next = current->next;
-
- /* hmm, what if we are in "the middle" of a request and not
- * just waiting for a new one... perhaps check to see if anything
- * has been read via header position, etc... */
- if (current->kacount < ka_max && /* we *are* in a keepalive */
- (time_since >= ka_timeout) && /* ka timeout */
- !current->logline) /* haven't read anything yet */
- current->status = DEAD; /* connection keepalive timed out */
- else if (time_since > REQUEST_TIMEOUT) {
- log_error_doc(current);
- fputs("connection timed out\n", stderr);
- current->status = DEAD;
- }
- if (current->buffer_end && current->status < DEAD) {
- if (FD_ISSET(current->fd, &block_write_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->fd, &block_write_fdset);
- }
- } else {
- switch (current->status) {
- case WRITE:
- case PIPE_WRITE:
- if (FD_ISSET(current->fd, &block_write_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->fd, &block_write_fdset);
- }
- break;
- case BODY_WRITE:
- if (FD_ISSET(current->post_data_fd, &block_write_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->post_data_fd, &block_write_fdset);
- }
- break;
- case PIPE_READ:
- if (FD_ISSET(current->data_fd, &block_read_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->data_fd, &block_read_fdset);
- }
- break;
- case DONE:
- if (FD_ISSET(current->fd, &block_write_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->fd, &block_write_fdset);
- }
- break;
- case DEAD:
- ready_request(current);
- break;
- default:
- if (FD_ISSET(current->fd, &block_read_fdset))
- ready_request(current);
- else {
- BOA_FD_SET(current->fd, &block_read_fdset);
- }
- break;
- }
- }
- current = next;
- }
-}
-
diff --git a/linux-tools/boa-0.94.13/src/signals.c b/linux-tools/boa-0.94.13/src/signals.c
deleted file mode 100644
index 0130d18e11..0000000000
--- a/linux-tools/boa-0.94.13/src/signals.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996-99 Jon Nelson <jnelson@boa.org>
- * Some changes Copyright (C) 1997 Alain Magloire <alain.magloire@rcsm.ee.mcgill.ca>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: signals.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h> /* wait */
-#endif
-#include <signal.h> /* signal */
-
-sigjmp_buf env;
-int handle_sigbus;
-
-void sigsegv(int);
-void sigbus(int);
-void sigterm(int);
-void sighup(int);
-void sigint(int);
-void sigchld(int);
-void sigalrm(int);
-
-/*
- * Name: init_signals
- * Description: Sets up signal handlers for all our friends.
- */
-
-void init_signals(void)
-{
- struct sigaction sa;
-
- sa.sa_flags = 0;
-
- sigemptyset(&sa.sa_mask);
- sigaddset(&sa.sa_mask, SIGSEGV);
- sigaddset(&sa.sa_mask, SIGBUS);
- sigaddset(&sa.sa_mask, SIGTERM);
- sigaddset(&sa.sa_mask, SIGHUP);
- sigaddset(&sa.sa_mask, SIGINT);
- sigaddset(&sa.sa_mask, SIGPIPE);
- sigaddset(&sa.sa_mask, SIGCHLD);
- sigaddset(&sa.sa_mask, SIGALRM);
- sigaddset(&sa.sa_mask, SIGUSR1);
- sigaddset(&sa.sa_mask, SIGUSR2);
-
- sa.sa_handler = sigsegv;
- sigaction(SIGSEGV, &sa, NULL);
-
- sa.sa_handler = sigbus;
- sigaction(SIGBUS, &sa, NULL);
-
- sa.sa_handler = sigterm;
- sigaction(SIGTERM, &sa, NULL);
-
- sa.sa_handler = sighup;
- sigaction(SIGHUP, &sa, NULL);
-
- sa.sa_handler = sigint;
- sigaction(SIGINT, &sa, NULL);
-
- sa.sa_handler = SIG_IGN;
- sigaction(SIGPIPE, &sa, NULL);
-
- sa.sa_handler = sigchld;
- sigaction(SIGCHLD, &sa, NULL);
-
- sa.sa_handler = sigalrm;
- sigaction(SIGALRM, &sa, NULL);
-
- sa.sa_handler = SIG_IGN;
- sigaction(SIGUSR1, &sa, NULL);
-
- sa.sa_handler = SIG_IGN;
- sigaction(SIGUSR2, &sa, NULL);
-}
-
-void sigsegv(int dummy)
-{
- time(&current_time);
- log_error_time();
- fprintf(stderr, "caught SIGSEGV, dumping core in %s\n", tempdir);
- fclose(stderr);
- chdir(tempdir);
- abort();
-}
-
-extern sigjmp_buf env;
-extern int handle_sigbus;
-
-void sigbus(int dummy)
-{
- if (handle_sigbus) {
- longjmp(env, dummy);
- }
- time(&current_time);
- log_error_time();
- fprintf(stderr, "caught SIGBUS, dumping core in %s\n", tempdir);
- fclose(stderr);
- chdir(tempdir);
- abort();
-}
-
-void sigterm(int dummy)
-{
- sigterm_flag = 1;
-}
-
-void sigterm_stage1_run(int server_s) /* lame duck mode */
-{
- time(&current_time);
- log_error_time();
- fputs("caught SIGTERM, starting shutdown\n", stderr);
- FD_CLR(server_s, &block_read_fdset);
- close(server_s);
- sigterm_flag = 2;
-}
-
-void sigterm_stage2_run() /* lame duck mode */
-{
- log_error_time();
- fprintf(stderr,
- "exiting Boa normally (uptime %d seconds)\n",
- (int) (current_time - start_time));
- chdir(tempdir);
- clear_common_env();
- dump_mime();
- dump_passwd();
- dump_alias();
- free_requests();
- exit(0);
-}
-
-
-void sighup(int dummy)
-{
- sighup_flag = 1;
-}
-
-void sighup_run(void)
-{
- sighup_flag = 0;
- time(&current_time);
- log_error_time();
- fputs("caught SIGHUP, restarting\n", stderr);
-
- /* Philosophy change for 0.92: don't close and attempt reopen of logfiles,
- * since usual permission structure prevents such reopening.
- */
-
- FD_ZERO(&block_read_fdset);
- FD_ZERO(&block_write_fdset);
- /* clear_common_env(); NEVER DO THIS */
- dump_mime();
- dump_passwd();
- dump_alias();
- free_requests();
-
- log_error_time();
- fputs("re-reading configuration files\n", stderr);
- read_config_files();
-
- log_error_time();
- fputs("successful restart\n", stderr);
-
-}
-
-void sigint(int dummy)
-{
- time(&current_time);
- log_error_time();
- fputs("caught SIGINT: shutting down\n", stderr);
- fclose(stderr);
- chdir(tempdir);
- exit(1);
-}
-
-void sigchld(int dummy)
-{
- sigchld_flag = 1;
-}
-
-void sigchld_run(void)
-{
- int status;
- pid_t pid;
-
- sigchld_flag = 0;
-
- while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
- if (verbose_cgi_logs) {
- time(&current_time);
- log_error_time();
- fprintf(stderr, "reaping child %d: status %d\n", (int) pid, status);
- }
- return;
-}
-
-void sigalrm(int dummy)
-{
- sigalrm_flag = 1;
-}
-
-void sigalrm_run(void)
-{
- time(&current_time);
- log_error_time();
- fprintf(stderr, "%ld requests, %ld errors\n",
- status.requests, status.errors);
- show_hash_stats();
- sigalrm_flag = 0;
-}
diff --git a/linux-tools/boa-0.94.13/src/sublog.c b/linux-tools/boa-0.94.13/src/sublog.c
deleted file mode 100644
index 3cd891ab0d..0000000000
--- a/linux-tools/boa-0.94.13/src/sublog.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1999 Larry Doolittle <ldoolitt@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: sublog.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-int open_pipe_fd(char *command);
-int open_net_fd(char *spec);
-int open_gen_fd(char *spec);
-
-/* Like popen, but gives fd instead of FILE * */
-int open_pipe_fd(char *command)
-{
- int pipe_fds[2];
- int pid;
- /* "man pipe" says "filedes[0] is for reading,
- * filedes[1] is for writing. */
- if (pipe(pipe_fds) == -1)
- return -1;
- pid = fork();
- if (pid == 0) { /* child */
- close(pipe_fds[1]);
- if (pipe_fds[0] != 0) {
- dup2(pipe_fds[0], 0);
- close(pipe_fds[0]);
- }
- execl("/bin/sh", "sh", "-c", command, (char *) 0);
- exit(127);
- }
- close(pipe_fds[0]);
- if (pid < 0) {
- close(pipe_fds[1]);
- return -1;
- }
- return pipe_fds[1];
-}
-
-int open_net_fd(char *spec)
-{
- char *p;
- int fd, port;
- struct sockaddr_in sa;
- struct hostent *he;
- p = strchr(spec, ':');
- if (!p)
- return -1;
- *p++ = '\0';
- port = strtol(p, NULL, 10);
- /* printf("Host %s, port %d\n",spec,port); */
- sa.sin_family = AF_INET;
- sa.sin_port = htons(port);
- he = gethostbyname(spec);
- if (!he) {
- herror("open_net_fd");
- return -1;
- }
- memcpy(&sa.sin_addr, he->h_addr, he->h_length);
- /* printf("using ip %s\n",inet_ntoa(sa.sin_addr)); */
- fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- if (fd < 0)
- return fd;
- if (connect(fd, (struct sockaddr *) &sa, sizeof (sa)) < 0)
- return -1;
- return fd;
-}
-
-int open_gen_fd(char *spec)
-{
- int fd;
- if (*spec == '|') {
- fd = open_pipe_fd(spec + 1);
- } else if (*spec == ':') {
- fd = open_net_fd(spec + 1);
- } else {
- fd = open(spec,
- O_WRONLY | O_CREAT | O_APPEND,
- S_IRUSR | S_IWUSR | S_IROTH | S_IRGRP);
- }
- return fd;
-}
-
-#ifdef STANDALONE_TEST
-int main(int argc, char *argv[])
-{
- char buff[1024];
- int fd, nr, nw;
- if (argc < 2) {
- fprintf(stderr,
- "usage: %s output-filename\n"
- " %s |output-command\n"
- " %s :host:port\n", argv[0], argv[0], argv[0]);
- return 1;
- }
- fd = open_gen_fd(argv[1]);
- if (fd < 0) {
- perror("open_gen_fd");
- exit(1);
- }
- while ((nr = read(0, buff, sizeof (buff))) != 0) {
- if (nr < 0) {
- if (errno == EINTR)
- continue;
- perror("read");
- exit(1);
- }
- nw = write(fd, buff, nr);
- if (nw < 0) {
- perror("write");
- exit(1);
- }
- }
- return 0;
-}
-#endif
diff --git a/linux-tools/boa-0.94.13/src/timestamp.c b/linux-tools/boa-0.94.13/src/timestamp.c
deleted file mode 100644
index 2b5e881659..0000000000
--- a/linux-tools/boa-0.94.13/src/timestamp.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1998 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: timestamp.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $*/
-
-#include "boa.h"
-
-void timestamp(void)
-{
- log_error_time();
- fprintf(stderr, "boa: server version %s\n", SERVER_VERSION);
- log_error_time();
- fprintf(stderr, "boa: server built " __DATE__ " at " __TIME__ ".\n");
- log_error_time();
- fprintf(stderr, "boa: starting server pid=%d, port %d\n",
- (int) getpid(), server_port);
-}
diff --git a/linux-tools/boa-0.94.13/src/util.c b/linux-tools/boa-0.94.13/src/util.c
deleted file mode 100644
index b3fd464acf..0000000000
--- a/linux-tools/boa-0.94.13/src/util.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * Boa, an http server
- * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
- * Some changes Copyright (C) 1996,97 Larry Doolittle <ldoolitt@boa.org>
- * Some changes Copyright (C) 1996 Charles F. Randall <crandall@goldsys.com>
- * Some changes Copyright (C) 1996-99 Jon Nelson <jnelson@boa.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* $Id: util.c,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $ */
-
-#include "boa.h"
-
-#define HEX_TO_DECIMAL(char1, char2) \
- (((char1 >= 'A') ? (((char1 & 0xdf) - 'A') + 10) : (char1 - '0')) * 16) + \
- (((char2 >= 'A') ? (((char2 & 0xdf) - 'A') + 10) : (char2 - '0')))
-
-const char month_tab[48] =
- "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ";
-const char day_tab[] = "Sun,Mon,Tue,Wed,Thu,Fri,Sat,";
-
-/*
- * Name: clean_pathname
- *
- * Description: Replaces unsafe/incorrect instances of:
- * //[...] with /
- * /./ with /
- * /../ with / (technically not what we want, but browsers should deal
- * with this, not servers)
- */
-
-void clean_pathname(char *pathname)
-{
- char *cleanpath, c;
-
- cleanpath = pathname;
- while ((c = *pathname++)) {
- if (c == '/') {
- while (1) {
- if (*pathname == '/')
- pathname++;
- else if (*pathname == '.' && *(pathname + 1) == '/')
- pathname += 2;
- else if (*pathname == '.' && *(pathname + 1) == '.' &&
- *(pathname + 2) == '/') {
- pathname += 3;
- } else
- break;
- }
- c = '/';
- }
- *cleanpath++ = c;
- }
-
- *cleanpath = '\0';
-}
-
-/*
- * Name: get_commonlog_time
- *
- * Description: Returns the current time in common log format in a static
- * char buffer.
- *
- * commonlog time is exactly 25 characters long
- * because this is only used in logging, we add " [" before and "] " after
- * making 29 characters
- * "[27/Feb/1998:20:20:04 +0000] "
- *
- * Constrast with rfc822 time:
- * "Sun, 06 Nov 1994 08:49:37 GMT"
- *
- * Altered 10 Jan 2000 by Jon Nelson ala Drew Streib for non UTC logging
- *
- */
-
-char *get_commonlog_time(void)
-{
- struct tm *t;
- char *p;
- unsigned int a;
- static char buf[30];
- int time_offset;
-
- if (use_localtime) {
- t = localtime(&current_time);
- time_offset = TIMEZONE_OFFSET(t);
- } else {
- t = gmtime(&current_time);
- time_offset = 0;
- }
-
- p = buf + 29;
- *p-- = '\0';
- *p-- = ' ';
- *p-- = ']';
- a = abs(time_offset / 60);
- *p-- = '0' + a % 10;
- a /= 10;
- *p-- = '0' + a % 6;
- a /= 6;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = (time_offset >= 0) ? '+' : '-';
- *p-- = ' ';
-
- a = t->tm_sec;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ':';
- a = t->tm_min;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ':';
- a = t->tm_hour;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ':';
- a = 1900 + t->tm_year;
- while (a) {
- *p-- = '0' + a % 10;
- a /= 10;
- }
- /* p points to an unused spot */
- *p-- = '/';
- p -= 2;
- memcpy(p--, month_tab + 4 * (t->tm_mon), 3);
- *p-- = '/';
- a = t->tm_mday;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p = '[';
- return p; /* should be same as returning buf */
-}
-
-/*
- * Name: month2int
- *
- * Description: Turns a three letter month into a 0-11 int
- *
- * Note: This function is from wn-v1.07 -- it's clever and fast
- */
-
-int month2int(char *monthname)
-{
- switch (*monthname) {
- case 'A':
- return (*++monthname == 'p' ? 3 : 7);
- case 'D':
- return (11);
- case 'F':
- return (1);
- case 'J':
- if (*++monthname == 'a')
- return (0);
- return (*++monthname == 'n' ? 5 : 6);
- case 'M':
- return (*(monthname + 2) == 'r' ? 2 : 4);
- case 'N':
- return (10);
- case 'O':
- return (9);
- case 'S':
- return (8);
- default:
- return (-1);
- }
-}
-
-/*
- * Name: modified_since
- * Description: Decides whether a file's mtime is newer than the
- * If-Modified-Since header of a request.
- *
-
- Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
- Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
- Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
- 31 September 2000 23:59:59 GMT ; non-standard
-
- * RETURN VALUES:
- * 0: File has not been modified since specified time.
- * 1: File has been.
- * -1: Error!
- */
-
-int modified_since(time_t * mtime, char *if_modified_since)
-{
- struct tm *file_gmt;
- char *ims_info;
- char monthname[10 + 1];
- int day, month, year, hour, minute, second;
- int comp;
-
- ims_info = if_modified_since;
- while (*ims_info != ' ' && *ims_info != '\0')
- ++ims_info;
- if (*ims_info != ' ')
- return -1;
-
- /* the pre-space in the third scanf skips whitespace for the string */
- if (sscanf(ims_info, "%d %3s %d %d:%d:%d GMT", /* RFC 1123 */
- &day, monthname, &year, &hour, &minute, &second) == 6);
- else if (sscanf(ims_info, "%d-%3s-%d %d:%d:%d GMT", /* RFC 1036 */
- &day, monthname, &year, &hour, &minute, &second) == 6)
- year += 1900;
- else if (sscanf(ims_info, " %3s %d %d:%d:%d %d", /* asctime() format */
- monthname, &day, &hour, &minute, &second, &year) == 6);
- /* allow this non-standard date format: 31 September 2000 23:59:59 GMT */
- /* NOTE: Use if_modified_since here, because the date *starts*
- * with the day, versus a throwaway item
- */
- else if (sscanf(if_modified_since, "%d %10s %d %d:%d:%d GMT",
- &day, monthname, &year, &hour, &minute, &second) == 6);
- else {
- log_error_time();
- fprintf(stderr, "Error in %s, line %d: Unable to sscanf \"%s\"\n",
- __FILE__, __LINE__, ims_info);
- return -1; /* error */
- }
-
- file_gmt = gmtime(mtime);
- month = month2int(monthname);
-
- /* Go through from years to seconds -- if they are ever unequal,
- we know which one is newer and can return */
-
- if ((comp = 1900 + file_gmt->tm_year - year))
- return (comp > 0);
- if ((comp = file_gmt->tm_mon - month))
- return (comp > 0);
- if ((comp = file_gmt->tm_mday - day))
- return (comp > 0);
- if ((comp = file_gmt->tm_hour - hour))
- return (comp > 0);
- if ((comp = file_gmt->tm_min - minute))
- return (comp > 0);
- if ((comp = file_gmt->tm_sec - second))
- return (comp > 0);
-
- return 0; /* this person must really be into the latest/greatest */
-}
-
-
-/*
- * Name: to_upper
- *
- * Description: Turns a string into all upper case (for HTTP_ header forming)
- * AND changes - into _
- */
-
-char *to_upper(char *str)
-{
- char *start = str;
-
- while (*str) {
- if (*str == '-')
- *str = '_';
- else
- *str = toupper(*str);
-
- str++;
- }
-
- return start;
-}
-
-/*
- * Name: unescape_uri
- *
- * Description: Decodes a uri, changing %xx encodings with the actual
- * character. The query_string should already be gone.
- *
- * Return values:
- * 1: success
- * 0: illegal string
- */
-
-int unescape_uri(char *uri, char ** query_string)
-{
- char c, d;
- char *uri_old;
-
- uri_old = uri;
-
- while ((c = *uri_old)) {
- if (c == '%') {
- uri_old++;
- if ((c = *uri_old++) && (d = *uri_old++))
- *uri++ = HEX_TO_DECIMAL(c, d);
- else
- return 0; /* NULL in chars to be decoded */
- } else if (c == '?') { /* query string */
- if (query_string)
- *query_string = ++uri_old;
- /* stop here */
- *uri = '\0';
- return(1);
- break;
- } else if (c == '#') { /* fragment */
- /* legal part of URL, but we do *not* care.
- * However, we still have to look for the query string */
- if (query_string) {
- ++uri_old;
- while((c = *uri_old)) {
- if (c == '?') {
- *query_string = ++uri_old;
- break;
- }
- ++uri_old;
- }
- }
- break;
- } else {
- *uri++ = c;
- uri_old++;
- }
- }
-
- *uri = '\0';
- return 1;
-}
-
-/* rfc822 (1123) time is exactly 29 characters long
- * "Sun, 06 Nov 1994 08:49:37 GMT"
- */
-
-void rfc822_time_buf(char *buf, time_t s)
-{
- struct tm *t;
- char *p;
- unsigned int a;
-
- if (!s) {
- t = gmtime(&current_time);
- } else
- t = gmtime(&s);
-
- p = buf + 28;
- /* p points to the last char in the buf */
-
- p -= 3;
- /* p points to where the ' ' will go */
- memcpy(p--, " GMT", 4);
-
- a = t->tm_sec;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ':';
- a = t->tm_min;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ':';
- a = t->tm_hour;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ' ';
- a = 1900 + t->tm_year;
- while (a) {
- *p-- = '0' + a % 10;
- a /= 10;
- }
- /* p points to an unused spot to where the space will go */
- p -= 3;
- /* p points to where the first char of the month will go */
- memcpy(p--, month_tab + 4 * (t->tm_mon), 4);
- *p-- = ' ';
- a = t->tm_mday;
- *p-- = '0' + a % 10;
- *p-- = '0' + a / 10;
- *p-- = ' ';
- p -= 3;
- memcpy(p, day_tab + t->tm_wday * 4, 4);
-}
-
-char *simple_itoa(unsigned int i)
-{
- /* 21 digits plus null terminator, good for 64-bit or smaller ints
- * for bigger ints, use a bigger buffer!
- *
- * 4294967295 is, incidentally, MAX_UINT (on 32bit systems at this time)
- * and is 10 bytes long
- */
- static char local[22];
- char *p = &local[21];
- *p-- = '\0';
- do {
- *p-- = '0' + i % 10;
- i /= 10;
- } while (i > 0);
- return p + 1;
-}
-
-/* I don't "do" negative conversions
- * Therefore, -1 indicates error
- */
-
-int boa_atoi(char *s)
-{
- int retval;
- char *reconv;
-
- if (!isdigit(*s))
- return -1;
-
- retval = atoi(s);
- if (retval < 0)
- return -1;
-
- reconv = simple_itoa(retval);
- if (memcmp(s,reconv,strlen(s)) != 0) {
- return -1;
- }
- return retval;
-}
-
-int create_temporary_file(short want_unlink, char *storage, int size)
-{
- static char boa_tempfile[MAX_PATH_LENGTH + 1];
- int fd;
-
- snprintf(boa_tempfile, MAX_PATH_LENGTH,
- "%s/boa-temp.XXXXXX", tempdir);
-
- /* open temp file */
- fd = mkstemp(boa_tempfile);
- if (fd == -1) {
- log_error_time();
- perror("mkstemp");
- return 0;
- }
-
- if (storage != NULL) {
- int len = strlen(boa_tempfile);
-
- if (len < size) {
- memcpy(storage, boa_tempfile, len + 1);
- } else {
- close(fd);
- fd = 0;
- log_error_time();
- fprintf(stderr, "not enough memory for memcpy in storage\n");
- want_unlink = 1;
- }
- }
-
- if (want_unlink) {
- if (unlink(boa_tempfile) == -1) {
- close(fd);
- fd = 0;
- log_error_time();
- fprintf(stderr, "unlink temp file\n");
- }
- }
-
- return (fd);
-}
-
-/*
- * Name: normalize_path
- *
- * Description: Makes sure relative paths are made absolute
- *
- */
-
-#define DIRBUF_SIZE MAX_PATH_LENGTH * 2 + 1
-char * normalize_path(char *path)
-{
- char dirbuf[DIRBUF_SIZE];
- int len1, len2;
- char *endpath;
-
- if (path[0] == '/') {
- endpath = strdup(path);
- } else {
-
-#ifndef HAVE_GETCWD
- perror("boa: getcwd() not defined. Aborting.");
- exit(1);
-#endif
- if (getcwd(dirbuf, DIRBUF_SIZE) == NULL) {
- if (errno == ERANGE)
- perror
- ("boa: getcwd() failed - unable to get working directory. "
- "Aborting.");
- else if (errno == EACCES)
- perror("boa: getcwd() failed - No read access in current "
- "directory. Aborting.");
- else
- perror("boa: getcwd() failed - unknown error. Aborting.");
- exit(1);
- }
-
- /* OK, now the hard part. */
- len1 = strlen(dirbuf);
- len2 = strlen(path);
- if (len1 + len2 > MAX_PATH_LENGTH * 2) {
- perror("boa: eek. unable to normalize pathname");
- exit(1);
- }
- if (strcmp(path,".") != 0) {
- memcpy(dirbuf + len1, "/", 1);
- memcpy(dirbuf + len1 + 1, path, len2 + 1);
- }
- /* fprintf(stderr, "boa: normalize gets \"%s\"\n", dirbuf); */
-
- endpath = strdup(dirbuf);
- }
-
- if (endpath == NULL) {
- fprintf(stderr,
- "boa: Cannot strdup path. Aborting.\n");
- exit(1);
- }
- return endpath;
-}
-
-int real_set_block_fd(int fd)
-{
- int flags;
-
- flags = fcntl(fd, F_GETFL);
- if (flags == -1)
- return -1;
-
- flags &= ~O_NONBLOCK;
- flags = fcntl(fd, F_SETFL, flags);
- return flags;
-}
-
-int real_set_nonblock_fd(int fd)
-{
- int flags;
-
- flags = fcntl(fd, F_GETFL);
- if (flags == -1)
- return -1;
-
- flags |= O_NONBLOCK;
- flags = fcntl(fd, F_SETFL, flags);
- return flags;
-}
diff --git a/linux-tools/boa-0.94.13/src/webindex.pl b/linux-tools/boa-0.94.13/src/webindex.pl
deleted file mode 100644
index 376788d346..0000000000
--- a/linux-tools/boa-0.94.13/src/webindex.pl
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/perl
-
-# webindex, a world wide web directory generating program
-# Copyright (C) 1997 Larry Doolittle <ldoolitt@jlab.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 1, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# likely future additions:
-# incorporate user-supplied README files
-# use config file to supply icons
-# other formats and sort options, including one giving dates
-# more robust handling of GCOS field
-# nicer date format in footer
-
-# usable as it stands, 11-Feb-1997 lrd
-# $Id: webindex.pl,v 1.1.1.1 2006/05/19 13:20:17 fleury Exp $
-
-
-# *****configure me******
-$index="INDEX.html";
-# ^^^^^^^^^^
-# The line above defines the output file name from webindex.
-# You should make sure it lines up with the configuration of
-# the web server on your system, i.e., the DirectoryIndex
-# directive in NCSA, Apache, or Boa.
-
-$magic="This file is unmodified webindex output";
-
-($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell)
- =getpwuid($<);
-
-# Title of the page - there is no unique mapping from the unix
-# filename to URL space. Take an easy way out and just give
-# the name of the directory.
-# Even this can be confused, look what happens if user joe
-# makes a public_html/foo directory, and runs webindex on it.
-# Now user bill makes a symbolic link from his public_html/bar
-# ~joe/public_html/foo. This directory now has two URLs,
-# http://some.server/~joe/foo/ and http://some.server/~bill/bar/ .
-# The name that we generate is foo, which is only half right :-(
-
-@A=split("/",`pwd`);
-$here=pop(@A);
-
-# We will happily create a new $index file, or overwrite
-# one if it has the magic comment in it. We won't overwrite
-# a carefully hand-crafted one, though.
-
-if (open CHK,"<$index") {
- while (<CHK>) {
- last if ($found = / $magic /);
- }
- close(CHK);
- die "existing $index not overwritten" if (!$found);
-}
-
-opendir DIR, "." || die "opendir";
-open OUT,">$index" || die "fopen";
-
-print OUT "<html><head>\n<title>Index of $here</title>\n</head>\n\n";
-
-# This comment syntax should be compatible with all HTML versions
-print OUT "<!-- $magic -->\n";
-
-print OUT "<body>\n\n<h2>Index of $here</h2>\n\n";
-
-@A=sort(readdir(DIR));
-
-print OUT "<h3>Directories</h3>\n<ul>\n";
-print OUT "<li><A HREF=\"../\">Parent Directory</a>\n";
-for $a (@A) {
- next if ($a eq ".");
- next if ($a eq "..");
- ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks) = stat($a);
- if ( -d _) {
- print OUT "<li><A HREF=\"$a/\">$a</A>\n";
- }
-}
-print OUT "</ul>\n";
-
-$found=0;
-for $a (@A) {
- next if ($a eq ".");
- next if ($a eq "..");
- next if ($a eq $index);
- ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks) = stat($a);
- if (! -d _) {
- if (!$found) {
- $found=1;
- print OUT "<h3>Files</h3><ul>\n";
- }
- print OUT "<li><A HREF=\"$a\">$a</A> ($size bytes)\n";
- }
-}
-print OUT "</ul>\n" if $found;
-
-closedir(DIR);
-$now=localtime();
-($who)=split(/,/,$gcos);
-print OUT "<hr>Index created by <a href=\"/~$name/\">$who</a>
- with <a href=\"http://recycle.jlab.org/webindex/\">webindex</a> at $now<br>\n";
-
-print OUT "</body>\n</html>\n";
-
-close OUT;
diff --git a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/gore.php b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/gore.php
index 06fd5d4df6..0a11b5a617 100755
--- a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/gore.php
+++ b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/gore.php
@@ -9,11 +9,13 @@
eth=(a=='eth'?'eth-a':'eth');
br=(a=='br'?'br-a':'br');
soft=(a=='soft'?'soft-a':'soft');
+ feat=(a=='feat'?'feat-a':'feat');
netc=(a=='netc'?'netc-a':'netc');
document.plc.src='/'+plc+'.gif';
document.eth.src='/'+eth+'.gif';
document.br.src='/'+br+'.gif';
document.soft.src='/'+soft+'.gif';
+ document.feat.src='/'+feat+'.gif';
}
function show()
{
@@ -49,6 +51,7 @@
</head>
<body>
+
<?php
filet=popen('/sbin/ifconfig br0|grep "inet ad"',"r");
l=fgets(filet);
@@ -60,10 +63,13 @@
$mode=trim(fread($filet));
pclose($filet);
?>
+
<form name="f">
<table width="100%" height="100%" cellspacing="0" cellpadding="0"><tr valign="bottom"><td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr valign="middle"><td width="800" height="50" align="left" style="border-bottom: solid; border-color: #000000; border-bottom-width: 2px; margin-bottom: 0px"><a href="/cgi-bin/spidcom.html?choice=plc0" target="spid_dole" onClick="change('plc')"><img src="/plc.gif" border="0" name="plc"></a>&nbsp;<a href="/cgi-bin/spidcom.html?choice=eth0" target="spid_dole" onClick="change('eth')"><img src="/eth.gif" border="0" name="eth"></a>&nbsp;<a href="/cgi-bin/spidcom.html?choice=br0+" target="spid_dole" onClick="change('br')"><img src="/br-a.gif" border="0" name="br"></a>&nbsp;<a href="/cgi-bin/soft.html" target="spid_dole" onClick="change('soft')"><img src="/soft.gif" border="0" name="soft"></a>
+ <tr valign="middle"><td width="800" height="50" align="left" style="border-bottom: solid; border-color: #000000; border-bottom-width: 2px; margin-bottom: 0px"><a href="/cgi-bin/spidcom.html?choice=plc0" target="spid_dole" onClick="change('plc')"><img src="/plc.gif" border="0" name="plc"></a>&nbsp;<a href="/cgi-bin/spidcom.html?choice=eth0" target="spid_dole" onClick="change('eth')"><img src="/eth.gif" border="0" name="eth"></a>&nbsp;<a href="/cgi-bin/spidcom.html?choice=br0+" target="spid_dole" onClick="change('br')"><img src="/br-a.gif" border="0" name="br"></a>&nbsp;<a href="/cgi-bin/soft.html" target="spid_dole" onClick="change('soft')"><img src="/soft.gif" border="0" name="soft"></a>&nbsp;
+ <a href="/cgi-bin/spidcom.html?choice=feat" target="spid_dole" onClick="change('feat')"><img src="/feat.gif" border="0" name="feat"></a>
+
</td>
<td class="subtitle" align="center"><?php print($IPb);?></td>
<td align="right" style="border-bottom: solid; border-color: #000000; border-bottom-width: 2px">
diff --git a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/reboot.html b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/reboot.html
index 31d4beebb1..064dff651b 100755
--- a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/reboot.html
+++ b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/reboot.html
@@ -20,7 +20,7 @@ input.text{
<script>
var start=new Date();
start=Date.parse(start)/1000;
- var counts=20;
+ var counts=30;
function CountDown(){
var now=new Date();
now=Date.parse(now)/1000;
diff --git a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/sipconfig.html b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/sipconfig.html
new file mode 100755
index 0000000000..6163173472
--- /dev/null
+++ b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/sipconfig.html
@@ -0,0 +1,79 @@
+#!/bin/uphp
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+ <html>
+ <head>
+ <title>SPIDCOM Technologies changes</title>
+
+<style type="text/css">
+ body {
+ background-image: url("/spidcom.gif");
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ }
+ td.data {
+ border: 0px solid #999;
+ padding: 0px;
+ vertical-align: center;
+ font-family:Times, Arial, Helvetica, sans-serif;
+ font-style: italic;
+ font-size: 14pt;
+ }
+ body.dbtable{
+ padding: 0px 0px 0px 0px;
+ margin: 0px 0px 0px 0px;
+ border-collapse: collapse;
+ border: 0px solid #000000;
+ cursor: default;
+ }
+ table.dbtable{
+ padding: 3px 3px 3px 3px;
+ margin: 0px 0px 0px 30px;
+ border-collapse: collapse;
+ border: 0px solid #000000;
+ cursor: default;
+ }
+ input.submit{
+ font-size:16px;
+ font-family:Arial,Times,serif;
+ font-weight:bold;
+ color:#FF0000;
+ border-style:outset;
+ }
+</style>
+</head>
+
+<?php
+ system("echo username = $username > /usr/local/sip.conf");
+ system("echo password = $password >> /usr/local/sip.conf");
+ system("echo proxy = $proxy >> /usr/local/sip.conf");
+ system("echo country = $country >> /usr/local/sip.conf");
+ system("echo vad = $vad >> /usr/local/sip.conf");
+?>
+
+<body class="dbtable">
+ <table class="dbtable">
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
+ <td class="data">VoIP configuration has been changed. Restart the modem for changes to take effect.</td>
+ </tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
+ <td class="data"><a href="spidcom.html?choice=feat">Return to VoIP configuration</a></td>
+ </tr>
+ <tr>
+ <form action="reboot.html" METHOD="GET">
+ <td><table class="dbtable" border=0 cellpadding=0 cellspacing=0 width=20% align=right valign=bottom>
+ <tr>
+ <td align="left"><input class="submit" type="submit" name="reboot" value="Restart the modem"></td>
+ <td><input type="hidden" name="IPb" value="<?=$IPb?>"></td>
+ </tr>
+ </table></td>
+ </form>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/soft.html b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/soft.html
index ec76ce09ef..c01c18cae1 100755
--- a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/soft.html
+++ b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/soft.html
@@ -273,6 +273,9 @@ cursor: default;
</tr>
<tr>
+ <td><br></td>
+ </tr>
+ <tr>
<td class="data1"><input class="submit" type="submit" name="send" value="send"></td>
</tr>
</table>
diff --git a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/spidcom.html b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/spidcom.html
index 4a18d65b0c..06d7dec280 100755
--- a/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/spidcom.html
+++ b/linux-tools/boa-0.94.14rc18/spc200/cgi-bin/spidcom.html
@@ -5,7 +5,7 @@
<title>SPIDCOM Technologies changes</title>
<style type="text/css">
body {
- background-image: url("/spidcom.gif");
+ background-image: url("/spidcom.gif");
background-repeat: no-repeat;
background-attachment: fixed;
}
@@ -89,6 +89,18 @@ input.text1{
border-width:0px;
color:#0000FF;
}
+ select.select1{
+ font-family:Verdana;
+ font-size:10pt;
+ border: 1px solid #999;
+ height: 2em;
+ width:12em;
+ background-color:fffff0;
+ border-color:FFFFFF;
+ border-style:outset;
+ border-width:1px;
+ color:#0000FF;
+ }
input.submit{
font-size:16px;
font-family:Arial,Times,serif;
@@ -326,6 +338,157 @@ cursor: default;
</table>
</td>
</tr>
+
+ <tr>
+ <form name="sipconf" action="sipconfig.html" method="GET">
+<?php if (choice=="feat") { ?>
+
+ <!--Checking whether voip is on ($voip=1)-->
+ <?php
+ $voip=0;
+ filet=popen("ps","r");
+ while(!feof(filet) && !voip) {
+ l=fgets(filet);
+ if(ereg("voipdemo",l,reg)) $voip=1;
+ }
+ pclose(filet);
+ ?>
+
+ <td>
+ <table class="dbtable" border=0 cellpadding=0 cellspacing=0 width=40% align=left>
+ <tr>
+ <td><br></td>
+ </tr>
+
+ <!--Parse VoIP configuration file:-->
+ <?php if ($voip == 1) {
+ file = fopen("/usr/local/sip.conf", "r");
+
+ // fetching username:
+ l = trim(fgets(file));
+ if (ereg("[uU][sS][eE][rR][nN][aA][mM][eE][ ]?=[ ]?(.*)", l, $regs))
+ $username = regs[1];
+ else
+ $username = "";
+
+ // fetching password:
+ l = trim(fgets(file));
+ if (ereg("[pP][aA][sS][sS][wW][oO][rR][dD][ ]?=[ ]?(.*)", l, $regs))
+ $password = regs[1];
+ else
+ $password = "";
+
+ // fetching proxy:
+ l = trim(fgets(file));
+ if (ereg("[pP][rR][oO][xX][yY][ ]?=[ ]?(.*)", l, $regs))
+ $proxy = regs[1];
+ else
+ $proxy = "";
+
+ // fetching country:
+ l = trim(fgets(file));
+ if (ereg("[cC][oO][uU][nN][tT][rR][yY][ ]?=[ ]?(.*)", l, $regs))
+ $country= regs[1];
+ else
+ $country= "";
+
+ // fetching vad:
+ l = trim(fgets(file));
+ if (ereg("[vV][aA][dD][ ]?=[ ]?(.*)", l, $regs))
+ $vad = regs[1];
+ else
+ $vad= "";
+ ?>
+ <tr>
+ <td class="title" colspan="2">VoIP configuration</td>
+ </tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
+ <td class="data">username:</td>
+ <td><table border=0 cellpadding=0 cellspacing=0 width=50% align=left>
+ <tr>
+ <td class="data"><input class="text" type="text" name="username" value="<?=$username?>" ></td>
+ </tr></table></td>
+
+ </tr>
+ <tr>
+ <td class="data">password:</td>
+ <td><table border=0 cellpadding=0 cellspacing=0 width=50% align=left>
+ <tr>
+ <td class="data"><input class="text" type="text" name="password" value="<?=$password?>"></td>
+ </tr></table></td>
+
+ </tr>
+ <tr>
+ <td class="data">proxy:</td>
+ <td><table border=0 cellpadding=0 cellspacing=0 width=50% align=left>
+ <tr>
+ <td class="data"><input class="text" type="text" name="proxy" value="<?=$proxy?>"></td>
+ </tr></table></td>
+
+ </tr>
+ <tr>
+ <td class="data">country:</td>
+ <td><table border=0 cellpadding=0 cellspacing=0 width=30% align=left>
+ <tr>
+ <td class="data"><select class="select1" style="text-align:center" name="country">
+ <?php if (($country == "DEFAULT") || ($country == "default")) { ?>
+ <option style="text-align:center" selected="selected" value="default">DEFAULT</option>
+ <option style="text-align:center" value="de">DE</option>
+ <option style="text-align:center" value="usa">USA</option>
+ <option style="text-align:center" value="uk">UK</option>
+ <?php } if (($country == "DE") || ($country == "de")) { ?>
+ <option style="text-align:center" value="default">DEFAULT</option>
+ <option style="text-align:center" selected="selected" value="de">DE</option>
+ <option style="text-align:center" value="usa">USA</option>
+ <option style="text-align:center" value="uk">UK</option>
+ <?php } if (($country == "USA") || ($country == "usa")) { ?>
+ <option style="text-align:center" value="default">DEFAULT</option>
+ <option style="text-align:center" value="de">DE</option>
+ <option style="text-align:center" selected="selected" value="usa">USA</option>
+ <option style="text-align:center" value="uk">UK</option>
+ <?php } if (($country == "UK") || ($country =="uk")) { ?>
+ <option style="text-align:center" value="default">DEFAULT</option>
+ <option style="text-align:center" value="de">DE</option>
+ <option style="text-align:center" value="usa">USA</option>
+ <option style="text-align:center" selected="selected" value="uk">UK</option>
+ <?php } ?>
+ </select></td>
+ </tr></table></td>
+ </tr>
+ <tr>
+ <td class="data">VAD:</td>
+ <?php if ($vad=="yes") { ?>
+ <td class="data"><input class="text" type="radio" name="vad" value="yes" CHECKED>yes</td>
+ <td class="data"><input class="text" type="radio" name="vad" value="no">no</td>
+ <?php }
+ else { ?>
+ <td class="data"><input class="text" type="radio" name="vad" value="yes">yes</td>
+ <td class="data"><input class="text" type="radio" name="vad" value="no" CHECKED>no</td>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
+ <td class="data"><input class="submit" type="submit" value="submit"></td>
+ <td><input type="hidden" name="IPb" value="<?=$IPb?>"></td>
+ </tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ <?php }
+ else { ?>
+ <tr>
+ <td class="data">VoIP is OFF</td>
+ </tr>
+ <?php } ?>
+ </table></td>
+<?php } ?></form>
+</tr>
+
<tr>
<form name=cIP action="changeIP.html" method="GET" onSubmit="return checkban()" >
@@ -333,8 +496,7 @@ cursor: default;
<?php
- if (choice=="eth0"){
- ?>
+ if (choice=="eth0"){ ?>
<td>
<table class="dbtable" width="90%" border="0" cellpadding=0 cellspacing=0 align="left" valign="center">
@@ -518,15 +680,15 @@ cursor: default;
</tr>
<?php } ?>
- <tr>
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
<td><input class="submit" type="submit" name="submit" value="Save configuration"></td>
<td><input type="hidden" name="choice" value="<?=$choice?>"></td>
<td> <input type="hidden" name="IPb" value="<?=$IPb?>"</td>
<td><input type="hidden" name="etc_rate1" value="<?=$etc_rate1?>"></td>
</tr>
- <tr>
- <td><br></td>
- </tr>
</table>
</td>
<td>
@@ -625,7 +787,6 @@ cursor: default;
</tr>
</table>
</td>
- </tr>
<?php }
@@ -863,6 +1024,16 @@ cursor: default;
</td>
</tr>
<?php } ?>
+
+ <tr>
+ <td><br></td>
+ </tr>
+
+ <tr>
+ <td><input class="submit" type="submit" name="submit" value="Save configuration"></td>
+ <td><input type="hidden" name="choice" value="<?=$choice?>"></td>
+ <td><input type="hidden" name="tc_rate1" value="<?=$tc_rate1?>"></td>
+ </tr>
</table>
</td>
@@ -971,20 +1142,7 @@ cursor: default;
</tr>
</table>
</td>
- </tr>
-
-
- <tr>
- <td><br></td>
- </tr>
- <table class="dbtable">
- <tr>
- <td class="data"><input class="submit" type="submit" name="submit" value="Save configuration"></td>
- <td><input type="hidden" name="choice" value="<?=$choice?>"></td>
- <td><input type="hidden" name="tc_rate1" value="<?=$tc_rate1?>"></td>
- </tr>
- <table>
<?php }
@@ -1137,6 +1295,9 @@ cursor: default;
</tr></table></td>
</tr>
<tr>
+ <td><br></td>
+ </tr>
+ <tr>
<td class="data"><input class="submit" type="submit" name="submit" value="Save configuration"></td>
<td><input type="hidden" name="choice" value="<?=$choice?>"></td>
<td><input type="hidden" name="pdhcp" value="<?=$pdhcp?>"></td>
@@ -1250,10 +1411,10 @@ cursor: default;
</tr>
</table>
</td>
- </tr>
<?php } ?>
- </table>
+ </form></tr>
+<!-- </table>
</td>
</tr>
@@ -1266,8 +1427,8 @@ cursor: default;
<tr>
<td><br></td>
- </tr>
- <tr>
+ </tr>-->
+ <tr>
<form action="reboot.html" METHOD="GET">
<table class="dbtable" border=0 cellpadding=0 cellspacing=0 width=20% align=right valign=bottom><tr>
<td><input class="submit" type="submit" name="reboot" value="Restart the modem"></td>
@@ -1276,6 +1437,7 @@ cursor: default;
</table>
</form>
</tr>
+
<tr>
<table border=0 cellpadding=0 cellspacing=0 width=5% align=right valign=bottom>
@@ -1285,7 +1447,8 @@ cursor: default;
</td>
</tr>
</table>
- </tr>
+ </tr>
+
<script language="JavaScript1.2">
/*Number check script-
By JavaScript Kit (www.javascriptkit.com)
@@ -1399,6 +1562,6 @@ return true
</script>
<iframe src="calcul.php?choice=<?=$choice?>" width="0" height="0"></iframe>
-</table>
+ </table>
</body>
</html>
diff --git a/linux-tools/boa-0.94.14rc18/spc200/www/feat-a.gif b/linux-tools/boa-0.94.14rc18/spc200/www/feat-a.gif
new file mode 100755
index 0000000000..6c1a0a65a6
--- /dev/null
+++ b/linux-tools/boa-0.94.14rc18/spc200/www/feat-a.gif
Binary files differ
diff --git a/linux-tools/boa-0.94.14rc18/spc200/www/feat.gif b/linux-tools/boa-0.94.14rc18/spc200/www/feat.gif
new file mode 100755
index 0000000000..08883c5791
--- /dev/null
+++ b/linux-tools/boa-0.94.14rc18/spc200/www/feat.gif
Binary files differ
diff --git a/linux-tools/busybox-1.00/include/applets.h b/linux-tools/busybox-1.00/include/applets.h
index 31e1f6d51d..72a027f39a 100755
--- a/linux-tools/busybox-1.00/include/applets.h
+++ b/linux-tools/busybox-1.00/include/applets.h
@@ -63,6 +63,9 @@
#ifdef CONFIG_AR
APPLET(ar, ar_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_ARP
+ APPLET(arp, arp_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+#endif
#ifdef CONFIG_ARPING
APPLET(arping, arping_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
#endif
@@ -307,6 +310,9 @@
#ifdef CONFIG_INIT
APPLET(init, init_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_FEATURE_INITRD
+ APPLET_NOUSAGE("init", init_main, _BB_DIR_ROOT, _BB_SUID_NEVER)
+#endif
#ifdef CONFIG_INSMOD
APPLET(insmod, insmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
@@ -349,9 +355,6 @@
#ifdef CONFIG_LENGTH
APPLET(length, length_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
#endif
-#ifdef CONFIG_FEATURE_INITRD
- APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT, _BB_SUID_NEVER)
-#endif
#ifdef CONFIG_LN
APPLET(ln, ln_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
diff --git a/linux-tools/busybox-1.00/include/usage.h b/linux-tools/busybox-1.00/include/usage.h
index bb3e9af50c..9716a45fc6 100755
--- a/linux-tools/busybox-1.00/include/usage.h
+++ b/linux-tools/busybox-1.00/include/usage.h
@@ -45,6 +45,14 @@
"\t-x\t\textract\n" \
"\t-v\t\tverbosely list files processed"
+#define arp_trivial_usage \
+ "[-sd] IP [MAC]\n"
+#define arp_full_usage \
+ "Manipulate with ARP table entries.\n\n" \
+ "Options:\n" \
+ "\t-s IP MAC\t\t set new ARP table entry (permanent flag set)\n" \
+ "\t-d IP\t\t delete existing ARP table entry\n"
+
#define arping_trivial_usage \
"[-fqbDUA] [-c count] [-w timeout] [-I device] [-s sender] target\n"
#define arping_full_usage \
diff --git a/linux-tools/busybox-1.00/libbb/setup_environment.c b/linux-tools/busybox-1.00/libbb/setup_environment.c
index aeb285a53f..bb583fe3c9 100644
--- a/linux-tools/busybox-1.00/libbb/setup_environment.c
+++ b/linux-tools/busybox-1.00/libbb/setup_environment.c
@@ -40,7 +40,7 @@
#define DEFAULT_LOGIN_PATH "/bin:/usr/bin"
-#define DEFAULT_ROOT_LOGIN_PATH "/usr/sbin:/bin:/usr/bin:/sbin"
+#define DEFAULT_ROOT_LOGIN_PATH "/usr/sbin:/bin:/usr/bin:/sbin:/usr/local/bin"
static void xsetenv ( const char *key, const char *value )
{
diff --git a/linux-tools/busybox-1.00/networking/Config.in b/linux-tools/busybox-1.00/networking/Config.in
index 42176f0506..50b1282930 100644
--- a/linux-tools/busybox-1.00/networking/Config.in
+++ b/linux-tools/busybox-1.00/networking/Config.in
@@ -12,6 +12,12 @@ config CONFIG_FEATURE_IPV6
Enable IPv6 support to busybox. This makes applets that talk IP
able to work with IPv6.
+config CONFIG_ARP
+ bool "arp"
+ default n
+ help
+ Manipulate with ARP table entries.
+
config CONFIG_ARPING
bool "arping"
default n
diff --git a/linux-tools/busybox-1.00/networking/Makefile.in b/linux-tools/busybox-1.00/networking/Makefile.in
index 9bfe901767..d97b63ce14 100644
--- a/linux-tools/busybox-1.00/networking/Makefile.in
+++ b/linux-tools/busybox-1.00/networking/Makefile.in
@@ -23,6 +23,7 @@ NETWORKING_DIR:=$(top_builddir)/networking/
endif
srcdir=$(top_srcdir)/networking
NETWORKING-y:=
+NETWORKING-$(CONFIG_ARP) += arp.o
NETWORKING-$(CONFIG_ARPING) += arping.o
NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o
NETWORKING-$(CONFIG_FTPPUT) += ftpgetput.o
diff --git a/linux-tools/busybox-1.00/networking/arp.c b/linux-tools/busybox-1.00/networking/arp.c
new file mode 100644
index 0000000000..8ef568b8b6
--- /dev/null
+++ b/linux-tools/busybox-1.00/networking/arp.c
@@ -0,0 +1,355 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * arp.c - Manipulate the system ARP cache
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Author: Fred N. van Kempen, <waltje at uwalt.nl.mugnet.org>
+ * Busybox port: Paul van Gool <pvangool at mimotech.com>
+ *
+ * modified for getopt32 by Arne Bernin <arne [at] alamut.de>
+ */
+
+#include "libbb.h"
+#include "inet_common.h"
+
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <netinet/ether.h>
+#include <netpacket/packet.h>
+
+#include <linux/sockios.h>
+#include <linux/socket.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+
+#define DEBUG 0
+
+#define DFLT_AF "inet"
+#define DFLT_HW "ether"
+
+#define ARP_OPT_A (0x1)
+#define ARP_OPT_p (0x2)
+#define ARP_OPT_H (0x4)
+#define ARP_OPT_t (0x8)
+#define ARP_OPT_i (0x10)
+#define ARP_OPT_a (0x20)
+#define ARP_OPT_d (0x40)
+#define ARP_OPT_n (0x80) /* do not resolve addresses */
+#define ARP_OPT_D (0x100) /* HW-address is devicename */
+#define ARP_OPT_s (0x200)
+#define ARP_OPT_v (0x400 * DEBUG) /* debugging output flag */
+
+struct hwtype
+{
+ const char *name;
+ const char *title;
+ int type;
+ int alen;
+ char *(*print) (unsigned char *);
+ int (*input) (char *, struct sockaddr *);
+ int (*activate) (int fd);
+ int suppress_null_addr;
+};
+
+struct aftype
+{
+ const char *name;
+ const char *title;
+ int af;
+ int alen;
+ char *(*print) (unsigned char *);
+ char *(*sprint) (struct sockaddr *, int numeric);
+ int (*input) (int type, char *bufp, struct sockaddr *);
+ void (*herror) (char *text);
+ int (*rprint) (int options);
+ int (*rinput) (int typ, int ext, char **argv);
+
+ /* may modify src */
+ int (*getmask) (char *src, struct sockaddr * mask, char *name);
+
+ int fd;
+ char *flag_file;
+};
+
+
+static unsigned int option_mask32;
+static const struct aftype *ap; /* current address family */
+static const struct hwtype *hw; /* current hardware type */
+static int sockfd; /* active socket descriptor */
+static int hw_set; /* flag if hw-type was set (-H) */
+static const char *device = "br0"; /* current device */
+
+static const char options[] =
+ "pub\0"
+ "priv\0"
+ "temp\0"
+ "trail\0"
+ "dontpub\0"
+ "auto\0"
+ "dev\0"
+ "netmask\0";
+
+
+static void check_for_netmask(char** args, struct arpreq* req)
+{
+ if (*args)
+ if (!strcmp(*args, "netmask") )
+ {
+ if (!(*++args) )
+ bb_show_usage();
+ else
+ if (strcmp(*args, "255.255.255.255") )
+ {
+ req->arp_netmask.sa_family = AF_INET;
+ if (!inet_aton(*args, &((struct sockaddr_in*)&req->arp_netmask)->sin_addr) )
+ bb_error_msg_and_die("Invalid IP address.");
+ req->arp_flags |= ATF_NETMASK;
+ }
+ }
+ else
+ bb_show_usage();
+}
+
+static int arp_del(char **args)
+{
+ char *hostname;
+ struct arpreq req;
+ struct sockaddr_in pa;
+ int flags = 0;
+ int err;
+
+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ memset(&req, 0, sizeof(req));
+ memset(&pa, 0, sizeof(pa));
+
+
+ /* Resolve the host name. */
+ /* Resolve the host name. */
+ hostname = *args;
+
+ pa.sin_family = AF_INET;
+ if (!inet_aton(hostname, &pa.sin_addr) )
+ bb_error_msg_and_die("Invalid IP address.");
+ memcpy(&req.arp_pa, &pa, sizeof(pa) );
+
+ check_for_netmask(++args, &req);
+
+ req.arp_ha.sa_family = ARPHRD_ETHER;
+
+ req.arp_flags = ATF_PERM;
+ //req.arp_flags |= ATF_PERM;
+
+ strncpy(req.arp_dev, device, sizeof(req.arp_dev));
+
+ err = ioctl(sockfd, SIOCDARP, &req);
+ if (err < 0)
+ bb_perror_msg_and_die("SIOCDARP");
+ return 0;
+}
+
+
+
+/* Set an entry in the ARP cache. */
+/* Called only from main, once */
+static int arp_set(char **args)
+{
+ char *host, *mac;
+ struct arpreq req;
+ struct sockaddr_in pa;
+ int temp[6];
+ int i;
+
+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ memset(&req, 0, sizeof(req));
+ memset(&pa, 0, sizeof(pa));
+
+ host = *args++;
+
+ pa.sin_family = AF_INET;
+ if (!inet_aton(host, &pa.sin_addr) )
+ bb_error_msg_and_die("Invalid IP address.");
+ memcpy(&req.arp_pa, &pa, sizeof(pa) );
+
+ /* Fetch the hardware address. */
+ if (*args == NULL)
+ bb_error_msg_and_die("Need hardware address.");
+
+ mac = *args;
+ if (strlen(mac) != 17)
+ bb_error_msg_and_die("please supply hw address in form: XX:XX:XX:XX:XX:XX");
+
+ req.arp_ha.sa_family = ARPHRD_ETHER;
+ sscanf(mac, "%02X:%02X:%02X:%02X:%02X:%02X", &temp[0], &temp[1], &temp[2], &temp[3], &temp[4], &temp[5]);
+
+ for (i = 0; i < 6; i++)
+ req.arp_ha.sa_data[i] = temp[i];
+
+ req.arp_flags = ATF_PERM;
+ check_for_netmask(++args, &req);
+
+ strncpy(req.arp_dev, device, sizeof(req.arp_dev));
+
+ if (ioctl(sockfd, SIOCSARP, &req) < 0)
+ perror("ioctl");
+ close(sockfd);
+ return 0;
+}
+
+
+/* Print the contents of an ARP request block. */
+static void
+arp_disp(const char *name, char *ip, int type, int arp_flags,
+ char *hwa, char *mask, char *dev)
+{
+ const struct hwtype *xhw;
+
+ /*
+ xhw = get_hwntype(type);
+ if (xhw == NULL)
+ get_hwtype(DFLT_HW);//xhw = ARPHRD_ETHER;//
+ */
+
+ printf("%s (%s) at ", name, ip);
+
+ if (!(arp_flags & ATF_COM)) {
+ if (arp_flags & ATF_PUBL)
+ printf("* ");
+ else
+ printf("<incomplete> ");
+ } else {
+ printf("%s [%s] ", hwa, xhw->name);
+ }
+
+ if (arp_flags & ATF_NETMASK)
+ printf("netmask %s ", mask);
+
+ if (arp_flags & ATF_PERM)
+ printf("PERM ");
+ if (arp_flags & ATF_PUBL)
+ printf("PUP ");
+#ifdef HAVE_ATF_MAGIC
+ if (arp_flags & ATF_MAGIC)
+ printf("AUTO ");
+#endif
+#ifdef HAVE_ATF_DONTPUB
+ if (arp_flags & ATF_DONTPUB)
+ printf("DONTPUB ");
+#endif
+ if (arp_flags & ATF_USETRAILERS)
+ printf("TRAIL ");
+
+ printf("on %s\n", dev);
+}
+
+/* Display the contents of the ARP cache in the kernel. */
+/* Called only from main, once */
+static int arp_show(char *name)
+{
+ const char *host;
+ const char *hostname;
+ FILE *fp;
+ struct sockaddr sa;
+ int type;
+ int num;
+ unsigned entries = 0, shown = 0;
+ char ip[128];
+ char hwa[128];
+ char mask[128];
+ char line[128];
+ char dev[128];
+
+ host = NULL;
+ if (name != NULL) {
+ /* Resolve the host name. */
+ //if (ap->input(name, &sa) < 0) {
+ //bb_herror_msg_and_die("%s", name);
+ //}
+ host = strdup(ap->sprint(&sa, 1));
+ }
+ fp = fopen("/proc/net/arp", "r");
+ /* Bypass header -- read one line */
+ fgets(line, sizeof(line), fp);
+
+ /* Read the ARP cache entries. */
+ while (fgets(line, sizeof(line), fp)) {
+
+ mask[0] = '-'; mask[1] = '\0';
+ dev[0] = '-'; dev[1] = '\0';
+ /* All these strings can't overflow
+ * because fgets above reads limited amount of data */
+ //num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n",
+ // ip, &type, &flags, hwa, mask, dev);
+ if (num < 4)
+ break;
+
+ entries++;
+ /* if the user specified hw-type differs, skip it */
+ if (hw_set && (type != hw->type))
+ continue;
+
+ /* if the user specified address differs, skip it */
+ if (host && strcmp(ip, host) != 0)
+ continue;
+
+ /* if the user specified device differs, skip it */
+ if (device[0] && strcmp(dev, device) != 0)
+ continue;
+
+ shown++;
+ /* This IS ugly but it works -be */
+ hostname = "?";
+ if (!(option_mask32 & ARP_OPT_n)) {
+ if (1)//! (ap->input(ip, &sa) < 0)
+ hostname = ip;
+ else
+ hostname = ap->sprint(&sa, (option_mask32 & ARP_OPT_n) | 0x8000);
+ if (strcmp(hostname, ip) == 0)
+ hostname = "?";
+ }
+
+ //arp_disp(hostname, ip, type, flags, hwa, mask, dev);
+ }
+ if (option_mask32 & ARP_OPT_v)
+ printf("Entries: %d\tSkipped: %d\tFound: %d\n",
+ entries, entries - shown, shown);
+
+ if (!shown) {
+ if (hw_set || host || device[0])
+ printf("No match found in %d entries\n", entries);
+ }
+#ifdef CONFIG_FEATURE_CLEAN_UP
+ free((char*)host);
+ fclose(fp);
+#endif
+ return 0;
+}
+
+int arp_main(int argc, char **argv);
+
+int arp_main(int argc, char **argv)
+{
+ option_mask32 = bb_getopt_ulflags(argc, argv, "sd");
+ argv += 2;
+ if (option_mask32 & 0x1)
+ {
+ return arp_set(argv);
+ }
+ if (option_mask32 & 0x2)
+ {
+ return arp_del(argv);
+ }
+ return 0;
+}
diff --git a/linux-tools/busybox-1.00/plcutils/mib.c b/linux-tools/busybox-1.00/plcutils/mib.c
index 75bc391303..c4eecd73de 100755
--- a/linux-tools/busybox-1.00/plcutils/mib.c
+++ b/linux-tools/busybox-1.00/plcutils/mib.c
@@ -114,7 +114,7 @@ int mib_main(int argc, char **argv)
fprintf(f,"\n");
fclose(f);
f = fopen("/usr/local/etc/sysctl.conf","w");
- fprintf(f,"net.plc.mode=ad-hoc\n");
+ fprintf(f,"net.plc.mode=slave\n");
fprintf(f,"\n");
fclose(f);
sync();
diff --git a/linux-tools/busybox-1.00/sysdeps/linux/defconfig b/linux-tools/busybox-1.00/sysdeps/linux/defconfig
index f4618f9a92..038ef99f71 100644
--- a/linux-tools/busybox-1.00/sysdeps/linux/defconfig
+++ b/linux-tools/busybox-1.00/sysdeps/linux/defconfig
@@ -277,6 +277,7 @@ CONFIG_RMMOD=y
# Networking Utilities
#
# CONFIG_FEATURE_IPV6 is not set
+CONFIG_ARP=y
CONFIG_ARPING=y
CONFIG_FTPGET=y
# CONFIG_FTPPUT is not set
diff --git a/linux-tools/dconf/Makefile b/linux-tools/dconf/Makefile
new file mode 100644
index 0000000000..5325645d23
--- /dev/null
+++ b/linux-tools/dconf/Makefile
@@ -0,0 +1,12 @@
+all:dconf
+
+OBJS+=dconf.o log.o
+
+dconf: $(OBJS)
+ arm-uclinux-gcc -Os -fomit-frame-pointer -march=armv5 -msoft-float -o $@ $^ -Wl,-elf2flt='-z -s 8000'
+
+%.o: src/%.c
+ arm-uclinux-gcc -Os -fomit-frame-pointer -march=armv5 -msoft-float -o $@ -I./inc -I../../app/sm-plc-drv -I../../app/sm-plc-drv/inc -Wall -c $^
+
+clean:
+ rm -f *.o dconf *.gdb src/*~
diff --git a/linux-tools/dconf/inc/log.h b/linux-tools/dconf/inc/log.h
new file mode 100644
index 0000000000..77679f120f
--- /dev/null
+++ b/linux-tools/dconf/inc/log.h
@@ -0,0 +1,6 @@
+#ifndef __LOG_H
+#define __LOG_H
+
+extern int logwrite(FILE * lf, const char *s);
+
+#endif // __LOG_H
diff --git a/linux-tools/dconf/src/dconf.c b/linux-tools/dconf/src/dconf.c
new file mode 100644
index 0000000000..0b9ec7abc1
--- /dev/null
+++ b/linux-tools/dconf/src/dconf.c
@@ -0,0 +1,152 @@
+/* ---------------------------------------------------------------------------------
+ * Dynamic Configuration
+ * ---------------------------------------------------------------------------------
+ * OBJECT :
+ *
+ * Copyright (C) 2007 by SPiDCOM Technologies. All rights reserved.
+ * ---------------------------------------------------------------------------------
+ * DATE | AUTHOR | COMMENT
+ * ---------------------------------------------------------------------------------
+ * 2007-11-21 | T.C | - Create the first version of this program with SNID
+ * --------------------------------------------------------------------------------- */
+
+
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <errno.h>
+#include "log.h"
+#include "plc_sysctl.h"
+
+#define CTL_NET 3
+#define LOG_FILE "/var/log/dconf.log"
+#define CONFIG_FILE "/usr/local/etc/dynamic.conf"
+
+#define LENGTH_SNID_SYSCTL 3
+
+FILE * logfile;
+int snid_sysctl[LENGTH_SNID_SYSCTL] = {CTL_NET, NET_PLC, PLC_SNID};
+unsigned int snid=0;
+
+
+void f_SIGTERM()
+{
+ logwrite(logfile, "caught SIGTERM\n");
+ exit(-1);
+}
+
+void f_SIGINT()
+{
+ logwrite(logfile, "caught SIGINT\n");
+ exit(-1);
+}
+
+void f_SIGHUP()
+{
+ logwrite(logfile, "caught SIGHUP, resetting\n");
+}
+
+
+void read_dconf (void)
+{
+ FILE *pFile = fopen(CONFIG_FILE,"r");
+
+ if (pFile != NULL)
+ {
+ fscanf (pFile,"SNID=%3d\n", &snid);
+ }
+ else
+ {
+ logwrite(logfile, "/usr/local/etc/dynamic.conf cannot be open to read\n");
+ snid = 0;
+ }
+}
+
+
+void store_dconf (void)
+{
+ FILE *pFile = fopen(CONFIG_FILE,"w");
+
+ if (pFile != NULL)
+
+ {
+ fprintf (pFile,"SNID=%3d\n", snid);
+ }
+ else
+ {
+ logwrite(logfile, "/usr/local/etc/dynamic.conf cannot be open to save\n");
+ }
+}
+
+int change_sysctl (int *sysname, int sysname_length, int new_value)
+{
+ char string[40];
+ int error, len;
+
+ memset(string,0,40);
+ len = sprintf( string, "%d", new_value) + 1;
+
+ if (len>0)
+ {
+ error = sysctl (sysname, sysname_length, NULL, 0, string, len);
+ }
+ else
+ {
+ error = -100;
+ }
+
+ if (error)
+ {
+ char error_msg[60];
+
+ sprintf (error_msg, "cannot change a sysctl : error=%d\n", error);
+
+ logwrite(logfile, error_msg);
+ return -1;
+ }
+
+ return(0);
+}
+
+int main(int argc, char **argv)
+{
+ struct sigaction *s1, *s2;
+
+ /* if more than 1 argument*/
+ if(argc != 1){
+ printf("no argument\n");
+ return 0;
+ }
+
+ if (!(logfile = fopen(LOG_FILE, "a"))) {
+ fprintf(stderr, "can't open %s\n",LOG_FILE);
+ exit(0);
+ }
+ logwrite(logfile, "dynamic configuration starting\n");
+
+
+ /* check for SIG */
+ s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
+ s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
+ s1->sa_handler = f_SIGHUP;
+ sigaction(SIGHUP, s1, s2);
+ s1->sa_handler = f_SIGTERM;
+ sigaction(SIGTERM, s1, s2);
+ s1->sa_handler = f_SIGINT;
+ sigaction(SIGINT, s1, s2);
+ free(s1);
+ free(s2);
+
+ // Here the real job.
+ read_dconf();
+ snid = (snid +1)& 0xFF;
+ store_dconf ();
+ change_sysctl (snid_sysctl,LENGTH_SNID_SYSCTL, snid);
+
+ logwrite(logfile, "dynamic configuration stopped\n");
+ fclose(logfile);
+ exit(0);
+}
diff --git a/linux-tools/dconf/src/log.c b/linux-tools/dconf/src/log.c
new file mode 100644
index 0000000000..91a5813bfe
--- /dev/null
+++ b/linux-tools/dconf/src/log.c
@@ -0,0 +1,32 @@
+#include <sys/types.h>
+#include <unistd.h>
+#include <time.h>
+#include <stdio.h>
+#include <string.h>
+
+#define MAXLINE 2048
+
+/* insert some string into logfile */
+int logwrite(FILE * lf, const char *s)
+{
+ char buffer[MAXLINE];
+ time_t curtime;
+ pid_t pid;
+ char pid_s[8];
+ struct tm *loctime;
+
+ pid = getpid();
+ strcpy(buffer, "");
+ curtime = time(NULL);
+ loctime = localtime(&curtime);
+ strftime(buffer, 256, "%d/%m/%y %H:%M", loctime);
+ sprintf(pid_s, "[%d]", (int) pid);
+ strncat(buffer, pid_s, MAXLINE - strlen(buffer));
+ strncat(buffer, " ", MAXLINE - strlen(buffer));
+ strncat(buffer, s, MAXLINE - strlen(buffer));
+// fprintf(stderr," %s \n", buffer);
+ fputs(buffer, lf);
+ fflush(lf);
+
+ return 0;
+}
diff --git a/linux-tools/ebtables/ebtables.c b/linux-tools/ebtables/ebtables.c
index 8902bd36dc..109b301110 100644
--- a/linux-tools/ebtables/ebtables.c
+++ b/linux-tools/ebtables/ebtables.c
@@ -1321,11 +1321,11 @@ static void delete_rule(int begin, int end)
*cnt = CNT_NORM;
for (j = 0; j < nr_deletes; j++, cnt++)
*cnt = CNT_DEL;
-
+
for (j = 0; j < replace.num_counters - lentmp - nr_deletes;
j++, cnt++)
*cnt = CNT_NORM;
-
+
*cnt = CNT_END;
}
else
@@ -1361,7 +1361,7 @@ static void delete_rule(int begin, int end)
continue;
else
break;
- } else
+ } else
entries->counter_offset -= nr_deletes;
}
}
@@ -1648,7 +1648,7 @@ letscontinue:
counter_offset += nentries;
chain = chain->next;
chain_nr++;
- }
+ }
chain = replace.udc;
chain_nr = -1;
/* next, remove the chains, update the counter offset of
@@ -1786,6 +1786,7 @@ ebt_arpreply_init();
ebt_arp_init();
ebt_among_init();
ebt_802_3_init();
+ebt_limit_init(); // added by lefranc
ebtable_nat_init();
ebtable_filter_init();
ebtable_broute_init();
@@ -2034,7 +2035,7 @@ ebtable_broute_init();
if (!strcasecmp("list_extensions",
argv[optind]))
list_extensions();
-
+
if ((m = find_match(argv[optind])))
add_match(m);
else if ((w = find_watcher(argv[optind])))
diff --git a/linux-tools/ebtables/extensions/ebt_limit.c b/linux-tools/ebtables/extensions/ebt_limit.c
index bf322b8230..f033354dc0 100644
--- a/linux-tools/ebtables/extensions/ebt_limit.c
+++ b/linux-tools/ebtables/extensions/ebt_limit.c
@@ -214,8 +214,8 @@ static struct ebt_u_match limit_match =
.extra_ops opts,
};
-static void _init(void) __attribute((constructor));
-static void _init(void)
+//static void _init(void) __attribute((constructor));
+void ebt_limit_init(void) // modified by lefranc
{
register_match(&limit_match);
}
diff --git a/linux-tools/flashfs/image/etc/sip.conf b/linux-tools/flashfs/image/etc/sip.conf
new file mode 100644
index 0000000000..b1015b37e6
--- /dev/null
+++ b/linux-tools/flashfs/image/etc/sip.conf
@@ -0,0 +1,5 @@
+USERNAME = 123
+PASSWORD = 123
+PROXY = 192.168.100.200
+COUNTRY = DEFAULT
+VAD = NO \ No newline at end of file
diff --git a/linux-tools/flashfs/image/etc/wired.conf b/linux-tools/flashfs/image/etc/wired.conf
new file mode 100644
index 0000000000..bd39d8a3ae
--- /dev/null
+++ b/linux-tools/flashfs/image/etc/wired.conf
@@ -0,0 +1,66 @@
+##### hostapd configuration file ##############################################
+# Empty lines and lines starting with # are ignored
+
+# Example configuration file for wired authenticator. See hostapd.conf for
+# more details.
+
+interface=br0
+driver=wired
+logger_stdout=-1
+logger_syslog=-1
+logger_stdout_level=4
+logger_syslog_level=4
+debug=0
+dump_file=/tmp/hostapd.dump
+ctrl_interface=/var/run/hostapd
+
+ieee8021x=1
+eap_message=hello
+eapol_key_index_workaround=0
+eap_reauth_period=10
+eap_server=0
+#eap_user_file=/etc/hostapd.eap_user
+
+use_pae_group_addr=0
+
+##### RADIUS configuration ####################################################
+# for IEEE 802.1X with external Authentication Server, IEEE 802.11
+# authentication with external ACL for MAC addresses, and accounting
+
+# The own IP address of the access point (used as NAS-IP-Address)
+own_ip_addr=127.0.0.1
+
+# Optional NAS-Identifier string for RADIUS messages. When used, this should be
+# a unique to the NAS within the scope of the RADIUS server. For example, a
+# fully qualified domain name can be used here.
+#nas_identifier=ap.example.com
+
+# RADIUS authentication server
+auth_server_addr=192.168.101.120
+auth_server_port=1812
+auth_server_shared_secret=spidcom
+
+# RADIUS accounting server
+#acct_server_addr=127.0.0.1
+#acct_server_port=1813
+#acct_server_shared_secret=radius
+
+#radius_server_clients=/etc/hostapd.radius_clients
+#radius_server_auth_port=1812
+
+# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#ca_cert=/root/ca.pem
+
+# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#server_cert=/root/authenticator.pem
+
+# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
+# This may point to the same file as server_cert if both certificate and key
+# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be
+# used by commenting out server_cert and specifying the PFX file as the
+# private_key.
+#private_key=/root/authenticator.key
+
+# Passphrase for private key
+#private_key_passwd=secret passphrase
+
diff --git a/linux-tools/flashfs/image/etc/wired8021x.conf b/linux-tools/flashfs/image/etc/wired8021x.conf
new file mode 100644
index 0000000000..295fd6d6d2
--- /dev/null
+++ b/linux-tools/flashfs/image/etc/wired8021x.conf
@@ -0,0 +1,19 @@
+##### wpa_supplicant configuration file ##############################################
+# Empty lines and lines starting with # are ignored
+
+# Example configuration file for wired authenticator. See wpa_supplicant.conf for
+# more details.
+
+# IEEE 802.1X with EAP-MD5
+
+ctrl_interface=/var/run/wpa_supplicant
+ap_scan=0
+
+network={
+ key_mgmt=IEEE8021X
+ eap=MD5
+ identity="spid_user"
+ password="spid_password"
+}
+
+
diff --git a/linux-tools/flashfs/image/share/www/cgi-bin/cpuinfos b/linux-tools/flashfs/image/share/www/cgi-bin/cpuinfos
deleted file mode 100644
index 5f63d0d09c..0000000000
--- a/linux-tools/flashfs/image/share/www/cgi-bin/cpuinfos
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Cpu Info result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Cpu Info result</H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-/bin/cat /proc/cpuinfo
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/flashfs/image/share/www/cgi-bin/ifconfig b/linux-tools/flashfs/image/share/www/cgi-bin/ifconfig
deleted file mode 100644
index 1940db36a5..0000000000
--- a/linux-tools/flashfs/image/share/www/cgi-bin/ifconfig
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Ifconfig -a result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Ifconfig -a result</H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-ifconfig -a
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/flashfs/image/share/www/cgi-bin/meminfos b/linux-tools/flashfs/image/share/www/cgi-bin/meminfos
deleted file mode 100644
index 8513db3cd7..0000000000
--- a/linux-tools/flashfs/image/share/www/cgi-bin/meminfos
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Meminfo result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Meminfo result </H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-/bin/cat /proc/meminfo
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/flashfs/image/share/www/favicon.ico b/linux-tools/flashfs/image/share/www/favicon.ico
deleted file mode 100644
index 558decc082..0000000000
--- a/linux-tools/flashfs/image/share/www/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/linux-tools/flashfs/image/share/www/index.html b/linux-tools/flashfs/image/share/www/index.html
deleted file mode 100644
index 11789004cd..0000000000
--- a/linux-tools/flashfs/image/share/www/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html lang="en">
-<head>
-<title>Spidcom board config</title>
-<meta http-equiv="Content-Type" content="text/html">
-</head>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<h1 align="center"><IMG ALIGN=MIDDLE SRC="spidlogo.JPG"></h1>
-<HR SIZE=5>
-<A HREF="/cgi-bin/ifconfig">[[[ Ethernet configuration ]]]</A>
-<br>
-<br>
-<A HREF="/cgi-bin/cpuinfos">[[[ cpu info ]]] </A>
-<br>
-<br>
-<A HREF="/cgi-bin/meminfos">[[[ memory info ]]] </A>
-<br>
-<br>
-</body></html>
-
diff --git a/linux-tools/flashfs/image/share/www/spidlogo.JPG b/linux-tools/flashfs/image/share/www/spidlogo.JPG
deleted file mode 100644
index 96c9d80acd..0000000000
--- a/linux-tools/flashfs/image/share/www/spidlogo.JPG
+++ /dev/null
Binary files differ
diff --git a/linux-tools/hostapd/.config b/linux-tools/hostapd/.config
index 5282677e21..ca9155aa56 100755
--- a/linux-tools/hostapd/.config
+++ b/linux-tools/hostapd/.config
@@ -53,7 +53,7 @@ CONFIG_EAP_MD5=y
#CONFIG_EAP_GTC=y
# EAP-TTLS for the integrated EAP server
- CONFIG_EAP_TTLS=y
+# CONFIG_EAP_TTLS=y
# EAP-SIM for the integrated EAP server
#CONFIG_EAP_SIM=y
diff --git a/linux-tools/hostapd/driver_wired.c b/linux-tools/hostapd/driver_wired.c
index 993118ef92..6a02e90ed7 100644
--- a/linux-tools/hostapd/driver_wired.c
+++ b/linux-tools/hostapd/driver_wired.c
@@ -199,7 +199,8 @@ static void handle_dhcp(int sock, void *eloop_ctx, void *sock_ctx)
struct dhcp_message *msg;
u8 *mac_address;
- printf("received DHCP packet\n");
+ HOSTAPD_DEBUG(HOSTAPD_DEBUG_VERBOSE,
+ "received DHCP packet\n");
len = recv(sock, buf, sizeof(buf), 0);
if (len < 0) {
diff --git a/linux-tools/hostapd/ieee802_1x.c b/linux-tools/hostapd/ieee802_1x.c
index 24b3dc899b..6fd4a36d44 100644
--- a/linux-tools/hostapd/ieee802_1x.c
+++ b/linux-tools/hostapd/ieee802_1x.c
@@ -171,7 +171,7 @@ int send_ioctl(union plcbox_t *plcbox)
// Send plcbox trough ioctl channel
if (ioctl(fd, SIOCPLCBOX, &ifr) < 0)
{
- printf("Shell Error: ioctl Error\n");
+ //printf("Shell Error: ioctl Error\n");
return -1;
}
diff --git a/linux-tools/hostapd/wired.conf b/linux-tools/hostapd/wired.conf
index 61bb556d88..cf978366ec 100644
--- a/linux-tools/hostapd/wired.conf
+++ b/linux-tools/hostapd/wired.conf
@@ -8,23 +8,21 @@ interface=br0
driver=wired
logger_stdout=-1
logger_syslog=-1
-logger_stdout_level=0
-logger_syslog_level=0
-debug=4
+logger_stdout_level=4
+logger_syslog_level=4
+debug=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ieee8021x=1
-eap_message=duconjesuisla
-#eap_message=hello,networkid=SPIDNET,nasid=foo,portid=0,NAIRealms=spidcom.com
+eap_message=hello
eapol_key_index_workaround=0
eap_reauth_period=10
-eap_server=1
-eap_user_file=/etc/hostapd.eap_user
+eap_server=0
+#eap_user_file=/etc/hostapd.eap_user
use_pae_group_addr=0
-
##### RADIUS configuration ####################################################
# for IEEE 802.1X with external Authentication Server, IEEE 802.11
# authentication with external ACL for MAC addresses, and accounting
@@ -38,7 +36,7 @@ own_ip_addr=127.0.0.1
#nas_identifier=ap.example.com
# RADIUS authentication server
-auth_server_addr=192.168.211.10
+auth_server_addr=192.168.101.120
auth_server_port=1812
auth_server_shared_secret=radius
@@ -47,22 +45,22 @@ auth_server_shared_secret=radius
#acct_server_port=1813
#acct_server_shared_secret=radius
-radius_server_clients=/etc/hostapd.radius_clients
-radius_server_auth_port=1812
+#radius_server_clients=/etc/hostapd.radius_clients
+#radius_server_auth_port=1812
# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
-ca_cert=/root/ca.pem
+#ca_cert=/root/ca.pem
# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
-server_cert=/root/authenticator.pem
+#server_cert=/root/authenticator.pem
# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
# This may point to the same file as server_cert if both certificate and key
# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be
# used by commenting out server_cert and specifying the PFX file as the
# private_key.
-private_key=/root/authenticator.key
+#private_key=/root/authenticator.key
# Passphrase for private key
-private_key_passwd=secret passphrase
+#private_key_passwd=secret passphrase
diff --git a/linux-tools/igmp_filter/igmp_filter.c b/linux-tools/igmp_filter/igmp_filter.c
index 584e7ba19c..8eaa8205ff 100755
--- a/linux-tools/igmp_filter/igmp_filter.c
+++ b/linux-tools/igmp_filter/igmp_filter.c
@@ -65,6 +65,7 @@
#define isdigit(c) (c>='0' && c<='9')
#define isxdigit(c) ((c>='a' && c<='f') || (c>='A' && c<='F'))
#define isspace(c) (c==' ' || c=='\t' || c=='\r' || c=='\n')
+#define EAT_WS(p) { while(*p && *p==' ') p++; while (*p && p[strlen(p)-1]==' ') {p[strlen(p)-1]='\0';}}
MODULE_AUTHOR("Nebojsa SUMRAK, EEE");
MODULE_LICENSE("GPL");
@@ -119,11 +120,18 @@ static int igmp_version = 3;
static int disable_query = 0;
#ifdef CONFIG_IPV6
+
+struct MLD_ops
+{
+ int type;
+ struct in6_addr mca_low;
+ struct in6_addr mca_high;
+};
+
struct MLD_versions
{
unsigned long mld_v1_seen, mld_last_seen, answer, elapsed;
};
-#define EAT_WS(p) { while(*p && *p==' ') p++; while (*p && p[strlen(p)-1]==' ') {p[strlen(p)-1]='\0';}}
#define SET_MLD_SEEN(p) {mld_v.mld_last_seen = jiffies; if (!(p&2)) mld_v.answer = 1; if (p&1) mld_v.mld_v1_seen=jiffies;}
#define MLD_CHK_VERSION(p) \
@@ -142,20 +150,67 @@ static struct in6_addr black_list_ipv6[BLACK_LIST_SIZE];
static int black_list_num_ipv6=0;
static inline int is_equ_ipv6(struct in6_addr * mcs, struct in6_addr * mcd);
static inline int write_ipv6(char * buf, struct in6_addr * mcs);
+static int ipv6_between(struct in6_addr * mcp, struct in6_addr * mcl, struct in6_addr * mch);
+
+#define OPT_LIST_SIZE 16
+static struct MLD_ops mld_ops[OPT_LIST_SIZE];
+static int num_MLD_ops=0;
static inline int toupper(int c)
{
if (c >= 'a' && c <= 'z') return c + 'A'-'a'; else return c;
}
+static int is_in_ops_allowed(struct in6_addr * addr)
+{
+ int i, is_include=0, is_exclude=0;
+
+ if (!addr->s6_addr[2]) return 0; // for some non multicast addrs .. to reduce creation of mc_hosts ...
+
+ for (i = num_MLD_ops-1; i >= 0 ; i--)
+ {
+ if (mld_ops[i].type==1 && ipv6_between(addr, &mld_ops[i].mca_low, &mld_ops[i].mca_high)) return 0; // exclude
+ if (mld_ops[i].type==0 && ipv6_between(addr, &mld_ops[i].mca_low, &mld_ops[i].mca_high)) return 1; // include
+ if (mld_ops[i].type==0) is_include=1;
+ if (mld_ops[i].type==1) is_exclude=1;
+ }
+
+ if (is_include) return 0;
+ if (is_exclude) return 1;
+
+ return 1;
+}
+
static int is_in_black_list_ipv6(struct in6_addr * addr)
{
int i;
+
for(i=0;i<black_list_num_ipv6;i++)
if(is_equ_ipv6(black_list_ipv6+i,addr)) return i;
+
return -1;
}
+static inline int write_ops(char * buf, struct MLD_ops * mld_ops)
+{
+ int len=0;
+
+ if (mld_ops->type == 0) len+=sprintf(buf+len,"I[");
+ if (mld_ops->type == 1) len+=sprintf(buf+len,"E[");
+ len+=write_ipv6(buf+len,&mld_ops->mca_low);
+ len+=sprintf(buf+len,"-");
+ len+=write_ipv6(buf+len,&mld_ops->mca_high);
+ len+=sprintf(buf+len,"]\n");
+ return len;
+}
+
+static inline int write_all_ops(char * buf)
+{
+ int len = 0, i=0;
+ for (;i < num_MLD_ops;i++) len += write_ops(buf+len, mld_ops+i);
+ return len;
+}
+
static int write_black_list_ipv6(char * buf)
{
int i, len=0;
@@ -165,6 +220,8 @@ static int write_black_list_ipv6(char * buf)
len += sprintf(buf+len,"\n");
}
+ len += write_all_ops(buf+len);
+
return len;
}
@@ -262,13 +319,13 @@ void SendToCache(int type,u8 *group,u8 *host)
}
/*
- *    Create and send a mac packet.
- *
- *    ptype = protocol type (use MAC_PTYPE)
- *    packet, p_len = pointer and length (in bytes) of a packet
- *    dest_hw == NULL means send broadcast frame
- *    src_hw == NULL means, get device source address
- */
+�* � �Create and send a mac packet.
+�*
+�* � �ptype = protocol type (use MAC_PTYPE)
+�* � �packet, p_len = pointer and length (in bytes) of a packet
+�* � �dest_hw == NULL means send broadcast frame
+�* � �src_hw == NULL means, get device source address
+�*/
int mac_send(int ptype, struct net_device *dev, unsigned char *packet, int p_len, unsigned char *dest_hw, unsigned char *src_hw)
{
@@ -308,7 +365,7 @@ static inline int igmp_num(int res)
}
// create message and send thru plc driver..
-// multicast flooding to 224.1.1.1 with dest in mac..
+// multicast flooding to 224.0.0.1 with dest in mac..
static void jiqa_print(void)
{
struct {
@@ -431,6 +488,15 @@ static inline int is_zero_multicast(struct in6_addr * mca)
return 1;
}
+// multicast in form FF02::XX:XX:XX:XX is allowed
+static inline int is_allowed_multicast(struct in6_addr * mca)
+{
+ if (mca->s6_addr16[1] != 0) return 0;
+ if (mca->s6_addr32[1] != 0) return 0;
+ if (mca->s6_addr32[2] != 0) return 0;
+ return 1;
+}
+
static inline int is_equ_ipv6(struct in6_addr * mcs, struct in6_addr * mcd)
{
int i;
@@ -440,22 +506,26 @@ static inline int is_equ_ipv6(struct in6_addr * mcs, struct in6_addr * mcd)
static inline int write_ipv6(char * buf, struct in6_addr * mcs)
{
- int len = 0, i;
+ int len = 0, i, printed = 0;
- len += sprintf(buf, "%02X%02X::", mcs->s6_addr[0], mcs->s6_addr[1]);
+ len += sprintf(buf, "%02X%02X", mcs->s6_addr[0], mcs->s6_addr[1]);
- for (i = 1; i < 7; i++)
+ for (i = 1; i < 8; i++)
if (mcs->s6_addr16[i]){
- len += sprintf(buf+len, "%X:", mcs->s6_addr16[i]);
+ if (printed==1) {len += sprintf(buf+len, ":"); printed = 2;}
+ len += sprintf(buf+len, ":");
+ if (mcs->s6_addr[i<<1]) len += sprintf(buf+len, "%x", mcs->s6_addr[i<<1]);
+ len += sprintf(buf+len, "%x", mcs->s6_addr[1+(i<<1)]);
}
+ else
+ if (!printed) {printed = 1;}
+
+ if (printed==1) len += sprintf(buf+len, "::0"); // must be something after two initial bytes..
- len += sprintf(buf+len, "%X", (mcs->s6_addr[14] << 8) | mcs->s6_addr[15]);
-
- return len;
+ return len;
}
-
static inline int get_time_value(int res)
{
if(res>127) res = ((res&0xf) | 0x10) << (((res>>4)&7) + 3);
@@ -473,41 +543,43 @@ static inline unsigned char put_time_value(unsigned short res)
return res;
}
-// ipv6 addresses start with Fxxx::bla bla
+// ipv6 addresses start with Fxxx:bla bla
static inline unsigned short is_ipv6(char * addr)
{
EAT_WS(addr)
if (strlen(addr) < 8) return 0; // could not be version 6 ipv need more chars 7 minimal
- return (toupper(addr[0])=='F' && addr[4]==':' && addr[5]==':');
+ return (toupper(addr[0])=='F' && addr[4]==':');
}
-char * findPattern(char * orig, char * forpat, char * peace, short * ret)
+
+char * findPattern(char * orig, char * forpat, char * peace, unsigned short * ret, unsigned char * p)
{
int i=0,j, ps = strlen(forpat);
for (i=0; i < strlen(orig);i++)
for (j=0; j < ps; j++)
if (forpat[j] == orig[i]) {
- if (i) strncpy(peace,orig,i); peace[i] = '\0';
- *ret = j;
- return orig + i + 1;
+ if (i) strncpy(peace,orig,i); peace[i] = '\0';
+ *ret = j;
+ *p = forpat[j];
+ return orig + i + 1;
}
//last peace..
- strcpy(peace,orig);
- *ret=2;
- return NULL;
+ strcpy(peace,orig);
+ *ret=0xFF;
+ return NULL;
}
// return value is pointer after valid ipv6 address.
// in ipv6 is in valid byte order banned multicast address..
-static char * get_ipv6(char * addr, unsigned char * ipv6)
+static char * get_ipv6(char * addr, unsigned char * ipv6, unsigned char * sep)
{
- unsigned int a, b, pos=0;
- unsigned char part[16];
+ unsigned int a, pos=0;
+ unsigned char part[16], p;
char peace[128];
unsigned int val;
- unsigned short ret;
+ unsigned short ret, is_break=0, pos_break=0;
EAT_WS(addr)
@@ -515,28 +587,104 @@ static char * get_ipv6(char * addr, unsigned char * ipv6)
memset(ipv6,0,16); // all zeros..
- sscanf(addr,"%x::", &a);
+ sscanf(addr,"%x:", &a);
ipv6[0]=a>>8;
ipv6[1]=a&0xFF;
- addr += 6; // first two bytes of address + :: ipv6 separator.
+ addr += 5; // first two bytes of address + : ipv6 separator.
while(*addr && *addr != ' ' && pos < 14)
{
- addr = findPattern(addr,": ",peace,&ret);
+ if (*addr == ':') { is_break++; pos_break = pos; addr++;}
+ addr = findPattern(addr,": -]",peace,&ret,&p);
if (sscanf(peace,"%x",&val)!= 1) break; // something wrong in address ..
part[pos++] = val >> 8;
part[pos++] = val & 0xFF;
- if (ret == 1) break; // sepator is space that mins ipv6 is finished..
+ if (ret) break; // separator is space. that mins ipv6 is finished..
}
- memcpy(ipv6 + 16 - pos, part, pos);
+ if (is_break) {
+ memcpy(ipv6 + 2, part, pos_break);
+ memcpy(ipv6 + 16 - pos + pos_break, part+pos_break, pos-pos_break);
+ }
+ else
+ memcpy(ipv6 + 2, part, pos);
+
+ if (sep) *sep = p;
+
+ return addr;
+}
+
+static char * get_ops_ipv6(char * addr, unsigned char * ipv6_1, unsigned char * ipv6_2, int * type)
+{
+ unsigned char sep;
+
+ EAT_WS(addr)
+
+ *type = (addr[0] == 'I')?0:1;
+ addr++;
+ if (addr[0] != '[') {*type = 2; return addr;}
+ addr++;
+
+ addr = get_ipv6(addr, ipv6_1, &sep);
+ if (sep != '-') {*type = 2; return addr;}
+
+ addr = get_ipv6(addr, ipv6_2, &sep);
+ if (sep != ']') {*type = 2; return addr;}
+
return addr;
+}
+
+int is_ops(char * addr)
+{
+ if (strlen(addr) < 2) return 0;
+
+ if (addr[0] != 'I' && addr[0] != 'E') return 0;
+ if (addr[1] != '[') return 0;
+ return 1;
+}
+
+// compare two IPv6 addr
+int ipv6_cmp(struct in6_addr * mc1, struct in6_addr * mc2)
+{
+ int i, k=0;
+
+ while (k < 4 && (mc1->s6_addr32[k]==mc2->s6_addr32[k])) k++;
+
+ for (i=k<<2; i < 16; i++)
+ {
+ int r = mc1->s6_addr[i] - mc2->s6_addr[i];
+ if (r) return r;
+ }
+
+ return 0;
+}
+static char * get_ops(char * addr)
+{
+ int i, found=0;
+ struct MLD_ops ops1;
+
+ char * ret_val = get_ops_ipv6(addr, ops1.mca_low.s6_addr, ops1.mca_high.s6_addr, &ops1.type);
+
+ if (ops1.type >= 2) return ret_val;
+
+ for(i=0;i < num_MLD_ops; i++)
+ if (ops1.type != mld_ops[i].type && !ipv6_cmp(&ops1.mca_low, &mld_ops[i].mca_low) && !ipv6_cmp(&ops1.mca_high, &mld_ops[i].mca_high)) {mld_ops[i] = ops1; found=1; break;} // change the type of ops
+
+ if (!found && num_MLD_ops < OPT_LIST_SIZE) mld_ops[num_MLD_ops++] = ops1;
+
+ return ret_val;
}
+int ipv6_between(struct in6_addr * mcp, struct in6_addr * mcl, struct in6_addr * mch)
+{
+ if (ipv6_cmp(mcp,mcl) < 0) return 0;
+ if (ipv6_cmp(mcp,mch) > 0) return 0;
+ return 1;
+}
struct ipv6_opt_hdr_igmp {
__u8 nexthdr;
@@ -703,14 +851,17 @@ unsigned int hook_v6_func(unsigned int hooknum,
// cupnuti mca
// sendtocache
{
- struct mld1_msg * mld1 = (struct mld1_msg *)icmp6;
+ struct mld1_msg * mld1 = (struct mld1_msg *)icmp6;
char groupmac[6];
- u32 group=ipv6_toipv4(&mld1->mca);
+ u32 group=ipv6_toipv4(&mld1->mca);
+
+ if (!is_in_ops_allowed(&mld1->mca)) break;
+
SET_MLD_SEEN(1)
ipv6mcast_toETHMulti(&mld1->mca, groupmac);
- mld_version=1;
- if(is_in_black_list_ipv6(&mld1->mca)<0)
- SendToCache(1,groupmac,mh->source);
+ mld_version=1;
+ if(is_in_black_list_ipv6(&mld1->mca)<0)
+ SendToCache(1,groupmac,mh->source);
else
trace("Black listed entry %s, don't add\n",inet_neta(group));
trace("MLD V1 report group=%s\n",inet_neta(group));
@@ -719,13 +870,14 @@ unsigned int hook_v6_func(unsigned int hooknum,
break;
case ICMPV6_MGM_REDUCTION:
{
- struct mld1_msg * mld1 = (struct mld1_msg *)icmp6;
+ struct mld1_msg * mld1 = (struct mld1_msg *)icmp6;
char groupmac[6];
- u32 group=ipv6_toipv4(&mld1->mca);
+ u32 group=ipv6_toipv4(&mld1->mca);
+
ipv6mcast_toETHMulti(&mld1->mca, groupmac);
SET_MLD_SEEN(1)
- mld_version=1;
- if(is_in_black_list_ipv6(&mld1->mca)<0)
+ mld_version=1;
+ if(is_in_black_list_ipv6(&mld1->mca)<0)
SendToCache(0,groupmac,mh->source);
else
trace("Black listed entry %s, don't delete \n",inet_neta(group));
@@ -741,10 +893,14 @@ unsigned int hook_v6_func(unsigned int hooknum,
struct mld2_report * rep = (struct mld2_report *)icmp6;
trace("MLDv2 report\n");
//mld_version=2;
+
SET_MLD_SEEN(0)
MLD_CHK_VERSION(0)
for (i=0; i < ntohs(rep->ngrec);i++) {
struct mld2_grec * grec = &rep->grec[i];
+
+ if (!is_in_ops_allowed(&grec->grec_mca)) continue;
+
switch (grec->grec_type) {
case MLD2_MODE_IS_INCLUDE:
case MLD2_CHANGE_TO_INCLUDE: // simple include of multicast address
@@ -911,6 +1067,24 @@ static __u32 net_ainet(char *b)
return(htonl((b1<<24)|((b2&0xff)<<16)|((b3&0xff)<<8)|(b4&0xff)));
}
+static char * net_ainet_1(char *b, __u32 * rv)
+{
+ int b1,b2,b3,b4;
+ char bs[64];
+ EAT_WS(b)
+ sscanf(b,"%s",bs);
+ sscanf(bs,"%d.%d.%d.%d",&b1,&b2,&b3,&b4);
+
+ *rv = (htonl((b1<<24)|((b2&0xff)<<16)|((b3&0xff)<<8)|(b4&0xff)));
+
+ b += strlen(bs);
+
+ EAT_WS(b)
+
+ return b;
+
+}
+
static int info_read_proc(char* buf, char** start, off_t offs, int len)
{
int writ = sprintf(buf,"Total packets processed=%d\n\nMulticast Group: | Multicast Host | Last Checkin\n",process_counter);
@@ -977,15 +1151,25 @@ static int proc_read_blacklist(char* buf, char** start, off_t offs, int len)
static int proc_write_blacklist(struct file *file, const char *buffer, unsigned long count, void *data)
{
int len;
- char cbuff[512],*b=cbuff;
+ char cbuff[512],*b=cbuff, c;
len = (count>511 ? 511 : count);
if(copy_from_user(cbuff, buffer, len)) return -EFAULT;
cbuff[len] = '\0';
while(*b) {
- while(*b && !isdigit(*b) && *b!='-' && !isxdigit(*b)) b++;
+
+ EAT_WS(b)
+
+ while(*b && !isdigit(*b) && *b!='-' && !isxdigit(*b) && *b!='E' && *b!='I') b++;
if(!*b) break;
+
+ if (strlen(b) < 4) break; // no more valid tokens to find, string to short..
+
+ #ifdef CONFIG_IPV6
+ if (is_ops(b)) { b = get_ops(b); continue; }
+ #endif
+
if(*b=='-') {
int i;
__u32 addr;
@@ -994,7 +1178,7 @@ static int proc_write_blacklist(struct file *file, const char *buffer, unsigned
// if it is ipv6 address??
if (is_ipv6(b)) {
struct in6_addr addr;
- b = get_ipv6(b, addr.s6_addr);
+ b = get_ipv6(b, addr.s6_addr, &c);
i=is_in_black_list_ipv6(&addr);
if(i<0) trace("Address is not in black list!\n");
else {
@@ -1003,11 +1187,12 @@ static int proc_write_blacklist(struct file *file, const char *buffer, unsigned
black_list_ipv6[i]=black_list_ipv6[j];
black_list_num_ipv6--;
}
+ continue;
}
else
#endif
{
- addr=net_ainet(b);
+ b=net_ainet_1(b, &addr);
i=is_in_black_list(addr);
if(i<0) trace("Address %s is not in black list!\n",inet_neta(addr));
else {
@@ -1022,27 +1207,29 @@ static int proc_write_blacklist(struct file *file, const char *buffer, unsigned
// if it is ipv6 address??
if (is_ipv6(b)) {
struct in6_addr addr;
- b = get_ipv6(b, addr.s6_addr);
+ b = get_ipv6(b, addr.s6_addr, &c);
trace("%02x%02x::%x",data[0],data[1],data[15]);
if(is_in_black_list_ipv6(&addr)>=0) trace("Address already in list\n");
else if(addr.s6_addr[0] == 0xFF) { trace("ovde 3");
if(black_list_num_ipv6>=BLACK_LIST_SIZE-1) trace("Black list full!\n");
else black_list_ipv6[black_list_num_ipv6++]=addr;
} else trace("Not an multicast address %s \n", b);
+ continue;
}
else
#endif
{
- __u32 addr=net_ainet(b);
- register int haddr=(ntohl(addr)>>24);
+ __u32 addr;
+ register int haddr;
+ b=net_ainet_1(b, &addr);
+ haddr=(ntohl(addr)>>24);
if(is_in_black_list(addr)>=0) trace("Address %s already in list\n",inet_neta(addr));
else if(haddr>=0xe0 && haddr<0xf0) {
if(black_list_num>=BLACK_LIST_SIZE-1) trace("Black list full!\n");
else black_list[black_list_num++]=addr;
} else trace("Not an multicast address %s %02x (0x%08x)!\n",b,haddr,addr);
}
- }
- while(*b && (isdigit(*b) || *b=='.' || *b==':')) b++;
+ }
}
return len;
}
@@ -1342,7 +1529,7 @@ int init_module_h(void)
if(nf_register_hook(&nfho6)<0) {
nf_unregister_hook(&nfho);
- printk("MLD Filetering hook registration failed!\n");
+ printk("MLD Filtering hook registration failed!\n");
return 1;
}
diff --git a/linux-tools/japach/AUTHORS b/linux-tools/japach/AUTHORS
deleted file mode 100644
index 2dc8313890..0000000000
--- a/linux-tools/japach/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Jirka Kosina <jikos@jikos.cz>
-
diff --git a/linux-tools/japach/COPYING b/linux-tools/japach/COPYING
deleted file mode 100644
index d60c31a97a..0000000000
--- a/linux-tools/japach/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/linux-tools/japach/ChangeLog b/linux-tools/japach/ChangeLog
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/japach/ChangeLog
+++ /dev/null
diff --git a/linux-tools/japach/HOW-TO-INSTALL-JAPACH.txt b/linux-tools/japach/HOW-TO-INSTALL-JAPACH.txt
deleted file mode 100644
index b4967c3908..0000000000
--- a/linux-tools/japach/HOW-TO-INSTALL-JAPACH.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-go to linux-tools/Japach/src and do make
-Make is configured to compile japach with target arm-uclinux
-
-Japach tree:
-
-
-=================== JAPACH DAEMON ===================
-|| ||
-|| /etc/| ||
-|| |==> Japach.conf ||
-|| ||
-|| /bin/| ||
-|| |==> Japach ||
-|| ||
-|| /var/log/| ||
-|| |==> Japach.log ||
-|| ||
-|| ||
-|| /usr/share/www/| ||
-|| |==> favicon.ico ||
-|| |==> index.html ||
-|| |==> test ||
-|| |==> spidlogo.jpg ||
-|| | ||
-|| |==> cgi-bin/| ||
-|| |==> ifconfig ||
-|| |==> meminfos ||
-|| |==> cpuinfos ||
-|| ||
-|| ||
-=======================================================
-
-
-
-Put in /usr/share/www/ all you html file
-put in /usr/share/www/cgi-bin/ all your cgi scripts
-
-to run Japach => japach &
-
-
-
-
-
diff --git a/linux-tools/japach/Makefile b/linux-tools/japach/Makefile
deleted file mode 100644
index f6fbb58c0c..0000000000
--- a/linux-tools/japach/Makefile
+++ /dev/null
@@ -1,344 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = .
-top_srcdir = .
-prefix = /usr/local
-exec_prefix = ${prefix}
-
-bindir = ${exec_prefix}/bin
-sbindir = ${exec_prefix}/sbin
-libexecdir = ${exec_prefix}/libexec
-datadir = ${prefix}/share
-sysconfdir = ${prefix}/etc
-sharedstatedir = ${prefix}/com
-localstatedir = ${prefix}/var
-libdir = ${exec_prefix}/lib
-infodir = ${prefix}/info
-mandir = ${prefix}/man
-includedir = ${prefix}/include
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/japach
-pkglibdir = $(libdir)/japach
-pkgincludedir = $(includedir)/japach
-
-top_builddir = .
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-AUTOMAKE = automake
-AUTOHEADER = autoheader
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-transform = s,x,x,
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = gcc
-MAKEINFO = makeinfo
-PACKAGE = japach
-VERSION = 0.4.1
-
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-DATA = $(sysconf_DATA)
-
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
-missing mkinstalldirs
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): configure.in
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-install-sysconfDATA: $(sysconf_DATA)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
- else if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
- fi; fi; \
- done
-
-uninstall-sysconfDATA:
- @$(NORMAL_UNINSTALL)
- list='$(sysconf_DATA)'; for p in $$list; do \
- rm -f $(DESTDIR)$(sysconfdir)/$$p; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am: all-am
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-exec-am: install-sysconfDATA
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-sysconfDATA
-uninstall: uninstall-recursive
-all-am: Makefile $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: uninstall-sysconfDATA install-sysconfDATA install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach/Makefile.am b/linux-tools/japach/Makefile.am
deleted file mode 100644
index 94da6e0f8b..0000000000
--- a/linux-tools/japach/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-
diff --git a/linux-tools/japach/Makefile.in b/linux-tools/japach/Makefile.in
deleted file mode 100644
index e09fec3dd6..0000000000
--- a/linux-tools/japach/Makefile.in
+++ /dev/null
@@ -1,344 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = @CC@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-DATA = $(sysconf_DATA)
-
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
-missing mkinstalldirs
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): configure.in
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-install-sysconfDATA: $(sysconf_DATA)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
- else if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
- fi; fi; \
- done
-
-uninstall-sysconfDATA:
- @$(NORMAL_UNINSTALL)
- list='$(sysconf_DATA)'; for p in $$list; do \
- rm -f $(DESTDIR)$(sysconfdir)/$$p; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am: all-am
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-exec-am: install-sysconfDATA
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-sysconfDATA
-uninstall: uninstall-recursive
-all-am: Makefile $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: uninstall-sysconfDATA install-sysconfDATA install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach/README b/linux-tools/japach/README
deleted file mode 100644
index 7e4226f0d9..0000000000
--- a/linux-tools/japach/README
+++ /dev/null
@@ -1,121 +0,0 @@
-
- JAPACH
- user documentation
-
- Jirka Kosina <jikos@jikos.cz>
-
-
-
-
-1. What is JAPACH
-
-Very simple WWW server, supporting only some parts of HTTP/1.1
-protocol, as defined in RFC 2616. Nowadays it could do as a simple
-server of static pages, or simple CGI scripts (GET method only).
-
-2. Beginning
-
-2.1 Download, compilation, installation
-
-The latest version can be obtained from http://www.jikos.cz/jikos/japach - in
-.tar.gz (sources) or in RPM (binary distribution for redhat-like systems).
-
-After downloading .tar.gz one has to:
-
-tar -xzf<jmeno_souboru>
-./configure
-make
-make install [this is optional, installs files into system]
-
-2.2 Configuration
-
-2.2.1 Location of config file
-
-For program to start & run correctly, it is neccessary to have a configuration
-file with defined configuration values.
-The server being run without any parameter, a configu file is looked for in
-current directory. If unsuccessful, it will not start. You can specify location
-of configuration file using commnad-line parameter -c such as:
-$ ./japach -c /etc/japach.conf
-
-2.2.2 Configuration file format
-
-Configuration values are defined such as <key> <value>, <key> being internal
-configuration keyword (see 2.2.3).
-To comment a line, first character on line must be #
-
-2.2.3 Configuration values
-
- * port <portunum>
- specifies a tcp port for server to lsiten on. The default for webservers
- is 80, which is considered as default, if this value is not used in
- configuration. Note that unpriviledged processes can't bind ports
- below 1024
-
- * documentroot <path>
- a path on local filsystem which is taken as documentroot. E.g. if
- someone requests http://www.yourserver.com/index.html, index.html
- residing in path specified here is used and sent to client
-
- * uid <num>, gid <num>
- specifies creds which should running server daemon have. You can look
- them up in /etc/passwd, /etc/group
-
- * masterlog <path to logfile>
- full path to the main server's logfile (created during startup if
- doesn't exist)
-
- * maxchilds <count>
- specifies maximum count of concurrent running childs of server process,
- which are serving requests. Adjust this to fit your hardware
- capabilities.
-
- * type <extension> <type>
- assigns content-types to file extensions, which is very important for
- client-side interpretation of sent data. The example should be something
- like
- type jpg image/jpg
- where "jpg" means extension of filename, and image/jpg is standardized
- content-type, to give client a hint how to interpret sent data (display
- them as an image, in this case).
-
- * cage <path>
- client is not allowed to request document, which lay outside directories
- specified here, any such attempt will result in 403 Forbidden error.
- You should have here your documentroot, and documentroots of all
- your virtualservers, at minimum.
-
- * symlink <mode>
- How should the server deal with symlinks, if asked to serve file,
- which is symlink.
- - follow_symlinks - follow the symlink to correct location, and
- process the file, if it is in cage
- - do_not_follow_symlinks - any attempt to read symlink would result
- in 403 Forbidden error
-
- * servername <name>
- servername to return in headers, if not serving virtualhost. Should
- point to server's IP address.
-
- * virtualhost <name> <documentroot> <log>
-
- defines virtualhosts - name is name of server (fqdn, it should have
- existing DNS entry poiting to out IP address - otherwise it has no
- use - if you don't understand this, you're hopeless as web server
- administrator ;) ), documentroot specifies documentroot belonging
- to this virtualhost, and log is a logfile, which will hold all
- logged actions concerning this virtual server.
-
- * userdir <dirname>
-
- name of directory, which is looked for when such request as
- http://your.cool.server.com/~username/ is received. If there is
- user with "username" on your host, directory specified here is
- taken in his homedirectory as "root" for the rest of URL.
-
- * cgidir <dirname>
-
- specifies a directory, from which execution of CGI scripts is
- allowed.
-
-
diff --git a/linux-tools/japach/aclocal.m4 b/linux-tools/japach/aclocal.m4
deleted file mode 100644
index 9f8add8f0d..0000000000
--- a/linux-tools/japach/aclocal.m4
+++ /dev/null
@@ -1,104 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4
-
-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
diff --git a/linux-tools/japach/cgi.c b/linux-tools/japach/cgi.c
deleted file mode 100644
index 9253c944e4..0000000000
--- a/linux-tools/japach/cgi.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-/* resembling is_in_cage() */
-
-int is_in_cgi_path(char *filename)
-{
- struct cgidirs *pom;
- char *pom1;
- int found = 0;
-
- pom = conf.cgi_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(filename, pom->next->name) == filename)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
-
-/* first test if given reaquest is going to be a CGI script.
- * if not, return CGI_NOCGI.
- * Otherwise if it really can be run returns CGI_OK, in other
- * cases CGI_ERR
- * Huh, why is this comment longer than the body of the function? ;)
- */
-
-int if_cgi_then_ok(char *filename)
-{
- if (!(is_in_cgi_path(filename)))
- return CGI_NOCGI;
- if (access(filename, X_OK) == -1)
- return CGI_ERR;
- else
- return CGI_OK;
-}
-
-char *cgi_add_env_var(char *name, char *value)
-{
- int len;
- char *result;
-
- len = strlen(name) + 2;
- if (value) { /* if quesry string was empty, we will have nice segfault probably */
- len += strlen(value);
- }
- result = (char *) malloc(sizeof(char) * len);
- sprintf(result, "%s=%s", name, value ? value : "");
- return result;
-
-}
-
-char **cgi_get_environment()
-{
- char **p1, **p2;
-
- p1 = p2 = (char **) malloc(sizeof(char *) * MAX_ENVIRON_VARS);
-
- *p1++ = cgi_add_env_var("SERVER_NAME", client.requested_host);
- *p1++ = cgi_add_env_var("SERVER_SOFTWARE", FULL_SERVER_SOFTWARE_NAME);
- *p1++ = cgi_add_env_var("SERVER_PROTOCOL", client.http_version);
- *p1++ = cgi_add_env_var("REMOTE_ADDR", client.host_name);
- *p1++ = cgi_add_env_var("REQUEST_METHOD", client.method); /* GET */
- *p1++ = cgi_add_env_var("SCRIPT_NAME", client.req_url);
- *p1++ = cgi_add_env_var("SCRIPT_FILENAME", client.getfile);
- *p1++ = cgi_add_env_var("QUERY_STRING", client.cgi_get_query_string);
- *p1++ = 0;
-
- return p2;
-}
diff --git a/linux-tools/japach/communication.c b/linux-tools/japach/communication.c
deleted file mode 100644
index a8b0a7d147..0000000000
--- a/linux-tools/japach/communication.c
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
-char old_document_root[MAXLINE];
-FILE *old_logfile;
-
- /*
- * tries to write all nbytes chars in loop (of *ptr)
- */
-int writen(int fd, char *ptr, int nbytes)
-{
- int nleft, nwritten;
-
- nleft = nbytes;
- while (nleft > 0) {
- nwritten = write(fd, ptr, nleft);
- if (nwritten <= 0)
- return (nwritten);
-
- nleft -= nwritten;
- ptr += nwritten;
- }
- return (nbytes - nleft);
-}
-
- /*
- * readss line of maximum length maxlen
- */
-int readline(int fd, char *ptr, int maxlen)
-{
- int n, rc;
- char c;
-
- for (n = 1; n < maxlen; n++) {
- if ((rc = read(fd, &c, 1)) == 1) {
- *ptr++ = c;
- if (c == '\n')
- break;
- } else if (rc == 0) {
- if (n == 1)
- return (0); /* EOF, no data read */
- else
- break; /* EOF, some data read */
- } else
- return (-1); /* error */
- }
- *ptr = 0;
- return (n);
-}
-
- /*
- * writes a line and doesn't care for result
- */
-
-writestring(int fd, char *s1)
-{
- int n;
- n = writen(fd, s1, strlen(s1));
- return (n);
-}
-
- /*
- * writes default headers (FIXME: cgi scripts should
- * write it's own content-type kludge)
- */
-
-int writedefaulthdr(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2;
- int i;
- struct stat buf;
-
- if (!strlen(client.http_version))
- return;
- fstat(client.getfile_desc, &buf);
- strcpy(tmp1, "Date: ");
- get_rfc822_date(tmp);
- strncat(tmp, "\r\n", MAXLINE - strlen(tmp));
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
-
- writestring(fd, tmp1);
- writestring(fd, "Server: JAPACH/");
- writestring(fd, VERSION);
- writestring(fd, "\r\n");
-
- if (client.reply != 304) { /* a file will be output */
- writestring(fd, "Accept-Ranges: bytes\r\n");
- writestring(fd, "Connection: close\r\n");
- }
-
- if (client.cgi_state == CGI_OK)
- return 0;
-
- if ((!strip_extension(client.getfile))
- || (client.reply == 404)
- || (client.reply == 400)
- || (client.reply == 417)
- || (client.reply == 403)
- || (client.reply == 301)
- || (client.reply == 501)) { /* no file is going to output */
- strcpy(tmp1, "Last-Modified: ");
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
- writestring(fd, tmp1);
-
- if (!strip_extension(client.getfile))
- writestring(fd, "Content-Type: text/plain\r\n\r\n");
- else
- writestring(fd, "Content-Type: text/html\r\n\r\n");
- }
-
- else if (client.reply != 304) {
- int i;
-
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- strcpy(tmp, "Last-Modified: ");
- strncat(tmp, tmp2, MAXLINE - strlen(tmp) - 2);
- strcat(tmp, "\r\n");
-
- free(tmp2);
- writestring(fd, tmp);
- /* going to find content-type according to extension, and output
- * apropriate content-type
- */
- strcpy(tmp, strip_extension(client.getfile));
- tmp2 = find_content_type(tmp);
- strcpy(tmp1, "Content-Type: ");
- strncat(tmp1, tmp2, MAXLINE - strlen(tmp1) - 3);
- /* strcat(tmp1, "\r\n\n"); */
-
- writestring(fd, tmp1);
- }
-
-}
-
- /*
- * generates http reply to socked, sets client.reply properly, opens
- * local file (assigns descriptor)
- * - cgi started 17/02/2002
- */
-
-int genreply(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2, *found_s;
- char link_getfile[MAXLINE];
- char text[MAXLINE];
- char username[MAXLINE], tosubst[MAXLINE], userpath[MAXLINE];
- int i;
- int found = 0;
- struct stat buf;
- struct stat lbuf;
- struct virtuals *pom;
- struct passwd *psw;
-
- if (!strcasecmp(client.method, "GET")) { /* GET-specific actions */
- /* remove part following ?
- * TODO: RFC?
- */
- if (client.cgi_get_query_string = strchr(client.req_url, '?')) {
- client.cgi_get_query_string[0] = '\0';
- client.cgi_get_query_string++;
- }
-
- } else if (!strcasecmp(client.method, "HEAD")) {
- } else {
- /* unknown method */
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 501 Method Not Implemented\r\n");
- writestring(fd, "Allow: GET\r\n");
- }
- logrequest(log.logfile, 501, strlen(HTTP_ERR_501));
- writedefaulthdr(fd);
- return;
- }
- if (strlen(client.expect)) {
- client.reply = 417;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 417 Expectation failed\r\n");
- writedefaulthdr(fd);
- return;
- }
- if (client.req_url[0] != '/') {
- client.reply = 400;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 400 Bad Request\r\n");
- writedefaulthdr(fd);
- return;
- }
-
- client.reply = -1;
-
- if ((!strcasecmp(client.http_version, "HTTP/1.1"))
- || (!strcasecmp(client.http_version, "HTTP/1.0"))) {
-
- /* save default settings, after serving a request set old values.
- * no use now, but in the future this may be rewritten to be able
- * to serve more than one request during one connection.
- * so this is neccessary to have the right defaults for the next
- * request
- */
- strcpy(old_document_root, conf.document_root);
- old_logfile = log.logfile;
-
- /* find in conf->virtual_hosts name of virtual server, copy to
- * document_root proper conf->virtual_hosts->documentroot
- */
- pom = conf.virtual_hosts->next;
- while (pom && !found) {
- if (!strcasecmp(client.requested_host, pom->name)) {
- found = 1;
- strncpy(conf.document_root, pom->documentroot, MAXLINE);
- log.logfile = pom->logfile;
- } else
- pom = pom->next;
- }
- }
- /* all changing of URL (filename, respectively) is done here
- * decoding of special %ab characters, ~ expansion, ...
- */
-
- tmp2 = decode_hexa_octets(client.req_url);
- strcpy(client.req_url, tmp2);
- free(tmp2);
-
- if (client.req_url[1] == '~') {
- i = 2;
- while ((i < strlen(client.req_url)) && (client.req_url[i] != '/')) {
- username[i - 2] = client.req_url[i];
- username[i - 1] = '\0';
- i++;
- }
- found = i;
- while (i < strlen(client.req_url)) {
- tosubst[i - found] = client.req_url[i];
- tosubst[i - found + 1] = '\0';
- i++;
- }
- if (psw = getpwnam(username)) {
- strcpy(conf.document_root, psw->pw_dir);
- strcat(conf.document_root, "/");
- strncat(conf.document_root, conf.userdir, MAXLINE);
- if (client.req_url[i] == '/')
- strcat(conf.document_root, "/");
- }
- }
- strcpy(client.getfile, conf.document_root);
-
- if (client.req_url[1] != '~')
- strncat(client.getfile, client.req_url, MAXLINE);
-
- else
- strncat(client.getfile, tosubst, MAXLINE);
- tmp2 = deldupl('/', client.getfile);
- strcpy(client.getfile, tmp2);
-
-
- if (is_in_cage(client.getfile)) {
- client.getfile_desc = open(client.getfile, O_RDONLY);
- if (client.getfile_desc > 0) {
- fstat(client.getfile_desc, &buf);
- if (S_ISDIR(buf.st_mode)) {
- if (client.getfile[strlen(client.getfile) - 1] != '/')
- client.reply = 301;
- else {
- if (strlen(client.getfile) < MAXLINE - 12) {
- strncat(client.getfile, "/index.html",
- MAXLINE - strlen(client.getfile));
- close(client.getfile_desc);
- client.getfile_desc =
- open(client.getfile, O_RDONLY);
- } else
- client.reply = 404;
- }
- }
- lstat(client.getfile, &lbuf);
-
- /* let's do some symlink handling */
-
- if ((S_ISLNK(lbuf.st_mode)))
- getlink(client.getfile, link_getfile);
- if ((S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == DO_NOT_FOLLOW_SYMLINKS))
- || (S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == FOLLOW_SYMLINKS_INTO_CAGE)
- && (!is_in_cage(link_getfile)))) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc > 0) && (client.reply != 301)
- && (client.reply != 403) && (client.reply != 404)) {
- if (is_in_cage(client.getfile)) {
- if (strlen(client.if_mod_since)) { /* if-modified-since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates(tmp2, client.if_mod_since)
- == -1)
- client.reply = 304;
- free(tmp2);
- }
- if (strlen(client.if_unmod_since)) { /* If-Unmodified-Since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates
- (tmp2, client.if_unmod_since) == 1)
- client.reply = 412;
- free(tmp2);
- }
- if ((client.reply != 304) && (client.reply != 412)) {
- /* the file is ok, now we need to check if it has to (and could)
- * be run (CGI). If so, then 200, otherwise 403 */
- client.cgi_state = if_cgi_then_ok(client.getfile);
- if ((client.cgi_state == CGI_NOCGI)
- || (client.cgi_state == CGI_OK)) {
- client.reply = 200;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 200 OK\r\n");
- writedefaulthdr(fd);
- }
-
- logrequest(log.logfile, 200, buf.st_size);
- } else { // cgi_err
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, buf.st_size);
- }
- } else {
- if (client.reply == 304) {
- writestring(fd,
- "HTTP/1.1 304 Not Modified\r\n");
- logrequest(log.logfile, 304, 0);
- writedefaulthdr(fd);
- } else if (client.reply == 412) {
- writestring(fd,
- "HTTP/1.1 412 Precondition Failed\r\n");
- logrequest(log.logfile, 412, 0);
- writedefaulthdr(fd);
-
- }
- }
- } else {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- }
- }
- } else { /* cage-membership test failed */
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if (client.reply == 301) {
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 301 Moved Permanently\r\n");
- writestring(fd, "Location: ");
-
- strcpy(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/\r\n");
-
- writestring(fd, text);
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 301,
- strlen(HTTP_ERR_301_P1) + strlen(HTTP_ERR_301_P2) + 2 * strlen(text) +
- 14);
-
- }
- if (((client.getfile_desc < 0)) && ((errno != EACCES) || (client.reply == 404))) { /* we can have 404 from earlier */
- client.reply = 404;
- if (client.getfile > 0)
- close(client.getfile_desc);
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 404 Not Found\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 404, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc < 0) && (errno == EACCES)) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
-}
-
- /*
- * read headers and process content of client-provided data
- * TODO: some macros would do a good job in following
- * boring & nasty code
- */
-
-int read_headers(int sockfd)
-{
- int n, i;
- char line[MAXLINE];
- int numlines = 0;
-
- numlines++;
- n = readline(sockfd, line, MAXLINE);
- line[strlen(line) - 2] = '\0';
-
- if (numlines == 1)
- strcpy(client.first_line, line);
-
- /* parse method */
- i = 0;
- while ((i < strlen(line)) && (line[i] != ' ')) {
- client.method[i] = line[i];
- i++;
- }
- client.method[i] = '\0';
-
- /* URL */
- i = strlen(client.method) + 1;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.req_url[i - (strlen(client.method) + 1)] = line[i];
- i++;
- }
-
- client.req_url[(i - strlen(client.method)) - 1] = '\0';
- /* HTTP protocl version */
- while (line[i] == ' ')
- i++;
- n = i;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.http_version[i - n] = line[i];
- i++;
- }
- client.http_version[i - (n - 1)] = '\0';
-
- /* if the request is in old HTTP version, don't wait for
- * more headers & clear client.http_version
- */
- if ((!strlen(client.http_version))) {
- strcpy(line, "");
- strcpy(client.http_version, "");
- }
-
- /* more and more headers */
- strcpy(client.browser, "");
- strcpy(client.requested_host, conf.server_name);
- strcpy(client.if_mod_since, "");
-
- while ((strlen(line) != 0) && (n != 0)) {
- n = readline(sockfd, line, MAXLINE); /* wait for and empty line */
- line[strlen(line) - 2] = '\0';
- if (strncasecmp(line, "User-agent", 10) == 0) {
- int i = 12;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.browser, line + i, MAXLINE);
- }
- if (strncasecmp(line, "host:", 5) == 0) {
- int i = 6;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.requested_host, line + i, MAXLINE);
- i = 0;
-
- while (isalnum(client.requested_host[i]) || client.requested_host[i] == '.' ||
- client.requested_host[i] == '-')
- i++;
- if (i)
- client.requested_host[i] = '\0';
- }
- if (strncasecmp(line, "If-Modified-since:", 18) == 0) {
- int i = 19;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_mod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "If-Unmodified-since:", 20) == 0) {
- int i = 21;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_unmod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "Expect:", 7) == 0) {
- int i = 8;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.expect, line + i, MAXLINE);
- }
- }
- if (n == 0) {
- /* no problem here - no need to flush anything, and the OS
- * will do what is needed not to leak descriptors
- */
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- return (0);
-}
-
- /* routine called from freshly forked child from main
- * program loop in japach.c
- */
-int process_request(int sockfd)
-{
- char text[MAXLINE];
- void *data;
-
- for (;;) {
-
- read_headers(sockfd);
-
- /* here client.reply is to be generated, which is
- * then tested
- * also some url-rewrites are done, and local file
- * descriptor is assigned
- */
-
- genreply(sockfd);
- if (client.cgi_state != CGI_OK)
- writestring(sockfd, "\r\n\n");
- if (!strcasecmp(client.method, "HEAD"))
- return;
- switch (client.reply) {
- case 200:{ // ok
- int i;
- signal(SIGCHLD, SIG_IGN);
- if (client.cgi_state == CGI_OK) {
- int cgi_pipe[2], bytes;
- char line[MAXLINE];
- pid_t pid;
- char **tmp;
-
- pipe(cgi_pipe);
- pid = vfork();
-
- if (pid == 0) {
- close(cgi_pipe[0]);
- dup2(cgi_pipe[1], 1); /* 1 = stdout */
- tmp = cgi_get_environment();
- execve(client.getfile, NULL, cgi_get_environment());
- } else {
- close(cgi_pipe[1]);
- write(sockfd, "BLABLE\n",7);
- while ((bytes =
- read(cgi_pipe[0], line, MAXLINE)) > 0) {
- if (bytes) write(sockfd, line, bytes);
- memset(line, '\0', sizeof(line));
- }
- close(cgi_pipe[0]);
- waitpid(pid, NULL, 0);
- }
- } else {
- data = (char *) malloc((sizeof(char)) * MAXLINE + 1);
- i = MAXLINE;
- while (i == MAXLINE)
- if ((i =
- read(client.getfile_desc, data,
- MAXLINE)) == MAXLINE)
- writen(sockfd, data, i); /* rewrite file to network */
- if (i > 0)
- writen(sockfd, data, i); /* negative i meands error from read() */
- close(client.getfile_desc);
- free(data);
- }
- /* put back original values (may have been changed
- * by virtualhost)
- */
- strcpy(conf.document_root, old_document_root);
- log.logfile = old_logfile;
-
- /* here is the point, where one than more requests during one connection
- * is to be handled. maybe recursive call of process_request() is not
- * the best idea, but should work ;)
-
- process_request(sockfd);
- */
-
- return;
- }
- case 301:{ /* moved permanently */
- strcpy(text, HTTP_ERR_301_P1);
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "\">");
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "</a>\r\n");
- strncat(text, HTTP_ERR_301_P2, MAXLINE - strlen(text));
- writestring(sockfd, text);
- return;
- }
- case 304:{ /* not modified */
- writestring(sockfd, "");
- return;
- }
- case 400:{ /* bad request */
- strcpy(text, HTTP_ERR_400);
- writestring(sockfd, text);
- return;
- }
- case 404:{ /* not found */
- strcpy(text, HTTP_ERR_404);
- writestring(sockfd, text);
- return;
- }
- case 403:{ /* forbidden */
- strcpy(text, HTTP_ERR_403);
- writestring(sockfd, text);
- return;
- }
- case 412:{ /* precondition failed */
- strcpy(text, HTTP_ERR_412);
- writestring(sockfd, text);
- return;
- }
- case 417:{ /* expectation failed */
- writestring(sockfd, "");
- return;
- }
- case 501:{ /* method not implemented */
- strcpy(text, HTTP_ERR_501);
- writestring(sockfd, text);
- return;
- }
- }
- }
-}
-
- /* test if a file is located "in the cage".
- * cage is a struct read from conf file and
- * stored in conf.cage_dirs linked list
- */
-
-int is_in_cage(char *s)
-{
- struct cage *pom;
- char *pom1;
- int found = 0;
-
- pom1 = (char *) malloc(sizeof(char) * MAXLINE);
- delddot(s, pom1);
- s = pom1;
- pom = conf.cage_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(s, pom->next->name) == s)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
diff --git a/linux-tools/japach/config.cache b/linux-tools/japach/config.cache
deleted file mode 100644
index 1a6395800c..0000000000
--- a/linux-tools/japach/config.cache
+++ /dev/null
@@ -1,55 +0,0 @@
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-ac_cv_big_endian=${ac_cv_big_endian=no}
-ac_cv_c_const=${ac_cv_c_const=yes}
-ac_cv_c_inline=${ac_cv_c_inline=inline}
-ac_cv_func_fcloseall=${ac_cv_func_fcloseall=yes}
-ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes}
-ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes}
-ac_cv_func_strftime=${ac_cv_func_strftime=yes}
-ac_cv_func_vprintf=${ac_cv_func_vprintf=yes}
-ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h=yes}
-ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes}
-ac_cv_header_errno_h=${ac_cv_header_errno_h=yes}
-ac_cv_header_fcntl_h=${ac_cv_header_fcntl_h=yes}
-ac_cv_header_netdb_h=${ac_cv_header_netdb_h=yes}
-ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h=yes}
-ac_cv_header_pwd_h=${ac_cv_header_pwd_h=yes}
-ac_cv_header_setjmp_h=${ac_cv_header_setjmp_h=yes}
-ac_cv_header_signal_h=${ac_cv_header_signal_h=yes}
-ac_cv_header_stdc=${ac_cv_header_stdc=yes}
-ac_cv_header_stdio_h=${ac_cv_header_stdio_h=yes}
-ac_cv_header_string_h=${ac_cv_header_string_h=yes}
-ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
-ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes}
-ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h=yes}
-ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
-ac_cv_header_time=${ac_cv_header_time=yes}
-ac_cv_header_time_h=${ac_cv_header_time_h=yes}
-ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
-ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir=no}
-ac_cv_little_endian=${ac_cv_little_endian=yes}
-ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
-ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
-ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
-ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
-ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
-ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
-ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional=no}
-ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
-ac_cv_struct_tm=${ac_cv_struct_tm=time.h}
-ac_cv_type_signal=${ac_cv_type_signal=void}
-ac_cv_type_size_t=${ac_cv_type_size_t=yes}
diff --git a/linux-tools/japach/config.log b/linux-tools/japach/config.log
deleted file mode 100644
index cf7a076600..0000000000
--- a/linux-tools/japach/config.log
+++ /dev/null
@@ -1,52 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-configure:556: checking for a BSD compatible install
-configure:609: checking whether build environment is sane
-configure:666: checking whether make sets ${MAKE}
-configure:712: checking for working aclocal
-configure:725: checking for working autoconf
-configure:738: checking for working automake
-configure:751: checking for working autoheader
-configure:764: checking for working makeinfo
-configure:780: checking for gcc
-configure:893: checking whether the C compiler (gcc ) works
-configure:909: gcc -o conftest conftest.c 1>&5
-configure:935: checking whether the C compiler (gcc ) is a cross-compiler
-configure:940: checking whether we are using GNU C
-configure:968: checking whether gcc accepts -g
-configure:1004: checking for dirent.h that defines DIR
-configure:1042: checking for opendir in -ldir
-configure:1125: checking how to run the C preprocessor
-configure:1205: checking for ANSI C header files
-configure:1309: checking for sys/wait.h that is POSIX.1 compatible
-configure:1354: checking for sys/types.h
-configure:1394: checking for sys/stat.h
-configure:1434: checking for unistd.h
-configure:1474: checking for fcntl.h
-configure:1514: checking for sys/socket.h
-configure:1554: checking for string.h
-configure:1594: checking for netdb.h
-configure:1634: checking for time.h
-configure:1674: checking for stdio.h
-configure:1714: checking for netinet/in.h
-configure:1754: checking for arpa/inet.h
-configure:1794: checking for signal.h
-configure:1834: checking for errno.h
-configure:1874: checking for sys/wait.h
-configure:1914: checking for setjmp.h
-configure:1954: checking for pwd.h
-configure:1992: checking for working const
-configure:2067: checking for inline
-configure:2107: checking for size_t
-configure:2140: checking whether time.h and sys/time.h may both be included
-configure:2175: checking whether struct tm is in sys/time.h or time.h
-configure:2210: checking for big endian
-configure:2247: checking for little endian
-configure:2299: checking whether gcc needs -traditional
-configure:2345: checking for 8-bit clean memcmp
-configure:2381: checking return type of signal handlers
-configure:2422: checking for strftime
-configure:2518: checking for vprintf
-configure:2625: checking for fcloseall
-configure:2679: checking for gethostbyname
diff --git a/linux-tools/japach/config.status b/linux-tools/japach/config.status
deleted file mode 100644
index 64a816aaf9..0000000000
--- a/linux-tools/japach/config.status
+++ /dev/null
@@ -1,169 +0,0 @@
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host ventoux:
-#
-# ./configure --target=arm-uclinux
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
-for ac_option
-do
- case "$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} ./configure --target=arm-uclinux --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} ./configure --target=arm-uclinux --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "./config.status generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "$ac_cs_usage"; exit 0 ;;
- *) echo "$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=.
-ac_given_INSTALL="/usr/bin/install -c"
-
-trap 'rm -fr Makefile src/Makefile conftest*; exit 1' 1 2 15
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
-/^[ ]*VPATH[ ]*=[^:]*$/d
-
-s%@SHELL@%/bin/sh%g
-s%@CFLAGS@%-g -O2%g
-s%@CPPFLAGS@%%g
-s%@CXXFLAGS@%%g
-s%@FFLAGS@%%g
-s%@DEFS@% -DPACKAGE=\"japach\" -DVERSION=\"0.4.1\" -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRING_H=1 -DHAVE_NETDB_H=1 -DHAVE_TIME_H=1 -DHAVE_STDIO_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SETJMP_H=1 -DHAVE_PWD_H=1 -DTIME_WITH_SYS_TIME=1 -DAC_LITTLE_ENDIAN=1 -DRETSIGTYPE=void -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_FCLOSEALL=1 %g
-s%@LDFLAGS@%%g
-s%@LIBS@%%g
-s%@exec_prefix@%${prefix}%g
-s%@prefix@%/usr/local%g
-s%@program_transform_name@%s,x,x,%g
-s%@bindir@%${exec_prefix}/bin%g
-s%@sbindir@%${exec_prefix}/sbin%g
-s%@libexecdir@%${exec_prefix}/libexec%g
-s%@datadir@%${prefix}/share%g
-s%@sysconfdir@%${prefix}/etc%g
-s%@sharedstatedir@%${prefix}/com%g
-s%@localstatedir@%${prefix}/var%g
-s%@libdir@%${exec_prefix}/lib%g
-s%@includedir@%${prefix}/include%g
-s%@oldincludedir@%/usr/include%g
-s%@infodir@%${prefix}/info%g
-s%@mandir@%${prefix}/man%g
-s%@INSTALL_PROGRAM@%${INSTALL}%g
-s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g
-s%@INSTALL_DATA@%${INSTALL} -m 644%g
-s%@PACKAGE@%japach%g
-s%@VERSION@%0.4.1%g
-s%@ACLOCAL@%aclocal%g
-s%@AUTOCONF@%autoconf%g
-s%@AUTOMAKE@%automake%g
-s%@AUTOHEADER@%autoheader%g
-s%@MAKEINFO@%makeinfo%g
-s%@SET_MAKE@%%g
-s%@CC@%gcc%g
-s%@CPP@%gcc -E%g
-s%@LIBOBJS@%%g
-
-CEOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-
-CONFIG_FILES=${CONFIG_FILES-"Makefile src/Makefile"}
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-
-
-exit 0
diff --git a/linux-tools/japach/configure b/linux-tools/japach/configure
deleted file mode 100644
index 2f3bd4f037..0000000000
--- a/linux-tools/japach/configure
+++ /dev/null
@@ -1,3092 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=aclocal.m4
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:556: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:609: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=japach
-
-VERSION=0.4.1
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:712: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:725: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:738: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:751: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:764: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:780: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:810: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:861: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 904 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:940: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:968: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1004: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1009 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1042: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1050 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1083: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1091 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1125: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1140 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1205: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1210 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1235 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1253 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 1274 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1309: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1314 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_sys_wait_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
-if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_WAIT_H 1
-EOF
-
-fi
-
-for ac_hdr in sys/types.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1354: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/stat.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1394: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1399 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1434: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1439 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in fcntl.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1474: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1479 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/socket.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1514: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1519 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in string.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1554: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1559 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in netdb.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1594: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1634: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1639 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in stdio.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1674: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1679 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in netinet/in.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1714: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1719 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in arpa/inet.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1754: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1759 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in signal.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1794: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1799 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in errno.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1839 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/wait.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1874: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1879 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in setjmp.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1914: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1919 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in pwd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1954: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1959 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1992: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2067: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2074 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2107: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2112 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
-else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2140: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2175: checking whether struct tm is in sys/time.h or time.h" >&5
-if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <time.h>
-int main() {
-struct tm *tp; tp->tm_sec;
-; return 0; }
-EOF
-if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_struct_tm=time.h
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_struct_tm=sys/time.h
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_struct_tm" 1>&6
-if test $ac_cv_struct_tm = sys/time.h; then
- cat >> confdefs.h <<\EOF
-#define TM_IN_SYS_TIME 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for big endian""... $ac_c" 1>&6
-echo "configure:2210: checking for big endian" >&5
-if eval "test \"`echo '$''{'ac_cv_big_endian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_big_endian=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 2218 "configure"
-#include "confdefs.h"
-
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[sizeof(long) - 1] == 0x78 && c[sizeof(long) - 2] == 0x56 && c[sizeof(long) - 3] == 0x34 && c[sizeof(long) - 4] == 0x12);
- }
-
-EOF
-if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_big_endian=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_big_endian=no
-fi
-rm -fr conftest*
-fi
-
-
-fi
-
-echo "$ac_t""$ac_cv_big_endian" 1>&6
-echo $ac_n "checking for little endian""... $ac_c" 1>&6
-echo "configure:2247: checking for little endian" >&5
-if eval "test \"`echo '$''{'ac_cv_little_endian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_little_endian="$ac_cv_have_emx"
-else
- cat > conftest.$ac_ext <<EOF
-#line 2255 "configure"
-#include "confdefs.h"
-
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[0] == 0x78 && c[1] == 0x56 && c[2] == 0x34 && c[3] == 0x12);
- }
-
-EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_little_endian=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_little_endian=no
-fi
-rm -fr conftest*
-fi
-
-
-fi
-
-echo "$ac_t""$ac_cv_little_endian" 1>&6
-
-if test "$ac_cv_big_endian" = yes; then
- cat >> confdefs.h <<\EOF
-#define AC_BIG_ENDIAN 1
-EOF
-
-else if test "$ac_cv_little_endian" = yes; then
- cat >> confdefs.h <<\EOF
-#define AC_LITTLE_ENDIAN 1
-EOF
-
-fi
-fi
-
-if test $ac_cv_prog_gcc = yes; then
- echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2299: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_pattern="Autoconf.*'x'"
- cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
-#include "confdefs.h"
-#include <sgtty.h>
-Autoconf TIOCGETP
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
-else
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=no
-fi
-rm -f conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat > conftest.$ac_ext <<EOF
-#line 2323 "configure"
-#include "confdefs.h"
-#include <termio.h>
-Autoconf TCGETA
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -f conftest*
-
- fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
-
-echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2345: checking for 8-bit clean memcmp" >&5
-if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_memcmp_clean=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 2353 "configure"
-#include "confdefs.h"
-
-main()
-{
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
-}
-
-EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_memcmp_clean=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_memcmp_clean=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2381: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:2422: checking for strftime" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2427 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strftime(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strftime();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_strftime) || defined (__stub___strftime)
-choke me
-#else
-strftime();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strftime=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strftime=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STRFTIME 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-# strftime is in -lintl on SCO UNIX.
-echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:2472: checking for strftime in -lintl" >&5
-ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strftime();
-
-int main() {
-strftime()
-; return 0; }
-EOF
-if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STRFTIME 1
-EOF
-
-LIBS="-lintl $LIBS"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2518: checking for vprintf" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vprintf(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char vprintf();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_vprintf) || defined (__stub___vprintf)
-choke me
-#else
-vprintf();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_vprintf=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vprintf=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_VPRINTF 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test "$ac_cv_func_vprintf" != yes; then
-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2570: checking for _doprnt" >&5
-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2575 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-_doprnt();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func__doprnt=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func__doprnt=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_DOPRNT 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-for ac_func in fcloseall
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2625: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2630 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2679: checking for gethostbyname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2684 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
-choke me
-#else
-gethostbyname();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_result=yes
-else
- echo "$ac_t""no" 1>&6
-cf_result=no
-fi
-
-if test "$cf_result" = no; then
- echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
-echo "configure:2729: checking for gethostbyname in -lsocket" >&5
-ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2737 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_result=yes
-else
- echo "$ac_t""no" 1>&6
-cf_result=no
-fi
-
- if test "$cf_result" = no; then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2771: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2779 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lnsl $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
- fi
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile src/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@LIBOBJS@%$LIBOBJS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/linux-tools/japach/configure.in b/linux-tools/japach/configure.in
deleted file mode 100644
index b6230e3fce..0000000000
--- a/linux-tools/japach/configure.in
+++ /dev/null
@@ -1,83 +0,0 @@
-dnl Process this file with autoconf to produce a configure script
-AC_INIT(aclocal.m4)
-AM_INIT_AUTOMAKE(japach, 0.4.1)
-AC_PROG_CC
-dnl Check for headers
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(sys/types.h)
-AC_CHECK_HEADERS(sys/stat.h)
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(fcntl.h)
-AC_CHECK_HEADERS(sys/socket.h)
-AC_CHECK_HEADERS(string.h)
-AC_CHECK_HEADERS(netdb.h)
-AC_CHECK_HEADERS(time.h)
-AC_CHECK_HEADERS(stdio.h)
-AC_CHECK_HEADERS(netinet/in.h)
-AC_CHECK_HEADERS(arpa/inet.h)
-AC_CHECK_HEADERS(signal.h)
-AC_CHECK_HEADERS(errno.h)
-AC_CHECK_HEADERS(sys/wait.h)
-AC_CHECK_HEADERS(setjmp.h)
-AC_CHECK_HEADERS(pwd.h)
-
-dnl Check for typedefs, structs & compiler chars
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-
-AC_CACHE_CHECK([for big endian], ac_cv_big_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[sizeof(long) - 1]] == 0x78 && c[[sizeof(long) - 2]] == 0x56 && c[[sizeof(long) - 3]] == 0x34 && c[[sizeof(long) - 4]] == 0x12);
- }
- ], ac_cv_big_endian=yes, ac_cv_big_endian=no, ac_cv_big_endian=no)
-)
-AC_CACHE_CHECK([for little endian], ac_cv_little_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[0]] == 0x78 && c[[1]] == 0x56 && c[[2]] == 0x34 && c[[3]] == 0x12);
- }
- ], ac_cv_little_endian=yes, ac_cv_little_endian=no, ac_cv_little_endian="$ac_cv_have_emx")
-)
-
-if test "$ac_cv_big_endian" = yes; then
- AC_DEFINE(AC_BIG_ENDIAN)
-else if test "$ac_cv_little_endian" = yes; then
- AC_DEFINE(AC_LITTLE_ENDIAN)
-fi
-fi
-
-dnl Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_TYPE_SIGNAL
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_HAVE_FUNCS(fcloseall)
-dnl AC_HAVE_FUNCS(sigsetjmp siglongjmp)
-
-AC_CHECK_FUNC(gethostbyname, cf_result=yes, cf_result=no)
-if test "$cf_result" = no; then
- AC_CHECK_LIB(socket, gethostbyname, cf_result=yes, cf_result=no)
- if test "$cf_result" = no; then
- AC_CHECK_LIB(nsl, gethostbyname)
- else
- test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
- fi
-fi
-
-AC_OUTPUT(Makefile src/Makefile)
-
diff --git a/linux-tools/japach/install-sh b/linux-tools/japach/install-sh
deleted file mode 100644
index e9de23842d..0000000000
--- a/linux-tools/japach/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/linux-tools/japach/japach.c b/linux-tools/japach/japach.c
deleted file mode 100644
index ae7eeb190c..0000000000
--- a/linux-tools/japach/japach.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-int childs = 0; /* count of forked children */
-int first_cycle = 1;
-
-sig_atomic_t terminate, reload;
-
-void flush_virtual_logs()
-{
- struct virtuals *p;
-
- p = conf.virtual_hosts;
- while (p){
- fflush(p->logfile);
- p = p->next;
- }
-}
-
- /* TODO: some macros would be nice here */
-void free_mem()
-{
- /* -- struct conf -- */
- struct c_types *p1, *p11;
- struct cage *p2, *p22;
- struct virtuals *p3, *p33;
- struct cgidirs *p4, *p44;
- p1 = conf.content_types;
- p11 = p1->next;
-
- p2 = conf.cage_dirs;
- p22 = p2->next;
-
- p3 = conf.virtual_hosts;
- p33 = p3->next;
-
- p4 = conf.cgi_dirs;
- p44 = p4->next;
-
- while (p1) {
- p11 = p1->next;
- free(p1);
- p1 = p11;
- }
-
- while (p2) {
- p22 = p2->next;
- free(p2);
- p2 = p22;
- }
-
- while (p3) {
- p33 = p3->next;
- free(p3);
- p3 = p33;
- }
-
- while (p4) {
- p44 = p4->next;
- free(p4);
- p4 = p44; /* no need to close file */
- }
-
-}
-
-void f_SIGCHLD()
-{
- union wait wstatus;
- pid_t exit_pid;
-
- while ((exit_pid = wait3(&wstatus, WNOHANG, NULL)) > 0) {
- if (exit_pid != -1)
-/* fprintf(stderr,"Child with pid %d exited, reducing to %d\n",
- exit_pid, childs - 1);*/
- childs--;
- }
-}
-
-void f_SIGTERM()
-{
- logwrite(log.logfile, "caught SIGTERM\n");
- terminate = 1;
-}
-
-void f_SIGINT()
-{
- logwrite(log.logfile, "caught SIGINT\n");
- terminate = 1;
-}
-
-void f_SIGHUP()
-{
- logwrite(log.logfile, "caught SIGHUP, resetting\n");
- reload = 1;
-}
-
-main(int argc, char *argv[])
-{
- int sockfd, newsockfd, clilen, childpid;
- struct sockaddr_in cli_addr, serv_addr;
- struct hostent *hostentry;
- FILE *conf_file;
- struct sigaction *s1, *s2;
- int i, opt = 1;
- pid_t pidstart;
- struct cage *pom;
-
-
- /* config */
- strcpy(conf_file_name, "japach.conf");
- for (i = 1; i < argc; i++) {
- if ((!strcmp(argv[i], "-c")) && (i < argc - 1)) {
- strcpy(conf_file_name, argv[i + 1]);
- }
- }
-
- /* start daemon
- */
- if ((pidstart = vfork()) < 0) {
- fprintf(stderr, "master fork error.\n");
- return (-1);
- } else if (pidstart > 0) {
- printf("master fork ok, child daemon (pid %d) created\n",
- pidstart);
- return (0);
- }
-
- terminate = 0;
- while (!terminate) {
-
- conf_file = fopen(conf_file_name, "r");
- if (!conf_file) {
- fprintf(stderr, "conf file not found\n");
- return (-1);
- }
- if (!first_cycle) {
- free_mem();
- first_cycle = 0;
- }
- parse_config(conf_file);
- fclose(conf_file);
-
-
- if (!(log.logfile = fopen(conf.master_log, "a"))) {
- fprintf(stderr, "can't open %s\n",
- conf.master_log);
- free_mem();
- exit(0);
- }
- logwrite(log.logfile, "Server starting\n");
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = f_SIGHUP;
- sigaction(SIGHUP, s1, s2);
- s1->sa_handler = f_SIGTERM;
- sigaction(SIGTERM, s1, s2);
- s1->sa_handler = f_SIGINT;
- sigaction(SIGINT, s1, s2);
- s1->sa_handler = f_SIGCHLD;
- s1->sa_flags = SA_RESTART;
- sigaction(SIGCHLD, s1, s2);
- free(s1);
- free(s2);
-
- /* socket ops */
- if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- logwrite(log.logfile,
- "can't open stream socket.\n");
- f_SIGTERM();
- }
-
- if (setsockopt
- (sockfd, SOL_SOCKET, SO_REUSEADDR, &opt,
- sizeof(opt)) != 0) {
- fprintf(stderr, "error setting socket options.\n");
- logwrite(log.logfile,
- "error setting socket options.\n");
- f_SIGTERM();
- }
- bzero((char *) &serv_addr, sizeof(serv_addr));
- serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- serv_addr.sin_port = htons(conf.serv_tcp_port);
-
- if (bind
- (sockfd, (struct sockaddr *) &serv_addr,
- sizeof(serv_addr)) < 0) {
- fprintf(stderr, "error binding address.\n");
- logwrite(log.logfile, "error binding address.\n");
- close(sockfd);
- f_SIGTERM();
- }
-
- if (listen(sockfd, 5) != 0) {
- fprintf(stderr, "error calling listen()\n");
- logwrite(log.logfile, "error calling listen()\n");
- }
-
-
- reload = 0;
- while (!terminate && !reload) {
- while (childs >= conf.max_childs)
- pause(); /* wait until signal occurs.
- * we are waiting for SIGCHLD to decrement
- * childs variable
- */
-
- clilen = sizeof(cli_addr);
- if (!
- (newsockfd =
- accept(sockfd, (struct sockaddr *) &cli_addr,
- &clilen))) {
- fprintf(stderr, "accept error\n");
- exit(0);
- }
-
- if ((terminate) || (reload))
- continue;
-
- /* reverse resolving */
- if (NULL !=
- (hostentry =
- gethostbyaddr((char *) &cli_addr.sin_addr,
- sizeof(cli_addr.sin_addr),
- AF_INET)))
- client.host_name = hostentry->h_name;
- else
- client.host_name =
- inet_ntoa(cli_addr.sin_addr);
- client.ip_address = inet_ntoa(cli_addr.sin_addr);
-
- /* k* child, which will serve the request */
- if ((childpid = vfork()) < 0)
- printf("server: fork error\n");
- else if (childpid == 0) {
- struct sigaction *s1, *s2;
-
- setgid(conf.gid);
- setuid(conf.uid);
- close(sockfd);
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = SIG_IGN;
- sigaction(SIGHUP, s1, s2);
- free(s1);
- free(s2);
- process_request(newsockfd); /* GO! */
- /*fprintf(stderr,"Processing (%d) done, exiting...\n",getpid());*/
- close(newsockfd);
- exit(0);
- } else if (childpid > 0){
- childs++; /* increment count of forked childs in parent process */
- /*fprintf(stderr, "New child with pid %d created, incrementing to %d\n",
- childpid, childs);*/
- }
- close(newsockfd);
- }
- close(sockfd);
- fclose(log.logfile);
- } /* end of main loop */
- logwrite(log.logfile, "END\n");
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#else
- fflush(log.logfile);
- flush_virtual_logs();
-#endif
- free_mem();
- free(s1);
- exit(0);
-}
diff --git a/linux-tools/japach/japach.conf b/linux-tools/japach/japach.conf
deleted file mode 100644
index e42e25a8ed..0000000000
--- a/linux-tools/japach/japach.conf
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# configuration file for japach webserver
-#
-# Jirka Kosina <jikos@jikos.cz>
-#
-
-
-# TCP port to listen on
-# format:
-# port number
-port 80
-
-# Name of the server
-# format:
-# servername name_of_server
-#
-#servername www.foo.cz
-
-# Directory in filesystem which will act as root directory
-# of the webserver
-# format:
-# documentroot path
-documentroot /root/japach/www
-
-# What priviledges should forked children, who interact with user,
-# have.
-# format:
-# uid uid
-# gid gid
-# ;)
-uid 0
-gid 0
-
-# Name of the directory in user homedirs, which will be searched
-# when remote user requests http://<servername>/~username/
-# format:
-# userdir name
-userdir root
-
-# File which should be used as primary log
-# for the main server
-# format:
-# masterlog /path/to/some.file
-masterlog /root/japach/log/japach.log
-
-# Maximum count of concurently served requests.
-# In case there are more reaquests, they will wait in queue,
-# eventually timeout at client's side
-# format:
-# maxchilds number
-maxchilds 2
-
-# Content types assigned to filename exitensions. This content-tyype
-# is sent to client to give him a hint how to interpret data he is
-# receiving.
-# format:
-# type extension contenty-type
-# (note that the extension is used without dot)
-type gif image/gif
-type jpg image/jpg
-type html text/html
-type png image/png
-
-# A list of directories, in which every document served to user must be
-# located, otherwise he will get HTTP 403 Forbiddent Error.
-#
-# Note that good idea is havning at least your documentroot defined here ;)
-#
-# format:
-# cage /some/directory/
-cage /root/japach/www/
-cage /root/japach
-cage /root/japach/www/cgi-bin
-
-# A list of directories where cgi-scripts can be executed from.
-# You must also combine this with "cage" directive.
-# format:
-# cgidir /path/to/some/dir/
-cgidir /root/japach/www/cgi-bin
-
-# How to get along with symlinks
-# follow_symlinks - symlinks pointing into "cage" are processed
-# do_not_follow_symlinks - requesting symlink implies 403 Forbidden
-#
-# format:
-# synmlinks one_of_the_above
-symlinks follow_symlinks
-
-# VirtualHosts.
-#
-# format:
-# virtualhost name documentroot log
-#
-# Please note, that the cage also matters here.
-#
-virtualhost some.virtual.cz /usr/share/www /usr/share/www/virtual.log
diff --git a/linux-tools/japach/japach.h b/linux-tools/japach/japach.h
deleted file mode 100644
index e9a22dda82..0000000000
--- a/linux-tools/japach/japach.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <netdb.h>
-#include <time.h>
-#include <stdio.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#include <pwd.h>
-
-
-
-#define VERSION "0.4.8"
-#define FULL_SERVER_SOFTWARE_NAME "japach/"VERSION
-
- /* definice max. velikosti promennych */
-#define MAXSEG 2048
-#define MAXLINE 2048
-#define MAX_ENVIRON_VARS 30
-
- /* definice chybovych hlasek */
-#define HTTP_ERR_301_P1 "\n\n<html><body>301 - Moved Permanently to <a href=\""
-#define HTTP_ERR_301_P2 "</body></html>\n\n"
-
-#define HTTP_ERR_400 "\n\n<html><body>400 - Bad request</body></html>\n\n"
-#define HTTP_ERR_404 "\n\n<html><body>404 - Not found. Sorry</body></html>\n\n"
-#define HTTP_ERR_403 "\n\n<html><body>403 - This file/path is forbidden.</body></html>\n\n"
-#define HTTP_ERR_412 "\n\n<html><body>412 - Precondition failed.</body></html>\n\n"
-
-#define HTTP_ERR_501 "\n\n<html><body>501 - Method Not Implemented.</body></html>\n\n"
-
- /* definice konstant */
-#define DO_NOT_FOLLOW_SYMLINKS 0
-#define FOLLOW_SYMLINKS_INTO_CAGE 1
-#define FOLLOW_SYMLINKS 2
-
-#define CGI_OK 1 // jedna se o cgi skript, a je ok
-#define CGI_ERR 0 // jedna se o cgi skript, a neni ok
-#define CGI_NOCGI 2 // nejedna se o cgi skript
-
- /* globalni promenne */
-char conf_file_name[MAXLINE];
-
- /* struktura pro udrzovani content-typu */
-struct c_types {
- char extension[MAXLINE];
- char content_type[MAXLINE];
- struct c_types *next;
-};
-
- /* struktura pro udrzovani omezujicih adresaru */
-struct cage {
- char name[MAXLINE];
- struct cage *next;
-};
-
- /* struktura pro udrzovani adresaru, ve kterych je mozne spoustet CGI skripty */
-struct cgidirs {
- char name[MAXLINE];
- struct cgidirs *next;
-};
-
-struct virtuals {
- char name[MAXLINE];
- char documentroot[MAXLINE];
- char log[MAXLINE];
- FILE *logfile;
- struct virtuals *next;
-};
-
- /* konfiguracni struktura */
-struct {
- char document_root[MAXLINE];
- char master_log[MAXLINE];
- char server_name[MAXLINE];
- char userdir[MAXLINE];
- unsigned int serv_tcp_port;
- unsigned int uid;
- unsigned int gid;
- unsigned int max_childs;
- unsigned int follow_symlinks;
- struct c_types *content_types;
- struct cage *cage_dirs;
- struct cgidirs *cgi_dirs;
- struct virtuals *virtual_hosts;
-} conf;
-
- /* infomace o aktualnim klientovi */
-struct {
- char *ip_address;
- char *host_name;
- char first_line[MAXLINE];
-
- char browser[MAXLINE];
- char req_url[MAXLINE];
- char *cgi_get_query_string; /* v pripade cgi metodou GET prislusny query string */
- char http_version[MAXLINE];
- char method[MAXLINE];
- char requested_host[MAXLINE];
- char if_mod_since[MAXLINE];
- char if_unmod_since[MAXLINE];
- char expect[MAXLINE];
-
- int reply; /* odpoved ktera se mu bude generovat */
- char getfile[MAXLINE]; /* realna cesta k predavanemu souboru */
- int getfile_desc; /* deskriptor pro cteny soubor */
-
- unsigned int cgi_state; /* jak je na tom tento pozadavek s CGI */
-} client;
-
- /* logovani */
-struct {
- FILE *logfile;
- char message[MAXLINE];
-} log;
-
- /* -----------------deklarace funkci---------------------- */
- /* text.c */
-void convert_to_rfc822_date(time_t curtime, char *buffer);
-void get_rfc822_date(char *buffer);
-char *strip_extension(char *buffer);
-void prase_config(FILE * f);
-int empty_string(char *s);
-char *find_content_type(char *ext);
-char *subst(char *a, char *b, char *c);
-char *deldupl(char a, char *b);
-char *decode_hexa_octets(char *s1);
-int delddot(char *s, char *s2);
-int get_number_of_month(char *tmp2);
-int compare_rfc822_dates(char *date1, char *date2);
-
- /* communication.c */
-int writen(int fd, char *ptr, int nbytes);
-int readline(int fd, char *ptr, int maxlen);
-int writestring(int fd, char *s1);
-int genreply(int fd);
-int read_headers(int sockfd);
-int process_request(int sockfd);
-int is_in_cage(char *s);
-
- /* cgi.c */
-int logrequest(FILE * lf, int reply, int bytes);
-int logwrite(FILE * lf, const char *s);
-
- /* sys.c */
-void getlink(char *path, char *result);
-
- /* cgi.c */
-int if_cgi_then_ok(char *fname);
-char **cgi_get_environment();
-
diff --git a/linux-tools/japach/japach.spec b/linux-tools/japach/japach.spec
deleted file mode 100644
index 02bd3c81e0..0000000000
--- a/linux-tools/japach/japach.spec
+++ /dev/null
@@ -1,38 +0,0 @@
-Version: 0.4.8
-Summary: Simple webserver
-Name: japach
-Release: 0
-Copyright: GPL
-Group: Applications/Communication
-Source: http://www.jikos.cz/jikos/japach/%{name}-%{version}.tar.gz
-URL: http://www.jikos.cz/japach/
-Packager: Jirka Kosina <jikos@jikos.cz>
-BuildRoot: /var/tmp/%{name}-buildroot/
-
-%description
-Simple webserver
-
-%prep
-%setup
-
-%build
-./configure --prefix=/usr
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc install
-find $RPM_BUILD_ROOT/usr -type f -print | grep -v '\/(README|COPYING|INSTALL|TODO|ChangeLog|AUTHORS|FAQ)$' | \
- sed "s@^$RPM_BUILD_ROOT@@g" | sed "s/^\(.*\)$/\1\*/" > %{name}-%{version}-filelist
-find $RPM_BUILD_ROOT/etc -type f -print | \
- sed "s@^$RPM_BUILD_ROOT@@g" | sed "s/^\(.*\)$/\1\*/" >> %{name}-%{version}-filelist
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files -f %{name}-%{version}-filelist
-%defattr(-, root, root)
-
-%doc README COPYING INSTALL TODO ChangeLog FAQ AUTHORS README README.cz WHATSNEW
-
-%changelog
diff --git a/linux-tools/japach/log.c b/linux-tools/japach/log.c
deleted file mode 100644
index 49a9970ef8..0000000000
--- a/linux-tools/japach/log.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* logging of reply, count of bytes, etc. to specified logfile */
-int logrequest(FILE * lf, int reply, int bytes)
-{
- char buffer[MAXLINE];
- char buffer2[MAXLINE];
- char s_reply[MAXLINE], s_bytes[MAXLINE];
- time_t curtime;
- struct tm *loctime;
-
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%b/%Y:%H:%M:%S", loctime);
-
- strcpy(buffer2, "");
- strncpy(buffer2, client.host_name, MAXLINE - strlen(buffer2)); /* hostname */
- strncat(buffer2, " - - [", MAXLINE - strlen(buffer2)); /* login & rfc931 */
- strncat(buffer2, buffer, MAXLINE - strlen(buffer2));
- strcat(buffer2, "] \""); /* date */
- strncat(buffer2, client.first_line, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\""); /* request */
- sprintf(s_reply, "%d", reply);
- sprintf(s_bytes, "%d", bytes);
- strcat(buffer2, " ");
- strncat(buffer2, s_reply, MAXLINE - strlen(buffer2));
- strcat(buffer2, " ");
- strncat(buffer2, s_bytes, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\n");
- fputs(buffer2, lf);
- fflush(lf);
-
-
-}
-
- /* insert some string into logfile */
-int logwrite(FILE * lf, const char *s)
-{
- char buffer[MAXLINE];
- time_t curtime;
- pid_t pid;
- char pid_s[8];
- struct tm *loctime;
-
-
- pid = getpid();
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%m/%y %H:%M", loctime);
- sprintf(pid_s, "[%d]", (int) pid);
- strncat(buffer, pid_s, MAXLINE - strlen(buffer));
- strncat(buffer, " ", MAXLINE - strlen(buffer));
- strncat(buffer, s, MAXLINE - strlen(buffer));
- fprintf(stderr," buffer: ->%s<-\n", buffer);
- fputs(buffer, lf);
- fflush(lf);
-}
diff --git a/linux-tools/japach/missing b/linux-tools/japach/missing
deleted file mode 100644
index 7789652e87..0000000000
--- a/linux-tools/japach/missing
+++ /dev/null
@@ -1,190 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-case "$1" in
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing - GNU libit 0.0"
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
- aclocal)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`configure.in'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`configure.in'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`configure.in'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
- touch $file
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/linux-tools/japach/mkinstalldirs b/linux-tools/japach/mkinstalldirs
deleted file mode 100644
index 54170f9a38..0000000000
--- a/linux-tools/japach/mkinstalldirs
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id: mkinstalldirs,v 1.1.1.1 2005/11/10 16:21:57 bottolli Exp $
-
-errstatus=0
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/linux-tools/japach/src/Makefile b/linux-tools/japach/src/Makefile
deleted file mode 100644
index 4bf9a3988c..0000000000
--- a/linux-tools/japach/src/Makefile
+++ /dev/null
@@ -1,308 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = .
-top_srcdir = ..
-prefix = root/japach
-exec_prefix = ${prefix}
-
-bindir = ${exec_prefix}/bin
-sbindir = ${exec_prefix}/sbin
-libexecdir = ${exec_prefix}/libexec
-datadir = ${prefix}/share
-sysconfdir = ${prefix}/etc
-sharedstatedir = ${prefix}/com
-localstatedir = ${prefix}/var
-libdir = ${exec_prefix}/lib
-infodir = ${prefix}/info
-mandir = ${prefix}/man
-includedir = ${prefix}/include
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/japach
-pkglibdir = $(libdir)/japach
-pkgincludedir = $(includedir)/japach
-
-top_builddir = ..
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-AUTOMAKE = automake
-AUTOHEADER = autoheader
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-transform = s,x,x,
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = arm-uclinux-gcc
-MAKEINFO = makeinfo
-PACKAGE = japach
-VERSION = 0.4.1
-
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(bin_PROGRAMS)
-
-
-DEFS = -DPACKAGE=\"japach\" -DVERSION=\"0.4.1\" -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRING_H=1 -DHAVE_NETDB_H=1 -DHAVE_TIME_H=1 -DHAVE_STDIO_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SETJMP_H=1 -DHAVE_PWD_H=1 -DTIME_WITH_SYS_TIME=1 -DAC_LITTLE_ENDIAN=1 -DRETSIGTYPE=void -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_FCLOSEALL=1 -I. -I$(srcdir)
-CPPFLAGS =
-LDFLAGS = -Os -march=armv5 -msoft-float -Wl,-elf2flt='-z -s 8000'
-LIBS =
-japach_OBJECTS = communication.o japach.o text.o log.o sys.o cgi.o
-japach_LDADD = $(LDADD)
-japach_DEPENDENCIES =
-japach_LDFLAGS =
-CFLAGS = -Os -march=armv5 -msoft-float
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DEP_FILES = .deps/cgi.P .deps/communication.P .deps/japach.P \
-.deps/log.P .deps/sys.P .deps/text.P
-SOURCES = $(japach_SOURCES)
-OBJECTS = $(japach_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- done
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-japach: $(japach_OBJECTS) $(japach_DEPENDENCIES)
- @rm -f japach
- $(LINK) $(japach_LDFLAGS) $(japach_OBJECTS) $(japach_LDADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
- -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-binPROGRAMS
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-am
-all-am: Makefile $(PROGRAMS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-binPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach/src/Makefile.am b/linux-tools/japach/src/Makefile.am
deleted file mode 100644
index ce9de6197c..0000000000
--- a/linux-tools/japach/src/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-
-
diff --git a/linux-tools/japach/src/Makefile.in b/linux-tools/japach/src/Makefile.in
deleted file mode 100644
index 636b236c96..0000000000
--- a/linux-tools/japach/src/Makefile.in
+++ /dev/null
@@ -1,308 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = @CC@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(bin_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-japach_OBJECTS = communication.o japach.o text.o log.o sys.o cgi.o
-japach_LDADD = $(LDADD)
-japach_DEPENDENCIES =
-japach_LDFLAGS =
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DEP_FILES = .deps/cgi.P .deps/communication.P .deps/japach.P \
-.deps/log.P .deps/sys.P .deps/text.P
-SOURCES = $(japach_SOURCES)
-OBJECTS = $(japach_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- done
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-japach: $(japach_OBJECTS) $(japach_DEPENDENCIES)
- @rm -f japach
- $(LINK) $(japach_LDFLAGS) $(japach_OBJECTS) $(japach_LDADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
- -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-binPROGRAMS
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-am
-all-am: Makefile $(PROGRAMS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-binPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach/src/cgi.c b/linux-tools/japach/src/cgi.c
deleted file mode 100644
index 9253c944e4..0000000000
--- a/linux-tools/japach/src/cgi.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-/* resembling is_in_cage() */
-
-int is_in_cgi_path(char *filename)
-{
- struct cgidirs *pom;
- char *pom1;
- int found = 0;
-
- pom = conf.cgi_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(filename, pom->next->name) == filename)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
-
-/* first test if given reaquest is going to be a CGI script.
- * if not, return CGI_NOCGI.
- * Otherwise if it really can be run returns CGI_OK, in other
- * cases CGI_ERR
- * Huh, why is this comment longer than the body of the function? ;)
- */
-
-int if_cgi_then_ok(char *filename)
-{
- if (!(is_in_cgi_path(filename)))
- return CGI_NOCGI;
- if (access(filename, X_OK) == -1)
- return CGI_ERR;
- else
- return CGI_OK;
-}
-
-char *cgi_add_env_var(char *name, char *value)
-{
- int len;
- char *result;
-
- len = strlen(name) + 2;
- if (value) { /* if quesry string was empty, we will have nice segfault probably */
- len += strlen(value);
- }
- result = (char *) malloc(sizeof(char) * len);
- sprintf(result, "%s=%s", name, value ? value : "");
- return result;
-
-}
-
-char **cgi_get_environment()
-{
- char **p1, **p2;
-
- p1 = p2 = (char **) malloc(sizeof(char *) * MAX_ENVIRON_VARS);
-
- *p1++ = cgi_add_env_var("SERVER_NAME", client.requested_host);
- *p1++ = cgi_add_env_var("SERVER_SOFTWARE", FULL_SERVER_SOFTWARE_NAME);
- *p1++ = cgi_add_env_var("SERVER_PROTOCOL", client.http_version);
- *p1++ = cgi_add_env_var("REMOTE_ADDR", client.host_name);
- *p1++ = cgi_add_env_var("REQUEST_METHOD", client.method); /* GET */
- *p1++ = cgi_add_env_var("SCRIPT_NAME", client.req_url);
- *p1++ = cgi_add_env_var("SCRIPT_FILENAME", client.getfile);
- *p1++ = cgi_add_env_var("QUERY_STRING", client.cgi_get_query_string);
- *p1++ = 0;
-
- return p2;
-}
diff --git a/linux-tools/japach/src/communication.c b/linux-tools/japach/src/communication.c
deleted file mode 100644
index a8b0a7d147..0000000000
--- a/linux-tools/japach/src/communication.c
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
-char old_document_root[MAXLINE];
-FILE *old_logfile;
-
- /*
- * tries to write all nbytes chars in loop (of *ptr)
- */
-int writen(int fd, char *ptr, int nbytes)
-{
- int nleft, nwritten;
-
- nleft = nbytes;
- while (nleft > 0) {
- nwritten = write(fd, ptr, nleft);
- if (nwritten <= 0)
- return (nwritten);
-
- nleft -= nwritten;
- ptr += nwritten;
- }
- return (nbytes - nleft);
-}
-
- /*
- * readss line of maximum length maxlen
- */
-int readline(int fd, char *ptr, int maxlen)
-{
- int n, rc;
- char c;
-
- for (n = 1; n < maxlen; n++) {
- if ((rc = read(fd, &c, 1)) == 1) {
- *ptr++ = c;
- if (c == '\n')
- break;
- } else if (rc == 0) {
- if (n == 1)
- return (0); /* EOF, no data read */
- else
- break; /* EOF, some data read */
- } else
- return (-1); /* error */
- }
- *ptr = 0;
- return (n);
-}
-
- /*
- * writes a line and doesn't care for result
- */
-
-writestring(int fd, char *s1)
-{
- int n;
- n = writen(fd, s1, strlen(s1));
- return (n);
-}
-
- /*
- * writes default headers (FIXME: cgi scripts should
- * write it's own content-type kludge)
- */
-
-int writedefaulthdr(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2;
- int i;
- struct stat buf;
-
- if (!strlen(client.http_version))
- return;
- fstat(client.getfile_desc, &buf);
- strcpy(tmp1, "Date: ");
- get_rfc822_date(tmp);
- strncat(tmp, "\r\n", MAXLINE - strlen(tmp));
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
-
- writestring(fd, tmp1);
- writestring(fd, "Server: JAPACH/");
- writestring(fd, VERSION);
- writestring(fd, "\r\n");
-
- if (client.reply != 304) { /* a file will be output */
- writestring(fd, "Accept-Ranges: bytes\r\n");
- writestring(fd, "Connection: close\r\n");
- }
-
- if (client.cgi_state == CGI_OK)
- return 0;
-
- if ((!strip_extension(client.getfile))
- || (client.reply == 404)
- || (client.reply == 400)
- || (client.reply == 417)
- || (client.reply == 403)
- || (client.reply == 301)
- || (client.reply == 501)) { /* no file is going to output */
- strcpy(tmp1, "Last-Modified: ");
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
- writestring(fd, tmp1);
-
- if (!strip_extension(client.getfile))
- writestring(fd, "Content-Type: text/plain\r\n\r\n");
- else
- writestring(fd, "Content-Type: text/html\r\n\r\n");
- }
-
- else if (client.reply != 304) {
- int i;
-
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- strcpy(tmp, "Last-Modified: ");
- strncat(tmp, tmp2, MAXLINE - strlen(tmp) - 2);
- strcat(tmp, "\r\n");
-
- free(tmp2);
- writestring(fd, tmp);
- /* going to find content-type according to extension, and output
- * apropriate content-type
- */
- strcpy(tmp, strip_extension(client.getfile));
- tmp2 = find_content_type(tmp);
- strcpy(tmp1, "Content-Type: ");
- strncat(tmp1, tmp2, MAXLINE - strlen(tmp1) - 3);
- /* strcat(tmp1, "\r\n\n"); */
-
- writestring(fd, tmp1);
- }
-
-}
-
- /*
- * generates http reply to socked, sets client.reply properly, opens
- * local file (assigns descriptor)
- * - cgi started 17/02/2002
- */
-
-int genreply(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2, *found_s;
- char link_getfile[MAXLINE];
- char text[MAXLINE];
- char username[MAXLINE], tosubst[MAXLINE], userpath[MAXLINE];
- int i;
- int found = 0;
- struct stat buf;
- struct stat lbuf;
- struct virtuals *pom;
- struct passwd *psw;
-
- if (!strcasecmp(client.method, "GET")) { /* GET-specific actions */
- /* remove part following ?
- * TODO: RFC?
- */
- if (client.cgi_get_query_string = strchr(client.req_url, '?')) {
- client.cgi_get_query_string[0] = '\0';
- client.cgi_get_query_string++;
- }
-
- } else if (!strcasecmp(client.method, "HEAD")) {
- } else {
- /* unknown method */
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 501 Method Not Implemented\r\n");
- writestring(fd, "Allow: GET\r\n");
- }
- logrequest(log.logfile, 501, strlen(HTTP_ERR_501));
- writedefaulthdr(fd);
- return;
- }
- if (strlen(client.expect)) {
- client.reply = 417;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 417 Expectation failed\r\n");
- writedefaulthdr(fd);
- return;
- }
- if (client.req_url[0] != '/') {
- client.reply = 400;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 400 Bad Request\r\n");
- writedefaulthdr(fd);
- return;
- }
-
- client.reply = -1;
-
- if ((!strcasecmp(client.http_version, "HTTP/1.1"))
- || (!strcasecmp(client.http_version, "HTTP/1.0"))) {
-
- /* save default settings, after serving a request set old values.
- * no use now, but in the future this may be rewritten to be able
- * to serve more than one request during one connection.
- * so this is neccessary to have the right defaults for the next
- * request
- */
- strcpy(old_document_root, conf.document_root);
- old_logfile = log.logfile;
-
- /* find in conf->virtual_hosts name of virtual server, copy to
- * document_root proper conf->virtual_hosts->documentroot
- */
- pom = conf.virtual_hosts->next;
- while (pom && !found) {
- if (!strcasecmp(client.requested_host, pom->name)) {
- found = 1;
- strncpy(conf.document_root, pom->documentroot, MAXLINE);
- log.logfile = pom->logfile;
- } else
- pom = pom->next;
- }
- }
- /* all changing of URL (filename, respectively) is done here
- * decoding of special %ab characters, ~ expansion, ...
- */
-
- tmp2 = decode_hexa_octets(client.req_url);
- strcpy(client.req_url, tmp2);
- free(tmp2);
-
- if (client.req_url[1] == '~') {
- i = 2;
- while ((i < strlen(client.req_url)) && (client.req_url[i] != '/')) {
- username[i - 2] = client.req_url[i];
- username[i - 1] = '\0';
- i++;
- }
- found = i;
- while (i < strlen(client.req_url)) {
- tosubst[i - found] = client.req_url[i];
- tosubst[i - found + 1] = '\0';
- i++;
- }
- if (psw = getpwnam(username)) {
- strcpy(conf.document_root, psw->pw_dir);
- strcat(conf.document_root, "/");
- strncat(conf.document_root, conf.userdir, MAXLINE);
- if (client.req_url[i] == '/')
- strcat(conf.document_root, "/");
- }
- }
- strcpy(client.getfile, conf.document_root);
-
- if (client.req_url[1] != '~')
- strncat(client.getfile, client.req_url, MAXLINE);
-
- else
- strncat(client.getfile, tosubst, MAXLINE);
- tmp2 = deldupl('/', client.getfile);
- strcpy(client.getfile, tmp2);
-
-
- if (is_in_cage(client.getfile)) {
- client.getfile_desc = open(client.getfile, O_RDONLY);
- if (client.getfile_desc > 0) {
- fstat(client.getfile_desc, &buf);
- if (S_ISDIR(buf.st_mode)) {
- if (client.getfile[strlen(client.getfile) - 1] != '/')
- client.reply = 301;
- else {
- if (strlen(client.getfile) < MAXLINE - 12) {
- strncat(client.getfile, "/index.html",
- MAXLINE - strlen(client.getfile));
- close(client.getfile_desc);
- client.getfile_desc =
- open(client.getfile, O_RDONLY);
- } else
- client.reply = 404;
- }
- }
- lstat(client.getfile, &lbuf);
-
- /* let's do some symlink handling */
-
- if ((S_ISLNK(lbuf.st_mode)))
- getlink(client.getfile, link_getfile);
- if ((S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == DO_NOT_FOLLOW_SYMLINKS))
- || (S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == FOLLOW_SYMLINKS_INTO_CAGE)
- && (!is_in_cage(link_getfile)))) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc > 0) && (client.reply != 301)
- && (client.reply != 403) && (client.reply != 404)) {
- if (is_in_cage(client.getfile)) {
- if (strlen(client.if_mod_since)) { /* if-modified-since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates(tmp2, client.if_mod_since)
- == -1)
- client.reply = 304;
- free(tmp2);
- }
- if (strlen(client.if_unmod_since)) { /* If-Unmodified-Since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates
- (tmp2, client.if_unmod_since) == 1)
- client.reply = 412;
- free(tmp2);
- }
- if ((client.reply != 304) && (client.reply != 412)) {
- /* the file is ok, now we need to check if it has to (and could)
- * be run (CGI). If so, then 200, otherwise 403 */
- client.cgi_state = if_cgi_then_ok(client.getfile);
- if ((client.cgi_state == CGI_NOCGI)
- || (client.cgi_state == CGI_OK)) {
- client.reply = 200;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 200 OK\r\n");
- writedefaulthdr(fd);
- }
-
- logrequest(log.logfile, 200, buf.st_size);
- } else { // cgi_err
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, buf.st_size);
- }
- } else {
- if (client.reply == 304) {
- writestring(fd,
- "HTTP/1.1 304 Not Modified\r\n");
- logrequest(log.logfile, 304, 0);
- writedefaulthdr(fd);
- } else if (client.reply == 412) {
- writestring(fd,
- "HTTP/1.1 412 Precondition Failed\r\n");
- logrequest(log.logfile, 412, 0);
- writedefaulthdr(fd);
-
- }
- }
- } else {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- }
- }
- } else { /* cage-membership test failed */
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if (client.reply == 301) {
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 301 Moved Permanently\r\n");
- writestring(fd, "Location: ");
-
- strcpy(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/\r\n");
-
- writestring(fd, text);
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 301,
- strlen(HTTP_ERR_301_P1) + strlen(HTTP_ERR_301_P2) + 2 * strlen(text) +
- 14);
-
- }
- if (((client.getfile_desc < 0)) && ((errno != EACCES) || (client.reply == 404))) { /* we can have 404 from earlier */
- client.reply = 404;
- if (client.getfile > 0)
- close(client.getfile_desc);
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 404 Not Found\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 404, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc < 0) && (errno == EACCES)) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
-}
-
- /*
- * read headers and process content of client-provided data
- * TODO: some macros would do a good job in following
- * boring & nasty code
- */
-
-int read_headers(int sockfd)
-{
- int n, i;
- char line[MAXLINE];
- int numlines = 0;
-
- numlines++;
- n = readline(sockfd, line, MAXLINE);
- line[strlen(line) - 2] = '\0';
-
- if (numlines == 1)
- strcpy(client.first_line, line);
-
- /* parse method */
- i = 0;
- while ((i < strlen(line)) && (line[i] != ' ')) {
- client.method[i] = line[i];
- i++;
- }
- client.method[i] = '\0';
-
- /* URL */
- i = strlen(client.method) + 1;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.req_url[i - (strlen(client.method) + 1)] = line[i];
- i++;
- }
-
- client.req_url[(i - strlen(client.method)) - 1] = '\0';
- /* HTTP protocl version */
- while (line[i] == ' ')
- i++;
- n = i;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.http_version[i - n] = line[i];
- i++;
- }
- client.http_version[i - (n - 1)] = '\0';
-
- /* if the request is in old HTTP version, don't wait for
- * more headers & clear client.http_version
- */
- if ((!strlen(client.http_version))) {
- strcpy(line, "");
- strcpy(client.http_version, "");
- }
-
- /* more and more headers */
- strcpy(client.browser, "");
- strcpy(client.requested_host, conf.server_name);
- strcpy(client.if_mod_since, "");
-
- while ((strlen(line) != 0) && (n != 0)) {
- n = readline(sockfd, line, MAXLINE); /* wait for and empty line */
- line[strlen(line) - 2] = '\0';
- if (strncasecmp(line, "User-agent", 10) == 0) {
- int i = 12;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.browser, line + i, MAXLINE);
- }
- if (strncasecmp(line, "host:", 5) == 0) {
- int i = 6;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.requested_host, line + i, MAXLINE);
- i = 0;
-
- while (isalnum(client.requested_host[i]) || client.requested_host[i] == '.' ||
- client.requested_host[i] == '-')
- i++;
- if (i)
- client.requested_host[i] = '\0';
- }
- if (strncasecmp(line, "If-Modified-since:", 18) == 0) {
- int i = 19;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_mod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "If-Unmodified-since:", 20) == 0) {
- int i = 21;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_unmod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "Expect:", 7) == 0) {
- int i = 8;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.expect, line + i, MAXLINE);
- }
- }
- if (n == 0) {
- /* no problem here - no need to flush anything, and the OS
- * will do what is needed not to leak descriptors
- */
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- return (0);
-}
-
- /* routine called from freshly forked child from main
- * program loop in japach.c
- */
-int process_request(int sockfd)
-{
- char text[MAXLINE];
- void *data;
-
- for (;;) {
-
- read_headers(sockfd);
-
- /* here client.reply is to be generated, which is
- * then tested
- * also some url-rewrites are done, and local file
- * descriptor is assigned
- */
-
- genreply(sockfd);
- if (client.cgi_state != CGI_OK)
- writestring(sockfd, "\r\n\n");
- if (!strcasecmp(client.method, "HEAD"))
- return;
- switch (client.reply) {
- case 200:{ // ok
- int i;
- signal(SIGCHLD, SIG_IGN);
- if (client.cgi_state == CGI_OK) {
- int cgi_pipe[2], bytes;
- char line[MAXLINE];
- pid_t pid;
- char **tmp;
-
- pipe(cgi_pipe);
- pid = vfork();
-
- if (pid == 0) {
- close(cgi_pipe[0]);
- dup2(cgi_pipe[1], 1); /* 1 = stdout */
- tmp = cgi_get_environment();
- execve(client.getfile, NULL, cgi_get_environment());
- } else {
- close(cgi_pipe[1]);
- write(sockfd, "BLABLE\n",7);
- while ((bytes =
- read(cgi_pipe[0], line, MAXLINE)) > 0) {
- if (bytes) write(sockfd, line, bytes);
- memset(line, '\0', sizeof(line));
- }
- close(cgi_pipe[0]);
- waitpid(pid, NULL, 0);
- }
- } else {
- data = (char *) malloc((sizeof(char)) * MAXLINE + 1);
- i = MAXLINE;
- while (i == MAXLINE)
- if ((i =
- read(client.getfile_desc, data,
- MAXLINE)) == MAXLINE)
- writen(sockfd, data, i); /* rewrite file to network */
- if (i > 0)
- writen(sockfd, data, i); /* negative i meands error from read() */
- close(client.getfile_desc);
- free(data);
- }
- /* put back original values (may have been changed
- * by virtualhost)
- */
- strcpy(conf.document_root, old_document_root);
- log.logfile = old_logfile;
-
- /* here is the point, where one than more requests during one connection
- * is to be handled. maybe recursive call of process_request() is not
- * the best idea, but should work ;)
-
- process_request(sockfd);
- */
-
- return;
- }
- case 301:{ /* moved permanently */
- strcpy(text, HTTP_ERR_301_P1);
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "\">");
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "</a>\r\n");
- strncat(text, HTTP_ERR_301_P2, MAXLINE - strlen(text));
- writestring(sockfd, text);
- return;
- }
- case 304:{ /* not modified */
- writestring(sockfd, "");
- return;
- }
- case 400:{ /* bad request */
- strcpy(text, HTTP_ERR_400);
- writestring(sockfd, text);
- return;
- }
- case 404:{ /* not found */
- strcpy(text, HTTP_ERR_404);
- writestring(sockfd, text);
- return;
- }
- case 403:{ /* forbidden */
- strcpy(text, HTTP_ERR_403);
- writestring(sockfd, text);
- return;
- }
- case 412:{ /* precondition failed */
- strcpy(text, HTTP_ERR_412);
- writestring(sockfd, text);
- return;
- }
- case 417:{ /* expectation failed */
- writestring(sockfd, "");
- return;
- }
- case 501:{ /* method not implemented */
- strcpy(text, HTTP_ERR_501);
- writestring(sockfd, text);
- return;
- }
- }
- }
-}
-
- /* test if a file is located "in the cage".
- * cage is a struct read from conf file and
- * stored in conf.cage_dirs linked list
- */
-
-int is_in_cage(char *s)
-{
- struct cage *pom;
- char *pom1;
- int found = 0;
-
- pom1 = (char *) malloc(sizeof(char) * MAXLINE);
- delddot(s, pom1);
- s = pom1;
- pom = conf.cage_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(s, pom->next->name) == s)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
diff --git a/linux-tools/japach/src/japach.c b/linux-tools/japach/src/japach.c
deleted file mode 100644
index 0ee8bf6d38..0000000000
--- a/linux-tools/japach/src/japach.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-int childs = 0; /* count of forked children */
-int first_cycle = 1;
-
-sig_atomic_t terminate, reload;
-
-void flush_virtual_logs()
-{
- struct virtuals *p;
-
- p = conf.virtual_hosts;
- while (p){
- fflush(p->logfile);
- p = p->next;
- }
-}
-
- /* TODO: some macros would be nice here */
-void free_mem()
-{
- /* -- struct conf -- */
- struct c_types *p1, *p11;
- struct cage *p2, *p22;
- struct virtuals *p3, *p33;
- struct cgidirs *p4, *p44;
- p1 = conf.content_types;
- p11 = p1->next;
-
- p2 = conf.cage_dirs;
- p22 = p2->next;
-
- p3 = conf.virtual_hosts;
- p33 = p3->next;
-
- p4 = conf.cgi_dirs;
- p44 = p4->next;
-
- while (p1) {
- p11 = p1->next;
- free(p1);
- p1 = p11;
- }
-
- while (p2) {
- p22 = p2->next;
- free(p2);
- p2 = p22;
- }
-
- while (p3) {
- p33 = p3->next;
- free(p3);
- p3 = p33;
- }
-
- while (p4) {
- p44 = p4->next;
- free(p4);
- p4 = p44; /* no need to close file */
- }
-
-}
-
-void f_SIGCHLD()
-{
- union wait wstatus;
- pid_t exit_pid;
-
- while ((exit_pid = wait3(&wstatus, WNOHANG, NULL)) > 0) {
- if (exit_pid != -1)
-/* fprintf(stderr,"Child with pid %d exited, reducing to %d\n",
- exit_pid, childs - 1);*/
- childs--;
- }
-}
-
-void f_SIGTERM()
-{
- logwrite(log.logfile, "caught SIGTERM\n");
- terminate = 1;
-}
-
-void f_SIGINT()
-{
- logwrite(log.logfile, "caught SIGINT\n");
- terminate = 1;
-}
-
-void f_SIGHUP()
-{
- logwrite(log.logfile, "caught SIGHUP, resetting\n");
- reload = 1;
-}
-
-main(int argc, char *argv[])
-{
- int sockfd, newsockfd, clilen, childpid;
- struct sockaddr_in cli_addr, serv_addr;
- struct hostent *hostentry;
- FILE *conf_file;
- struct sigaction *s1, *s2;
- int i, opt = 1;
- pid_t pidstart;
- struct cage *pom;
-
-
- /* config */
- strcpy(conf_file_name, "/etc/japach.conf");
- for (i = 1; i < argc; i++) {
- if ((!strcmp(argv[i], "-c")) && (i < argc - 1)) {
- strcpy(conf_file_name, argv[i + 1]);
- }
- }
-
- /* start daemon
- */
- if ((pidstart = vfork()) < 0) {
- fprintf(stderr, "master fork error.\n");
- return (-1);
- } else if (pidstart > 0) {
- printf("master fork ok, child daemon (pid %d) created\n",
- pidstart);
- return (0);
- }
-
- terminate = 0;
- while (!terminate) {
-
- conf_file = fopen(conf_file_name, "r");
- if (!conf_file) {
- fprintf(stderr, "conf file not found\n");
- return (-1);
- }
- if (!first_cycle) {
- free_mem();
- first_cycle = 0;
- }
- parse_config(conf_file);
- fclose(conf_file);
-
-
- if (!(log.logfile = fopen(conf.master_log, "a"))) {
- fprintf(stderr, "can't open %s\n",
- conf.master_log);
- free_mem();
- exit(0);
- }
- logwrite(log.logfile, "Server starting\n");
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = f_SIGHUP;
- sigaction(SIGHUP, s1, s2);
- s1->sa_handler = f_SIGTERM;
- sigaction(SIGTERM, s1, s2);
- s1->sa_handler = f_SIGINT;
- sigaction(SIGINT, s1, s2);
- s1->sa_handler = f_SIGCHLD;
- s1->sa_flags = SA_RESTART;
- sigaction(SIGCHLD, s1, s2);
- free(s1);
- free(s2);
-
- /* socket ops */
- if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- logwrite(log.logfile,
- "can't open stream socket.\n");
- f_SIGTERM();
- }
-
- if (setsockopt
- (sockfd, SOL_SOCKET, SO_REUSEADDR, &opt,
- sizeof(opt)) != 0) {
- fprintf(stderr, "error setting socket options.\n");
- logwrite(log.logfile,
- "error setting socket options.\n");
- f_SIGTERM();
- }
- bzero((char *) &serv_addr, sizeof(serv_addr));
- serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- serv_addr.sin_port = htons(conf.serv_tcp_port);
-
- if (bind
- (sockfd, (struct sockaddr *) &serv_addr,
- sizeof(serv_addr)) < 0) {
- fprintf(stderr, "error binding address.\n");
- logwrite(log.logfile, "error binding address.\n");
- close(sockfd);
- f_SIGTERM();
- }
-
- if (listen(sockfd, 5) != 0) {
- fprintf(stderr, "error calling listen()\n");
- logwrite(log.logfile, "error calling listen()\n");
- }
-
-
- reload = 0;
- while (!terminate && !reload) {
- while (childs >= conf.max_childs)
- pause(); /* wait until signal occurs.
- * we are waiting for SIGCHLD to decrement
- * childs variable
- */
-
- clilen = sizeof(cli_addr);
- if (!
- (newsockfd =
- accept(sockfd, (struct sockaddr *) &cli_addr,
- &clilen))) {
- fprintf(stderr, "accept error\n");
- exit(0);
- }
-
- if ((terminate) || (reload))
- continue;
-
- /* reverse resolving */
- if (NULL !=
- (hostentry =
- gethostbyaddr((char *) &cli_addr.sin_addr,
- sizeof(cli_addr.sin_addr),
- AF_INET)))
- client.host_name = hostentry->h_name;
- else
- client.host_name =
- inet_ntoa(cli_addr.sin_addr);
- client.ip_address = inet_ntoa(cli_addr.sin_addr);
-
- /* k* child, which will serve the request */
- if ((childpid = vfork()) < 0)
- printf("server: fork error\n");
- else if (childpid == 0) {
- struct sigaction *s1, *s2;
-
- setgid(conf.gid);
- setuid(conf.uid);
- close(sockfd);
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = SIG_IGN;
- sigaction(SIGHUP, s1, s2);
- free(s1);
- free(s2);
- process_request(newsockfd); /* GO! */
- /*fprintf(stderr,"Processing (%d) done, exiting...\n",getpid());*/
- close(newsockfd);
- exit(0);
- } else if (childpid > 0){
- childs++; /* increment count of forked childs in parent process */
- /*fprintf(stderr, "New child with pid %d created, incrementing to %d\n",
- childpid, childs);*/
- }
- close(newsockfd);
- }
- close(sockfd);
- fclose(log.logfile);
- } /* end of main loop */
- logwrite(log.logfile, "END\n");
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#else
- fflush(log.logfile);
- flush_virtual_logs();
-#endif
- free_mem();
- free(s1);
- exit(0);
-}
diff --git a/linux-tools/japach/src/japach.h b/linux-tools/japach/src/japach.h
deleted file mode 100644
index e9a22dda82..0000000000
--- a/linux-tools/japach/src/japach.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <netdb.h>
-#include <time.h>
-#include <stdio.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#include <pwd.h>
-
-
-
-#define VERSION "0.4.8"
-#define FULL_SERVER_SOFTWARE_NAME "japach/"VERSION
-
- /* definice max. velikosti promennych */
-#define MAXSEG 2048
-#define MAXLINE 2048
-#define MAX_ENVIRON_VARS 30
-
- /* definice chybovych hlasek */
-#define HTTP_ERR_301_P1 "\n\n<html><body>301 - Moved Permanently to <a href=\""
-#define HTTP_ERR_301_P2 "</body></html>\n\n"
-
-#define HTTP_ERR_400 "\n\n<html><body>400 - Bad request</body></html>\n\n"
-#define HTTP_ERR_404 "\n\n<html><body>404 - Not found. Sorry</body></html>\n\n"
-#define HTTP_ERR_403 "\n\n<html><body>403 - This file/path is forbidden.</body></html>\n\n"
-#define HTTP_ERR_412 "\n\n<html><body>412 - Precondition failed.</body></html>\n\n"
-
-#define HTTP_ERR_501 "\n\n<html><body>501 - Method Not Implemented.</body></html>\n\n"
-
- /* definice konstant */
-#define DO_NOT_FOLLOW_SYMLINKS 0
-#define FOLLOW_SYMLINKS_INTO_CAGE 1
-#define FOLLOW_SYMLINKS 2
-
-#define CGI_OK 1 // jedna se o cgi skript, a je ok
-#define CGI_ERR 0 // jedna se o cgi skript, a neni ok
-#define CGI_NOCGI 2 // nejedna se o cgi skript
-
- /* globalni promenne */
-char conf_file_name[MAXLINE];
-
- /* struktura pro udrzovani content-typu */
-struct c_types {
- char extension[MAXLINE];
- char content_type[MAXLINE];
- struct c_types *next;
-};
-
- /* struktura pro udrzovani omezujicih adresaru */
-struct cage {
- char name[MAXLINE];
- struct cage *next;
-};
-
- /* struktura pro udrzovani adresaru, ve kterych je mozne spoustet CGI skripty */
-struct cgidirs {
- char name[MAXLINE];
- struct cgidirs *next;
-};
-
-struct virtuals {
- char name[MAXLINE];
- char documentroot[MAXLINE];
- char log[MAXLINE];
- FILE *logfile;
- struct virtuals *next;
-};
-
- /* konfiguracni struktura */
-struct {
- char document_root[MAXLINE];
- char master_log[MAXLINE];
- char server_name[MAXLINE];
- char userdir[MAXLINE];
- unsigned int serv_tcp_port;
- unsigned int uid;
- unsigned int gid;
- unsigned int max_childs;
- unsigned int follow_symlinks;
- struct c_types *content_types;
- struct cage *cage_dirs;
- struct cgidirs *cgi_dirs;
- struct virtuals *virtual_hosts;
-} conf;
-
- /* infomace o aktualnim klientovi */
-struct {
- char *ip_address;
- char *host_name;
- char first_line[MAXLINE];
-
- char browser[MAXLINE];
- char req_url[MAXLINE];
- char *cgi_get_query_string; /* v pripade cgi metodou GET prislusny query string */
- char http_version[MAXLINE];
- char method[MAXLINE];
- char requested_host[MAXLINE];
- char if_mod_since[MAXLINE];
- char if_unmod_since[MAXLINE];
- char expect[MAXLINE];
-
- int reply; /* odpoved ktera se mu bude generovat */
- char getfile[MAXLINE]; /* realna cesta k predavanemu souboru */
- int getfile_desc; /* deskriptor pro cteny soubor */
-
- unsigned int cgi_state; /* jak je na tom tento pozadavek s CGI */
-} client;
-
- /* logovani */
-struct {
- FILE *logfile;
- char message[MAXLINE];
-} log;
-
- /* -----------------deklarace funkci---------------------- */
- /* text.c */
-void convert_to_rfc822_date(time_t curtime, char *buffer);
-void get_rfc822_date(char *buffer);
-char *strip_extension(char *buffer);
-void prase_config(FILE * f);
-int empty_string(char *s);
-char *find_content_type(char *ext);
-char *subst(char *a, char *b, char *c);
-char *deldupl(char a, char *b);
-char *decode_hexa_octets(char *s1);
-int delddot(char *s, char *s2);
-int get_number_of_month(char *tmp2);
-int compare_rfc822_dates(char *date1, char *date2);
-
- /* communication.c */
-int writen(int fd, char *ptr, int nbytes);
-int readline(int fd, char *ptr, int maxlen);
-int writestring(int fd, char *s1);
-int genreply(int fd);
-int read_headers(int sockfd);
-int process_request(int sockfd);
-int is_in_cage(char *s);
-
- /* cgi.c */
-int logrequest(FILE * lf, int reply, int bytes);
-int logwrite(FILE * lf, const char *s);
-
- /* sys.c */
-void getlink(char *path, char *result);
-
- /* cgi.c */
-int if_cgi_then_ok(char *fname);
-char **cgi_get_environment();
-
diff --git a/linux-tools/japach/src/log.c b/linux-tools/japach/src/log.c
deleted file mode 100644
index 86ac3c580d..0000000000
--- a/linux-tools/japach/src/log.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* logging of reply, count of bytes, etc. to specified logfile */
-int logrequest(FILE * lf, int reply, int bytes)
-{
- char buffer[MAXLINE];
- char buffer2[MAXLINE];
- char s_reply[MAXLINE], s_bytes[MAXLINE];
- time_t curtime;
- struct tm *loctime;
-
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%b/%Y:%H:%M:%S", loctime);
-
- strcpy(buffer2, "");
- strncpy(buffer2, client.host_name, MAXLINE - strlen(buffer2)); /* hostname */
- strncat(buffer2, " - - [", MAXLINE - strlen(buffer2)); /* login & rfc931 */
- strncat(buffer2, buffer, MAXLINE - strlen(buffer2));
- strcat(buffer2, "] \""); /* date */
- strncat(buffer2, client.first_line, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\""); /* request */
- sprintf(s_reply, "%d", reply);
- sprintf(s_bytes, "%d", bytes);
- strcat(buffer2, " ");
- strncat(buffer2, s_reply, MAXLINE - strlen(buffer2));
- strcat(buffer2, " ");
- strncat(buffer2, s_bytes, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\n");
- fputs(buffer2, lf);
- fflush(lf);
-
-
-}
-
- /* insert some string into logfile */
-int logwrite(FILE * lf, const char *s)
-{
- char buffer[MAXLINE];
- time_t curtime;
- pid_t pid;
- char pid_s[8];
- struct tm *loctime;
-
-
- pid = getpid();
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%m/%y %H:%M", loctime);
- sprintf(pid_s, "[%d]", (int) pid);
- strncat(buffer, pid_s, MAXLINE - strlen(buffer));
- strncat(buffer, " ", MAXLINE - strlen(buffer));
- strncat(buffer, s, MAXLINE - strlen(buffer));
- fputs(buffer, lf);
- fflush(lf);
-}
diff --git a/linux-tools/japach/src/sys.c b/linux-tools/japach/src/sys.c
deleted file mode 100644
index a943414387..0000000000
--- a/linux-tools/japach/src/sys.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* author of readlink() be praised ;( */
-void getlink(char *path, char *result)
-{
- int i;
- char name[MAXLINE];
-
- i = readlink(path, name, MAXLINE);
- name[i] = '\0';
- strcpy(result, name);
-}
diff --git a/linux-tools/japach/src/text.c b/linux-tools/japach/src/text.c
deleted file mode 100644
index 4d976f3106..0000000000
--- a/linux-tools/japach/src/text.c
+++ /dev/null
@@ -1,628 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
- /* converts time_t to rfc822 date */
-void convert_to_rfc822_date(time_t curtime, char *buffer)
-{
- struct tm *loctime;
-
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
-void get_rfc822_date(char *buffer)
-{
- time_t curtime;
- struct tm *loctime;
-
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
- /* strips extension from /some/file/path.ext */
-char *strip_extension(char *buffer)
-{
- char *s1;
- int i;
-
- for (s1 = buffer + strlen(buffer); ((*s1 != '.') && (s1 > buffer));
- s1--);
- s1++;
- if (s1 > buffer)
- return (s1);
- else
- return (0);
-}
-
- /* simple */
-int empty_string(char *s)
-{
- int i = 0;
-
- while ((isspace(s[i])) && (i < strlen(s)))
- i++;
- if (i == strlen(s))
- return (1);
- else
- return (0);
-}
-
-/* parse config file */
-/* this isn't indented in K&R style, because it will look ugly
- * (sorry guys ;) ).
- */
-
-void parse_config(FILE * f)
-{
- char *radka, delim, *confval, *keyword, *extension, *content_type,
- *s1, *s2;
- char *name, *documentroot, *log;
- int i = 0, x = 0, cur_conf_line = 0;
- struct c_types *pom;
- struct cage *pom1;
- struct virtuals *pom2;
- struct cgidirs *pom3;
-
- /* let's set some defaults */
- conf.serv_tcp_port = 80;
- strcpy(conf.document_root, "/var/www/html/");
- strcpy(conf.master_log, "tcp_srv.log");
- strcpy(conf.server_name, "localhost");
- strcpy(conf.userdir, "html");
- conf.uid = 0;
- conf.gid = 0;
- conf.max_childs = 100;
- conf.content_types =
- (struct c_types *) malloc(sizeof(struct c_types));
- conf.content_types->next = NULL;
- conf.cage_dirs = (struct cage *) malloc(sizeof(struct cage));
- conf.cage_dirs->next = NULL;
- conf.cgi_dirs = (struct cgidirs *) malloc(sizeof(struct cgidirs));
- conf.cgi_dirs->next = NULL;
- conf.virtual_hosts =
- (struct virtuals *) malloc(sizeof(struct virtuals));
- conf.virtual_hosts->next = NULL;
- conf.follow_symlinks = DO_NOT_FOLLOW_SYMLINKS;
-
- radka = (char *) malloc(MAXLINE * sizeof(char));
- name = (char *) malloc(MAXLINE * sizeof(char));
- documentroot = (char *) malloc(MAXLINE * sizeof(char));
- log = (char *) malloc(MAXLINE * sizeof(char));
- keyword = (char *) malloc(MAXLINE * sizeof(char));
- confval = (char *) malloc(MAXLINE * sizeof(char));
- extension = (char *) malloc(MAXLINE * sizeof(char));
- content_type = (char *) malloc(MAXLINE * sizeof(char));
-
-
- while (!feof(f)) {
- cur_conf_line++;
- if ((fgets(radka, MAXLINE, f)) && (radka[0] != '#')
- && (!empty_string(radka))) {
- i = 0;
- while ((!isspace(radka[i])) && (i < strlen(radka))) {
- keyword[i] = radka[i];
- i++;
- }
- keyword[i] = '\0';
- while ((isspace(radka[i])) && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- confval[i - x] = radka[i];
- i++;
- }
- confval[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "keyword without value on line %d\n",
- cur_conf_line);
- exit(0); /* FIXME: what about tidying up the mem? */
- }
- if (!strcasecmp(keyword, "port")) {
- conf.serv_tcp_port = atoi(confval);
- } else if (!strcasecmp(keyword, "documentroot")) {
- strcpy(conf.document_root, confval);
- if (confval[strlen(confval) - 1] != '/')
- strcat(conf.document_root, "/");
- } else if (!strcasecmp(keyword, "masterlog")) {
- strcpy(conf.master_log, confval);
- } else if (!strcasecmp(keyword, "uid")) {
- conf.uid = atoi(confval);
- } else if (!strcasecmp(keyword, "gid")) {
- conf.gid = atoi(confval);
- } else if (!strcasecmp(keyword, "maxchilds")) {
- conf.max_childs = atoi(confval);
- } else if (!strcasecmp(keyword, "symlinks")) {
- if (!strcasecmp
- (confval, "follow_symlinks"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS;
- else if (!strcasecmp
- (confval,
- "follow_symlinks_into_cage"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS_INTO_CAGE;
- } //jinak je default
- else if (!strcasecmp(keyword, "servername")) {
- strcpy(conf.server_name, confval);
- } else if (!strcasecmp(keyword, "userdir")) {
- strcpy(conf.userdir, confval);
- } else if (!strcasecmp(keyword, "cage")) { //definice ze kterych adresaru nesmi ven
- pom1 = conf.cage_dirs;
- while (pom1->next)
- pom1 = pom1->next;
- pom1->next =
- (struct cage *)
- malloc(sizeof(struct cage));
- strcpy(pom1->next->name, confval);
- pom1->next->next = NULL;
- } else if (!strcasecmp(keyword, "cgidir")) { /* paths to cgi executables */
- pom3 = conf.cgi_dirs;
- while (pom3->next)
- pom3 = pom3->next;
- pom3->next =
- (struct cgidirs *)
- malloc(sizeof(struct cgidirs));
- strcpy(pom3->next->name, confval);
- pom3->next->next = NULL;
- } else if (!strcasecmp(keyword, "type")) { /* assigning content-types to extensions */
- pom = conf.content_types;
- while (pom->next)
- pom = pom->next;
- pom->next =
- (struct c_types *)
- malloc(sizeof(struct c_types));
- /* parsing content-type extension */
- i = 4;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- extension[i - x] = radka[i];
- i++;
- }
- extension[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- content_type[i - x] =
- radka[i];
- i++;
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- content_type[i - x - 1] = '\0';
- strcpy(pom->next->extension, extension);
- strcpy(pom->next->content_type,
- content_type);
- pom->next->next = NULL;
- } else if (!strcasecmp(keyword, "virtualhost")) {
- /* parsing virtualhosts */
- pom2 = conf.virtual_hosts;
- while (pom2->next)
- pom2 = pom2->next;
- pom2->next =
- (struct virtuals *)
- malloc(sizeof(struct virtuals));
- /* fill in the three vals - parse according to spaces */
- i = 11;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- name[i - x] = radka[i];
- i++;
- }
- name[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- documentroot[i - x] =
- radka[i];
- i++;
- }
- documentroot[i - x] = '\0';
- if (i < strlen(radka)) {
- while ((isspace(radka[i]))
- && (i <
- strlen(radka)))
- i++;
- x = i;
- while (i < strlen(radka)) {
- log[i - x] =
- radka[i];
- i++;
- }
- log[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "invalid virtualhost definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- strcpy(pom2->next->name, name);
- strcpy(pom2->next->documentroot,
- documentroot);
- strcpy(pom2->next->log, log);
- pom2->next->next = NULL;
- /* open apropriate log file */
- if (!
- (pom2->next->logfile =
- fopen(log, "a"))) {
- fprintf(stderr,
- "! can't open %s!\n", log);
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- } else
- fprintf(stderr,
- "warning: keyword %s on line %d not recognized\n",
- keyword, cur_conf_line);
- }
- }
- free(radka);
- free(confval);
- free(extension);
- free(content_type);
- free(name);
- free(documentroot);
- free(log);
-}
-
-char *find_content_type(char *ext)
-{
- struct c_types *pom;
-
- pom = conf.content_types->next;
- while (pom) {
- if (!strcmp(ext, pom->extension))
- return (pom->content_type);
- pom = pom->next;
- }
- return ("text/html");
-}
-
-char *subst(char *a, char *b, char *c)
-{
- int i = 0, x = 0, q;
- char *tmp;
-
- tmp = (char *) malloc(strlen(a) * strlen(b) * sizeof(char));
- while (i < strlen(a)) {
- if (a[i] != b[0]) {
- tmp[x] = a[i];
- x++;
- i++;
- } else {
- q = i;
- while (a[q] == b[q - i])
- q++;
- if (q - i == (strlen(b))) { /* matches */
- strcat(tmp, c);
- i += strlen(b);
- x += strlen(c);
- } else {
- tmp[x] = a[i];
- x++;
- i++;
- }
- }
- }
- tmp[x] = '\0';
- return (tmp);
-}
-
-/* deletes duplicit occurences of char a in char* b */
-char *deldupl(char a, char *b)
-{
- int i = 0, x = 0;
- char *tmp;
-
- tmp = (char *) malloc(strlen(b) * sizeof(char));
- strcpy(tmp, "");
- while (i < strlen(b)) {
- if ((b[i] == a) && (b[i + 1] == a)) {
- tmp[i - x] = b[i];
- i++;
- while ((b[i] == a)) {
- i++;
- x++;
- }
- } else {
- tmp[i - x] = b[i];
- i++;
- }
- }
- tmp[i - x] = '\0';
- return tmp;
-}
-
-/* replaces %AB with corresponding character (0xAB) */
-
-char *decode_hexa_octets(char *s1)
-{
- int i, a, q;
- char hexa[3], *s2;
-
- s2 = (char *) malloc(sizeof(char) * strlen(s1) + 1);
- a = 0;
- i = 0;
- while (i < strlen(s1)) {
- if (s1[i] != '%') {
- s2[a] = s1[i];
- i++;
- a++;
- } else if (i < strlen(s1) - 1) {
- hexa[0] = s1[i + 1];
- hexa[1] = s1[i + 2];
- hexa[2] = '\0';
- q = strtol(hexa, NULL, 16);
- s2[a] = (char) q;
- a++;
- i += 3;
- }
- }
- s2[i] = '\0';
- return (s2);
-}
-
-
- /* something very similar to realpath()
- * TODO: to be removed, and substituted with realpath()
- * on calling places
- */
-int delddot(char *s, char *s2)
-{
- int prev = 0, i = 0, q = 0, a = 0, w = 0, changed = 0;
- char *s1;
-
- s1 = (char *) malloc(sizeof(char) * MAXLINE);
- s1[0] = '\0';
- if (!strstr(s, "/../")) {
- strcpy(s2, s);
- return;
- }
- while ((i < strlen(s) - 4)
- &&
- (!((s[i] == '/') && (s[i + 1] == '.') && (s[i + 2] == '.')
- && (s[i + 3] == '/')))) {
- if ((s[i] == '/') && (i != 0)) {
- for (a = prev; a < i; a++) {
- s1[a] = s[a];
- }
- prev = a;
- s1[a] = '\0';
- }
- i++;
- }
- if (i < strlen(s) - 4) {
- changed = 1;
- i = i + 3;
- q = strlen(s1);
- w = i;
- while (i < strlen(s)) {
- s1[q + i - w] = s[i];
- i++;
- }
- s1[q + i - w] = '\0';
- delddot(s1, s2); /* recursively on the same string, d0h ;) */
- }
- free(s1);
-}
-
-int get_number_of_month(char *tmp2)
-{
- if (!strcasecmp(tmp2, "Jan"))
- return 1;
- if (!strcasecmp(tmp2, "Feb"))
- return 2;
- if (!strcasecmp(tmp2, "Mar"))
- return 3;
- if (!strcasecmp(tmp2, "Apr"))
- return 4;
- if (!strcasecmp(tmp2, "May"))
- return 5;
- if (!strcasecmp(tmp2, "Jun"))
- return 6;
- if (!strcasecmp(tmp2, "Jul"))
- return 7;
- if (!strcasecmp(tmp2, "Aug"))
- return 8;
- if (!strcasecmp(tmp2, "Sep"))
- return 9;
- if (!strcasecmp(tmp2, "Oct"))
- return 10;
- if (!strcasecmp(tmp2, "Nov"))
- return 11;
- if (!strcasecmp(tmp2, "Dec"))
- return 12;
-}
-
-
-int compare_rfc822_dates(char *date1, char *date2)
- /* compares two dates.
- *
- * if (d1 < d2) return (-1); else if (d1 == d2) return(0); else return(1);
- *
- */
-{
- int i, bb;
- int long yr1 = 0, yr2 = 0;
- int mon1 = 0, mon2 = 0;
- int day1 = 0, day2 = 0;
- int hms1 = 0, hms2 = 0;
- int offs1 = 0, offs2 = 0;
- int num1, num2;
- char *tmp, tmp2[2048], op[2], b[3];
-
- /* parse years into yr1 & yr2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
-
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr1 = atoi(tmp2);
-
- /* yr2 */
- tmp = strpbrk(date2, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr2 = atoi(tmp2);
-
- /* parse days to d1 & d2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day1 = atoi(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day2 = atoi(tmp2);
-
- /* parse hms */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms1 = atoi(tmp);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms2 = atoi(tmp);
-
- /* count 'offset' */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms1 = hms1 + bb * 100000;
-
- tmp = strpbrk(date2, " ");
- tmp++;
-
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms2 = hms2 + bb * 100000;
-
- /* count month # */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon1 = get_number_of_month(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon2 = get_number_of_month(tmp2);
-
- if (yr1 < yr2)
- return -1;
- else if (yr1 > yr2)
- return 1;
- else if (mon1 < mon2)
- return -1;
- else if (mon1 > mon2)
- return 1;
- else if (day1 < day2)
- return -1;
- else if (day1 > day2)
- return 1;
- else if (hms1 < hms2)
- return -1;
- else if (hms1 > hms2)
- return 1;
- else if (hms1 == hms2)
- return 0;
-}
diff --git a/linux-tools/japach/sys.c b/linux-tools/japach/sys.c
deleted file mode 100644
index a943414387..0000000000
--- a/linux-tools/japach/sys.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* author of readlink() be praised ;( */
-void getlink(char *path, char *result)
-{
- int i;
- char name[MAXLINE];
-
- i = readlink(path, name, MAXLINE);
- name[i] = '\0';
- strcpy(result, name);
-}
diff --git a/linux-tools/japach/text.c b/linux-tools/japach/text.c
deleted file mode 100644
index 4d976f3106..0000000000
--- a/linux-tools/japach/text.c
+++ /dev/null
@@ -1,628 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
- /* converts time_t to rfc822 date */
-void convert_to_rfc822_date(time_t curtime, char *buffer)
-{
- struct tm *loctime;
-
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
-void get_rfc822_date(char *buffer)
-{
- time_t curtime;
- struct tm *loctime;
-
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
- /* strips extension from /some/file/path.ext */
-char *strip_extension(char *buffer)
-{
- char *s1;
- int i;
-
- for (s1 = buffer + strlen(buffer); ((*s1 != '.') && (s1 > buffer));
- s1--);
- s1++;
- if (s1 > buffer)
- return (s1);
- else
- return (0);
-}
-
- /* simple */
-int empty_string(char *s)
-{
- int i = 0;
-
- while ((isspace(s[i])) && (i < strlen(s)))
- i++;
- if (i == strlen(s))
- return (1);
- else
- return (0);
-}
-
-/* parse config file */
-/* this isn't indented in K&R style, because it will look ugly
- * (sorry guys ;) ).
- */
-
-void parse_config(FILE * f)
-{
- char *radka, delim, *confval, *keyword, *extension, *content_type,
- *s1, *s2;
- char *name, *documentroot, *log;
- int i = 0, x = 0, cur_conf_line = 0;
- struct c_types *pom;
- struct cage *pom1;
- struct virtuals *pom2;
- struct cgidirs *pom3;
-
- /* let's set some defaults */
- conf.serv_tcp_port = 80;
- strcpy(conf.document_root, "/var/www/html/");
- strcpy(conf.master_log, "tcp_srv.log");
- strcpy(conf.server_name, "localhost");
- strcpy(conf.userdir, "html");
- conf.uid = 0;
- conf.gid = 0;
- conf.max_childs = 100;
- conf.content_types =
- (struct c_types *) malloc(sizeof(struct c_types));
- conf.content_types->next = NULL;
- conf.cage_dirs = (struct cage *) malloc(sizeof(struct cage));
- conf.cage_dirs->next = NULL;
- conf.cgi_dirs = (struct cgidirs *) malloc(sizeof(struct cgidirs));
- conf.cgi_dirs->next = NULL;
- conf.virtual_hosts =
- (struct virtuals *) malloc(sizeof(struct virtuals));
- conf.virtual_hosts->next = NULL;
- conf.follow_symlinks = DO_NOT_FOLLOW_SYMLINKS;
-
- radka = (char *) malloc(MAXLINE * sizeof(char));
- name = (char *) malloc(MAXLINE * sizeof(char));
- documentroot = (char *) malloc(MAXLINE * sizeof(char));
- log = (char *) malloc(MAXLINE * sizeof(char));
- keyword = (char *) malloc(MAXLINE * sizeof(char));
- confval = (char *) malloc(MAXLINE * sizeof(char));
- extension = (char *) malloc(MAXLINE * sizeof(char));
- content_type = (char *) malloc(MAXLINE * sizeof(char));
-
-
- while (!feof(f)) {
- cur_conf_line++;
- if ((fgets(radka, MAXLINE, f)) && (radka[0] != '#')
- && (!empty_string(radka))) {
- i = 0;
- while ((!isspace(radka[i])) && (i < strlen(radka))) {
- keyword[i] = radka[i];
- i++;
- }
- keyword[i] = '\0';
- while ((isspace(radka[i])) && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- confval[i - x] = radka[i];
- i++;
- }
- confval[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "keyword without value on line %d\n",
- cur_conf_line);
- exit(0); /* FIXME: what about tidying up the mem? */
- }
- if (!strcasecmp(keyword, "port")) {
- conf.serv_tcp_port = atoi(confval);
- } else if (!strcasecmp(keyword, "documentroot")) {
- strcpy(conf.document_root, confval);
- if (confval[strlen(confval) - 1] != '/')
- strcat(conf.document_root, "/");
- } else if (!strcasecmp(keyword, "masterlog")) {
- strcpy(conf.master_log, confval);
- } else if (!strcasecmp(keyword, "uid")) {
- conf.uid = atoi(confval);
- } else if (!strcasecmp(keyword, "gid")) {
- conf.gid = atoi(confval);
- } else if (!strcasecmp(keyword, "maxchilds")) {
- conf.max_childs = atoi(confval);
- } else if (!strcasecmp(keyword, "symlinks")) {
- if (!strcasecmp
- (confval, "follow_symlinks"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS;
- else if (!strcasecmp
- (confval,
- "follow_symlinks_into_cage"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS_INTO_CAGE;
- } //jinak je default
- else if (!strcasecmp(keyword, "servername")) {
- strcpy(conf.server_name, confval);
- } else if (!strcasecmp(keyword, "userdir")) {
- strcpy(conf.userdir, confval);
- } else if (!strcasecmp(keyword, "cage")) { //definice ze kterych adresaru nesmi ven
- pom1 = conf.cage_dirs;
- while (pom1->next)
- pom1 = pom1->next;
- pom1->next =
- (struct cage *)
- malloc(sizeof(struct cage));
- strcpy(pom1->next->name, confval);
- pom1->next->next = NULL;
- } else if (!strcasecmp(keyword, "cgidir")) { /* paths to cgi executables */
- pom3 = conf.cgi_dirs;
- while (pom3->next)
- pom3 = pom3->next;
- pom3->next =
- (struct cgidirs *)
- malloc(sizeof(struct cgidirs));
- strcpy(pom3->next->name, confval);
- pom3->next->next = NULL;
- } else if (!strcasecmp(keyword, "type")) { /* assigning content-types to extensions */
- pom = conf.content_types;
- while (pom->next)
- pom = pom->next;
- pom->next =
- (struct c_types *)
- malloc(sizeof(struct c_types));
- /* parsing content-type extension */
- i = 4;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- extension[i - x] = radka[i];
- i++;
- }
- extension[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- content_type[i - x] =
- radka[i];
- i++;
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- content_type[i - x - 1] = '\0';
- strcpy(pom->next->extension, extension);
- strcpy(pom->next->content_type,
- content_type);
- pom->next->next = NULL;
- } else if (!strcasecmp(keyword, "virtualhost")) {
- /* parsing virtualhosts */
- pom2 = conf.virtual_hosts;
- while (pom2->next)
- pom2 = pom2->next;
- pom2->next =
- (struct virtuals *)
- malloc(sizeof(struct virtuals));
- /* fill in the three vals - parse according to spaces */
- i = 11;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- name[i - x] = radka[i];
- i++;
- }
- name[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- documentroot[i - x] =
- radka[i];
- i++;
- }
- documentroot[i - x] = '\0';
- if (i < strlen(radka)) {
- while ((isspace(radka[i]))
- && (i <
- strlen(radka)))
- i++;
- x = i;
- while (i < strlen(radka)) {
- log[i - x] =
- radka[i];
- i++;
- }
- log[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "invalid virtualhost definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- strcpy(pom2->next->name, name);
- strcpy(pom2->next->documentroot,
- documentroot);
- strcpy(pom2->next->log, log);
- pom2->next->next = NULL;
- /* open apropriate log file */
- if (!
- (pom2->next->logfile =
- fopen(log, "a"))) {
- fprintf(stderr,
- "! can't open %s!\n", log);
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- } else
- fprintf(stderr,
- "warning: keyword %s on line %d not recognized\n",
- keyword, cur_conf_line);
- }
- }
- free(radka);
- free(confval);
- free(extension);
- free(content_type);
- free(name);
- free(documentroot);
- free(log);
-}
-
-char *find_content_type(char *ext)
-{
- struct c_types *pom;
-
- pom = conf.content_types->next;
- while (pom) {
- if (!strcmp(ext, pom->extension))
- return (pom->content_type);
- pom = pom->next;
- }
- return ("text/html");
-}
-
-char *subst(char *a, char *b, char *c)
-{
- int i = 0, x = 0, q;
- char *tmp;
-
- tmp = (char *) malloc(strlen(a) * strlen(b) * sizeof(char));
- while (i < strlen(a)) {
- if (a[i] != b[0]) {
- tmp[x] = a[i];
- x++;
- i++;
- } else {
- q = i;
- while (a[q] == b[q - i])
- q++;
- if (q - i == (strlen(b))) { /* matches */
- strcat(tmp, c);
- i += strlen(b);
- x += strlen(c);
- } else {
- tmp[x] = a[i];
- x++;
- i++;
- }
- }
- }
- tmp[x] = '\0';
- return (tmp);
-}
-
-/* deletes duplicit occurences of char a in char* b */
-char *deldupl(char a, char *b)
-{
- int i = 0, x = 0;
- char *tmp;
-
- tmp = (char *) malloc(strlen(b) * sizeof(char));
- strcpy(tmp, "");
- while (i < strlen(b)) {
- if ((b[i] == a) && (b[i + 1] == a)) {
- tmp[i - x] = b[i];
- i++;
- while ((b[i] == a)) {
- i++;
- x++;
- }
- } else {
- tmp[i - x] = b[i];
- i++;
- }
- }
- tmp[i - x] = '\0';
- return tmp;
-}
-
-/* replaces %AB with corresponding character (0xAB) */
-
-char *decode_hexa_octets(char *s1)
-{
- int i, a, q;
- char hexa[3], *s2;
-
- s2 = (char *) malloc(sizeof(char) * strlen(s1) + 1);
- a = 0;
- i = 0;
- while (i < strlen(s1)) {
- if (s1[i] != '%') {
- s2[a] = s1[i];
- i++;
- a++;
- } else if (i < strlen(s1) - 1) {
- hexa[0] = s1[i + 1];
- hexa[1] = s1[i + 2];
- hexa[2] = '\0';
- q = strtol(hexa, NULL, 16);
- s2[a] = (char) q;
- a++;
- i += 3;
- }
- }
- s2[i] = '\0';
- return (s2);
-}
-
-
- /* something very similar to realpath()
- * TODO: to be removed, and substituted with realpath()
- * on calling places
- */
-int delddot(char *s, char *s2)
-{
- int prev = 0, i = 0, q = 0, a = 0, w = 0, changed = 0;
- char *s1;
-
- s1 = (char *) malloc(sizeof(char) * MAXLINE);
- s1[0] = '\0';
- if (!strstr(s, "/../")) {
- strcpy(s2, s);
- return;
- }
- while ((i < strlen(s) - 4)
- &&
- (!((s[i] == '/') && (s[i + 1] == '.') && (s[i + 2] == '.')
- && (s[i + 3] == '/')))) {
- if ((s[i] == '/') && (i != 0)) {
- for (a = prev; a < i; a++) {
- s1[a] = s[a];
- }
- prev = a;
- s1[a] = '\0';
- }
- i++;
- }
- if (i < strlen(s) - 4) {
- changed = 1;
- i = i + 3;
- q = strlen(s1);
- w = i;
- while (i < strlen(s)) {
- s1[q + i - w] = s[i];
- i++;
- }
- s1[q + i - w] = '\0';
- delddot(s1, s2); /* recursively on the same string, d0h ;) */
- }
- free(s1);
-}
-
-int get_number_of_month(char *tmp2)
-{
- if (!strcasecmp(tmp2, "Jan"))
- return 1;
- if (!strcasecmp(tmp2, "Feb"))
- return 2;
- if (!strcasecmp(tmp2, "Mar"))
- return 3;
- if (!strcasecmp(tmp2, "Apr"))
- return 4;
- if (!strcasecmp(tmp2, "May"))
- return 5;
- if (!strcasecmp(tmp2, "Jun"))
- return 6;
- if (!strcasecmp(tmp2, "Jul"))
- return 7;
- if (!strcasecmp(tmp2, "Aug"))
- return 8;
- if (!strcasecmp(tmp2, "Sep"))
- return 9;
- if (!strcasecmp(tmp2, "Oct"))
- return 10;
- if (!strcasecmp(tmp2, "Nov"))
- return 11;
- if (!strcasecmp(tmp2, "Dec"))
- return 12;
-}
-
-
-int compare_rfc822_dates(char *date1, char *date2)
- /* compares two dates.
- *
- * if (d1 < d2) return (-1); else if (d1 == d2) return(0); else return(1);
- *
- */
-{
- int i, bb;
- int long yr1 = 0, yr2 = 0;
- int mon1 = 0, mon2 = 0;
- int day1 = 0, day2 = 0;
- int hms1 = 0, hms2 = 0;
- int offs1 = 0, offs2 = 0;
- int num1, num2;
- char *tmp, tmp2[2048], op[2], b[3];
-
- /* parse years into yr1 & yr2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
-
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr1 = atoi(tmp2);
-
- /* yr2 */
- tmp = strpbrk(date2, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr2 = atoi(tmp2);
-
- /* parse days to d1 & d2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day1 = atoi(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day2 = atoi(tmp2);
-
- /* parse hms */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms1 = atoi(tmp);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms2 = atoi(tmp);
-
- /* count 'offset' */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms1 = hms1 + bb * 100000;
-
- tmp = strpbrk(date2, " ");
- tmp++;
-
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms2 = hms2 + bb * 100000;
-
- /* count month # */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon1 = get_number_of_month(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon2 = get_number_of_month(tmp2);
-
- if (yr1 < yr2)
- return -1;
- else if (yr1 > yr2)
- return 1;
- else if (mon1 < mon2)
- return -1;
- else if (mon1 > mon2)
- return 1;
- else if (day1 < day2)
- return -1;
- else if (day1 > day2)
- return 1;
- else if (hms1 < hms2)
- return -1;
- else if (hms1 > hms2)
- return 1;
- else if (hms1 == hms2)
- return 0;
-}
diff --git a/linux-tools/japach_old/AUTHORS b/linux-tools/japach_old/AUTHORS
deleted file mode 100644
index 2dc8313890..0000000000
--- a/linux-tools/japach_old/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Jirka Kosina <jikos@jikos.cz>
-
diff --git a/linux-tools/japach_old/COPYING b/linux-tools/japach_old/COPYING
deleted file mode 100644
index d60c31a97a..0000000000
--- a/linux-tools/japach_old/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/linux-tools/japach_old/ChangeLog b/linux-tools/japach_old/ChangeLog
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/japach_old/ChangeLog
+++ /dev/null
diff --git a/linux-tools/japach_old/HOW-TO-INSTALL-JAPACH.txt b/linux-tools/japach_old/HOW-TO-INSTALL-JAPACH.txt
deleted file mode 100644
index 14f1880c61..0000000000
--- a/linux-tools/japach_old/HOW-TO-INSTALL-JAPACH.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-go to /Japach/src in cygwin and do make
-Make is configured to compile japach with target arm-uclinux
-
-Japach tree:
-
-
-=================== JAPACH DAEMON ===================
-|| ||
-|| Japach/| ||
-|| |==> Japach.conf ||
-|| |==> Japach ||
-|| | ||
-|| |==> log/| ||
-|| | |==> Japach.log ||
-|| | ||
-|| |==> www/| ||
-|| |==> favicon.ico ||
-|| |==> index.html ||
-|| |==> test ||
-|| |==> spidlogo.jpg ||
-|| | ||
-|| |==> cgi-bin/| ||
-|| |==> ifconfig ||
-|| |==> meminfos ||
-|| |==> cpuinfos ||
-|| ||
-|| ||
-=======================================================
-
-
-
-Put in www/ all you html file
-put in cgi-bin/ all your cgi scripts
-
-to run Japach => /japach/japach &
-
-
-
-
-
diff --git a/linux-tools/japach_old/Makefile b/linux-tools/japach_old/Makefile
deleted file mode 100644
index 29c0c92c74..0000000000
--- a/linux-tools/japach_old/Makefile
+++ /dev/null
@@ -1,344 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = .
-top_srcdir = .
-prefix = root
-exec_prefix = ${prefix}
-
-bindir = ${exec_prefix}/bin
-sbindir = ${exec_prefix}/sbin
-libexecdir = ${exec_prefix}/libexec
-datadir = ${prefix}/share
-sysconfdir = ${prefix}/etc
-sharedstatedir = ${prefix}/com
-localstatedir = ${prefix}/var
-libdir = ${exec_prefix}/lib
-infodir = ${prefix}/info
-mandir = ${prefix}/man
-includedir = ${prefix}/include
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/japach
-pkglibdir = $(libdir)/japach
-pkgincludedir = $(includedir)/japach
-
-top_builddir = .
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-AUTOMAKE = automake
-AUTOHEADER = autoheader
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-transform = s,x,x,
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = gcc
-MAKEINFO = makeinfo
-PACKAGE = japach
-VERSION = 0.4.1
-
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-DATA = $(sysconf_DATA)
-
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
-missing mkinstalldirs
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): configure.in
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-install-sysconfDATA: $(sysconf_DATA)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
- else if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
- fi; fi; \
- done
-
-uninstall-sysconfDATA:
- @$(NORMAL_UNINSTALL)
- list='$(sysconf_DATA)'; for p in $$list; do \
- rm -f $(DESTDIR)$(sysconfdir)/$$p; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am: all-am
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-exec-am: install-sysconfDATA
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-sysconfDATA
-uninstall: uninstall-recursive
-all-am: Makefile $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: uninstall-sysconfDATA install-sysconfDATA install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach_old/Makefile.am b/linux-tools/japach_old/Makefile.am
deleted file mode 100644
index 94da6e0f8b..0000000000
--- a/linux-tools/japach_old/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-
diff --git a/linux-tools/japach_old/Makefile.in b/linux-tools/japach_old/Makefile.in
deleted file mode 100644
index e09fec3dd6..0000000000
--- a/linux-tools/japach_old/Makefile.in
+++ /dev/null
@@ -1,344 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = @CC@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SUBDIRS = src
-confdir = $(sysconfdir)
-sysconf_DATA = japach.conf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-DATA = $(sysconf_DATA)
-
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
-missing mkinstalldirs
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): configure.in
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-install-sysconfDATA: $(sysconf_DATA)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
- else if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
- fi; fi; \
- done
-
-uninstall-sysconfDATA:
- @$(NORMAL_UNINSTALL)
- list='$(sysconf_DATA)'; for p in $$list; do \
- rm -f $(DESTDIR)$(sysconfdir)/$$p; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am: all-am
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-exec-am: install-sysconfDATA
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-sysconfDATA
-uninstall: uninstall-recursive
-all-am: Makefile $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: uninstall-sysconfDATA install-sysconfDATA install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach_old/README b/linux-tools/japach_old/README
deleted file mode 100644
index 7e4226f0d9..0000000000
--- a/linux-tools/japach_old/README
+++ /dev/null
@@ -1,121 +0,0 @@
-
- JAPACH
- user documentation
-
- Jirka Kosina <jikos@jikos.cz>
-
-
-
-
-1. What is JAPACH
-
-Very simple WWW server, supporting only some parts of HTTP/1.1
-protocol, as defined in RFC 2616. Nowadays it could do as a simple
-server of static pages, or simple CGI scripts (GET method only).
-
-2. Beginning
-
-2.1 Download, compilation, installation
-
-The latest version can be obtained from http://www.jikos.cz/jikos/japach - in
-.tar.gz (sources) or in RPM (binary distribution for redhat-like systems).
-
-After downloading .tar.gz one has to:
-
-tar -xzf<jmeno_souboru>
-./configure
-make
-make install [this is optional, installs files into system]
-
-2.2 Configuration
-
-2.2.1 Location of config file
-
-For program to start & run correctly, it is neccessary to have a configuration
-file with defined configuration values.
-The server being run without any parameter, a configu file is looked for in
-current directory. If unsuccessful, it will not start. You can specify location
-of configuration file using commnad-line parameter -c such as:
-$ ./japach -c /etc/japach.conf
-
-2.2.2 Configuration file format
-
-Configuration values are defined such as <key> <value>, <key> being internal
-configuration keyword (see 2.2.3).
-To comment a line, first character on line must be #
-
-2.2.3 Configuration values
-
- * port <portunum>
- specifies a tcp port for server to lsiten on. The default for webservers
- is 80, which is considered as default, if this value is not used in
- configuration. Note that unpriviledged processes can't bind ports
- below 1024
-
- * documentroot <path>
- a path on local filsystem which is taken as documentroot. E.g. if
- someone requests http://www.yourserver.com/index.html, index.html
- residing in path specified here is used and sent to client
-
- * uid <num>, gid <num>
- specifies creds which should running server daemon have. You can look
- them up in /etc/passwd, /etc/group
-
- * masterlog <path to logfile>
- full path to the main server's logfile (created during startup if
- doesn't exist)
-
- * maxchilds <count>
- specifies maximum count of concurrent running childs of server process,
- which are serving requests. Adjust this to fit your hardware
- capabilities.
-
- * type <extension> <type>
- assigns content-types to file extensions, which is very important for
- client-side interpretation of sent data. The example should be something
- like
- type jpg image/jpg
- where "jpg" means extension of filename, and image/jpg is standardized
- content-type, to give client a hint how to interpret sent data (display
- them as an image, in this case).
-
- * cage <path>
- client is not allowed to request document, which lay outside directories
- specified here, any such attempt will result in 403 Forbidden error.
- You should have here your documentroot, and documentroots of all
- your virtualservers, at minimum.
-
- * symlink <mode>
- How should the server deal with symlinks, if asked to serve file,
- which is symlink.
- - follow_symlinks - follow the symlink to correct location, and
- process the file, if it is in cage
- - do_not_follow_symlinks - any attempt to read symlink would result
- in 403 Forbidden error
-
- * servername <name>
- servername to return in headers, if not serving virtualhost. Should
- point to server's IP address.
-
- * virtualhost <name> <documentroot> <log>
-
- defines virtualhosts - name is name of server (fqdn, it should have
- existing DNS entry poiting to out IP address - otherwise it has no
- use - if you don't understand this, you're hopeless as web server
- administrator ;) ), documentroot specifies documentroot belonging
- to this virtualhost, and log is a logfile, which will hold all
- logged actions concerning this virtual server.
-
- * userdir <dirname>
-
- name of directory, which is looked for when such request as
- http://your.cool.server.com/~username/ is received. If there is
- user with "username" on your host, directory specified here is
- taken in his homedirectory as "root" for the rest of URL.
-
- * cgidir <dirname>
-
- specifies a directory, from which execution of CGI scripts is
- allowed.
-
-
diff --git a/linux-tools/japach_old/aclocal.m4 b/linux-tools/japach_old/aclocal.m4
deleted file mode 100644
index 9f8add8f0d..0000000000
--- a/linux-tools/japach_old/aclocal.m4
+++ /dev/null
@@ -1,104 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4
-
-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
diff --git a/linux-tools/japach_old/config.cache b/linux-tools/japach_old/config.cache
deleted file mode 100644
index 1a6395800c..0000000000
--- a/linux-tools/japach_old/config.cache
+++ /dev/null
@@ -1,55 +0,0 @@
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-ac_cv_big_endian=${ac_cv_big_endian=no}
-ac_cv_c_const=${ac_cv_c_const=yes}
-ac_cv_c_inline=${ac_cv_c_inline=inline}
-ac_cv_func_fcloseall=${ac_cv_func_fcloseall=yes}
-ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes}
-ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes}
-ac_cv_func_strftime=${ac_cv_func_strftime=yes}
-ac_cv_func_vprintf=${ac_cv_func_vprintf=yes}
-ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h=yes}
-ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes}
-ac_cv_header_errno_h=${ac_cv_header_errno_h=yes}
-ac_cv_header_fcntl_h=${ac_cv_header_fcntl_h=yes}
-ac_cv_header_netdb_h=${ac_cv_header_netdb_h=yes}
-ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h=yes}
-ac_cv_header_pwd_h=${ac_cv_header_pwd_h=yes}
-ac_cv_header_setjmp_h=${ac_cv_header_setjmp_h=yes}
-ac_cv_header_signal_h=${ac_cv_header_signal_h=yes}
-ac_cv_header_stdc=${ac_cv_header_stdc=yes}
-ac_cv_header_stdio_h=${ac_cv_header_stdio_h=yes}
-ac_cv_header_string_h=${ac_cv_header_string_h=yes}
-ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
-ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes}
-ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h=yes}
-ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
-ac_cv_header_time=${ac_cv_header_time=yes}
-ac_cv_header_time_h=${ac_cv_header_time_h=yes}
-ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
-ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir=no}
-ac_cv_little_endian=${ac_cv_little_endian=yes}
-ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
-ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
-ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
-ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
-ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
-ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
-ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional=no}
-ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
-ac_cv_struct_tm=${ac_cv_struct_tm=time.h}
-ac_cv_type_signal=${ac_cv_type_signal=void}
-ac_cv_type_size_t=${ac_cv_type_size_t=yes}
diff --git a/linux-tools/japach_old/config.status b/linux-tools/japach_old/config.status
deleted file mode 100644
index 30c934529f..0000000000
--- a/linux-tools/japach_old/config.status
+++ /dev/null
@@ -1,169 +0,0 @@
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host ventoux:
-#
-# ./configure --target=arm-uclinux --prefix=root
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
-for ac_option
-do
- case "$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} ./configure --target=arm-uclinux --prefix=root --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} ./configure --target=arm-uclinux --prefix=root --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "./config.status generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "$ac_cs_usage"; exit 0 ;;
- *) echo "$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=.
-ac_given_INSTALL="/usr/bin/install -c"
-
-trap 'rm -fr Makefile src/Makefile conftest*; exit 1' 1 2 15
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
-/^[ ]*VPATH[ ]*=[^:]*$/d
-
-s%@SHELL@%/bin/sh%g
-s%@CFLAGS@%-g -O2%g
-s%@CPPFLAGS@%%g
-s%@CXXFLAGS@%%g
-s%@FFLAGS@%%g
-s%@DEFS@% -DPACKAGE=\"japach\" -DVERSION=\"0.4.1\" -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRING_H=1 -DHAVE_NETDB_H=1 -DHAVE_TIME_H=1 -DHAVE_STDIO_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SETJMP_H=1 -DHAVE_PWD_H=1 -DTIME_WITH_SYS_TIME=1 -DAC_LITTLE_ENDIAN=1 -DRETSIGTYPE=void -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_FCLOSEALL=1 %g
-s%@LDFLAGS@%%g
-s%@LIBS@%%g
-s%@exec_prefix@%${prefix}%g
-s%@prefix@%root%g
-s%@program_transform_name@%s,x,x,%g
-s%@bindir@%${exec_prefix}/bin%g
-s%@sbindir@%${exec_prefix}/sbin%g
-s%@libexecdir@%${exec_prefix}/libexec%g
-s%@datadir@%${prefix}/share%g
-s%@sysconfdir@%${prefix}/etc%g
-s%@sharedstatedir@%${prefix}/com%g
-s%@localstatedir@%${prefix}/var%g
-s%@libdir@%${exec_prefix}/lib%g
-s%@includedir@%${prefix}/include%g
-s%@oldincludedir@%/usr/include%g
-s%@infodir@%${prefix}/info%g
-s%@mandir@%${prefix}/man%g
-s%@INSTALL_PROGRAM@%${INSTALL}%g
-s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g
-s%@INSTALL_DATA@%${INSTALL} -m 644%g
-s%@PACKAGE@%japach%g
-s%@VERSION@%0.4.1%g
-s%@ACLOCAL@%aclocal%g
-s%@AUTOCONF@%autoconf%g
-s%@AUTOMAKE@%automake%g
-s%@AUTOHEADER@%autoheader%g
-s%@MAKEINFO@%makeinfo%g
-s%@SET_MAKE@%%g
-s%@CC@%gcc%g
-s%@CPP@%gcc -E%g
-s%@LIBOBJS@%%g
-
-CEOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-
-CONFIG_FILES=${CONFIG_FILES-"Makefile src/Makefile"}
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-
-
-exit 0
diff --git a/linux-tools/japach_old/configure b/linux-tools/japach_old/configure
deleted file mode 100644
index 2f3bd4f037..0000000000
--- a/linux-tools/japach_old/configure
+++ /dev/null
@@ -1,3092 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=aclocal.m4
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:556: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:609: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=japach
-
-VERSION=0.4.1
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:712: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:725: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:738: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:751: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:764: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:780: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:810: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:861: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 904 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:940: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:968: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1004: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1009 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1042: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1050 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1083: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1091 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1125: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1140 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1205: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1210 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1235 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1253 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 1274 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1309: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1314 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_sys_wait_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
-if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_WAIT_H 1
-EOF
-
-fi
-
-for ac_hdr in sys/types.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1354: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/stat.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1394: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1399 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1434: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1439 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in fcntl.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1474: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1479 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/socket.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1514: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1519 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in string.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1554: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1559 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in netdb.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1594: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1634: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1639 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in stdio.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1674: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1679 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in netinet/in.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1714: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1719 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in arpa/inet.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1754: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1759 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in signal.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1794: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1799 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in errno.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1839 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/wait.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1874: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1879 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in setjmp.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1914: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1919 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in pwd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1954: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1959 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1992: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2067: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2074 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2107: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2112 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
-else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2140: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2175: checking whether struct tm is in sys/time.h or time.h" >&5
-if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <time.h>
-int main() {
-struct tm *tp; tp->tm_sec;
-; return 0; }
-EOF
-if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_struct_tm=time.h
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_struct_tm=sys/time.h
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_struct_tm" 1>&6
-if test $ac_cv_struct_tm = sys/time.h; then
- cat >> confdefs.h <<\EOF
-#define TM_IN_SYS_TIME 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for big endian""... $ac_c" 1>&6
-echo "configure:2210: checking for big endian" >&5
-if eval "test \"`echo '$''{'ac_cv_big_endian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_big_endian=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 2218 "configure"
-#include "confdefs.h"
-
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[sizeof(long) - 1] == 0x78 && c[sizeof(long) - 2] == 0x56 && c[sizeof(long) - 3] == 0x34 && c[sizeof(long) - 4] == 0x12);
- }
-
-EOF
-if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_big_endian=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_big_endian=no
-fi
-rm -fr conftest*
-fi
-
-
-fi
-
-echo "$ac_t""$ac_cv_big_endian" 1>&6
-echo $ac_n "checking for little endian""... $ac_c" 1>&6
-echo "configure:2247: checking for little endian" >&5
-if eval "test \"`echo '$''{'ac_cv_little_endian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_little_endian="$ac_cv_have_emx"
-else
- cat > conftest.$ac_ext <<EOF
-#line 2255 "configure"
-#include "confdefs.h"
-
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[0] == 0x78 && c[1] == 0x56 && c[2] == 0x34 && c[3] == 0x12);
- }
-
-EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_little_endian=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_little_endian=no
-fi
-rm -fr conftest*
-fi
-
-
-fi
-
-echo "$ac_t""$ac_cv_little_endian" 1>&6
-
-if test "$ac_cv_big_endian" = yes; then
- cat >> confdefs.h <<\EOF
-#define AC_BIG_ENDIAN 1
-EOF
-
-else if test "$ac_cv_little_endian" = yes; then
- cat >> confdefs.h <<\EOF
-#define AC_LITTLE_ENDIAN 1
-EOF
-
-fi
-fi
-
-if test $ac_cv_prog_gcc = yes; then
- echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2299: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_pattern="Autoconf.*'x'"
- cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
-#include "confdefs.h"
-#include <sgtty.h>
-Autoconf TIOCGETP
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
-else
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=no
-fi
-rm -f conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat > conftest.$ac_ext <<EOF
-#line 2323 "configure"
-#include "confdefs.h"
-#include <termio.h>
-Autoconf TCGETA
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -f conftest*
-
- fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
-
-echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2345: checking for 8-bit clean memcmp" >&5
-if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_memcmp_clean=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 2353 "configure"
-#include "confdefs.h"
-
-main()
-{
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
-}
-
-EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_memcmp_clean=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_memcmp_clean=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2381: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:2422: checking for strftime" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2427 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strftime(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strftime();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_strftime) || defined (__stub___strftime)
-choke me
-#else
-strftime();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strftime=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strftime=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STRFTIME 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-# strftime is in -lintl on SCO UNIX.
-echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:2472: checking for strftime in -lintl" >&5
-ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strftime();
-
-int main() {
-strftime()
-; return 0; }
-EOF
-if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STRFTIME 1
-EOF
-
-LIBS="-lintl $LIBS"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2518: checking for vprintf" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vprintf(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char vprintf();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_vprintf) || defined (__stub___vprintf)
-choke me
-#else
-vprintf();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_vprintf=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vprintf=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_VPRINTF 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test "$ac_cv_func_vprintf" != yes; then
-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2570: checking for _doprnt" >&5
-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2575 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-_doprnt();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func__doprnt=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func__doprnt=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_DOPRNT 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-for ac_func in fcloseall
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2625: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2630 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2679: checking for gethostbyname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2684 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
-choke me
-#else
-gethostbyname();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_result=yes
-else
- echo "$ac_t""no" 1>&6
-cf_result=no
-fi
-
-if test "$cf_result" = no; then
- echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
-echo "configure:2729: checking for gethostbyname in -lsocket" >&5
-ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2737 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cf_result=yes
-else
- echo "$ac_t""no" 1>&6
-cf_result=no
-fi
-
- if test "$cf_result" = no; then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2771: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2779 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lnsl $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
- fi
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile src/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@LIBOBJS@%$LIBOBJS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/linux-tools/japach_old/configure.in b/linux-tools/japach_old/configure.in
deleted file mode 100644
index b6230e3fce..0000000000
--- a/linux-tools/japach_old/configure.in
+++ /dev/null
@@ -1,83 +0,0 @@
-dnl Process this file with autoconf to produce a configure script
-AC_INIT(aclocal.m4)
-AM_INIT_AUTOMAKE(japach, 0.4.1)
-AC_PROG_CC
-dnl Check for headers
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(sys/types.h)
-AC_CHECK_HEADERS(sys/stat.h)
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(fcntl.h)
-AC_CHECK_HEADERS(sys/socket.h)
-AC_CHECK_HEADERS(string.h)
-AC_CHECK_HEADERS(netdb.h)
-AC_CHECK_HEADERS(time.h)
-AC_CHECK_HEADERS(stdio.h)
-AC_CHECK_HEADERS(netinet/in.h)
-AC_CHECK_HEADERS(arpa/inet.h)
-AC_CHECK_HEADERS(signal.h)
-AC_CHECK_HEADERS(errno.h)
-AC_CHECK_HEADERS(sys/wait.h)
-AC_CHECK_HEADERS(setjmp.h)
-AC_CHECK_HEADERS(pwd.h)
-
-dnl Check for typedefs, structs & compiler chars
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-
-AC_CACHE_CHECK([for big endian], ac_cv_big_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[sizeof(long) - 1]] == 0x78 && c[[sizeof(long) - 2]] == 0x56 && c[[sizeof(long) - 3]] == 0x34 && c[[sizeof(long) - 4]] == 0x12);
- }
- ], ac_cv_big_endian=yes, ac_cv_big_endian=no, ac_cv_big_endian=no)
-)
-AC_CACHE_CHECK([for little endian], ac_cv_little_endian,
- AC_TRY_RUN([
- long l;
- char *c = (char *)&l;
- int main()
- {
- l = 0x12345678L;
- return !(c[[0]] == 0x78 && c[[1]] == 0x56 && c[[2]] == 0x34 && c[[3]] == 0x12);
- }
- ], ac_cv_little_endian=yes, ac_cv_little_endian=no, ac_cv_little_endian="$ac_cv_have_emx")
-)
-
-if test "$ac_cv_big_endian" = yes; then
- AC_DEFINE(AC_BIG_ENDIAN)
-else if test "$ac_cv_little_endian" = yes; then
- AC_DEFINE(AC_LITTLE_ENDIAN)
-fi
-fi
-
-dnl Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_TYPE_SIGNAL
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_HAVE_FUNCS(fcloseall)
-dnl AC_HAVE_FUNCS(sigsetjmp siglongjmp)
-
-AC_CHECK_FUNC(gethostbyname, cf_result=yes, cf_result=no)
-if test "$cf_result" = no; then
- AC_CHECK_LIB(socket, gethostbyname, cf_result=yes, cf_result=no)
- if test "$cf_result" = no; then
- AC_CHECK_LIB(nsl, gethostbyname)
- else
- test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
- fi
-fi
-
-AC_OUTPUT(Makefile src/Makefile)
-
diff --git a/linux-tools/japach_old/install-sh b/linux-tools/japach_old/install-sh
deleted file mode 100644
index e9de23842d..0000000000
--- a/linux-tools/japach_old/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/linux-tools/japach_old/japach.conf b/linux-tools/japach_old/japach.conf
deleted file mode 100644
index 2bcd2456e2..0000000000
--- a/linux-tools/japach_old/japach.conf
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# configuration file for japach webserver
-#
-# Jirka Kosina <jikos@jikos.cz>
-#
-
-
-# TCP port to listen on
-# format:
-# port number
-port 80
-
-# Name of the server
-# format:
-# servername name_of_server
-#
-#servername www.foo.cz
-
-# Directory in filesystem which will act as root directory
-# of the webserver
-# format:
-# documentroot path
-documentroot /root/japach/www
-
-# What priviledges should forked children, who interact with user,
-# have.
-# format:
-# uid uid
-# gid gid
-# ;)
-uid 0
-gid 0
-
-# Name of the directory in user homedirs, which will be searched
-# when remote user requests http://<servername>/~username/
-# format:
-# userdir name
-userdir root
-
-# File which should be used as primary log
-# for the main server
-# format:
-# masterlog /path/to/some.file
-masterlog /root/japach/log/japach.log
-
-# Maximum count of concurently served requests.
-# In case there are more reaquests, they will wait in queue,
-# eventually timeout at client's side
-# format:
-# maxchilds number
-maxchilds 2
-
-# Content types assigned to filename exitensions. This content-tyype
-# is sent to client to give him a hint how to interpret data he is
-# receiving.
-# format:
-# type extension contenty-type
-# (note that the extension is used without dot)
-type gif image/gif
-type jpg image/jpg
-type html text/html
-type png image/png
-
-# A list of directories, in which every document served to user must be
-# located, otherwise he will get HTTP 403 Forbiddent Error.
-#
-# Note that good idea is havning at least your documentroot defined here ;)
-#
-# format:
-# cage /some/directory/
-cage /root/japach/www/
-cage /root/japach
-cage /root/japach/www/cgi-bin
-
-# A list of directories where cgi-scripts can be executed from.
-# You must also combine this with "cage" directive.
-# format:
-# cgidir /path/to/some/dir/
-cgidir /root/japach/www/cgi-bin
-
-# How to get along with symlinks
-# follow_symlinks - symlinks pointing into "cage" are processed
-# do_not_follow_symlinks - requesting symlink implies 403 Forbidden
-#
-# format:
-# synmlinks one_of_the_above
-symlinks follow_symlinks
-
-# VirtualHosts.
-#
-# format:
-# virtualhost name documentroot log
-#
-# Please note, that the cage also matters here.
-#
-virtualhost some.virtual.cz /root/japach/www virtual.log
diff --git a/linux-tools/japach_old/japach.spec b/linux-tools/japach_old/japach.spec
deleted file mode 100644
index 02bd3c81e0..0000000000
--- a/linux-tools/japach_old/japach.spec
+++ /dev/null
@@ -1,38 +0,0 @@
-Version: 0.4.8
-Summary: Simple webserver
-Name: japach
-Release: 0
-Copyright: GPL
-Group: Applications/Communication
-Source: http://www.jikos.cz/jikos/japach/%{name}-%{version}.tar.gz
-URL: http://www.jikos.cz/japach/
-Packager: Jirka Kosina <jikos@jikos.cz>
-BuildRoot: /var/tmp/%{name}-buildroot/
-
-%description
-Simple webserver
-
-%prep
-%setup
-
-%build
-./configure --prefix=/usr
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc install
-find $RPM_BUILD_ROOT/usr -type f -print | grep -v '\/(README|COPYING|INSTALL|TODO|ChangeLog|AUTHORS|FAQ)$' | \
- sed "s@^$RPM_BUILD_ROOT@@g" | sed "s/^\(.*\)$/\1\*/" > %{name}-%{version}-filelist
-find $RPM_BUILD_ROOT/etc -type f -print | \
- sed "s@^$RPM_BUILD_ROOT@@g" | sed "s/^\(.*\)$/\1\*/" >> %{name}-%{version}-filelist
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files -f %{name}-%{version}-filelist
-%defattr(-, root, root)
-
-%doc README COPYING INSTALL TODO ChangeLog FAQ AUTHORS README README.cz WHATSNEW
-
-%changelog
diff --git a/linux-tools/japach_old/missing b/linux-tools/japach_old/missing
deleted file mode 100644
index 7789652e87..0000000000
--- a/linux-tools/japach_old/missing
+++ /dev/null
@@ -1,190 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-case "$1" in
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing - GNU libit 0.0"
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
- aclocal)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`configure.in'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`configure.in'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`configure.in'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
- touch $file
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/linux-tools/japach_old/mkinstalldirs b/linux-tools/japach_old/mkinstalldirs
deleted file mode 100644
index 5b4eea8010..0000000000
--- a/linux-tools/japach_old/mkinstalldirs
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id: mkinstalldirs,v 1.1.1.1 2005/11/10 14:23:57 bottolli Exp $
-
-errstatus=0
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/linux-tools/japach_old/src/Makefile.am b/linux-tools/japach_old/src/Makefile.am
deleted file mode 100644
index ce9de6197c..0000000000
--- a/linux-tools/japach_old/src/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-
-
diff --git a/linux-tools/japach_old/src/Makefile.in b/linux-tools/japach_old/src/Makefile.in
deleted file mode 100644
index 636b236c96..0000000000
--- a/linux-tools/japach_old/src/Makefile.in
+++ /dev/null
@@ -1,308 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = @CC@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(bin_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-japach_OBJECTS = communication.o japach.o text.o log.o sys.o cgi.o
-japach_LDADD = $(LDADD)
-japach_DEPENDENCIES =
-japach_LDFLAGS =
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DEP_FILES = .deps/cgi.P .deps/communication.P .deps/japach.P \
-.deps/log.P .deps/sys.P .deps/text.P
-SOURCES = $(japach_SOURCES)
-OBJECTS = $(japach_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- done
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-japach: $(japach_OBJECTS) $(japach_DEPENDENCIES)
- @rm -f japach
- $(LINK) $(japach_LDFLAGS) $(japach_OBJECTS) $(japach_LDADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
- -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-binPROGRAMS
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-am
-all-am: Makefile $(PROGRAMS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-binPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach_old/src/cgi.c b/linux-tools/japach_old/src/cgi.c
deleted file mode 100644
index 9253c944e4..0000000000
--- a/linux-tools/japach_old/src/cgi.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-/* resembling is_in_cage() */
-
-int is_in_cgi_path(char *filename)
-{
- struct cgidirs *pom;
- char *pom1;
- int found = 0;
-
- pom = conf.cgi_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(filename, pom->next->name) == filename)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
-
-/* first test if given reaquest is going to be a CGI script.
- * if not, return CGI_NOCGI.
- * Otherwise if it really can be run returns CGI_OK, in other
- * cases CGI_ERR
- * Huh, why is this comment longer than the body of the function? ;)
- */
-
-int if_cgi_then_ok(char *filename)
-{
- if (!(is_in_cgi_path(filename)))
- return CGI_NOCGI;
- if (access(filename, X_OK) == -1)
- return CGI_ERR;
- else
- return CGI_OK;
-}
-
-char *cgi_add_env_var(char *name, char *value)
-{
- int len;
- char *result;
-
- len = strlen(name) + 2;
- if (value) { /* if quesry string was empty, we will have nice segfault probably */
- len += strlen(value);
- }
- result = (char *) malloc(sizeof(char) * len);
- sprintf(result, "%s=%s", name, value ? value : "");
- return result;
-
-}
-
-char **cgi_get_environment()
-{
- char **p1, **p2;
-
- p1 = p2 = (char **) malloc(sizeof(char *) * MAX_ENVIRON_VARS);
-
- *p1++ = cgi_add_env_var("SERVER_NAME", client.requested_host);
- *p1++ = cgi_add_env_var("SERVER_SOFTWARE", FULL_SERVER_SOFTWARE_NAME);
- *p1++ = cgi_add_env_var("SERVER_PROTOCOL", client.http_version);
- *p1++ = cgi_add_env_var("REMOTE_ADDR", client.host_name);
- *p1++ = cgi_add_env_var("REQUEST_METHOD", client.method); /* GET */
- *p1++ = cgi_add_env_var("SCRIPT_NAME", client.req_url);
- *p1++ = cgi_add_env_var("SCRIPT_FILENAME", client.getfile);
- *p1++ = cgi_add_env_var("QUERY_STRING", client.cgi_get_query_string);
- *p1++ = 0;
-
- return p2;
-}
diff --git a/linux-tools/japach_old/src/communication.c b/linux-tools/japach_old/src/communication.c
deleted file mode 100644
index a8b0a7d147..0000000000
--- a/linux-tools/japach_old/src/communication.c
+++ /dev/null
@@ -1,678 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
-char old_document_root[MAXLINE];
-FILE *old_logfile;
-
- /*
- * tries to write all nbytes chars in loop (of *ptr)
- */
-int writen(int fd, char *ptr, int nbytes)
-{
- int nleft, nwritten;
-
- nleft = nbytes;
- while (nleft > 0) {
- nwritten = write(fd, ptr, nleft);
- if (nwritten <= 0)
- return (nwritten);
-
- nleft -= nwritten;
- ptr += nwritten;
- }
- return (nbytes - nleft);
-}
-
- /*
- * readss line of maximum length maxlen
- */
-int readline(int fd, char *ptr, int maxlen)
-{
- int n, rc;
- char c;
-
- for (n = 1; n < maxlen; n++) {
- if ((rc = read(fd, &c, 1)) == 1) {
- *ptr++ = c;
- if (c == '\n')
- break;
- } else if (rc == 0) {
- if (n == 1)
- return (0); /* EOF, no data read */
- else
- break; /* EOF, some data read */
- } else
- return (-1); /* error */
- }
- *ptr = 0;
- return (n);
-}
-
- /*
- * writes a line and doesn't care for result
- */
-
-writestring(int fd, char *s1)
-{
- int n;
- n = writen(fd, s1, strlen(s1));
- return (n);
-}
-
- /*
- * writes default headers (FIXME: cgi scripts should
- * write it's own content-type kludge)
- */
-
-int writedefaulthdr(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2;
- int i;
- struct stat buf;
-
- if (!strlen(client.http_version))
- return;
- fstat(client.getfile_desc, &buf);
- strcpy(tmp1, "Date: ");
- get_rfc822_date(tmp);
- strncat(tmp, "\r\n", MAXLINE - strlen(tmp));
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
-
- writestring(fd, tmp1);
- writestring(fd, "Server: JAPACH/");
- writestring(fd, VERSION);
- writestring(fd, "\r\n");
-
- if (client.reply != 304) { /* a file will be output */
- writestring(fd, "Accept-Ranges: bytes\r\n");
- writestring(fd, "Connection: close\r\n");
- }
-
- if (client.cgi_state == CGI_OK)
- return 0;
-
- if ((!strip_extension(client.getfile))
- || (client.reply == 404)
- || (client.reply == 400)
- || (client.reply == 417)
- || (client.reply == 403)
- || (client.reply == 301)
- || (client.reply == 501)) { /* no file is going to output */
- strcpy(tmp1, "Last-Modified: ");
- strncat(tmp1, tmp, MAXLINE - strlen(tmp1));
- writestring(fd, tmp1);
-
- if (!strip_extension(client.getfile))
- writestring(fd, "Content-Type: text/plain\r\n\r\n");
- else
- writestring(fd, "Content-Type: text/html\r\n\r\n");
- }
-
- else if (client.reply != 304) {
- int i;
-
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- strcpy(tmp, "Last-Modified: ");
- strncat(tmp, tmp2, MAXLINE - strlen(tmp) - 2);
- strcat(tmp, "\r\n");
-
- free(tmp2);
- writestring(fd, tmp);
- /* going to find content-type according to extension, and output
- * apropriate content-type
- */
- strcpy(tmp, strip_extension(client.getfile));
- tmp2 = find_content_type(tmp);
- strcpy(tmp1, "Content-Type: ");
- strncat(tmp1, tmp2, MAXLINE - strlen(tmp1) - 3);
- /* strcat(tmp1, "\r\n\n"); */
-
- writestring(fd, tmp1);
- }
-
-}
-
- /*
- * generates http reply to socked, sets client.reply properly, opens
- * local file (assigns descriptor)
- * - cgi started 17/02/2002
- */
-
-int genreply(int fd)
-{
- char tmp[MAXLINE], tmp1[MAXLINE], *tmp2, *found_s;
- char link_getfile[MAXLINE];
- char text[MAXLINE];
- char username[MAXLINE], tosubst[MAXLINE], userpath[MAXLINE];
- int i;
- int found = 0;
- struct stat buf;
- struct stat lbuf;
- struct virtuals *pom;
- struct passwd *psw;
-
- if (!strcasecmp(client.method, "GET")) { /* GET-specific actions */
- /* remove part following ?
- * TODO: RFC?
- */
- if (client.cgi_get_query_string = strchr(client.req_url, '?')) {
- client.cgi_get_query_string[0] = '\0';
- client.cgi_get_query_string++;
- }
-
- } else if (!strcasecmp(client.method, "HEAD")) {
- } else {
- /* unknown method */
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 501 Method Not Implemented\r\n");
- writestring(fd, "Allow: GET\r\n");
- }
- logrequest(log.logfile, 501, strlen(HTTP_ERR_501));
- writedefaulthdr(fd);
- return;
- }
- if (strlen(client.expect)) {
- client.reply = 417;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 417 Expectation failed\r\n");
- writedefaulthdr(fd);
- return;
- }
- if (client.req_url[0] != '/') {
- client.reply = 400;
- if (strlen(client.http_version))
- writestring(fd, "HTTP/1.1 400 Bad Request\r\n");
- writedefaulthdr(fd);
- return;
- }
-
- client.reply = -1;
-
- if ((!strcasecmp(client.http_version, "HTTP/1.1"))
- || (!strcasecmp(client.http_version, "HTTP/1.0"))) {
-
- /* save default settings, after serving a request set old values.
- * no use now, but in the future this may be rewritten to be able
- * to serve more than one request during one connection.
- * so this is neccessary to have the right defaults for the next
- * request
- */
- strcpy(old_document_root, conf.document_root);
- old_logfile = log.logfile;
-
- /* find in conf->virtual_hosts name of virtual server, copy to
- * document_root proper conf->virtual_hosts->documentroot
- */
- pom = conf.virtual_hosts->next;
- while (pom && !found) {
- if (!strcasecmp(client.requested_host, pom->name)) {
- found = 1;
- strncpy(conf.document_root, pom->documentroot, MAXLINE);
- log.logfile = pom->logfile;
- } else
- pom = pom->next;
- }
- }
- /* all changing of URL (filename, respectively) is done here
- * decoding of special %ab characters, ~ expansion, ...
- */
-
- tmp2 = decode_hexa_octets(client.req_url);
- strcpy(client.req_url, tmp2);
- free(tmp2);
-
- if (client.req_url[1] == '~') {
- i = 2;
- while ((i < strlen(client.req_url)) && (client.req_url[i] != '/')) {
- username[i - 2] = client.req_url[i];
- username[i - 1] = '\0';
- i++;
- }
- found = i;
- while (i < strlen(client.req_url)) {
- tosubst[i - found] = client.req_url[i];
- tosubst[i - found + 1] = '\0';
- i++;
- }
- if (psw = getpwnam(username)) {
- strcpy(conf.document_root, psw->pw_dir);
- strcat(conf.document_root, "/");
- strncat(conf.document_root, conf.userdir, MAXLINE);
- if (client.req_url[i] == '/')
- strcat(conf.document_root, "/");
- }
- }
- strcpy(client.getfile, conf.document_root);
-
- if (client.req_url[1] != '~')
- strncat(client.getfile, client.req_url, MAXLINE);
-
- else
- strncat(client.getfile, tosubst, MAXLINE);
- tmp2 = deldupl('/', client.getfile);
- strcpy(client.getfile, tmp2);
-
-
- if (is_in_cage(client.getfile)) {
- client.getfile_desc = open(client.getfile, O_RDONLY);
- if (client.getfile_desc > 0) {
- fstat(client.getfile_desc, &buf);
- if (S_ISDIR(buf.st_mode)) {
- if (client.getfile[strlen(client.getfile) - 1] != '/')
- client.reply = 301;
- else {
- if (strlen(client.getfile) < MAXLINE - 12) {
- strncat(client.getfile, "/index.html",
- MAXLINE - strlen(client.getfile));
- close(client.getfile_desc);
- client.getfile_desc =
- open(client.getfile, O_RDONLY);
- } else
- client.reply = 404;
- }
- }
- lstat(client.getfile, &lbuf);
-
- /* let's do some symlink handling */
-
- if ((S_ISLNK(lbuf.st_mode)))
- getlink(client.getfile, link_getfile);
- if ((S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == DO_NOT_FOLLOW_SYMLINKS))
- || (S_ISLNK(lbuf.st_mode)
- && (conf.follow_symlinks == FOLLOW_SYMLINKS_INTO_CAGE)
- && (!is_in_cage(link_getfile)))) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc > 0) && (client.reply != 301)
- && (client.reply != 403) && (client.reply != 404)) {
- if (is_in_cage(client.getfile)) {
- if (strlen(client.if_mod_since)) { /* if-modified-since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates(tmp2, client.if_mod_since)
- == -1)
- client.reply = 304;
- free(tmp2);
- }
- if (strlen(client.if_unmod_since)) { /* If-Unmodified-Since */
- tmp2 = (char *) malloc(MAXLINE * sizeof(char));
- convert_to_rfc822_date(buf.st_mtime, tmp2);
- if (compare_rfc822_dates
- (tmp2, client.if_unmod_since) == 1)
- client.reply = 412;
- free(tmp2);
- }
- if ((client.reply != 304) && (client.reply != 412)) {
- /* the file is ok, now we need to check if it has to (and could)
- * be run (CGI). If so, then 200, otherwise 403 */
- client.cgi_state = if_cgi_then_ok(client.getfile);
- if ((client.cgi_state == CGI_NOCGI)
- || (client.cgi_state == CGI_OK)) {
- client.reply = 200;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 200 OK\r\n");
- writedefaulthdr(fd);
- }
-
- logrequest(log.logfile, 200, buf.st_size);
- } else { // cgi_err
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd,
- "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, buf.st_size);
- }
- } else {
- if (client.reply == 304) {
- writestring(fd,
- "HTTP/1.1 304 Not Modified\r\n");
- logrequest(log.logfile, 304, 0);
- writedefaulthdr(fd);
- } else if (client.reply == 412) {
- writestring(fd,
- "HTTP/1.1 412 Precondition Failed\r\n");
- logrequest(log.logfile, 412, 0);
- writedefaulthdr(fd);
-
- }
- }
- } else {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- }
- }
- } else { /* cage-membership test failed */
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
- if (client.reply == 301) {
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 301 Moved Permanently\r\n");
- writestring(fd, "Location: ");
-
- strcpy(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/\r\n");
-
- writestring(fd, text);
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 301,
- strlen(HTTP_ERR_301_P1) + strlen(HTTP_ERR_301_P2) + 2 * strlen(text) +
- 14);
-
- }
- if (((client.getfile_desc < 0)) && ((errno != EACCES) || (client.reply == 404))) { /* we can have 404 from earlier */
- client.reply = 404;
- if (client.getfile > 0)
- close(client.getfile_desc);
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 404 Not Found\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 404, strlen(HTTP_ERR_403));
- }
- if ((client.getfile_desc < 0) && (errno == EACCES)) {
- client.reply = 403;
- if (strlen(client.http_version)) {
- writestring(fd, "HTTP/1.1 403 Forbidden\r\n");
- writedefaulthdr(fd);
- }
- logrequest(log.logfile, 403, strlen(HTTP_ERR_403));
- }
-}
-
- /*
- * read headers and process content of client-provided data
- * TODO: some macros would do a good job in following
- * boring & nasty code
- */
-
-int read_headers(int sockfd)
-{
- int n, i;
- char line[MAXLINE];
- int numlines = 0;
-
- numlines++;
- n = readline(sockfd, line, MAXLINE);
- line[strlen(line) - 2] = '\0';
-
- if (numlines == 1)
- strcpy(client.first_line, line);
-
- /* parse method */
- i = 0;
- while ((i < strlen(line)) && (line[i] != ' ')) {
- client.method[i] = line[i];
- i++;
- }
- client.method[i] = '\0';
-
- /* URL */
- i = strlen(client.method) + 1;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.req_url[i - (strlen(client.method) + 1)] = line[i];
- i++;
- }
-
- client.req_url[(i - strlen(client.method)) - 1] = '\0';
- /* HTTP protocl version */
- while (line[i] == ' ')
- i++;
- n = i;
- while ((line[i] != ' ') && (i <= strlen(line))) {
- client.http_version[i - n] = line[i];
- i++;
- }
- client.http_version[i - (n - 1)] = '\0';
-
- /* if the request is in old HTTP version, don't wait for
- * more headers & clear client.http_version
- */
- if ((!strlen(client.http_version))) {
- strcpy(line, "");
- strcpy(client.http_version, "");
- }
-
- /* more and more headers */
- strcpy(client.browser, "");
- strcpy(client.requested_host, conf.server_name);
- strcpy(client.if_mod_since, "");
-
- while ((strlen(line) != 0) && (n != 0)) {
- n = readline(sockfd, line, MAXLINE); /* wait for and empty line */
- line[strlen(line) - 2] = '\0';
- if (strncasecmp(line, "User-agent", 10) == 0) {
- int i = 12;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.browser, line + i, MAXLINE);
- }
- if (strncasecmp(line, "host:", 5) == 0) {
- int i = 6;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.requested_host, line + i, MAXLINE);
- i = 0;
-
- while (isalnum(client.requested_host[i]) || client.requested_host[i] == '.' ||
- client.requested_host[i] == '-')
- i++;
- if (i)
- client.requested_host[i] = '\0';
- }
- if (strncasecmp(line, "If-Modified-since:", 18) == 0) {
- int i = 19;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_mod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "If-Unmodified-since:", 20) == 0) {
- int i = 21;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.if_unmod_since, line + i, MAXLINE);
- }
- if (strncasecmp(line, "Expect:", 7) == 0) {
- int i = 8;
- while ((isspace(line[i])) && (i <= strlen(line)))
- i++;
- strncpy(client.expect, line + i, MAXLINE);
- }
- }
- if (n == 0) {
- /* no problem here - no need to flush anything, and the OS
- * will do what is needed not to leak descriptors
- */
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- return (0);
-}
-
- /* routine called from freshly forked child from main
- * program loop in japach.c
- */
-int process_request(int sockfd)
-{
- char text[MAXLINE];
- void *data;
-
- for (;;) {
-
- read_headers(sockfd);
-
- /* here client.reply is to be generated, which is
- * then tested
- * also some url-rewrites are done, and local file
- * descriptor is assigned
- */
-
- genreply(sockfd);
- if (client.cgi_state != CGI_OK)
- writestring(sockfd, "\r\n\n");
- if (!strcasecmp(client.method, "HEAD"))
- return;
- switch (client.reply) {
- case 200:{ // ok
- int i;
- signal(SIGCHLD, SIG_IGN);
- if (client.cgi_state == CGI_OK) {
- int cgi_pipe[2], bytes;
- char line[MAXLINE];
- pid_t pid;
- char **tmp;
-
- pipe(cgi_pipe);
- pid = vfork();
-
- if (pid == 0) {
- close(cgi_pipe[0]);
- dup2(cgi_pipe[1], 1); /* 1 = stdout */
- tmp = cgi_get_environment();
- execve(client.getfile, NULL, cgi_get_environment());
- } else {
- close(cgi_pipe[1]);
- write(sockfd, "BLABLE\n",7);
- while ((bytes =
- read(cgi_pipe[0], line, MAXLINE)) > 0) {
- if (bytes) write(sockfd, line, bytes);
- memset(line, '\0', sizeof(line));
- }
- close(cgi_pipe[0]);
- waitpid(pid, NULL, 0);
- }
- } else {
- data = (char *) malloc((sizeof(char)) * MAXLINE + 1);
- i = MAXLINE;
- while (i == MAXLINE)
- if ((i =
- read(client.getfile_desc, data,
- MAXLINE)) == MAXLINE)
- writen(sockfd, data, i); /* rewrite file to network */
- if (i > 0)
- writen(sockfd, data, i); /* negative i meands error from read() */
- close(client.getfile_desc);
- free(data);
- }
- /* put back original values (may have been changed
- * by virtualhost)
- */
- strcpy(conf.document_root, old_document_root);
- log.logfile = old_logfile;
-
- /* here is the point, where one than more requests during one connection
- * is to be handled. maybe recursive call of process_request() is not
- * the best idea, but should work ;)
-
- process_request(sockfd);
- */
-
- return;
- }
- case 301:{ /* moved permanently */
- strcpy(text, HTTP_ERR_301_P1);
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "\">");
- strcat(text, "http://");
- strncat(text, client.requested_host, MAXLINE - strlen(text));
- strncat(text, client.req_url, MAXLINE - strlen(text));
- strcat(text, "/");
- strcat(text, "</a>\r\n");
- strncat(text, HTTP_ERR_301_P2, MAXLINE - strlen(text));
- writestring(sockfd, text);
- return;
- }
- case 304:{ /* not modified */
- writestring(sockfd, "");
- return;
- }
- case 400:{ /* bad request */
- strcpy(text, HTTP_ERR_400);
- writestring(sockfd, text);
- return;
- }
- case 404:{ /* not found */
- strcpy(text, HTTP_ERR_404);
- writestring(sockfd, text);
- return;
- }
- case 403:{ /* forbidden */
- strcpy(text, HTTP_ERR_403);
- writestring(sockfd, text);
- return;
- }
- case 412:{ /* precondition failed */
- strcpy(text, HTTP_ERR_412);
- writestring(sockfd, text);
- return;
- }
- case 417:{ /* expectation failed */
- writestring(sockfd, "");
- return;
- }
- case 501:{ /* method not implemented */
- strcpy(text, HTTP_ERR_501);
- writestring(sockfd, text);
- return;
- }
- }
- }
-}
-
- /* test if a file is located "in the cage".
- * cage is a struct read from conf file and
- * stored in conf.cage_dirs linked list
- */
-
-int is_in_cage(char *s)
-{
- struct cage *pom;
- char *pom1;
- int found = 0;
-
- pom1 = (char *) malloc(sizeof(char) * MAXLINE);
- delddot(s, pom1);
- s = pom1;
- pom = conf.cage_dirs;
- while ((!found) && (pom->next)) {
- if (strstr(s, pom->next->name) == s)
- return (1);
- else
- pom = pom->next;
- }
- return (0);
-}
diff --git a/linux-tools/japach_old/src/cpuinfos b/linux-tools/japach_old/src/cpuinfos
deleted file mode 100644
index 5f63d0d09c..0000000000
--- a/linux-tools/japach_old/src/cpuinfos
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Cpu Info result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Cpu Info result</H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-/bin/cat /proc/cpuinfo
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/japach_old/src/favicon.ico b/linux-tools/japach_old/src/favicon.ico
deleted file mode 100644
index 558decc082..0000000000
--- a/linux-tools/japach_old/src/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/linux-tools/japach_old/src/ifconfig b/linux-tools/japach_old/src/ifconfig
deleted file mode 100644
index 8952b1d218..0000000000
--- a/linux-tools/japach_old/src/ifconfig
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-echo "`rm /root/japach/www/test`"
-
-echo "`ifconfig -a`" >> /root/japach/www/test
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Ifconfig -a result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Ifconfig -a result</H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-/bin/cat /root/japach/www/test
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/japach_old/src/index.html b/linux-tools/japach_old/src/index.html
deleted file mode 100644
index 9254c6b724..0000000000
--- a/linux-tools/japach_old/src/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html lang="en">
-<head>
-<title>Spidcom board config</title>
-<meta http-equiv="Content-Type" content="text/html">
-</head>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<h1 align="center"><IMG ALIGN=MIDDLE SRC="spidlogo.jpg"></h1>
-<HR SIZE=5>
-<A HREF="/cgi-bin/ifconfig">[[[ Ethernet configuration ]]]</A>
-<br>
-<br>
-<A HREF="/cgi-bin/cpuinfos">[[[ cpu info ]]] </A>
-<br>
-<br>
-<A HREF="/cgi-bin/meminfos">[[[ memory info ]]] </A>
-<br>
-<br>
-</body></html>
-
diff --git a/linux-tools/japach_old/src/japach.c b/linux-tools/japach_old/src/japach.c
deleted file mode 100644
index ae7eeb190c..0000000000
--- a/linux-tools/japach_old/src/japach.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
-int childs = 0; /* count of forked children */
-int first_cycle = 1;
-
-sig_atomic_t terminate, reload;
-
-void flush_virtual_logs()
-{
- struct virtuals *p;
-
- p = conf.virtual_hosts;
- while (p){
- fflush(p->logfile);
- p = p->next;
- }
-}
-
- /* TODO: some macros would be nice here */
-void free_mem()
-{
- /* -- struct conf -- */
- struct c_types *p1, *p11;
- struct cage *p2, *p22;
- struct virtuals *p3, *p33;
- struct cgidirs *p4, *p44;
- p1 = conf.content_types;
- p11 = p1->next;
-
- p2 = conf.cage_dirs;
- p22 = p2->next;
-
- p3 = conf.virtual_hosts;
- p33 = p3->next;
-
- p4 = conf.cgi_dirs;
- p44 = p4->next;
-
- while (p1) {
- p11 = p1->next;
- free(p1);
- p1 = p11;
- }
-
- while (p2) {
- p22 = p2->next;
- free(p2);
- p2 = p22;
- }
-
- while (p3) {
- p33 = p3->next;
- free(p3);
- p3 = p33;
- }
-
- while (p4) {
- p44 = p4->next;
- free(p4);
- p4 = p44; /* no need to close file */
- }
-
-}
-
-void f_SIGCHLD()
-{
- union wait wstatus;
- pid_t exit_pid;
-
- while ((exit_pid = wait3(&wstatus, WNOHANG, NULL)) > 0) {
- if (exit_pid != -1)
-/* fprintf(stderr,"Child with pid %d exited, reducing to %d\n",
- exit_pid, childs - 1);*/
- childs--;
- }
-}
-
-void f_SIGTERM()
-{
- logwrite(log.logfile, "caught SIGTERM\n");
- terminate = 1;
-}
-
-void f_SIGINT()
-{
- logwrite(log.logfile, "caught SIGINT\n");
- terminate = 1;
-}
-
-void f_SIGHUP()
-{
- logwrite(log.logfile, "caught SIGHUP, resetting\n");
- reload = 1;
-}
-
-main(int argc, char *argv[])
-{
- int sockfd, newsockfd, clilen, childpid;
- struct sockaddr_in cli_addr, serv_addr;
- struct hostent *hostentry;
- FILE *conf_file;
- struct sigaction *s1, *s2;
- int i, opt = 1;
- pid_t pidstart;
- struct cage *pom;
-
-
- /* config */
- strcpy(conf_file_name, "japach.conf");
- for (i = 1; i < argc; i++) {
- if ((!strcmp(argv[i], "-c")) && (i < argc - 1)) {
- strcpy(conf_file_name, argv[i + 1]);
- }
- }
-
- /* start daemon
- */
- if ((pidstart = vfork()) < 0) {
- fprintf(stderr, "master fork error.\n");
- return (-1);
- } else if (pidstart > 0) {
- printf("master fork ok, child daemon (pid %d) created\n",
- pidstart);
- return (0);
- }
-
- terminate = 0;
- while (!terminate) {
-
- conf_file = fopen(conf_file_name, "r");
- if (!conf_file) {
- fprintf(stderr, "conf file not found\n");
- return (-1);
- }
- if (!first_cycle) {
- free_mem();
- first_cycle = 0;
- }
- parse_config(conf_file);
- fclose(conf_file);
-
-
- if (!(log.logfile = fopen(conf.master_log, "a"))) {
- fprintf(stderr, "can't open %s\n",
- conf.master_log);
- free_mem();
- exit(0);
- }
- logwrite(log.logfile, "Server starting\n");
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = f_SIGHUP;
- sigaction(SIGHUP, s1, s2);
- s1->sa_handler = f_SIGTERM;
- sigaction(SIGTERM, s1, s2);
- s1->sa_handler = f_SIGINT;
- sigaction(SIGINT, s1, s2);
- s1->sa_handler = f_SIGCHLD;
- s1->sa_flags = SA_RESTART;
- sigaction(SIGCHLD, s1, s2);
- free(s1);
- free(s2);
-
- /* socket ops */
- if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- logwrite(log.logfile,
- "can't open stream socket.\n");
- f_SIGTERM();
- }
-
- if (setsockopt
- (sockfd, SOL_SOCKET, SO_REUSEADDR, &opt,
- sizeof(opt)) != 0) {
- fprintf(stderr, "error setting socket options.\n");
- logwrite(log.logfile,
- "error setting socket options.\n");
- f_SIGTERM();
- }
- bzero((char *) &serv_addr, sizeof(serv_addr));
- serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- serv_addr.sin_port = htons(conf.serv_tcp_port);
-
- if (bind
- (sockfd, (struct sockaddr *) &serv_addr,
- sizeof(serv_addr)) < 0) {
- fprintf(stderr, "error binding address.\n");
- logwrite(log.logfile, "error binding address.\n");
- close(sockfd);
- f_SIGTERM();
- }
-
- if (listen(sockfd, 5) != 0) {
- fprintf(stderr, "error calling listen()\n");
- logwrite(log.logfile, "error calling listen()\n");
- }
-
-
- reload = 0;
- while (!terminate && !reload) {
- while (childs >= conf.max_childs)
- pause(); /* wait until signal occurs.
- * we are waiting for SIGCHLD to decrement
- * childs variable
- */
-
- clilen = sizeof(cli_addr);
- if (!
- (newsockfd =
- accept(sockfd, (struct sockaddr *) &cli_addr,
- &clilen))) {
- fprintf(stderr, "accept error\n");
- exit(0);
- }
-
- if ((terminate) || (reload))
- continue;
-
- /* reverse resolving */
- if (NULL !=
- (hostentry =
- gethostbyaddr((char *) &cli_addr.sin_addr,
- sizeof(cli_addr.sin_addr),
- AF_INET)))
- client.host_name = hostentry->h_name;
- else
- client.host_name =
- inet_ntoa(cli_addr.sin_addr);
- client.ip_address = inet_ntoa(cli_addr.sin_addr);
-
- /* k* child, which will serve the request */
- if ((childpid = vfork()) < 0)
- printf("server: fork error\n");
- else if (childpid == 0) {
- struct sigaction *s1, *s2;
-
- setgid(conf.gid);
- setuid(conf.uid);
- close(sockfd);
-
- s1 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s2 = (struct sigaction *) malloc(sizeof(struct sigaction));
- s1->sa_handler = SIG_IGN;
- sigaction(SIGHUP, s1, s2);
- free(s1);
- free(s2);
- process_request(newsockfd); /* GO! */
- /*fprintf(stderr,"Processing (%d) done, exiting...\n",getpid());*/
- close(newsockfd);
- exit(0);
- } else if (childpid > 0){
- childs++; /* increment count of forked childs in parent process */
- /*fprintf(stderr, "New child with pid %d created, incrementing to %d\n",
- childpid, childs);*/
- }
- close(newsockfd);
- }
- close(sockfd);
- fclose(log.logfile);
- } /* end of main loop */
- logwrite(log.logfile, "END\n");
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#else
- fflush(log.logfile);
- flush_virtual_logs();
-#endif
- free_mem();
- free(s1);
- exit(0);
-}
diff --git a/linux-tools/japach_old/src/japach.conf b/linux-tools/japach_old/src/japach.conf
deleted file mode 100644
index 2bcd2456e2..0000000000
--- a/linux-tools/japach_old/src/japach.conf
+++ /dev/null
@@ -1,96 +0,0 @@
-#
-# configuration file for japach webserver
-#
-# Jirka Kosina <jikos@jikos.cz>
-#
-
-
-# TCP port to listen on
-# format:
-# port number
-port 80
-
-# Name of the server
-# format:
-# servername name_of_server
-#
-#servername www.foo.cz
-
-# Directory in filesystem which will act as root directory
-# of the webserver
-# format:
-# documentroot path
-documentroot /root/japach/www
-
-# What priviledges should forked children, who interact with user,
-# have.
-# format:
-# uid uid
-# gid gid
-# ;)
-uid 0
-gid 0
-
-# Name of the directory in user homedirs, which will be searched
-# when remote user requests http://<servername>/~username/
-# format:
-# userdir name
-userdir root
-
-# File which should be used as primary log
-# for the main server
-# format:
-# masterlog /path/to/some.file
-masterlog /root/japach/log/japach.log
-
-# Maximum count of concurently served requests.
-# In case there are more reaquests, they will wait in queue,
-# eventually timeout at client's side
-# format:
-# maxchilds number
-maxchilds 2
-
-# Content types assigned to filename exitensions. This content-tyype
-# is sent to client to give him a hint how to interpret data he is
-# receiving.
-# format:
-# type extension contenty-type
-# (note that the extension is used without dot)
-type gif image/gif
-type jpg image/jpg
-type html text/html
-type png image/png
-
-# A list of directories, in which every document served to user must be
-# located, otherwise he will get HTTP 403 Forbiddent Error.
-#
-# Note that good idea is havning at least your documentroot defined here ;)
-#
-# format:
-# cage /some/directory/
-cage /root/japach/www/
-cage /root/japach
-cage /root/japach/www/cgi-bin
-
-# A list of directories where cgi-scripts can be executed from.
-# You must also combine this with "cage" directive.
-# format:
-# cgidir /path/to/some/dir/
-cgidir /root/japach/www/cgi-bin
-
-# How to get along with symlinks
-# follow_symlinks - symlinks pointing into "cage" are processed
-# do_not_follow_symlinks - requesting symlink implies 403 Forbidden
-#
-# format:
-# synmlinks one_of_the_above
-symlinks follow_symlinks
-
-# VirtualHosts.
-#
-# format:
-# virtualhost name documentroot log
-#
-# Please note, that the cage also matters here.
-#
-virtualhost some.virtual.cz /root/japach/www virtual.log
diff --git a/linux-tools/japach_old/src/japach.h b/linux-tools/japach_old/src/japach.h
deleted file mode 100644
index e9a22dda82..0000000000
--- a/linux-tools/japach_old/src/japach.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <netdb.h>
-#include <time.h>
-#include <stdio.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#include <pwd.h>
-
-
-
-#define VERSION "0.4.8"
-#define FULL_SERVER_SOFTWARE_NAME "japach/"VERSION
-
- /* definice max. velikosti promennych */
-#define MAXSEG 2048
-#define MAXLINE 2048
-#define MAX_ENVIRON_VARS 30
-
- /* definice chybovych hlasek */
-#define HTTP_ERR_301_P1 "\n\n<html><body>301 - Moved Permanently to <a href=\""
-#define HTTP_ERR_301_P2 "</body></html>\n\n"
-
-#define HTTP_ERR_400 "\n\n<html><body>400 - Bad request</body></html>\n\n"
-#define HTTP_ERR_404 "\n\n<html><body>404 - Not found. Sorry</body></html>\n\n"
-#define HTTP_ERR_403 "\n\n<html><body>403 - This file/path is forbidden.</body></html>\n\n"
-#define HTTP_ERR_412 "\n\n<html><body>412 - Precondition failed.</body></html>\n\n"
-
-#define HTTP_ERR_501 "\n\n<html><body>501 - Method Not Implemented.</body></html>\n\n"
-
- /* definice konstant */
-#define DO_NOT_FOLLOW_SYMLINKS 0
-#define FOLLOW_SYMLINKS_INTO_CAGE 1
-#define FOLLOW_SYMLINKS 2
-
-#define CGI_OK 1 // jedna se o cgi skript, a je ok
-#define CGI_ERR 0 // jedna se o cgi skript, a neni ok
-#define CGI_NOCGI 2 // nejedna se o cgi skript
-
- /* globalni promenne */
-char conf_file_name[MAXLINE];
-
- /* struktura pro udrzovani content-typu */
-struct c_types {
- char extension[MAXLINE];
- char content_type[MAXLINE];
- struct c_types *next;
-};
-
- /* struktura pro udrzovani omezujicih adresaru */
-struct cage {
- char name[MAXLINE];
- struct cage *next;
-};
-
- /* struktura pro udrzovani adresaru, ve kterych je mozne spoustet CGI skripty */
-struct cgidirs {
- char name[MAXLINE];
- struct cgidirs *next;
-};
-
-struct virtuals {
- char name[MAXLINE];
- char documentroot[MAXLINE];
- char log[MAXLINE];
- FILE *logfile;
- struct virtuals *next;
-};
-
- /* konfiguracni struktura */
-struct {
- char document_root[MAXLINE];
- char master_log[MAXLINE];
- char server_name[MAXLINE];
- char userdir[MAXLINE];
- unsigned int serv_tcp_port;
- unsigned int uid;
- unsigned int gid;
- unsigned int max_childs;
- unsigned int follow_symlinks;
- struct c_types *content_types;
- struct cage *cage_dirs;
- struct cgidirs *cgi_dirs;
- struct virtuals *virtual_hosts;
-} conf;
-
- /* infomace o aktualnim klientovi */
-struct {
- char *ip_address;
- char *host_name;
- char first_line[MAXLINE];
-
- char browser[MAXLINE];
- char req_url[MAXLINE];
- char *cgi_get_query_string; /* v pripade cgi metodou GET prislusny query string */
- char http_version[MAXLINE];
- char method[MAXLINE];
- char requested_host[MAXLINE];
- char if_mod_since[MAXLINE];
- char if_unmod_since[MAXLINE];
- char expect[MAXLINE];
-
- int reply; /* odpoved ktera se mu bude generovat */
- char getfile[MAXLINE]; /* realna cesta k predavanemu souboru */
- int getfile_desc; /* deskriptor pro cteny soubor */
-
- unsigned int cgi_state; /* jak je na tom tento pozadavek s CGI */
-} client;
-
- /* logovani */
-struct {
- FILE *logfile;
- char message[MAXLINE];
-} log;
-
- /* -----------------deklarace funkci---------------------- */
- /* text.c */
-void convert_to_rfc822_date(time_t curtime, char *buffer);
-void get_rfc822_date(char *buffer);
-char *strip_extension(char *buffer);
-void prase_config(FILE * f);
-int empty_string(char *s);
-char *find_content_type(char *ext);
-char *subst(char *a, char *b, char *c);
-char *deldupl(char a, char *b);
-char *decode_hexa_octets(char *s1);
-int delddot(char *s, char *s2);
-int get_number_of_month(char *tmp2);
-int compare_rfc822_dates(char *date1, char *date2);
-
- /* communication.c */
-int writen(int fd, char *ptr, int nbytes);
-int readline(int fd, char *ptr, int maxlen);
-int writestring(int fd, char *s1);
-int genreply(int fd);
-int read_headers(int sockfd);
-int process_request(int sockfd);
-int is_in_cage(char *s);
-
- /* cgi.c */
-int logrequest(FILE * lf, int reply, int bytes);
-int logwrite(FILE * lf, const char *s);
-
- /* sys.c */
-void getlink(char *path, char *result);
-
- /* cgi.c */
-int if_cgi_then_ok(char *fname);
-char **cgi_get_environment();
-
diff --git a/linux-tools/japach_old/src/log.c b/linux-tools/japach_old/src/log.c
deleted file mode 100644
index 49a9970ef8..0000000000
--- a/linux-tools/japach_old/src/log.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* logging of reply, count of bytes, etc. to specified logfile */
-int logrequest(FILE * lf, int reply, int bytes)
-{
- char buffer[MAXLINE];
- char buffer2[MAXLINE];
- char s_reply[MAXLINE], s_bytes[MAXLINE];
- time_t curtime;
- struct tm *loctime;
-
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%b/%Y:%H:%M:%S", loctime);
-
- strcpy(buffer2, "");
- strncpy(buffer2, client.host_name, MAXLINE - strlen(buffer2)); /* hostname */
- strncat(buffer2, " - - [", MAXLINE - strlen(buffer2)); /* login & rfc931 */
- strncat(buffer2, buffer, MAXLINE - strlen(buffer2));
- strcat(buffer2, "] \""); /* date */
- strncat(buffer2, client.first_line, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\""); /* request */
- sprintf(s_reply, "%d", reply);
- sprintf(s_bytes, "%d", bytes);
- strcat(buffer2, " ");
- strncat(buffer2, s_reply, MAXLINE - strlen(buffer2));
- strcat(buffer2, " ");
- strncat(buffer2, s_bytes, MAXLINE - strlen(buffer2));
- strcat(buffer2, "\n");
- fputs(buffer2, lf);
- fflush(lf);
-
-
-}
-
- /* insert some string into logfile */
-int logwrite(FILE * lf, const char *s)
-{
- char buffer[MAXLINE];
- time_t curtime;
- pid_t pid;
- char pid_s[8];
- struct tm *loctime;
-
-
- pid = getpid();
- strcpy(buffer, "");
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%d/%m/%y %H:%M", loctime);
- sprintf(pid_s, "[%d]", (int) pid);
- strncat(buffer, pid_s, MAXLINE - strlen(buffer));
- strncat(buffer, " ", MAXLINE - strlen(buffer));
- strncat(buffer, s, MAXLINE - strlen(buffer));
- fprintf(stderr," buffer: ->%s<-\n", buffer);
- fputs(buffer, lf);
- fflush(lf);
-}
diff --git a/linux-tools/japach_old/src/makefile b/linux-tools/japach_old/src/makefile
deleted file mode 100644
index d0a63c46b0..0000000000
--- a/linux-tools/japach_old/src/makefile
+++ /dev/null
@@ -1,308 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = .
-top_srcdir = ..
-prefix = root/japach
-exec_prefix = ${prefix}
-
-bindir = ${exec_prefix}/bin
-sbindir = ${exec_prefix}/sbin
-libexecdir = ${exec_prefix}/libexec
-datadir = ${prefix}/share
-sysconfdir = ${prefix}/etc
-sharedstatedir = ${prefix}/com
-localstatedir = ${prefix}/var
-libdir = ${exec_prefix}/lib
-infodir = ${prefix}/info
-mandir = ${prefix}/man
-includedir = ${prefix}/include
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/japach
-pkglibdir = $(libdir)/japach
-pkgincludedir = $(includedir)/japach
-
-top_builddir = ..
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-AUTOMAKE = automake
-AUTOHEADER = autoheader
-
-INSTALL = /usr/bin/install -c
-INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-transform = s,x,x,
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = arm-uclinux-gcc
-MAKEINFO = makeinfo
-PACKAGE = japach
-VERSION = 0.4.1
-
-bin_PROGRAMS = japach
-japach_SOURCES = communication.c japach.c text.c log.c sys.c cgi.c
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(bin_PROGRAMS)
-
-
-DEFS = -DPACKAGE=\"japach\" -DVERSION=\"0.4.1\" -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRING_H=1 -DHAVE_NETDB_H=1 -DHAVE_TIME_H=1 -DHAVE_STDIO_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SETJMP_H=1 -DHAVE_PWD_H=1 -DTIME_WITH_SYS_TIME=1 -DAC_LITTLE_ENDIAN=1 -DRETSIGTYPE=void -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_FCLOSEALL=1 -I. -I$(srcdir)
-CPPFLAGS =
-LDFLAGS = -g -march=armv5 -msoft-float -Wl,-elf2flt='-s 8000'
-LIBS =
-japach_OBJECTS = communication.o japach.o text.o log.o sys.o cgi.o
-japach_LDADD = $(LDADD)
-japach_DEPENDENCIES =
-japach_LDFLAGS =
-CFLAGS = -g -O2 -march=armv5 -msoft-float
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DEP_FILES = .deps/cgi.P .deps/communication.P .deps/japach.P \
-.deps/log.P .deps/sys.P .deps/text.P
-SOURCES = $(japach_SOURCES)
-OBJECTS = $(japach_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- done
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-japach: $(japach_OBJECTS) $(japach_DEPENDENCIES)
- @rm -f japach
- $(LINK) $(japach_LDFLAGS) $(japach_OBJECTS) $(japach_LDADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
- -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-binPROGRAMS
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-am
-all-am: Makefile $(PROGRAMS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-binPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linux-tools/japach_old/src/meminfos b/linux-tools/japach_old/src/meminfos
deleted file mode 100644
index 8513db3cd7..0000000000
--- a/linux-tools/japach_old/src/meminfos
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-echo Content-type: text/html
-echo ""
-
-/bin/cat << EOM
-<HTML>
-<HEAD><TITLE> Meminfo result </TITLE>
-</HEAD>
-<BODY bgcolor="#cccccc" text="#000000">
-<HR SIZE=5>
-<H1 align="center" > Meminfo result </H1>
-<HR SIZE=5>
-<P>
-<MEDIUM>
-<PRE>
-EOM
-
-/bin/cat /proc/meminfo
-
-/bin/cat << EOM
-</PRE>
-</MEDIUM>
-<P>
-</BODY>
-</HTML>
-EOM
-
-
-
diff --git a/linux-tools/japach_old/src/spidlogo.JPG b/linux-tools/japach_old/src/spidlogo.JPG
deleted file mode 100644
index 96c9d80acd..0000000000
--- a/linux-tools/japach_old/src/spidlogo.JPG
+++ /dev/null
Binary files differ
diff --git a/linux-tools/japach_old/src/sys.c b/linux-tools/japach_old/src/sys.c
deleted file mode 100644
index a943414387..0000000000
--- a/linux-tools/japach_old/src/sys.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-
-#include "japach.h"
-
- /* author of readlink() be praised ;( */
-void getlink(char *path, char *result)
-{
- int i;
- char name[MAXLINE];
-
- i = readlink(path, name, MAXLINE);
- name[i] = '\0';
- strcpy(result, name);
-}
diff --git a/linux-tools/japach_old/src/text.c b/linux-tools/japach_old/src/text.c
deleted file mode 100644
index 4d976f3106..0000000000
--- a/linux-tools/japach_old/src/text.c
+++ /dev/null
@@ -1,628 +0,0 @@
-/*
- * Copyright (C) 2002 by Jirka Kosina <jikos@jikos.cz>
- * This program is free software under GPL.
- * See ../COPYING for detailed info
- */
-
-#include "japach.h"
-
- /* converts time_t to rfc822 date */
-void convert_to_rfc822_date(time_t curtime, char *buffer)
-{
- struct tm *loctime;
-
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
-void get_rfc822_date(char *buffer)
-{
- time_t curtime;
- struct tm *loctime;
-
- curtime = time(NULL);
- loctime = localtime(&curtime);
- strftime(buffer, 256, "%a, %d %b %Y %T %z", loctime);
-}
-
- /* strips extension from /some/file/path.ext */
-char *strip_extension(char *buffer)
-{
- char *s1;
- int i;
-
- for (s1 = buffer + strlen(buffer); ((*s1 != '.') && (s1 > buffer));
- s1--);
- s1++;
- if (s1 > buffer)
- return (s1);
- else
- return (0);
-}
-
- /* simple */
-int empty_string(char *s)
-{
- int i = 0;
-
- while ((isspace(s[i])) && (i < strlen(s)))
- i++;
- if (i == strlen(s))
- return (1);
- else
- return (0);
-}
-
-/* parse config file */
-/* this isn't indented in K&R style, because it will look ugly
- * (sorry guys ;) ).
- */
-
-void parse_config(FILE * f)
-{
- char *radka, delim, *confval, *keyword, *extension, *content_type,
- *s1, *s2;
- char *name, *documentroot, *log;
- int i = 0, x = 0, cur_conf_line = 0;
- struct c_types *pom;
- struct cage *pom1;
- struct virtuals *pom2;
- struct cgidirs *pom3;
-
- /* let's set some defaults */
- conf.serv_tcp_port = 80;
- strcpy(conf.document_root, "/var/www/html/");
- strcpy(conf.master_log, "tcp_srv.log");
- strcpy(conf.server_name, "localhost");
- strcpy(conf.userdir, "html");
- conf.uid = 0;
- conf.gid = 0;
- conf.max_childs = 100;
- conf.content_types =
- (struct c_types *) malloc(sizeof(struct c_types));
- conf.content_types->next = NULL;
- conf.cage_dirs = (struct cage *) malloc(sizeof(struct cage));
- conf.cage_dirs->next = NULL;
- conf.cgi_dirs = (struct cgidirs *) malloc(sizeof(struct cgidirs));
- conf.cgi_dirs->next = NULL;
- conf.virtual_hosts =
- (struct virtuals *) malloc(sizeof(struct virtuals));
- conf.virtual_hosts->next = NULL;
- conf.follow_symlinks = DO_NOT_FOLLOW_SYMLINKS;
-
- radka = (char *) malloc(MAXLINE * sizeof(char));
- name = (char *) malloc(MAXLINE * sizeof(char));
- documentroot = (char *) malloc(MAXLINE * sizeof(char));
- log = (char *) malloc(MAXLINE * sizeof(char));
- keyword = (char *) malloc(MAXLINE * sizeof(char));
- confval = (char *) malloc(MAXLINE * sizeof(char));
- extension = (char *) malloc(MAXLINE * sizeof(char));
- content_type = (char *) malloc(MAXLINE * sizeof(char));
-
-
- while (!feof(f)) {
- cur_conf_line++;
- if ((fgets(radka, MAXLINE, f)) && (radka[0] != '#')
- && (!empty_string(radka))) {
- i = 0;
- while ((!isspace(radka[i])) && (i < strlen(radka))) {
- keyword[i] = radka[i];
- i++;
- }
- keyword[i] = '\0';
- while ((isspace(radka[i])) && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- confval[i - x] = radka[i];
- i++;
- }
- confval[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "keyword without value on line %d\n",
- cur_conf_line);
- exit(0); /* FIXME: what about tidying up the mem? */
- }
- if (!strcasecmp(keyword, "port")) {
- conf.serv_tcp_port = atoi(confval);
- } else if (!strcasecmp(keyword, "documentroot")) {
- strcpy(conf.document_root, confval);
- if (confval[strlen(confval) - 1] != '/')
- strcat(conf.document_root, "/");
- } else if (!strcasecmp(keyword, "masterlog")) {
- strcpy(conf.master_log, confval);
- } else if (!strcasecmp(keyword, "uid")) {
- conf.uid = atoi(confval);
- } else if (!strcasecmp(keyword, "gid")) {
- conf.gid = atoi(confval);
- } else if (!strcasecmp(keyword, "maxchilds")) {
- conf.max_childs = atoi(confval);
- } else if (!strcasecmp(keyword, "symlinks")) {
- if (!strcasecmp
- (confval, "follow_symlinks"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS;
- else if (!strcasecmp
- (confval,
- "follow_symlinks_into_cage"))
- conf.follow_symlinks =
- FOLLOW_SYMLINKS_INTO_CAGE;
- } //jinak je default
- else if (!strcasecmp(keyword, "servername")) {
- strcpy(conf.server_name, confval);
- } else if (!strcasecmp(keyword, "userdir")) {
- strcpy(conf.userdir, confval);
- } else if (!strcasecmp(keyword, "cage")) { //definice ze kterych adresaru nesmi ven
- pom1 = conf.cage_dirs;
- while (pom1->next)
- pom1 = pom1->next;
- pom1->next =
- (struct cage *)
- malloc(sizeof(struct cage));
- strcpy(pom1->next->name, confval);
- pom1->next->next = NULL;
- } else if (!strcasecmp(keyword, "cgidir")) { /* paths to cgi executables */
- pom3 = conf.cgi_dirs;
- while (pom3->next)
- pom3 = pom3->next;
- pom3->next =
- (struct cgidirs *)
- malloc(sizeof(struct cgidirs));
- strcpy(pom3->next->name, confval);
- pom3->next->next = NULL;
- } else if (!strcasecmp(keyword, "type")) { /* assigning content-types to extensions */
- pom = conf.content_types;
- while (pom->next)
- pom = pom->next;
- pom->next =
- (struct c_types *)
- malloc(sizeof(struct c_types));
- /* parsing content-type extension */
- i = 4;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- extension[i - x] = radka[i];
- i++;
- }
- extension[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while (i < strlen(radka)) {
- content_type[i - x] =
- radka[i];
- i++;
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- content_type[i - x - 1] = '\0';
- strcpy(pom->next->extension, extension);
- strcpy(pom->next->content_type,
- content_type);
- pom->next->next = NULL;
- } else if (!strcasecmp(keyword, "virtualhost")) {
- /* parsing virtualhosts */
- pom2 = conf.virtual_hosts;
- while (pom2->next)
- pom2 = pom2->next;
- pom2->next =
- (struct virtuals *)
- malloc(sizeof(struct virtuals));
- /* fill in the three vals - parse according to spaces */
- i = 11;
- while (isspace(radka[i]))
- i++;
- x = i;
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- name[i - x] = radka[i];
- i++;
- }
- name[i - x] = '\0';
- while ((isspace(radka[i]))
- && (i < strlen(radka)))
- i++;
- x = i;
- if (i < strlen(radka)) {
- while ((!isspace(radka[i]))
- && (i < strlen(radka))) {
- documentroot[i - x] =
- radka[i];
- i++;
- }
- documentroot[i - x] = '\0';
- if (i < strlen(radka)) {
- while ((isspace(radka[i]))
- && (i <
- strlen(radka)))
- i++;
- x = i;
- while (i < strlen(radka)) {
- log[i - x] =
- radka[i];
- i++;
- }
- log[i - x - 1] = '\0';
- } else {
- fprintf(stderr,
- "invalid virtualhost definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- } else {
- fprintf(stderr,
- "invalid content_type definition on line %d\n",
- cur_conf_line);
- exit(0);
- }
- strcpy(pom2->next->name, name);
- strcpy(pom2->next->documentroot,
- documentroot);
- strcpy(pom2->next->log, log);
- pom2->next->next = NULL;
- /* open apropriate log file */
- if (!
- (pom2->next->logfile =
- fopen(log, "a"))) {
- fprintf(stderr,
- "! can't open %s!\n", log);
-#ifdef HAVE_FCLOSEALL
- fcloseall();
-#endif
- free_mem();
- exit(0);
- }
- } else
- fprintf(stderr,
- "warning: keyword %s on line %d not recognized\n",
- keyword, cur_conf_line);
- }
- }
- free(radka);
- free(confval);
- free(extension);
- free(content_type);
- free(name);
- free(documentroot);
- free(log);
-}
-
-char *find_content_type(char *ext)
-{
- struct c_types *pom;
-
- pom = conf.content_types->next;
- while (pom) {
- if (!strcmp(ext, pom->extension))
- return (pom->content_type);
- pom = pom->next;
- }
- return ("text/html");
-}
-
-char *subst(char *a, char *b, char *c)
-{
- int i = 0, x = 0, q;
- char *tmp;
-
- tmp = (char *) malloc(strlen(a) * strlen(b) * sizeof(char));
- while (i < strlen(a)) {
- if (a[i] != b[0]) {
- tmp[x] = a[i];
- x++;
- i++;
- } else {
- q = i;
- while (a[q] == b[q - i])
- q++;
- if (q - i == (strlen(b))) { /* matches */
- strcat(tmp, c);
- i += strlen(b);
- x += strlen(c);
- } else {
- tmp[x] = a[i];
- x++;
- i++;
- }
- }
- }
- tmp[x] = '\0';
- return (tmp);
-}
-
-/* deletes duplicit occurences of char a in char* b */
-char *deldupl(char a, char *b)
-{
- int i = 0, x = 0;
- char *tmp;
-
- tmp = (char *) malloc(strlen(b) * sizeof(char));
- strcpy(tmp, "");
- while (i < strlen(b)) {
- if ((b[i] == a) && (b[i + 1] == a)) {
- tmp[i - x] = b[i];
- i++;
- while ((b[i] == a)) {
- i++;
- x++;
- }
- } else {
- tmp[i - x] = b[i];
- i++;
- }
- }
- tmp[i - x] = '\0';
- return tmp;
-}
-
-/* replaces %AB with corresponding character (0xAB) */
-
-char *decode_hexa_octets(char *s1)
-{
- int i, a, q;
- char hexa[3], *s2;
-
- s2 = (char *) malloc(sizeof(char) * strlen(s1) + 1);
- a = 0;
- i = 0;
- while (i < strlen(s1)) {
- if (s1[i] != '%') {
- s2[a] = s1[i];
- i++;
- a++;
- } else if (i < strlen(s1) - 1) {
- hexa[0] = s1[i + 1];
- hexa[1] = s1[i + 2];
- hexa[2] = '\0';
- q = strtol(hexa, NULL, 16);
- s2[a] = (char) q;
- a++;
- i += 3;
- }
- }
- s2[i] = '\0';
- return (s2);
-}
-
-
- /* something very similar to realpath()
- * TODO: to be removed, and substituted with realpath()
- * on calling places
- */
-int delddot(char *s, char *s2)
-{
- int prev = 0, i = 0, q = 0, a = 0, w = 0, changed = 0;
- char *s1;
-
- s1 = (char *) malloc(sizeof(char) * MAXLINE);
- s1[0] = '\0';
- if (!strstr(s, "/../")) {
- strcpy(s2, s);
- return;
- }
- while ((i < strlen(s) - 4)
- &&
- (!((s[i] == '/') && (s[i + 1] == '.') && (s[i + 2] == '.')
- && (s[i + 3] == '/')))) {
- if ((s[i] == '/') && (i != 0)) {
- for (a = prev; a < i; a++) {
- s1[a] = s[a];
- }
- prev = a;
- s1[a] = '\0';
- }
- i++;
- }
- if (i < strlen(s) - 4) {
- changed = 1;
- i = i + 3;
- q = strlen(s1);
- w = i;
- while (i < strlen(s)) {
- s1[q + i - w] = s[i];
- i++;
- }
- s1[q + i - w] = '\0';
- delddot(s1, s2); /* recursively on the same string, d0h ;) */
- }
- free(s1);
-}
-
-int get_number_of_month(char *tmp2)
-{
- if (!strcasecmp(tmp2, "Jan"))
- return 1;
- if (!strcasecmp(tmp2, "Feb"))
- return 2;
- if (!strcasecmp(tmp2, "Mar"))
- return 3;
- if (!strcasecmp(tmp2, "Apr"))
- return 4;
- if (!strcasecmp(tmp2, "May"))
- return 5;
- if (!strcasecmp(tmp2, "Jun"))
- return 6;
- if (!strcasecmp(tmp2, "Jul"))
- return 7;
- if (!strcasecmp(tmp2, "Aug"))
- return 8;
- if (!strcasecmp(tmp2, "Sep"))
- return 9;
- if (!strcasecmp(tmp2, "Oct"))
- return 10;
- if (!strcasecmp(tmp2, "Nov"))
- return 11;
- if (!strcasecmp(tmp2, "Dec"))
- return 12;
-}
-
-
-int compare_rfc822_dates(char *date1, char *date2)
- /* compares two dates.
- *
- * if (d1 < d2) return (-1); else if (d1 == d2) return(0); else return(1);
- *
- */
-{
- int i, bb;
- int long yr1 = 0, yr2 = 0;
- int mon1 = 0, mon2 = 0;
- int day1 = 0, day2 = 0;
- int hms1 = 0, hms2 = 0;
- int offs1 = 0, offs2 = 0;
- int num1, num2;
- char *tmp, tmp2[2048], op[2], b[3];
-
- /* parse years into yr1 & yr2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
-
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr1 = atoi(tmp2);
-
- /* yr2 */
- tmp = strpbrk(date2, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- tmp = strpbrk(tmp, " ");
- tmp++;
- for (i = 0; i < 4; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- yr2 = atoi(tmp2);
-
- /* parse days to d1 & d2 */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day1 = atoi(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 2; i++)
- tmp2[i] = tmp[i];
- tmp2[i] = '\0';
- day2 = atoi(tmp2);
-
- /* parse hms */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms1 = atoi(tmp);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 3; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[8] = '\0';
- tmp = subst(tmp2, ":", "");
- hms2 = atoi(tmp);
-
- /* count 'offset' */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms1 = hms1 + bb * 100000;
-
- tmp = strpbrk(date2, " ");
- tmp++;
-
- for (i = 0; i < 4; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- if (!strncmp(tmp2, "GMT", 3))
- strcpy(tmp2, "+0000");
- b[0] = tmp2[1];
- b[1] = tmp2[2];
- b[3] = '\0';
- bb = atoi(b);
- if (tmp2[0] == '+')
- hms2 = hms2 + bb * 100000;
-
- /* count month # */
-
- tmp = strpbrk(date1, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon1 = get_number_of_month(tmp2);
-
- tmp = strpbrk(date2, " ");
- tmp++;
- for (i = 0; i < 1; i++) {
- tmp = strpbrk(tmp, " ");
- tmp++;
- }
- strcpy(tmp2, tmp);
- tmp2[3] = '\0';
- mon2 = get_number_of_month(tmp2);
-
- if (yr1 < yr2)
- return -1;
- else if (yr1 > yr2)
- return 1;
- else if (mon1 < mon2)
- return -1;
- else if (mon1 > mon2)
- return 1;
- else if (day1 < day2)
- return -1;
- else if (day1 > day2)
- return 1;
- else if (hms1 < hms2)
- return -1;
- else if (hms1 > hms2)
- return 1;
- else if (hms1 == hms2)
- return 0;
-}
diff --git a/linux-tools/openssl/Makefile b/linux-tools/openssl/Makefile
new file mode 100644
index 0000000000..116c29beb9
--- /dev/null
+++ b/linux-tools/openssl/Makefile
@@ -0,0 +1,888 @@
+### Generated automatically from Makefile.org by Configure.
+
+##
+## Makefile for OpenSSL
+##
+
+VERSION=0.9.7j-dev
+MAJOR=0
+MINOR=9.7
+SHLIB_VERSION_NUMBER=0.9.7
+SHLIB_VERSION_HISTORY=
+SHLIB_MAJOR=0
+SHLIB_MINOR=9.7
+SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
+PLATFORM=linux-elf-arm
+OPTIONS=no-engine no-hw no-shared no-dso no-asm no-krb5
+CONFIGURE_ARGS=no-engine no-hw no-shared no-dso no-asm linux-elf-arm
+SHLIB_TARGET=linux-shared
+
+# HERE indicates where this Makefile lives. This can be used to indicate
+# where sub-Makefiles are expected to be. Currently has very limited usage,
+# and should probably not be bothered with at all.
+HERE=.
+
+# INSTALL_PREFIX is for package builders so that they can configure
+# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
+# Normally it is left empty.
+INSTALL_PREFIX=
+INSTALLTOP=/usr/local/ssl
+
+# Do not edit this manually. Use Configure --openssldir=DIR do change this!
+OPENSSLDIR=/usr/local/ssl
+
+# NO_IDEA - Define to build without the IDEA algorithm
+# NO_RC4 - Define to build without the RC4 algorithm
+# NO_RC2 - Define to build without the RC2 algorithm
+# THREADS - Define when building with threads, you will probably also need any
+# system defines as well, i.e. _REENTERANT for Solaris 2.[34]
+# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
+# TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
+# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
+# DEVRANDOM - Give this the value of the 'random device' if your OS supports
+# one. 32 bytes will be read from this when the random
+# number generator is initalised.
+# SSL_FORBID_ENULL - define if you want the server to be not able to use the
+# NULL encryption ciphers.
+#
+# LOCK_DEBUG - turns on lots of lock debug output :-)
+# REF_CHECK - turn on some xyz_free() assertions.
+# REF_PRINT - prints some stuff on structure free.
+# CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
+# MFUNC - Make all Malloc/Free/Realloc calls call
+# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
+# call application defined callbacks via CRYPTO_set_mem_functions()
+# MD5_ASM needs to be defined to use the x86 assembler for MD5
+# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
+# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
+# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
+# equal 4.
+# PKCS1_CHECK - pkcs1 tests.
+
+CC= arm-uclinux-gcc
+#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
+CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -DOPENSSL_NO_ENGINE -DOPENSSL_NO_HW -DOPENSSL_NO_ASM -DTERMIO -O3 -msoft-float -fomit-frame-pointer -Wall
+DEPFLAG= -DOPENSSL_NO_ENGINE
+PEX_LIBS=
+EX_LIBS=
+EXE_EXT=
+ARFLAGS=
+AR=arm-uclinux-ar $(ARFLAGS) r
+RANLIB= /usr/bin/ranlib
+PERL= /usr/bin/perl
+TAR= tar
+TARFLAGS= --no-recursion
+MAKEDEPPROG= arm-uclinux-gcc
+
+# We let the C compiler driver to take care of .s files. This is done in
+# order to be excused from maintaining a separate set of architecture
+# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
+# gcc, then the driver will automatically translate it to -xarch=v8plus
+# and pass it down to assembler.
+AS=$(CC) -c
+ASFLAG=$(CFLAG)
+
+# Set BN_ASM to bn_asm.o if you want to use the C version
+BN_ASM= bn_asm.o
+#BN_ASM= bn_asm.o
+#BN_ASM= asm/bn86-elf.o # elf, linux-elf
+#BN_ASM= asm/bn86-sol.o # solaris
+#BN_ASM= asm/bn86-out.o # a.out, FreeBSD
+#BN_ASM= asm/bn86bsdi.o # bsdi
+#BN_ASM= asm/alpha.o # DEC Alpha
+#BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC
+#BN_ASM= asm/r3000.o # SGI MIPS cpu
+#BN_ASM= asm/sparc.o # Sun solaris/SunOS
+#BN_ASM= asm/bn-win32.o # Windows 95/NT
+#BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
+#BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
+
+# For x86 assembler: Set PROCESSOR to 386 if you want to support
+# the 80386.
+PROCESSOR=
+
+# Set DES_ENC to des_enc.o if you want to use the C version
+#There are 4 x86 assember options.
+FIPS_DES_ENC=
+FIPS_AES_ENC=
+DES_ENC= des_enc.o fcrypt_b.o
+#DES_ENC= des_enc.o fcrypt_b.o # C
+#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
+#DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
+#DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
+#DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
+
+# Set BF_ENC to bf_enc.o if you want to use the C version
+#There are 4 x86 assember options.
+BF_ENC= bf_enc.o
+#BF_ENC= bf_enc.o
+#BF_ENC= asm/bx86-elf.o # elf
+#BF_ENC= asm/bx86-sol.o # solaris
+#BF_ENC= asm/bx86-out.o # a.out, FreeBSD
+#BF_ENC= asm/bx86bsdi.o # bsdi
+
+# Set CAST_ENC to c_enc.o if you want to use the C version
+#There are 4 x86 assember options.
+CAST_ENC= c_enc.o
+#CAST_ENC= c_enc.o
+#CAST_ENC= asm/cx86-elf.o # elf
+#CAST_ENC= asm/cx86-sol.o # solaris
+#CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
+#CAST_ENC= asm/cx86bsdi.o # bsdi
+
+# Set RC4_ENC to rc4_enc.o if you want to use the C version
+#There are 4 x86 assember options.
+RC4_ENC= rc4_enc.o
+#RC4_ENC= rc4_enc.o
+#RC4_ENC= asm/rx86-elf.o # elf
+#RC4_ENC= asm/rx86-sol.o # solaris
+#RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
+#RC4_ENC= asm/rx86bsdi.o # bsdi
+
+# Set RC5_ENC to rc5_enc.o if you want to use the C version
+#There are 4 x86 assember options.
+RC5_ENC= rc5_enc.o
+#RC5_ENC= rc5_enc.o
+#RC5_ENC= asm/r586-elf.o # elf
+#RC5_ENC= asm/r586-sol.o # solaris
+#RC5_ENC= asm/r586-out.o # a.out, FreeBSD
+#RC5_ENC= asm/r586bsdi.o # bsdi
+
+# Also need MD5_ASM defined
+MD5_ASM_OBJ=
+#MD5_ASM_OBJ= asm/mx86-elf.o # elf
+#MD5_ASM_OBJ= asm/mx86-sol.o # solaris
+#MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
+#MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
+
+# Also need SHA1_ASM defined
+SHA1_ASM_OBJ=
+FIPS_SHA1_ASM_OBJ=
+#SHA1_ASM_OBJ= asm/sx86-elf.o # elf
+#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
+#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
+#SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
+
+# Also need RMD160_ASM defined
+RMD160_ASM_OBJ=
+#RMD160_ASM_OBJ= asm/rm86-elf.o # elf
+#RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
+#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
+#RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
+
+# KRB5 stuff
+KRB5_INCLUDES=
+LIBKRB5=
+
+# Zlib stuff
+ZLIB_INCLUDE=
+LIBZLIB=
+
+# When we're prepared to use shared libraries in the programs we link here
+# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
+SHLIB_MARK=
+
+DIRS= crypto fips-1.0 ssl $(SHLIB_MARK) apps test tools
+SHLIBDIRS= crypto ssl
+
+# dirs in crypto to build
+SDIRS= objects \
+ md2 md4 md5 sha mdc2 hmac ripemd \
+ des rc2 rc4 rc5 idea bf cast \
+ bn ec rsa dsa dh dso aes \
+ buffer bio stack lhash rand err \
+ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
+
+FDIRS= sha rand des aes dsa rsa dh hmac
+
+# tests to perform. "alltests" is a special word indicating that all tests
+# should be performed.
+TESTS = alltests
+
+MAKEFILE= Makefile
+
+MANDIR=$(OPENSSLDIR)/man
+MAN1=1
+MAN3=3
+MANSUFFIX=
+SHELL=/bin/sh
+
+TOP= .
+ONEDIRS=out tmp
+EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
+WDIRS= windows
+LIBS= libcrypto.a libssl.a
+SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
+SHARED_SSL=libssl$(SHLIB_EXT)
+SHARED_LIBS=
+SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so
+SHARED_LDFLAGS=
+
+GENERAL= Makefile
+BASENAME= openssl
+NAME= $(BASENAME)-$(VERSION)
+TARFILE= $(NAME).tar
+WTARFILE= $(NAME)-win.tar
+EXHEADER= e_os2.h
+HEADER= e_os.h
+
+# When we're prepared to use shared libraries in the programs we link here
+# we might remove 'clean-shared' from the targets to perform at this stage
+
+all: Makefile sub_all openssl.pc
+
+sub_all:
+ @for i in $(DIRS); \
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making all in $$i..." && \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' FIPS_AES_ENC='${FIPS_AES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
+ else \
+ $(MAKE) $$i; \
+ fi; \
+ done;
+
+sub_target:
+ @for i in $(DIRS); \
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making $(TARGET) in $$i..." && \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' FIPS_AES_ENC='${FIPS_AES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
+ else \
+ $(MAKE) $$i; \
+ fi; \
+ done;
+
+libcrypto$(SHLIB_EXT): libcrypto.a
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ $(MAKE) SHLIBDIRS=crypto build-shared; \
+ else \
+ echo "There's no support for shared libraries on this platform" >&2; \
+ fi
+
+libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
+ else \
+ echo "There's no support for shared libraries on this platform" >&2; \
+ fi
+
+clean-shared:
+ @for i in $(SHLIBDIRS); do \
+ if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
+ tmp="$(SHARED_LIBS_LINK_EXTS)"; \
+ for j in $${tmp:-x}; do \
+ ( set -x; rm -f lib$$i$$j ); \
+ done; \
+ fi; \
+ ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
+ if [ "$(PLATFORM)" = "Cygwin" ]; then \
+ ( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
+ fi; \
+ done
+
+link-shared:
+ @if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
+ tmp="$(SHARED_LIBS_LINK_EXTS)"; \
+ for i in $(SHLIBDIRS); do \
+ prev=lib$$i$(SHLIB_EXT); \
+ for j in $${tmp:-x}; do \
+ ( set -x; \
+ rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
+ prev=lib$$i$$j; \
+ done; \
+ done; \
+ fi
+
+build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
+
+do_bsd-gcc-shared: do_gnu-shared
+do_linux-shared: do_gnu-shared
+do_gnu-shared:
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -Wl,-Bsymbolic \
+ -Wl,--whole-archive lib$$i.a \
+ -Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done
+
+DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
+
+# For Darwin AKA Mac OS/X (dyld)
+do_darwin-shared:
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
+ lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
+ -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
+ libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
+ echo "" ; \
+ done
+
+do_cygwin-shared:
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ shlib=cyg$${i}-$(SHLIB_VERSION_NUMBER).dll; \
+ [ "$(PLATFORM)" = "mingw" ] && shlib=$${i}eay32.dll; \
+ [ -f apps/$$shlib ] && rm apps/$$shlib; \
+ [ -f test/$$shlib ] && rm test/$$shlib; \
+ base=; [ $$i = "crypto" ] && base=-Wl,--image-base,0x63000000; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared $$base -o $$shlib \
+ -Wl,-Bsymbolic \
+ -Wl,--whole-archive lib$$i.a \
+ -Wl,--out-implib,lib$$i.dll.a \
+ -Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \
+ cp -p $$shlib apps/; cp -p $$shlib test/; \
+ touch -c lib$$i.dll.a; \
+ libs="-l$$i $$libs"; \
+ done
+
+# This assumes that GNU utilities are *not* used
+do_alpha-osf1-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared -o lib$$i.so \
+ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
+ -all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# This assumes that GNU utilities are *not* used
+# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
+# option passed to the linker.
+do_tru64-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared -msym -o lib$$i.so \
+ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
+ -all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# This assumes that GNU utilities are *not* used
+# The difference between tru64-shared and tru64-shared-rpath is the
+# -rpath ${INSTALLTOP}/lib passed to the linker.
+do_tru64-shared-rpath:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared -msym -o lib$$i.so \
+ -rpath ${INSTALLTOP}/lib \
+ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
+ -all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+
+# This assumes that GNU utilities are *not* used
+do_solaris-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
+ MINUSZ='-z '; \
+ (${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
+ set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -Wl,-Bsymbolic \
+ $${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
+ $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# OpenServer 5 native compilers used
+do_svr3-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
+ find . -name "*.o" -print > allobjs ; \
+ OBJS= ; export OBJS ; \
+ for obj in `ar t lib$$i.a` ; do \
+ OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
+ done ; \
+ set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# UnixWare 7 and OpenUNIX 8 native compilers used
+do_svr5-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
+ SHARE_FLAG='-G'; \
+ (${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
+ find . -name "*.o" -print > allobjs ; \
+ OBJS= ; export OBJS ; \
+ for obj in `ar t lib$$i.a` ; do \
+ OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
+ done ; \
+ set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
+ $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ $${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# This assumes that GNU utilities are *not* used
+do_irix-shared:
+ if ${DETECT_GNU_LD}; then \
+ $(MAKE) do_gnu-shared; \
+ else \
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( WHOLELIB="-all lib$$i.a -none"; \
+ (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-none"; \
+ set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
+ $${WHOLELIB} $$libs ${EX_LIBS}) || exit 1; \
+ libs="-l$$i $$libs"; \
+ done; \
+ fi
+
+# This assumes that GNU utilities are *not* used
+#
+do_hpux-shared:
+ for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ if expr $(PLATFORM) : '.*ia64' > /dev/null; then \
+ shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ else \
+ shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
+ fi; \
+ [ -f $$shlib ] && rm -f $$shlib; \
+ ALLSYMSFLAGS='-Wl,-Fl'; \
+ expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
+ ( set -x; $${FIPSLD:-${CC}} ${SHARED_LDFLAGS} \
+ -Wl,-B,symbolic,+vnocompatwarnings,-z,+h,$$shlib \
+ -o $$shlib $$ALLSYMSFLAGS,lib$$i.a -ldld ) || exit 1; \
+ chmod a=rx $$shlib; \
+ done
+
+# The following method is said to work on all platforms. Tests will
+# determine if that's how it's gong to be used.
+# This assumes that for all but GNU systems, GNU utilities are *not* used.
+# ALLSYMSFLAGS would be:
+# GNU systems: --whole-archive
+# Tru64 Unix: -all
+# Solaris: -z allextract
+# Irix: -all
+# HP/UX-32bit: -Fl
+# HP/UX-64bit: +forceload
+# AIX: -bnogc
+# SHAREDFLAGS would be:
+# GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+# Tru64 Unix: -shared \
+# -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
+# Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+# Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+# HP/UX-32bit: +vnocompatwarnings -b -z +s \
+# +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
+# HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
+# AIX: -G -bE:lib$$i.exp -bM:SRE
+# SHAREDCMD would be:
+# GNU systems: $(CC)
+# Tru64 Unix: $(CC)
+# Solaris: $(CC)
+# Irix: $(CC)
+# HP/UX-32bit: /usr/ccs/bin/ld
+# HP/UX-64bit: /usr/ccs/bin/ld
+# AIX: $(CC)
+ALLSYMSFLAG=-bnogc
+SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
+SHAREDCMD=$(CC)
+do_aix-shared:
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ ( set -x; \
+ OBJECT_MODE=`expr x${SHARED_LDFLAGS} : 'x\-[a-z]\([0-9]*\)'`; \
+ OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
+ ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
+ ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
+ $${FIPSLD:-${CC}} $(SHAREDFLAGS) \
+ -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
+ $$libs ${EX_LIBS} ) ) \
+ || exit 1; \
+ libs="-l$$i $$libs"; \
+ done
+
+do_reliantunix-shared:
+ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+ if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
+ libs="$(LIBKRB5) $$libs"; \
+ fi; \
+ tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
+ ( set -x; \
+ ( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
+ cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \
+ $${FIPSLD:-${CC}} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \
+ ) || exit 1; \
+ cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
+ ) || exit 1; \
+ rm -rf $$tmpdir ; \
+ libs="-l$$i $$libs"; \
+ done
+
+openssl.pc: Makefile
+ @ ( echo 'prefix=$(INSTALLTOP)'; \
+ echo 'exec_prefix=$${prefix}'; \
+ echo 'libdir=$${exec_prefix}/lib'; \
+ echo 'includedir=$${prefix}/include'; \
+ echo ''; \
+ echo 'Name: OpenSSL'; \
+ echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+ echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
+
+Makefile: Makefile.org
+ @echo "Makefile is older than Makefile.org."
+ @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
+ @false
+
+libclean:
+ rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
+
+clean: libclean
+ rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making clean in $$i..." && \
+ $(MAKE) EXE_EXT='${EXE_EXT}' SDIRS='${SDIRS}' clean ) || exit 1; \
+ rm -f $(LIBS); \
+ fi; \
+ done;
+ rm -f openssl.pc
+ rm -f speed.* .pure
+ rm -f $(TARFILE)
+ @for i in $(ONEDIRS) ;\
+ do \
+ rm -fr $$i/*; \
+ done
+
+makefile.one: files
+ $(PERL) util/mk1mf.pl >makefile.one; \
+ sh util/do_ms.sh
+
+files:
+ $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making 'files' in $$i..." && \
+ $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
+ fi; \
+ done;
+
+links:
+ @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
+ @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
+ @for i in $(DIRS); do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making links in $$i..." && \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
+ fi; \
+ done;
+
+gentests:
+ @(cd test && echo "generating dummy tests (if needed)..." && \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
+
+dclean:
+ rm -f *.bak
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making dclean in $$i..." && \
+ $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
+ fi; \
+ done;
+
+rehash: rehash.time
+rehash.time: certs
+ @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
+ OPENSSL_DEBUG_MEMORY=on; \
+ export OPENSSL OPENSSL_DEBUG_MEMORY; \
+ $(PERL) tools/c_rehash certs)
+ touch rehash.time
+
+test: tests
+
+tests: rehash
+ @(cd test && echo "testing..." && \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
+ util/shlib_wrap.sh apps/openssl version -a
+
+report:
+ @$(PERL) util/selftest.pl
+
+depend:
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making dependencies $$i..." && \
+ $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
+ fi; \
+ done;
+
+lint:
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i && echo "making lint $$i..." && \
+ $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
+ fi; \
+ done;
+
+tags:
+ rm -f TAGS
+ find . -name '[^.]*.[ch]' | xargs etags -a
+
+errors:
+ $(PERL) util/mkerr.pl -recurse -write
+ (cd crypto/engine; $(MAKE) PERL=$(PERL) errors)
+
+stacks:
+ $(PERL) util/mkstack.pl -write
+
+util/libeay.num::
+ $(PERL) util/mkdef.pl crypto update
+
+util/ssleay.num::
+ $(PERL) util/mkdef.pl ssl update
+
+crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
+ $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
+crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
+ $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
+
+apps/openssl-vms.cnf: apps/openssl.cnf
+ $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
+
+crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
+ $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
+
+
+TABLE: Configure
+ (echo 'Output of `Configure TABLE'"':"; \
+ $(PERL) Configure TABLE) > TABLE
+
+update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
+
+# Build distribution tar-file. As the list of files returned by "find" is
+# pretty long, on several platforms a "too many arguments" error or similar
+# would occur. Therefore the list of files is temporarily stored into a file
+# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
+# tar does not support the --files-from option.
+tar:
+ find . -type d -print | xargs chmod 755
+ find . -type f -print | xargs chmod a+r
+ find . -type f -perm -0100 -print | xargs chmod a+x
+ find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
+ $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
+ tardy --user_number=0 --user_name=openssl \
+ --group_number=0 --group_name=openssl \
+ --prefix=openssl-$(VERSION) - |\
+ gzip --best >../$(TARFILE).gz; \
+ rm -f ../$(TARFILE).list; \
+ ls -l ../$(TARFILE).gz
+
+tar-snap:
+ @$(TAR) $(TARFLAGS) -cvf - \
+ `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
+ tardy --user_number=0 --user_name=openssl \
+ --group_number=0 --group_name=openssl \
+ --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
+ ls -l ../$(TARFILE)
+
+dist:
+ $(PERL) Configure dist
+ @$(MAKE) dist_pem_h
+ @$(MAKE) SDIRS='${SDIRS}' clean
+ @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
+
+dist_pem_h:
+ (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
+
+install: all install_docs install_sw
+
+install_sw:
+ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/private
+ @headerlist="$(EXHEADER)"; for i in $$headerlist ;\
+ do \
+ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ done;
+ @for i in $(DIRS) ;\
+ do \
+ if [ -d "$$i" ]; then \
+ (cd $$i; echo "installing $$i..."; \
+ $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
+ fi; \
+ done
+ @for i in $(LIBS) ;\
+ do \
+ if [ -f "$$i" ]; then \
+ ( echo installing $$i; \
+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+ if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
+ : ; \
+ else \
+ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+ fi; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+ fi; \
+ done;
+ @if [ -n "$(SHARED_LIBS)" ]; then \
+ tmp="$(SHARED_LIBS)"; \
+ for i in $${tmp:-x}; \
+ do \
+ if [ -f "$$i" -o -f "$$i.a" ]; then \
+ ( echo installing $$i; \
+ if [ "$(PLATFORM)" != "Cygwin" ]; then \
+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
+ else \
+ c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
+ cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
+ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
+ cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
+ fi ); \
+ fi; \
+ done; \
+ ( here="`pwd`"; \
+ cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
+ set $(MAKE); \
+ $$1 -f $$here/Makefile link-shared ); \
+ if [ "$(INSTALLTOP)" != "/usr" ]; then \
+ echo 'OpenSSL shared libraries have been installed in:'; \
+ echo ' $(INSTALLTOP)'; \
+ echo ''; \
+ sed -e '1,/^$$/d' doc/openssl-shared.txt; \
+ fi; \
+ fi
+ cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
+
+install_docs:
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
+ $(INSTALL_PREFIX)$(MANDIR)/man7
+ @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
+ here="`pwd`"; \
+ filecase=; \
+ if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
+ filecase=-i; \
+ fi; \
+ for i in doc/apps/*.pod; do \
+ fn=`basename $$i .pod`; \
+ if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+ --section=$$sec --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(PERL) util/extract-names.pl < $$i | \
+ (grep -v $$filecase "^$$fn\$$"; true) | \
+ (grep -v "[ ]"; true) | \
+ (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
+ while read n; do \
+ $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
+ done); \
+ done; \
+ for i in doc/crypto/*.pod doc/ssl/*.pod; do \
+ fn=`basename $$i .pod`; \
+ if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+ --section=$$sec --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(PERL) util/extract-names.pl < $$i | \
+ (grep -v $$filecase "^$$fn\$$"; true) | \
+ (grep -v "[ ]"; true) | \
+ (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
+ while read n; do \
+ $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
+ done); \
+ done
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/linux-tools/openssl/apps/Makefile b/linux-tools/openssl/apps/Makefile
index 4daa92382f..c31933c0e4 100644
--- a/linux-tools/openssl/apps/Makefile
+++ b/linux-tools/openssl/apps/Makefile
@@ -174,7 +174,6 @@ app_rand.o: ../include/openssl/cast.h ../include/openssl/conf.h
app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
app_rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h
app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-app_rand.o: ../include/openssl/engine.h ../include/openssl/err.h
app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
app_rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
app_rand.o: ../include/openssl/md4.h ../include/openssl/md5.h
@@ -197,16 +196,15 @@ apps.o: ../include/openssl/cast.h ../include/openssl/conf.h
apps.o: ../include/openssl/crypto.h ../include/openssl/des.h
apps.o: ../include/openssl/des_old.h ../include/openssl/dh.h
apps.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-apps.o: ../include/openssl/engine.h ../include/openssl/err.h
-apps.o: ../include/openssl/evp.h ../include/openssl/idea.h
-apps.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-apps.o: ../include/openssl/md4.h ../include/openssl/md5.h
-apps.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-apps.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
-apps.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+apps.o: ../include/openssl/err.h ../include/openssl/evp.h
+apps.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+apps.o: ../include/openssl/md2.h ../include/openssl/md4.h
+apps.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
+apps.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
apps.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
apps.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -221,15 +219,14 @@ asn1pars.o: ../include/openssl/cast.h ../include/openssl/conf.h
asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h
asn1pars.o: ../include/openssl/des_old.h ../include/openssl/dh.h
asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h
-asn1pars.o: ../include/openssl/evp.h ../include/openssl/idea.h
-asn1pars.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-asn1pars.o: ../include/openssl/md4.h ../include/openssl/md5.h
-asn1pars.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-asn1pars.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h
+asn1pars.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+asn1pars.o: ../include/openssl/md2.h ../include/openssl/md4.h
+asn1pars.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
asn1pars.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
asn1pars.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
asn1pars.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -245,16 +242,15 @@ ca.o: ../include/openssl/cast.h ../include/openssl/conf.h
ca.o: ../include/openssl/crypto.h ../include/openssl/des.h
ca.o: ../include/openssl/des_old.h ../include/openssl/dh.h
ca.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-ca.o: ../include/openssl/engine.h ../include/openssl/err.h
-ca.o: ../include/openssl/evp.h ../include/openssl/idea.h
-ca.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-ca.o: ../include/openssl/md4.h ../include/openssl/md5.h
-ca.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
-ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ca.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+ca.o: ../include/openssl/err.h ../include/openssl/evp.h
+ca.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+ca.o: ../include/openssl/md2.h ../include/openssl/md4.h
+ca.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
+ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ca.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
ca.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
ca.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -269,16 +265,15 @@ ciphers.o: ../include/openssl/cast.h ../include/openssl/comp.h
ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h
ciphers.o: ../include/openssl/des.h ../include/openssl/des_old.h
ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-ciphers.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h
-ciphers.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-ciphers.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-ciphers.o: ../include/openssl/md4.h ../include/openssl/md5.h
-ciphers.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+ciphers.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+ciphers.o: ../include/openssl/evp.h ../include/openssl/idea.h
+ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ciphers.o: ../include/openssl/md2.h ../include/openssl/md4.h
+ciphers.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
ciphers.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -296,15 +291,14 @@ crl.o: ../include/openssl/cast.h ../include/openssl/conf.h
crl.o: ../include/openssl/crypto.h ../include/openssl/des.h
crl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
crl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-crl.o: ../include/openssl/engine.h ../include/openssl/err.h
-crl.o: ../include/openssl/evp.h ../include/openssl/idea.h
-crl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-crl.o: ../include/openssl/md4.h ../include/openssl/md5.h
-crl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-crl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-crl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+crl.o: ../include/openssl/err.h ../include/openssl/evp.h
+crl.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+crl.o: ../include/openssl/md2.h ../include/openssl/md4.h
+crl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
crl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
crl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
crl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -320,15 +314,14 @@ crl2p7.o: ../include/openssl/cast.h ../include/openssl/conf.h
crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h
crl2p7.o: ../include/openssl/des_old.h ../include/openssl/dh.h
crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h
-crl2p7.o: ../include/openssl/evp.h ../include/openssl/idea.h
-crl2p7.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-crl2p7.o: ../include/openssl/md4.h ../include/openssl/md5.h
-crl2p7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-crl2p7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h
+crl2p7.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+crl2p7.o: ../include/openssl/md2.h ../include/openssl/md4.h
+crl2p7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
crl2p7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
crl2p7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
crl2p7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -344,16 +337,15 @@ dgst.o: ../include/openssl/cast.h ../include/openssl/conf.h
dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h
dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
-dgst.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-dgst.o: ../include/openssl/md2.h ../include/openssl/md4.h
-dgst.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-dgst.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+dgst.o: ../include/openssl/err.h ../include/openssl/evp.h
+dgst.o: ../include/openssl/hmac.h ../include/openssl/idea.h
+dgst.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+dgst.o: ../include/openssl/md4.h ../include/openssl/md5.h
+dgst.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+dgst.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -368,15 +360,14 @@ dh.o: ../include/openssl/cast.h ../include/openssl/conf.h
dh.o: ../include/openssl/crypto.h ../include/openssl/des.h
dh.o: ../include/openssl/des_old.h ../include/openssl/dh.h
dh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-dh.o: ../include/openssl/engine.h ../include/openssl/err.h
-dh.o: ../include/openssl/evp.h ../include/openssl/idea.h
-dh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-dh.o: ../include/openssl/md4.h ../include/openssl/md5.h
-dh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+dh.o: ../include/openssl/err.h ../include/openssl/evp.h
+dh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+dh.o: ../include/openssl/md2.h ../include/openssl/md4.h
+dh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -391,15 +382,14 @@ dsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
dsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-dsa.o: ../include/openssl/engine.h ../include/openssl/err.h
-dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
-dsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-dsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
-dsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-dsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+dsa.o: ../include/openssl/err.h ../include/openssl/evp.h
+dsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+dsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
+dsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
dsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
dsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
dsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -414,15 +404,14 @@ dsaparam.o: ../include/openssl/cast.h ../include/openssl/conf.h
dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h
dsaparam.o: ../include/openssl/des_old.h ../include/openssl/dh.h
dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
-dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h
-dsaparam.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-dsaparam.o: ../include/openssl/md4.h ../include/openssl/md5.h
-dsaparam.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h
+dsaparam.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+dsaparam.o: ../include/openssl/md2.h ../include/openssl/md4.h
+dsaparam.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
dsaparam.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
dsaparam.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -438,49 +427,23 @@ enc.o: ../include/openssl/cast.h ../include/openssl/conf.h
enc.o: ../include/openssl/crypto.h ../include/openssl/des.h
enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h
enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-enc.o: ../include/openssl/engine.h ../include/openssl/err.h
-enc.o: ../include/openssl/evp.h ../include/openssl/idea.h
-enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-enc.o: ../include/openssl/md4.h ../include/openssl/md5.h
-enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-enc.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-enc.o: ../include/openssl/sha.h ../include/openssl/stack.h
-enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h enc.c
-engine.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
-engine.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
-engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-engine.o: ../include/openssl/cast.h ../include/openssl/comp.h
-engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h
-engine.o: ../include/openssl/des.h ../include/openssl/des_old.h
-engine.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-engine.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-engine.o: ../include/openssl/err.h ../include/openssl/evp.h
-engine.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-engine.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-engine.o: ../include/openssl/md4.h ../include/openssl/md5.h
-engine.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-engine.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-engine.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-engine.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-engine.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-engine.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h
-engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-engine.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-engine.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-engine.o: ../include/openssl/x509_vfy.h apps.h engine.c
+enc.o: ../include/openssl/err.h ../include/openssl/evp.h
+enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+enc.o: ../include/openssl/md2.h ../include/openssl/md4.h
+enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+enc.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+enc.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+enc.o: ../include/openssl/x509_vfy.h apps.h enc.c
+engine.o: engine.c
errstr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
errstr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -488,16 +451,15 @@ errstr.o: ../include/openssl/cast.h ../include/openssl/comp.h
errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
errstr.o: ../include/openssl/des.h ../include/openssl/des_old.h
errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-errstr.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-errstr.o: ../include/openssl/err.h ../include/openssl/evp.h
-errstr.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-errstr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-errstr.o: ../include/openssl/md4.h ../include/openssl/md5.h
-errstr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-errstr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+errstr.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+errstr.o: ../include/openssl/evp.h ../include/openssl/idea.h
+errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+errstr.o: ../include/openssl/md2.h ../include/openssl/md4.h
+errstr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
errstr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -515,22 +477,22 @@ gendh.o: ../include/openssl/cast.h ../include/openssl/conf.h
gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h
gendh.o: ../include/openssl/des_old.h ../include/openssl/dh.h
gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
-gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h
-gendh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-gendh.o: ../include/openssl/md4.h ../include/openssl/md5.h
-gendh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-gendh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-gendh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h
-gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-gendh.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h gendh.c
+gendh.o: ../include/openssl/err.h ../include/openssl/evp.h
+gendh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+gendh.o: ../include/openssl/md2.h ../include/openssl/md4.h
+gendh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+gendh.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+gendh.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+gendh.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+gendh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+gendh.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+gendh.o: ../include/openssl/x509_vfy.h apps.h gendh.c
gendsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
gendsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -538,15 +500,14 @@ gendsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
gendsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h
-gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
-gendsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-gendsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
-gendsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h
+gendsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+gendsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
+gendsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
gendsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
gendsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
gendsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -562,23 +523,22 @@ genrsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
genrsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
-genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
-genrsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-genrsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
-genrsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-genrsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-genrsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
-genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-genrsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
-genrsa.o: genrsa.c
+genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h
+genrsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+genrsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
+genrsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+genrsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+genrsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+genrsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+genrsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+genrsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+genrsa.o: ../include/openssl/x509_vfy.h apps.h genrsa.c
nseq.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
nseq.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
nseq.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -586,15 +546,14 @@ nseq.o: ../include/openssl/cast.h ../include/openssl/conf.h
nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h
nseq.o: ../include/openssl/des_old.h ../include/openssl/dh.h
nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-nseq.o: ../include/openssl/engine.h ../include/openssl/err.h
-nseq.o: ../include/openssl/evp.h ../include/openssl/idea.h
-nseq.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-nseq.o: ../include/openssl/md4.h ../include/openssl/md5.h
-nseq.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-nseq.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+nseq.o: ../include/openssl/err.h ../include/openssl/evp.h
+nseq.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+nseq.o: ../include/openssl/md2.h ../include/openssl/md4.h
+nseq.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
nseq.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
nseq.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
nseq.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -609,17 +568,16 @@ ocsp.o: ../include/openssl/cast.h ../include/openssl/comp.h
ocsp.o: ../include/openssl/conf.h ../include/openssl/crypto.h
ocsp.o: ../include/openssl/des.h ../include/openssl/des_old.h
ocsp.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-ocsp.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h
-ocsp.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-ocsp.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-ocsp.o: ../include/openssl/md4.h ../include/openssl/md5.h
-ocsp.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
-ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ocsp.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+ocsp.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+ocsp.o: ../include/openssl/evp.h ../include/openssl/idea.h
+ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+ocsp.o: ../include/openssl/md2.h ../include/openssl/md4.h
+ocsp.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
+ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
ocsp.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
ocsp.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -637,17 +595,16 @@ openssl.o: ../include/openssl/cast.h ../include/openssl/comp.h
openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
openssl.o: ../include/openssl/des.h ../include/openssl/des_old.h
openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-openssl.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
-openssl.o: ../include/openssl/fips.h ../include/openssl/idea.h
-openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-openssl.o: ../include/openssl/md2.h ../include/openssl/md4.h
-openssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-openssl.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+openssl.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+openssl.o: ../include/openssl/evp.h ../include/openssl/fips.h
+openssl.o: ../include/openssl/idea.h ../include/openssl/kssl.h
+openssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+openssl.o: ../include/openssl/md4.h ../include/openssl/md5.h
+openssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+openssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
openssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
openssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -665,22 +622,21 @@ passwd.o: ../include/openssl/cast.h ../include/openssl/conf.h
passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
passwd.o: ../include/openssl/des_old.h ../include/openssl/dh.h
passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-passwd.o: ../include/openssl/engine.h ../include/openssl/err.h
-passwd.o: ../include/openssl/evp.h ../include/openssl/idea.h
-passwd.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-passwd.o: ../include/openssl/md4.h ../include/openssl/md5.h
-passwd.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-passwd.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
-passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
-passwd.o: passwd.c
+passwd.o: ../include/openssl/err.h ../include/openssl/evp.h
+passwd.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+passwd.o: ../include/openssl/md2.h ../include/openssl/md4.h
+passwd.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+passwd.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+passwd.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+passwd.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+passwd.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+passwd.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+passwd.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+passwd.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+passwd.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+passwd.o: ../include/openssl/x509_vfy.h apps.h passwd.c
pkcs12.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
pkcs12.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
pkcs12.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -688,16 +644,15 @@ pkcs12.o: ../include/openssl/cast.h ../include/openssl/conf.h
pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h
pkcs12.o: ../include/openssl/des_old.h ../include/openssl/dh.h
pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h
-pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h
-pkcs12.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-pkcs12.o: ../include/openssl/md4.h ../include/openssl/md5.h
-pkcs12.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
-pkcs12.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h
+pkcs12.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+pkcs12.o: ../include/openssl/md2.h ../include/openssl/md4.h
+pkcs12.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+pkcs12.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+pkcs12.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+pkcs12.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
+pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
pkcs12.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
pkcs12.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -712,15 +667,14 @@ pkcs7.o: ../include/openssl/cast.h ../include/openssl/conf.h
pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h
pkcs7.o: ../include/openssl/des_old.h ../include/openssl/dh.h
pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h
-pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h
-pkcs7.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-pkcs7.o: ../include/openssl/md4.h ../include/openssl/md5.h
-pkcs7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h
+pkcs7.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+pkcs7.o: ../include/openssl/md2.h ../include/openssl/md4.h
+pkcs7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+pkcs7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+pkcs7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+pkcs7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
pkcs7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
pkcs7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
pkcs7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -735,16 +689,15 @@ pkcs8.o: ../include/openssl/cast.h ../include/openssl/conf.h
pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h
pkcs8.o: ../include/openssl/des_old.h ../include/openssl/dh.h
pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h
-pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h
-pkcs8.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-pkcs8.o: ../include/openssl/md4.h ../include/openssl/md5.h
-pkcs8.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
-pkcs8.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h
+pkcs8.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+pkcs8.o: ../include/openssl/md2.h ../include/openssl/md4.h
+pkcs8.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+pkcs8.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+pkcs8.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+pkcs8.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
+pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
pkcs8.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
pkcs8.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -759,21 +712,20 @@ prime.o: ../include/openssl/cast.h ../include/openssl/conf.h
prime.o: ../include/openssl/crypto.h ../include/openssl/des.h
prime.o: ../include/openssl/des_old.h ../include/openssl/dh.h
prime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-prime.o: ../include/openssl/engine.h ../include/openssl/err.h
prime.o: ../include/openssl/evp.h ../include/openssl/idea.h
prime.o: ../include/openssl/lhash.h ../include/openssl/md2.h
prime.o: ../include/openssl/md4.h ../include/openssl/md5.h
prime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
prime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
prime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-prime.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-prime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-prime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-prime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-prime.o: ../include/openssl/sha.h ../include/openssl/stack.h
-prime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-prime.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-prime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h prime.c
+prime.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
+prime.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+prime.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+prime.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+prime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+prime.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+prime.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+prime.o: ../include/openssl/x509_vfy.h apps.h prime.c
rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -781,21 +733,21 @@ rand.o: ../include/openssl/cast.h ../include/openssl/conf.h
rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h
rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-rand.o: ../include/openssl/engine.h ../include/openssl/err.h
-rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
-rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-rand.o: ../include/openssl/md4.h ../include/openssl/md5.h
-rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
-rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-rand.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rand.c
+rand.o: ../include/openssl/err.h ../include/openssl/evp.h
+rand.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+rand.o: ../include/openssl/md2.h ../include/openssl/md4.h
+rand.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+rand.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+rand.o: ../include/openssl/x509_vfy.h apps.h rand.c
req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
req.o: ../include/openssl/asn1.h ../include/openssl/bio.h
req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
@@ -803,16 +755,15 @@ req.o: ../include/openssl/buffer.h ../include/openssl/cast.h
req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
req.o: ../include/openssl/des.h ../include/openssl/des_old.h
req.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-req.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-req.o: ../include/openssl/err.h ../include/openssl/evp.h
-req.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-req.o: ../include/openssl/md2.h ../include/openssl/md4.h
-req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-req.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+req.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+req.o: ../include/openssl/evp.h ../include/openssl/idea.h
+req.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+req.o: ../include/openssl/md4.h ../include/openssl/md5.h
+req.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+req.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+req.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+req.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
@@ -827,15 +778,14 @@ rsa.o: ../include/openssl/cast.h ../include/openssl/conf.h
rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h
rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
-rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
-rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
-rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
+rsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+rsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
+rsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
rsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
rsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -850,15 +800,14 @@ rsautl.o: ../include/openssl/cast.h ../include/openssl/conf.h
rsautl.o: ../include/openssl/crypto.h ../include/openssl/des.h
rsautl.o: ../include/openssl/des_old.h ../include/openssl/dh.h
rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h
-rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h
-rsautl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-rsautl.o: ../include/openssl/md4.h ../include/openssl/md5.h
-rsautl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-rsautl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h
+rsautl.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+rsautl.o: ../include/openssl/md2.h ../include/openssl/md4.h
+rsautl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+rsautl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+rsautl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+rsautl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+rsautl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
rsautl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
rsautl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
rsautl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -874,16 +823,15 @@ s_cb.o: ../include/openssl/cast.h ../include/openssl/comp.h
s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h
s_cb.o: ../include/openssl/des.h ../include/openssl/des_old.h
s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-s_cb.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h
-s_cb.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-s_cb.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-s_cb.o: ../include/openssl/md4.h ../include/openssl/md5.h
-s_cb.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+s_cb.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+s_cb.o: ../include/openssl/evp.h ../include/openssl/idea.h
+s_cb.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+s_cb.o: ../include/openssl/md2.h ../include/openssl/md4.h
+s_cb.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+s_cb.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
s_cb.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -901,26 +849,26 @@ s_client.o: ../include/openssl/cast.h ../include/openssl/comp.h
s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h
s_client.o: ../include/openssl/des.h ../include/openssl/des_old.h
s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
-s_client.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-s_client.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-s_client.o: ../include/openssl/md4.h ../include/openssl/md5.h
-s_client.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-s_client.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
-s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-s_client.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-s_client.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-s_client.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_client.c
+s_client.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+s_client.o: ../include/openssl/evp.h ../include/openssl/idea.h
+s_client.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+s_client.o: ../include/openssl/md2.h ../include/openssl/md4.h
+s_client.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s_client.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s_client.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+s_client.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+s_client.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+s_client.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+s_client.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+s_client.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+s_client.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
+s_client.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
+s_client.o: s_apps.h s_client.c
s_server.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
s_server.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -928,26 +876,26 @@ s_server.o: ../include/openssl/cast.h ../include/openssl/comp.h
s_server.o: ../include/openssl/conf.h ../include/openssl/crypto.h
s_server.o: ../include/openssl/des.h ../include/openssl/des_old.h
s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
-s_server.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-s_server.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-s_server.o: ../include/openssl/md4.h ../include/openssl/md5.h
-s_server.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-s_server.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s_server.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-s_server.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h
-s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-s_server.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-s_server.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_server.c
+s_server.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+s_server.o: ../include/openssl/evp.h ../include/openssl/idea.h
+s_server.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+s_server.o: ../include/openssl/md2.h ../include/openssl/md4.h
+s_server.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s_server.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s_server.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+s_server.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+s_server.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+s_server.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+s_server.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+s_server.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
+s_server.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
+s_server.o: s_apps.h s_server.c
s_socket.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
s_socket.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -955,8 +903,7 @@ s_socket.o: ../include/openssl/cast.h ../include/openssl/comp.h
s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
s_socket.o: ../include/openssl/des.h ../include/openssl/des_old.h
s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-s_socket.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-s_socket.o: ../include/openssl/err.h ../include/openssl/evp.h
+s_socket.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
s_socket.o: ../include/openssl/idea.h ../include/openssl/kssl.h
s_socket.o: ../include/openssl/lhash.h ../include/openssl/md2.h
s_socket.o: ../include/openssl/md4.h ../include/openssl/md5.h
@@ -964,17 +911,17 @@ s_socket.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
s_socket.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-s_socket.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-s_socket.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-s_socket.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h
-s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
-s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
-s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
-s_socket.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-s_socket.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_socket.c
+s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
+s_socket.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+s_socket.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
+s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
+s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
+s_socket.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
+s_socket.o: s_apps.h s_socket.c
s_time.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
s_time.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -982,16 +929,15 @@ s_time.o: ../include/openssl/cast.h ../include/openssl/comp.h
s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
s_time.o: ../include/openssl/des.h ../include/openssl/des_old.h
s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-s_time.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-s_time.o: ../include/openssl/err.h ../include/openssl/evp.h
-s_time.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-s_time.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-s_time.o: ../include/openssl/md4.h ../include/openssl/md5.h
-s_time.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-s_time.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+s_time.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+s_time.o: ../include/openssl/evp.h ../include/openssl/idea.h
+s_time.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+s_time.o: ../include/openssl/md2.h ../include/openssl/md4.h
+s_time.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+s_time.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+s_time.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
s_time.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -1009,16 +955,15 @@ sess_id.o: ../include/openssl/cast.h ../include/openssl/comp.h
sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
sess_id.o: ../include/openssl/des.h ../include/openssl/des_old.h
sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-sess_id.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h
-sess_id.o: ../include/openssl/idea.h ../include/openssl/kssl.h
-sess_id.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-sess_id.o: ../include/openssl/md4.h ../include/openssl/md5.h
-sess_id.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+sess_id.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+sess_id.o: ../include/openssl/evp.h ../include/openssl/idea.h
+sess_id.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
+sess_id.o: ../include/openssl/md2.h ../include/openssl/md4.h
+sess_id.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+sess_id.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+sess_id.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
sess_id.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -1036,15 +981,14 @@ smime.o: ../include/openssl/cast.h ../include/openssl/conf.h
smime.o: ../include/openssl/crypto.h ../include/openssl/des.h
smime.o: ../include/openssl/des_old.h ../include/openssl/dh.h
smime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-smime.o: ../include/openssl/engine.h ../include/openssl/err.h
-smime.o: ../include/openssl/evp.h ../include/openssl/idea.h
-smime.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-smime.o: ../include/openssl/md4.h ../include/openssl/md5.h
-smime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-smime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-smime.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+smime.o: ../include/openssl/err.h ../include/openssl/evp.h
+smime.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+smime.o: ../include/openssl/md2.h ../include/openssl/md4.h
+smime.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+smime.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+smime.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+smime.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
smime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
smime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
smime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -1059,22 +1003,22 @@ speed.o: ../include/openssl/cast.h ../include/openssl/conf.h
speed.o: ../include/openssl/crypto.h ../include/openssl/des.h
speed.o: ../include/openssl/des_old.h ../include/openssl/dh.h
speed.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-speed.o: ../include/openssl/engine.h ../include/openssl/err.h
-speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
-speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-speed.o: ../include/openssl/md2.h ../include/openssl/md4.h
-speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
-speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
-speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
-speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
-speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-speed.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-speed.o: ../include/openssl/x509_vfy.h apps.h speed.c testdsa.h testrsa.h
+speed.o: ../include/openssl/err.h ../include/openssl/evp.h
+speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
+speed.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+speed.o: ../include/openssl/md4.h ../include/openssl/md5.h
+speed.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+speed.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+speed.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
+speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
+speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+speed.o: ../include/openssl/sha.h ../include/openssl/stack.h
+speed.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
+speed.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h speed.c
+speed.o: testdsa.h testrsa.h
spkac.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
spkac.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
spkac.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -1082,15 +1026,14 @@ spkac.o: ../include/openssl/cast.h ../include/openssl/conf.h
spkac.o: ../include/openssl/crypto.h ../include/openssl/des.h
spkac.o: ../include/openssl/des_old.h ../include/openssl/dh.h
spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-spkac.o: ../include/openssl/engine.h ../include/openssl/err.h
-spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h
-spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-spkac.o: ../include/openssl/md4.h ../include/openssl/md5.h
-spkac.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-spkac.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-spkac.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+spkac.o: ../include/openssl/err.h ../include/openssl/evp.h
+spkac.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+spkac.o: ../include/openssl/md2.h ../include/openssl/md4.h
+spkac.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+spkac.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+spkac.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+spkac.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
spkac.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
spkac.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
spkac.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -1105,15 +1048,14 @@ verify.o: ../include/openssl/cast.h ../include/openssl/conf.h
verify.o: ../include/openssl/crypto.h ../include/openssl/des.h
verify.o: ../include/openssl/des_old.h ../include/openssl/dh.h
verify.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-verify.o: ../include/openssl/engine.h ../include/openssl/err.h
-verify.o: ../include/openssl/evp.h ../include/openssl/idea.h
-verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-verify.o: ../include/openssl/md4.h ../include/openssl/md5.h
-verify.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-verify.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-verify.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+verify.o: ../include/openssl/err.h ../include/openssl/evp.h
+verify.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+verify.o: ../include/openssl/md2.h ../include/openssl/md4.h
+verify.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+verify.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+verify.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+verify.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
verify.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
verify.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
verify.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -1129,22 +1071,20 @@ version.o: ../include/openssl/cast.h ../include/openssl/conf.h
version.o: ../include/openssl/crypto.h ../include/openssl/des.h
version.o: ../include/openssl/des_old.h ../include/openssl/dh.h
version.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-version.o: ../include/openssl/engine.h ../include/openssl/err.h
version.o: ../include/openssl/evp.h ../include/openssl/idea.h
version.o: ../include/openssl/lhash.h ../include/openssl/md2.h
version.o: ../include/openssl/md4.h ../include/openssl/md5.h
version.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-version.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-version.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-version.o: ../include/openssl/sha.h ../include/openssl/stack.h
-version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-version.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
-version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
-version.o: version.c
+version.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
+version.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+version.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+version.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+version.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+version.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
+version.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
+version.o: ../include/openssl/x509_vfy.h apps.h version.c
x509.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
x509.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -1152,15 +1092,14 @@ x509.o: ../include/openssl/cast.h ../include/openssl/conf.h
x509.o: ../include/openssl/crypto.h ../include/openssl/des.h
x509.o: ../include/openssl/des_old.h ../include/openssl/dh.h
x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-x509.o: ../include/openssl/engine.h ../include/openssl/err.h
-x509.o: ../include/openssl/evp.h ../include/openssl/idea.h
-x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-x509.o: ../include/openssl/md4.h ../include/openssl/md5.h
-x509.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-x509.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-x509.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+x509.o: ../include/openssl/err.h ../include/openssl/evp.h
+x509.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+x509.o: ../include/openssl/md2.h ../include/openssl/md4.h
+x509.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+x509.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+x509.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+x509.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
x509.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
x509.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
x509.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
diff --git a/linux-tools/openssl/crypto/conf/Makefile b/linux-tools/openssl/crypto/conf/Makefile
index 403d12b28c..f4c31f7121 100644
--- a/linux-tools/openssl/crypto/conf/Makefile
+++ b/linux-tools/openssl/crypto/conf/Makefile
@@ -117,22 +117,21 @@ conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-conf_mall.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-conf_mall.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-conf_mall.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-conf_mall.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
-conf_mall.o: ../../include/openssl/objects.h
+conf_mall.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+conf_mall.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+conf_mall.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+conf_mall.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+conf_mall.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
conf_mall.o: ../../include/openssl/opensslconf.h
conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
-conf_mall.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
-conf_mall.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
-conf_mall.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
-conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
-conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
-conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c
+conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
+conf_mall.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+conf_mall.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+conf_mall.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+conf_mall.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+conf_mall.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+conf_mall.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+conf_mall.o: ../cryptlib.h conf_mall.c
conf_mod.o: ../../e_os.h ../../include/openssl/aes.h
conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -164,18 +163,18 @@ conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-conf_sap.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-conf_sap.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-conf_sap.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-conf_sap.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
-conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+conf_sap.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+conf_sap.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+conf_sap.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+conf_sap.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+conf_sap.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
+conf_sap.o: ../../include/openssl/opensslconf.h
conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
-conf_sap.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
-conf_sap.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
-conf_sap.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
-conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
-conf_sap.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
-conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c
+conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
+conf_sap.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+conf_sap.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+conf_sap.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+conf_sap.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+conf_sap.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+conf_sap.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+conf_sap.o: ../cryptlib.h conf_sap.c
diff --git a/linux-tools/openssl/crypto/dh/Makefile b/linux-tools/openssl/crypto/dh/Makefile
index 352678b94a..920ec80204 100644
--- a/linux-tools/openssl/crypto/dh/Makefile
+++ b/linux-tools/openssl/crypto/dh/Makefile
@@ -118,14 +118,11 @@ dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c
-dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
-dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
-dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
-dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+dh_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
+dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
+dh_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+dh_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
+dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dh_lib.o: ../cryptlib.h dh_lib.c
diff --git a/linux-tools/openssl/crypto/dsa/Makefile b/linux-tools/openssl/crypto/dsa/Makefile
index 4f10278039..c23893a0db 100644
--- a/linux-tools/openssl/crypto/dsa/Makefile
+++ b/linux-tools/openssl/crypto/dsa/Makefile
@@ -130,13 +130,11 @@ dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
-dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
-dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-dsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h dsa_lib.c
+dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
+dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+dsa_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_lib.c
dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -151,23 +149,21 @@ dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h
-dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
+dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+dsa_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
+dsa_sign.o: ../../include/openssl/opensslconf.h
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
+dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_sign.o: ../cryptlib.h dsa_sign.c
dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
-dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
-dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/fips.h
+dsa_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
+dsa_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-dsa_vrf.o: ../../include/openssl/ui.h ../cryptlib.h dsa_vrf.c
+dsa_vrf.o: ../cryptlib.h dsa_vrf.c
diff --git a/linux-tools/openssl/crypto/err/Makefile b/linux-tools/openssl/crypto/err/Makefile
index 4adec55302..c85f300c33 100644
--- a/linux-tools/openssl/crypto/err/Makefile
+++ b/linux-tools/openssl/crypto/err/Makefile
@@ -91,24 +91,23 @@ err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
-err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
-err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
-err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
-err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
-err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
-err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
-err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
-err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
-err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
-err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
-err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
-err_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
-err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
-err_all.o: err_all.c
+err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+err_all.o: ../../include/openssl/fips.h ../../include/openssl/idea.h
+err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+err_all.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
+err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+err_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem2.h
+err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
+err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+err_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+err_all.o: ../../include/openssl/x509v3.h err_all.c
err_prn.o: ../../e_os.h ../../include/openssl/bio.h
err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff --git a/linux-tools/openssl/crypto/evp/Makefile b/linux-tools/openssl/crypto/evp/Makefile
index d1c2a272bb..6b9cc471e6 100644
--- a/linux-tools/openssl/crypto/evp/Makefile
+++ b/linux-tools/openssl/crypto/evp/Makefile
@@ -185,14 +185,13 @@ c_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
c_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
c_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
-c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
-c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
-c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
+c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+c_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+c_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+c_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+c_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -247,14 +246,13 @@ digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
-digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
-digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
-digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
+digest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -534,14 +532,13 @@ evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
-evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+evp_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+evp_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
+evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+evp_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
diff --git a/linux-tools/openssl/crypto/opensslconf.h b/linux-tools/openssl/crypto/opensslconf.h
new file mode 100644
index 0000000000..1165bdb683
--- /dev/null
+++ b/linux-tools/openssl/crypto/opensslconf.h
@@ -0,0 +1,195 @@
+/* opensslconf.h */
+/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
+
+/* OpenSSL was configured with the following options: */
+#ifndef OPENSSL_DOING_MAKEDEPEND
+
+#ifndef OPENSSL_NO_ENGINE
+# define OPENSSL_NO_ENGINE
+#endif
+#ifndef OPENSSL_NO_KRB5
+# define OPENSSL_NO_KRB5
+#endif
+
+#endif /* OPENSSL_DOING_MAKEDEPEND */
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
+#ifndef OPENSSL_NO_HW
+# define OPENSSL_NO_HW
+#endif
+#ifndef OPENSSL_NO_ASM
+# define OPENSSL_NO_ASM
+#endif
+
+/* The OPENSSL_NO_* macros are also defined as NO_* if the application
+ asks for it. This is a transient feature that is provided for those
+ who haven't had the time to do the appropriate changes in their
+ applications. */
+#ifdef OPENSSL_ALGORITHM_DEFINES
+# if defined(OPENSSL_NO_ENGINE) && !defined(NO_ENGINE)
+# define NO_ENGINE
+# endif
+# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
+# define NO_KRB5
+# endif
+#endif
+
+/* crypto/opensslconf.h.in */
+
+/* Generate 80386 code? */
+#undef I386_ONLY
+
+#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
+#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
+#define OPENSSLDIR "/usr/local/ssl"
+#endif
+#endif
+
+#undef OPENSSL_UNISTD
+#define OPENSSL_UNISTD <unistd.h>
+
+#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
+
+#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
+#define IDEA_INT unsigned int
+#endif
+
+#if defined(HEADER_MD2_H) && !defined(MD2_INT)
+#define MD2_INT unsigned int
+#endif
+
+#if defined(HEADER_RC2_H) && !defined(RC2_INT)
+/* I need to put in a mod for the alpha - eay */
+#define RC2_INT unsigned int
+#endif
+
+#if defined(HEADER_RC4_H)
+#if !defined(RC4_INT)
+/* using int types make the structure larger but make the code faster
+ * on most boxes I have tested - up to %20 faster. */
+/*
+ * I don't know what does "most" mean, but declaring "int" is a must on:
+ * - Intel P6 because partial register stalls are very expensive;
+ * - elder Alpha because it lacks byte load/store instructions;
+ */
+#define RC4_INT unsigned int
+#endif
+#if !defined(RC4_CHUNK)
+/*
+ * This enables code handling data aligned at natural CPU word
+ * boundary. See crypto/rc4/rc4_enc.c for further details.
+ */
+#undef RC4_CHUNK
+#endif
+#endif
+
+#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
+/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
+ * %20 speed up (longs are 8 bytes, int's are 4). */
+#ifndef DES_LONG
+#define DES_LONG unsigned long
+#endif
+#endif
+
+#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
+#define CONFIG_HEADER_BN_H
+#define BN_LLONG
+
+/* Should we define BN_DIV2W here? */
+
+/* Only one for the following should be defined */
+/* The prime number generation stuff may not work when
+ * EIGHT_BIT but I don't care since I've only used this mode
+ * for debuging the bignum libraries */
+#undef SIXTY_FOUR_BIT_LONG
+#undef SIXTY_FOUR_BIT
+#define THIRTY_TWO_BIT
+#undef SIXTEEN_BIT
+#undef EIGHT_BIT
+#endif
+
+#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
+#define CONFIG_HEADER_RC4_LOCL_H
+/* if this is defined data[i] is used instead of *data, this is a %20
+ * speedup on x86 */
+#undef RC4_INDEX
+#endif
+
+#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
+#define CONFIG_HEADER_BF_LOCL_H
+#undef BF_PTR
+#endif /* HEADER_BF_LOCL_H */
+
+#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
+#define CONFIG_HEADER_DES_LOCL_H
+#ifndef DES_DEFAULT_OPTIONS
+/* the following is tweaked from a config script, that is why it is a
+ * protected undef/define */
+#ifndef DES_PTR
+#undef DES_PTR
+#endif
+
+/* This helps C compiler generate the correct code for multiple functional
+ * units. It reduces register dependancies at the expense of 2 more
+ * registers */
+#ifndef DES_RISC1
+#undef DES_RISC1
+#endif
+
+#ifndef DES_RISC2
+#undef DES_RISC2
+#endif
+
+#if defined(DES_RISC1) && defined(DES_RISC2)
+YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
+#endif
+
+/* Unroll the inner loop, this sometimes helps, sometimes hinders.
+ * Very mucy CPU dependant */
+#ifndef DES_UNROLL
+#undef DES_UNROLL
+#endif
+
+/* These default values were supplied by
+ * Peter Gutman <pgut001@cs.auckland.ac.nz>
+ * They are only used if nothing else has been defined */
+#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
+/* Special defines which change the way the code is built depending on the
+ CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
+ even newer MIPS CPU's, but at the moment one size fits all for
+ optimization options. Older Sparc's work better with only UNROLL, but
+ there's no way to tell at compile time what it is you're running on */
+
+#if defined( sun ) /* Newer Sparc's */
+# define DES_PTR
+# define DES_RISC1
+# define DES_UNROLL
+#elif defined( __ultrix ) /* Older MIPS */
+# define DES_PTR
+# define DES_RISC2
+# define DES_UNROLL
+#elif defined( __osf1__ ) /* Alpha */
+# define DES_PTR
+# define DES_RISC2
+#elif defined ( _AIX ) /* RS6000 */
+ /* Unknown */
+#elif defined( __hpux ) /* HP-PA */
+ /* Unknown */
+#elif defined( __aux ) /* 68K */
+ /* Unknown */
+#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
+# define DES_UNROLL
+#elif defined( __sgi ) /* Newer MIPS */
+# define DES_PTR
+# define DES_RISC2
+# define DES_UNROLL
+#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
+# define DES_PTR
+# define DES_RISC1
+# define DES_UNROLL
+#endif /* Systems-specific speed defines */
+#endif
+
+#endif /* DES_DEFAULT_OPTIONS */
+#endif /* HEADER_DES_LOCL_H */
diff --git a/linux-tools/openssl/crypto/rand/Makefile b/linux-tools/openssl/crypto/rand/Makefile
index b1d1a75f98..733c790cdd 100644
--- a/linux-tools/openssl/crypto/rand/Makefile
+++ b/linux-tools/openssl/crypto/rand/Makefile
@@ -110,20 +110,17 @@ rand_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rand_err.o: rand_err.c
-rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
-rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rand_lib.o: ../../e_os.h ../../include/openssl/bio.h
rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
rand_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
-rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-rand_lib.o: ../../include/openssl/err.h ../../include/openssl/fips.h
-rand_lib.o: ../../include/openssl/fips_rand.h ../../include/openssl/lhash.h
-rand_lib.o: ../../include/openssl/opensslconf.h
+rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+rand_lib.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
+rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
-rand_lib.o: ../../include/openssl/ui_compat.h ../cryptlib.h rand_lib.c
+rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
+rand_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+rand_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+rand_lib.o: ../cryptlib.h rand_lib.c
rand_os2.o: ../../e_os.h ../../include/openssl/aes.h
rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
diff --git a/linux-tools/openssl/crypto/rsa/Makefile b/linux-tools/openssl/crypto/rsa/Makefile
index 8851825250..5864b65c9e 100644
--- a/linux-tools/openssl/crypto/rsa/Makefile
+++ b/linux-tools/openssl/crypto/rsa/Makefile
@@ -128,14 +128,12 @@ rsa_gen.o: ../cryptlib.h rsa_gen.c
rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
-rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
-rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
-rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-rsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h rsa_lib.c
+rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
+rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
+rsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
+rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+rsa_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_lib.c
rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
diff --git a/linux-tools/openssl/fips-1.0/Makefile b/linux-tools/openssl/fips-1.0/Makefile
index 28ae5354ce..27c1c5aa53 100644
--- a/linux-tools/openssl/fips-1.0/Makefile
+++ b/linux-tools/openssl/fips-1.0/Makefile
@@ -237,3 +237,4 @@ fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
fips.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h fips.c
fips.o: fips_locl.h
fips_err_wrapper.o: ../include/openssl/opensslconf.h fips_err_wrapper.c
+fipshashes.o: fipshashes.c
diff --git a/linux-tools/openssl/fips-1.0/dsa/Makefile b/linux-tools/openssl/fips-1.0/dsa/Makefile
index aeb08b5943..8b615727da 100644
--- a/linux-tools/openssl/fips-1.0/dsa/Makefile
+++ b/linux-tools/openssl/fips-1.0/dsa/Makefile
@@ -109,15 +109,13 @@ fips_dsa_gen.o: ../../include/openssl/ui_compat.h fips_dsa_gen.c
fips_dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
fips_dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
fips_dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-fips_dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-fips_dsa_ossl.o: ../../include/openssl/err.h ../../include/openssl/fips.h
-fips_dsa_ossl.o: ../../include/openssl/lhash.h
+fips_dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
fips_dsa_ossl.o: ../../include/openssl/opensslconf.h
fips_dsa_ossl.o: ../../include/openssl/opensslv.h
fips_dsa_ossl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
-fips_dsa_ossl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+fips_dsa_ossl.o: ../../include/openssl/safestack.h
fips_dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-fips_dsa_ossl.o: ../../include/openssl/ui.h fips_dsa_ossl.c
+fips_dsa_ossl.o: fips_dsa_ossl.c
fips_dsa_selftest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
fips_dsa_selftest.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
fips_dsa_selftest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
@@ -129,19 +127,15 @@ fips_dsa_selftest.o: ../../include/openssl/ossl_typ.h
fips_dsa_selftest.o: ../../include/openssl/safestack.h
fips_dsa_selftest.o: ../../include/openssl/stack.h
fips_dsa_selftest.o: ../../include/openssl/symhacks.h fips_dsa_selftest.c
-fips_dsatest.o: ../../e_os.h ../../include/openssl/asn1.h
-fips_dsatest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+fips_dsatest.o: ../../e_os.h ../../include/openssl/bio.h
fips_dsatest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-fips_dsatest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
-fips_dsatest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-fips_dsatest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-fips_dsatest.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
-fips_dsatest.o: ../../include/openssl/lhash.h
+fips_dsatest.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
+fips_dsatest.o: ../../include/openssl/err.h ../../include/openssl/fips.h
+fips_dsatest.o: ../../include/openssl/fips_rand.h ../../include/openssl/lhash.h
fips_dsatest.o: ../../include/openssl/opensslconf.h
fips_dsatest.o: ../../include/openssl/opensslv.h
fips_dsatest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
-fips_dsatest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-fips_dsatest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-fips_dsatest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
-fips_dsatest.o: fips_dsatest.c
+fips_dsatest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+fips_dsatest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+fips_dsatest.o: ../../include/openssl/ui_compat.h fips_dsatest.c
fips_dssvs.o: ../../include/openssl/opensslconf.h fips_dssvs.c
diff --git a/linux-tools/openssl/include/openssl/aes.h b/linux-tools/openssl/include/openssl/aes.h
new file mode 120000
index 0000000000..f555c13ed7
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/aes.h
@@ -0,0 +1 @@
+../../crypto/aes/aes.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/asn1.h b/linux-tools/openssl/include/openssl/asn1.h
new file mode 120000
index 0000000000..dd514954a1
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/asn1.h
@@ -0,0 +1 @@
+../../crypto/asn1/asn1.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/asn1_mac.h b/linux-tools/openssl/include/openssl/asn1_mac.h
new file mode 120000
index 0000000000..97781d9933
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/asn1_mac.h
@@ -0,0 +1 @@
+../../crypto/asn1/asn1_mac.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/asn1t.h b/linux-tools/openssl/include/openssl/asn1t.h
new file mode 120000
index 0000000000..31c87c3885
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/asn1t.h
@@ -0,0 +1 @@
+../../crypto/asn1/asn1t.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/bio.h b/linux-tools/openssl/include/openssl/bio.h
new file mode 120000
index 0000000000..c598b6f73a
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/bio.h
@@ -0,0 +1 @@
+../../crypto/bio/bio.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/blowfish.h b/linux-tools/openssl/include/openssl/blowfish.h
new file mode 120000
index 0000000000..88bf922342
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/blowfish.h
@@ -0,0 +1 @@
+../../crypto/bf/blowfish.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/bn.h b/linux-tools/openssl/include/openssl/bn.h
new file mode 120000
index 0000000000..5c251c135a
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/bn.h
@@ -0,0 +1 @@
+../../crypto/bn/bn.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/buffer.h b/linux-tools/openssl/include/openssl/buffer.h
new file mode 120000
index 0000000000..76ea7114a2
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/buffer.h
@@ -0,0 +1 @@
+../../crypto/buffer/buffer.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/cast.h b/linux-tools/openssl/include/openssl/cast.h
new file mode 120000
index 0000000000..b775ab04b8
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/cast.h
@@ -0,0 +1 @@
+../../crypto/cast/cast.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/comp.h b/linux-tools/openssl/include/openssl/comp.h
new file mode 120000
index 0000000000..712c9d4ae5
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/comp.h
@@ -0,0 +1 @@
+../../crypto/comp/comp.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/conf.h b/linux-tools/openssl/include/openssl/conf.h
new file mode 120000
index 0000000000..44156b189b
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/conf.h
@@ -0,0 +1 @@
+../../crypto/conf/conf.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/conf_api.h b/linux-tools/openssl/include/openssl/conf_api.h
new file mode 120000
index 0000000000..26b42198a8
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/conf_api.h
@@ -0,0 +1 @@
+../../crypto/conf/conf_api.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/crypto.h b/linux-tools/openssl/include/openssl/crypto.h
new file mode 120000
index 0000000000..2f3f63cb01
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/crypto.h
@@ -0,0 +1 @@
+../../crypto/crypto.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/des.h b/linux-tools/openssl/include/openssl/des.h
new file mode 120000
index 0000000000..5eb7c88b38
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/des.h
@@ -0,0 +1 @@
+../../crypto/des/des.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/des_old.h b/linux-tools/openssl/include/openssl/des_old.h
new file mode 120000
index 0000000000..9709898805
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/des_old.h
@@ -0,0 +1 @@
+../../crypto/des/des_old.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/dh.h b/linux-tools/openssl/include/openssl/dh.h
new file mode 120000
index 0000000000..c0eacb5eb3
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/dh.h
@@ -0,0 +1 @@
+../../crypto/dh/dh.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/dsa.h b/linux-tools/openssl/include/openssl/dsa.h
new file mode 120000
index 0000000000..ad4695f9b6
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/dsa.h
@@ -0,0 +1 @@
+../../crypto/dsa/dsa.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/dso.h b/linux-tools/openssl/include/openssl/dso.h
new file mode 120000
index 0000000000..b1f215dafc
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/dso.h
@@ -0,0 +1 @@
+../../crypto/dso/dso.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/e_os2.h b/linux-tools/openssl/include/openssl/e_os2.h
new file mode 120000
index 0000000000..0e8c039924
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/e_os2.h
@@ -0,0 +1 @@
+../../e_os2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ebcdic.h b/linux-tools/openssl/include/openssl/ebcdic.h
new file mode 120000
index 0000000000..a7ee60e0ae
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ebcdic.h
@@ -0,0 +1 @@
+../../crypto/ebcdic.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ec.h b/linux-tools/openssl/include/openssl/ec.h
new file mode 120000
index 0000000000..245497eda7
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ec.h
@@ -0,0 +1 @@
+../../crypto/ec/ec.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/err.h b/linux-tools/openssl/include/openssl/err.h
new file mode 120000
index 0000000000..20f65bd9c8
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/err.h
@@ -0,0 +1 @@
+../../crypto/err/err.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/evp.h b/linux-tools/openssl/include/openssl/evp.h
new file mode 120000
index 0000000000..7e3a904ae9
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/evp.h
@@ -0,0 +1 @@
+../../crypto/evp/evp.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/fips.h b/linux-tools/openssl/include/openssl/fips.h
new file mode 120000
index 0000000000..5bbd3d448d
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/fips.h
@@ -0,0 +1 @@
+../../fips-1.0/fips.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/fips_rand.h b/linux-tools/openssl/include/openssl/fips_rand.h
new file mode 120000
index 0000000000..d5a0e6626b
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/fips_rand.h
@@ -0,0 +1 @@
+../../fips-1.0/rand/fips_rand.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/fips_sha.h b/linux-tools/openssl/include/openssl/fips_sha.h
new file mode 120000
index 0000000000..e7c27d8272
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/fips_sha.h
@@ -0,0 +1 @@
+../../fips-1.0/sha/fips_sha.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/hmac.h b/linux-tools/openssl/include/openssl/hmac.h
new file mode 120000
index 0000000000..de19ba7ede
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/hmac.h
@@ -0,0 +1 @@
+../../crypto/hmac/hmac.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/idea.h b/linux-tools/openssl/include/openssl/idea.h
new file mode 120000
index 0000000000..724fa34581
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/idea.h
@@ -0,0 +1 @@
+../../crypto/idea/idea.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/krb5_asn.h b/linux-tools/openssl/include/openssl/krb5_asn.h
new file mode 120000
index 0000000000..1172e522e4
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/krb5_asn.h
@@ -0,0 +1 @@
+../../crypto/krb5/krb5_asn.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/kssl.h b/linux-tools/openssl/include/openssl/kssl.h
new file mode 120000
index 0000000000..2e5c2cd4dc
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/kssl.h
@@ -0,0 +1 @@
+../../ssl/kssl.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/lhash.h b/linux-tools/openssl/include/openssl/lhash.h
new file mode 120000
index 0000000000..56eb09918c
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/lhash.h
@@ -0,0 +1 @@
+../../crypto/lhash/lhash.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/md2.h b/linux-tools/openssl/include/openssl/md2.h
new file mode 120000
index 0000000000..410dc4d494
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/md2.h
@@ -0,0 +1 @@
+../../crypto/md2/md2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/md4.h b/linux-tools/openssl/include/openssl/md4.h
new file mode 120000
index 0000000000..4ff863e7fc
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/md4.h
@@ -0,0 +1 @@
+../../crypto/md4/md4.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/md5.h b/linux-tools/openssl/include/openssl/md5.h
new file mode 120000
index 0000000000..26fa47eb5c
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/md5.h
@@ -0,0 +1 @@
+../../crypto/md5/md5.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/mdc2.h b/linux-tools/openssl/include/openssl/mdc2.h
new file mode 120000
index 0000000000..0bc32f121c
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/mdc2.h
@@ -0,0 +1 @@
+../../crypto/mdc2/mdc2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/obj_mac.h b/linux-tools/openssl/include/openssl/obj_mac.h
new file mode 120000
index 0000000000..0f443c828b
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/obj_mac.h
@@ -0,0 +1 @@
+../../crypto/objects/obj_mac.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/objects.h b/linux-tools/openssl/include/openssl/objects.h
new file mode 120000
index 0000000000..7bd145ca08
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/objects.h
@@ -0,0 +1 @@
+../../crypto/objects/objects.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ocsp.h b/linux-tools/openssl/include/openssl/ocsp.h
new file mode 120000
index 0000000000..08288c84a6
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ocsp.h
@@ -0,0 +1 @@
+../../crypto/ocsp/ocsp.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/opensslconf.h b/linux-tools/openssl/include/openssl/opensslconf.h
new file mode 120000
index 0000000000..25d2bea96c
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/opensslconf.h
@@ -0,0 +1 @@
+../../crypto/opensslconf.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/opensslv.h b/linux-tools/openssl/include/openssl/opensslv.h
new file mode 120000
index 0000000000..f314f5fc71
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/opensslv.h
@@ -0,0 +1 @@
+../../crypto/opensslv.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ossl_typ.h b/linux-tools/openssl/include/openssl/ossl_typ.h
new file mode 120000
index 0000000000..e8f42456e1
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ossl_typ.h
@@ -0,0 +1 @@
+../../crypto/ossl_typ.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/pem.h b/linux-tools/openssl/include/openssl/pem.h
new file mode 120000
index 0000000000..ca371423e7
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/pem.h
@@ -0,0 +1 @@
+../../crypto/pem/pem.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/pem2.h b/linux-tools/openssl/include/openssl/pem2.h
new file mode 120000
index 0000000000..c734dbdc3f
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/pem2.h
@@ -0,0 +1 @@
+../../crypto/pem/pem2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/pkcs12.h b/linux-tools/openssl/include/openssl/pkcs12.h
new file mode 120000
index 0000000000..eebba77789
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/pkcs12.h
@@ -0,0 +1 @@
+../../crypto/pkcs12/pkcs12.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/pkcs7.h b/linux-tools/openssl/include/openssl/pkcs7.h
new file mode 120000
index 0000000000..73e1b23f77
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/pkcs7.h
@@ -0,0 +1 @@
+../../crypto/pkcs7/pkcs7.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/rand.h b/linux-tools/openssl/include/openssl/rand.h
new file mode 120000
index 0000000000..11231f8523
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/rand.h
@@ -0,0 +1 @@
+../../crypto/rand/rand.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/rc2.h b/linux-tools/openssl/include/openssl/rc2.h
new file mode 120000
index 0000000000..bb5a05c5d1
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/rc2.h
@@ -0,0 +1 @@
+../../crypto/rc2/rc2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/rc4.h b/linux-tools/openssl/include/openssl/rc4.h
new file mode 120000
index 0000000000..ef7deeb7d4
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/rc4.h
@@ -0,0 +1 @@
+../../crypto/rc4/rc4.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/rc5.h b/linux-tools/openssl/include/openssl/rc5.h
new file mode 120000
index 0000000000..46628c2bc2
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/rc5.h
@@ -0,0 +1 @@
+../../crypto/rc5/rc5.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ripemd.h b/linux-tools/openssl/include/openssl/ripemd.h
new file mode 120000
index 0000000000..200f562fa7
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ripemd.h
@@ -0,0 +1 @@
+../../crypto/ripemd/ripemd.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/rsa.h b/linux-tools/openssl/include/openssl/rsa.h
new file mode 120000
index 0000000000..3e5a654754
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/rsa.h
@@ -0,0 +1 @@
+../../crypto/rsa/rsa.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/safestack.h b/linux-tools/openssl/include/openssl/safestack.h
new file mode 120000
index 0000000000..8ca5b4cc7c
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/safestack.h
@@ -0,0 +1 @@
+../../crypto/stack/safestack.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/sha.h b/linux-tools/openssl/include/openssl/sha.h
new file mode 120000
index 0000000000..3025cd5d7e
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/sha.h
@@ -0,0 +1 @@
+../../crypto/sha/sha.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ssl.h b/linux-tools/openssl/include/openssl/ssl.h
new file mode 120000
index 0000000000..e87d9be8fc
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ssl.h
@@ -0,0 +1 @@
+../../ssl/ssl.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ssl2.h b/linux-tools/openssl/include/openssl/ssl2.h
new file mode 120000
index 0000000000..72876883c6
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ssl2.h
@@ -0,0 +1 @@
+../../ssl/ssl2.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ssl23.h b/linux-tools/openssl/include/openssl/ssl23.h
new file mode 120000
index 0000000000..5605052d70
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ssl23.h
@@ -0,0 +1 @@
+../../ssl/ssl23.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ssl3.h b/linux-tools/openssl/include/openssl/ssl3.h
new file mode 120000
index 0000000000..5ae2507f28
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ssl3.h
@@ -0,0 +1 @@
+../../ssl/ssl3.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/stack.h b/linux-tools/openssl/include/openssl/stack.h
new file mode 120000
index 0000000000..61d342fcdc
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/stack.h
@@ -0,0 +1 @@
+../../crypto/stack/stack.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/symhacks.h b/linux-tools/openssl/include/openssl/symhacks.h
new file mode 120000
index 0000000000..4a1a6913cf
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/symhacks.h
@@ -0,0 +1 @@
+../../crypto/symhacks.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/tls1.h b/linux-tools/openssl/include/openssl/tls1.h
new file mode 120000
index 0000000000..53d998fbd8
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/tls1.h
@@ -0,0 +1 @@
+../../ssl/tls1.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/tmdiff.h b/linux-tools/openssl/include/openssl/tmdiff.h
new file mode 120000
index 0000000000..7c036dfd88
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/tmdiff.h
@@ -0,0 +1 @@
+../../crypto/tmdiff.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/txt_db.h b/linux-tools/openssl/include/openssl/txt_db.h
new file mode 120000
index 0000000000..f672e35520
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/txt_db.h
@@ -0,0 +1 @@
+../../crypto/txt_db/txt_db.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ui.h b/linux-tools/openssl/include/openssl/ui.h
new file mode 120000
index 0000000000..b07defad72
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ui.h
@@ -0,0 +1 @@
+../../crypto/ui/ui.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/ui_compat.h b/linux-tools/openssl/include/openssl/ui_compat.h
new file mode 120000
index 0000000000..d8c74b7c5d
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/ui_compat.h
@@ -0,0 +1 @@
+../../crypto/ui/ui_compat.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/x509.h b/linux-tools/openssl/include/openssl/x509.h
new file mode 120000
index 0000000000..b2b85c5248
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/x509.h
@@ -0,0 +1 @@
+../../crypto/x509/x509.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/x509_vfy.h b/linux-tools/openssl/include/openssl/x509_vfy.h
new file mode 120000
index 0000000000..bb99ad4981
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/x509_vfy.h
@@ -0,0 +1 @@
+../../crypto/x509/x509_vfy.h \ No newline at end of file
diff --git a/linux-tools/openssl/include/openssl/x509v3.h b/linux-tools/openssl/include/openssl/x509v3.h
new file mode 120000
index 0000000000..63d12f9dc5
--- /dev/null
+++ b/linux-tools/openssl/include/openssl/x509v3.h
@@ -0,0 +1 @@
+../../crypto/x509v3/x509v3.h \ No newline at end of file
diff --git a/linux-tools/openssl/test/Makefile b/linux-tools/openssl/test/Makefile
index 2f23e3908f..e79795b946 100644
--- a/linux-tools/openssl/test/Makefile
+++ b/linux-tools/openssl/test/Makefile
@@ -511,26 +511,12 @@ dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
dsatest.o: ../include/openssl/symhacks.h dsatest.c
-ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
-ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
-ectest.o: ../include/openssl/engine.h ../include/openssl/err.h
+ectest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
+ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
+ectest.o: ../include/openssl/ec.h ../include/openssl/err.h
ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
-ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
-ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c
-enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
-enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
-enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
-enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
-enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
+ectest.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
+ectest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ectest.c
enginetest.o: enginetest.c
evp_test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
@@ -538,14 +524,13 @@ evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h
evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h
evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h
evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
-evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h
-evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
+evp_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+evp_test.o: ../include/openssl/evp.h ../include/openssl/idea.h
+evp_test.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+evp_test.o: ../include/openssl/md4.h ../include/openssl/md5.h
+evp_test.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+evp_test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+evp_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
@@ -597,16 +582,13 @@ fips_desmovs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
fips_desmovs.o: ../include/openssl/sha.h ../include/openssl/stack.h
fips_desmovs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
fips_desmovs.o: ../include/openssl/ui_compat.h fips_desmovs.c
-fips_dsatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
-fips_dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
+fips_dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h
-fips_dsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-fips_dsatest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-fips_dsatest.o: ../include/openssl/err.h ../include/openssl/fips.h
-fips_dsatest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h
-fips_dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-fips_dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
-fips_dsatest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+fips_dsatest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+fips_dsatest.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h
+fips_dsatest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
+fips_dsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+fips_dsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
fips_dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
fips_dsatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
fips_dsatest.o: fips_dsatest.c
@@ -732,15 +714,23 @@ fips_shatest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
fips_shatest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
fips_shatest.o: fips_shatest.c
fips_test_suite.o: ../include/openssl/aes.h ../include/openssl/asn1.h
-fips_test_suite.o: ../include/openssl/bio.h ../include/openssl/bn.h
+fips_test_suite.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
+fips_test_suite.o: ../include/openssl/bn.h ../include/openssl/cast.h
fips_test_suite.o: ../include/openssl/crypto.h ../include/openssl/des.h
fips_test_suite.o: ../include/openssl/des_old.h ../include/openssl/dh.h
fips_test_suite.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-fips_test_suite.o: ../include/openssl/err.h ../include/openssl/fips.h
-fips_test_suite.o: ../include/openssl/lhash.h ../include/openssl/md5.h
+fips_test_suite.o: ../include/openssl/err.h ../include/openssl/evp.h
+fips_test_suite.o: ../include/openssl/fips.h ../include/openssl/fips_sha.h
+fips_test_suite.o: ../include/openssl/hmac.h ../include/openssl/idea.h
+fips_test_suite.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+fips_test_suite.o: ../include/openssl/md4.h ../include/openssl/md5.h
+fips_test_suite.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+fips_test_suite.o: ../include/openssl/objects.h
fips_test_suite.o: ../include/openssl/opensslconf.h
fips_test_suite.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-fips_test_suite.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+fips_test_suite.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+fips_test_suite.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+fips_test_suite.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
fips_test_suite.o: ../include/openssl/safestack.h ../include/openssl/sha.h
fips_test_suite.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
fips_test_suite.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
@@ -908,23 +898,23 @@ ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h
ssltest.o: ../include/openssl/conf.h ../include/openssl/crypto.h
ssltest.o: ../include/openssl/des.h ../include/openssl/des_old.h
ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-ssltest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
-ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h
-ssltest.o: ../include/openssl/fips.h ../include/openssl/idea.h
-ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
-ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h
-ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h
-ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
-ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
-ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
-ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
-ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h
-ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c
+ssltest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+ssltest.o: ../include/openssl/evp.h ../include/openssl/fips.h
+ssltest.o: ../include/openssl/idea.h ../include/openssl/kssl.h
+ssltest.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+ssltest.o: ../include/openssl/md4.h ../include/openssl/md5.h
+ssltest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+ssltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+ssltest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+ssltest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
+ssltest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
+ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h
+ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
+ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
+ssltest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
+ssltest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
+ssltest.o: ../include/openssl/x509v3.h ssltest.c
diff --git a/linux-tools/rootfs/Makefile b/linux-tools/rootfs/Makefile
index fbf4e70255..dcb7153031 100644
--- a/linux-tools/rootfs/Makefile
+++ b/linux-tools/rootfs/Makefile
@@ -1,5 +1,3 @@
-
-
#if not already defined by a top level makefile
ifndef ECHO
ECHO = echo
@@ -13,218 +11,166 @@ DIR = .
#include linux configuration for PLC conf
include ../../linux-2.6.10/.config
+STRIP = "arm-uclinux-strip -s --remove-section=.note --remove-section=.comment"
+GENINITCPIO = "../../linux-2.6.10/usr/gen_init_cpio"
-# 16 or 32 MB release according to linux configuration
-ifeq ($(CONFIG_VERSION_16M),y)
-RAMDISK_SIZE = $(CONFIG_BLK_DEV_RAM_SIZE_16M)
-INODE_NB = 300
-PLC_FILE=plc_drv_32M.ko
-else
-ifeq ($(CONFIG_PLC_GDB),y)
-RAMDISK_SIZE = $(CONFIG_BLK_DEV_RAM_SIZE_GDB)
-INODE_NB = 800
+ifeq ($(CONFIG_ARCH_FCM3),y)
+PLC_DIR=rt_fcm3
else
-RAMDISK_SIZE = $(CONFIG_BLK_DEV_RAM_SIZE)
-INODE_NB = 500
+PLC_DIR=rt_cristina
endif
+
PLC_FILE=plc_drv_32M.ko
-endif
-IMAGE = $(DIR)/image
-TMP_IMAGE = /tmp/image
+SCRIPTS = $(DIR)/scripts
DEVFILE = $(DIR)/dev.txt
LINKFILE = $(DIR)/lnk.txt
-RAMDISK = $(DIR)/initrd.efs2
+DIRFILE = $(DIR)/dir.txt
+RAMFSLIST = initramfs_list
-all: info clean copy strip
+all: info clean append
# fill VoIP module init file
ifeq ($(CONFIG_VOIP),y)
ifeq ($(CONFIG_ARETHA),y)
- @./fill_99voip $(IMAGE)/etc/rcS.d/99voip ARETHA;
+ @./fill_97voip $(SCRIPTS)/rcS.d/97voip ARETHA;
else
- @./fill_99voip $(IMAGE)/etc/rcS.d/99voip SOPHIA;
+ @./fill_97voip $(SCRIPTS)/rcS.d/97voip SOPHIA;
endif
endif
- $(QUIET)/bin/rm -rf $(RAMDISK).gz
- $(QUIET)rm -rf $(TMP_IMAGE)
- $(QUIET)cp -dpR $(IMAGE) $(TMP_IMAGE)
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name "*~" -exec rm -f {} \;
- $(QUIET)rm -f /tmp/list
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name CVS -exec echo {} > /tmp/list \;
- $(QUIET)rm -rf `cat /tmp/list`
- $(QUIET)rm -f /tmp/list
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name NOPRUNE -exec echo {} > /tmp/list \;
- $(QUIET)rm -f `cat /tmp/list`
- $(QUIET)rm -f /tmp/list
- $(QUIET)chmod guo+x ./link.sh
$(QUIET)$(ECHO) " Linking files from lnk.txt"
- $(QUIET)./link.sh $(TMP_IMAGE) < $(LINKFILE) 2>/dev/null
+ $(QUIET)cat $(LINKFILE) >> $(RAMFSLIST)
$(QUIET)$(ECHO) " Linking files from busybox.links"
$(QUIET)chmod guo+x ./link_busybox.sh
- $(QUIET)./link_busybox.sh $(TMP_IMAGE) < ../busybox-1.00/busybox.links
- $(QUIET)chmod u+x $(TMP_IMAGE)/rc.init $(TMP_IMAGE)/etc/inittab
- $(QUIET)chmod u+x $(TMP_IMAGE)/etc/rc* $(TMP_IMAGE)/etc/rcS.d/*
- $(QUIET)chmod u+x $(TMP_IMAGE)/etc/config/network
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/busybox
-ifeq ($(CONFIG_PLC_MEASURE),y)
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/mesbox
-endif
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/brctl
-# the following features are disabled if compile with gdb debug symbols:
-# ebtables, tc, iptables, boa
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/ebtables ]; then chmod a+x $(TMP_IMAGE)/bin/ebtables; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/tc ]; then chmod a+x $(TMP_IMAGE)/bin/tc; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/boa ]; then chmod a+x $(TMP_IMAGE)/bin/boa; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/lib/boa/boa_indexer ]; then chmod a+x $(TMP_IMAGE)/usr/lib/boa/boa_indexer; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/uphp ]; then chmod a+x $(TMP_IMAGE)/bin/uphp; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/conn_server ]; then chmod a+x $(TMP_IMAGE)/bin/conn_server; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/conn_client ]; then chmod a+x $(TMP_IMAGE)/bin/conn_client; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/tinyftp ]; then chmod a+x $(TMP_IMAGE)/bin/tinyftp; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/tinyftpchild ]; then chmod a+x $(TMP_IMAGE)/bin/tinyftpchild; fi
-ifeq (CONFIG_PLC_VPORT,y)
-# udhcp actually used for virtual port configuration
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/udhcpd ]; then chmod a+x $(TMP_IMAGE)/bin/udhcpd; fi
-endif
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/udhcpc ]; then chmod a+x $(TMP_IMAGE)/bin/udhcpc; fi
-# $(QUIET)if [ -f $(TMP_IMAGE)/bin/iptables ]; then chmod a+x $(TMP_IMAGE)/bin/iptables; fi
-# $(QUIET)if [ -f $(TMP_IMAGE)/bin/ftpd ]; then chmod a+x $(TMP_IMAGE)/bin/ftpd; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/bridge ]; then chmod a+x $(TMP_IMAGE)/sbin/bridge; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/snmp_agent ]; then chmod a+x $(TMP_IMAGE)/bin/snmp_agent; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/wdd ]; then chmod a+x $(TMP_IMAGE)/sbin/wdd; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/mrst ]; then chmod a+x $(TMP_IMAGE)/sbin/mrst; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/plcfree ]; then chmod a+x $(TMP_IMAGE)/sbin/plcfree; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/safe-return ]; then chmod a+x $(TMP_IMAGE)/sbin/safe-return; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/wishlist ]; then chmod a+x $(TMP_IMAGE)/bin/wishlist; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/gore.php ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/*; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/ifconfig ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/ifconfig; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/meminfos ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/meminfos; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/cpuinfos ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/cpuinfos; fi
-ifeq ($(CONFIG_VOIP),y)
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/chnum ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/chnum; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/usr/share/www/cgi-bin/getnum ]; then chmod a+x $(TMP_IMAGE)/usr/share/www/cgi-bin/getnum; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/voipdemo ]; then chmod a+x $(TMP_IMAGE)/bin/voipdemo; fi
-endif
- $(QUIET)$(ECHO) "Generating initrd.efs2"
- $(QUIET)genext2fs -b $(RAMDISK_SIZE) -i $(INODE_NB) -d $(TMP_IMAGE) -f $(DEVFILE) $(RAMDISK)
- $(QUIET)$(ECHO) "gzip initrd.efs2"
- $(QUIET)gzip -9 $(RAMDISK)
- $(QUIET)$(ECHO) "deleting temporary image"
- $(QUIET)rm -rf $(TMP_IMAGE)
+ $(QUIET)./link_busybox.sh $(RAMFSLIST) < ../busybox-1.00/busybox.links
+ $(QUIET)$(ECHO) " Appending bootup scripts"
+ $(QUIET)$(ECHO) " /etc"
+ $(QUIET)cat scr.txt >> $(RAMFSLIST)
+ $(QUIET)$(ECHO) " /etc/rcS.d"
+ $(QUIET)for i in scripts/rcS.d/*; \
+ do ./append.sh ../linux-tools/rootfs/$$i /etc/rcS.d; \
+ done
info:
ifeq ($(CONFIG_VERSION_16M),y)
$(QUIET)echo "Building rootfs image for 16M release :"
- $(QUIET)$(ECHO) " RAMDISK_SIZE = " $(CONFIG_BLK_DEV_RAM_SIZE_16M) "KB"
else
$(QUIET)echo "Building rootfs image for 32M release :"
- $(QUIET)$(ECHO) " RAMDISK_SIZE = " $(CONFIG_BLK_DEV_RAM_SIZE) "KB"
endif
clean:
$(QUIET)echo "Cleaning "
- $(QUIET)/bin/rm -rf $(RAMDISK).gz
- $(QUIET)find $(IMAGE)/lib/modules -name "*.ko" -exec rm -f {} \; 2>/dev/null
- $(QUIET)find $(IMAGE)/bin -type f -perm u=rwx,go=r -exec rm -f {} \; 2>/dev/null
- $(QUIET)rm -rf $(IMAGE)/bin/messages ||true; 2>/dev/null
- $(QUIET)rm -f $(IMAGE)/sbin/wdd || true
- $(QUIET)rm -f $(IMAGE)/sbin/mrst ||true
- $(QUIET)rm -rf $(IMAGE)/usr/share/www ||true
- $(QUIET)rm -f $(IMAGE)/etc/boa.conf ||true ; 2>/dev/null
- $(QUIET)rm -f $(IMAGE)/sbin/safe-return ||true
+ $(QUIET)/bin/rm -f $(RAMFSLIST)
-copy:
- $(QUIET)echo "Copying :"
+# append script is used for adding files to initramfs_list
+# NOTE: all file locations (for append.sh) are relative to linux-2.6.10 directory
+append:
+ $(QUIET)echo "Appending to initramfs_list"
+ $(QUIET)$(ECHO) " device nodes"
+ $(QUIET)cat $(DEVFILE) > $(RAMFSLIST)
+ $(QUIET)$(ECHO) " directories"
+ $(QUIET)cat $(DIRFILE) >> $(RAMFSLIST)
$(QUIET)$(ECHO) " rtai_hal.ko"
$(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko ]; \
- then cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko /lib/modules; \
elif [ -f ../../binaries/rtai_hal.ko ]; \
- then cp ../../binaries/rtai_hal.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../binaries/rtai_hal.ko /lib/modules; \
else echo "Unable to find rtai_hal.ko"; \
fi
$(QUIET)$(ECHO) " rtai_up.ko"
$(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko ]; \
- then cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko /lib/modules; \
elif [ -f ../../binaries/rtai_up.ko ]; \
- then cp ../../binaries/rtai_up.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../binaries/rtai_up.ko /lib/modules; \
else echo "Unable to find rtai_up.ko"; \
fi
$(QUIET)$(ECHO) " rtai_timer_start.ko"
$(QUIET)if [ -f ../rtai-tests/rtai_timer_start.ko ]; \
- then cp ../rtai-tests/rtai_timer_start.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../linux-tools/rtai-tests/rtai_timer_start.ko /lib/modules; \
elif [ -f ../../binaries/rtai_timer_start.ko ]; \
- then cp ../../binaries/rtai_timer_start.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../binaries/rtai_timer_start.ko /lib/modules; \
else echo "Unable to find rtai_timer_start.ko"; \
fi
$(QUIET)$(ECHO) " plc_drv.ko"
- $(QUIET)if [ -f ../../app/obj/rt_cristina/plc_drv.ko ]; \
- then cp ../../app/obj/rt_cristina/plc_drv.ko $(IMAGE)/lib/modules; \
+ $(QUIET)if [ -f ../../app/obj/$(PLC_DIR)/plc_drv.ko ]; \
+ then ./append.sh ../app/obj/$(PLC_DIR)/plc_drv.ko /lib/modules; \
elif [ -f ../../binaries/$(PLC_FILE) ]; \
- then cp ../../binaries/$(PLC_FILE) $(IMAGE)/lib/modules/plc_drv.ko; \
+ then ./append.sh ../binaries/$(PLC_FILE) /lib/modules/plc_drv.ko; \
else echo "Unable to find plc_drv.ko"; \
fi
$(QUIET)$(ECHO) " busybox"
- $(QUIET)cp ../busybox-1.00/busybox $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/busybox-1.00/busybox /bin
- $(QUIET)rm -rf $(IMAGE)/usr/sbin/*
ifeq ($(CONFIG_PLC_HELPER_SCRIPTS),y)
- $(QUIET)cp -dpR ../helper_scripts/* $(IMAGE)/usr/sbin || true
+ $(QUIET)echo "dir /usr/sbin 0755 0 0" >> initramfs_list
+ $(QUIET)for i in ../helper_scripts/*; \
+ do ./append.sh ../linux-tools/helper-scripts/$${i##*/} /usr/sbin; \
+ done
endif
ifeq ($(CONFIG_PLC_MEASURE),y)
- $(QUIET)cp ../busybox-1.00/mesbox $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/busybox-1.00/mesbox /bin
endif
$(QUIET)$(ECHO) " brctl"
- $(QUIET)cp ../bridge-utils-1.0.6/brctl/brctl $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/bridge-utils-1.0.6/brctl/brctl /bin
# the following features are disabled if compile with gdb debug symbols:
# ebtables, tc, iptables, boa, tinyftp, ftpd, udhcp
$(QUIET)$(ECHO) " ebtables"
- $(QUIET)cp ../ebtables/ebtables $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/ebtables/ebtables /bin
$(QUIET)$(ECHO) " tc"
- $(QUIET)cp ../iproute2/tc/tc $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/iproute2/tc/tc /bin
$(QUIET)$(ECHO) " boa"
- $(QUIET)cp ../boa-0.94.14rc18/src/boa $(IMAGE)/bin || true
- $(QUIET)cp ../boa-0.94.14rc18/src/boa_indexer $(IMAGE)/usr/lib/boa/boa_indexer || true
+ $(QUIET)./append.sh ../linux-tools/boa-0.94.14rc18/src/boa /bin
+ $(QUIET)./append.sh ../linux-tools/boa-0.94.14rc18/src/boa_indexer /usr/lib/boa
$(QUIET)$(ECHO) " uphp and example scripts"
- $(QUIET)cp ../uphp/uphp $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/uphp/uphp /bin
$(QUIET)$(ECHO) " conn_server and conn_client tcp socket application on port 1818"
ifeq (CONFIG_PLC_PPC,y)
- $(QUIET)cp ../conn_socket/conn_server $(IMAGE)/bin || true
- $(QUIET)cp ../conn_socket/conn_client $(IMAGE)/bin || true
-endif
- $(QUIET)cp -r ../boa-0.94.14rc18/spc200/www $(IMAGE)/usr/share || true
- $(QUIET)cp -r ../boa-0.94.14rc18/spc200/cgi-bin $(IMAGE)/usr/share || true
- $(QUIET)if [ -f ../boa-0.94.14rc18/spc200/boa.conf ]; then cp ../boa-0.94.14rc18/spc200/boa.conf $(IMAGE)/etc;fi
+ $(QUIET)./append.sh ../linux-tools/conn_socket/conn_server /bin
+ $(QUIET)./append.sh ../linux-tools/conn_socket/conn_client /bin
+endif
+ $(QUIET)$(ECHO) " boa web server"
+ $(QUIET)for i in ../boa-0.94.14rc18/spc200/www/*; \
+ do ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/www/$${i##*/} /usr/share/www; \
+ done
+ $(QUIET)for i in ../boa-0.94.14rc18/spc200/cgi-bin/*; \
+ do ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/cgi-bin/$${i##*/} /usr/share/cgi-bin; \
+ done
+ $(QUIET)if [ -f ../boa-0.94.14rc18/spc200/boa.conf ]; \
+ then ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/boa.conf /etc; \
+ fi
+ $(QUIET)$(ECHO) " dconf"
+ $(QUIET)if [ -f ../dconf/dconf ]; \
+ then ./append.sh ../linux-tools/dconf/dconf /bin; \
+ fi
$(QUIET)$(ECHO) " tinyftp and tinyftpchild"
- $(QUIET)cp ../tinyftp/tinyftp $(IMAGE)/bin || true
- $(QUIET)cp ../tinyftp/tinyftpchild $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/tinyftp/tinyftp /bin
+ $(QUIET)./append.sh ../linux-tools/tinyftp/tinyftpchild /bin
ifeq (CONFIG_PLC_VPORT,y)
# udhcp actually used for virtual port configuration
$(QUIET)$(ECHO) " udhcp"
- $(QUIET)cp ../udhcp/udhcpd $(IMAGE)/bin || true
- $(QUIET)cp ../udhcp/udhcpd.leases $(IMAGE)/etc || true
- $(QUIET)cp ../udhcp/udhcpd.conf $(IMAGE)/etc || true
-endif
- $(QUIET)cp ../udhcp/udhcpc $(IMAGE)/bin || true
- $(QUIET)cp ../udhcp/udhcpd.bssid $(IMAGE)/etc || true
-# $(QUIET)$(ECHO) " ftpd"
-# $(QUIET)cp ../ftpd/ftpd $(IMAGE)/bin || true
-# $(QUIET)$(ECHO) " iptables"
-# $(QUIET)cp ../iptables/iptables $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd /bin
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.leases /etc
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.conf /etc
+endif
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpc /bin
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.bssid /etc
+ $(QUIET)$(ECHO) " ftpd"
+# $(QUIET)./append.sh ../ftpd/ftpd /bin
+ $(QUIET)$(ECHO) " iptables"
+ $(QUIET)./append.sh ../linux-tools/iptables/iptables /bin
$(QUIET)$(ECHO) " wishlist"
- $(QUIET)cp ../wishlist/wishlist $(IMAGE)/bin || true
- $(QUIET)-if [ $(CONFIG_VOIP) = y ]; then cp ../../voip/drv_vinetic_old/drv_vinetic.ko $(IMAGE)/lib/modules || true; fi 2>/dev/null
- $(QUIET)-if [ $(CONFIG_VOIP) = y ]; then cp ../../voip/drv_vinetic_old/99voip $(IMAGE)/etc/rcS.d || true; fi 2>/dev/null
+ $(QUIET)./append.sh ../linux-tools/wishlist/wishlist /bin
$(QUIET)$(ECHO) " safe-return"
- $(QUIET)cp ../safe-return/safe-return $(IMAGE)/sbin || true
+ $(QUIET)./append.sh ../linux-tools/safe-return/safe-return /sbin
ifeq ($(CONFIG_PLC_MCAST),y)
$(QUIET)$(ECHO) " igmp_filter.ko"
- $(QUIET)cp ../igmp_filter/igmp_filter.ko $(IMAGE)/lib/modules || true
+ $(QUIET)./append.sh ../linux-tools/igmp_filter/igmp_filter.ko /lib/modules
else
$(QUIET)$(ECHO) " Multicast disabled !"
endif
ifeq ($(CONFIG_SPR200_WATCHDOG),y)
$(QUIET)$(ECHO) " wdd"
- $(QUIET)cp ../wdd/wdd $(IMAGE)/sbin || true
+ $(QUIET)./append.sh ../linux-tools/wdd/wdd /sbin
else
$(QUIET)$(ECHO) " Watchdog disabled !"
endif
@@ -232,27 +178,18 @@ endif
ifneq ($(CONFIG_VERSION_16M),y)
$(QUIET)$(ECHO) "Copying 32MB compatible modules:"
$(QUIET)$(ECHO) " snmp_agent"
- $(QUIET)cp ../../app/obj/snmp_agent $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../app/obj/snmp_agent /bin
$(QUIET)$(ECHO) " mrst"
- $(QUIET)cp ../wdd/mrst $(IMAGE)/sbin || true
+ $(QUIET)./append.sh ../linux-tools/wdd/mrst /sbin
ifeq ($(CONFIG_VOIP),y)
$(QUIET)$(ECHO) " voip"
ifeq ($(CONFIG_ARETHA),y)
- $(QUIET)cp ../../voip/drv_vinetic-2.1/build/drv_tapi.ko $(IMAGE)/lib/modules || true
- $(QUIET)cp ../../voip/drv_vinetic-2.1/build/drv_vinetic.ko $(IMAGE)/lib/modules || true
+ $(QUIET)./append.sh ../voip/drv_vinetic-2.1/build/drv_tapi.ko /lib/modules
+ $(QUIET)./append.sh ../voip/drv_vinetic-2.1/build/drv_vinetic.ko /lib/modules
else
- $(QUIET)cp ../../voip/drv_vinetic_old/drv_vinetic.ko $(IMAGE)/lib/modules || true
+ $(QUIET)./append.sh ../voip/drv_vinetic_old/drv_vinetic.ko /lib/modules
endif
- $(QUIET)cp -r ../../voip/cgi/www $(IMAGE)/usr/share || true
-# $(QUIET)cp ../../voip/cgi/chnum $(IMAGE)/usr/share/www/cgi-bin || true
-# $(QUIET)cp ../../voip/cgi/getnum $(IMAGE)/usr/share/www/cgi-bin || true
- $(QUIET)cp ../../voip/demo/build/voipdemo $(IMAGE)/bin || true
- $(QUIET)cp -r ../../voip/demo/messages $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../voip/demo/build/voipdemo /bin
endif
endif
-strip:
- $(QUIET)echo "Stripping image"
- $(QUIET)chmod +x ./strip.sh
- $(QUIET)./strip.sh $(IMAGE)/bin/* $(IMAGE)/lib/* $(IMAGE)/sbin/* $(IMAGE)/usr/bin/* 2>/dev/null
-
diff --git a/linux-tools/rootfs/Makefile.lisa b/linux-tools/rootfs/Makefile.lisa
index a0aea7e030..7aa387a223 100644
--- a/linux-tools/rootfs/Makefile.lisa
+++ b/linux-tools/rootfs/Makefile.lisa
@@ -1,7 +1,3 @@
-
-#include linux configuration for PLC conf
-include ../../linux-2.6.10/.config
-
#if not already defined by a top level makefile
ifndef ECHO
ECHO = echo
@@ -13,97 +9,168 @@ endif
#DIR = $(PWD)
DIR = .
-# 32 MB release according to linux configuration
-CONFIG_BLK_DEV_RAM_SIZE=4096
-RAMDISK_SIZE = $(CONFIG_BLK_DEV_RAM_SIZE)
-INODE_NB = 500
+#include linux configuration for PLC conf
+include ../../linux-2.6.10/.config
+STRIP = "arm-uclinux-strip -s --remove-section=.note --remove-section=.comment"
+GENINITCPIO = "../../linux-2.6.10/usr/gen_init_cpio"
+
+PLC_FILE=plc_drv_32M.ko
-IMAGE = $(DIR)/image
-TMP_IMAGE = /tmp/image
+SCRIPTS = $(DIR)/scripts
DEVFILE = $(DIR)/dev.txt
-LINKFILE = $(DIR)/lisa_conf/lnk.txt
-RAMDISK = $(DIR)/initrd.efs2
+LINKFILE = $(DIR)/lnk.txt
+DIRFILE = $(DIR)/dir.txt
+RAMFSLIST = initramfs_list
-all: info clean copy strip changemode
- $(QUIET)echo "u-Boot : "
- $(QUIET)$(ECHO) " format"
- $(QUIET)../../tools/mkimage -A arm -O linux -T ramdisk -C gzip -a 0xb1000000 -n "Linux Ramdisk" -d $(RAMDISK).gz uImage.ramdisk
- $(QUIET)if [ -d /tftpboot ]; \
- then echo " copy to /tftpboot/ramdisk"; \
- cp uImage.ramdisk /tftpboot/ramdisk; \
- fi
+all: info clean append
+
+ $(QUIET)$(ECHO) " Linking files from lnk.txt"
+ $(QUIET)cat $(LINKFILE) >> $(RAMFSLIST)
+ $(QUIET)$(ECHO) " Linking files from busybox.links"
+ $(QUIET)chmod guo+x ./link_busybox.sh
+ $(QUIET)./link_busybox.sh $(RAMFSLIST) < ../busybox-1.00/busybox.links
+ $(QUIET)$(ECHO) " Appending bootup scripts"
+ $(QUIET)$(ECHO) " /etc"
+ $(QUIET)cat scr.txt >> $(RAMFSLIST)
+ $(QUIET)$(ECHO) " /etc/rcS.d"
+ $(QUIET)for i in scripts/rcS.d/*; \
+ do ./append.sh ../linux-tools/rootfs/$$i /etc/rcS.d; \
+ done
info:
- $(QUIET)echo "Building rootfs image for 32M release :"
- $(QUIET)$(ECHO) " RAMDISK_SIZE = " $(CONFIG_BLK_DEV_RAM_SIZE) "KB"
+ifeq ($(CONFIG_VERSION_16M),y)
+ $(QUIET)echo "Building rootfs image for 16M release :"
+else
+ $(QUIET)echo "Building rootfs image for 32M release :"
+endif
clean:
$(QUIET)echo "Cleaning "
- $(QUIET)/bin/rm -rf $(RAMDISK).gz
- $(QUIET)find $(IMAGE)/bin -type f -perm u=rwx -exec rm -f {} \; 2>/dev/null
- $(QUIET)rm -rf $(IMAGE)/bin/messages ||true; 2>/dev/null
- $(QUIET)rm -rf $(IMAGE)/lib/modules/plc_drv.ko ||true; 2>/dev/null
-# even if these applications are not used
- $(QUIET)find $(IMAGE)/lib/modules -name "*.ko" -exec rm -f {} \; 2>/dev/null
- $(QUIET)rm -f $(IMAGE)/sbin/wdd || true
- $(QUIET)rm -f $(IMAGE)/sbin/mrst ||true
- $(QUIET)rm -rf $(IMAGE)/usr/share/www ||true
- $(QUIET)rm -f $(IMAGE)/etc/boa.conf ||true ; 2>/dev/null
- $(QUIET)rm -f $(IMAGE)/sbin/safe-return ||true
-
-copy:
- $(QUIET)echo "Copying :"
+ $(QUIET)/bin/rm -f $(RAMFSLIST)
+
+# append script is used for adding files to initramfs_list
+# NOTE: all file locations (for append.sh) are relative to linux-2.6.10 directory
+append:
+ $(QUIET)echo "Appending to initramfs_list"
+ $(QUIET)$(ECHO) " device nodes"
+ $(QUIET)cat $(DEVFILE) > $(RAMFSLIST)
+ $(QUIET)$(ECHO) " directories"
+ $(QUIET)cat $(DIRFILE) >> $(RAMFSLIST)
$(QUIET)$(ECHO) " rtai_hal.ko"
$(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko ]; \
- then cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko /lib/modules; \
+ elif [ -f ../../binaries/rtai_hal.ko ]; \
+ then ./append.sh ../binaries/rtai_hal.ko /lib/modules; \
else echo "Unable to find rtai_hal.ko"; \
fi
$(QUIET)$(ECHO) " rtai_up.ko"
$(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko ]; \
- then cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko /lib/modules; \
+ elif [ -f ../../binaries/rtai_up.ko ]; \
+ then ./append.sh ../binaries/rtai_up.ko /lib/modules; \
else echo "Unable to find rtai_up.ko"; \
fi
$(QUIET)$(ECHO) " rtai_timer_start.ko"
$(QUIET)if [ -f ../rtai-tests/rtai_timer_start.ko ]; \
- then cp ../rtai-tests/rtai_timer_start.ko $(IMAGE)/lib/modules; \
+ then ./append.sh ../linux-tools/rtai-tests/rtai_timer_start.ko /lib/modules; \
+ elif [ -f ../../binaries/rtai_timer_start.ko ]; \
+ then ./append.sh ../binaries/rtai_timer_start.ko /lib/modules; \
else echo "Unable to find rtai_timer_start.ko"; \
fi
- $(QUIET)$(ECHO) " busybox"
- $(QUIET)cp ../busybox-1.00/busybox $(IMAGE)/bin || true
-
$(QUIET)$(ECHO) " plc_drv.ko"
- $(QUIET)if [ -f ../../app/obj/rt_fcm3/plc_drv.ko ]; \
- then cp ../../app/obj/rt_fcm3/plc_drv.ko $(IMAGE)/lib/modules; \
+ $(QUIET)if [ -f ../../app/obj/rt_cristina/plc_drv.ko ]; \
+ then ./append.sh ../app/obj/rt_cristina/plc_drv.ko /lib/modules; \
+ elif [ -f ../../binaries/$(PLC_FILE) ]; \
+ then ./append.sh ../binaries/$(PLC_FILE) /lib/modules/plc_drv.ko; \
else echo "Unable to find plc_drv.ko"; \
fi
+ $(QUIET)$(ECHO) " busybox"
+ $(QUIET)./append.sh ../linux-tools/busybox-1.00/busybox /bin
- $(QUIET)rm -rf $(IMAGE)/usr/sbin/*
-ifeq ($(CONFIG_PLC_MEASURES),y)
- $(QUIET)cp ../busybox-1.00/mesbox $(IMAGE)/bin || true
+ifeq ($(CONFIG_PLC_HELPER_SCRIPTS),y)
+ $(QUIET)echo "dir /usr/sbin 0755 0 0" >> initramfs_list
+ $(QUIET)for i in ../helper_scripts/*; \
+ do ./append.sh ../linux-tools/helper-scripts/$${i##*/} /usr/sbin; \
+ done
endif
-
-ifeq ($(CONFIG_PLC_MCAST),y)
- $(QUIET)$(ECHO) " ERROR igmp_filter.ko does not exist"
-else
- $(QUIET)$(ECHO) " without Multicast disabled"
+ifeq ($(CONFIG_PLC_MEASURE),y)
+ $(QUIET)./append.sh ../linux-tools/busybox-1.00/mesbox /bin
endif
$(QUIET)$(ECHO) " brctl"
- $(QUIET)cp ../bridge-utils-1.0.6/brctl/brctl $(IMAGE)/bin || true
- $(QUIET)$(ECHO) " ebtable"
- $(QUIET)cp ../ebtables/ebtables $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/bridge-utils-1.0.6/brctl/brctl /bin
+# the following features are disabled if compile with gdb debug symbols:
+# ebtables, tc, iptables, boa, tinyftp, ftpd, udhcp
+ $(QUIET)$(ECHO) " ebtables"
+ $(QUIET)./append.sh ../linux-tools/ebtables/ebtables /bin
+ $(QUIET)$(ECHO) " tc"
+ $(QUIET)./append.sh ../linux-tools/iproute2/tc/tc /bin
+ $(QUIET)$(ECHO) " boa"
+ $(QUIET)./append.sh ../linux-tools/boa-0.94.14rc18/src/boa /bin
+ $(QUIET)./append.sh ../linux-tools/boa-0.94.14rc18/src/boa_indexer /usr/lib/boa
+ $(QUIET)$(ECHO) " uphp and example scripts"
+ $(QUIET)./append.sh ../linux-tools/uphp/uphp /bin
+ $(QUIET)$(ECHO) " conn_server and conn_client tcp socket application on port 1818"
+ifeq (CONFIG_PLC_PPC,y)
+ $(QUIET)./append.sh ../linux-tools/conn_socket/conn_server /bin
+ $(QUIET)./append.sh ../linux-tools/conn_socket/conn_client /bin
+endif
+ $(QUIET)$(ECHO) " boa web server"
+ $(QUIET)for i in ../boa-0.94.14rc18/spc200/www/*; \
+ do ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/www/$${i##*/} /usr/share/www; \
+ done
+ $(QUIET)for i in ../boa-0.94.14rc18/spc200/cgi-bin/*; \
+ do ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/cgi-bin/$${i##*/} /usr/share/cgi-bin; \
+ done
+ $(QUIET)if [ -f ../boa-0.94.14rc18/spc200/boa.conf ]; \
+ then ./append.sh ../linux-tools/boa-0.94.14rc18/spc200/boa.conf /etc; \
+ fi
+ $(QUIET)$(ECHO) " dconf"
+ $(QUIET)if [ -f ../dconf/dconf ]; \
+ then ./append.sh ../linux-tools/dconf/dconf /bin; \
+ fi
+ $(QUIET)$(ECHO) " tinyftp and tinyftpchild"
+ $(QUIET)./append.sh ../linux-tools/tinyftp/tinyftp /bin
+ $(QUIET)./append.sh ../linux-tools/tinyftp/tinyftpchild /bin
+ifeq (CONFIG_PLC_VPORT,y)
+# udhcp actually used for virtual port configuration
+ $(QUIET)$(ECHO) " udhcp"
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd /bin
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.leases /etc
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.conf /etc
+endif
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpc /bin
+ $(QUIET)./append.sh ../linux-tools/udhcp/udhcpd.bssid /etc
+ $(QUIET)$(ECHO) " ftpd"
+# $(QUIET)./append.sh ../ftpd/ftpd /bin
+ $(QUIET)$(ECHO) " iptables"
+ $(QUIET)./append.sh ../linux-tools/iptables/iptables /bin
$(QUIET)$(ECHO) " wishlist"
- $(QUIET)cp ../wishlist/wishlist $(IMAGE)/bin || true
+ $(QUIET)./append.sh ../linux-tools/wishlist/wishlist /bin
+ $(QUIET)$(ECHO) " safe-return"
+ $(QUIET)./append.sh ../linux-tools/safe-return/safe-return /sbin
+ifeq ($(CONFIG_PLC_MCAST),y)
+ $(QUIET)$(ECHO) " igmp_filter.ko"
+ $(QUIET)./append.sh ../linux-tools/igmp_filter/igmp_filter.ko /lib/modules
+else
+ $(QUIET)$(ECHO) " Multicast disabled !"
+endif
+ifeq ($(CONFIG_SPR200_WATCHDOG),y)
+ $(QUIET)$(ECHO) " wdd"
+ $(QUIET)./append.sh ../linux-tools/wdd/wdd /sbin
+else
+ $(QUIET)$(ECHO) " Watchdog disabled !"
+endif
+#to be copied only for the 32 MB release
+ifneq ($(CONFIG_VERSION_16M),y)
+ $(QUIET)$(ECHO) "Copying 32MB compatible modules:"
+ $(QUIET)$(ECHO) " snmp_agent"
+ $(QUIET)./append.sh ../app/obj/snmp_agent /bin
+ $(QUIET)$(ECHO) " mrst"
+ $(QUIET)./append.sh ../linux-tools/wdd/mrst /sbin
+endif
-strip:
- $(QUIET)echo "Stripping image"
- $(QUIET)chmod +x ./strip.sh
- $(QUIET)./strip.sh $(IMAGE)/bin/* $(IMAGE)/lib/* $(IMAGE)/sbin/* $(IMAGE)/usr/bin/* 2>/dev/null
changemode:
- $(QUIET)/bin/rm -rf $(RAMDISK).gz
- $(QUIET)rm -rf $(TMP_IMAGE)
- $(QUIET)cp -dpR $(IMAGE) $(TMP_IMAGE)
-
$(QUIET)$(ECHO) " Added Lisa specifics files"
$(QUIET)cp ./lisa_conf/inittab $(TMP_IMAGE)/etc || true
$(QUIET)cp ./lisa_conf/fstab $(TMP_IMAGE)/etc || true
@@ -112,41 +179,3 @@ changemode:
$(QUIET)cp ./lisa_conf/interfaces $(TMP_IMAGE)/etc/network || true
$(QUIET)cp ./lisa_conf/network $(TMP_IMAGE)/etc/config || true
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name "*~" -exec rm -f {} \;
- $(QUIET)rm -f /tmp/list
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name CVS -exec echo {} > /tmp/list \;
- $(QUIET)rm -rf `cat /tmp/list`
- $(QUIET)rm -f /tmp/list
- $(QUIET)/usr/bin/find $(TMP_IMAGE) -name NOPRUNE -exec echo {} > /tmp/list \;
- $(QUIET)rm -f `cat /tmp/list`
- $(QUIET)rm -f /tmp/list
- $(QUIET)chmod guo+x ./link.sh
- $(QUIET)$(ECHO) " Linking files from lnk.txt"
- $(QUIET)./link.sh $(TMP_IMAGE) < $(LINKFILE) 2>/dev/null
- $(QUIET)$(ECHO) " Linking files from busybox.links"
- $(QUIET)chmod guo+x ./link_busybox.sh
- $(QUIET)./link_busybox.sh $(TMP_IMAGE) < ../busybox-1.00/busybox.links
- $(QUIET)chmod u+x $(TMP_IMAGE)/rc.init $(TMP_IMAGE)/etc/inittab
- $(QUIET)chmod u+x $(TMP_IMAGE)/etc/rc* $(TMP_IMAGE)/etc/rcS.d/*
- $(QUIET)chmod u+x $(TMP_IMAGE)/etc/config/network
- $(QUIET)chmod 755 $(TMP_IMAGE)/lib/modules/rtai_hal.ko
- $(QUIET)chmod 755 $(TMP_IMAGE)/lib/modules/rtai_up.ko
- $(QUIET)chmod 755 $(TMP_IMAGE)/lib/modules/rtai_timer_start.ko
- $(QUIET)chmod 755 $(TMP_IMAGE)/lib/modules/plc_drv.ko
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/busybox
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/brctl
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/ebtables
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/bridge ]; then chmod a+x $(TMP_IMAGE)/sbin/bridge; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/sbin/plcfree ]; then chmod a+x $(TMP_IMAGE)/sbin/plcfree; fi
- $(QUIET)if [ -f $(TMP_IMAGE)/bin/wishlist ]; then chmod a+x $(TMP_IMAGE)/bin/wishlist; fi
-ifeq ($(CONFIG_PLC_MEASURES),y)
- $(QUIET)chmod a+x $(TMP_IMAGE)/bin/mesbox
-endif
-
- $(QUIET)$(ECHO) "Generating initrd.efs2"
- $(QUIET)genext2fs -b $(RAMDISK_SIZE) -i $(INODE_NB) -d $(TMP_IMAGE) -f $(DEVFILE) $(RAMDISK)
- $(QUIET)$(ECHO) "gzip initrd.efs2"
- $(QUIET)gzip -9 $(RAMDISK)
- $(QUIET)$(ECHO) "deleting temporary image"
- $(QUIET)rm -rf $(TMP_IMAGE)
-
diff --git a/linux-tools/rootfs/append.sh b/linux-tools/rootfs/append.sh
new file mode 100755
index 0000000000..720654c97b
--- /dev/null
+++ b/linux-tools/rootfs/append.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+RAMFSLIST="initramfs_list"
+STRIP="arm-uclinux-strip -g"
+
+case ${1##*.} in
+ ko)
+ $STRIP ../$1
+ echo "file $2/${1##*/} $1 0644 0 0" >> $RAMFSLIST
+ ;;
+ gif|jpg|jpeg|png|conf|bssid|leases|bssid)
+ echo "file $2/${1##*/} $1 0644 0 0" >> $RAMFSLIST
+ ;;
+ *)
+ echo "file $2/${1##*/} $1 0755 0 0" >> $RAMFSLIST
+ ;;
+esac
+
diff --git a/linux-tools/rootfs/dev.txt b/linux-tools/rootfs/dev.txt
index e5551e19cc..34b7121b07 100644
--- a/linux-tools/rootfs/dev.txt
+++ b/linux-tools/rootfs/dev.txt
@@ -1,44 +1,45 @@
-brw- 31, 0 /dev/mtdblock0
-brw- 31, 1 /dev/mtdblock1
-brw- 31, 2 /dev/mtdblock2
-brw- 31, 3 /dev/mtdblock3
-cr-- 90, 11 /dev/mtdr5
-crw- 90, 10 /dev/mtd5
-cr-- 90, 9 /dev/mtdr4
-crw- 90, 8 /dev/mtd4
-cr-- 90, 7 /dev/mtdr3
-crw- 90, 6 /dev/mtd3
-cr-- 90, 5 /dev/mtdr2
-crw- 90, 4 /dev/mtd2
-cr-- 90, 3 /dev/mtdr1
-crw- 90, 2 /dev/mtd1
-cr-- 90, 1 /dev/mtdr0
-crw- 90, 0 /dev/mtd0
-crw- 1, 5 /dev/zero
-crw- 3, 3 /dev/ttyp3
-crw- 3, 2 /dev/ttyp2
-crw- 3, 1 /dev/ttyp1
-crw- 3, 0 /dev/ttyp0
-crw- 2, 3 /dev/ptyp3
-crw- 2, 2 /dev/ptyp2
-crw- 2, 1 /dev/ptyp1
-crw- 2, 0 /dev/ptyp0
-crw- 5, 0 /dev/tty
-crw- 4, 65 /dev/ttyS01
-crw- 4, 64 /dev/ttyS00
-crw- 4, 3 /dev/tty3
-crw- 4, 2 /dev/tty2
-crw- 4, 1 /dev/tty1
-crw- 4, 0 /dev/tty0
-crw- 5, 1 /dev/console
-brw- 1, 7 /dev/ram3
-brw- 1, 6 /dev/ram2
-brw- 1, 1 /dev/ram1
-brw- 1, 0 /dev/ram0
-crw- 1, 3 /dev/null
-crw- 1, 2 /dev/kmem
-crw- 1, 1 /dev/mem
-crw- 10, 130 /dev/watchdog
-crw- 230, 10 /dev/vin0
-crw- 230, 11 /dev/vin1
-crw- 230, 12 /dev/vin2
+# add device nodes here
+dir /dev 0755 0 0
+nod /dev/console 666 0 0 c 5 1
+nod /dev/mtdblock0 666 0 0 b 31 0
+nod /dev/mtdblock1 666 0 0 b 31 1
+nod /dev/mtdblock2 666 0 0 b 31 2
+nod /dev/mtdblock3 666 0 0 b 31 3
+nod /dev/mtdr5 444 0 0 c 90 11
+nod /dev/mtd5 666 0 0 c 90 10
+nod /dev/mtdr4 444 0 0 c 90 9
+nod /dev/mtd4 666 0 0 c 90 8
+nod /dev/mtdr3 444 0 0 c 90 7
+nod /dev/mtd3 666 0 0 c 90 6
+nod /dev/mtdr2 444 0 0 c 90 5
+nod /dev/mtd2 666 0 0 c 90 4
+nod /dev/mtdr1 444 0 0 c 90 3
+nod /dev/mtd1 666 0 0 c 90 2
+nod /dev/mtdr0 444 0 0 c 90 1
+nod /dev/mtd0 666 0 0 c 90 0
+nod /dev/zero 666 0 0 c 1 5
+nod /dev/ttyp2 666 0 0 c 3 2
+nod /dev/ttyp1 666 0 0 c 3 1
+nod /dev/ttyp0 666 0 0 c 3 0
+nod /dev/ptyp3 666 0 0 c 2 3
+nod /dev/ptyp2 666 0 0 c 2 2
+nod /dev/ptyp1 666 0 0 c 2 1
+nod /dev/ptyp0 666 0 0 c 2 0
+nod /dev/tty 666 0 0 c 5 0
+nod /dev/ttyS01 666 0 0 c 4 65
+nod /dev/ttyS00 666 0 0 c 4 64
+nod /dev/tty3 666 0 0 c 4 3
+nod /dev/tty2 666 0 0 c 4 2
+nod /dev/tty1 666 0 0 c 4 1
+nod /dev/tty0 666 0 0 c 4 0
+nod /dev/ram3 666 0 0 b 1 7
+nod /dev/ram2 666 0 0 b 1 6
+nod /dev/ram1 666 0 0 b 1 1
+nod /dev/ram0 666 0 0 b 1 0
+nod /dev/null 666 0 0 c 1 3
+nod /dev/kmem 666 0 0 c 1 2
+nod /dev/mem 666 0 0 c 1 1
+nod /dev/watchdog 666 0 0 c 10 130
+nod /dev/vin0 666 0 0 c 230 10
+nod /dev/vin1 666 0 0 c 230 11
+nod /dev/vin2 666 0 0 c 230 12
diff --git a/linux-tools/rootfs/dir.txt b/linux-tools/rootfs/dir.txt
new file mode 100644
index 0000000000..13a99112ec
--- /dev/null
+++ b/linux-tools/rootfs/dir.txt
@@ -0,0 +1,38 @@
+# add new direcories here
+dir /bin 0755 0 0
+dir /etc 0755 0 0
+dir /etc/config 0755 0 0
+dir /etc/network 0755 0 0
+dir /etc/network/if-down.d 0755 0 0
+dir /etc/network/if-post-down.d 0755 0 0
+dir /etc/network/if-pre-up.d 0755 0 0
+dir /etc/network/if-up.d 0755 0 0
+dir /etc/plc 0755 0 0
+dir /etc/rcS.d 0755 0 0
+dir /etc/udhcpc 0755 0 0
+dir /lib 0755 0 0
+dir /lib/modules 0755 0 0
+dir /mnt 0755 0 0
+dir /mnt/flashdisk 0755 0 0
+dir /net 0755 0 0
+dir /proc 0755 0 0
+dir /root 0755 0 0
+dir /sbin 0755 0 0
+dir /share 0755 0 0
+dir /sys 0755 0 0
+dir /tmp 0755 0 0
+dir /usr 0755 0 0
+dir /usr/bin 0755 0 0
+dir /usr/lib 0755 0 0
+dir /usr/lib/boa 0755 0 0
+dir /usr/share 0755 0 0
+dir /usr/share/www 0755 0 0
+dir /usr/share/cgi-bin 0755 0 0
+dir /usr/share/udhcpc 0755 0 0
+dir /var 0755 0 0
+dir /var/lock 0755 0 0
+dir /var/lock/subsys 0755 0 0
+dir /var/log 0755 0 0
+dir /var/run 0755 0 0
+dir /var/state 0755 0 0
+
diff --git a/linux-tools/rootfs/fill_99voip b/linux-tools/rootfs/fill_97voip
index 7ecaadeda3..39dbc3dc36 100755
--- a/linux-tools/rootfs/fill_99voip
+++ b/linux-tools/rootfs/fill_97voip
@@ -1,15 +1,8 @@
#!/bin/sh
-cat <<HereDoc
-
- **********************
-*SVJETSKI MEGA PALAMAR!*
- **********************
-HereDoc
-
cat > $1 <<HereDoc
#! /bin/sh
-# /etc/rcS.d/99voip
+# /etc/rcS.d/97voip
#
# Start VoIP package
HereDoc
diff --git a/linux-tools/rootfs/image/NOPRUNE b/linux-tools/rootfs/image/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/bin/NOPRUNE b/linux-tools/rootfs/image/bin/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/bin/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/dev/NOPRUNE b/linux-tools/rootfs/image/dev/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/dev/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/NOPRUNE b/linux-tools/rootfs/image/etc/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/config/NOPRUNE b/linux-tools/rootfs/image/etc/config/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/config/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/network/NOPRUNE b/linux-tools/rootfs/image/etc/network/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/network/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/network/if-down.d/NOPRUNE b/linux-tools/rootfs/image/etc/network/if-down.d/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/network/if-down.d/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/network/if-post-down.d/NOPRUNE b/linux-tools/rootfs/image/etc/network/if-post-down.d/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/network/if-post-down.d/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/network/if-pre-up.d/NOPRUNE b/linux-tools/rootfs/image/etc/network/if-pre-up.d/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/network/if-pre-up.d/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/network/if-up.d/NOPRUNE b/linux-tools/rootfs/image/etc/network/if-up.d/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/network/if-up.d/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/plc/NOPRUNE b/linux-tools/rootfs/image/etc/plc/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/plc/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/rcS.d/99voip b/linux-tools/rootfs/image/etc/rcS.d/99voip
deleted file mode 100755
index d5804bd07e..0000000000
--- a/linux-tools/rootfs/image/etc/rcS.d/99voip
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-# /etc/rcS.d/99voip
-#
-# Start VoIP package
-
-[ -f /lib/modules/drv_vinetic.ko ] || exit 0
-echo "Mounting VoIP daughter board..."
-insmod /lib/modules/drv_vinetic.ko
-rm /lib/modules/drv_vinetic.ko
-
-[ -f /bin/voipdemo ] || exit 0
-echo "Starting an SIP endpoint for each phone channel..."
-/bin/voipdemo &
-rm -f /bin/voipdemo
-
-
-
diff --git a/linux-tools/rootfs/image/etc/rcS.d/NOPRUNE b/linux-tools/rootfs/image/etc/rcS.d/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/rcS.d/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/etc/udhcpc/NOPRUNE b/linux-tools/rootfs/image/etc/udhcpc/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/etc/udhcpc/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/lib/NOPRUNE b/linux-tools/rootfs/image/lib/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/lib/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/lib/modules/NOPRUNE b/linux-tools/rootfs/image/lib/modules/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/lib/modules/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/mnt/NOPRUNE b/linux-tools/rootfs/image/mnt/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/mnt/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/mnt/flashdisk/NOPRUNE b/linux-tools/rootfs/image/mnt/flashdisk/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/mnt/flashdisk/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/mnt/ramdisk/NOPRUNE b/linux-tools/rootfs/image/mnt/ramdisk/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/mnt/ramdisk/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/net/NOPRUNE b/linux-tools/rootfs/image/net/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/net/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/proc/NOPRUNE b/linux-tools/rootfs/image/proc/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/proc/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/root/NOPRUNE b/linux-tools/rootfs/image/root/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/root/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/sbin/NOPRUNE b/linux-tools/rootfs/image/sbin/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/sbin/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/share/NOPRUNE b/linux-tools/rootfs/image/share/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/share/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/sys/NOPRUNE b/linux-tools/rootfs/image/sys/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/sys/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/tmp/NOPRUNE b/linux-tools/rootfs/image/tmp/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/tmp/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/usr/NOPRUNE b/linux-tools/rootfs/image/usr/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/usr/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/usr/bin/NOPRUNE b/linux-tools/rootfs/image/usr/bin/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/usr/bin/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/usr/lib/boa/NOPRUNE b/linux-tools/rootfs/image/usr/lib/boa/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/usr/lib/boa/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/usr/sbin/NOPRUNE b/linux-tools/rootfs/image/usr/sbin/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/usr/sbin/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/usr/share/NOPRUNE b/linux-tools/rootfs/image/usr/share/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/usr/share/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/NOPRUNE b/linux-tools/rootfs/image/var/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/lock/NOPRUNE b/linux-tools/rootfs/image/var/lock/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/lock/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/lock/subsys/NOPRUNE b/linux-tools/rootfs/image/var/lock/subsys/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/lock/subsys/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/log/NOPRUNE b/linux-tools/rootfs/image/var/log/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/log/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/run/NOPRUNE b/linux-tools/rootfs/image/var/run/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/run/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/image/var/state/NOPRUNE b/linux-tools/rootfs/image/var/state/NOPRUNE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/linux-tools/rootfs/image/var/state/NOPRUNE
+++ /dev/null
diff --git a/linux-tools/rootfs/link.sh b/linux-tools/rootfs/link.sh
deleted file mode 100755
index 9d7e489e6b..0000000000
--- a/linux-tools/rootfs/link.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-TMP_IMAGE=$1
-
-while read DST SRC;
-do
- ln -fs $SRC $TMP_IMAGE/$DST;
-# echo "$SRC $TMP_IMAGE$DST"
-done
diff --git a/linux-tools/rootfs/link_busybox.sh b/linux-tools/rootfs/link_busybox.sh
index b56a894ca9..72bdfa6b48 100755
--- a/linux-tools/rootfs/link_busybox.sh
+++ b/linux-tools/rootfs/link_busybox.sh
@@ -1,9 +1,9 @@
#!/bin/bash
-TMP_IMAGE=$1
+INITRAMFS_LIST=$1
while read DST;
do
- ln -fs /bin/busybox $TMP_IMAGE/$DST;
+ echo "slink $DST /bin/busybox 0777 0 0" >> $INITRAMFS_LIST;
# echo "$SRC $TMP_IMAGE$DST"
done
diff --git a/linux-tools/rootfs/lnk.txt b/linux-tools/rootfs/lnk.txt
index 4104f6f0ee..4ec3750d01 100644
--- a/linux-tools/rootfs/lnk.txt
+++ b/linux-tools/rootfs/lnk.txt
@@ -1,13 +1,13 @@
-/dev/ramdisk /dev/ram0
-/dev/root /dev/ram0
-/usr/local /mnt/flashdisk
-/etc/passwd /usr/local/etc/passwd
-/etc/config/network /usr/local/etc/config/network
-/etc/network/interfaces /usr/local/etc/network/interfaces
-/etc/plc/sysctl.conf /usr/local/etc/plc/sysctl.conf
-/etc/sysctl.conf /usr/local/etc/sysctl.conf
-/etc/udhcpd.bssid /usr/local/etc/udhcpd.bssid
-/etc/udhcpd.conf /usr/local/etc/udhcpd.conf
-/usr/bin/testudp /bin/mesbox
-/usr/bin/testraw /bin/mesbox
-/usr/bin/ber /bin/mesbox
+# add new symbolic links here
+slink /usr/local /mnt/flashdisk 777 0 0
+slink /etc/passwd /usr/local/etc/passwd 777 0 0
+slink /etc/config/network /usr/local/etc/config/network 777 0 0
+slink /etc/network/interfaces /usr/local/etc/network/interfaces 777 0 0
+slink /etc/plc/sysctl.conf /usr/local/etc/plc/sysctl.conf 777 0 0
+slink /etc/sysctl.conf /usr/local/etc/sysctl.conf 777 0 0
+slink /etc/udhcpd.bssid /usr/local/etc/udhcpd.bssid 777 0 0
+slink /etc/udhcpd.conf /usr/local/etc/udhcpd.conf 777 0 0
+slink /usr/bin/testudp /bin/mesbox 777 0 0
+slink /usr/bin/testraw /bin/mesbox 777 0 0
+slink /usr/bin/ber /bin/mesbox 777 0 0
+slink /etc/resolv.conf /mnt/flashdisk/resolv.conf 777 0 0
diff --git a/linux-tools/rootfs/image/root/.profile b/linux-tools/rootfs/profile
index ca903dde59..ca903dde59 100644
--- a/linux-tools/rootfs/image/root/.profile
+++ b/linux-tools/rootfs/profile
diff --git a/linux-tools/rootfs/scr.txt b/linux-tools/rootfs/scr.txt
new file mode 100644
index 0000000000..3f295f5201
--- /dev/null
+++ b/linux-tools/rootfs/scr.txt
@@ -0,0 +1,18 @@
+# add bootup scripts here
+file /rc.init ../linux-tools/rootfs/scripts/rc.init 0755 0 0
+file /etc/rc.reboot ../linux-tools/rootfs/scripts/rc.reboot 0755 0 0
+file /etc/rc.sysinit ../linux-tools/rootfs/scripts/rc.sysinit 0755 0 0
+file /etc/rcS ../linux-tools/rootfs/scripts/rcS 0755 0 0
+file /etc/syslog.conf ../linux-tools/rootfs/scripts/syslog.conf 0644 0 0
+file /etc/protocols ../linux-tools/rootfs/scripts/protocols 0644 0 0
+file /etc/inittab ../linux-tools/rootfs/scripts/inittab 0644 0 0
+file /etc/nsswitch.conf ../linux-tools/rootfs/scripts/nsswitch.conf 0644 0 0
+file /etc/host.conf ../linux-tools/rootfs/scripts/host.conf 0644 0 0
+file /etc/hosts ../linux-tools/rootfs/scripts/hosts 0644 0 0
+file /etc/group ../linux-tools/rootfs/scripts/group 0644 0 0
+file /etc/fstab ../linux-tools/rootfs/scripts/fstab 0644 0 0
+file /sbin/bridge ../linux-tools/rootfs/scripts/bridge 0755 0 0
+file /sbin/plcfree ../linux-tools/rootfs/scripts/plcfree 0755 0 0
+file /root/.profile ../linux-tools/rootfs/profile 0644 0 0
+file /usr/share/udhcpc/default.script ../linux-tools/udhcp/default.script 0755 0 0
+
diff --git a/linux-tools/rootfs/image/sbin/bridge b/linux-tools/rootfs/scripts/bridge
index 10000a5fc4..10000a5fc4 100644..100755
--- a/linux-tools/rootfs/image/sbin/bridge
+++ b/linux-tools/rootfs/scripts/bridge
diff --git a/linux-tools/rootfs/image/etc/fstab b/linux-tools/rootfs/scripts/fstab
index 06655ce8cf..2fa38eaeea 100644
--- a/linux-tools/rootfs/image/etc/fstab
+++ b/linux-tools/rootfs/scripts/fstab
@@ -1,4 +1,3 @@
-/dev/ram0 / ext2 defaults 0 0
/dev/mtdblock2 /mnt/flashdisk jffs2 defaults 0 0
/proc /proc proc defaults 0 0
-/sys /sys sysfs defaults 0 0
+/sys /sys sysfs defaults 0 0
diff --git a/linux-tools/rootfs/image/etc/group b/linux-tools/rootfs/scripts/group
index 295907487b..295907487b 100644
--- a/linux-tools/rootfs/image/etc/group
+++ b/linux-tools/rootfs/scripts/group
diff --git a/linux-tools/rootfs/image/etc/host.conf b/linux-tools/rootfs/scripts/host.conf
index 1a8c1e1517..1a8c1e1517 100644
--- a/linux-tools/rootfs/image/etc/host.conf
+++ b/linux-tools/rootfs/scripts/host.conf
diff --git a/linux-tools/rootfs/image/etc/hosts b/linux-tools/rootfs/scripts/hosts
index 0ff5c00385..e804cf94f7 100644
--- a/linux-tools/rootfs/image/etc/hosts
+++ b/linux-tools/rootfs/scripts/hosts
@@ -6,7 +6,11 @@
192.168.92.42 lumbrosco
192.168.92.45 fronton
192.168.92.41 mondeuse
+192.168.100.124 kurgan
-
+192.168.101.120 milos
+192.168.101.17 cris1
+192.168.101.18 cris2
+192.168.101.19 cris3
diff --git a/linux-tools/rootfs/image/etc/inittab b/linux-tools/rootfs/scripts/inittab
index a05cf35439..a05cf35439 100644
--- a/linux-tools/rootfs/image/etc/inittab
+++ b/linux-tools/rootfs/scripts/inittab
diff --git a/linux-tools/rootfs/image/etc/nsswitch.conf b/linux-tools/rootfs/scripts/nsswitch.conf
index 6815878c0a..6815878c0a 100644
--- a/linux-tools/rootfs/image/etc/nsswitch.conf
+++ b/linux-tools/rootfs/scripts/nsswitch.conf
diff --git a/linux-tools/rootfs/image/sbin/plcfree b/linux-tools/rootfs/scripts/plcfree
index 4aca698fe5..9defe9ba61 100644..100755
--- a/linux-tools/rootfs/image/sbin/plcfree
+++ b/linux-tools/rootfs/scripts/plcfree
@@ -1,9 +1,7 @@
#!/bin/sh
+sysctl -w net.plc.nd.enable=0
sysctl -w net.plc.ce.enable=0
sysctl -w net.plc.cfp.enable=0
sysctl -w net.plc.cp.cw_min=0
sysctl -w net.plc.cp.cw_max=0
-
-if [ `/bin/wishlist` = "slave" ]; then
- killall wishlist
-fi
+sysctl -w net.plc.nd.period=0
diff --git a/linux-tools/rootfs/image/etc/protocols b/linux-tools/rootfs/scripts/protocols
index cdae16cd99..cdae16cd99 100644
--- a/linux-tools/rootfs/image/etc/protocols
+++ b/linux-tools/rootfs/scripts/protocols
diff --git a/linux-tools/rootfs/image/rc.init b/linux-tools/rootfs/scripts/rc.init
index 4883632a14..92290c2fee 100644..100755
--- a/linux-tools/rootfs/image/rc.init
+++ b/linux-tools/rootfs/scripts/rc.init
@@ -29,14 +29,14 @@ echo ""
echo ""
# Mount filesystems
-echo "Remounting root read-write...."
-mount -n -o remount,rw /
+#echo "Remounting root read-write...."
+#mount -n -o remount,rw /
# Clear mtab
>/etc/mtab
# Enter root into mtab
-mount -f /
+#mount -f /
# Let the 'real' rc.sysinit take over
exec /etc/rc.sysinit
diff --git a/linux-tools/rootfs/image/etc/rc.reboot b/linux-tools/rootfs/scripts/rc.reboot
index 51d55d7e0b..51d55d7e0b 100644..100755
--- a/linux-tools/rootfs/image/etc/rc.reboot
+++ b/linux-tools/rootfs/scripts/rc.reboot
diff --git a/linux-tools/rootfs/image/etc/rc.sysinit b/linux-tools/rootfs/scripts/rc.sysinit
index 427d2e36cc..427d2e36cc 100644..100755
--- a/linux-tools/rootfs/image/etc/rc.sysinit
+++ b/linux-tools/rootfs/scripts/rc.sysinit
diff --git a/linux-tools/rootfs/image/etc/rcS b/linux-tools/rootfs/scripts/rcS
index 5ecea16f86..5ecea16f86 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS
+++ b/linux-tools/rootfs/scripts/rcS
diff --git a/linux-tools/rootfs/image/etc/rcS.d/04wdd b/linux-tools/rootfs/scripts/rcS.d/04wdd
index 779c075b6a..779c075b6a 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/04wdd
+++ b/linux-tools/rootfs/scripts/rcS.d/04wdd
diff --git a/linux-tools/rootfs/image/etc/rcS.d/05syslogd b/linux-tools/rootfs/scripts/rcS.d/05syslogd
index ea2f038f76..ea2f038f76 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/05syslogd
+++ b/linux-tools/rootfs/scripts/rcS.d/05syslogd
diff --git a/linux-tools/rootfs/image/etc/rcS.d/06ape110 b/linux-tools/rootfs/scripts/rcS.d/06ape110
index 62847414e2..870f46a633 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/06ape110
+++ b/linux-tools/rootfs/scripts/rcS.d/06ape110
@@ -4,7 +4,6 @@
# Mount Ape110
[ -d /proc/net/eth ] && exit 0
-[ -f /lib/modules/ape110.ko ] || exit 0
echo "Mounting Ape110...."
insmod /lib/modules/ape110.ko
diff --git a/linux-tools/rootfs/image/etc/rcS.d/07rtai b/linux-tools/rootfs/scripts/rcS.d/07rtai
index eacb8c14af..610a832d78 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/07rtai
+++ b/linux-tools/rootfs/scripts/rcS.d/07rtai
@@ -5,8 +5,11 @@
echo "Mounting RTAI...."
insmod /lib/modules/rtai_hal.ko
+rm /lib/modules/rtai_hal.ko
insmod /lib/modules/rtai_up.ko
+rm /lib/modules/rtai_up.ko
insmod /lib/modules/rtai_timer_start.ko
+rm /lib/modules/rtai_timer_start.ko
touch /var/lock/subsys/rtai
diff --git a/linux-tools/rootfs/image/etc/rcS.d/08plc b/linux-tools/rootfs/scripts/rcS.d/08plc
index 91bf417c14..d10f5cb588 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/08plc
+++ b/linux-tools/rootfs/scripts/rcS.d/08plc
@@ -7,7 +7,7 @@
if [ ! \( -f /lib/modules/plc_drv.ko \) -a \( ! -f /usr/local/lib/modules/plc_drv.ko \) ]
then
- hostname SPiDCOM
+ hostname SPK200
exit 0
fi
@@ -30,6 +30,7 @@ then
fi
/sbin/sysctl -p /etc/sysctl.conf > /dev/null 2> /dev/null
+/bin/dconf
hostname `cat /proc/sys/net/plc/board_version`-`cat /proc/sys/net/plc/serial_number`
diff --git a/linux-tools/rootfs/image/etc/rcS.d/10network b/linux-tools/rootfs/scripts/rcS.d/10network
index f6b643f0ef..f6b643f0ef 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/10network
+++ b/linux-tools/rootfs/scripts/rcS.d/10network
diff --git a/linux-tools/rootfs/image/etc/rcS.d/12plcpost b/linux-tools/rootfs/scripts/rcS.d/12plcpost
index 90d61b97c8..90d61b97c8 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/12plcpost
+++ b/linux-tools/rootfs/scripts/rcS.d/12plcpost
diff --git a/linux-tools/rootfs/image/etc/rcS.d/15bridge b/linux-tools/rootfs/scripts/rcS.d/15bridge
index 4009c33aa8..4009c33aa8 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/15bridge
+++ b/linux-tools/rootfs/scripts/rcS.d/15bridge
diff --git a/linux-tools/rootfs/image/etc/rcS.d/16igmp b/linux-tools/rootfs/scripts/rcS.d/16igmp
index 0d0887b09f..0d0887b09f 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/16igmp
+++ b/linux-tools/rootfs/scripts/rcS.d/16igmp
diff --git a/linux-tools/rootfs/scripts/rcS.d/17_8021x b/linux-tools/rootfs/scripts/rcS.d/17_8021x
new file mode 100755
index 0000000000..c28a1eafa6
--- /dev/null
+++ b/linux-tools/rootfs/scripts/rcS.d/17_8021x
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Start of the hostapd on master or wpa_supplicant on slave
+# if 802.1x authentication is turned on
+
+temp1=`cat /proc/sys/net/plc/mode`
+temp2=`cat /proc/sys/net/plc/auth_8021x`
+
+if [ $temp2 = "1" ]
+then
+ if [ $temp1 = "master" ]
+ then
+ if [ -f /bin/hostapd ]
+ then
+ echo "Starting hostapd...."
+ /bin/hostapd /usr/local/etc/wired.conf > /dev/null &
+ fi
+ fi
+
+ if [ $temp1 = "slave" ]
+ then
+ if [ -f /bin/wpa_supplicant ]
+ then
+ echo "Starting wpa_supplicant...."
+ /bin/wpa_supplicant -c/usr/local/etc/wired8021x.conf -ibr0 > /dev/null &
+ fi
+ fi
+
+fi
+
+if [ -f /bin/hostapd ]
+then
+ rm /bin/hostapd
+fi
+
+if [ -f /bin/wpa_supplicant ]
+then
+ rm /bin/wpa_supplicant
+fi
+
+
diff --git a/linux-tools/rootfs/image/etc/rcS.d/20netfs b/linux-tools/rootfs/scripts/rcS.d/20netfs
index 855d120cfe..855d120cfe 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/20netfs
+++ b/linux-tools/rootfs/scripts/rcS.d/20netfs
diff --git a/linux-tools/rootfs/image/etc/rcS.d/30dhcpc b/linux-tools/rootfs/scripts/rcS.d/30dhcpc
index e9388e61c8..e9388e61c8 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/30dhcpc
+++ b/linux-tools/rootfs/scripts/rcS.d/30dhcpc
diff --git a/linux-tools/rootfs/image/etc/rcS.d/60telnetd b/linux-tools/rootfs/scripts/rcS.d/60telnetd
index 7e3050205a..7e3050205a 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/60telnetd
+++ b/linux-tools/rootfs/scripts/rcS.d/60telnetd
diff --git a/linux-tools/rootfs/image/etc/rcS.d/70snmp b/linux-tools/rootfs/scripts/rcS.d/70snmp
index 4ee0ba32b6..4ee0ba32b6 100755
--- a/linux-tools/rootfs/image/etc/rcS.d/70snmp
+++ b/linux-tools/rootfs/scripts/rcS.d/70snmp
diff --git a/linux-tools/rootfs/image/etc/rcS.d/80wishlist b/linux-tools/rootfs/scripts/rcS.d/80wishlist
index 76f65dbf3b..867e4f4ccf 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/80wishlist
+++ b/linux-tools/rootfs/scripts/rcS.d/80wishlist
@@ -6,8 +6,6 @@
[ -d /proc/net/plc ] || exit 0
-if [ -f /bin/wishlist ]; then
echo "Start wishlist daemon"
/bin/wishlist &
-fi
diff --git a/linux-tools/rootfs/image/etc/rcS.d/90safe-return b/linux-tools/rootfs/scripts/rcS.d/90safe-return
index 4256852281..4256852281 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/90safe-return
+++ b/linux-tools/rootfs/scripts/rcS.d/90safe-return
diff --git a/linux-tools/rootfs/image/etc/rcS.d/95ETH_MODE b/linux-tools/rootfs/scripts/rcS.d/95ETH_MODE
index e62ec599b5..38f5f67a4e 100644..100755
--- a/linux-tools/rootfs/image/etc/rcS.d/95ETH_MODE
+++ b/linux-tools/rootfs/scripts/rcS.d/95ETH_MODE
@@ -6,7 +6,6 @@
[ -f /etc/config/network ] && . /etc/config/network
[ -d /proc/net/eth ] || exit 0
-[ -f /lib/modules/ape110.ko ] || exit 0
if [ "$ETH_MODE" = "100FD" ]
then
diff --git a/linux-tools/rootfs/image/etc/rcS.d/98conn_server b/linux-tools/rootfs/scripts/rcS.d/98conn_server
index bc1f1b3743..bc1f1b3743 100755
--- a/linux-tools/rootfs/image/etc/rcS.d/98conn_server
+++ b/linux-tools/rootfs/scripts/rcS.d/98conn_server
diff --git a/linux-tools/rootfs/image/etc/rcS.d/97httpd b/linux-tools/rootfs/scripts/rcS.d/99httpd
index f8dabd4168..162575aea4 100755
--- a/linux-tools/rootfs/image/etc/rcS.d/97httpd
+++ b/linux-tools/rootfs/scripts/rcS.d/99httpd
@@ -1,33 +1,14 @@
#!/bin/sh
-
-# /etc/rcS.d/97httpd
+# /etc/rcS.d/99httpd
#
# Start HTTP server
-
[ -f /etc/config/network ] && . /etc/config/network
-
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
-
# check that the server is present
-if [ -x /bin/japach ];
-
-then
-
-# check that the config file is present
-[ -f /usr/local/etc/config/japach.conf ] || exit 0
-
-/bin/japach -c /usr/local/etc/config/japach.conf &
-
-else
-
[ -x /bin/boa ] || exit 0
-
# check that the config file is present
[ -f /etc/boa.conf ] || exit 0
-
echo "Starting http server"
/bin/boa &
-fi
-
diff --git a/linux-tools/rootfs/image/etc/syslog.conf b/linux-tools/rootfs/scripts/syslog.conf
index fabe694a82..fabe694a82 100644
--- a/linux-tools/rootfs/image/etc/syslog.conf
+++ b/linux-tools/rootfs/scripts/syslog.conf
diff --git a/linux-tools/rootfs/strip.sh b/linux-tools/rootfs/strip.sh
deleted file mode 100755
index 09cd72c740..0000000000
--- a/linux-tools/rootfs/strip.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-for i in $*; do
- if [ -f $i ]; then
- arm-uclinux-strip -s --remove-section=.note --remove-section=.comment $i;
- fi;
-done
diff --git a/linux-tools/udhcp/default.script b/linux-tools/udhcp/default.script
index a52a7f8122..63abbab4a6 100644
--- a/linux-tools/udhcp/default.script
+++ b/linux-tools/udhcp/default.script
@@ -2,6 +2,7 @@
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
+
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
@@ -9,31 +10,30 @@ RESOLV_CONF="/etc/resolv.conf"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
case "$1" in
- deconfig)
- /sbin/ifconfig $interface 0.0.0.0
- ;;
-
- renew|bound)
- /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
-
- if [ -n "$router" ] ; then
- echo "deleting routers"
- while route del default gw 0.0.0.0 dev $interface ; do
- :
- done
-
- for i in $router ; do
- route add default gw $i dev $interface
- done
- fi
-
- echo -n > $RESOLV_CONF
- [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
- for i in $dns ; do
- echo adding dns $i
- echo nameserver $i >> $RESOLV_CONF
- done
- ;;
+ deconfig)
+ /sbin/ifconfig $interface 0.0.0.0
+ ;;
+
+ renew|bound)
+
+ echo adding IP = $ip, netmask = $subnet
+ /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+
+ if [ -n "$router" ] ; then
+ for i in $router ; do
+ echo adding router = $i
+ /sbin/route add default gw $i dev $interface
+ done
+
+ fi
+
+ echo -n > $RESOLV_CONF
+ [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
+ for i in $dns ; do
+ echo adding dns = $i
+ echo nameserver $i >> $RESOLV_CONF
+ done
+ ;;
esac
exit 0
diff --git a/linux-tools/udhcp/script.c b/linux-tools/udhcp/script.c
index ebd3a1dbee..ae4b793c27 100644
--- a/linux-tools/udhcp/script.c
+++ b/linux-tools/udhcp/script.c
@@ -134,7 +134,7 @@ static void fill_options(char *dest, uint8_t *option, struct dhcp_option *type_p
static char **fill_envp(struct dhcpMessage *packet)
{
int num_options = 0;
- int i, j, k;
+ int i, j;
char **envp;
uint8_t *temp;
struct in_addr subnet;
@@ -158,18 +158,18 @@ static char **fill_envp(struct dhcpMessage *packet)
envp = xcalloc(sizeof(char *), num_options + 5);
j = 0;
- asprintf(&envp[j++], "%s", client_config.interface);
+ asprintf(&envp[j++], "%s=%s", "interface", client_config.interface);
asprintf(&envp[j++], "%s=%s", "PATH",
getenv("PATH") ? : "/bin:/usr/bin:/sbin:/usr/sbin");
asprintf(&envp[j++], "%s=%s", "HOME", getenv("HOME") ? : "/");
if (packet == NULL) return envp;
- envp[j] = xmalloc(sizeof("255.255.255.255"));
+ envp[j] = xmalloc(sizeof("255.255.255.255") + 3);
- k = j;
- sprintip(envp[j++], "", (uint8_t *) &packet->yiaddr);
- printf("obtained IP = %s \n",envp[k]);
+ //k = j;
+ sprintip(envp[j++], "ip=", (uint8_t *) &packet->yiaddr);
+ //printf("obtained IP = %s \n",envp[k]);
for (i = 0; dhcp_options[i].code; i++) {
@@ -208,7 +208,7 @@ void run_script(struct dhcpMessage *packet, const char *name)
{
int pid;
char **envp, **curr;
- char *ARGS[] = { "ifconfig", "", "", NULL };
+ //char *ARGS[] = { "ifconfig", "", "", NULL };
if (client_config.script == NULL)
@@ -218,8 +218,8 @@ void run_script(struct dhcpMessage *packet, const char *name)
DEBUG(LOG_INFO, "vforking and execvp'ing %s", client_config.script);
envp = fill_envp(packet);
- ARGS[1] = envp[0];
- ARGS[2] = envp[3];
+/* ARGS[1] = envp[0]; */
+/* ARGS[2] = envp[3]; */
/* call script */
pid = vfork();
@@ -232,8 +232,12 @@ void run_script(struct dhcpMessage *packet, const char *name)
/* close fd's? */
/* exec script */
- execvp("/sbin/ifconfig", ARGS);
- LOG(LOG_ERR, "script %s failed", client_config.script);
- exit(1);
+/* execvp("/sbin/ifconfig", ARGS); */
+/* LOG(LOG_ERR, "script %s failed", client_config.script); */
+/* exit(1); */
+ if (execle(client_config.script, "default.script", name, 0, envp) < 0) {
+ LOG(LOG_ERR, "script %s failed", client_config.script);
+ exit(1);
+ }
}
}
diff --git a/linux-tools/wishlist/inc/mlme.h b/linux-tools/wishlist/inc/mlme.h
index 0b71c6b69f..e52dbe5af7 100644
--- a/linux-tools/wishlist/inc/mlme.h
+++ b/linux-tools/wishlist/inc/mlme.h
@@ -9,4 +9,12 @@ extern int mlme_probe(int bssid, int tei, int nb_sent, struct report_t **reports
extern int mlme_assoc(char *mac_addr, int nb_sent);
+#ifdef PLC_RECOVERY
+extern int write_recovery();
+
+extern int need_recovery();
+
+extern int start_recovery();
+#endif // PLC_RECOVERY
+
#endif // __MLME_H
diff --git a/linux-tools/wishlist/src/mlme.c b/linux-tools/wishlist/src/mlme.c
index be1d87d0f8..7bb4849ba7 100644
--- a/linux-tools/wishlist/src/mlme.c
+++ b/linux-tools/wishlist/src/mlme.c
@@ -20,6 +20,9 @@
#define IEEE802_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define IEEE802_VAL(mac) (mac)[0], (mac)[1], (mac)[2], (mac)[3], (mac)[4], (mac)[5]
+#ifdef PLC_RECOVERY
+#define RECOVERY_FILE "/usr/local/etc/recovery.conf"
+#endif
int send_ioctl(union plcbox_t *plcbox)
{
@@ -254,3 +257,91 @@ int mlme_disassoc(union plcbox_t *plcbox, int argc, char **argv)
return 0;
}
#endif
+
+#ifdef PLC_RECOVERY
+int write_recovery()
+{
+ union plcbox_t plcbox;
+ FILE *recovery_file;
+ int i,j;
+ bool write;
+
+ // request scanning to nd
+ plcbox.iocmd = IOCCMD_WRITE_RECOVERY;
+ send_ioctl(&plcbox);
+
+ if (!(recovery_file = fopen(RECOVERY_FILE, "w")))
+ {
+ fprintf(stderr, "can't open %s\n",RECOVERY_FILE);
+ exit(0);
+ }
+
+ fprintf(recovery_file, "%d\n", plcbox.recovery.nb_hosts);
+ for (i=0; i<PLCP_MAX_HOST-1; i++)
+ {
+ write = 0;
+ for (j=0; j<6; j++)
+ {
+ if (plcbox.recovery.mac_addr[i][j]!=0)
+ {
+ write = 1;
+ break;
+ }
+ }
+
+ if (write == 1)
+ fprintf(recovery_file, "%02x:%02x:%02x:%02x:%02x:%02x\n", IEEE802_VAL(plcbox.recovery.mac_addr[i]));
+ }
+
+ fclose(recovery_file);
+ return 0;
+}
+
+int need_recovery()
+{
+ union plcbox_t plcbox;
+
+ plcbox.iocmd=IOCCMD_NEED_RECOVERY;
+ send_ioctl(&plcbox);
+
+ if (plcbox.recovery.recovery_flag == 1)
+ return 1;
+ else
+ return 0;
+}
+
+int start_recovery()
+{
+ FILE *recovery_file;
+ union plcbox_t plcbox;
+ int i, j, nb_hosts;
+ int mac_addr[6];
+
+ if (!(recovery_file = fopen(RECOVERY_FILE, "r")))
+ {
+ fprintf(stderr, "can't open %s\n",RECOVERY_FILE);
+ exit(0);
+ }
+
+ fscanf(recovery_file, "%d\n", &nb_hosts);
+ plcbox.recovery.nb_hosts = (char)nb_hosts;
+
+ for (i=0; i<nb_hosts; i++)
+ {
+ fscanf(recovery_file, "%02x:%02x:%02x:%02x:%02x:%02x\n",
+ &mac_addr[0], &mac_addr[1], &mac_addr[2],
+ &mac_addr[3], &mac_addr[4], &mac_addr[5]);
+
+
+ for (j=0; j<6; j++)
+ plcbox.recovery.mac_addr[i][j] = (char)mac_addr[j];
+ }
+
+ fclose(recovery_file);
+
+ plcbox.iocmd=IOCCMD_START_RECOVERY;
+ send_ioctl(&plcbox);
+
+ return 0;
+}
+#endif // PLC_RECOVERY
diff --git a/linux-tools/wishlist/src/wishlist.c b/linux-tools/wishlist/src/wishlist.c
index a9224e49e9..7a8804639c 100644
--- a/linux-tools/wishlist/src/wishlist.c
+++ b/linux-tools/wishlist/src/wishlist.c
@@ -2,9 +2,9 @@
HEADER
--------------------------------------------------------------------------------
$RCSfile: wishlist.c,v $
- $Revision: 1.14.2.2 $
- $Author: glomeron $
- $Date: 2007/03/20 08:36:20 $
+ $Revision: 1.14.2.2.2.1 $
+ $Author: carre $
+ $Date: 2007/11/21 16:30:53 $
Copyright (C) 2005 by SPiDCOM Technologies. All rights reserved.
--------------------------------------------------------------------------------*/
@@ -31,7 +31,9 @@
#define BSSID_UNDEF 0x6
#define BSSID_ANY 0x7
#define TEI_ALL_CELL 0xff
-
+#ifdef PLC_RECOVERY
+#define NB_RECOVERY_RETRY 10
+#endif
#define MAX_PREFERRED 6
FILE * logfile;
@@ -46,8 +48,6 @@ int mode_sysctl[] = {CTL_NET, NET_PLC, PLC_MODE};
int bssid_sysctl[] = {CTL_NET, NET_PLC, PLC_BSSID};
/* Check wishlist */
int pbssid_sysctl[] = {CTL_NET, NET_PLC, PLC_PREFERRED_BSSID};
-/* SID_sysctl */
-int sid_sysctl[] = {CTL_NET, NET_PLC, PLC_SNID};
int trace = 0;
@@ -198,40 +198,54 @@ static void scan_and_associate(void)
}
}
-// increment SID in case of master mode
-static void store_SNID(int SNID)
-{
- FILE *f;
-
- system("grep -v \"net.plc.SNID\" /usr/local/etc/sysctl.conf > /tmp/sysctl1.conf");
- if (f=fopen("/tmp/sysctl2.conf","w"))
- {
- fprintf(f,"net.plc.SNID=%d\n",SNID);
- fclose(f);
- system("cat /tmp/sysctl1.conf /tmp/sysctl2.conf > /usr/local/etc/sysctl.conf");
- unlink("/tmp/sysctl2.conf");
- }
- unlink("/tmp/sysctl1.conf");
-}
-
static void start_head_end(void)
{
// char *ARGSD[] = { "udhcpd", NULL };
int pid;
+ int retry;
logwrite(logfile, "Head end detected\n");
/* create child to launch udhcpd process */
pid = vfork();
if (pid)
{
- /* Nothing to do just close the wishlist process */
+#ifdef PLC_RECOVERY
+ logwrite(logfile, "Recovery proccess has been started!\n");
+
+ retry = NB_RECOVERY_RETRY;
+
+ while(retry>0)
+ {
+ retry--;
+ start_recovery();
+
+ // Retry after 3 seconds.
+ usleep(3000000);
+ }
+
+
+ while(1)
+ {
+ // Check if recovery.conf file have to to be updated ...
+ if (need_recovery())
+ {
+ // ... and update it.
+ write_recovery();
+ }
+
+ // Wait for 5 min and check again.
+ usleep(300000000);
+
+ }
+#endif
+ /* Nothing to do just close the wishlist process */
terminate = 1;
}
else if (pid == 0)
{
- /* exec udhcpd */
+ /* exec udhcpd */
// execvp("/bin/udhcpd", ARGSD);
// logwrite(logfile, "udhcpd as failed\n");
exit(1);
@@ -480,15 +494,7 @@ int main(int argc, char **argv)
if(strcmp(buffer,"master") == 0 && strcmp(buffer3,"0") == 0)
{
- char buf[32];
- int SNID;
-
logwrite(logfile, "Head end start session\n");
-
- read_sysctl(sid_sysctl, buf, 32);
- SNID=atoi(buf);
- printf("read sysctl SNID=%d\n",SNID);
- store_SNID(SNID+1);
}
/*Daemon start*/
diff --git a/linux-tools/wpa_supplicant-0.4.8/.config b/linux-tools/wpa_supplicant-0.4.8/.config
index 7d2be30d53..c961d6810a 100644
--- a/linux-tools/wpa_supplicant-0.4.8/.config
+++ b/linux-tools/wpa_supplicant-0.4.8/.config
@@ -17,10 +17,10 @@
# Example configuration for various cross-compilation platforms
-#CC=arm-uclinux-gcc
-#CFLAGS += -DHOSTAPD_DUMP_STATE -DCONFIG_TINA_C -march=armv5 -msoft-float
-#CFLAGS += -I. -I$(DIR_HOSTAP) -I../utils -I$(DIR_WPA_SUPPLICANT) -I$(DIR_OPENSSL)
-#CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/local/toolchains/arm-uclinux/arm-uclinux/include
+CC=arm-uclinux-gcc
+CFLAGS += -DHOSTAPD_DUMP_STATE -DCONFIG_TINA_C -march=armv5 -msoft-float
+CFLAGS += -I. -I$(DIR_HOSTAP) -I../utils -I$(DIR_WPA_SUPPLICANT) -I$(DIR_OPENSSL)
+CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/local/toolchains/arm-uclinux/arm-uclinux/include
#### sveasoft (e.g., for Linksys WRT54G) ######################################
@@ -116,7 +116,7 @@ CONFIG_EAP_MD5=y
#CONFIG_EAP_PEAP=y
# EAP-TTLS
-CONFIG_EAP_TTLS=y
+#CONFIG_EAP_TTLS=y
# EAP-GTC
#CONFIG_EAP_GTC=y
@@ -171,7 +171,7 @@ CONFIG_CTRL_IFACE=y
# This can be used to reduce the size of the wpa_supplicant considerably
# if debugging code is not needed. The size reduction can be around 35%
# (e.g., 90 kB).
-#CONFIG_NO_STDOUT_DEBUG=y
+CONFIG_NO_STDOUT_DEBUG=y
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
# 35-50 kB in code size.
diff --git a/linux-tools/wpa_supplicant-0.4.8/wired8021x.conf b/linux-tools/wpa_supplicant-0.4.8/wired8021x.conf
index 36d535dc13..ab9aea31fc 100644
--- a/linux-tools/wpa_supplicant-0.4.8/wired8021x.conf
+++ b/linux-tools/wpa_supplicant-0.4.8/wired8021x.conf
@@ -1,54 +1,13 @@
+# IEEE 802.1X with EAP-MD5
+
ctrl_interface=/var/run/wpa_supplicant
-ctrl_interface_group=0
ap_scan=0
-# IEEE 802.1X with EAP-MD5
-#network={
-# key_mgmt=IEEE8021X
-# eap=MD5
-# identity="user"
-# password="password"
-#}
-
-# EAP-TTLS/EAP-MD5-Challenge configuration with anonymous identity for the
-# unencrypted use. Real identity is sent only within an encrypted TLS tunnel.
network={
-# ssid="example"
key_mgmt=IEEE8021X
- eapol_flags=3
- eap=TTLS
- anonymous_identity="anonymous@example.com"
+ eap=MD5
identity="user"
password="password"
- ca_cert="/root/ca.pem"
- phase2="auth=MD5"
- priority=5
}
-# EAP-PEAP/MSCHAPv2 configuration for RADIUS servers that use the new peaplabel
-# (e.g., Radiator)
-#network={
-# ssid="example"
-# key_mgmt=WPA-EAP
-# eap=PEAP
-# identity="user"
-# password="password"
-# ca_cert="/root/ca.pem"
-# phase1="peaplabel=1"
-# phase2="auth=MSCHAPV2"
-# priority=10
-#}
-
-# EAP-TTLS/MSCHAPv2 configuration with anonymous identity for the unencrypted
-# use. Real identity is sent only within an encrypted TLS tunnel.
-#network={
-# ssid="example"
-# key_mgmt=WPA-EAP
-# eap=TTLS
-# identity="user"
-# password="password"
-# ca_cert="/root/ca.pem"
-# phase2="auth=MD5"
-# priority=2
-#}
diff --git a/linux-tools/wpa_supplicant-0.4.8/wpa_supplicant.c b/linux-tools/wpa_supplicant-0.4.8/wpa_supplicant.c
index 8aaef75cf4..7b03a702cd 100644
--- a/linux-tools/wpa_supplicant-0.4.8/wpa_supplicant.c
+++ b/linux-tools/wpa_supplicant-0.4.8/wpa_supplicant.c
@@ -200,7 +200,7 @@ static int wpa_supplicant_eapol_send(void *ctx, int type, const u8 *buf,
if (*(buf+4) == 1)
{
- printf("EAPOL->response IDENTITY => j'attends 1 seconde\n");
+ //printf("EAPOL->response IDENTITY => j'attends 1 seconde\n");
sleep(1);
}
/* TODO: could add l2_packet_sendmsg that allows fragments to avoid
diff --git a/rtai-3.1-2.6/rtai-core/arch/arm/defconfig b/rtai-3.1-2.6/rtai-core/arch/arm/defconfig
index e52f25a29b..b6e9ce9349 100644
--- a/rtai-3.1-2.6/rtai-core/arch/arm/defconfig
+++ b/rtai-3.1-2.6/rtai-core/arch/arm/defconfig
@@ -60,7 +60,7 @@ CONFIG_RTAI_MBX=y
#
# CONFIG_RTAI_MATH is not set
CONFIG_RTAI_MALLOC=y
-CONFIG_RTAI_MALLOC_HEAPSZ="2048"
+CONFIG_RTAI_MALLOC_HEAPSZ="2304"
# CONFIG_RTAI_TASKLETS is not set
# CONFIG_RTAI_TRACE is not set
# CONFIG_RTAI_WD is not set
diff --git a/rtai-3.1-2.6/rtai-core/arch/i386/defconfig b/rtai-3.1-2.6/rtai-core/arch/i386/defconfig
index e52f25a29b..b6e9ce9349 100644
--- a/rtai-3.1-2.6/rtai-core/arch/i386/defconfig
+++ b/rtai-3.1-2.6/rtai-core/arch/i386/defconfig
@@ -60,7 +60,7 @@ CONFIG_RTAI_MBX=y
#
# CONFIG_RTAI_MATH is not set
CONFIG_RTAI_MALLOC=y
-CONFIG_RTAI_MALLOC_HEAPSZ="2048"
+CONFIG_RTAI_MALLOC_HEAPSZ="2304"
# CONFIG_RTAI_TASKLETS is not set
# CONFIG_RTAI_TRACE is not set
# CONFIG_RTAI_WD is not set
diff --git a/tools/bundle/Makefile b/tools/bundle/Makefile
index 1ea5059401..20ddc8a468 100644
--- a/tools/bundle/Makefile
+++ b/tools/bundle/Makefile
@@ -1,8 +1,8 @@
RELEASE=`./release.sh`
-
+TMP_IMG=`/tmp/bundle`
clean :
- rm -f $(RELEASE)-SPC200-e-32M.bin
+#rm -f $(RELEASE)-SPC200-e-32M.bin
rm -f SPiDBundle-SPC200-e.tar
rm -f SPiDBundle-SPC200-e.tar.bz2
@@ -18,12 +18,12 @@ binaries32:
cd ../../linux-2.6.10; \
make all; \
cd ../tools/bundle;
- cp ../../linux-tools/rootfs/initrd.efs2.gz /tmp/bundle/binaries/initrd_32M.efs2.gz
+# cp ../../linux-tools/rootfs/initrd.efs2.gz /tmp/bundle/binaries/initrd_32M.efs2.gz
cp ../../app/obj/rt_cristina/plc_drv.ko /tmp/bundle/binaries/plc_drv_32M.ko
cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko /tmp/bundle/binaries/
cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko /tmp/bundle/binaries/
cp ../../linux-tools/rtai-tests/rtai_timer_start.ko /tmp/bundle/binaries/
- cp ../../linux-2.6.10/arch/arm/boot/bootpImage ./$(RELEASE)-SPC200-e-32M.bin
+ cp ../../linux-2.6.10/arch/arm/boot/zImage ./$(RELEASE)-SPC200-e-32M.bin
mkdir -p /tmp/bundle/app/sm-lib/lib
cp ../../app/sm-lib/lib_ber.h /tmp/bundle/app/sm-lib/
cp ../../app/sm-lib/lib/libber.a /tmp/bundle/app/sm-lib/lib
@@ -33,12 +33,12 @@ binaries16:
./set_tinac.sh
./set_16M.sh
make -C ../../linux-2.6.10
- cp ../../linux-tools/rootfs/initrd.efs2.gz /tmp/bundle/binaries/initrd_16M.efs2.gz
+# cp ../../linux-tools/rootfs/initrd.efs2.gz /tmp/bundle/binaries/initrd_16M.efs2.gz
cp ../../app/obj/rt_cristina/plc_drv.ko /tmp/bundle/binaries/plc_drv_16M.ko
cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko /tmp/bundle/binaries/
cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko /tmp/bundle/binaries/
cp ../../linux-tools/rtai-tests/rtai_timer_start.ko /tmp/bundle/binaries/
- cp ../../linux-2.6.10/arch/arm/boot/bootpImage ./$(RELEASE)-SPC200-e-16M.bin
+ cp ../../linux-2.6.10/arch/arm/boot/zImage ./$(RELEASE)-SPC200-e-16M.bin
mkdir -p /tmp/bundle/app/sm-lib/lib
cp ../../app/sm-lib/lib_ber.h /tmp/bundle/app/sm-lib/
cp ../../app/sm-lib/lib/libber.a /tmp/bundle/app/sm-lib/lib
@@ -53,7 +53,7 @@ binariesPlab:
cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko /tmp/bundle/binaries/
cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko /tmp/bundle/binaries/
cp ../../linux-tools/rtai-tests/rtai_timer_start.ko /tmp/bundle/binaries/
- cp ../../linux-2.6.10/arch/arm/boot/bootpImage ./$(RELEASE)-SPC200-e-PLAB.bin
+ cp ../../linux-2.6.10/arch/arm/boot/zImage ./$(RELEASE)-SPC200-e-PLAB.bin
mkdir -p /tmp/bundle/app/sm-lib/lib
cp ../../app/sm-lib/lib_ber.h /tmp/bundle/app/sm-lib/
cp ../../app/sm-lib/lib/libber.a /tmp/bundle/app/sm-lib/lib
@@ -61,11 +61,14 @@ binariesPlab:
dist:
make mrproper -C ../../linux-2.6.10
cp -dpR ../../linux-2.6.10 /tmp/bundle
-# mv /tmp/bundle/linux-2.6.10/include/asm-arm/arch-spc2xx /tmp/bundle/linux-2.6.10/include/asm-arm/arch-spc2x
-# mv /tmp/bundle/linux-2.6.10/include/asm-arm/arch-spc2x /tmp/bundle/linux-2.6.10/include/asm-arm/arch-spc2XX
+ cp -dpR ../../voip /tmp/bundle
cp -dpR ../../include /tmp/bundle
mkdir /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/rootfs /tmp/bundle/linux-tools
+
+#create image dir on rootfs
+ ./mkimg.sh
+
cp -dpR ../../linux-tools/flashfs /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/bridge-utils-1.0.6 /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/boa-0.94.14rc18 /tmp/bundle/linux-tools
@@ -75,20 +78,22 @@ dist:
cp -dpR ../../linux-tools/udhcp /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/wdd /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/wishlist /tmp/bundle/linux-tools
+ cp -dpR ../../linux-tools/dconf /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/iptables /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/ebtables /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/tinyftp /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/ftpd /tmp/bundle/linux-tools
- cp -dpR ../../linux-tools/japach /tmp/bundle/linux-tools
+# cp -dpR ../../linux-tools/japach /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/igmp_filter /tmp/bundle/linux-tools
cp -dpR ../../linux-tools/uphp /tmp/bundle/linux-tools
+ cp -dpR ../../linux-tools/openssl /tmp/bundle/linux-tools
+ cp -dpR ../../linux-tools/hostapd /tmp/bundle/linux-tools
+ cp -dpR ../../linux-tools/wpa_supplicant-0.4.8 /tmp/bundle/linux-tools
mkdir /tmp/bundle/app/obj
cp -dpR ../../app/sm-agent /tmp/bundle/app
cp -dpR ../../app/sm-mib /tmp/bundle/app
cp -dpR ../../app/sm-bootTable /tmp/bundle/app
cp -dpR ../../app/sm-custom-mib /tmp/bundle/app
-# mv /tmp/bundle/app/sm-bootTable /tmp/bundle/app/sm-bootable
-# mv /tmp/bundle/app/sm-bootable /tmp/bundle/app/sm-boottable
mkdir -p /tmp/bundle/app/sm-plc-drv/inc
cp ../../app/Makefile_polux /tmp/bundle/app
cp ../../app/sm-plc-drv/plc_drv_if.h /tmp/bundle/app/sm-plc-drv
@@ -117,12 +122,13 @@ dist:
rm -f /tmp/bundle/linux-tools/busybox-1.00/scripts/split-include
make clean -C /tmp/bundle/linux-tools/busybox-1.00/scripts/config
#
- cd /tmp/bundle ; tar -cf SPiDBundle-SPC200-e.tar linux-2.6.10 include linux-tools app binaries
+ cd /tmp/bundle ; tar -cf SPiDBundle-SPC200-e.tar linux-2.6.10 include linux-tools app binaries voip
mv /tmp/bundle/SPiDBundle-SPC200-e.tar .
bzip2 SPiDBundle-SPC200-e.tar
bundle:
+ make clean
make set_rights
rm -rf /tmp/bundle
mkdir -p /tmp/bundle
diff --git a/tools/bundle/Makefile_Bundle b/tools/bundle/Makefile_Bundle
new file mode 100644
index 0000000000..4c51d629e5
--- /dev/null
+++ b/tools/bundle/Makefile_Bundle
@@ -0,0 +1,180 @@
+
+#if not already defined by a top level makefile
+ifndef ECHO
+ECHO = echo
+endif
+ifndef QUIET
+QUIET = @
+endif
+
+#DIR = $(PWD)
+DIR = .
+
+#include linux configuration for PLC conf
+include ../../linux-2.6.10/.config
+
+PLC_FILE = plc_drv_32M.ko
+
+IMAGE = image
+DEVFILE = $(DIR)/dev.txt
+LINKFILE = $(DIR)/lnk.txt
+DIRFILE = $(DIR)/dir.txt
+RAMFSLIST = initramfs_list
+
+all: clean copy
+
+# fill VoIP module init file
+ifeq ($(CONFIG_VOIP),y)
+ifeq ($(CONFIG_ARETHA),y)
+ @./fill_97voip $(IMAGE)/etc/rcS.d/97voip ARETHA;
+else
+ @./fill_97voip $(IMAGE)/etc/rcS.d/97voip SOPHIA;
+endif
+endif
+
+ $(QUIET)$(ECHO) "Appending to initramfs_list"
+ $(QUIET)cat $(DEVFILE) > $(RAMFSLIST)
+ $(QUIET)./check.sh $(IMAGE)
+ $(QUIET)cat $(LINKFILE) >> $(RAMFSLIST)
+ $(QUIET)echo "file /root/.profile ../linux-tools/rootfs/profile 0644 0 0" >> $(RAMFSLIST)
+ $(QUIET)chmod guo+x ./link_busybox.sh
+ $(QUIET)./link_busybox.sh $(RAMFSLIST) < ../busybox-1.00/busybox.links
+
+
+clean:
+ $(QUIET)echo "Cleaning "
+ $(QUIET)find $(IMAGE)/lib/modules -name "*.ko" -exec rm -f {} \; 2>/dev/null
+ $(QUIET)find $(IMAGE)/bin -type f -perm u=rwx,go=r -exec rm -f {} \; 2>/dev/null
+ $(QUIET)rm -rf $(IMAGE)/bin/messages ||true; 2>/dev/null
+ $(QUIET)rm -f $(IMAGE)/sbin/wdd || true
+ $(QUIET)rm -f $(IMAGE)/sbin/mrst ||true
+ $(QUIET)rm -rf $(IMAGE)/usr/share/www ||true
+ $(QUIET)rm -f $(IMAGE)/etc/boa.conf ||true ; 2>/dev/null
+ $(QUIET)rm -f $(IMAGE)/sbin/safe-return ||true
+ $(QUIET)rm -f $(RAMFSLIST)
+
+copy:
+ $(QUIET)echo "Copying :"
+ $(QUIET)$(ECHO) " rtai_hal.ko"
+ $(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko ]; \
+ then cp ../../rtai-3.1-2.6/rtai-core/arch/arm/hal/rtai_hal.ko $(IMAGE)/lib/modules; \
+ elif [ -f ../../binaries/rtai_hal.ko ]; \
+ then cp ../../binaries/rtai_hal.ko $(IMAGE)/lib/modules; \
+ else echo "Unable to find rtai_hal.ko"; \
+ fi
+ $(QUIET)$(ECHO) " rtai_up.ko"
+ $(QUIET)if [ -f ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko ]; \
+ then cp ../../rtai-3.1-2.6/rtai-core/sched/rtai/rtai_up.ko $(IMAGE)/lib/modules; \
+ elif [ -f ../../binaries/rtai_up.ko ]; \
+ then cp ../../binaries/rtai_up.ko $(IMAGE)/lib/modules; \
+ else echo "Unable to find rtai_up.ko"; \
+ fi
+ $(QUIET)$(ECHO) " rtai_timer_start.ko"
+ $(QUIET)if [ -f ../rtai-tests/rtai_timer_start.ko ]; \
+ then cp ../rtai-tests/rtai_timer_start.ko $(IMAGE)/lib/modules; \
+ elif [ -f ../../binaries/rtai_timer_start.ko ]; \
+ then cp ../../binaries/rtai_timer_start.ko $(IMAGE)/lib/modules; \
+ else echo "Unable to find rtai_timer_start.ko"; \
+ fi
+ $(QUIET)$(ECHO) " plc_drv.ko"
+ $(QUIET)if [ -f ../../app/obj/rt_cristina/plc_drv.ko ]; \
+ then cp ../../app/obj/rt_cristina/plc_drv.ko $(IMAGE)/lib/modules; \
+ elif [ -f ../../binaries/$(PLC_FILE) ]; \
+ then cp ../../binaries/$(PLC_FILE) $(IMAGE)/lib/modules/plc_drv.ko; \
+ else echo "Unable to find plc_drv.ko"; \
+ fi
+ $(QUIET)$(ECHO) " busybox"
+ $(QUIET)cp ../busybox-1.00/busybox $(IMAGE)/bin || true
+
+ $(QUIET)rm -rf $(IMAGE)/usr/sbin/*
+ifeq ($(CONFIG_PLC_HELPER_SCRIPTS),y)
+ $(QUIET)cp -dpR ../helper_scripts/* $(IMAGE)/usr/sbin || true
+endif
+ifeq ($(CONFIG_PLC_MEASURE),y)
+ $(QUIET)cp ../busybox-1.00/mesbox $(IMAGE)/bin || true
+endif
+ $(QUIET)$(ECHO) " brctl"
+ $(QUIET)cp ../bridge-utils-1.0.6/brctl/brctl $(IMAGE)/bin || true
+# the following features are disabled if compile with gdb debug symbols:
+# ebtables, tc, iptables, boa, tinyftp, ftpd, udhcp
+ $(QUIET)$(ECHO) " ebtables"
+ $(QUIET)cp ../ebtables/ebtables $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " tc"
+ $(QUIET)cp ../iproute2/tc/tc $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " boa"
+ $(QUIET)cp ../boa-0.94.14rc18/src/boa $(IMAGE)/bin || true
+ $(QUIET)cp ../boa-0.94.14rc18/src/boa_indexer $(IMAGE)/usr/lib/boa/boa_indexer || true
+ $(QUIET)$(ECHO) " uphp and example scripts"
+ $(QUIET)cp ../uphp/uphp $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " conn_server and conn_client tcp socket application on port 1818"
+ifeq (CONFIG_PLC_PPC,y)
+ $(QUIET)cp ../conn_socket/conn_server $(IMAGE)/bin || true
+ $(QUIET)cp ../conn_socket/conn_client $(IMAGE)/bin || true
+endif
+ $(QUIET)$(ECHO) " boa web server"
+ $(QUIET)cp -r ../boa-0.94.14rc18/spc200/www $(IMAGE)/usr/share || true
+ $(QUIET)cp -r ../boa-0.94.14rc18/spc200/cgi-bin $(IMAGE)/usr/share || true
+ $(QUIET)if [ -f ../boa-0.94.14rc18/spc200/boa.conf ]; then cp ../boa-0.94.14rc18/spc200/boa.conf $(IMAGE)/etc;fi
+ $(QUIET)$(ECHO) " dconf"
+ $(QUIET)cp ../dconf/dconf $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " tinyftp and tinyftpchild"
+ $(QUIET)cp ../tinyftp/tinyftp $(IMAGE)/bin || true
+ $(QUIET)cp ../tinyftp/tinyftpchild $(IMAGE)/bin || true
+ifeq (CONFIG_PLC_VPORT,y)
+# udhcp actually used for virtual port configuration
+ $(QUIET)$(ECHO) " udhcp"
+ $(QUIET)cp ../udhcp/udhcpd $(IMAGE)/bin || true
+ $(QUIET)cp ../udhcp/udhcpd.leases $(IMAGE)/etc || true
+ $(QUIET)cp ../udhcp/udhcpd.conf $(IMAGE)/etc || true
+endif
+ $(QUIET)cp ../udhcp/udhcpc $(IMAGE)/bin || true
+ $(QUIET)cp ../udhcp/udhcpd.bssid $(IMAGE)/etc || true
+ $(QUIET)cp ../udhcp/default.script $(IMAGE)/usr/share/udhcpc || true
+# $(QUIET)$(ECHO) " ftpd"
+# $(QUIET)cp ../ftpd/ftpd $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " hostapd"
+ $(QUIET)cp ../hostapd/hostapd $(IMAGE)/bin || true
+# $(QUIET)cp ../hostapd/wired.conf $(IMAGE)/etc || true
+ $(QUIET)$(ECHO) " iptables"
+ $(QUIET)cp ../iptables/iptables $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " wishlist"
+ $(QUIET)cp ../wishlist/wishlist $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " wpa_supplicant"
+ $(QUIET)cp ../wpa_supplicant-0.4.8/wpa_supplicant $(IMAGE)/bin || true
+# $(QUIET)cp ../wpa_supplicant-0.4.8/wired8021x.conf $(IMAGE)/etc || true
+ $(QUIET)$(ECHO) " safe-return"
+ $(QUIET)cp ../safe-return/safe-return $(IMAGE)/sbin || true
+ifeq ($(CONFIG_PLC_MCAST),y)
+ $(QUIET)$(ECHO) " igmp_filter.ko"
+ $(QUIET)cp ../igmp_filter/igmp_filter.ko $(IMAGE)/lib/modules || true
+else
+ $(QUIET)$(ECHO) " Multicast disabled !"
+endif
+ifeq ($(CONFIG_SPR200_WATCHDOG),y)
+ $(QUIET)$(ECHO) " wdd"
+ $(QUIET)cp ../wdd/wdd $(IMAGE)/sbin || true
+else
+ $(QUIET)$(ECHO) " Watchdog disabled !"
+endif
+#to be copied only for the 32 MB release
+ifneq ($(CONFIG_VERSION_16M),y)
+ $(QUIET)$(ECHO) "Copying 32MB compatible modules:"
+ $(QUIET)$(ECHO) " snmp_agent"
+ $(QUIET)cp ../../app/obj/snmp_agent $(IMAGE)/bin || true
+ $(QUIET)$(ECHO) " mrst"
+ $(QUIET)cp ../wdd/mrst $(IMAGE)/sbin || true
+ifeq ($(CONFIG_VOIP),y)
+ $(QUIET)$(ECHO) " voip"
+ifeq ($(CONFIG_ARETHA),y)
+ $(QUIET)cp ../../voip/drv_vinetic-2.1/build/drv_tapi.ko $(IMAGE)/lib/modules || true
+ $(QUIET)cp ../../voip/drv_vinetic-2.1/build/drv_vinetic.ko $(IMAGE)/lib/modules || true
+else
+ $(QUIET)cp ../../voip/drv_vinetic_old/drv_vinetic.ko $(IMAGE)/lib/modules || true
+endif
+# $(QUIET)cp -r ../../voip/cgi/www $(IMAGE)/usr/share || true
+# $(QUIET)cp ../../voip/cgi/chnum $(IMAGE)/usr/share/www/cgi-bin || true
+# $(QUIET)cp ../../voip/cgi/getnum $(IMAGE)/usr/share/www/cgi-bin || true
+ $(QUIET)cp ../../voip/demo/build/voipdemo $(IMAGE)/bin || true
+# $(QUIET)cp -r ../../voip/demo/messages $(IMAGE)/bin || true
+endif
+endif
diff --git a/tools/bundle/check.sh b/tools/bundle/check.sh
new file mode 100755
index 0000000000..1fc93b9bec
--- /dev/null
+++ b/tools/bundle/check.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+RAMFSLIST="initramfs_list"
+
+for i in $1/*;\
+
+do if [ -f $i ];\
+ then case ${i##*.} in
+ ko)
+ echo "file ${i##image} ../linux-tools/rootfs/$i 0644 0 0" >>$RAMFSLIST
+ ;;
+ gif|jpg|jpeg|png|conf|bssid|leases|bssid)
+ echo "file ${i##image} ../linux-tools/rootfs/$i 0644 0 0" >>$RAMFSLIST
+ ;;
+ *)
+ echo "file ${i##image} ../linux-tools/rootfs/$i 0755 0 0" >>$RAMFSLIST
+ ;;
+ esac
+
+ elif [ -d $i ];\
+ then echo "dir ${i##image} 0755 0 0" >>$RAMFSLIST;\
+ ./check.sh $i
+
+fi;\
+
+done
diff --git a/tools/bundle/mkimg.sh b/tools/bundle/mkimg.sh
new file mode 100755
index 0000000000..57d2771146
--- /dev/null
+++ b/tools/bundle/mkimg.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+TMP_IMG=/tmp/bundle
+mkdir $TMP_IMG/linux-tools/rootfs/image
+mkdir $TMP_IMG/linux-tools/rootfs/image/bin
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/config
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/network
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/network/if-down.d
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/network/if-post-down.d
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/network/if-pre-up.d
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/network/if-up.d
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/plc
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/rcS.d
+mkdir $TMP_IMG/linux-tools/rootfs/image/etc/udhcpc
+mkdir $TMP_IMG/linux-tools/rootfs/image/lib
+mkdir $TMP_IMG/linux-tools/rootfs/image/lib/modules
+mkdir $TMP_IMG/linux-tools/rootfs/image/mnt
+mkdir $TMP_IMG/linux-tools/rootfs/image/mnt/flashdisk
+mkdir $TMP_IMG/linux-tools/rootfs/image/net
+mkdir $TMP_IMG/linux-tools/rootfs/image/proc
+mkdir $TMP_IMG/linux-tools/rootfs/image/root
+mkdir $TMP_IMG/linux-tools/rootfs/image/sbin
+mkdir $TMP_IMG/linux-tools/rootfs/image/share
+mkdir $TMP_IMG/linux-tools/rootfs/image/sys
+mkdir $TMP_IMG/linux-tools/rootfs/image/tmp
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/bin
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/lib
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/lib/boa
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/share
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/share/www
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/share/cgi-bin
+mkdir $TMP_IMG/linux-tools/rootfs/image/usr/share/udhcpc
+mkdir $TMP_IMG/linux-tools/rootfs/image/var
+mkdir $TMP_IMG/linux-tools/rootfs/image/var/lock
+mkdir $TMP_IMG/linux-tools/rootfs/image/var/lock/subsys
+mkdir $TMP_IMG/linux-tools/rootfs/image/var/log
+mkdir $TMP_IMG/linux-tools/rootfs/image/var/run
+mkdir $TMP_IMG/linux-tools/rootfs/image/var/state
+
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/bin
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/config
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/network
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/network/if-down.d
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/network/if-post-down.d
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/network/if-pre-up.d
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/network/if-up.d
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/plc
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/rcS.d
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/etc/udhcpc
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/lib
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/lib/modules
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/mnt
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/mnt/flashdisk
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/net
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/proc
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/root
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/sbin
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/share
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/sys
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/tmp
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/bin
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/lib
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/lib/boa
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/share
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/share/www
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/share/cgi-bin
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/usr/share/udhcpc
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var/lock
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var/lock/subsys
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var/log
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var/run
+chmod 0755 $TMP_IMG/linux-tools/rootfs/image/var/state
+
+cp -dpR ../../linux-tools/rootfs/scripts/rc.init $TMP_IMG/linux-tools/rootfs/image/
+cp -dpR ../../linux-tools/rootfs/scripts/rcS.d $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/rc.reboot $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/rc.sysinit $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/rcS $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/syslog.conf $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/protocols $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/inittab $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/nsswitch.conf $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/host.conf $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/hosts $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/group $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/fstab $TMP_IMG/linux-tools/rootfs/image/etc/
+cp -dpR ../../linux-tools/rootfs/scripts/bridge $TMP_IMG/linux-tools/rootfs/image/sbin/
+cp -dpR ../../linux-tools/rootfs/scripts/plcfree $TMP_IMG/linux-tools/rootfs/image/sbin/
+cp -dpR ../../linux-tools/rootfs/scripts/profile $TMP_IMG/linux-tools/rootfs/image/root/.profile
+cp -dpR ../../linux-tools/udhcp/default.script $TMP_IMG/linux-tools/rootfs/image/usr/share/udhcpc/
+
+rm -rf $TMP_IMG/linux-tools/rootfs/scripts
+rm -f $TMP_IMG/linux-tools/rootfs/append.sh
+rm -f $TMP_IMG/linux-tools/rootfs/dir.txt
+rm -f $TMP_IMG/linux-tools/rootfs/scr.txt
+rm -f $TMP_IMG/linux-tools/rootfs/Makefile
+cp -dp Makefile_Bundle $TMP_IMG/linux-tools/rootfs/Makefile
+cp -dp check.sh $TMP_IMG/linux-tools/rootfs/
diff --git a/voip/Makefile b/voip/Makefile
index 2bd63ec5f4..c9455924e3 100644
--- a/voip/Makefile
+++ b/voip/Makefile
@@ -1,9 +1,11 @@
include ../linux-2.6.10/.config
-#linux define Echo as null, and it's impossible for configure to work correctly
ECHO = echo
+IS_DEP_LIBOSIP=$(shell ls ../voip/libosip2-2.2.2/src/osip2/.deps > /dev/null 2>&1 && echo yes || echo no)
+IS_DEP_LIBEXOSIP=$(shell ls ../voip/libeXosip2-2.2.2/src/.deps > /dev/null 2>&1 && echo yes || echo no)
+
all: driver sipbuild
#sip: sipbuild
@@ -16,42 +18,45 @@ all: driver sipbuild
driver:
ifeq ($(CONFIG_VOIP), y)
- ifeq ($(CONFIG_ARETHA), y)
- @cd drv_vinetic-2.1/; $(MAKE) all;
- else
- @cd drv_vinetic_old/; $(MAKE) all;
- endif
+ifeq ($(CONFIG_ARETHA), y)
+ @cd drv_vinetic-2.1/; mkdir -p build; $(MAKE) all;
+else
+ @cd drv_vinetic_old/; $(MAKE);
+endif
endif
-
sipbuild:
ifeq ($(CONFIG_VOIP), y)
- chmod a+x lib*/configure
- ifeq ($(CONFIG_SIP), y)
- mkdir -p tmp
- @cd libosip2-2.2.2; \
- ./configure --prefix=$(shell pwd)/tmp --exec_prefix=$(shell pwd)/tmp --host=arm-uclinux --disable-shared --enable-pthread --disable-semaphore --disable-sysv --enable-trace CFLAGS="-msoft-float -march=armv5" LDFLAGS=-msoft-float; \
- $(MAKE); $(MAKE) install;
- @cd libeXosip2-2.2.2; \
- ./configure --prefix=$(shell pwd)/tmp --exec_prefix=$(shell pwd)/tmp --host=arm-uclinux --disable-shared --disable-josua --disable-glib --disable-ortp CFLAGS="-msoft-float -march=armv5" LDFLAGS="-msoft-float"; \
- $(MAKE); $(MAKE) install;
- @cd demo/build; $(MAKE) CFLAGS=-DSIP
- endif
-
- ifeq ($(CONFIG_H323), y)
+ifeq ($(CONFIG_SIP), y)
+ @mkdir -p build
+ @cd libosip2-2.2.2/; ./configure --prefix=$(shell pwd)/build --exec_prefix=$(shell pwd)/build libdir=$(shell pwd)/build/lib --host=arm-uclinux --disable-shared --enable-pthread --disable-semaphore --disable-sysv --enable-trace CFLAGS="-msoft-float -march=armv5" LDFLAGS=-msoft-float; $(MAKE); $(MAKE) install;
+ @cd libeXosip2-2.2.2/; ./configure --prefix=$(shell pwd)/build --exec_prefix=$(shell pwd)/build libdir=$(shell pwd)/build/lib --host=arm-uclinux --disable-shared --disable-josua --disable-glib --disable-ortp CFLAGS="-msoft-float -march=armv5" LDFLAGS="-msoft-float";
+ @cd libeXosip2-2.2.2/src; $(MAKE); $(MAKE) install;
+ @cd demo/build; $(MAKE) all CFLAGS=-DSIP
+endif
+
+ifeq ($(CONFIG_H323), y)
@cd ooh323c/build/; $(MAKE);
@cd demo/build; $(MAKE) CFLAGS=-DH323
- endif
endif
-
+endif
clean:
ifeq ($(CONFIG_VOIP), y)
+ifeq ($(CONFIG_ARETHA), y)
@cd drv_vinetic-2.1/; $(MAKE) clean;
+else
@cd drv_vinetic_old/; $(MAKE) clean;
+endif
+
+ifeq ($(IS_DEP_LIBOSIP), yes)
@cd libosip2-2.2.2/; $(MAKE) clean;
- @cd libeXosip2-2.2.2/; $(MAKE) clean;
+endif
+ifeq ($(IS_DEP_LIBEXOSIP), yes)
+ @cd libeXosip2-2.2.2/src/;$(MAKE) clean;
+endif
@cd ooh323c/build/; $(MAKE) clean;
- @cd demo/build/; $(MAKE) clean;
- rm -fr tmp;
+ @cd demo/build; $(MAKE) clean;
+ rm -rf build;
endif
+
diff --git a/voip/cgi/Makefile b/voip/cgi/Makefile
index 3ab76ab7f0..2857d99f67 100644
--- a/voip/cgi/Makefile
+++ b/voip/cgi/Makefile
@@ -1,5 +1,5 @@
CC = arm-uclinux-gcc
-CFLAGS = -O3 -march=armv5 -msoft-float
+CFLAGS = -march=armv5 -msoft-float
LD = arm-uclinux-gcc
LDFLAGS = -march=armv5 -msoft-float -Wl,-elf2flt='-s 8000'
diff --git a/voip/cgi_chnum/Makefile b/voip/cgi_chnum/Makefile
index 2d21b3e395..734c74796a 100644
--- a/voip/cgi_chnum/Makefile
+++ b/voip/cgi_chnum/Makefile
@@ -1,5 +1,5 @@
CC = arm-uclinux-gcc
-CFLAGS = -O3 -march=armv5 -msoft-float
+CFLAGS = -march=armv5 -msoft-float
LD = arm-uclinux-gcc
LDFLAGS = -march=armv5 -msoft-float -Wl,-elf2flt='-s 8000'
diff --git a/voip/demo/CallSignaling.h b/voip/demo/CallSignaling.h
index 4b49b4656b..c4f6f72c29 100644
--- a/voip/demo/CallSignaling.h
+++ b/voip/demo/CallSignaling.h
@@ -38,7 +38,7 @@ public:
char data[MAX_PACKET];
int data_len;
- int GetEvent(cs_token *token)
+ virtual int GetEvent(cs_token *token)
{
int event=0;
pthread_mutex_lock(&event_mutex);
diff --git a/voip/demo/H323CallSignaling.cpp b/voip/demo/H323CallSignaling.cpp
index 471707860a..88c1f9851c 100644
--- a/voip/demo/H323CallSignaling.cpp
+++ b/voip/demo/H323CallSignaling.cpp
@@ -1,466 +1,467 @@
-#ifdef H323
-
-#include "H323CallSignaling.h"
-#include <string.h>
-#include <ivana.h>
-#include <sys/select.h>
-
-#define SIZEOF_CAP_CONV (sizeof(cap_conv)/sizeof(*cap_conv))
-
-static H323CallSignaling *ovaj=0;
-static struct {
- int h323cap, ivanaCap, txFrames, rxFrames;
-} cap_conv[] = {
- { OO_G711ALAW64K, ALAW, 20, 160 },
- { OO_G711ULAW64K, MLAW, 20, 160 },
- { OO_G729, G729, 20, 80 },
- { OO_G728, G728, 20, 160 },
- { OO_G726_40K, G726_40, 20, 80 },
- { OO_G726_32K, G726_32, 20, 80 },
- { OO_G726_24K, G726_24, 20, 80 },
- { OO_G726_16K, G726_16, 20, 80 },
- { OO_G7231, G723_63, 20, 80 }
-};
-static struct rxSocket rxSocks[SIZEOF_CAP_CONV];
-static UdpSocket txSock;
-static int txPort;
-static u_long txIP;
-static int txCap;
-
-void GetMyIP(char *ip)
-{
- char buf[128];
- FILE *filet=popen("ifconfig br0|grep \"addr:\"","r");
- buf[fread(buf,1,127,filet)]=0;
- fclose(filet);
- char *p=strstr(buf,"addr:");
- if(!p) strcpy(ip,"127.0.0.1");
- else {
- char *b=(p+=5);
- while(*b && *b!=' ') b++;
- *b=0;
- strcpy(ip,p);
- }
-}
-
-static void reverse (char* st) {
- int i, j;
- char tmp;
-
- for (i=0, j=strlen(st)-1; i<j; i++, j--)
- tmp = st[i], st[i] = st[j], st[j] = tmp;
-}
-
-void itoa (int num, char* st) {
- int i, sign;
-
- if ((sign = num) < 0)
- num = -num;
-
- i = 0;
- do {
- st[i++] = num % 10 + '0';
- } while ((num /= 10) > 0);
-
- if (sign == '\0')
- st[i++] = '-';
- st[i] = '\0';
-
- reverse(st);
-}
-
-/* H323 callbacks */
-
-static int h323toIvanaCap(int cap)
-{
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++)
- if(cap_conv[i].h323cap==cap) return cap_conv[i].ivanaCap;
- return MLAW;
-}
-
-static int spcEpOnReceivedDTMF(OOH323CallData* call, const char* dtmf) {
- printf("DTMF digit received\n");
- fflush(stdout);
- return OO_OK;
-}
-
-static int spcEpOnAlerting(ooCallData* call) {
- printf("Alerting, call type: %s\n",call->callType);
- fflush(stdout);
- if (!strcmp(call->callType, "outgoing"))
- ovaj->PlaceEvent(PACK_RING,(cs_token)call->callToken);
-
- return OO_OK;
-}
-
-static int spcEpOnIncomingCall(ooCallData* call) {
- printf("Incoming call\n");
- fflush(stdout);
- ovaj->PlaceEvent(PACK_SETUP,(cs_token)call->callToken);
- return OO_OK;
-}
-
-static int spcEpOnOutgoingCall(ooCallData* call) {
- printf("Outgoing call\n");
- fflush(stdout);
- return OO_OK;
-}
-
-static int spcEpOnNewCallCreated(ooCallData* call) {
- /*printf("New call created!\n");
- fflush(stdout);*/
- return OO_OK;
-}
-
-static int spcEpOpenLogicalChannels(ooCallData* call) {
- printf("Open logical channels\n");
- fflush(stdout);
- return OO_OK;
-}
-
-static int spcEpOnCallEstablished(ooCallData* call) {
- printf("Call established!\n");
- fflush(stdout);
- ovaj->PlaceEvent(PACK_COMM,(cs_token)call->callToken);
- return OO_OK;
-}
-
-static int spcEpOnCallForwarded(ooCallData* call) {
- printf("Call forwarded!\n");
- fflush(stdout);
- return OO_OK;
-}
-
-static int spcEpOnCallCleared(ooCallData* call) {
- printf("Call cleared: %s\n",ooGetReasonCodeText(call->callEndReason));
- fflush(stdout);
- if( call->callEndReason==OO_REASON_GK_NOCALLEDUSER ||
- call->callEndReason==OO_REASON_NOUSER ||
- call->callEndReason==OO_REASON_LOCAL_BUSY) return OO_OK;
-
- ovaj->PlaceEvent(PACK_QUIT,(cs_token)call->callToken);
- return OO_OK;
-}
-
-static int spcEpStartReceiveChannel(ooCallData* call,ooLogicalChannel* pChannel) {
- printf("Start receive at %s:%d, ", pChannel->localIP, pChannel->localRtpPort);
- printf("cap=%s\n", ooGetCapTypeText((OOCapabilities) pChannel->chanCap->cap));
- fflush(stdout);
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
- if(!rxSocks[i].rxSock.IsCreated()) {
- rxSocks[i].h323Cap=pChannel->chanCap->cap;
- rxSocks[i].rxSock.Create(pChannel->localRtpPort);
- rxSocks[i].rxToken=(cs_token)call->callToken;
- return OO_OK;
- }
- }
- return OO_OK;
-}
-
-static int spcEpStartTransmitChannel(ooCallData* call, ooLogicalChannel* pChannel) {
- printf("Start transmit to %s:%d, ", pChannel->remoteIP, pChannel->remoteMediaPort);
- printf("cap=%s\n",ooGetCapTypeText((OOCapabilities) pChannel->chanCap->cap));
- fflush(stdout);
- if (!txSock.Create(pChannel->remoteMediaPort)) {
- printf("Error occured\n");
- fflush(stdout);
- }
- txSock.SetTOS(7);
- txPort=pChannel->remoteMediaPort;
- txIP=inet_addr(pChannel->remoteIP);
- txCap=pChannel->chanCap->cap;
- unsigned i;
- for(i=0;i<SIZEOF_CAP_CONV;i++) {
- if(cap_conv[i].h323cap==txCap) break;
- }
- if(i>=SIZEOF_CAP_CONV)
- ovaj->PlaceEvent(PACK_CODEC,(20<<8)|ALAW);
- else
- ovaj->PlaceEvent(PACK_CODEC,(cap_conv[i].txFrames<<8)|cap_conv[i].ivanaCap);
- return OO_OK;
-}
-
-static int spcEpStopReceiveChannel(ooCallData* call, ooLogicalChannel* pChannel) {
- printf("Stop receive at %s:%d\n", pChannel->localIP, pChannel->localRtpPort);
- fflush(stdout);
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
- if(rxSocks[i].h323Cap==pChannel->chanCap->cap) {
- rxSocks[i].h323Cap=0;
- rxSocks[i].rxSock.Close();
- return OO_OK;
- }
- }
- return OO_OK;
-}
-
-static int spcEpStopTransmitChannel(ooCallData* call, ooLogicalChannel* pChannel) {
- printf("Stop transmit to %s:%d\n", pChannel->remoteIP, pChannel->remoteMediaPort);
- fflush(stdout);
- txSock.Close();
- return OO_OK;
-}
-
-/* H323 Call Signaling methods */
-
-void H323CallSignaling::MakeCall(char *number)
-{
- char ct[128];
- char dest[20];
- if (isGK)
- ooMakeCall(number,ct,128,0);
- else if (strlen(number) > 1) {
- char* end;
- char port[10];
- GetMyIP(dest);
- end = strrchr(dest, '.') + 1;
- *end = '\0';
- strcat(dest, number+1);
- strcat(dest, ":");
- if (number[0] = '1')
- itoa(BASE_LOCAL_PORT, port);
- else if (number[0] = '2')
- itoa(BASE_LOCAL_PORT+1, port);
- strcat(dest, port);
- printf("Calling %s...\n", dest);
- ooMakeCall(dest,ct,128,0);
- }
-}
-
-void H323CallSignaling::SendRingback(cs_token call)
-{
- ooManualRingback((const char*)call);
-}
-
-void H323CallSignaling::CancelCall(cs_token call)
-{
- ooHangCall((const char *)call,OO_REASON_LOCAL_BUSY);
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) rxSocks[i].rxSock.Close();
- txSock.Close();
-}
-
-void H323CallSignaling::ClearCall(cs_token call)
-{
- ooHangCall((const char *)call, OO_REASON_LOCAL_CLEARED);
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) rxSocks[i].rxSock.Close();
- txSock.Close();
-}
-
-void H323CallSignaling::SendData(cs_token call,char *buff,int size)
-{
- if(txSock.IsCreated()) txSock.SendTo(buff,size,txIP,txPort);
-}
-
-void H323CallSignaling::AcceptCall(cs_token call)
-{
- ooAnswerCall((const char *)call);
-}
-
-static void* monitor_th(void* arg)
-{
- ooMonitorChannels();
- return 0;
-}
-
-int H323CallSignaling::Init(void* param)
-{
- struct h323InitParams* settings = (struct h323InitParams*) param;
-
- int channel = settings->channel;
- int gkMode = settings->gkMode;
-
- char userid[20];
- char myip[20];
- int cmdPort = 0, tcpPort = 0;
-
- GetMyIP(myip);
- if (gkMode)
- strcpy(userid, settings->id);
- else {
- char* ipEnd = strrchr(myip, '.') + 1;
- itoa(channel, userid);
- strcpy(userid+1, ipEnd);
- }
-
- char logfile[30];
- sprintf(logfile, "logfile_%s", userid);
- if(ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, logfile)!=OO_OK) return 0;
- printf("H323 stack initialized!\n");
- fflush(stdout);
-
- if (!settings->faststart)
- ooH323EpDisableFastStart();
- if (!settings->tunneling)
- ooH323EpDisableH245Tunneling();
-
- ooH323EpSetTraceLevel(settings->trace);
-
- tcpPort = BASE_LOCAL_PORT + channel - 1;
- printf("h323demo_%s: my IP address is [%s:%d]\n", userid, myip, tcpPort);
- fflush(stdout);
- ooH323EpSetLocalAddress(myip, tcpPort);
-
- /* set stack ports */
- int min, max;
- min = TCPPORTSSTART + (channel-1)*(TCPPORTSEND-TCPPORTSSTART);
- max = TCPPORTSEND + (channel-1)*(TCPPORTSEND-TCPPORTSSTART);
- ooH323EpSetTCPPortRange(min, max);
-
- min = UDPPORTSSTART + (channel-1)*(UDPPORTSEND-UDPPORTSSTART);
- max = UDPPORTSEND + (channel-1)*(UDPPORTSEND-UDPPORTSSTART);
- ooH323EpSetUDPPortRange(min, max);
-
- min = RTPPORTSSTART + (channel-1)*(RTPPORTSEND-RTPPORTSSTART);
- max = RTPPORTSEND + (channel-1)*(RTPPORTSEND-RTPPORTSSTART);
- ooH323EpSetRTPPortRange(min, max);
-
- /* CmdListener should always be created after local address is set */
- cmdPort = BASE_CMD_PORT + channel - 1;
- ooH323EpCreateCmdListener(cmdPort);
-
- ooH323EpDisableAutoAnswer();
- ooH323EpEnableManualRingback();
-
- ooH323EpSetCallerID(userid);
- ooH323EpAddAliasH323ID(userid);
- ooH323EpSetCallingPartyNumber(userid);
- ooH323EpSetCallingPartyNumber(userid);
- ooH323EpSetProductID(SPC_ID);
- ooH323EpSetVersionID(SPC_VERSION);
-
- /* Set callbacks */
- OOH323CALLBACKS h323Callbacks;
- h323Callbacks.onNewCallCreated = spcEpOnNewCallCreated;
- h323Callbacks.onAlerting = spcEpOnAlerting;
- h323Callbacks.onIncomingCall = spcEpOnIncomingCall;
- h323Callbacks.onOutgoingCall = spcEpOnOutgoingCall;
- h323Callbacks.onCallEstablished = spcEpOnCallEstablished;
- h323Callbacks.onCallForwarded = spcEpOnCallForwarded;
- h323Callbacks.onCallCleared = spcEpOnCallCleared;
- h323Callbacks.openLogicalChannels = NULL; //spcEpOpenLogicalChannels;
- h323Callbacks.onReceivedDTMF = spcEpOnReceivedDTMF;
-
- /*dtmf stuff */
- ooH323EpEnableDTMFH245Alphanumeric();
- ooH323EpEnableDTMFH245Signal();
- ooH323EpEnableDTMFRFC2833(0);
-
- ooH323EpSetH323Callbacks(h323Callbacks);
-
- /* Add audio capabilities and store them */
- codecList.index = SIZEOF_CAP_CONV;
- for (unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
- ooCapabilityAddSimpleCapability(NULL,cap_conv[i].h323cap,
- cap_conv[i].txFrames, cap_conv[i].rxFrames, FALSE, OORXANDTX,
- &spcEpStartReceiveChannel, &spcEpStartTransmitChannel,
- &spcEpStopReceiveChannel, &spcEpStopTransmitChannel, FALSE);
- codecList.order[i] = cap_conv[i].h323cap;
- }
- if (settings->codec)
- SetPreferredCodec(settings->codec);
-
- if (gkMode == NO_GK) {
- isGK = false;
- }
- else if (gkMode == DISCOVER_GK) {
- isGK = true;
- ooGkClientInit(RasDiscoverGatekeeper, NULL, 0);
- }
- else {
- isGK = true;
- ooGkClientInit(RasUseSpecificGatekeeper,
- settings->gkIP, settings->gkPort);
- }
-
- fflush(stdout);
- if (ooCreateH323Listener()!=OO_OK) return 0;
- ovaj=this;
- pthread_create(&monitor_th_id, NULL, monitor_th, 0);
- pthread_create(&recv_th_id, NULL, recv_th_dispatch, (void*) this);
-
- return 1;
-}
-
-int H323CallSignaling::EnableAutoAnswer(cs_token call)
-{
- return ooH323EpEnableAutoAnswer();
-}
-
-int H323CallSignaling::DisableAutoAnswer(cs_token call)
-{
- return ooH323EpDisableAutoAnswer();
-}
-
-void H323CallSignaling::RestoreCodecList()
-{
- for (int i=0; i<codecList.index; i++)
- ooAppendCapToCapPrefs(NULL, codecList.order[i]);
-}
-
-void H323CallSignaling::ClearCodecList()
-{
- ooResetCapPrefs(NULL);
-}
-
-void H323CallSignaling::AppendCodec(int codec)
-{
- ooAppendCapToCapPrefs(NULL, codec);
-}
-
-void H323CallSignaling::SetPreferredCodec(int codec)
-{
- ooChangeCapPrefOrder(NULL, codec, 0);
-}
-
-H323CallSignaling::~H323CallSignaling()
-{
- ooStopMonitorCalls();
- ooH323EpDestroy();
- for(unsigned i=0;i<SIZEOF_CAP_CONV;i++)
- rxSocks[i].rxSock.Close();
- txSock.Close();
-}
-
-int H323CallSignaling::isGKUsed () {
- return (int) isGK;
-}
-
-void H323CallSignaling::recv_th()
-{
- struct timeval timeout;
- fd_set readfds;
- unsigned int i;
-
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-
- while(1) {
- bool nocr=true;
- int maxSock = 0;
-
- FD_ZERO(&readfds);
- for(i=0;i<SIZEOF_CAP_CONV;i++)
- if(rxSocks[i].rxSock.IsCreated()) {
- FD_SET(rxSocks[i].rxSock.GetSock(), &readfds);
- if(rxSocks[i].rxSock.GetSock()>maxSock)
- maxSock=rxSocks[i].rxSock.GetSock();
- }
-
- select(maxSock+1, &readfds, 0, 0, &timeout);
-
- for(i=0;i<SIZEOF_CAP_CONV;i++)
- if(rxSocks[i].rxSock.IsCreated())
- if (FD_ISSET(rxSocks[i].rxSock.GetSock(), &readfds)) {
- nocr=false;
- data_len=rxSocks[i].rxSock.RecvFrom(data,1024);
-
- data[1] &= RTP_MARKER_MASK;
- data[1] |= (unsigned char) h323toIvanaCap(rxSocks[i].h323Cap);
- ovaj->PlaceEvent(PACK_DATA,rxSocks[i].rxToken);
- }
-
- if (nocr) usleep(10000);
- }
-}
-
-#endif /* H323 */
-
+#ifdef H323
+
+#include "H323CallSignaling.h"
+#include <string.h>
+#include <ivana.h>
+#include <sys/select.h>
+
+#define SIZEOF_CAP_CONV (sizeof(cap_conv)/sizeof(*cap_conv))
+
+static H323CallSignaling *ovaj=0;
+static struct {
+ int h323cap, ivanaCap, txFrames, rxFrames;
+} cap_conv[] = {
+ { OO_G711ALAW64K, ALAW, 20, 160 },
+ { OO_G711ULAW64K, MLAW, 20, 160 },
+ { OO_G729, G729, 20, 80 },
+ { OO_G728, G728, 20, 160 },
+ { OO_G726_40K, G726_40, 20, 80 },
+ { OO_G726_32K, G726_32, 20, 80 },
+ { OO_G726_24K, G726_24, 20, 80 },
+ { OO_G726_16K, G726_16, 20, 80 },
+ { OO_G7231, G723_63, 20, 80 }
+};
+static struct rxSocket rxSocks[SIZEOF_CAP_CONV];
+static UdpSocket txSock;
+static int txPort;
+static u_long txIP;
+static int txCap;
+
+void GetMyIP(char *ip)
+{
+ char buf[128];
+ FILE *filet=popen("ifconfig br0|grep \"addr:\"","r");
+ buf[fread(buf,1,127,filet)]=0;
+ fclose(filet);
+ char *p=strstr(buf,"addr:");
+ if(!p) strcpy(ip,"127.0.0.1");
+ else {
+ char *b=(p+=5);
+ while(*b && *b!=' ') b++;
+ *b=0;
+ strcpy(ip,p);
+ }
+}
+
+static void reverse (char* st) {
+ int i, j;
+ char tmp;
+
+ for (i=0, j=strlen(st)-1; i<j; i++, j--)
+ tmp = st[i], st[i] = st[j], st[j] = tmp;
+}
+
+void itoa (int num, char* st) {
+ int i, sign;
+
+ if ((sign = num) < 0)
+ num = -num;
+
+ i = 0;
+ do {
+ st[i++] = num % 10 + '0';
+ } while ((num /= 10) > 0);
+
+ if (sign == '\0')
+ st[i++] = '-';
+ st[i] = '\0';
+
+ reverse(st);
+}
+
+/* H323 callbacks */
+
+static int h323toIvanaCap(int cap)
+{
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++)
+ if(cap_conv[i].h323cap==cap) return cap_conv[i].ivanaCap;
+ return MLAW;
+}
+
+static int spcEpOnReceivedDTMF(OOH323CallData* call, const char* dtmf) {
+ printf("DTMF digit received\n");
+ fflush(stdout);
+ return OO_OK;
+}
+
+static int spcEpOnAlerting(ooCallData* call) {
+ printf("Alerting, call type: %s\n",call->callType);
+ fflush(stdout);
+ if (!strcmp(call->callType, "outgoing"))
+ ovaj->PlaceEvent(PACK_RING,(cs_token)call->callToken);
+
+ return OO_OK;
+}
+
+static int spcEpOnIncomingCall(ooCallData* call) {
+ printf("Incoming call\n");
+ fflush(stdout);
+ ovaj->PlaceEvent(PACK_SETUP,(cs_token)call->callToken);
+ return OO_OK;
+}
+
+static int spcEpOnOutgoingCall(ooCallData* call) {
+ printf("Outgoing call\n");
+ fflush(stdout);
+ return OO_OK;
+}
+
+static int spcEpOnNewCallCreated(ooCallData* call) {
+ /*printf("New call created!\n");
+ fflush(stdout);*/
+ return OO_OK;
+}
+
+static int spcEpOpenLogicalChannels(ooCallData* call) {
+ printf("Open logical channels\n");
+ fflush(stdout);
+ return OO_OK;
+}
+
+static int spcEpOnCallEstablished(ooCallData* call) {
+ printf("Call established!\n");
+ fflush(stdout);
+ ovaj->PlaceEvent(PACK_COMM,(cs_token)call->callToken);
+ return OO_OK;
+}
+
+static int spcEpOnCallForwarded(ooCallData* call) {
+ printf("Call forwarded!\n");
+ fflush(stdout);
+ return OO_OK;
+}
+
+static int spcEpOnCallCleared(ooCallData* call) {
+ printf("Call cleared: %s\n",ooGetReasonCodeText(call->callEndReason));
+ fflush(stdout);
+ if( call->callEndReason==OO_REASON_GK_NOCALLEDUSER ||
+ call->callEndReason==OO_REASON_NOUSER ||
+ call->callEndReason==OO_REASON_LOCAL_BUSY) return OO_OK;
+
+ ovaj->PlaceEvent(PACK_QUIT,(cs_token)call->callToken);
+ return OO_OK;
+}
+
+static int spcEpStartReceiveChannel(ooCallData* call,ooLogicalChannel* pChannel) {
+ printf("Start receive at %s:%d, ", pChannel->localIP, pChannel->localRtpPort);
+ printf("cap=%s\n", ooGetCapTypeText((OOCapabilities) pChannel->chanCap->cap));
+ fflush(stdout);
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
+ if(!rxSocks[i].rxSock.IsCreated()) {
+ rxSocks[i].h323Cap=pChannel->chanCap->cap;
+ rxSocks[i].rxSock.Create(pChannel->localRtpPort);
+ rxSocks[i].rxToken=(cs_token)call->callToken;
+ return OO_OK;
+ }
+ }
+ return OO_OK;
+}
+
+static int spcEpStartTransmitChannel(ooCallData* call, ooLogicalChannel* pChannel) {
+ printf("Start transmit to %s:%d, ", pChannel->remoteIP, pChannel->remoteMediaPort);
+ printf("cap=%s\n",ooGetCapTypeText((OOCapabilities) pChannel->chanCap->cap));
+ fflush(stdout);
+ if (!txSock.Create(pChannel->remoteMediaPort)) {
+ printf("Error occured\n");
+ fflush(stdout);
+ }
+ txSock.SetTOS(7);
+ txPort=pChannel->remoteMediaPort;
+ txIP=inet_addr(pChannel->remoteIP);
+ txCap=pChannel->chanCap->cap;
+ unsigned i;
+ for(i=0;i<SIZEOF_CAP_CONV;i++) {
+ if(cap_conv[i].h323cap==txCap) break;
+ }
+ if(i>=SIZEOF_CAP_CONV)
+ ovaj->PlaceEvent(PACK_CODEC,(20<<8)|ALAW);
+ else
+ ovaj->PlaceEvent(PACK_CODEC,(cap_conv[i].txFrames<<8)|cap_conv[i].ivanaCap);
+ return OO_OK;
+}
+
+static int spcEpStopReceiveChannel(ooCallData* call, ooLogicalChannel* pChannel) {
+ printf("Stop receive at %s:%d\n", pChannel->localIP, pChannel->localRtpPort);
+ fflush(stdout);
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
+ if(rxSocks[i].h323Cap==pChannel->chanCap->cap) {
+ rxSocks[i].h323Cap=0;
+ rxSocks[i].rxSock.Close();
+ return OO_OK;
+ }
+ }
+ return OO_OK;
+}
+
+static int spcEpStopTransmitChannel(ooCallData* call, ooLogicalChannel* pChannel) {
+ printf("Stop transmit to %s:%d\n", pChannel->remoteIP, pChannel->remoteMediaPort);
+ fflush(stdout);
+ txSock.Close();
+ return OO_OK;
+}
+
+/* H323 Call Signaling methods */
+
+void H323CallSignaling::MakeCall(char *number)
+{
+ char ct[128];
+
+ char dest[20];
+ if (isGK)
+ ooMakeCall(number,ct,128,0);
+ else if (strlen(number) > 1) {
+ char* end;
+ char port[10];
+ GetMyIP(dest);
+ end = strrchr(dest, '.') + 1;
+ *end = '\0';
+ strcat(dest, number+1);
+ strcat(dest, ":");
+ if (number[0] = '1')
+ itoa(BASE_LOCAL_PORT, port);
+ else if (number[0] = '2')
+ itoa(BASE_LOCAL_PORT+1, port);
+ strcat(dest, port);
+ printf("Calling %s...\n", dest);
+ ooMakeCall(dest,ct,128,0);
+ }
+}
+
+void H323CallSignaling::SendRingback(cs_token call)
+{
+ ooManualRingback((const char*)call);
+}
+
+void H323CallSignaling::CancelCall(cs_token call)
+{
+ ooHangCall((const char *)call,OO_REASON_LOCAL_BUSY);
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) rxSocks[i].rxSock.Close();
+ txSock.Close();
+}
+
+void H323CallSignaling::ClearCall(cs_token call)
+{
+ ooHangCall((const char *)call, OO_REASON_LOCAL_CLEARED);
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++) rxSocks[i].rxSock.Close();
+ txSock.Close();
+}
+
+void H323CallSignaling::SendData(cs_token call,char *buff,int size)
+{
+ if(txSock.IsCreated()) txSock.SendTo(buff,size,txIP,txPort);
+}
+
+void H323CallSignaling::AcceptCall(cs_token call)
+{
+ ooAnswerCall((const char *)call);
+}
+
+static void* monitor_th(void* arg)
+{
+ ooMonitorChannels();
+ return 0;
+}
+
+int H323CallSignaling::Init(void* param)
+{
+ struct h323InitParams* settings = (struct h323InitParams*) param;
+
+ int channel = settings->channel;
+ int gkMode = settings->gkMode;
+
+ char userid[20];
+ char myip[20];
+ int cmdPort = 0, tcpPort = 0;
+
+ GetMyIP(myip);
+ if (gkMode)
+ strcpy(userid, settings->id);
+ else {
+ char* ipEnd = strrchr(myip, '.') + 1;
+ itoa(channel, userid);
+ strcpy(userid+1, ipEnd);
+ }
+
+ char logfile[30];
+ sprintf(logfile, "logfile_%s", userid);
+ if(ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, logfile)!=OO_OK) return 0;
+ printf("H323 stack initialized!\n");
+ fflush(stdout);
+
+ if (!settings->faststart)
+ ooH323EpDisableFastStart();
+ if (!settings->tunneling)
+ ooH323EpDisableH245Tunneling();
+
+ ooH323EpSetTraceLevel(settings->trace);
+
+ tcpPort = BASE_LOCAL_PORT + channel - 1;
+ printf("h323demo_%s: my IP address is [%s:%d]\n", userid, myip, tcpPort);
+ fflush(stdout);
+ ooH323EpSetLocalAddress(myip, tcpPort);
+
+ /* set stack ports */
+ int min, max;
+ min = TCPPORTSSTART + (channel-1)*(TCPPORTSEND-TCPPORTSSTART);
+ max = TCPPORTSEND + (channel-1)*(TCPPORTSEND-TCPPORTSSTART);
+ ooH323EpSetTCPPortRange(min, max);
+
+ min = UDPPORTSSTART + (channel-1)*(UDPPORTSEND-UDPPORTSSTART);
+ max = UDPPORTSEND + (channel-1)*(UDPPORTSEND-UDPPORTSSTART);
+ ooH323EpSetUDPPortRange(min, max);
+
+ min = RTPPORTSSTART + (channel-1)*(RTPPORTSEND-RTPPORTSSTART);
+ max = RTPPORTSEND + (channel-1)*(RTPPORTSEND-RTPPORTSSTART);
+ ooH323EpSetRTPPortRange(min, max);
+
+ /* CmdListener should always be created after local address is set */
+ cmdPort = BASE_CMD_PORT + channel - 1;
+ ooH323EpCreateCmdListener(cmdPort);
+
+ ooH323EpDisableAutoAnswer();
+ ooH323EpEnableManualRingback();
+
+ ooH323EpSetCallerID(userid);
+ ooH323EpAddAliasH323ID(userid);
+ ooH323EpSetCallingPartyNumber(userid);
+ ooH323EpSetCallingPartyNumber(userid);
+ ooH323EpSetProductID(SPC_ID);
+ ooH323EpSetVersionID(SPC_VERSION);
+
+ /* Set callbacks */
+ OOH323CALLBACKS h323Callbacks;
+ h323Callbacks.onNewCallCreated = spcEpOnNewCallCreated;
+ h323Callbacks.onAlerting = spcEpOnAlerting;
+ h323Callbacks.onIncomingCall = spcEpOnIncomingCall;
+ h323Callbacks.onOutgoingCall = spcEpOnOutgoingCall;
+ h323Callbacks.onCallEstablished = spcEpOnCallEstablished;
+ h323Callbacks.onCallForwarded = spcEpOnCallForwarded;
+ h323Callbacks.onCallCleared = spcEpOnCallCleared;
+ h323Callbacks.openLogicalChannels = NULL; //spcEpOpenLogicalChannels;
+ h323Callbacks.onReceivedDTMF = spcEpOnReceivedDTMF;
+
+ /*dtmf stuff */
+ ooH323EpEnableDTMFH245Alphanumeric();
+ ooH323EpEnableDTMFH245Signal();
+ ooH323EpEnableDTMFRFC2833(0);
+
+ ooH323EpSetH323Callbacks(h323Callbacks);
+
+ /* Add audio capabilities and store them */
+ codecList.index = SIZEOF_CAP_CONV;
+ for (unsigned i=0;i<SIZEOF_CAP_CONV;i++) {
+ ooCapabilityAddSimpleCapability(NULL,cap_conv[i].h323cap,
+ cap_conv[i].txFrames, cap_conv[i].rxFrames, FALSE, OORXANDTX,
+ &spcEpStartReceiveChannel, &spcEpStartTransmitChannel,
+ &spcEpStopReceiveChannel, &spcEpStopTransmitChannel, FALSE);
+ codecList.order[i] = cap_conv[i].h323cap;
+ }
+ if (settings->codec)
+ SetPreferredCodec(settings->codec);
+
+ if (gkMode == NO_GK) {
+ isGK = false;
+ }
+ else if (gkMode == DISCOVER_GK) {
+ isGK = true;
+ ooGkClientInit(RasDiscoverGatekeeper, NULL, 0);
+ }
+ else {
+ isGK = true;
+ ooGkClientInit(RasUseSpecificGatekeeper,
+ settings->gkIP, settings->gkPort);
+ }
+
+ fflush(stdout);
+ if (ooCreateH323Listener()!=OO_OK) return 0;
+ ovaj=this;
+ pthread_create(&monitor_th_id, NULL, monitor_th, 0);
+ pthread_create(&recv_th_id, NULL, recv_th_dispatch, (void*) this);
+
+ return 1;
+}
+
+int H323CallSignaling::EnableAutoAnswer(cs_token call)
+{
+ return ooH323EpEnableAutoAnswer();
+}
+
+int H323CallSignaling::DisableAutoAnswer(cs_token call)
+{
+ return ooH323EpDisableAutoAnswer();
+}
+
+void H323CallSignaling::RestoreCodecList()
+{
+ for (int i=0; i<codecList.index; i++)
+ ooAppendCapToCapPrefs(NULL, codecList.order[i]);
+}
+
+void H323CallSignaling::ClearCodecList()
+{
+ ooResetCapPrefs(NULL);
+}
+
+void H323CallSignaling::AppendCodec(int codec)
+{
+ ooAppendCapToCapPrefs(NULL, codec);
+}
+
+void H323CallSignaling::SetPreferredCodec(int codec)
+{
+ ooChangeCapPrefOrder(NULL, codec, 0);
+}
+
+H323CallSignaling::~H323CallSignaling()
+{
+ ooStopMonitorCalls();
+ ooH323EpDestroy();
+ for(unsigned i=0;i<SIZEOF_CAP_CONV;i++)
+ rxSocks[i].rxSock.Close();
+ txSock.Close();
+}
+
+int H323CallSignaling::isGKUsed () {
+ return (int) isGK;
+}
+
+void H323CallSignaling::recv_th()
+{
+ struct timeval timeout;
+ fd_set readfds;
+ unsigned int i;
+
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ while(1) {
+ bool nocr=true;
+ int maxSock = 0;
+
+ FD_ZERO(&readfds);
+ for(i=0;i<SIZEOF_CAP_CONV;i++)
+ if(rxSocks[i].rxSock.IsCreated()) {
+ FD_SET(rxSocks[i].rxSock.GetSock(), &readfds);
+ if(rxSocks[i].rxSock.GetSock()>maxSock)
+ maxSock=rxSocks[i].rxSock.GetSock();
+ }
+
+ select(maxSock+1, &readfds, 0, 0, &timeout);
+
+ for(i=0;i<SIZEOF_CAP_CONV;i++)
+ if(rxSocks[i].rxSock.IsCreated())
+ if (FD_ISSET(rxSocks[i].rxSock.GetSock(), &readfds)) {
+ nocr=false;
+ data_len=rxSocks[i].rxSock.RecvFrom(data,1024);
+
+ data[1] &= RTP_MARKER_MASK;
+ data[1] |= (unsigned char) h323toIvanaCap(rxSocks[i].h323Cap);
+ ovaj->PlaceEvent(PACK_DATA,rxSocks[i].rxToken);
+ }
+
+ if (nocr) usleep(10000);
+ }
+}
+
+#endif /* H323 */
+
diff --git a/voip/demo/SIPCallSignaling.cpp b/voip/demo/SIPCallSignaling.cpp
index 49bc663fd8..2cb0911a2f 100644
--- a/voip/demo/SIPCallSignaling.cpp
+++ b/voip/demo/SIPCallSignaling.cpp
@@ -22,237 +22,258 @@
#include "SIPCallSignaling.h"
#include "UdpSocket.h"
-static SIPCallSignaling *ovaj=0;
+static SIPCallSignaling *ovaj = 0;
static struct {
- UdpSocket xSock;
- cs_token token;
+ UdpSocket xSock;
+ cs_token token;
} xSocket;
static int txPort;
static u_long txIP;
-call_t calls[MAX_NUMBER_OF_CALLS];
+call_t calls[MAX_NUMBER_OF_CALLS];
static int ___call_init = 0;
-char audio_codecs[10][20] = {" G723/8000",
- " G729/8000",
- " G728/8000",
- " PCMU/8000",
- " PCMA/8000",
- " G726-16/8000",
- " G726-24/8000",
- " G726-32/8000",
- " G726-40/8000",
- " G729E/8000"};
-int ivana_codecs[10] = {G723_63, G729, G728, MLAW, ALAW, G726_16, G726_24, G726_32, G726_40, G729_E};
-
-int
-_sdp_analyse_attribute (sdp_message_t * sdp, sdp_media_t * med)
+char audio_codecs[10][20] = { " G723/8000",
+ " G729/8000",
+ " G728/8000",
+ " PCMU/8000",
+ " PCMA/8000",
+ " G726-16/8000",
+ " G726-24/8000",
+ " G726-32/8000",
+ " G726-40/8000",
+ " G729E/8000"
+};
+int ivana_codecs[10] = { G723_63, G729, G728, MLAW, ALAW, G726_16, G726_24, G726_32, G726_40,
+ G729_E
+};
+
+int _sdp_analyse_attribute (sdp_message_t * sdp, sdp_media_t * med)
{
- int pos;
- int pos_media;
+ int pos;
+ int pos_media;
- /* test media attributes */
- pos = 0;
- while (!osip_list_eol (med->a_attributes, pos))
+ /* test media attributes */
+ pos = 0;
+ while (!osip_list_eol (med->a_attributes, pos))
{
- sdp_attribute_t *at;
+ sdp_attribute_t *at;
- at = (sdp_attribute_t *) osip_list_get (med->a_attributes, pos);
- if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendonly"))
- {
- return _SENDONLY;
- } else if (at->a_att_field != NULL &&
- 0 == strcmp (at->a_att_field, "recvonly"))
- {
- return _RECVONLY;
- } else if (at->a_att_field != NULL &&
- 0 == strcmp (at->a_att_field, "sendrecv"))
- {
- return _SENDRECV;
- }
- pos++;
+ at = (sdp_attribute_t *) osip_list_get (med->a_attributes, pos);
+ if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendonly"))
+ {
+ return _SENDONLY;
+ }
+ else if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "recvonly"))
+ {
+ return _RECVONLY;
+ }
+ else if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendrecv"))
+ {
+ return _SENDRECV;
+ }
+ pos++;
}
- /* test global attributes */
- pos_media = -1;
- pos = 0;
- while (!osip_list_eol (sdp->a_attributes, pos))
+ /* test global attributes */
+ pos_media = -1;
+ pos = 0;
+ while (!osip_list_eol (sdp->a_attributes, pos))
{
- sdp_attribute_t *at;
+ sdp_attribute_t *at;
- at = (sdp_attribute_t *) osip_list_get (sdp->a_attributes, pos);
- if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendonly"))
- {
- return _SENDONLY;
- } else if (at->a_att_field != NULL &&
- 0 == strcmp (at->a_att_field, "recvonly"))
- {
- return _RECVONLY;
- } else if (at->a_att_field != NULL &&
- 0 == strcmp (at->a_att_field, "sendrecv"))
- {
- return _SENDRECV;
- }
- pos++;
+ at = (sdp_attribute_t *) osip_list_get (sdp->a_attributes, pos);
+ if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendonly"))
+ {
+ return _SENDONLY;
+ }
+ else if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "recvonly"))
+ {
+ return _RECVONLY;
+ }
+ else if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "sendrecv"))
+ {
+ return _SENDRECV;
+ }
+ pos++;
}
- return _SENDRECV;
+ return _SENDRECV;
}
typedef struct {
- char payload[10];
- char codec[30];
- int ivanaCap;
+ char payload[10];
+ char codec[30];
+ int ivanaCap;
} capConv;
capConv cap_conv[15];
-int
-_sdp_analyse_media_attribute (sdp_media_t * med)
+int _sdp_analyse_media_attribute (sdp_media_t * med)
{
- int pos;
- int capCnt;
-
- /* test media attributes */
- pos = 0;
- capCnt = 0;
- while (!osip_list_eol (med->a_attributes, pos))
- {
- sdp_attribute_t *at;
-
- at = (sdp_attribute_t *) osip_list_get (med->a_attributes, pos);
- if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "rtpmap"))
+ int pos;
+ int capCnt;
+
+ /* test media attributes */
+ pos = 0;
+ capCnt = 0;
+ while (!osip_list_eol (med->a_attributes, pos))
{
- char *s1;
- int i;
- size_t len;
- s1 = strchr(at->a_att_value, ' ');
- for(i=0;i<10;i++)
- {
- if(strcmp(s1, audio_codecs[i]) == 0)
- {
- strcpy(cap_conv[pos].codec, s1);
- len = strlen(at->a_att_value)-strlen(s1);
- strncpy(cap_conv[pos].payload, at->a_att_value, len);
- cap_conv[pos].payload[len+1] = 0;
- cap_conv[pos].ivanaCap = ivana_codecs[i];
- capCnt++;
- break;
- }
- }
+ sdp_attribute_t *at;
+
+ at = (sdp_attribute_t *) osip_list_get (med->a_attributes, pos);
+ if (at->a_att_field != NULL && 0 == strcmp (at->a_att_field, "rtpmap"))
+ {
+ char *s1;
+ int i;
+ size_t len;
+ s1 = strchr (at->a_att_value, ' ');
+ for (i = 0; i < 10; i++)
+ {
+ if (strcmp (s1, audio_codecs[i]) == 0)
+ {
+ strcpy (cap_conv[pos].codec, s1);
+ len = strlen (at->a_att_value) - strlen (s1);
+ strncpy (cap_conv[pos].payload, at->a_att_value, len);
+ cap_conv[pos].payload[len + 1] = 0;
+ cap_conv[pos].ivanaCap = ivana_codecs[i];
+ capCnt++;
+ break;
+ }
+ }
+ }
+ pos++;
}
- pos++;
- }
/*
for(pos=0;pos<capCnt;pos++)
printf("rtpmap %s%s %d\n", cap_conv[pos].payload, cap_conv[pos].codec, cap_conv[pos].ivanaCap);
*/
- return capCnt;
+ return capCnt;
}
static char buf[12];
-char *itoa(int i)
+char *itoa (int i)
{
- char *pos = buf + sizeof(buf) - 1;
- unsigned int u;
- int negative = 0;
+ char *pos = buf + sizeof (buf) - 1;
+ unsigned int u;
+ int negative = 0;
- if (i < 0) {
- negative = 1;
- u = ((unsigned int)(-(1+i))) + 1;
- } else {
- u = i;
- }
+ if (i < 0)
+ {
+ negative = 1;
+ u = ((unsigned int) (-(1 + i))) + 1;
+ }
+ else
+ {
+ u = i;
+ }
- *pos = 0;
+ *pos = 0;
- do {
- *--pos = '0' + (u % 10);
- u /= 10;
- } while (u);
+ do
+ {
+ *--pos = '0' + (u % 10);
+ u /= 10;
+ } while (u);
- if (negative) {
- *--pos = '-';
- }
+ if (negative)
+ {
+ *--pos = '-';
+ }
- return pos;
+ return pos;
}
-void SIPCallSignaling::MakeCall(char *number)
+void SIPCallSignaling::MakeCall (char *number)
{
-osip_message_t *invite = NULL;
-int i;
-char tmp[4096];
-char to[256];
-char localip[128];
-size_t len;
+ osip_message_t *invite = NULL;
+ int i;
+ char tmp[4096];
+ char to[256];
+ char localip[128];
+ size_t len;
- len = strlen(number);
- if(number[len-1] == '*')
+ len = strlen (number);
+ if (number[len - 1] == '*')
+ {
+ number[--len] = '\0';
+ eXosip_guess_localip (AF_INET, localip, 128);
+
+ if (number[0] == '9')
{
- number[len-1] = '\0';
- eXosip_guess_localip (AF_INET, localip, 128);
-
- if (number[0] == '9')
- {
- char* end;
- char callNo[128];
- strcpy(callNo, localip);
- strcpy(to, "sip:");
- strcat(to, number+1);
- strcat(to, "@");
- end = strrchr(callNo, '.') + 1;
- *end = '\0';
- strcat(callNo, number+1);
- strcat(to, callNo);
- }
- else if (strcmp(proxy, "no"))
- {
- strcpy(to, "sip:");
- strcat(to, number);
- strcat(to, "@");
- strcat(to, proxy);
- }
- else
- return;
-
- i = eXosip_call_build_initial_invite (&invite,
- to,
- identity,
- NULL,
- NULL);
-
- if (i != 0)
- {
- fprintf (stderr, "invite: (bad arguments?)\n");
- exit (0);
- }
-
- osip_message_set_supported (invite, "100rel");
- snprintf (tmp, 4096,
- "v=0\r\n"
- "o=elsys 0 0 IN IP4 %s\r\n"
- "s=conversation\r\n"
- "c=IN IP4 %s\r\n"
- "t=0 0\r\n"
-
- "m=audio %s RTP/AVP 0 8 4 15 18 96 97 98 99 101 0\r\n"
- "a=rtpmap:0 PCMU/8000\r\n"
- "a=rtpmap:8 PCMA/8000\r\n"
- "a=rtpmap:4 G723/8000\r\n"
- "a=rtpmap:15 G728/8000\r\n"
- "a=rtpmap:18 G729/8000\r\n"
- "a=rtpmap:96 G726-16/8000\r\n"
- "a=rtpmap:97 G726-24/8000\r\n"
- "a=rtpmap:98 G726-32/8000\r\n"
- "a=rtpmap:99 G726-40/8000\r\n"
- "a=rtpmap:101 G729E/8000\r\n"
+ char *end;
+ char callNo[128];
+ strcpy (callNo, localip);
+ strcpy (to, "sip:");
+ strcat (to, number + 1);
+ strcat (to, "@");
+ end = strrchr (callNo, '.');
+ if (!end)
+ {
+ fprintf (stderr, "direct call, local ip is bad! no call done\n");
+ return;
+ }
+ else
+ end++;
+ *end = '\0';
+ if (len > 3)
+ {
+ char num[4];
+ num[0] = number[1];
+ num[1] = number[2];
+ num[2] = number[3];
+ num[3] = 0;
+ fprintf (stderr, "number is cut to %s\n", num);
+ strcat (callNo, num);
+ }
+ else
+ strcat (callNo, number + 1);
+ strcat (to, callNo);
+ fprintf (stderr, "direct call to %s\n", to);
+ }
+ else if (strcasecmp (proxy, "no") && proxy[0] && inet_addr (proxy))
+ {
+ strcpy (to, "sip:");
+ strcat (to, number);
+ strcat (to, "@");
+ strcat (to, proxy);
+ fprintf (stderr, "proxy (proxy=%s) call to %s\n", proxy, to);
+ }
+ else
+ {
+ fprintf (stderr, "no proxy, no direct call\n");
+ return;
+ }
+
+ i = eXosip_call_build_initial_invite (&invite, to, identity, NULL, NULL);
+
+ if (i != 0)
+ {
+ fprintf (stderr, "invite: (bad arguments?)\n");
+ exit (0);
+ }
+ osip_message_set_supported (invite, "100rel");
+ snprintf (tmp, 4096,
+ "v=0\r\n"
+ "o=elsys 0 0 IN IP4 %s\r\n"
+ "s=conversation\r\n"
+ "c=IN IP4 %s\r\n"
+ "t=0 0\r\n"
+ "m=audio %s RTP/AVP 0 8 4 15 18 96 97 98 99 101 0\r\n"
+ "a=rtpmap:0 PCMU/8000\r\n"
+ "a=rtpmap:8 PCMA/8000\r\n"
+ "a=rtpmap:4 G723/8000\r\n"
+ "a=rtpmap:15 G728/8000\r\n"
+ "a=rtpmap:18 G729/8000\r\n"
+ "a=rtpmap:96 G726-16/8000\r\n"
+ "a=rtpmap:97 G726-24/8000\r\n"
+ "a=rtpmap:98 G726-32/8000\r\n" "a=rtpmap:99 G726-40/8000\r\n" "a=rtpmap:101 G729E/8000\r\n"
/*
"m=audio %s RTP/AVP 8 9 1 6 7 12 13 14 15 16 0\r\n"
"a=rtpmap:8 PCMU/8000\r\n"
@@ -265,300 +286,315 @@ size_t len;
"a=rtpmap:14 G726-32/8000\r\n"
"a=rtpmap:15 G726-40/8000\r\n"
"a=rtpmap:16 G729E/8000\r\n"
-*/
- "a=rtpmap:0 telephone-event/8000\r\n"
- "a=fmtp:0 0-11\r\n", localip, localip, "10500");
- osip_message_set_body (invite, tmp, strlen (tmp));
- osip_message_set_content_type (invite, "application/sdp");
-
- eXosip_lock ();
- eXosip_call_send_initial_invite (invite);
- eXosip_unlock ();
- }
+*/
+ "a=rtpmap:0 telephone-event/8000\r\n" "a=fmtp:0 0-11\r\n", localip, localip, "10500");
+ osip_message_set_body (invite, tmp, strlen (tmp));
+ osip_message_set_content_type (invite, "application/sdp");
+
+ eXosip_lock ();
+ eXosip_call_send_initial_invite (invite);
+ eXosip_unlock ();
+ }
}
-void SIPCallSignaling::SendRingback(cs_token call)
+void SIPCallSignaling::SendRingback (cs_token call)
{
+ call_t *ca;
+ int i;
+
+ for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ {
+ if (calls[i].state != NOT_USED && calls[i].cid == int (call))
+ break;
+ }
+ if (i == MAX_NUMBER_OF_CALLS)
+ printf ("call not found\n");
+ else
+ {
+ ca = &(calls[i]);
+ eXosip_lock ();
+ eXosip_call_send_answer (ca->tid, 180, NULL);
+ eXosip_unlock ();
+ }
}
-void SIPCallSignaling::CancelCall(cs_token call)
+void SIPCallSignaling::CancelCall (cs_token call)
{
-call_t *ca;
-int i;
+ call_t *ca;
+ int i;
- if (___call_init != 0)
- {
- for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ printf("CANCEL CALL\n");
+ if (___call_init != 0)
{
- if (calls[i].state != NOT_USED && calls[i].cid == int(call))
- break;
- }
- if (i == MAX_NUMBER_OF_CALLS)
- printf("call not found\n");
- else
- {
- ca = &(calls[i]);
- eXosip_lock ();
- i = eXosip_call_terminate (ca->cid, ca->did);
- if (i == 0)
- {
- //call_remove (ca);
- if (ca->enable_audio > 0)
- ca->enable_audio = -1;
- ca->state = NOT_USED;
- }
- eXosip_unlock ();
- }
+ for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ {
+ if (calls[i].state != NOT_USED && calls[i].cid == int (call))
+ break;
}
+ if (i == MAX_NUMBER_OF_CALLS)
+ printf ("call not found\n");
+ else
+ {
+ ca = &(calls[i]);
+ eXosip_lock ();
+ eXosip_call_send_answer (ca->tid, 600, NULL);
+ i = eXosip_call_terminate (ca->cid, ca->did);
+ if (i == 0)
+ {
+ //call_remove (ca);
+ if (ca->enable_audio > 0)
+ ca->enable_audio = -1;
+ ca->state = NOT_USED;
+ }
+ eXosip_unlock ();
+ ___call_init = 0;
+ }
+ }
}
-void SIPCallSignaling::ClearCall(cs_token call)
+void SIPCallSignaling::ClearCall (cs_token call)
{
-call_t *ca;
-int i;
+ call_t *ca;
+ int i;
- if (___call_init != 0)
- {
- for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ if (___call_init != 0)
{
- if (calls[i].state != NOT_USED && calls[i].cid == int(call))
- break;
- }
- if (i == MAX_NUMBER_OF_CALLS)
- printf("call not found\n");
- else
- {
- ca = &(calls[i]);
- eXosip_lock ();
- i = eXosip_call_terminate (ca->cid, ca->did);
- if (i == 0)
- {
- //call_remove (ca);
- if (ca->enable_audio > 0)
- ca->enable_audio = -1;
- ca->state = NOT_USED;
- }
- eXosip_unlock ();
- }
+ for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ {
+ if (calls[i].state != NOT_USED && calls[i].cid == int (call))
+ break;
}
+ if (i == MAX_NUMBER_OF_CALLS)
+ printf ("call not found\n");
+ else
+ {
+ ca = &(calls[i]);
+ eXosip_lock ();
+ i = eXosip_call_terminate (ca->cid, ca->did);
+ if (i == 0)
+ {
+ //call_remove (ca);
+ if (ca->enable_audio > 0)
+ ca->enable_audio = -1;
+ ca->state = NOT_USED;
+ }
+ eXosip_unlock ();
+ }
+ }
}
-void SIPCallSignaling::SendData(cs_token call,char *buff,int size)
+void SIPCallSignaling::SendData (cs_token call, char *buff, int size)
{
- buff[1] &= 0x80;
- buff[1] |= payload_remote;
- if(xSocket.xSock.IsCreated()) xSocket.xSock.SendTo(buff,size,txIP,txPort);
+ buff[1] &= 0x80;
+ buff[1] |= payload_remote;
+ if (xSocket.xSock.IsCreated ())
+ xSocket.xSock.SendTo (buff, size, txIP, txPort);
}
-void SIPCallSignaling::AcceptCall(cs_token call)
+void SIPCallSignaling::AcceptCall (cs_token call)
{
-osip_message_t *answer = NULL;
-call_t *ca;
-int i;
+ osip_message_t *answer = NULL;
+ call_t *ca;
+ int i;
- if (___call_init != 0)
- {
- for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ if (___call_init != 0)
{
- if (calls[i].state != NOT_USED && calls[i].cid == int(call))
- break;
- }
- if (i == MAX_NUMBER_OF_CALLS)
- printf("call not found\n");
- else
- {
- ca = &(calls[i]);
- eXosip_lock ();
- i = eXosip_call_build_answer (ca->tid, 200, &answer);
- if (i != 0)
+ for (i = 0; i < MAX_NUMBER_OF_CALLS; i++)
+ {
+ if (calls[i].state != NOT_USED && calls[i].cid == int (call))
+ break;
+ }
+ if (i == MAX_NUMBER_OF_CALLS)
+ printf ("call not found\n");
+ else
+ {
+ ca = &(calls[i]);
+ eXosip_lock ();
+ i = eXosip_call_build_answer (ca->tid, 200, &answer);
+ if (i != 0)
+ {
+ eXosip_call_send_answer (ca->tid, 400, NULL);
+ }
+ else
+ {
+ /* sdp complete 200 OK */
+ sdp_message_t *remote_sdp;
+ sdp_media_t *remote_med;
+ //char *tmp = NULL;
+ char buf[4096];
+ int pos;
+ char localip[128];
+
+
+ remote_sdp = eXosip_get_remote_sdp (ca->did);
+ if (remote_sdp == NULL)
+ {
+ OSIP_TRACE (osip_trace
+ (__FILE__, __LINE__, OSIP_WARNING, NULL, "No remote SDP body found for call\n"));
+ osip_message_free (answer);
+ eXosip_call_send_answer (ca->tid, 415, NULL);
+ }
+
+ eXosip_guess_localip (AF_INET, localip, 128);
+
+ snprintf (buf, 4096,
+ "v=0\r\n"
+ "o=elsys 0 0 IN IP4 %s\r\n"
+ "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
+
+ pos = 0;
+ while (!osip_list_eol (remote_sdp->m_medias, pos))
+ {
+ char payloads[128];
+ int pos2;
+ //char *tmp;
+
+ memset (payloads, '\0', sizeof (payloads));
+ remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
+
+ if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
+ {
+
+ int capCnt;
+ capCnt = _sdp_analyse_media_attribute (remote_med);
+ for (pos2 = 0; pos2 < capCnt; pos2++)
{
- eXosip_call_send_answer (ca->tid, 400, NULL);
+ //tmp = itoa(cap_conv[pos2].ivanaCap);
+ //strcat(payloads, tmp);
+ strcat (payloads, cap_conv[pos2].payload);
+ strcat (payloads, " ");
+ }
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ if (payloads[0] == '\0')
+ {
+ strcat (buf, " 0 RTP/AVP \r\n");
+ sdp_message_free (remote_sdp);
+ osip_message_free (answer);
+ eXosip_call_send_answer (ca->tid, 415, NULL);
}
else
{
- /* sdp complete 200 OK */
- sdp_message_t *remote_sdp;
- sdp_media_t *remote_med;
- //char *tmp = NULL;
- char buf[4096];
- int pos;
- char localip[128];
-
-
- remote_sdp = eXosip_get_remote_sdp (ca->did);
- if (remote_sdp == NULL)
- {
- OSIP_TRACE (osip_trace
- (__FILE__, __LINE__, OSIP_WARNING, NULL,
- "No remote SDP body found for call\n"));
- osip_message_free (answer);
- eXosip_call_send_answer (ca->tid, 415, NULL);
- }
-
- eXosip_guess_localip (AF_INET, localip, 128);
-
- snprintf (buf, 4096,
- "v=0\r\n"
- "o=elsys 0 0 IN IP4 %s\r\n"
- "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
-
- pos = 0;
- while (!osip_list_eol (remote_sdp->m_medias, pos))
- {
- char payloads[128];
- int pos2;
- //char *tmp;
-
- memset (payloads, '\0', sizeof (payloads));
- remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
-
- if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
+ strcat (buf, " 10500 RTP/AVP ");
+ strcat (buf, payloads);
+ strcat (buf, "\r\n");
+ for (pos2 = 0; pos2 < capCnt; pos2++)
{
-
- int capCnt;
- capCnt = _sdp_analyse_media_attribute(remote_med);
- for(pos2=0;pos2<capCnt;pos2++)
- {
- //tmp = itoa(cap_conv[pos2].ivanaCap);
- //strcat(payloads, tmp);
- strcat(payloads, cap_conv[pos2].payload);
- strcat(payloads, " ");
- }
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- if (payloads[0] == '\0')
- {
- strcat (buf, " 0 RTP/AVP \r\n");
- sdp_message_free (remote_sdp);
- osip_message_free (answer);
- eXosip_call_send_answer (ca->tid, 415, NULL);
- }
- else
- {
- strcat (buf, " 10500 RTP/AVP ");
- strcat (buf, payloads);
- strcat (buf, "\r\n");
- for(pos2=0;pos2<capCnt;pos2++)
- {
- strcat(buf, "a=rtpmap:");
- //tmp = itoa(cap_conv[pos2].ivanaCap);
- //strcat(buf, tmp);
- strcat(buf, cap_conv[pos2].payload);
- strcat(buf, cap_conv[pos2].codec);
- strcat(buf, "\r\n");
- }
- }
- }
- else
- {
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- strcat (buf, " 0 ");
- strcat (buf, remote_med->m_proto);
- strcat (buf, " \r\n");
- }
- pos++;
- }
-
- payload_remote = atoi(cap_conv[0].payload);
- osip_message_set_body (answer, buf, strlen (buf));
- osip_message_set_content_type (answer, "application/sdp");
- sdp_message_free (remote_sdp);
-
- eXosip_call_send_answer (ca->tid, 200, answer);
- eXosip_unlock ();
+ strcat (buf, "a=rtpmap:");
+ //tmp = itoa(cap_conv[pos2].ivanaCap);
+ //strcat(buf, tmp);
+ strcat (buf, cap_conv[pos2].payload);
+ strcat (buf, cap_conv[pos2].codec);
+ strcat (buf, "\r\n");
+ }
}
+ }
+ else
+ {
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ strcat (buf, " 0 ");
+ strcat (buf, remote_med->m_proto);
+ strcat (buf, " \r\n");
+ }
+ pos++;
}
+
+ payload_remote = atoi (cap_conv[0].payload);
+ osip_message_set_body (answer, buf, strlen (buf));
+ osip_message_set_content_type (answer, "application/sdp");
+ sdp_message_free (remote_sdp);
+
+ eXosip_call_send_answer (ca->tid, 200, answer);
+ eXosip_unlock ();
+ }
}
+ }
}
-int SIPCallSignaling::Init(void *params)
+int SIPCallSignaling::Init (void *params)
{
- int i;
- int id;
- osip_message_t *reg = NULL;
- char localip[128];
- char route[128];
- struct sipInitParams* settings = (struct sipInitParams*)params;
-
- rcvFlag = 0;
- codecFlag = 0;
- /* Initialization of eXosip */
- i = eXosip_init ();
- if (i != 0)
- {
- fprintf (stderr, "eXosip can not be initialized\r\n");
- exit (0);
- }
+ int i;
+ int id;
+ osip_message_t *reg = NULL;
+ char localip[128];
+ char route[128];
+ struct sipInitParams *settings = (struct sipInitParams *) params;
+
+ rcvFlag = 0;
+ codecFlag = 0;
+ /* Initialization of eXosip */
+ i = eXosip_init ();
+ if (i != 0)
+ {
+ fprintf (stderr, "eXosip can not be initialized\r\n");
+ exit (0);
+ }
- i = eXosip_listen_addr (IPPROTO_UDP, NULL, 5060, AF_INET, 0);
+ i = eXosip_listen_addr (IPPROTO_UDP, NULL, 5060, AF_INET, 0);
- if (i != 0)
- {
- eXosip_quit ();
- fprintf (stderr, "transport layer can not be initialized\r\n");
- exit (0);
- }
+ if (i != 0)
+ {
+ eXosip_quit ();
+ fprintf (stderr, "transport layer can not be initialized\r\n");
+ exit (0);
+ }
- osip_set_allocators (0,0,0);
- eXosip_guess_localip (AF_INET, localip, 128);
+ osip_set_allocators (0, 0, 0);
+ eXosip_guess_localip (AF_INET, localip, 128);
- if(strcmp(settings->proxy, "no"))
- {
- strcpy(proxy, settings->proxy);
- /* REGISTER SIP User Agent */
-
- strcpy(identity, "sip:");
- strcat(identity, settings->id);
- strcat(identity, "@");
- strcat(identity, proxy);
-
- strcpy(route, "sip:");
- strcat(route, proxy);
-
- strcpy(contact, "sip:");
- strcat(contact, settings->id);
- strcat(contact, "@");
- strcat(contact, localip);
-
- if (eXosip_add_authentication_info(settings->id, settings->id, settings->pass, NULL, NULL))
- {
- printf ("eXosip_add_authentication_info failed\n");
- exit (1);
- }
- //eXosip_force_masquerade_contact (localip);
- //eXosip_masquerade_contact ("213.240.30.36", 10500);
-
- eXosip_lock ();
- id = eXosip_register_build_initial_register (identity,
- route,
- contact,
- 1800,
- &reg);
- if (id < 0)
- {
- eXosip_unlock ();
- fprintf (stderr, "bad registration?\r\n");
- exit(0);
- }
-
- osip_message_set_supported (reg, "100rel");
- osip_message_set_supported(reg, "path");
+ if (strcmp (settings->proxy, "no"))
+ {
+ strcpy (proxy, settings->proxy);
+ /* REGISTER SIP User Agent */
+
+ strcpy (identity, "sip:");
+ strcat (identity, settings->id);
+ strcat (identity, "@");
+ strcat (identity, proxy);
+
+ strcpy (route, "sip:");
+ strcat (route, proxy);
- i = eXosip_register_send_register (id, reg);
- eXosip_unlock ();
+ strcpy (contact, "sip:");
+ strcat (contact, settings->id);
+ strcat (contact, "@");
+ strcat (contact, localip);
+
+ if (eXosip_add_authentication_info (settings->id, settings->id, settings->pass, NULL, NULL))
+ {
+ printf ("eXosip_add_authentication_info failed\n");
+ exit (1);
}
- else
+ //eXosip_force_masquerade_contact (localip);
+ //eXosip_masquerade_contact ("213.240.30.36", 10500);
+
+ eXosip_lock ();
+ id = eXosip_register_build_initial_register (identity, route, contact, 1800, &reg);
+ if (id < 0)
{
- strcpy(identity, "sip:");
- strcat(identity, "111");
- strcat(identity, "@");
- strcat(identity, localip);
+ eXosip_unlock ();
+ fprintf (stderr, "bad registration?\r\n");
+ exit (0);
}
-
- ovaj=this;
- pthread_create(&recv_th_id, NULL, recv_th_dispatch, (void*) this);
- printf ("Welcome To SIP stack (%s )\r\n", identity);
+
+ osip_message_set_supported (reg, "100rel");
+ osip_message_set_supported (reg, "path");
+
+ i = eXosip_register_send_register (id, reg);
+ eXosip_unlock ();
+ }
+ else
+ {
+ strcpy (identity, "sip:");
+ strcat (identity, "111");
+ strcat (identity, "@");
+ strcat (identity, localip);
+ }
+
+ ovaj = this;
+ pthread_create (&recv_th_id, NULL, recv_th_dispatch, (void *) this);
+ printf ("Welcome To SIP stack (%s )\r\n", identity);
/*
i = pthread_create(&event_thread, NULL, josua_event_get, NULL);
@@ -568,148 +604,157 @@ int SIPCallSignaling::Init(void *params)
exit (1);
}
*/
- return 1;
+ return 1;
}
-int SIPCallSignaling::GetEvent(cs_token *token)
+int SIPCallSignaling::GetEvent (cs_token * token)
{
-eXosip_event_t *je;
+ eXosip_event_t *je;
- je = eXosip_event_wait (0, 0);
- eXosip_lock ();
- eXosip_default_action (je);
- eXosip_automatic_refresh ();
- eXosip_unlock ();
+ je = eXosip_event_wait (0, 0);
+ eXosip_lock ();
+ eXosip_default_action (je);
+ eXosip_automatic_refresh ();
+ eXosip_unlock ();
- if (rcvFlag == 1) {
- rcvFlag = 0;
- *token = xSocket.token;
- return PACK_DATA;
- }
- else if (codecFlag)
- {
- *token = codecFlag;
- codecFlag = 0;
- return PACK_CODEC;
- }
- else if (je == NULL) {
- eXosip_event_free(je);
- return 0;
- }
- if (je->type == EXOSIP_CALL_INVITE)
- {
- sdp_message_t *remote_sdp = NULL;
- call_t *ca;
- int k;
+/* For debugging purpose only. */
+#ifdef EVENT_DEBUG
+ if (je)
+ printf("\nEVENT: %s (%s)\n\n", je->textinfo, eXosip_event_type_string[je->type]);
+#endif
- printf("CALL INVITE\n");
- if (___call_init == 0)
+
+ if (rcvFlag == 1)
{
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
- }
+ rcvFlag = 0;
+ *token = xSocket.token;
+ return PACK_DATA;
}
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ else if (codecFlag)
{
- if (calls[k].state == NOT_USED)
- break;
+ *token = codecFlag;
+ codecFlag = 0;
+ return PACK_CODEC;
}
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
+ else if (je == NULL)
+ {
+ eXosip_event_free (je);
+ return 0;
}
- ca = &(calls[k]);
- memset (&(calls[k]), 0, sizeof (call_t));
+ if (je->type == EXOSIP_CALL_INVITE)
+ {
+ sdp_message_t *remote_sdp = NULL;
+ call_t *ca;
+ int k;
- ca->cid = je->cid;
- ca->did = je->did;
- ca->tid = je->tid;
+ printf ("CALL INVITE\n");
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
- if (ca->did < 1 && ca->cid < 1)
- {
- eXosip_event_free(je);
- return 0; /* not enough information for this event?? */
- }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state == NOT_USED)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
- osip_strncpy (ca->textinfo, je->textinfo, 255);
+ ca = &(calls[k]);
+ memset (&(calls[k]), 0, sizeof (call_t));
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
+ ca->cid = je->cid;
+ ca->did = je->did;
+ ca->tid = je->tid;
- if (je->request != NULL)
- {
- char *tmp = NULL;
+ if (ca->did < 1 && ca->cid < 1)
+ {
+ eXosip_event_free (je);
+ return 0; /* not enough information for this event?? */
+ }
- osip_from_to_str (je->request->from, &tmp);
- if (tmp != NULL)
- {
- snprintf (ca->remote_uri, 256, "%s", tmp);
- osip_free (tmp);
- }
- }
+ osip_strncpy (ca->textinfo, je->textinfo, 255);
- /* negotiate payloads */
- if (je->request != NULL)
- {
- remote_sdp = eXosip_get_sdp_info (je->request);
- }
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
- if (remote_sdp == NULL)
- {
- printf("missing SDP in INVITE request\n");
- }
+ if (je->request != NULL)
+ {
+ char *tmp = NULL;
- if (remote_sdp != NULL) /* TODO: else build an offer */
- {
- sdp_connection_t *conn;
- sdp_media_t *remote_med;
- //char *tmp = NULL;
-
- if (remote_sdp == NULL)
- {
- printf("No remote SDP body found for call\n");
- eXosip_call_send_answer (ca->tid, 400, NULL);
- sdp_message_free (remote_sdp);
- eXosip_event_free(je);
- return 0;
- }
+ osip_from_to_str (je->request->from, &tmp);
+ if (tmp != NULL)
+ {
+ snprintf (ca->remote_uri, 256, "%s", tmp);
+ osip_free (tmp);
+ }
+ }
- conn = eXosip_get_audio_connection (remote_sdp);
- if (conn != NULL && conn->c_addr != NULL)
- {
- snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
- }
- remote_med = eXosip_get_audio_media (remote_sdp);
-
- if (remote_med == NULL || remote_med->m_port == NULL)
- {
- /* no audio media proposed */
- printf("No audio media proposed\r\n");
- eXosip_call_send_answer (ca->tid, 415, NULL);
- sdp_message_free (remote_sdp);
- eXosip_event_free(je);
- return 0;
- }
+ /* negotiate payloads */
+ if (je->request != NULL)
+ {
+ remote_sdp = eXosip_get_sdp_info (je->request);
+ }
+
+ if (remote_sdp == NULL)
+ {
+ printf ("missing SDP in INVITE request\n");
+ }
+
+ if (remote_sdp != NULL) /* TODO: else build an offer */
+ {
+ sdp_connection_t *conn;
+ sdp_media_t *remote_med;
+ //char *tmp = NULL;
+
+ if (remote_sdp == NULL)
+ {
+ printf ("No remote SDP body found for call\n");
+ eXosip_call_send_answer (ca->tid, 400, NULL);
+ sdp_message_free (remote_sdp);
+ eXosip_event_free (je);
+ return 0;
+ }
- ca->remote_sdp_audio_port = atoi (remote_med->m_port);
+ conn = eXosip_get_audio_connection (remote_sdp);
+ if (conn != NULL && conn->c_addr != NULL)
+ {
+ snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
+ }
+ remote_med = eXosip_get_audio_media (remote_sdp);
+
+ if (remote_med == NULL || remote_med->m_port == NULL)
+ {
+ /* no audio media proposed */
+ printf ("No audio media proposed\r\n");
+ eXosip_call_send_answer (ca->tid, 415, NULL);
+ sdp_message_free (remote_sdp);
+ eXosip_event_free (je);
+ return 0;
+ }
- if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
- {
- //int pos;
+ ca->remote_sdp_audio_port = atoi (remote_med->m_port);
- printf("audio connection found: %s:%i\n",
+ if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
+ {
+ //int pos;
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
- //pos = 0;
+ printf ("audio connection found: %s:%i\n", ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+ //pos = 0;
/*
while (!osip_list_eol (remote_med->m_payloads, pos))
{
@@ -722,1575 +767,1552 @@ eXosip_event_t *je;
pos++;
}
*/
- }
+ }
- int capCnt;
- capCnt = _sdp_analyse_media_attribute(remote_med);
+ int capCnt;
+ capCnt = _sdp_analyse_media_attribute (remote_med);
- if(capCnt != 0)
- //if (tmp != NULL)
- {
- //ca->payload = atoi (tmp);
- ca->payload = atoi (cap_conv[0].payload);
- //ca->payload = cap_conv[0].ivanaCap;
- }
- else
- {
- printf("Call send answer - 415\r\n");
- eXosip_call_send_answer (ca->tid, 415, NULL);
- sdp_message_free (remote_sdp);
- eXosip_event_free(je);
- return 0;
- }
+ if (capCnt != 0)
+ //if (tmp != NULL)
+ {
+ //ca->payload = atoi (tmp);
+ ca->payload = atoi (cap_conv[0].payload);
+ //ca->payload = cap_conv[0].ivanaCap;
+ }
+ else
+ {
+ printf ("Call send answer - 415\r\n");
+ eXosip_call_send_answer (ca->tid, 415, NULL);
+ sdp_message_free (remote_sdp);
+ eXosip_event_free (je);
+ return 0;
+ }
- if (capCnt != 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
- //if (tmp != NULL && (ca->payload == 0 || ca->payload == 8) && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
- {
- printf("audio connection: (payload=%i) -> %s:%i\n",
- ca->payload,
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
- }
+ if (capCnt != 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
+ //if (tmp != NULL && (ca->payload == 0 || ca->payload == 8) && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
+ {
+ printf ("audio connection: (payload=%i) -> %s:%i\n",
+ ca->payload, ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+ }
+ }
+
+// eXosip_lock ();
+// eXosip_call_send_answer (ca->tid, 180, NULL);
+// eXosip_unlock ();
+
+ sdp_message_free (remote_sdp);
+ ca->state = je->type;
+
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_SETUP;
}
-
- eXosip_lock ();
- eXosip_call_send_answer (ca->tid, 180, NULL);
- eXosip_unlock ();
-
- sdp_message_free (remote_sdp);
- ca->state = je->type;
-
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_SETUP;
- }
- else if ((je->type == EXOSIP_MESSAGE_NEW) && (je->request != NULL) && MSG_IS_REFER(je->request))
- {
- int i;
- if (je->tid > 0)
+ else if ((je->type == EXOSIP_MESSAGE_NEW) && (je->request != NULL) && MSG_IS_REFER (je->request))
{
- osip_message_t *answer;
-
- eXosip_lock ();
- i = eXosip_message_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- eXosip_message_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_REFER (je->request))
- {
- int i;
+ int i;
+ if (je->tid > 0)
+ {
+ osip_message_t *answer;
- /* accepte call transfer */
- if (je->cid > 0 && je->did > 0)
- {
- osip_message_t *answer;
-
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 202, &answer);
- if (i == 0)
- {
- i = eXosip_call_send_answer (je->tid, 202, answer);
- }
- eXosip_unlock ();
-
- eXosip_lock ();
- if (i == 0)
- {
- osip_message_t *notify;
-
- i = eXosip_call_build_notify (je->did, EXOSIP_SUBCRSTATE_ACTIVE, &notify);
- if (i == 0)
- {
- osip_message_set_header (notify, "Event", "refer");
- osip_message_set_content_type (notify, "message/sipfrag");
- osip_message_set_body (notify, "SIP/2.0 100 Trying",
- strlen ("SIP/2.0 100 Trying"));
- i = eXosip_call_send_request (je->did, notify);
- }
- }
- eXosip_unlock ();
- }
- else if (je->tid > 0) /* bug?? */
+ eXosip_lock ();
+ i = eXosip_message_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ eXosip_message_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
+ }
+ }
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_REFER (je->request))
{
- osip_message_t *answer;
+ int i;
- eXosip_lock ();
- i = eXosip_message_build_answer (je->tid, 400, &answer);
- if (i == 0)
- {
- eXosip_message_send_answer (je->tid, 400, answer);
- }
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_UPDATE (je->request))
+ /* accepte call transfer */
+ if (je->cid > 0 && je->did > 0)
{
- int i;
+ osip_message_t *answer;
- /* accepte call transfer */
- if (je->cid > 0 && je->did > 0)
- {
- osip_message_t *answer;
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 202, &answer);
+ if (i == 0)
+ {
+ i = eXosip_call_send_answer (je->tid, 202, answer);
+ }
+ eXosip_unlock ();
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- i = eXosip_call_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
+ eXosip_lock ();
+ if (i == 0)
+ {
+ osip_message_t *notify;
- }
- else if (je->tid > 0) /* bug?? */
- {
+ i = eXosip_call_build_notify (je->did, EXOSIP_SUBCRSTATE_ACTIVE, &notify);
+ if (i == 0)
+ {
+ osip_message_set_header (notify, "Event", "refer");
+ osip_message_set_content_type (notify, "message/sipfrag");
+ osip_message_set_body (notify, "SIP/2.0 100 Trying", strlen ("SIP/2.0 100 Trying"));
+ i = eXosip_call_send_request (je->did, notify);
+ }
+ }
+ eXosip_unlock ();
+ }
+ else if (je->tid > 0) /* bug?? */
+ {
osip_message_t *answer;
-
+
eXosip_lock ();
i = eXosip_message_build_answer (je->tid, 400, &answer);
if (i == 0)
{
- eXosip_message_send_answer (je->tid, 400, answer);
- }
+ eXosip_message_send_answer (je->tid, 400, answer);
+ }
eXosip_unlock ();
+ }
}
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_UPDATE (je->request))
+ {
+ int i;
+
+ /* accepte call transfer */
+ if (je->cid > 0 && je->did > 0)
+ {
+ osip_message_t *answer;
+
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ i = eXosip_call_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
}
- else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_NOTIFY (je->request))
+ else if (je->tid > 0) /* bug?? */
{
- int i;
+ osip_message_t *answer;
+
+ eXosip_lock ();
+ i = eXosip_message_build_answer (je->tid, 400, &answer);
+ if (i == 0)
+ {
+ eXosip_message_send_answer (je->tid, 400, answer);
+ }
+ eXosip_unlock ();
+ }
- if (je->tid > 0)
+ }
+ else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_NOTIFY (je->request))
{
- osip_message_t *answer;
+ int i;
- eXosip_lock ();
- i = eXosip_message_build_answer (je->tid, 501, &answer);
- if (i == 0)
- {
- eXosip_message_send_answer (je->tid, 501, answer);
- }
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_NOTIFY (je->request))
+ if (je->tid > 0)
{
- int i;
+ osip_message_t *answer;
- if (je->cid > 0 && je->did > 0)
- {
- osip_message_t *answer;
-
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- i = eXosip_call_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_CALL_ACK)
- {
- call_t *ca;
- int k;
-
- printf("CALL ACK\n");
- //call_ack(je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ eXosip_lock ();
+ i = eXosip_message_build_answer (je->tid, 501, &answer);
+ if (i == 0)
+ {
+ eXosip_message_send_answer (je->tid, 501, answer);
}
+ eXosip_unlock ();
+ }
}
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_NOTIFY (je->request))
{
- if (calls[k].state != NOT_USED
- && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
+ int i;
- ca = &(calls[k]);
+ if (je->cid > 0 && je->did > 0)
+ {
+ osip_message_t *answer;
- if (je->ack != NULL)
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ i = eXosip_call_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
+ }
+ }
+ else if (je->type == EXOSIP_CALL_ACK)
{
- sdp_message_t *remote_sdp;
+ call_t *ca;
+ int k;
- remote_sdp = eXosip_get_sdp_info (je->ack);
- //if (remote_sdp == NULL)
- //printf("no SDP detected in ACK!\n");
- }
+ printf ("CALL ACK\n");
+ //call_ack(je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
- if (ca->enable_audio != 1) /* audio is started */
- {
- sdp_message_t *remote_sdp;
- sdp_message_t *local_sdp;
-
- remote_sdp = eXosip_get_remote_sdp (ca->did);
- local_sdp = eXosip_get_local_sdp (ca->did);
- if (remote_sdp == NULL)
- {
- //printf("No remote SDP body found for call\n");
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+
+ ca = &(calls[k]);
+
+ if (je->ack != NULL)
+ {
+ sdp_message_t *remote_sdp;
+
+ remote_sdp = eXosip_get_sdp_info (je->ack);
+ //if (remote_sdp == NULL)
+ //printf("no SDP detected in ACK!\n");
+ }
+
+ if (ca->enable_audio != 1) /* audio is started */
+ {
+ sdp_message_t *remote_sdp;
+ sdp_message_t *local_sdp;
+
+ remote_sdp = eXosip_get_remote_sdp (ca->did);
+ local_sdp = eXosip_get_local_sdp (ca->did);
+ if (remote_sdp == NULL)
+ {
+ //printf("No remote SDP body found for call\n");
+ }
+ if (remote_sdp != NULL && local_sdp != NULL)
+ {
+ sdp_connection_t *conn;
+ sdp_media_t *local_med;
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ int audio_port = 0;
+
+ conn = eXosip_get_audio_connection (remote_sdp);
+ if (conn != NULL && conn->c_addr != NULL)
+ {
+ snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
+ }
+ remote_med = eXosip_get_audio_media (remote_sdp);
+ if (remote_med != NULL && remote_med->m_port != NULL)
+ {
+ ca->remote_sdp_audio_port = atoi (remote_med->m_port);
+ }
+ local_med = eXosip_get_audio_media (local_sdp);
+ if (local_med != NULL && local_med->m_port != NULL)
+ {
+ audio_port = atoi (local_med->m_port);
+ }
+
+ if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && local_med != NULL)
+ {
+ tmp = (char *) osip_list_get (local_med->m_payloads, 0);
+ }
+ if (tmp != NULL)
+ {
+ int capCnt;
+ int i;
+
+ capCnt = _sdp_analyse_media_attribute (local_med);
+ for (i = 0; i < capCnt; i++)
+ {
+ if (strcmp (tmp, cap_conv[i].payload) == 0)
+ {
+ *token = cap_conv[i].ivanaCap;
+ if (cap_conv[i].ivanaCap == G723_63)
+ *token |= (30 << 8);
+ else
+ *token |= (20 << 8);
+ payload_local = cap_conv[i].ivanaCap;
+ break;
}
- if (remote_sdp != NULL && local_sdp != NULL)
- {
- sdp_connection_t *conn;
- sdp_media_t *local_med;
- sdp_media_t *remote_med;
- char *tmp = NULL;
- int audio_port = 0;
-
- conn = eXosip_get_audio_connection (remote_sdp);
- if (conn != NULL && conn->c_addr != NULL)
- {
- snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
- }
- remote_med = eXosip_get_audio_media (remote_sdp);
- if (remote_med != NULL && remote_med->m_port != NULL)
- {
- ca->remote_sdp_audio_port = atoi (remote_med->m_port);
- }
- local_med = eXosip_get_audio_media (local_sdp);
- if (local_med != NULL && local_med->m_port != NULL)
- {
- audio_port = atoi (local_med->m_port);
- }
+ }
- if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && local_med != NULL)
- {
- tmp = (char *) osip_list_get (local_med->m_payloads, 0);
- }
- if (tmp != NULL)
- {
- int capCnt;
- int i;
-
- capCnt = _sdp_analyse_media_attribute(local_med);
- for(i=0;i<capCnt;i++)
- {
- if(strcmp(tmp, cap_conv[i].payload) == 0)
- {
- *token = cap_conv[i].ivanaCap;
- if (cap_conv[i].ivanaCap == G723_63)
- *token |= (30<<8);
- else
- *token |= (20<<8);
- payload_local = cap_conv[i].ivanaCap;
- break;
- }
- }
-
- ca->payload = atoi (tmp);
- }
- if (tmp != NULL
- && audio_port > 0
- && ca->remote_sdp_audio_port > 0
- && ca->remote_sdp_audio_ip[0] != '\0')
-
- {
-
- printf("audio connection: (payload=%i) %i -> %s:%i\n",
- ca->payload,
- audio_port,
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
-
- /* search if stream is sendonly or recvonly */
- ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
- ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
- if (ca->local_sendrecv == _SENDRECV)
- {
- if (ca->remote_sendrecv == _SENDONLY)
- ca->local_sendrecv = _RECVONLY;
- else if (ca->remote_sendrecv == _RECVONLY)
- ca->local_sendrecv = _SENDONLY;
- }
- }
- }
- sdp_message_free (local_sdp);
- sdp_message_free (remote_sdp);
- }
+ ca->payload = atoi (tmp);
+ }
+ if (tmp != NULL
+ && audio_port > 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
- ca->state = je->type;
+ {
- if(!xSocket.xSock.Create(10500)) {
- printf("Socket not created\n");
+ printf ("audio connection: (payload=%i) %i -> %s:%i\n",
+ ca->payload, audio_port, ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+
+ /* search if stream is sendonly or recvonly */
+ ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
+ ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
+ if (ca->local_sendrecv == _SENDRECV)
+ {
+ if (ca->remote_sendrecv == _SENDONLY)
+ ca->local_sendrecv = _RECVONLY;
+ else if (ca->remote_sendrecv == _RECVONLY)
+ ca->local_sendrecv = _SENDONLY;
+ }
}
- xSocket.token = je->cid;
- txPort = ca->remote_sdp_audio_port;
- txIP = inet_addr(ca->remote_sdp_audio_ip);
- return PACK_CODEC;
- }
- else if (je->type == EXOSIP_CALL_ANSWERED)
- {
- call_t *ca;
- int k;
-
- printf("CALL ANSWERED\n");
- //call_answered (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
}
- }
+ sdp_message_free (local_sdp);
+ sdp_message_free (remote_sdp);
+ }
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
+ ca->state = je->type;
+
+ if (!xSocket.xSock.Create (10500))
+ {
+ printf ("Socket not created\n");
+ }
+ xSocket.token = je->cid;
+ txPort = ca->remote_sdp_audio_port;
+ txIP = inet_addr (ca->remote_sdp_audio_ip);
+ return PACK_CODEC;
}
- if (k == MAX_NUMBER_OF_CALLS)
+ else if (je->type == EXOSIP_CALL_ANSWERED)
{
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state == NOT_USED)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- memset (&(calls[k]), 0, sizeof (call_t));
+ call_t *ca;
+ int k;
- ca->cid = je->cid;
- ca->did = je->did;
+ printf ("CALL ANSWERED\n");
+ //call_answered (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
- if (ca->did < 1 && ca->cid < 1)
- {
- eXosip_event_free(je);
- return 0; /* not enough information for this event?? */
- }
- }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state == NOT_USED)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ memset (&(calls[k]), 0, sizeof (call_t));
- ca = &(calls[k]);
- osip_strncpy (ca->textinfo, je->textinfo, 255);
+ ca->cid = je->cid;
+ ca->did = je->did;
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
+ if (ca->did < 1 && ca->cid < 1)
+ {
+ eXosip_event_free (je);
+ return 0; /* not enough information for this event?? */
+ }
+ }
- if (je->request != NULL)
- {
- char *tmp = NULL;
+ ca = &(calls[k]);
+ osip_strncpy (ca->textinfo, je->textinfo, 255);
- osip_from_to_str (je->request->from, &tmp);
- if (tmp != NULL)
- {
- snprintf (ca->remote_uri, 256, "%s", tmp);
- osip_free (tmp);
- }
- }
- eXosip_lock ();
- osip_message_t *ack = NULL;
- int i;
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
- i = eXosip_call_build_ack (ca->did, &ack);
- if (i != 0)
+ if (je->request != NULL)
+ {
+ char *tmp = NULL;
+
+ osip_from_to_str (je->request->from, &tmp);
+ if (tmp != NULL)
+ {
+ snprintf (ca->remote_uri, 256, "%s", tmp);
+ osip_free (tmp);
+ }
+ }
+ eXosip_lock ();
+ osip_message_t *ack = NULL;
+ int i;
+
+ i = eXosip_call_build_ack (ca->did, &ack);
+ if (i != 0)
+ {
+ printf ("Cannot build ACK for call!\n");
+ }
+ else
+ {
+ sdp_message_t *local_sdp = NULL;
+ sdp_message_t *remote_sdp = NULL;
+
+ if (je->request != NULL && je->response != NULL)
+ {
+ local_sdp = eXosip_get_sdp_info (je->request);
+ remote_sdp = eXosip_get_sdp_info (je->response);
+ }
+ if (local_sdp == NULL && remote_sdp != NULL)
+ {
+ /* sdp in ACK */
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ char buf[4096];
+ int pos;
+ char localip[128];
+
+ if (remote_sdp == NULL)
{
- printf("Cannot build ACK for call!\n");
- }
- else
- {
- sdp_message_t *local_sdp = NULL;
- sdp_message_t *remote_sdp = NULL;
+ OSIP_TRACE (osip_trace
+ (__FILE__, __LINE__, OSIP_WARNING, NULL, "No remote SDP body found for call\n"));
+ eXosip_event_free (je);
+ return 0;
+ }
+ if (ack == NULL)
+ {
+ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL, "No message to complete\n"));
+ eXosip_event_free (je);
+ return 0;
+ }
- if (je->request != NULL && je->response != NULL)
- {
- local_sdp = eXosip_get_sdp_info (je->request);
- remote_sdp = eXosip_get_sdp_info (je->response);
- }
- if (local_sdp == NULL && remote_sdp != NULL)
- {
- /* sdp in ACK */
- sdp_media_t *remote_med;
- char *tmp = NULL;
- char buf[4096];
- int pos;
- char localip[128];
-
- if (remote_sdp == NULL)
- {
- OSIP_TRACE (osip_trace
- (__FILE__, __LINE__, OSIP_WARNING, NULL,
- "No remote SDP body found for call\n"));
- eXosip_event_free(je);
- return 0;
- }
- if (ack == NULL)
- {
- OSIP_TRACE (osip_trace
- (__FILE__, __LINE__, OSIP_WARNING, NULL,
- "No message to complete\n"));
- eXosip_event_free(je);
- return 0;
- }
-
- eXosip_guess_localip (AF_INET, localip, 128);
-
- snprintf (buf, 4096,
- "v=0\r\n"
- "o=elsys 0 0 IN IP4 %s\r\n"
- "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
-
- pos = 0;
- while (!osip_list_eol (remote_sdp->m_medias, pos))
- {
- char payloads[128];
- int pos2;
-
- memset (payloads, '\0', sizeof (payloads));
- remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
-
- if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
- {
- pos2 = 0;
- while (!osip_list_eol (remote_med->m_payloads, pos2))
- {
- tmp = (char *) osip_list_get (remote_med->m_payloads, pos2);
- if (tmp != NULL &&
- (0 == osip_strcasecmp (tmp, "0")
- || 0 == osip_strcasecmp (tmp, "8")))
- {
- strcat (payloads, tmp);
- strcat (payloads, " ");
- }
- pos2++;
- }
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- if (pos2 == 0 || payloads[0] == '\0')
- {
- strcat (buf, " 0 RTP/AVP \r\n");
- eXosip_event_free(je);
- return 0; /* refuse anyway */
- }
- else
- {
- strcat (buf, " 10500 RTP/AVP ");
- strcat (buf, payloads);
- strcat (buf, "\r\n");
-
- if (NULL != strstr (payloads, " 0 ")
- || (payloads[0] == '0' && payloads[1] == ' '))
- strcat (buf, "a=rtpmap:0 PCMU/8000\r\n");
- if (NULL != strstr (payloads, " 8 ")
- || (payloads[0] == '8' && payloads[1] == ' '))
- strcat (buf, "a=rtpmap:8 PCMA/8000\r\n");
- }
- }
- else
- {
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- strcat (buf, " 0 ");
- strcat (buf, remote_med->m_proto);
- strcat (buf, " \r\n");
- }
- pos++;
- }
- osip_message_set_body (ack, buf, strlen (buf));
- osip_message_set_content_type (ack, "application/sdp");
- }
- sdp_message_free (local_sdp);
- sdp_message_free (remote_sdp);
+ eXosip_guess_localip (AF_INET, localip, 128);
- eXosip_call_send_ack (ca->did, ack);
- }
- eXosip_unlock ();
+ snprintf (buf, 4096,
+ "v=0\r\n"
+ "o=elsys 0 0 IN IP4 %s\r\n"
+ "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
- if (ca->enable_audio == 1 && je->response != NULL)
- {
- sdp_message_t *sdp = eXosip_get_sdp_info (je->response);
+ pos = 0;
+ while (!osip_list_eol (remote_sdp->m_medias, pos))
+ {
+ char payloads[128];
+ int pos2;
+
+ memset (payloads, '\0', sizeof (payloads));
+ remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
- if (sdp != NULL)
+ if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
+ {
+ pos2 = 0;
+ while (!osip_list_eol (remote_med->m_payloads, pos2))
{
- /* audio is started and session has just been modified */
- ca->enable_audio = -1;
- sdp_message_free (sdp);
+ tmp = (char *) osip_list_get (remote_med->m_payloads, pos2);
+ if (tmp != NULL && (0 == osip_strcasecmp (tmp, "0") || 0 == osip_strcasecmp (tmp, "8")))
+ {
+ strcat (payloads, tmp);
+ strcat (payloads, " ");
+ }
+ pos2++;
}
- }
-
- if (ca->enable_audio != 1) /* audio is started */
- {
- sdp_message_t *remote_sdp;
- sdp_message_t *local_sdp;
-
- local_sdp = eXosip_get_sdp_info (je->request);
- remote_sdp = eXosip_get_sdp_info (je->response);
- if (remote_sdp == NULL)
- {
- printf("No remote SDP body found for call\n");
- /* TODO: remote_sdp = retreive from ack above */
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ if (pos2 == 0 || payloads[0] == '\0')
+ {
+ strcat (buf, " 0 RTP/AVP \r\n");
+ eXosip_event_free (je);
+ return 0; /* refuse anyway */
}
- if (local_sdp == NULL)
- {
- printf("SDP body was probably in the ACK (TODO)\n");
+ else
+ {
+ strcat (buf, " 10500 RTP/AVP ");
+ strcat (buf, payloads);
+ strcat (buf, "\r\n");
+
+ if (NULL != strstr (payloads, " 0 ") || (payloads[0] == '0' && payloads[1] == ' '))
+ strcat (buf, "a=rtpmap:0 PCMU/8000\r\n");
+ if (NULL != strstr (payloads, " 8 ") || (payloads[0] == '8' && payloads[1] == ' '))
+ strcat (buf, "a=rtpmap:8 PCMA/8000\r\n");
}
+ }
+ else
+ {
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ strcat (buf, " 0 ");
+ strcat (buf, remote_med->m_proto);
+ strcat (buf, " \r\n");
+ }
+ pos++;
+ }
+ osip_message_set_body (ack, buf, strlen (buf));
+ osip_message_set_content_type (ack, "application/sdp");
+ }
+ sdp_message_free (local_sdp);
+ sdp_message_free (remote_sdp);
+
+ eXosip_call_send_ack (ca->did, ack);
+ }
+ eXosip_unlock ();
+
+ if (ca->enable_audio == 1 && je->response != NULL)
+ {
+ sdp_message_t *sdp = eXosip_get_sdp_info (je->response);
+
+ if (sdp != NULL)
+ {
+ /* audio is started and session has just been modified */
+ ca->enable_audio = -1;
+ sdp_message_free (sdp);
+ }
+ }
+
+ if (ca->enable_audio != 1) /* audio is started */
+ {
+ sdp_message_t *remote_sdp;
+ sdp_message_t *local_sdp;
+
+ local_sdp = eXosip_get_sdp_info (je->request);
+ remote_sdp = eXosip_get_sdp_info (je->response);
+ if (remote_sdp == NULL)
+ {
+ printf ("No remote SDP body found for call\n");
+ /* TODO: remote_sdp = retreive from ack above */
+ }
+ if (local_sdp == NULL)
+ {
+ printf ("SDP body was probably in the ACK (TODO)\n");
+ }
- if (remote_sdp != NULL && local_sdp != NULL)
+ if (remote_sdp != NULL && local_sdp != NULL)
+ {
+ sdp_connection_t *conn;
+ sdp_media_t *local_med;
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ int audio_port = 0;
+
+ conn = eXosip_get_audio_connection (remote_sdp);
+ if (conn != NULL && conn->c_addr != NULL)
+ {
+ snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
+ }
+ remote_med = eXosip_get_audio_media (remote_sdp);
+ if (remote_med != NULL && remote_med->m_port != NULL)
+ {
+ ca->remote_sdp_audio_port = atoi (remote_med->m_port);
+ }
+ local_med = eXosip_get_audio_media (local_sdp);
+ if (local_med != NULL && local_med->m_port != NULL)
+ {
+ audio_port = atoi (local_med->m_port);
+ }
+
+ if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && remote_med != NULL)
+ {
+ printf ("audio connection found: %s:%i\n", ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+ tmp = (char *) osip_list_get (remote_med->m_payloads, 0);
+ }
+ if (tmp != NULL)
+ {
+ int capCnt;
+ int i;
+
+ capCnt = _sdp_analyse_media_attribute (remote_med);
+ for (i = 0; i < capCnt; i++)
+ {
+ if (strcmp (tmp, cap_conv[i].payload) == 0)
{
- sdp_connection_t *conn;
- sdp_media_t *local_med;
- sdp_media_t *remote_med;
- char *tmp = NULL;
- int audio_port = 0;
-
- conn = eXosip_get_audio_connection (remote_sdp);
- if (conn != NULL && conn->c_addr != NULL)
- {
- snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
- }
- remote_med = eXosip_get_audio_media (remote_sdp);
- if (remote_med != NULL && remote_med->m_port != NULL)
- {
- ca->remote_sdp_audio_port = atoi (remote_med->m_port);
- }
- local_med = eXosip_get_audio_media (local_sdp);
- if (local_med != NULL && local_med->m_port != NULL)
- {
- audio_port = atoi (local_med->m_port);
- }
-
- if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && remote_med != NULL)
- {
- printf("audio connection found: %s:%i\n",
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
- tmp = (char *) osip_list_get (remote_med->m_payloads, 0);
- }
- if (tmp != NULL)
- {
- int capCnt;
- int i;
-
- capCnt = _sdp_analyse_media_attribute(remote_med);
- for(i=0;i<capCnt;i++)
- {
- if(strcmp(tmp, cap_conv[i].payload) == 0)
- {
- codecFlag = cap_conv[i].ivanaCap;
- //codecFlag = 9;
- if (cap_conv[i].ivanaCap == G723_63)
- codecFlag |= (30<<8);
- else
- codecFlag |= (20<<8);
- payload_local = cap_conv[i].ivanaCap;
- payload_remote = atoi(cap_conv[i].payload);
- break;
- }
- }
-
- ca->payload = atoi (tmp);
- }
- if (tmp != NULL
- && audio_port > 0
- && ca->remote_sdp_audio_port > 0
- && ca->remote_sdp_audio_ip[0] != '\0')
-
- {
- printf("audio connection: (payload=%i) %i -> %s:%i\n",
- ca->payload,
- audio_port,
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
-
- /* search if stream is sendonly or recvonly */
- ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
- ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
- if (ca->local_sendrecv == _SENDRECV)
- {
- if (ca->remote_sendrecv == _SENDONLY)
- ca->local_sendrecv = _RECVONLY;
- else if (ca->remote_sendrecv == _RECVONLY)
- ca->local_sendrecv = _SENDONLY;
- }
- }
+ codecFlag = cap_conv[i].ivanaCap;
+ //codecFlag = 9;
+ if (cap_conv[i].ivanaCap == G723_63)
+ codecFlag |= (30 << 8);
+ else
+ codecFlag |= (20 << 8);
+ payload_local = cap_conv[i].ivanaCap;
+ payload_remote = atoi (cap_conv[i].payload);
+ break;
}
+ }
+ ca->payload = atoi (tmp);
+ }
+ if (tmp != NULL
+ && audio_port > 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
- sdp_message_free (local_sdp);
- sdp_message_free (remote_sdp);
- }
- ca->state = je->type;
-
- if(!xSocket.xSock.Create(10500)) {
- printf("Socket not created\n");
+ {
+ printf ("audio connection: (payload=%i) %i -> %s:%i\n",
+ ca->payload, audio_port, ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+
+ /* search if stream is sendonly or recvonly */
+ ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
+ ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
+ if (ca->local_sendrecv == _SENDRECV)
+ {
+ if (ca->remote_sendrecv == _SENDONLY)
+ ca->local_sendrecv = _RECVONLY;
+ else if (ca->remote_sendrecv == _RECVONLY)
+ ca->local_sendrecv = _SENDONLY;
+ }
}
- xSocket.token = je->cid;
- txPort = ca->remote_sdp_audio_port;
- txIP = inet_addr(ca->remote_sdp_audio_ip);
-
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_COMM;
- }
- else if (je->type == EXOSIP_CALL_PROCEEDING)
- {
- call_t *ca;
- int k;
-
- printf("CALL PROCEEDING\n");
- //call_proceeding (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
}
- }
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
+
+ sdp_message_free (local_sdp);
+ sdp_message_free (remote_sdp);
+ }
+ ca->state = je->type;
+
+ if (!xSocket.xSock.Create (10500))
+ {
+ printf ("Socket not created\n");
+ }
+ xSocket.token = je->cid;
+ txPort = ca->remote_sdp_audio_port;
+ txIP = inet_addr (ca->remote_sdp_audio_ip);
+
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_COMM;
}
- if (k == MAX_NUMBER_OF_CALLS)
+ else if (je->type == EXOSIP_CALL_PROCEEDING)
{
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state == NOT_USED)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- memset (&(calls[k]), 0, sizeof (call_t));
+ call_t *ca;
+ int k;
- ca->cid = je->cid;
- ca->did = je->did;
+ printf ("CALL PROCEEDING\n");
+ //call_proceeding (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
- if (ca->did < 1 || ca->cid < 1)
- {
- eXosip_event_free(je);
- return 0; /* not enough information for this event?? */
- }
- }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state == NOT_USED)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ memset (&(calls[k]), 0, sizeof (call_t));
- ca = &(calls[k]);
- osip_strncpy (ca->textinfo, je->textinfo, 255);
+ ca->cid = je->cid;
+ ca->did = je->did;
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
+ if (ca->did < 1 || ca->cid < 1)
+ {
+ eXosip_event_free (je);
+ return 0; /* not enough information for this event?? */
+ }
+ }
- if (je->request != NULL)
- {
- char *tmp = NULL;
+ ca = &(calls[k]);
+ osip_strncpy (ca->textinfo, je->textinfo, 255);
- osip_from_to_str (je->request->from, &tmp);
- if (tmp != NULL)
- {
- snprintf (ca->remote_uri, 256, "%s", tmp);
- osip_free (tmp);
- }
- }
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
- ca->state = je->type;
- }
- else if (je->type == EXOSIP_CALL_RINGING)
- {
- call_t *ca;
- int k;
+ if (je->request != NULL)
+ {
+ char *tmp = NULL;
- printf("CALL RINGING\n");
- //call_ringing (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ osip_from_to_str (je->request->from, &tmp);
+ if (tmp != NULL)
+ {
+ snprintf (ca->remote_uri, 256, "%s", tmp);
+ osip_free (tmp);
}
+ }
+
+ ca->state = je->type;
}
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS)
+ else if (je->type == EXOSIP_CALL_RINGING)
{
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state == NOT_USED)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- memset (&(calls[k]), 0, sizeof (call_t));
- snprintf (calls[k].wav_file, 256, "%s", "ringback.wav");
-
- ca->cid = je->cid;
- ca->did = je->did;
-
- if (ca->did < 1 || ca->cid < 1)
- {
- eXosip_event_free(je);
- return 0; /* not enough information for this event?? */
- }
- }
-
- ca = &(calls[k]);
- ca->cid = je->cid;
- ca->did = je->did;
- ca->tid = je->tid;
+ call_t *ca;
+ int k;
- osip_strncpy (ca->textinfo, je->textinfo, 255);
+ printf ("CALL RINGING\n");
+ //call_ringing (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state == NOT_USED)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ memset (&(calls[k]), 0, sizeof (call_t));
+ snprintf (calls[k].wav_file, 256, "%s", "ringback.wav");
- if (je->request != NULL)
- {
- char *tmp = NULL;
+ ca->cid = je->cid;
+ ca->did = je->did;
- osip_from_to_str (je->request->from, &tmp);
- if (tmp != NULL)
- {
- snprintf (ca->remote_uri, 256, "%s", tmp);
- osip_free (tmp);
- }
- }
+ if (ca->did < 1 || ca->cid < 1)
+ {
+ eXosip_event_free (je);
+ return 0; /* not enough information for this event?? */
+ }
+ }
- if (ca->enable_audio == 1 && je->response != NULL)
- {
- sdp_message_t *sdp = eXosip_get_sdp_info (je->response);
+ ca = &(calls[k]);
+ ca->cid = je->cid;
+ ca->did = je->did;
+ ca->tid = je->tid;
- if (sdp != NULL)
- {
- /* audio is started and session may just have been modified */
- sdp_message_free (sdp);
- }
- }
+ osip_strncpy (ca->textinfo, je->textinfo, 255);
- osip_header_t *rseq;
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
- osip_message_header_get_byname (je->response, "RSeq", 0, &rseq);
- if (rseq != NULL && rseq->hvalue != NULL)
- {
- /* try sending a PRACK */
- osip_message_t *prack = NULL;
- int i;
-
- eXosip_lock ();
- i = eXosip_call_build_prack (ca->tid, &prack);
- if (i != 0)
- {
- printf("Failed to build PRACK request\n");
- }
- else
- {
- eXosip_call_send_prack (ca->tid, prack);
- }
- eXosip_unlock ();
- }
+ if (je->request != NULL)
+ {
+ char *tmp = NULL;
- if (ca->enable_audio != 1) /* audio is started */
- {
- sdp_message_t *remote_sdp;
- sdp_message_t *local_sdp;
+ osip_from_to_str (je->request->from, &tmp);
+ if (tmp != NULL)
+ {
+ snprintf (ca->remote_uri, 256, "%s", tmp);
+ osip_free (tmp);
+ }
+ }
- local_sdp = eXosip_get_sdp_info (je->request);
- remote_sdp = eXosip_get_sdp_info (je->response);
- if (remote_sdp == NULL)
- {
- printf("No remote SDP body found for call\n");
- /* TODO: remote_sdp = retreive from ack above */
- }
- if (local_sdp == NULL)
- {
- printf("SDP body was probably in the ACK (TODO)\n");
- }
+ if (ca->enable_audio == 1 && je->response != NULL)
+ {
+ sdp_message_t *sdp = eXosip_get_sdp_info (je->response);
- if (remote_sdp != NULL && local_sdp != NULL)
- {
- sdp_connection_t *conn;
- sdp_media_t *local_med;
- sdp_media_t *remote_med;
- char *tmp = NULL;
- int audio_port = 0;
-
- conn = eXosip_get_audio_connection (remote_sdp);
- if (conn != NULL && conn->c_addr != NULL)
- {
- snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
- }
- remote_med = eXosip_get_audio_media (remote_sdp);
- if (remote_med != NULL && remote_med->m_port != NULL)
- {
- ca->remote_sdp_audio_port = atoi (remote_med->m_port);
- }
- local_med = eXosip_get_audio_media (local_sdp);
- if (local_med != NULL && local_med->m_port != NULL)
- {
- audio_port = atoi (local_med->m_port);
- }
-
- if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && remote_med != NULL)
- {
- printf("audio connection found: %s:%i\n",
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
- tmp = (char *) osip_list_get (remote_med->m_payloads, 0);
- }
- if (tmp != NULL)
- {
- ca->payload = atoi (tmp);
- }
- if (tmp != NULL
- && audio_port > 0
- && ca->remote_sdp_audio_port > 0
- && ca->remote_sdp_audio_ip[0] != '\0')
- {
- printf("audio connection: (payload=%i) %i -> %s:%i\n",
- ca->payload,
- audio_port,
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
-
- /* search if stream is sendonly or recvonly */
- ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
- ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
- if (ca->local_sendrecv == _SENDRECV)
- {
- if (ca->remote_sendrecv == _SENDONLY)
- ca->local_sendrecv = _RECVONLY;
- else if (ca->remote_sendrecv == _RECVONLY)
- ca->local_sendrecv = _SENDONLY;
- }
- }
- }
- sdp_message_free (local_sdp);
- sdp_message_free (remote_sdp);
- }
- ca->state = je->type;
-
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_RING;
- }
- else if (je->type == EXOSIP_CALL_REDIRECTED)
- {
- call_t *ca;
- int k;
-
- //call_redirected (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ if (sdp != NULL)
+ {
+ /* audio is started and session may just have been modified */
+ sdp_message_free (sdp);
}
- }
+ }
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
+ osip_header_t *rseq;
- ca = &(calls[k]);
+ osip_message_header_get_byname (je->response, "RSeq", 0, &rseq);
+ if (rseq != NULL && rseq->hvalue != NULL)
+ {
+ /* try sending a PRACK */
+ osip_message_t *prack = NULL;
+ int i;
- if (ca->enable_audio > 0)
- {
- ca->enable_audio = -1;
- }
+ eXosip_lock ();
+ i = eXosip_call_build_prack (ca->tid, &prack);
+ if (i != 0)
+ {
+ printf ("Failed to build PRACK request\n");
+ }
+ else
+ {
+ eXosip_call_send_prack (ca->tid, prack);
+ }
+ eXosip_unlock ();
+ }
+
+ if (ca->enable_audio != 1) /* audio is started */
+ {
+ sdp_message_t *remote_sdp;
+ sdp_message_t *local_sdp;
- ca->state = NOT_USED;
+ local_sdp = eXosip_get_sdp_info (je->request);
+ remote_sdp = eXosip_get_sdp_info (je->response);
+ if (remote_sdp == NULL)
+ {
+ printf ("No remote SDP body found for call\n");
+ /* TODO: remote_sdp = retreive from ack above */
+ }
+ if (local_sdp == NULL)
+ {
+ printf ("SDP body was probably in the ACK (TODO)\n");
+ }
- }
- else if (je->type == EXOSIP_CALL_REQUESTFAILURE)
- {
- call_t *ca;
- int k;
+ if (remote_sdp != NULL && local_sdp != NULL)
+ {
+ sdp_connection_t *conn;
+ sdp_media_t *local_med;
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ int audio_port = 0;
+
+ conn = eXosip_get_audio_connection (remote_sdp);
+ if (conn != NULL && conn->c_addr != NULL)
+ {
+ snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
+ }
+ remote_med = eXosip_get_audio_media (remote_sdp);
+ if (remote_med != NULL && remote_med->m_port != NULL)
+ {
+ ca->remote_sdp_audio_port = atoi (remote_med->m_port);
+ }
+ local_med = eXosip_get_audio_media (local_sdp);
+ if (local_med != NULL && local_med->m_port != NULL)
+ {
+ audio_port = atoi (local_med->m_port);
+ }
- //call_requestfailure (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && remote_med != NULL)
+ {
+ printf ("audio connection found: %s:%i\n", ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+ tmp = (char *) osip_list_get (remote_med->m_payloads, 0);
+ }
+ if (tmp != NULL)
+ {
+ ca->payload = atoi (tmp);
+ }
+ if (tmp != NULL
+ && audio_port > 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
+ {
+ printf ("audio connection: (payload=%i) %i -> %s:%i\n",
+ ca->payload, audio_port, ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+
+ /* search if stream is sendonly or recvonly */
+ ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
+ ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
+ if (ca->local_sendrecv == _SENDRECV)
+ {
+ if (ca->remote_sendrecv == _SENDONLY)
+ ca->local_sendrecv = _RECVONLY;
+ else if (ca->remote_sendrecv == _RECVONLY)
+ ca->local_sendrecv = _SENDONLY;
+ }
+ }
}
+ sdp_message_free (local_sdp);
+ sdp_message_free (remote_sdp);
+ }
+ ca->state = je->type;
+
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_RING;
}
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ else if (je->type == EXOSIP_CALL_REDIRECTED)
{
- if (calls[k].state != NOT_USED
- && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
+ call_t *ca;
+ int k;
- if ((je->response != NULL && je->response->status_code == 407)
- || (je->response != NULL && je->response->status_code == 401))
- {
- /* try authentication */
- eXosip_event_free(je);
- return 0;
- }
+ //call_redirected (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
+
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+
+ ca = &(calls[k]);
+
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+
+ ca->state = NOT_USED;
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- if (ca->enable_audio > 0)
- {
- ca->enable_audio = -1;
- }
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
}
- ca->state = NOT_USED;
- }
- else if (je->type == EXOSIP_CALL_SERVERFAILURE)
- {
- call_t *ca;
- int k;
-
- //call_serverfailure (je);
- if (___call_init == 0)
+ else if (je->type == EXOSIP_CALL_REQUESTFAILURE)
{
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ call_t *ca;
+ int k;
+
+ //call_requestfailure (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
}
+ }
+
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+
+ if ((je->response != NULL && je->response->status_code == 407)
+ || (je->response != NULL && je->response->status_code == 401))
+ {
+ /* try authentication */
+ eXosip_event_free (je);
+ return 0;
+ }
+
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
+ ca->state = NOT_USED;
}
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED
- && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- if (ca->enable_audio > 0)
- {
- ca->enable_audio = -1;
- }
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
- ca->state = NOT_USED;
- }
- else if (je->type == EXOSIP_CALL_GLOBALFAILURE)
- {
- call_t *ca;
- int k;
-
- //call_globalfailure (je);
- if (___call_init == 0)
+ else if (je->type == EXOSIP_CALL_SERVERFAILURE)
{
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ call_t *ca;
+ int k;
+
+ //call_serverfailure (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
}
- }
+ }
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED
- && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- if (ca->enable_audio > 0)
- {
- ca->enable_audio = -1;
- }
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
+ ca->state = NOT_USED;
}
- ca->state = NOT_USED;
-
- xSocket.xSock.Close();
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_QUIT;
- }
- else if (je->type == EXOSIP_CALL_NOANSWER)
- {
- }
- else if (je->type == EXOSIP_CALL_CLOSED)
- {
- call_t *ca;
- int k;
-
- //call_closed (je);
- if (___call_init == 0)
+ else if (je->type == EXOSIP_CALL_GLOBALFAILURE)
{
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ call_t *ca;
+ int k;
+
+ //call_globalfailure (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
}
+ }
+
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
+ ca->state = NOT_USED;
+
+ xSocket.xSock.Close ();
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_QUIT;
}
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ else if (je->type == EXOSIP_CALL_NOANSWER)
{
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
}
- ca = &(calls[k]);
- if (ca->enable_audio > 0)
+ else if (je->type == EXOSIP_CALL_CLOSED)
{
- ca->enable_audio = -1;
- }
- ca->state = NOT_USED;
-
- xSocket.xSock.Close();
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_QUIT;
- }
- else if (je->type == EXOSIP_CALL_RELEASED)
- {
- call_t *ca;
- int k;
-
- //call_closed (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ call_t *ca;
+ int k;
+
+ //call_closed (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
}
+ }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+ ca->state = NOT_USED;
+
+ xSocket.xSock.Close ();
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_QUIT;
}
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].cid == je->cid)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
- }
- ca = &(calls[k]);
- if (ca->enable_audio > 0)
+ else if (je->type == EXOSIP_CALL_RELEASED)
{
- ca->enable_audio = -1;
- }
- ca->state = NOT_USED;
-
- xSocket.xSock.Close();
- *token = je->cid;
- eXosip_event_free(je);
- return PACK_QUIT;
- }
- else if (je->type == EXOSIP_CALL_REINVITE)
- {
- call_t *ca;
- int k;
-
- //call_modified (je);
- if (___call_init == 0)
- {
- ___call_init = -1;
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- memset (&(calls[k]), 0, sizeof (call_t));
- calls[k].state = NOT_USED;
+ call_t *ca;
+ int k;
+
+ //call_closed (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
}
+ }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
+ ca->state = NOT_USED;
+
+ xSocket.xSock.Close ();
+ *token = je->cid;
+ eXosip_event_free (je);
+ return PACK_QUIT;
}
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ else if (je->type == EXOSIP_CALL_REINVITE)
{
- if (calls[k].state != NOT_USED
- && calls[k].cid == je->cid && calls[k].did == je->did)
- break;
- }
- if (k == MAX_NUMBER_OF_CALLS) {
- eXosip_event_free(je);
- return 0;
+ call_t *ca;
+ int k;
+
+ //call_modified (je);
+ if (___call_init == 0)
+ {
+ ___call_init = -1;
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ memset (&(calls[k]), 0, sizeof (call_t));
+ calls[k].state = NOT_USED;
+ }
+ }
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].cid == je->cid && calls[k].did == je->did)
+ break;
+ }
+ if (k == MAX_NUMBER_OF_CALLS)
+ {
+ eXosip_event_free (je);
+ return 0;
+ }
+ ca = &(calls[k]);
+ ca->tid = je->tid;
+ osip_strncpy (ca->textinfo, je->textinfo, 255);
+
+ if (je->response != NULL)
+ {
+ ca->status_code = je->response->status_code;
+ snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
+ }
+
+ if (je->request != NULL)
+ {
+ char *tmp = NULL;
+
+ osip_from_to_str (je->request->from, &tmp);
+ if (tmp != NULL)
+ {
+ snprintf (ca->remote_uri, 256, "%s", tmp);
+ osip_free (tmp);
+ }
+ }
+ ca->state = je->type;
+
+ eXosip_lock ();
+ osip_message_t *answer = NULL;
+ int i;
+
+ i = eXosip_call_build_answer (ca->tid, 200, &answer);
+ if (i != 0)
+ {
+ eXosip_call_send_answer (ca->tid, 400, NULL);
+ eXosip_unlock ();
+ eXosip_event_free (je);
+ return 0;
+ }
+ else
+ {
+ sdp_message_t *remote_sdp = NULL;
+
+ if (je->request != NULL)
+ remote_sdp = eXosip_get_sdp_info (je->request);
+ if (remote_sdp == NULL)
+ {
+ printf ("No remote SDP body found for call\n");
+ /* TODO: sdp in 200 & ACK */
+ eXosip_call_send_answer (ca->tid, 200, answer);
+ }
+ else
+ {
+ /* sdp in ACK */
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ char buf[4096];
+ int pos;
+ char localip[128];
+
+ if (remote_sdp == NULL)
+ {
+ OSIP_TRACE (osip_trace
+ (__FILE__, __LINE__, OSIP_WARNING, NULL, "No remote SDP body found for call\n"));
+ sdp_message_free (remote_sdp);
+ osip_message_free (answer);
+ eXosip_call_send_answer (ca->tid, 415, NULL);
+ eXosip_unlock ();
+ eXosip_event_free (je);
+ return 0;
+ }
+ if (answer == NULL)
+ {
+ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL, "No message to complete\n"));
+ sdp_message_free (remote_sdp);
+ osip_message_free (answer);
+ eXosip_call_send_answer (ca->tid, 415, NULL);
+ eXosip_unlock ();
+ eXosip_event_free (je);
+ return 0;
}
- ca = &(calls[k]);
- ca->tid = je->tid;
- osip_strncpy (ca->textinfo, je->textinfo, 255);
- if (je->response != NULL)
- {
- ca->status_code = je->response->status_code;
- snprintf (ca->reason_phrase, 50, je->response->reason_phrase);
- }
+ eXosip_guess_localip (AF_INET, localip, 128);
- if (je->request != NULL)
- {
- char *tmp = NULL;
+ snprintf (buf, 4096,
+ "v=0\r\n"
+ "o=elsys 0 0 IN IP4 %s\r\n"
+ "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
- osip_from_to_str (je->request->from, &tmp);
- if (tmp != NULL)
- {
- snprintf (ca->remote_uri, 256, "%s", tmp);
- osip_free (tmp);
- }
- }
- ca->state = je->type;
+ pos = 0;
+ while (!osip_list_eol (remote_sdp->m_medias, pos))
+ {
+ char payloads[128];
+ int pos2;
- eXosip_lock ();
- osip_message_t *answer = NULL;
- int i;
+ memset (payloads, '\0', sizeof (payloads));
+ remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
- i = eXosip_call_build_answer (ca->tid, 200, &answer);
- if (i != 0)
- {
- eXosip_call_send_answer (ca->tid, 400, NULL);
- eXosip_unlock ();
- eXosip_event_free(je);
- return 0;
- }
- else
- {
- sdp_message_t *remote_sdp = NULL;
-
- if (je->request != NULL)
- remote_sdp = eXosip_get_sdp_info (je->request);
- if (remote_sdp == NULL)
- {
- printf("No remote SDP body found for call\n");
- /* TODO: sdp in 200 & ACK */
- eXosip_call_send_answer (ca->tid, 200, answer);
- }
+ if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
+ {
+ pos2 = 0;
+ while (!osip_list_eol (remote_med->m_payloads, pos2))
+ {
+ tmp = (char *) osip_list_get (remote_med->m_payloads, pos2);
+ if (tmp != NULL && (0 == osip_strcasecmp (tmp, "0") || 0 == osip_strcasecmp (tmp, "8")))
+ {
+ strcat (payloads, tmp);
+ strcat (payloads, " ");
+ }
+ pos2++;
+ }
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ if (pos2 == 0 || payloads[0] == '\0')
+ {
+ strcat (buf, " 0 RTP/AVP \r\n");
+ eXosip_event_free (je);
+ return 0; /* refuse anyway */
+ }
else
- {
- /* sdp in ACK */
- sdp_media_t *remote_med;
- char *tmp = NULL;
- char buf[4096];
- int pos;
- char localip[128];
-
- if (remote_sdp == NULL)
- {
- OSIP_TRACE (osip_trace
- (__FILE__, __LINE__, OSIP_WARNING, NULL,
- "No remote SDP body found for call\n"));
- sdp_message_free (remote_sdp);
- osip_message_free (answer);
- eXosip_call_send_answer (ca->tid, 415, NULL);
- eXosip_unlock ();
- eXosip_event_free(je);
- return 0;
- }
- if (answer == NULL)
- {
- OSIP_TRACE (osip_trace
- (__FILE__, __LINE__, OSIP_WARNING, NULL,
- "No message to complete\n"));
- sdp_message_free (remote_sdp);
- osip_message_free (answer);
- eXosip_call_send_answer (ca->tid, 415, NULL);
- eXosip_unlock ();
- eXosip_event_free(je);
- return 0;
- }
-
- eXosip_guess_localip (AF_INET, localip, 128);
-
- snprintf (buf, 4096,
- "v=0\r\n"
- "o=elsys 0 0 IN IP4 %s\r\n"
- "s=conversation\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", localip, localip);
-
- pos = 0;
- while (!osip_list_eol (remote_sdp->m_medias, pos))
- {
- char payloads[128];
- int pos2;
-
- memset (payloads, '\0', sizeof (payloads));
- remote_med = (sdp_media_t *) osip_list_get (remote_sdp->m_medias, pos);
-
- if (0 == osip_strcasecmp (remote_med->m_media, "audio"))
- {
- pos2 = 0;
- while (!osip_list_eol (remote_med->m_payloads, pos2))
- {
- tmp = (char *) osip_list_get (remote_med->m_payloads, pos2);
- if (tmp != NULL &&
- (0 == osip_strcasecmp (tmp, "0")
- || 0 == osip_strcasecmp (tmp, "8")))
- {
- strcat (payloads, tmp);
- strcat (payloads, " ");
- }
- pos2++;
- }
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- if (pos2 == 0 || payloads[0] == '\0')
- {
- strcat (buf, " 0 RTP/AVP \r\n");
- eXosip_event_free(je);
- return 0; /* refuse anyway */
- }
- else
- {
- strcat (buf, " 10500 RTP/AVP ");
- strcat (buf, payloads);
- strcat (buf, "\r\n");
-
- if (NULL != strstr (payloads, " 0 ")
- || (payloads[0] == '0' && payloads[1] == ' '))
- strcat (buf, "a=rtpmap:0 PCMU/8000\r\n");
- if (NULL != strstr (payloads, " 8 ")
- || (payloads[0] == '8' && payloads[1] == ' '))
- strcat (buf, "a=rtpmap:8 PCMA/8000\r\n");
- }
- }
- else
- {
- strcat (buf, "m=");
- strcat (buf, remote_med->m_media);
- strcat (buf, " 0 ");
- strcat (buf, remote_med->m_proto);
- strcat (buf, " \r\n");
- }
- pos++;
- }
- osip_message_set_body (answer, buf, strlen (buf));
- osip_message_set_content_type (answer, "application/sdp");
-
- sdp_message_free (remote_sdp);
- eXosip_call_send_answer (ca->tid, 200, answer);
+ {
+ strcat (buf, " 10500 RTP/AVP ");
+ strcat (buf, payloads);
+ strcat (buf, "\r\n");
+
+ if (NULL != strstr (payloads, " 0 ") || (payloads[0] == '0' && payloads[1] == ' '))
+ strcat (buf, "a=rtpmap:0 PCMU/8000\r\n");
+ if (NULL != strstr (payloads, " 8 ") || (payloads[0] == '8' && payloads[1] == ' '))
+ strcat (buf, "a=rtpmap:8 PCMA/8000\r\n");
}
+ }
+ else
+ {
+ strcat (buf, "m=");
+ strcat (buf, remote_med->m_media);
+ strcat (buf, " 0 ");
+ strcat (buf, remote_med->m_proto);
+ strcat (buf, " \r\n");
+ }
+ pos++;
}
- eXosip_unlock ();
+ osip_message_set_body (answer, buf, strlen (buf));
+ osip_message_set_content_type (answer, "application/sdp");
- if (ca->enable_audio > 0)
- {
- ca->enable_audio = -1;
- }
+ sdp_message_free (remote_sdp);
+ eXosip_call_send_answer (ca->tid, 200, answer);
+ }
+ }
+ eXosip_unlock ();
- if (ca->enable_audio != 1) /* audio is started */
- {
- sdp_message_t *remote_sdp;
- sdp_message_t *local_sdp;
-
- remote_sdp = eXosip_get_remote_sdp (ca->did);
- local_sdp = eXosip_get_local_sdp (ca->did);
- if (remote_sdp == NULL)
- {
- printf("No remote SDP body found for call\n");
- }
- if (remote_sdp != NULL && local_sdp != NULL)
- {
- sdp_connection_t *conn;
- sdp_media_t *local_med;
- sdp_media_t *remote_med;
- char *tmp = NULL;
- int audio_port = 0;
-
- conn = eXosip_get_audio_connection (remote_sdp);
- if (conn != NULL && conn->c_addr != NULL)
- {
- snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
- }
- remote_med = eXosip_get_audio_media (remote_sdp);
- if (remote_med != NULL && remote_med->m_port != NULL)
- {
- ca->remote_sdp_audio_port = atoi (remote_med->m_port);
- }
- local_med = eXosip_get_audio_media (local_sdp);
- if (local_med != NULL && local_med->m_port != NULL)
- {
- audio_port = atoi (local_med->m_port);
- }
+ if (ca->enable_audio > 0)
+ {
+ ca->enable_audio = -1;
+ }
- if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && local_med != NULL)
- {
- printf("audio connection found: %s:%i\n",
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+ if (ca->enable_audio != 1) /* audio is started */
+ {
+ sdp_message_t *remote_sdp;
+ sdp_message_t *local_sdp;
- tmp = (char *) osip_list_get (local_med->m_payloads, 0);
- }
- if (tmp != NULL)
- {
- ca->payload = atoi (tmp);
- }
- if (tmp != NULL
- && audio_port > 0
- && ca->remote_sdp_audio_port > 0
- && ca->remote_sdp_audio_ip[0] != '\0')
- {
- printf("audio connection: (payload=%i) %i -> %s:%i\n",
- ca->payload,
- audio_port,
- ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
-
- /* search if stream is sendonly or recvonly */
- ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
- ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
- if (ca->local_sendrecv == _SENDRECV)
- {
- if (ca->remote_sendrecv == _SENDONLY)
- ca->local_sendrecv = _RECVONLY;
- else if (ca->remote_sendrecv == _RECVONLY)
- ca->local_sendrecv = _SENDONLY;
- }
- }
- }
- sdp_message_free (local_sdp);
- sdp_message_free (remote_sdp);
- }
- }
- else if (je->type == EXOSIP_REGISTRATION_SUCCESS)
- {
- printf("EXOSIP_REGISTRATION_SUCCESS\r\n");
- if (je->response != NULL)
- printf("je->response->status_code(registration status) = %d\r\n", je->response->status_code);
- else
- printf("registration status = 0\r\n");
- if (je->request != NULL && je->request->req_uri != NULL && je->request->req_uri->host != NULL)
- printf ("josua_registration_server sip:%s\r\n", je->request->req_uri->host);
- if (je->response != NULL && je->response->reason_phrase != NULL && je->response->reason_phrase != '\0')
- printf ("josua_registration_reason_phrase %s", je->response->reason_phrase);
- else
- printf ("josua_registration_reason_phrase = 0\r\n");
- }
- else if (je->type == EXOSIP_REGISTRATION_FAILURE)
- {
- printf("EXOSIP_REGISTRATION_FAILURE\r\n");
- }
- else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_OPTIONS (je->request))
- {
- int k;
- /* outside of any call */
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED)
- break;
+ remote_sdp = eXosip_get_remote_sdp (ca->did);
+ local_sdp = eXosip_get_local_sdp (ca->did);
+ if (remote_sdp == NULL)
+ {
+ printf ("No remote SDP body found for call\n");
+ }
+ if (remote_sdp != NULL && local_sdp != NULL)
+ {
+ sdp_connection_t *conn;
+ sdp_media_t *local_med;
+ sdp_media_t *remote_med;
+ char *tmp = NULL;
+ int audio_port = 0;
+
+ conn = eXosip_get_audio_connection (remote_sdp);
+ if (conn != NULL && conn->c_addr != NULL)
+ {
+ snprintf (ca->remote_sdp_audio_ip, 50, conn->c_addr);
}
- eXosip_lock ();
- if (k == MAX_NUMBER_OF_CALLS)
- {
- eXosip_options_send_answer (je->tid, 200, NULL);
- }
- else
- {
- /* answer 486 ok */
- eXosip_options_send_answer (je->tid, 486, NULL);
+ remote_med = eXosip_get_audio_media (remote_sdp);
+ if (remote_med != NULL && remote_med->m_port != NULL)
+ {
+ ca->remote_sdp_audio_port = atoi (remote_med->m_port);
+ }
+ local_med = eXosip_get_audio_media (local_sdp);
+ if (local_med != NULL && local_med->m_port != NULL)
+ {
+ audio_port = atoi (local_med->m_port);
}
- eXosip_unlock ();
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_OPTIONS (je->request))
- {
- int k;
+ if (ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0' && local_med != NULL)
+ {
+ printf ("audio connection found: %s:%i\n", ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
- /* answer the OPTIONS method */
- /* 1: search for an existing call */
- if (je->cid != 0)
+ tmp = (char *) osip_list_get (local_med->m_payloads, 0);
+ }
+ if (tmp != NULL)
+ {
+ ca->payload = atoi (tmp);
+ }
+ if (tmp != NULL
+ && audio_port > 0 && ca->remote_sdp_audio_port > 0 && ca->remote_sdp_audio_ip[0] != '\0')
+ {
+ printf ("audio connection: (payload=%i) %i -> %s:%i\n",
+ ca->payload, audio_port, ca->remote_sdp_audio_ip, ca->remote_sdp_audio_port);
+
+ /* search if stream is sendonly or recvonly */
+ ca->remote_sendrecv = _sdp_analyse_attribute (remote_sdp, remote_med);
+ ca->local_sendrecv = _sdp_analyse_attribute (local_sdp, local_med);
+ if (ca->local_sendrecv == _SENDRECV)
+ {
+ if (ca->remote_sendrecv == _SENDONLY)
+ ca->local_sendrecv = _RECVONLY;
+ else if (ca->remote_sendrecv == _RECVONLY)
+ ca->local_sendrecv = _SENDONLY;
+ }
+ }
+ }
+ sdp_message_free (local_sdp);
+ sdp_message_free (remote_sdp);
+ }
+ }
+ else if (je->type == EXOSIP_REGISTRATION_SUCCESS)
{
- osip_message_t *answer;
- int i;
-
- for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
- {
- if (calls[k].state != NOT_USED && calls[k].did == je->did)
- break;
- }
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- eXosip_call_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
- }
- else /* bug? */
+ printf ("EXOSIP_REGISTRATION_SUCCESS\r\n");
+ if (je->response != NULL)
+ printf ("je->response->status_code(registration status) = %d\r\n", je->response->status_code);
+ else
+ printf ("registration status = 0\r\n");
+ if (je->request != NULL && je->request->req_uri != NULL && je->request->req_uri->host != NULL)
+ printf ("josua_registration_server sip:%s\r\n", je->request->req_uri->host);
+ if (je->response != NULL && je->response->reason_phrase != NULL && je->response->reason_phrase != '\0')
+ printf ("josua_registration_reason_phrase %s", je->response->reason_phrase);
+ else
+ printf ("josua_registration_reason_phrase = 0\r\n");
+ }
+ else if (je->type == EXOSIP_REGISTRATION_FAILURE)
{
- eXosip_lock ();
- eXosip_options_send_answer (je->tid, 400, NULL);
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_INFO (je->request))
+ printf ("EXOSIP_REGISTRATION_FAILURE\r\n");
+ }
+ else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_OPTIONS (je->request))
+ {
+ int k;
+ /* outside of any call */
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
{
- int i;
-
- /* what's the purpose of sending INFO outside dialog? */
- eXosip_lock ();
- i = eXosip_message_send_answer (je->tid, 501, NULL);
- eXosip_unlock ();
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_INFO (je->request))
+ if (calls[k].state != NOT_USED)
+ break;
+ }
+ eXosip_lock ();
+ if (k == MAX_NUMBER_OF_CALLS)
{
- if (je->cid != 0)
- {
- osip_message_t *answer;
- int i;
-
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- eXosip_call_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
- }
- else /* bug? */
+ eXosip_options_send_answer (je->tid, 200, NULL);
+ }
+ else
+ {
+ /* answer 486 ok */
+ eXosip_options_send_answer (je->tid, 486, NULL);
+ }
+ eXosip_unlock ();
+
+ }
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_OPTIONS (je->request))
{
- int i;
+ int k;
- eXosip_lock ();
- i = eXosip_call_send_answer (je->tid, 400, NULL);
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_MESSAGE (je->request))
+ /* answer the OPTIONS method */
+ /* 1: search for an existing call */
+ if (je->cid != 0)
{
- /* answer 2xx */
- eXosip_lock ();
- eXosip_message_send_answer (je->tid, 200, NULL);
- eXosip_unlock ();
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_MESSAGE (je->request))
+ osip_message_t *answer;
+ int i;
+
+ for (k = 0; k < MAX_NUMBER_OF_CALLS; k++)
+ {
+ if (calls[k].state != NOT_USED && calls[k].did == je->did)
+ break;
+ }
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ eXosip_call_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
+ }
+ else /* bug? */
{
- /* answer 2xx */
- if (je->cid != 0)
+ eXosip_lock ();
+ eXosip_options_send_answer (je->tid, 400, NULL);
+ eXosip_unlock ();
+ }
+ }
+ else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_INFO (je->request))
{
- osip_message_t *answer;
- int i;
+ int i;
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 200, &answer);
- if (i == 0)
- {
- eXosip_call_send_answer (je->tid, 200, answer);
- }
- eXosip_unlock ();
- }
- else /* bug? */
+ /* what's the purpose of sending INFO outside dialog? */
+ eXosip_lock ();
+ i = eXosip_message_send_answer (je->tid, 501, NULL);
+ eXosip_unlock ();
+ }
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_INFO (je->request))
{
- int i;
+ if (je->cid != 0)
+ {
+ osip_message_t *answer;
+ int i;
- eXosip_lock ();
- i = eXosip_call_send_answer (je->tid, 400, NULL);
- eXosip_unlock ();
- }
- }
- else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL)
- {
- osip_message_t *answer;
- int i;
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ eXosip_call_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
+ }
+ else /* bug? */
+ {
+ int i;
- eXosip_lock ();
- i = eXosip_message_build_answer (je->tid, 405, &answer);
- if (i == 0)
+ eXosip_lock ();
+ i = eXosip_call_send_answer (je->tid, 400, NULL);
+ eXosip_unlock ();
+ }
+ }
+ else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL && MSG_IS_MESSAGE (je->request))
{
- eXosip_message_send_answer (je->tid, 405, answer);
- }
- eXosip_unlock ();
- }
- else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL)
+ /* answer 2xx */
+ eXosip_lock ();
+ eXosip_message_send_answer (je->tid, 200, NULL);
+ eXosip_unlock ();
+ }
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL && MSG_IS_MESSAGE (je->request))
+ {
+ /* answer 2xx */
+ if (je->cid != 0)
+ {
+ osip_message_t *answer;
+ int i;
+
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 200, &answer);
+ if (i == 0)
+ {
+ eXosip_call_send_answer (je->tid, 200, answer);
+ }
+ eXosip_unlock ();
+ }
+ else /* bug? */
{
- int i;
+ int i;
- /* answer 2xx */
- if (je->cid != 0)
+ eXosip_lock ();
+ i = eXosip_call_send_answer (je->tid, 400, NULL);
+ eXosip_unlock ();
+ }
+ }
+ else if (je->type == EXOSIP_MESSAGE_NEW && je->request != NULL)
{
- osip_message_t *answer;
+ osip_message_t *answer;
+ int i;
- eXosip_lock ();
- i = eXosip_call_build_answer (je->tid, 405, &answer);
- if (i == 0)
- {
- eXosip_call_send_answer (je->tid, 405, answer);
- }
- eXosip_unlock ();
- }
- else /* bug? */
+ eXosip_lock ();
+ i = eXosip_message_build_answer (je->tid, 405, &answer);
+ if (i == 0)
+ {
+ eXosip_message_send_answer (je->tid, 405, answer);
+ }
+ eXosip_unlock ();
+ }
+ else if (je->type == EXOSIP_CALL_MESSAGE_NEW && je->request != NULL)
{
- osip_message_t *answer;
+ int i;
- eXosip_lock ();
- i = eXosip_message_build_answer (je->tid, 405, &answer);
- if (i == 0)
- {
- eXosip_message_send_answer (je->tid, 405, answer);
- }
- eXosip_unlock ();
- }
+ /* answer 2xx */
+ if (je->cid != 0)
+ {
+ osip_message_t *answer;
+
+ eXosip_lock ();
+ i = eXosip_call_build_answer (je->tid, 405, &answer);
+ if (i == 0)
+ {
+ eXosip_call_send_answer (je->tid, 405, answer);
+ }
+ eXosip_unlock ();
}
- eXosip_event_free (je);
- return 0;
+ else /* bug? */
+ {
+ osip_message_t *answer;
+
+ eXosip_lock ();
+ i = eXosip_message_build_answer (je->tid, 405, &answer);
+ if (i == 0)
+ {
+ eXosip_message_send_answer (je->tid, 405, answer);
+ }
+ eXosip_unlock ();
+ }
+ }
+ eXosip_event_free (je);
+ return 0;
}
-SIPCallSignaling::~SIPCallSignaling()
+SIPCallSignaling::~SIPCallSignaling ()
{
- xSocket.xSock.Close();
+ xSocket.xSock.Close ();
}
-void SIPCallSignaling::recv_th()
+void
+ SIPCallSignaling::recv_th ()
{
- while(1) {
- if(xSocket.xSock.IsCreated())
- {
- //xSocket.xSock.WaitForPacket();
- data_len=xSocket.xSock.RecvFrom(data,1024);
- if(data_len>0) {
- rcvFlag = 1;
- data[1] &= 0x80;
- data[1] |= payload_local;
- }
- }
- else {
- usleep(100000);
- }
+ while (1)
+ {
+ if (xSocket.xSock.IsCreated ())
+ {
+ //xSocket.xSock.WaitForPacket();
+ data_len = xSocket.xSock.RecvFrom (data, 1024);
+ if (data_len > 0)
+ {
+ rcvFlag = 1;
+ data[1] &= 0x80;
+ data[1] |= payload_local;
+ }
}
+ else
+ {
+ usleep (100000);
+ }
+ }
}
diff --git a/voip/demo/build/makefile b/voip/demo/build/makefile
index 300f7f0e9d..352408e24c 100644
--- a/voip/demo/build/makefile
+++ b/voip/demo/build/makefile
@@ -23,14 +23,13 @@ endif
# Add inputs and outputs from these tool invocations to the build variables
# All Target
-all: voipdemo
+all: clean voipdemo
# Tool invocations
voipdemo: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
- @echo arm-uclinux-g++ -march=armv5 -msoft-float -Wl,-elf2flt='-s 16000' -ovoipdemo $(OBJS) $(USER_OBJS) -L../../tmp/lib $(LIBS)
- @arm-uclinux-g++ -march=armv5 -msoft-float -Wl,-elf2flt='-s 16000' -ovoipdemo $(OBJS) $(USER_OBJS) -L../../tmp/lib $(LIBS)
+ arm-uclinux-g++ -march=armv5 -msoft-float -Wl,-elf2flt='-s 16000' -ovoipdemo $(OBJS) $(USER_OBJS) -L../../build/lib $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
$(MAKE) --no-print-directory post-build
diff --git a/voip/demo/build/subdir.mk b/voip/demo/build/subdir.mk
index 73420d7ae5..5b6aaf71d3 100644
--- a/voip/demo/build/subdir.mk
+++ b/voip/demo/build/subdir.mk
@@ -61,10 +61,10 @@ endif
%.o: $(ROOT)/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
- @echo arm-uclinux-g++ $(CFLAGS) $(INCDIR) -O3 -Wall -c -march=armv5 -msoft-float -o$@ $<
- @arm-uclinux-g++ $(CFLAGS) $(INCDIR) -O3 -Wall -c -march=armv5 -msoft-float -o$@ $< && \
+ @echo arm-uclinux-g++ $(CFLAGS) $(INCDIR) -Wall -c -march=armv5 -msoft-float -o$@ $<
+ @arm-uclinux-g++ $(CFLAGS) $(INCDIR) -Wall -c -march=armv5 -msoft-float -o$@ $< && \
echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \
- arm-uclinux-g++ -MM -MG -P -w $(CFLAGS) $(INCDIR) -O3 -Wall -c -march=armv5 -msoft-float $< >> $(@:%.o=%.d)
+ arm-uclinux-g++ -MM -MG -P -w $(CFLAGS) $(INCDIR) -Wall -c -march=armv5 -msoft-float $< >> $(@:%.o=%.d)
@echo 'Finished building: $<'
@echo ' '
diff --git a/voip/demo/main.cpp b/voip/demo/main.cpp
index 7f1ed0d5cb..1bdf591cc3 100644
--- a/voip/demo/main.cpp
+++ b/voip/demo/main.cpp
@@ -249,6 +249,7 @@ public:
{
trace("Entering %s state...\n", GetStateText((FSMStates) m_state));
m_call = 0;
+ ClearDTMFbuffer();
}
void ExitIdleState()
{
@@ -301,11 +302,11 @@ public:
CS.AcceptCall(m_call);
return COMM;
}
- if(/*m_mst.Now()>MAX_AUTOANSER_TIME &&*/ m_answermachineenabled) {
+ if(m_mst.Now()>MAX_AUTOANSER_TIME && m_answermachineenabled) {
m_autoanswermode=true;
trace("Auto Answer mode!\n");
playfile.Open("answer.msg;beep.msg",true);
- //CS.AcceptCall(m_call);
+ CS.AcceptCall(m_call);
return COMM;
}
if(m_mst.Now()>MAX_RING_TIME) {
@@ -354,10 +355,13 @@ public:
return PLAYFILE;
} else if(b[0]=='*' && !typed[0]) {
bool b;
- if(m_answermachineenabled) b=playfile.Open("welcome.msg;press1.msg;todeactivate.msg;ansmachine.msg;press2.msg;tolistenmsg.msg;press3.msg;tochangenum.msg;silence.msg");
- else b=playfile.Open("welcome.msg;press1.msg;toactivate.msg;ansmachine.msg;press2.msg;tolistenmsg.msg;press3.msg;tochangenum.msg;silence.msg");
- if(!b) trace("Opening playfiles for admin menu failed!\n");
- return ADMIN;
+// NS> removed admin menu because of problem with codecs
+// if(m_answermachineenabled) b=playfile.Open("welcome.msg;press1.msg;todeactivate.msg;ansmachine.msg;press2.msg;tolistenmsg.msg;press3.msg;tochangenum.msg;silence.msg");
+// else b=playfile.Open("welcome.msg;press1.msg;toactivate.msg;ansmachine.msg;press2.msg;tolistenmsg.msg;press3.msg;tochangenum.msg;silence.msg");
+// b=playfile.Open("welcome.msg;silence.msg");
+// if(!b) trace("Opening playfiles for admin menu failed!\n");
+// return ADMIN;
+ return BUSY;
} else {
strcat(typed,b);
StopTone();
@@ -385,6 +389,7 @@ public:
trace("Entering %s state...\n", GetStateText((FSMStates) m_state));
StartCommunication(m_codec,m_codecfr);
SetGreenLED(LED_ON);
+ ClearDTMFbuffer();
}
void ExitCommState()
{
@@ -482,6 +487,7 @@ public:
}
int DoProcessWhenCommIdle() {
CS.PurgeEvents();
+ ClearDTMFbuffer();
if(!GetHookState()) return IDLE;
return BUSY;
}
@@ -514,6 +520,7 @@ public:
default:
CS.PurgeEvent(event,token);
};
+ ClearDTMFbuffer();
if(!GetHookState()) {
CS.ClearCall(m_call);
return IDLE;
@@ -547,7 +554,8 @@ public:
m_numpackets=0;
StartCommunication();
switch(c) {
- case '1':
+// NS> removed admin menu
+/* case '1':
m_answermachineenabled=!m_answermachineenabled;
if(m_answermachineenabled) {
playfile.Open("ansmachine.msg;activated.msg",true);
@@ -566,7 +574,7 @@ public:
}
return PLAYFILE;
case '2':
- case '#':
+*/ case '#':
if(!playfile.Open(m_message,true))
playfile.Open("nomsg.msg",true);
return PLAYFILE;
@@ -609,6 +617,7 @@ public:
if(res) Write(buff,res);
else return IDLE;
}
+ ClearDTMFbuffer();
return PLAYFILE;
}
diff --git a/voip/demo/tapi.h b/voip/demo/tapi.h
index 026617e5c2..0c478573a4 100644
--- a/voip/demo/tapi.h
+++ b/voip/demo/tapi.h
@@ -513,6 +513,7 @@ public:
if(status.dialing) {
// save status.digit
char dig[2];
+ if(strlen(m_digits)>=31) return true;
if(status.digit<10) dig[0]='0'+status.digit;
else if(status.digit==10) dig[0]='*';
else if(status.digit==11) dig[0]='0';
diff --git a/voip/drv_vinetic-2.1/Makefile b/voip/drv_vinetic-2.1/Makefile
index ca34e8ad00..80b0df950f 100644
--- a/voip/drv_vinetic-2.1/Makefile
+++ b/voip/drv_vinetic-2.1/Makefile
@@ -1,29 +1,20 @@
-target_dir = build
-target_dir_absolut = $(shell pwd)/$(target_dir)
+target_dir = ./build
tapi_driver = $(target_dir)/drv_tapi.ko
vinetic_driver = $(target_dir)/drv_vinetic.ko
-all : $(tapi_driver) $(vinetic_driver)
+all : clean $(tapi_driver) $(vinetic_driver)
$(tapi_driver) :
- echo $(target_dir_absolut);
- @cd drv_tapi-3.3.2; \
- chmod +x configure; \
- ./configure --prefix=$(target_dir_absolut) --program-suffix=.ko --build=i686-pc-linux --host=arm-uclinux --enable-warnings --enable-kernelpath=../../../../linux-2.6.10 --enable-voice --enable-dtmf --enable-module CFLAGS="-I../../../../include -DSP_CRISTINA -O2" build_alias=i686-pc-linux host_alias=arm-uclinux; \
- $(MAKE)
- mkdir -p $(target_dir)
- cp drv_tapi-3.3.2/src/drv_tapi.ko $(tapi_driver)
+ @cd drv_tapi-3.3.2/src; $(MAKE)
+ cp drv_tapi-3.3.2/src/drv_tapi.ko $(target_dir)
$(vinetic_driver) :
- @cd drv_vinetic-1.2.1; \
- chmod +x configure; \
- ./configure --prefix=$(target_dir_absolut) --program-suffix=.ko --build=i686-pc-linux --host=arm-uclinux --enable-warnings --enable-trace --enable-kernelpath=../../../../linux-2.6.10 --with-access-mode=MOTOROLA --enable-tapiincl=../../drv_tapi-3.3.2/src/ --enable-8bit --enable-dsp --enable-voice --enable-dtmf --enable-2cpe CFLAGS="-I../../../../include -DSP_CRISTINA -O2" build_alias=i686-pc-linux host_alias=arm-uclinux; \
- $(MAKE)
- mkdir -p $(target_dir)
- cp drv_vinetic-1.2.1/2cpe/drv_vinetic.ko $(vinetic_driver)
+ @cd drv_vinetic-1.2.1/2cpe; $(MAKE)
+ cp drv_vinetic-1.2.1/2cpe/drv_vinetic.ko $(target_dir)
clean :
- @cd drv_tapi-3.3.2; $(MAKE) clean;
- @cd drv_vinetic-1.2.1; $(MAKE) clean;
- rm -drf $(target_dir)
+ @cd drv_tapi-3.3.2/src; $(MAKE) clean;
+ @cd drv_vinetic-1.2.1/2cpe; $(MAKE) clean;
+ @if test -e "$(tapi_driver)"; then rm $(tapi_driver); else echo "File drv_tapi.ko doesn't exist!"; fi;
+ @if test -e "$(vinetic_driver)"; then rm $(vinetic_driver); else echo "File drv_vinetic.ko doesn't exist! "; fi;
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/dramfw.bin b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/dramfw.bin
index 5ea530236c..5ea530236c 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/dramfw.bin
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/dramfw.bin
Binary files differ
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.bin b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.bin
index 5ea530236c..5ea530236c 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.bin
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.bin
Binary files differ
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.c b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.c
index e73248980c..e73248980c 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.c
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.c
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.hex b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.hex
index 9b09974be2..9b09974be2 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.hex
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.hex
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.txt b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.txt
index 1550fe3336..1550fe3336 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspDRAMfw_RTP_0_17_32_V22.txt
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspDRAMfw_RTP_0_17_32_V22.txt
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.bin b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.bin
index d089218950..d089218950 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.bin
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.bin
Binary files differ
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.c b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.c
index 0ca3cfc086..0ca3cfc086 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.c
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.c
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.hex b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.hex
index 950b57714e..950b57714e 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.hex
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.hex
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.txt b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.txt
index 174a02d7d6..174a02d7d6 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/edspPRAMfw_RTP_0_17_32_V22.txt
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/edspPRAMfw_RTP_0_17_32_V22.txt
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/errors_RTP_0_17_32_V22.txt b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/errors_RTP_0_17_32_V22.txt
index 6633a000de..6633a000de 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/errors_RTP_0_17_32_V22.txt
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/errors_RTP_0_17_32_V22.txt
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/pramfw.bin b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/pramfw.bin
index d089218950..d089218950 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/pramfw.bin
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/pramfw.bin
Binary files differ
diff --git a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/vinetic_RTP_0_17_32_V22.map b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/vinetic_RTP_0_17_32_V22.map
index 197ec053db..197ec053db 100755
--- a/voip/drv_vinetic-2.1/RTP_0_17_32_V22(no FPI)/vinetic_RTP_0_17_32_V22.map
+++ b/voip/drv_vinetic-2.1/RTP_0_17_32_V22_no_FPI/vinetic_RTP_0_17_32_V22.map
diff --git a/voip/drv_vinetic-2.1/drv_tapi-3.3.2/Makefile b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/Makefile
new file mode 100644
index 0000000000..9fcf19b192
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/Makefile
@@ -0,0 +1,660 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = .
+
+pkgdatadir = $(datadir)/drv_tapi
+pkglibdir = $(libdir)/drv_tapi
+pkgincludedir = $(includedir)/drv_tapi
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/drv_config.h.in \
+ $(top_srcdir)/configure $(top_srcdir)/src/Makefile.in AUTHORS \
+ ChangeLog NEWS TODO compile depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = drv_config.h
+CONFIG_CLEAN_FILES = src/Makefile
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(drv_tapi_docdir)"
+drv_tapi_docDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(drv_tapi_doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE =
+AMTAR = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run tar
+AUTOCONF = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CONFIGURE_OPTIONS =
+CPPFLAGS =
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ENABLE_OBSOLETE_LEC_ACTIVATION_FALSE =
+ENABLE_OBSOLETE_LEC_ACTIVATION_TRUE = #
+EVENT_LOGGER_DEBUG_FALSE =
+EVENT_LOGGER_DEBUG_TRUE = #
+EXEEXT =
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+KERNEL_INCL_PATH =
+KERNEL_PATH =
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/missing --run makeinfo
+OBJEXT = o
+PACKAGE = drv_tapi
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = TAPI 3.x - The Common Voice API
+PACKAGE_STRING = TAPI 3.x - The Common Voice API 3.3.2
+PACKAGE_TARNAME = drv_tapi
+PACKAGE_VERSION = 3.3.2
+PATH_SEPARATOR = :
+PRJ_BASE_PATH =
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+TAPI_FALSE = #
+TAPI_TRUE =
+UDP_REDIRECT_FALSE =
+UDP_REDIRECT_TRUE = #
+USE_MODULE_FALSE = #
+USE_MODULE_TRUE =
+VERSION = 3.3.2
+ac_ct_CC = gcc
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/nenad/mig/v/voip/drv_vinetic-2.1/drv_tapi-3.3.2/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias =
+AUTOMAKE_OPTIONS = foreign 1.6 nostdinc
+SUBDIRS = src
+DISTCHECK_CONFIGURE_FLAGS =
+drv_tapi_docdir = ${prefix}/doc/drv_tapi
+drv_tapi_doc_DATA = \
+ README\
+ AUTHORS\
+ ChangeLog\
+ NEWS\
+ TODO\
+ LICENSE\
+ doc/doxyconfig\
+ doc/footer.html\
+ doc/header.html\
+ doc/logo.gif\
+ doc/stylesheet.css
+
+EXTRA_DIST = $(drv_tapi_doc_DATA)
+all: drv_config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+drv_config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/drv_config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status drv_config.h
+$(srcdir)/drv_config.h.in: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f drv_config.h stamp-h1
+src/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/Makefile.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-drv_tapi_docDATA: $(drv_tapi_doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(drv_tapi_docdir)" || $(mkdir_p) "$(DESTDIR)$(drv_tapi_docdir)"
+ @list='$(drv_tapi_doc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(drv_tapi_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(drv_tapi_docdir)/$$f'"; \
+ $(drv_tapi_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(drv_tapi_docdir)/$$f"; \
+ done
+
+uninstall-drv_tapi_docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(drv_tapi_doc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(drv_tapi_docdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(drv_tapi_docdir)/$$f"; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) drv_config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) drv_config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) drv_config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) drv_config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/doc $(distdir)/src
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) drv_config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(drv_tapi_docdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-drv_tapi_docDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-drv_tapi_docDATA uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-drv_tapi_docDATA install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-drv_tapi_docDATA \
+ uninstall-info-am
+
+
+# Create self extracting linux distribution
+distcheck-hook:
+ makeself.sh --gzip --notemp $(distdir) drv_tapi-$(PACKAGE_VERSION).sh \
+ "$(PACKAGE_NAME)"
+
+lint:
+ @target=lint; \
+ list='$(SUBDIRS)'; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done;
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/voip/drv_vinetic-2.1/drv_tapi-3.3.2/drv_config.h b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/drv_config.h
new file mode 100644
index 0000000000..f47a8c7d5b
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/drv_config.h
@@ -0,0 +1,104 @@
+/* drv_config.h. Generated from drv_config.h.in by configure. */
+/* drv_config.h.in. Generated from configure.in by autoheader. */
+
+/******************************************************************************
+
+ Copyright (c) 2006
+ Infineon Technologies AG
+ Am Campeon 1-12; 81726 Munich, Germany
+
+ THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED NON-EXCLUSIVE,
+ WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE AND SUBLICENSE THIS
+ SOFTWARE IS FREE OF CHARGE.
+
+ THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY DISCLAIMS
+ ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING
+ WITHOUT LIMITATION, WARRANTIES OR REPRESENTATIONS OF WORKMANSHIP,
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, DURABILITY, THAT THE
+ OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR FREE OR FREE OF ANY THIRD
+ PARTY CLAIMS, INCLUDING WITHOUT LIMITATION CLAIMS OF THIRD PARTY INTELLECTUAL
+ PROPERTY INFRINGEMENT.
+
+ EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND EXCEPT
+ FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE FOR ANY CLAIM
+ OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ ******************************************************************************/
+#ifndef _DRV_CONFIG_H_
+#define _DRV_CONFIG_H_
+
+
+/* configure options string */
+#define DRV_TAPI_CONFIGURE_STR ""
+
+/* enable log (errors) outputs in general */
+/* #undef ENABLE_LOG */
+
+/* enable obsolete lec activation */
+/* #undef ENABLE_OBSOLETE_LEC_ACTIVATION */
+
+/* enable trace outputs in general */
+/* #undef ENABLE_TRACE */
+
+/* enabled event logger debugging */
+/* #undef EVENT_LOGGER_DEBUG */
+
+/* Name of package */
+#define PACKAGE "drv_tapi"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "TAPI 3.x - The Common Voice API"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "TAPI 3.x - The Common Voice API 3.3.2"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "drv_tapi"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "3.3.2"
+
+/* enable runtime traces as register access */
+/* #undef RUNTIME_TRACE */
+
+/* enable TAPI Interface */
+#define TAPI 1
+
+/* enable TAPI AUDIO CHANNEL support */
+#define TAPI_AUDIO_CHANNEL 1
+
+/* enable TAPI CID support */
+#define TAPI_CID 1
+
+/* enable TAPI DTMF support */
+#define TAPI_DTMF 1
+
+/* enable TAPI EXT KEYPAD support */
+#define TAPI_EXT_KEYPAD 1
+
+/* enable TAPI FAX support */
+#define TAPI_FAX_T38 1
+
+/* enable TAPI GR909 tests */
+/* #undef TAPI_GR909 */
+
+/* enable line testing */
+/* #undef TAPI_LT */
+
+/* enable Voice support */
+#define TAPI_VOICE 1
+
+/* enable LINUX MODULE support */
+#define USE_MODULE 1
+
+/* Version number of package */
+#define VERSION "3.3.2"
+
+
+#endif /* _DRV_CONFIG_H_ */
+
diff --git a/voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile
new file mode 100644
index 0000000000..d157f5a6a4
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_tapi-3.3.2/src/Makefile
@@ -0,0 +1,31 @@
+#MODDIR = .
+MODDIR = $(shell pwd)
+
+CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -Wno-format -DEXPORT_SYMTAB -O2 \
+ -I$(MOD_DIR) -I$(COMMON_INCDIR) -I$(LIBF_DIR) -I$(LIBB_DIR) \
+ -I$(INC_DIR) -DHAVE_CONFIG_H -DDEBUG_TAPI
+
+#List all project object/implementation files here
+drv_tapi-objs := drv_tapi_common.o drv_tapi_linux.o drv_tapi_dial.o \
+ drv_tapi_event.o drv_tapi_meter.o drv_tapi_misc.o \
+ drv_tapi_opcontrol.o drv_tapi_pcm.o drv_tapi_ring.o \
+ drv_tapi_tone.o drv_tapi_cid.o drv_tapi_voice.o \
+ drv_tapi_init.o drv_tapi_stream.o drv_tapi_polling.o \
+ \
+ lib/lib_fifo/lib_fifo.o lib/lib_bufferpool/lib_bufferpool.o \
+ common/src/sys_drv_fifo.o common/src/sys_drv_debug.o
+
+#Driver/module output file
+obj-m := drv_tapi.o
+
+#Add make rules
+KERNELDIR = ../../../../linux-2.6.10
+
+all:
+ $(MAKE) -C $(KERNELDIR) SUBDIRS=$(MODDIR) COMMON_INCDIR=$(MODDIR)/common/src \
+ MOD_DIR=$(MODDIR) LIBF_DIR=$(MODDIR)/lib/lib_fifo LIBB_DIR=$(MODDIR)/lib/lib_bufferpool \
+ INC_DIR=../../../../include -f Makefile M=$(MODDIR) V=1
+
+clean:
+ rm -rf *.o .*.cmd
+ rm -f *.ko
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/Makefile b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/Makefile
new file mode 100644
index 0000000000..4c3120c418
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/Makefile
@@ -0,0 +1,80 @@
+#Add RTAI
+#rtai_srctree := /usr/local/sw/rtai-3.1-2.6/rtai-core
+#lib_srctree := /usr/local/toolchains/arm-uclinux/arm-uclinux
+#EXTRA_CFLAGS += -I$(rtai_srctree)/include -I$(lib_srctree)/include
+#EXTRA_AFLAGS += -I$(rtai_srctree)/include -I$(lib_srctree)/include
+
+
+MODDIR = $(shell pwd)
+
+drv_vinetic_CFLAGS = -D__LINUX__ -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -O2
+
+LDFLAGS += -r -nostdlib
+
+CFLAGS += $(drv_vinetic_CFLAGS) -I$(SRC_DIR) -I$(TOPBUILD_DIR) -I$(TAPIINCL_DIR) \
+ -I$(MOD_DIR) -I$(COMMON_INCDIR) -I$(LIBFIFO_DIR) -I$(LIBBP_DIR) \
+ -I$(LIBBBD_DIR) \
+ -DHAVE_CONFIG_H -DDBG_LEVEL_HIGH \
+# -DTAPI -DTAPI_CID -DTAPI_DTMF -DTAPI_VOICE \
+
+#List all project object/implementation files here
+drv_vinetic-objs := drv_vinetic_api.o \
+ drv_vinetic_host.o \
+ drv_vinetic_bbd.o \
+ drv_vinetic_gr909.o \
+ drv_vinetic_hosttapi.o \
+ drv_vinetic_int.o \
+ drv_vinetic_access.o \
+ drv_vinetic_gpio.o \
+ drv_vinetic_alm_cpe.o \
+ drv_vinetic_polling.o \
+ ../src/drv_vinetic_ioctl.o \
+ ../src/drv_vinetic_basic.o \
+ ../src/drv_vinetic_dwnld.o \
+ ../src/drv_vinetic_main.o \
+ ../src/drv_vinetic_misc.o \
+ ../src/drv_vinetic_stream.o \
+ ../src/drv_vinetic_linux.o \
+ ../src/drv_vinetic_dspconf.o \
+ ../src/drv_vinetic_sig.o \
+ ../src/drv_vinetic_sig_cptd.o \
+ ../src/drv_vinetic_sig_dtmfg.o \
+ ../src/drv_vinetic_sig_mftd.o \
+ ../src/drv_vinetic_sig_utd.o \
+ ../src/drv_vinetic_sig_utg.o \
+ ../src/drv_vinetic_sig_cid.o \
+ ../src/drv_vinetic_init.o \
+ ../src/drv_vinetic_init_cap.o \
+ ../src/drv_vinetic_pcm.o \
+ ../src/drv_vinetic_alm.o \
+ ../src/drv_vinetic_alm_tone.o \
+ ../src/drv_vinetic_con.o \
+ ../src/drv_vinetic_cod.o \
+ ../src/drv_vinetic_event.o \
+ ../src/lib/lib_bbd/src/lib_bbd.o \
+ ../src/lib/lib_fifo/lib_fifo.o \
+ ../src/common/src/sys_drv_fifo.o \
+ ../src/common/src/sys_drv_debug.o \
+
+#Driver/module output file
+obj-m := drv_vinetic.o
+
+#Add make rules
+KERNELDIR = ../../../../linux-2.6.10
+
+all:
+ $(MAKE) -C $(KERNELDIR) SUBDIRS=$(MODDIR) \
+ SRC_DIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1/src \
+ TOPBUILD_DIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1 \
+ COMMON_INCDIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1/src/common/src \
+ MOD_DIR=$(MODDIR) \
+ LIBFIFO_DIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1/src/lib/lib_fifo \
+ LIBBP_DIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1/src/lib/lib_bufferpool \
+ LIBBBD_DIR=../voip/drv_vinetic-2.1/drv_vinetic-1.2.1/src/lib/lib_bbd/src \
+ TAPIINCL_DIR=../voip/drv_vinetic-2.1/drv_tapi-3.3.2/src \
+ -f Makefile M=$(MODDIR) V=1
+
+clean:
+ rm -rf *.o .*.cmd
+ rm -f *.ko
+
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.c b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.c
index 476b936753..9ad40e2f54 100755
--- a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.c
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.c
@@ -30,6 +30,7 @@
/* ============================= */
/* Includes */
/* ============================= */
+#include <linux/config.h>
#include "drv_vinetic_api.h"
/* ============================= */
@@ -45,9 +46,6 @@
#endif /* SPI_MAXBYTES_SIZE| SPI_CS_SET | spi_ll_read_write */
#endif /* VIN_ACCESS_MODE == VIN_ACCESS_MODE_SPI */
-#ifdef CONFIG_INTEL_BUS
-#define VIN_ACCESS_MODE VIN_ACCESS_MODE_INTEL_DEMUX
-#endif
/* ============================= */
/* Local variable definition */
/* ============================= */
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.h b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.h
index 26285f1883..1a861d126a 100755
--- a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.h
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_access.h
@@ -30,6 +30,7 @@
*******************************************************************************/
#ifdef HAVE_CONFIG_H
+#include <linux/config.h>
#include <drv_config.h>
#endif /* HAVE_CONFIG_H */
#include <sys_drv_ifxos.h>
@@ -69,9 +70,7 @@
motorola mode */
#define V2CPE_OFFSET_INDIRECT_ACCESS_MOTOROLA 0x40
-#ifdef CONFIG_INTEL_BUS
-#define VIN_ACCESS_MODE VIN_ACCESS_MODE_INTEL_DEMUX
-#endif
+
/** \defgroup BASIC_HOST_IFCE_ACCESS_MACROS
*/
/*@{*/
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_int.c b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_int.c
index 8dcc620a9c..ada08e3819 100755
--- a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_int.c
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/2cpe/drv_vinetic_int.c
@@ -1193,7 +1193,7 @@ IFX_LOCAL IFX_void_t serveErr_Int(VINETIC_DEVICE *pDev)
/* Tapi (HL) channel context. */
TAPI_CHANNEL *pChannel;
- TRACE (VINETIC, DBG_LEVEL_HIGH, ("serveErr_Int called\n"));
+/* TRACE (VINETIC, DBG_LEVEL_HIGH, ("serveErr_Int called\n")); */
/* Read error interrupt status register */
REG_READ_UNPROT(pDev, V2CPE_ERR_INT, &nErr_Int);
@@ -1206,13 +1206,18 @@ IFX_LOCAL IFX_void_t serveErr_Int(VINETIC_DEVICE *pDev)
V2CPE_ERR_INT_PCMB_CRASH |
V2CPE_ERR_INT_PCMA_CRASH))
{
- if ((nErr_Int == V2CPE_ERR_INT_SYNC_FAIL) &&
- (pDev->nDevState == DS_BASIC_INIT))
- {
- /* Do not show SYNC_FAIL error only if it happens immediately after
- * basic initialization, at this time the error can be ignored. */
- goto out;
- }
+/* if ((nErr_Int == V2CPE_ERR_INT_SYNC_FAIL) && */
+/* (pDev->nDevState == DS_BASIC_INIT)) */
+/* { */
+/* /\* Do not show SYNC_FAIL error only if it happens immediately after */
+/* * basic initialization, at this time the error can be ignored. *\/ */
+/* goto out; */
+/* } */
+
+ if (nErr_Int == V2CPE_ERR_INT_SYNC_FAIL)
+ /* Ignore this error, this is probably normal situation. */
+ goto out;
+
SET_DEV_ERROR(ERR_HW_ERR);
TRACE(VINETIC, DBG_LEVEL_HIGH,
("VIN%ld: IRQ: Hardware error, ERR_INT = 0x%04X\n",
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/Makefile b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/Makefile
new file mode 100644
index 0000000000..42a1689d9f
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/Makefile
@@ -0,0 +1,694 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = .
+
+pkgdatadir = $(datadir)/drv_vinetic
+pkglibdir = $(libdir)/drv_vinetic
+pkgincludedir = $(includedir)/drv_vinetic
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/drv_config.h.in \
+ $(top_srcdir)/2cpe/Makefile.in $(top_srcdir)/configure AUTHORS \
+ NEWS TODO compile depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = drv_config.h
+CONFIG_CLEAN_FILES = 2cpe/Makefile
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(drv_vinetic_docdir)"
+drv_vinetic_docDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(drv_vinetic_doc_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE =
+AMTAR = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run tar
+AUTOCONF = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CONFIGURE_OPTIONS = '--enable-kernelpath=../../../linux-2.6.10'
+CPPFLAGS =
+CYGPATH_W = echo
+DEBUG_FALSE =
+DEBUG_TRUE = #
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+ENABLE_OBSOLETE_PREMAPPING_FALSE =
+ENABLE_OBSOLETE_PREMAPPING_TRUE = #
+EVALUATION_FALSE =
+EVALUATION_TRUE = #
+EVENT_LOGGER_DEBUG_FALSE =
+EVENT_LOGGER_DEBUG_TRUE = #
+EXEEXT =
+HL_TAPI_INCL_PATH =
+HL_TAPI_INCL_PATH_SET_FALSE =
+HL_TAPI_INCL_PATH_SET_TRUE = #
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+KERNEL_INCL_PATH = ../../../linux-2.6.10/include
+KERNEL_PATH = ../../../linux-2.6.10
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/missing --run makeinfo
+OBJEXT = o
+PACKAGE = drv_vinetic
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = VINETIC-CPE v2.2 Device Driver
+PACKAGE_STRING = VINETIC-CPE v2.2 Device Driver 1.2.1
+PACKAGE_TARNAME = drv_vinetic
+PACKAGE_VERSION = 1.2.1
+PATH_SEPARATOR = :
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+TAPI_FALSE = #
+TAPI_TRUE =
+UDP_REDIRECT_FALSE =
+UDP_REDIRECT_TRUE = #
+VERSION = 1.2.1
+VINETIC_2CPE_FALSE =
+VINETIC_2CPE_TRUE = #
+WARNINGS_FALSE =
+WARNINGS_TRUE = #
+ac_ct_CC = gcc
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/nenad/reps/kastor/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias =
+AUTOMAKE_OPTIONS = foreign 1.7 nostdinc
+SUBDIRS = 2cpe
+
+# define configure options for distcheck
+DISTCHECK_CONFIGURE_FLAGS = '--enable-kernelpath=../../../linux-2.6.10'
+#DISTCHECK_CONFIGURE_FLAGS= --build=i686-pc-linux \
+# --host=powerpc-linux-uclibc --enable-warnings \
+# --enable-kernelincl=${HOME}/linux/include \
+# --prefix=/exports/${USER}_ppc/opt/ifx \
+# --enable-trace --enable-2cpe \
+# --with-access-mode=INTEL_DEMUX
+drv_vinetic_docdir = ${prefix}/doc/drv_vinetic
+drv_vinetic_doc_DATA = \
+ README\
+ AUTHORS\
+ NEWS\
+ TODO \
+ FEATURES \
+ LICENSE
+
+EXTRA_DIST = $(drv_vinetic_doc_DATA) \
+ doc/doxyconfig\
+ doc/footer.html\
+ doc/header.html\
+ doc/logo.gif\
+ doc/DataChSwitching.emf\
+ doc/stylesheet.css\
+ doc/html/logo.gif
+
+all: drv_config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+drv_config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/drv_config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status drv_config.h
+$(srcdir)/drv_config.h.in: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f drv_config.h stamp-h1
+2cpe/Makefile: $(top_builddir)/config.status $(top_srcdir)/2cpe/Makefile.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-drv_vinetic_docDATA: $(drv_vinetic_doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(drv_vinetic_docdir)" || $(mkdir_p) "$(DESTDIR)$(drv_vinetic_docdir)"
+ @list='$(drv_vinetic_doc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(drv_vinetic_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(drv_vinetic_docdir)/$$f'"; \
+ $(drv_vinetic_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(drv_vinetic_docdir)/$$f"; \
+ done
+
+uninstall-drv_vinetic_docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(drv_vinetic_doc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(drv_vinetic_docdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(drv_vinetic_docdir)/$$f"; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) drv_config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) drv_config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) drv_config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) drv_config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/2cpe $(distdir)/doc $(distdir)/doc/html
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) drv_config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(drv_vinetic_docdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-drv_vinetic_docDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-drv_vinetic_docDATA uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-drv_vinetic_docDATA install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-drv_vinetic_docDATA \
+ uninstall-info-am
+
+
+# Create self extracting linux distribution
+distcheck-hook:
+ makeself.sh --gzip --notemp $(distdir) drv_vinetic-${PACKAGE_VERSION}.sh \
+ "${PACKAGE_NAME}"
+
+lint:
+ @target=lint; \
+ list='$(SUBDIRS)'; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done;
+
+rsm:
+ @target=rsm; \
+ list='$(SUBDIRS)'; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done;
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/drv_config.h b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/drv_config.h
new file mode 100644
index 0000000000..037fbe6754
--- /dev/null
+++ b/voip/drv_vinetic-2.1/drv_vinetic-1.2.1/drv_config.h
@@ -0,0 +1,151 @@
+/* drv_config.h. Generated by configure. */
+/* drv_config.h.in. Generated from configure.in by autoheader. */
+
+/******************************************************************************
+
+ Copyright (c) 2006
+ Infineon Technologies AG
+ Am Campeon 1-12; 81726 Munich, Germany
+
+ THE DELIVERY OF THIS SOFTWARE AS WELL AS THE HEREBY GRANTED NON-EXCLUSIVE,
+ WORLDWIDE LICENSE TO USE, COPY, MODIFY, DISTRIBUTE AND SUBLICENSE THIS
+ SOFTWARE IS FREE OF CHARGE.
+
+ THE LICENSED SOFTWARE IS PROVIDED "AS IS" AND INFINEON EXPRESSLY DISCLAIMS
+ ALL REPRESENTATIONS AND WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING
+ WITHOUT LIMITATION, WARRANTIES OR REPRESENTATIONS OF WORKMANSHIP,
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, DURABILITY, THAT THE
+ OPERATING OF THE LICENSED SOFTWARE WILL BE ERROR FREE OR FREE OF ANY THIRD
+ PARTY CLAIMS, INCLUDING WITHOUT LIMITATION CLAIMS OF THIRD PARTY INTELLECTUAL
+ PROPERTY INFRINGEMENT.
+
+ EXCEPT FOR ANY LIABILITY DUE TO WILFUL ACTS OR GROSS NEGLIGENCE AND EXCEPT
+ FOR ANY PERSONAL INJURY INFINEON SHALL IN NO EVENT BE LIABLE FOR ANY CLAIM
+ OR DAMAGES OF ANY KIND, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ ******************************************************************************/
+#ifndef _DRV_CONFIG_H_
+#define _DRV_CONFIG_H_
+#include <linux/config.h>
+
+/* board CPU indianess
+#ifndef __BYTE_ORDER
+ #define __BYTE_ORDER __BIG_ENDIAN
+#endif
+*/
+
+/* enable debug features as asserts for example */
+#define DEBUG 1
+
+/* enable obsolete data channel premapping */
+/* #undef ENABLE_OBSOLETE_PREMAPPING */
+
+/* enable trace outputs in general */
+#define ENABLE_TRACE 1
+
+/* enable user configuration */
+/* #undef ENABLE_USER_CONFIG */
+
+/* enable evaluation features e.g. for testing with WinEASY */
+/* #undef EVALUATION */
+
+/* enabled event logger debugging */
+/* #undef EVENT_LOGGER_DEBUG */
+
+/* Name of package */
+#define PACKAGE "drv_vinetic"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "VINETIC-CPE v2.2 Device Driver"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "VINETIC-CPE v2.2 Device Driver 1.2.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "drv_vinetic"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.2.1"
+
+/* enable runtime traces as register access */
+#define RUNTIME_TRACE 1
+
+/* enable TAPI Interface */
+#define TAPI 1
+
+/* enable TAPI CID support */
+#define TAPI_CID 1
+
+/* enable TAPI DTMF support */
+#define TAPI_DTMF 1
+
+/* enable TAPI FAX support */
+//#define TAPI_FAX_T38 1
+
+/* enable TAPI GR909 tests */
+/* #undef TAPI_GR909 */
+
+/* enable line testing */
+/* #undef TAPI_LT */
+
+/* enable Voice support */
+#define TAPI_VOICE 1
+
+/* Version number of package */
+#define VERSION "1.2.1"
+
+/* Maximum VINETIC devices to support */
+#define VINETIC_MAX_DEVICES 1
+
+/* enable use of proc filesystem entries (Linux only) */
+#define VINETIC_USE_PROC 1
+
+/* enable Vinetic 2CPE support */
+#define VIN_2CPE 1
+
+/* enable 8 Bit bus access */
+#define VIN_8BIT 1
+
+/* Vinetic access mode this driver will support */
+#ifndef CONFIG_INTEL_BUS
+#define VIN_ACCESS_MODE VIN_ACCESS_MODE_MOTOROLA
+#else
+#define VIN_ACCESS_MODE VIN_ACCESS_MODE_INTEL_DEMUX
+#endif
+
+/* Vinetic access mode string */
+#define VIN_ACCESS_MODE_STR "16bit MOTOROLA"
+
+/* Vinetic access width this driver will support */
+//#define VIN_ACCESS_WIDTH VIN_ACCESS_WIDTH_16
+#define VIN_ACCESS_WIDTH VIN_ACCESS_WIDTH_8
+
+/* special option to enable byte swapping inside VINETIC-2CPE */
+/* #undef VIN_BYTE_SWAP */
+
+/* configure options string */
+#define VIN_CONFIGURE_STR "'--build=i686-pc-linux' '--host=arm-uclinux' '--enable-warnings' '--enable-trace' '--enable-kernelincl=/usr/local/sw_13_11_2006/sw/linux-2.6.10/include/' '--with-access-mode=MOTOROLA' '--enable-tapiincl=../../drv_tapi-3.3.2/src/' '--enable-8bit' '--enable-dsp' '--enable-voice' '--enable-dtmf' '--enable-2cpe' '--enable-debug' 'CFLAGS=-I/usr/local/sw_13_11_2006/sw/include -DSP_CRISTINA -O2' 'build_alias=i686-pc-linux' 'host_alias=arm-uclinux'"
+
+/* enable including default firmware */
+/* #undef VIN_DEFAULT_FW */
+
+/* enable SPI interface, needs user configuration */
+/* #undef VIN_SPI */
+
+/* disable Vinetic DSP support */
+/* #undef VIN_S_SUPPORT_ONLY */
+
+/* enable Vinetic V1.x support */
+#define VIN_V14_SUPPORT 1
+
+/* enable Vinetic V2.x support */
+#define VIN_V21_SUPPORT 1
+
+
+#endif /* _DRV_CONFIG_H_ */
+
diff --git a/voip/libeXosip2-2.2.2/Makefile.in b/voip/libeXosip2-2.2.2/Makefile.in
index 7a50a42bfd..372b4fcff9 100644
--- a/voip/libeXosip2-2.2.2/Makefile.in
+++ b/voip/libeXosip2-2.2.2/Makefile.in
@@ -109,6 +109,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -141,6 +142,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -148,12 +150,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -168,23 +167,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/aclocal.m4 b/voip/libeXosip2-2.2.2/aclocal.m4
index 0b7cdd7e88..b6e3bd7e32 100644
--- a/voip/libeXosip2-2.2.2/aclocal.m4
+++ b/voip/libeXosip2-2.2.2/aclocal.m4
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 48 AC_PROG_LIBTOOL
+# serial 51 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -176,7 +176,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -219,6 +219,14 @@ AC_ARG_WITH([pic],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
+
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
@@ -226,6 +234,41 @@ _LT_AC_TAGCONFIG
])# AC_LIBTOOL_SETUP
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test "x$ltmain" = "x" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+])
+fi
+gentoo_lt_version="1.5.24"
+gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+])
+else
+ AC_MSG_RESULT(yes)
+fi
+])# _LT_VERSION_CHECK
+
+
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
@@ -263,8 +306,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
@@ -276,8 +320,9 @@ $rm conftest*
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -293,12 +338,20 @@ $rm conftest*
# If we don't find anything, use the default library path according
# to the aix ld manual.
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
])# _LT_AC_SYS_LIBPATH_AIX
@@ -529,13 +582,17 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -552,6 +609,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -623,7 +683,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
AC_CACHE_CHECK([$1], [$2],
[$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -664,11 +724,12 @@ fi
# ------------------------------------------------------------
# Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
[$2=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -782,24 +843,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
])
@@ -1026,7 +1090,8 @@ fi
# ---------------------------------
# Check to see if options -c and -o are simultaneously supported by compiler
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
@@ -1034,7 +1099,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -1174,6 +1239,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
@@ -1191,7 +1257,8 @@ fi
# -----------------------------
# PORTME Fill in your ld.so characteristics
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -1205,20 +1272,58 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+fi])
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -1375,12 +1480,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+ m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -1397,18 +1498,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -1420,7 +1509,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -1431,6 +1527,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -1446,7 +1548,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -1509,7 +1611,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[[3-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1564,7 +1666,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1580,7 +1682,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -1593,18 +1695,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -1686,6 +1776,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -1791,7 +1885,8 @@ fi
# _LT_AC_TAGCONFIG
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
[include additional configurations @<:@automatic@:>@])],
[tagnames="$withval"])
@@ -2052,7 +2147,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
# AC_PATH_TOOL_PREFIX
# -------------------
-# find a file program which can recognise shared library
+# find a file program which can recognize shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_REQUIRE([AC_PROG_EGREP])dnl
AC_MSG_CHECKING([for $1])
@@ -2115,7 +2210,7 @@ fi
# AC_PATH_MAGIC
# -------------
-# find a file program which can recognise a shared library
+# find a file program which can recognize a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2262,7 +2357,7 @@ esac
# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -2301,16 +2396,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -2348,7 +2449,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[[3-9]]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
;;
@@ -2364,7 +2465,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2398,6 +2499,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2450,7 +2555,7 @@ AC_DEFUN([AC_PROG_NM],
lt_cv_path_NM="$NM"
else
lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
@@ -2666,10 +2771,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
_LT_AC_SYS_COMPILER
@@ -2771,10 +2876,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -2920,7 +3025,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -3079,10 +3184,10 @@ case $host_os in
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -3116,7 +3221,7 @@ case $host_os in
freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -3165,9 +3270,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
@@ -3235,7 +3338,7 @@ case $host_os in
;;
esac
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -3275,7 +3378,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -3355,6 +3458,29 @@ case $host_os in
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -3393,16 +3519,20 @@ case $host_os in
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -3564,15 +3694,10 @@ case $host_os in
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -3619,6 +3744,12 @@ case $host_os in
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -3862,7 +3993,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
-interix3*)
+interix[[3-9]]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
_LT_AC_TAGVAR(predep_objects,$1)=
@@ -3870,13 +4001,46 @@ interix3*)
_LT_AC_TAGVAR(postdeps,$1)=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -3925,10 +4089,17 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4007,10 +4178,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4063,7 +4234,7 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -4152,6 +4323,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(module_cmds, $1) \
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
_LT_AC_TAGVAR(exclude_expsyms, $1) \
_LT_AC_TAGVAR(include_expsyms, $1); do
@@ -4198,7 +4370,7 @@ ifelse([$1], [],
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -4523,7 +4695,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
@@ -4606,6 +4778,7 @@ fi
# ---------------------------------
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_OBJEXT])
# Check for command to grab the raw symbol name followed by C symbol from nm.
@@ -4642,7 +4815,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -4838,7 +5011,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -4851,7 +5024,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -4917,7 +5090,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4960,7 +5133,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4987,6 +5160,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -5114,7 +5295,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5125,7 +5306,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -5186,8 +5367,6 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5218,7 +5397,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -5237,6 +5416,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# All Alpha code is PIC.
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -5246,6 +5441,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ rdos*)
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5340,7 +5539,8 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
# ------------------------------------
# See if the linker supports building shared libraries.
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
@@ -5357,7 +5557,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -5496,7 +5696,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5514,7 +5714,7 @@ EOF
fi
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -5529,7 +5729,7 @@ EOF
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -5547,13 +5747,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5593,7 +5802,7 @@ EOF
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -5712,7 +5921,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5805,7 +6014,7 @@ _LT_EOF
# The linker will automatically build a .lib file if we build a DLL.
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
@@ -5847,10 +6056,10 @@ _LT_EOF
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -5890,7 +6099,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -6012,24 +6221,28 @@ _LT_EOF
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
@@ -6088,17 +6301,16 @@ _LT_EOF
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
@@ -6155,7 +6367,7 @@ _LT_EOF
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6230,7 +6442,7 @@ x|xyes)
# to ld, don't add -lc before -lgcc.
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest
@@ -6333,6 +6545,30 @@ AC_DEFUN([LT_AC_PROG_RC],
[AC_CHECK_TOOL(RC, windres, no)
])
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+ as_executable_p='test -x'
+else
+ as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
# NOTE: This macro has been submitted for inclusion into #
# GNU Autoconf as AC_PROG_SED. When it is available in #
# a released version of Autoconf we should remove this #
@@ -6353,12 +6589,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6391,6 +6628,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
diff --git a/voip/libeXosip2-2.2.2/config.h.in b/voip/libeXosip2-2.2.2/config.h.in
new file mode 100644
index 0000000000..5ae0cf2dfc
--- /dev/null
+++ b/voip/libeXosip2-2.2.2/config.h.in
@@ -0,0 +1,116 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have <mediastreamer.h> header file */
+#undef HAVE_MEDIASTREAMER_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <ncurses.h> header file. */
+#undef HAVE_NCURSES_H
+
+/* Define to 1 if you have <ortp/ortp.h> header file */
+#undef HAVE_ORTP_ORTP_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#undef HAVE_SEMAPHORE_H
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#undef HAVE_SYS_SEM_H
+
+/* Define to 1 if you have the <sys/signal.h> header file. */
+#undef HAVE_SYS_SIGNAL_H
+
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
+#undef HAVE_SYS_SOUNDCARD_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <uclmmbase/uclconf.h> header file */
+#undef HAVE_UCLMMBASE_UCLCONF_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <varargs.h> header file. */
+#undef HAVE_VARARGS_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to the necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/voip/libeXosip2-2.2.2/configure b/voip/libeXosip2-2.2.2/configure
index 963fb536d0..237e117f5d 100755
--- a/voip/libeXosip2-2.2.2/configure
+++ b/voip/libeXosip2-2.2.2/configure
@@ -860,6 +860,7 @@ ac_ct_CXX
CXXDEPMODE
am__fastdepCXX_TRUE
am__fastdepCXX_FALSE
+SED
GREP
EGREP
LN_S
@@ -4436,12 +4437,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -4476,6 +4478,7 @@ done
fi
SED=$lt_cv_path_SED
+
{ echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6; }
@@ -4909,8 +4912,8 @@ else
echo "${ECHO_T}no, using $LN_S" >&6; }
fi
-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4951,16 +4954,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -4998,7 +5007,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[3-9]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
;;
@@ -5014,7 +5023,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5048,6 +5057,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5135,7 +5148,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5138 "configure"' > conftest.$ac_ext
+ echo '#line 5151 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5170,7 +5183,8 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5181,6 +5195,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -5197,6 +5214,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -6282,24 +6302,27 @@ else
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
@@ -6316,6 +6339,7 @@ fi
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
@@ -6353,7 +6377,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[ABCDGIRSTW]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -6904,7 +6928,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -7086,6 +7110,67 @@ fi
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+{ echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5
+echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6; }
+if test "x$ltmain" = "x" ; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+gentoo_lt_version="1.5.24"
+gentoo_ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+fi
+
+
# Use C for the default configuration in the libtool script
tagname=
lt_save_CC="$CC"
@@ -7104,10 +7189,10 @@ objext=o
objext=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
# If no C compiler was specified, use CC.
@@ -7122,13 +7207,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -7148,7 +7233,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7159,11 +7244,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7162: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7247: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7166: \$? = $ac_status" >&5
+ echo "$as_me:7251: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7221,7 +7306,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -7232,7 +7317,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -7293,8 +7378,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -7325,7 +7408,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl='-Wl,'
@@ -7344,6 +7427,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -7353,6 +7452,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -7420,7 +7523,7 @@ if test "${lt_prog_compiler_pic_works+set}" = set; then
else
lt_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7431,11 +7534,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7434: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7537: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7438: \$? = $ac_status" >&5
+ echo "$as_me:7541: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7484,7 +7587,7 @@ else
lt_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -7524,7 +7627,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -7535,11 +7638,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7538: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7641: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7542: \$? = $ac_status" >&5
+ echo "$as_me:7645: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7731,7 +7834,7 @@ EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -7749,7 +7852,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
@@ -7764,7 +7867,7 @@ EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -7782,13 +7885,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs=no
@@ -7947,7 +8059,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ :
else
# We have old collect2
hardcode_direct=unsupported
@@ -8021,11 +8133,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8080,11 +8199,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8138,7 +8264,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes=yes
;;
@@ -8180,10 +8306,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -8223,7 +8349,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -8345,24 +8471,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs=no
fi
;;
@@ -8421,17 +8551,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs=yes
;;
@@ -8488,7 +8617,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
@@ -8565,7 +8694,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -8623,17 +8752,55 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
@@ -8793,12 +8960,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -8815,18 +8978,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -8838,7 +8989,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -8849,6 +9007,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -8864,7 +9028,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -8927,7 +9091,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8982,7 +9146,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -8998,7 +9162,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -9011,18 +9175,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -9104,6 +9256,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -9257,6 +9413,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
@@ -9843,7 +10000,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9846 "configure"
+#line 10003 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9943,7 +10100,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9946 "configure"
+#line 10103 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10141,6 +10298,7 @@ if test -f "$ltmain"; then
module_cmds \
module_expsym_cmds \
lt_cv_prog_compiler_c_o \
+ fix_srcfile_path \
exclude_expsyms \
include_expsyms; do
@@ -10185,7 +10343,7 @@ echo "$as_me: creating $ofile" >&6;}
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -10509,7 +10667,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
@@ -10678,10 +10836,10 @@ objext=o
objext_CXX=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -10697,13 +10855,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -10962,7 +11120,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_CXX=yes
+ :
else
# We have old collect2
hardcode_direct_CXX=unsupported
@@ -11036,11 +11194,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11096,11 +11261,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11219,10 +11391,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -11256,7 +11428,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
freebsd-elf*)
archive_cmds_need_lc_CXX=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs_CXX=yes
@@ -11305,9 +11477,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_CXX=:
case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
export_dynamic_flag_spec_CXX='${wl}-E'
;;
@@ -11375,7 +11545,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
@@ -11415,7 +11585,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -11495,6 +11665,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -11533,16 +11726,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_CXX=no
;;
openbsd*)
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ ld_shlibs_CXX=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -11704,15 +11901,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
esac
link_all_deplibs_CXX=yes
@@ -11759,6 +11951,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -11950,7 +12148,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
case $host_os in
-interix3*)
+interix[3-9]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
predep_objects_CXX=
@@ -11958,13 +12156,46 @@ interix3*)
postdeps_CXX=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- postdeps_CXX='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -12007,7 +12238,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
;;
@@ -12020,7 +12251,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# DJGPP does not support shared libraries at all
lt_prog_compiler_pic_CXX=
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -12086,7 +12317,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -12129,7 +12360,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -12156,6 +12387,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_CXX='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -12270,7 +12509,7 @@ if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
else
lt_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -12281,11 +12520,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12284: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12523: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12288: \$? = $ac_status" >&5
+ echo "$as_me:12527: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12334,7 +12573,7 @@ else
lt_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -12374,7 +12613,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -12385,11 +12624,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12388: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12627: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12392: \$? = $ac_status" >&5
+ echo "$as_me:12631: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12455,7 +12694,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -12486,7 +12725,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -12544,20 +12783,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -12714,12 +12940,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -12736,18 +12957,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -12759,7 +12968,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -12770,6 +12986,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -12785,7 +13007,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -12848,7 +13070,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12903,7 +13125,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12919,7 +13141,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -12932,18 +13154,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -13025,6 +13235,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -13219,6 +13433,7 @@ if test -f "$ltmain"; then
module_cmds_CXX \
module_expsym_cmds_CXX \
lt_cv_prog_compiler_c_o_CXX \
+ fix_srcfile_path_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX; do
@@ -13539,7 +13754,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
@@ -13630,10 +13845,17 @@ objext=o
objext_F77=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -13649,13 +13871,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -13749,7 +13971,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -13760,7 +13982,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_F77='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -13821,8 +14043,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -13853,7 +14073,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_F77='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_F77='-Wl,'
@@ -13872,6 +14092,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_F77='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -13881,6 +14117,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_F77='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
@@ -13948,7 +14188,7 @@ if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
else
lt_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_F77"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -13959,11 +14199,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13962: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14202: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13966: \$? = $ac_status" >&5
+ echo "$as_me:14206: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14012,7 +14252,7 @@ else
lt_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14052,7 +14292,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -14063,11 +14303,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14066: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14306: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14070: \$? = $ac_status" >&5
+ echo "$as_me:14310: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14259,7 +14499,7 @@ EOF
allow_undefined_flag_F77=unsupported
always_export_symbols_F77=no
enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -14277,7 +14517,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_F77=no
hardcode_shlibpath_var_F77=no
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
@@ -14292,7 +14532,7 @@ EOF
archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -14310,13 +14550,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_F77=no
@@ -14475,7 +14724,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_F77=yes
+ :
else
# We have old collect2
hardcode_direct_F77=unsupported
@@ -14539,11 +14788,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -14588,11 +14844,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -14646,7 +14909,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_F77='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_F77=yes
;;
@@ -14688,10 +14951,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -14731,7 +14994,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_F77='-R$libdir'
hardcode_direct_F77=yes
@@ -14853,24 +15116,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_F77='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_F77='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- ;;
- *)
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_F77=no
fi
;;
@@ -14929,17 +15196,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_F77=yes
;;
@@ -14996,7 +15262,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_F77='${wl}-z,text'
archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
@@ -15073,7 +15339,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -15131,20 +15397,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -15301,12 +15554,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -15323,18 +15571,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -15346,7 +15582,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -15357,6 +15600,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -15372,7 +15621,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -15435,7 +15684,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15490,7 +15739,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15506,7 +15755,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -15519,18 +15768,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -15612,6 +15849,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -15806,6 +16047,7 @@ if test -f "$ltmain"; then
module_cmds_F77 \
module_expsym_cmds_F77 \
lt_cv_prog_compiler_c_o_F77 \
+ fix_srcfile_path_F77 \
exclude_expsyms_F77 \
include_expsyms_F77; do
@@ -16126,7 +16368,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_F77
@@ -16184,10 +16426,10 @@ objext=o
objext_GCJ=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -16203,13 +16445,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -16250,7 +16492,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16261,11 +16503,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16264: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16506: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16268: \$? = $ac_status" >&5
+ echo "$as_me:16510: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16323,7 +16565,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
;;
@@ -16334,7 +16576,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_GCJ='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -16395,8 +16637,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
;;
@@ -16427,7 +16667,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_GCJ='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_GCJ='-Wl,'
@@ -16446,6 +16686,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -16455,6 +16711,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -16522,7 +16782,7 @@ if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
else
lt_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16533,11 +16793,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16536: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16796: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16540: \$? = $ac_status" >&5
+ echo "$as_me:16800: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16586,7 +16846,7 @@ else
lt_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -16626,7 +16886,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -16637,11 +16897,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16640: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16900: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16644: \$? = $ac_status" >&5
+ echo "$as_me:16904: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16833,7 +17093,7 @@ EOF
allow_undefined_flag_GCJ=unsupported
always_export_symbols_GCJ=no
enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -16851,7 +17111,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_GCJ=no
hardcode_shlibpath_var_GCJ=no
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
@@ -16866,7 +17126,7 @@ EOF
archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -16884,13 +17144,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_GCJ=no
@@ -17049,7 +17318,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_GCJ=yes
+ :
else
# We have old collect2
hardcode_direct_GCJ=unsupported
@@ -17123,11 +17392,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17182,11 +17458,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17240,7 +17523,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_GCJ='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_GCJ=yes
;;
@@ -17282,10 +17565,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -17325,7 +17608,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_GCJ='-R$libdir'
hardcode_direct_GCJ=yes
@@ -17447,24 +17730,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_GCJ='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- ;;
- *)
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_GCJ=no
fi
;;
@@ -17523,17 +17810,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_GCJ=yes
;;
@@ -17590,7 +17876,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_GCJ='${wl}-z,text'
archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
@@ -17667,7 +17953,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -17725,20 +18011,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -17895,12 +18168,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -17917,18 +18185,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -17940,7 +18196,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -17951,6 +18214,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -17966,7 +18235,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -18029,7 +18298,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -18084,7 +18353,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -18100,7 +18369,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -18113,18 +18382,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -18206,6 +18463,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -18400,6 +18661,7 @@ if test -f "$ltmain"; then
module_cmds_GCJ \
module_expsym_cmds_GCJ \
lt_cv_prog_compiler_c_o_GCJ \
+ fix_srcfile_path_GCJ \
exclude_expsyms_GCJ \
include_expsyms_GCJ; do
@@ -18720,7 +18982,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_GCJ
@@ -18777,7 +19039,7 @@ objext=o
objext_RC=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -18796,13 +19058,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -18880,6 +19142,7 @@ if test -f "$ltmain"; then
module_cmds_RC \
module_expsym_cmds_RC \
lt_cv_prog_compiler_c_o_RC \
+ fix_srcfile_path_RC \
exclude_expsyms_RC \
include_expsyms_RC; do
@@ -19200,7 +19463,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_RC
@@ -25525,11 +25788,11 @@ ac_ct_CXX!$ac_ct_CXX$ac_delim
CXXDEPMODE!$CXXDEPMODE$ac_delim
am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+SED!$SED$ac_delim
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
LN_S!$LN_S$ac_delim
ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -25571,6 +25834,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+AR!$AR$ac_delim
RANLIB!$RANLIB$ac_delim
CXXCPP!$CXXCPP$ac_delim
F77!$F77$ac_delim
@@ -25600,7 +25864,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/voip/libeXosip2-2.2.2/help/Makefile.in b/voip/libeXosip2-2.2.2/help/Makefile.in
index 93a6f49ac8..dad1a84907 100644
--- a/voip/libeXosip2-2.2.2/help/Makefile.in
+++ b/voip/libeXosip2-2.2.2/help/Makefile.in
@@ -95,6 +95,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -127,6 +128,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -134,12 +136,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -154,23 +153,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/help/doxygen/Makefile.in b/voip/libeXosip2-2.2.2/help/doxygen/Makefile.in
index 5f8a09239f..60123a43a8 100644
--- a/voip/libeXosip2-2.2.2/help/doxygen/Makefile.in
+++ b/voip/libeXosip2-2.2.2/help/doxygen/Makefile.in
@@ -87,6 +87,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -119,6 +120,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -126,12 +128,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -146,23 +145,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/include/Makefile.in b/voip/libeXosip2-2.2.2/include/Makefile.in
index a2a7fc0e21..549c5ea6db 100644
--- a/voip/libeXosip2-2.2.2/include/Makefile.in
+++ b/voip/libeXosip2-2.2.2/include/Makefile.in
@@ -95,6 +95,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -127,6 +128,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -134,12 +136,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -154,23 +153,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/include/eXosip2/Makefile.in b/voip/libeXosip2-2.2.2/include/eXosip2/Makefile.in
index 66a2265167..6e0d971095 100644
--- a/voip/libeXosip2-2.2.2/include/eXosip2/Makefile.in
+++ b/voip/libeXosip2-2.2.2/include/eXosip2/Makefile.in
@@ -93,6 +93,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -125,6 +126,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -132,12 +134,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -152,23 +151,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/include/eXosip2/eXosip.h b/voip/libeXosip2-2.2.2/include/eXosip2/eXosip.h
index a2452b3ca8..8bff6cce7c 100644
--- a/voip/libeXosip2-2.2.2/include/eXosip2/eXosip.h
+++ b/voip/libeXosip2-2.2.2/include/eXosip2/eXosip.h
@@ -17,6 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/* Uncomment to print the type of caught event. */
+//#define EVENT_DEBUG
#ifdef ENABLE_MPATROL
#include <mpatrol.h>
@@ -271,6 +273,80 @@ extern "C"
EXOSIP_EVENT_COUNT /**< MAX number of events */
} eXosip_event_type_t;
+
+/* For debugging purpose only. */
+#ifdef EVENT_DEBUG
+ char *eXosip_event_type_string[] = {
+ /* REGISTER related events */
+ "EXOSIP_REGISTRATION_NEW", /**< announce new registration. */
+ "EXOSIP_REGISTRATION_SUCCESS", /**< user is successfully registred. */
+ "EXOSIP_REGISTRATION_FAILURE", /**< user is not registred. */
+ "EXOSIP_REGISTRATION_REFRESHED", /**< registration has been refreshed. */
+ "EXOSIP_REGISTRATION_TERMINATED", /**< UA is not registred any more. */
+
+ /* INVITE related events within calls */
+ "EXOSIP_CALL_INVITE", /**< announce a new call */
+ "EXOSIP_CALL_REINVITE", /**< announce a new INVITE within call */
+
+ "EXOSIP_CALL_NOANSWER", /**< announce no answer within the timeout */
+ "EXOSIP_CALL_PROCEEDING", /**< announce processing by a remote app */
+ "EXOSIP_CALL_RINGING", /**< announce ringback */
+ "EXOSIP_CALL_ANSWERED", /**< announce start of call */
+ "EXOSIP_CALL_REDIRECTED", /**< announce a redirection */
+ "EXOSIP_CALL_REQUESTFAILURE", /**< announce a request failure */
+ "EXOSIP_CALL_SERVERFAILURE", /**< announce a server failure */
+ "EXOSIP_CALL_GLOBALFAILURE", /**< announce a global failure */
+ "EXOSIP_CALL_ACK", /**< ACK received for 200ok to INVITE */
+
+ "EXOSIP_CALL_CANCELLED", /**< announce that call has been cancelled */
+ "EXOSIP_CALL_TIMEOUT", /**< announce that call has failed */
+
+ /* request related events within calls (except INVITE) */
+ "EXOSIP_CALL_MESSAGE_NEW", /**< announce new incoming MESSAGE. */
+ "EXOSIP_CALL_MESSAGE_PROCEEDING", /**< announce a 1xx for MESSAGE. */
+ "EXOSIP_CALL_MESSAGE_ANSWERED", /**< announce a 200ok */
+ "EXOSIP_CALL_MESSAGE_REDIRECTED", /**< announce a failure. */
+ "EXOSIP_CALL_MESSAGE_REQUESTFAILURE", /**< announce a failure. */
+ "EXOSIP_CALL_MESSAGE_SERVERFAILURE", /**< announce a failure. */
+ "EXOSIP_CALL_MESSAGE_GLOBALFAILURE", /**< announce a failure. */
+
+ "EXOSIP_CALL_CLOSED", /**< a BYE was received for this call */
+
+ /* for both UAS & UAC events */
+ "EXOSIP_CALL_RELEASED", /**< call context is cleared. */
+
+ /* response received for request outside calls */
+ "EXOSIP_MESSAGE_NEW", /**< announce new incoming MESSAGE. */
+ "EXOSIP_MESSAGE_PROCEEDING", /**< announce a 1xx for MESSAGE. */
+ "EXOSIP_MESSAGE_ANSWERED", /**< announce a 200ok */
+ "EXOSIP_MESSAGE_REDIRECTED", /**< announce a failure. */
+ "EXOSIP_MESSAGE_REQUESTFAILURE", /**< announce a failure. */
+ "EXOSIP_MESSAGE_SERVERFAILURE", /**< announce a failure. */
+ "EXOSIP_MESSAGE_GLOBALFAILURE", /**< announce a failure. */
+
+ /* Presence and Instant Messaging */
+ "EXOSIP_SUBSCRIPTION_UPDATE", /**< announce incoming SUBSCRIBE. */
+ "EXOSIP_SUBSCRIPTION_CLOSED", /**< announce end of subscription. */
+
+ "EXOSIP_SUBSCRIPTION_NOANSWER", /**< announce no answer */
+ "EXOSIP_SUBSCRIPTION_PROCEEDING", /**< announce a 1xx */
+ "EXOSIP_SUBSCRIPTION_ANSWERED", /**< announce a 200ok */
+ "EXOSIP_SUBSCRIPTION_REDIRECTED", /**< announce a redirection */
+ "EXOSIP_SUBSCRIPTION_REQUESTFAILURE", /**< announce a request failure */
+ "EXOSIP_SUBSCRIPTION_SERVERFAILURE", /**< announce a server failure */
+ "EXOSIP_SUBSCRIPTION_GLOBALFAILURE", /**< announce a global failure */
+ "EXOSIP_SUBSCRIPTION_NOTIFY", /**< announce new NOTIFY request */
+
+ "EXOSIP_SUBSCRIPTION_RELEASED", /**< call context is cleared. */
+
+ "EXOSIP_IN_SUBSCRIPTION_NEW", /**< announce new incoming SUBSCRIBE.*/
+ "EXOSIP_IN_SUBSCRIPTION_RELEASED", /**< announce end of subscription. */
+
+ "EXOSIP_EVENT_COUNT" /**< MAX number of events */
+ };
+#endif
+
+
/**
* Structure for event description
* @struct eXosip_event
diff --git a/voip/libeXosip2-2.2.2/josua/Makefile.in b/voip/libeXosip2-2.2.2/josua/Makefile.in
index 77649fe93b..4d4165e99f 100644
--- a/voip/libeXosip2-2.2.2/josua/Makefile.in
+++ b/voip/libeXosip2-2.2.2/josua/Makefile.in
@@ -163,6 +163,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -195,6 +196,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -202,12 +204,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -222,23 +221,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/libtool b/voip/libeXosip2-2.2.2/libtool
deleted file mode 100755
index e4fbde4ab1..0000000000
--- a/voip/libeXosip2-2.2.2/libtool
+++ /dev/null
@@ -1,7192 +0,0 @@
-#! /bin/bash
-
-# libtoolT - Provide generalized library-building support services.
-# Generated automatically by (GNU libeXosip2 2.2.2)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED="/bin/sed"
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="/bin/sed -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=" CXX"
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host gaillac:
-
-# Shell to use when invoking shell scripts.
-SHELL="/bin/bash"
-
-# Whether or not to build shared libraries.
-build_libtool_libs=no
-
-# Whether or not to build static libraries.
-build_old_libs=yes
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=yes
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
-
-# Whether or not to optimize for fast installation.
-fast_install=needless
-
-# The host system.
-host_alias=arm-uclinux
-host=arm-unknown-uclinux
-host_os=uclinux
-
-# The build system.
-build_alias=
-build=i686-pc-linux-gnu
-build_os=linux-gnu
-
-# An echo program that does not interpret backslashes.
-echo="echo"
-
-# The archiver.
-AR="arm-uclinux-ar"
-AR_FLAGS="cru"
-
-# A C compiler.
-LTCC="arm-uclinux-gcc"
-
-# LTCC compiler flags.
-LTCFLAGS="-msoft-float -march=armv5"
-
-# A language-specific compiler.
-CC="arm-uclinux-gcc"
-
-# Is the compiler the GNU C compiler?
-with_gcc=yes
-
-# An ERE matcher.
-EGREP="grep -E"
-
-# The linker used to build libraries.
-LD="/usr/share/toolchains/arm-uclinux/arm-uclinux/bin/ld"
-
-# Whether we need hard or soft links.
-LN_S="ln -s"
-
-# A BSD-compatible nm program.
-NM="/usr/share/toolchains/arm-uclinux/bin/arm-uclinux-nm -B"
-
-# A symbol stripping program
-STRIP="arm-uclinux-strip"
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=file
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="dlltool"
-
-# Used on cygwin: object dumper.
-OBJDUMP="objdump"
-
-# Used on cygwin: assembler.
-AS="as"
-
-# The name of the directory that contains temporary libtool files.
-objdir=.libs
-
-# How to create reloadable object files.
-reload_flag=" -r"
-reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
-
-# How to pass a linker flag through the compiler.
-wl="-Wl,"
-
-# Object file suffix (normally "o").
-objext="o"
-
-# Old archive suffix (normally "a").
-libext="a"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='.so'
-
-# Executable file suffix (normally "").
-exeext=""
-
-# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
-pic_mode=default
-
-# What is the maximum length of a command?
-max_cmd_len=32768
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
-
-# Must we lock files when doing compilation?
-need_locks="no"
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=unknown
-
-# Do we need a version for libraries?
-need_version=unknown
-
-# Whether dlopen is supported.
-dlopen_support=unknown
-
-# Whether dlopen of programs is supported.
-dlopen_self=unknown
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=unknown
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=""
-
-# Library versioning type.
-version_type=none
-
-# Format of library name prefix.
-libname_spec="lib\$name"
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=""
-
-# The coded name of the library, if different from the real name.
-soname_spec=""
-
-# Commands used to build and install an old-style archive.
-RANLIB="arm-uclinux-ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
-old_postuninstall_cmds=""
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=""
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=""
-
-# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
-postinstall_cmds=""
-postuninstall_cmds=""
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=""
-module_expsym_cmds=""
-
-# Commands to strip libraries.
-old_striplib="arm-uclinux-strip --strip-debug"
-striplib="arm-uclinux-strip --strip-unneeded"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=""
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=""
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=""
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="unknown"
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=""
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=""
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=""
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
-
-# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
-
-# This is the shared library path variable.
-shlibpath_var=
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=unknown
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=immediate
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=no
-
-# Flag to hardcode $libdir into a binary during linking.
-# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
-
-# If ld is used when linking, flag to hardcode $libdir into
-# a binary during linking. This must work even if $libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=""
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=""
-
-# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=no
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=no
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=unsupported
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=no
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=unknown
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/ /usr/lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/"
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-# Fix the shell variable $srcfile for the compiler.
-fix_srcfile_path=""
-
-# Set to yes if exported symbols are required.
-always_export_symbols=no
-
-# The commands to list exported symbols.
-export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=""
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-
-# Symbols that must always be exported.
-include_expsyms=""
-
-# ### END LIBTOOL CONFIG
-
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="1.5.20 Debian 1.5.20-2"
-TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- SP2NL='tr \040 \012'
- NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- SP2NL='tr \100 \n'
- NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- $echo "$modename: not configured to build any kind of library" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
- $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $echo $win32_libid_type
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit $EXIT_FAILURE
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
-
- $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
- $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
- exit $EXIT_FAILURE
- fi
-}
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
- my_status=""
-
- $show "${rm}r $my_gentop"
- $run ${rm}r "$my_gentop"
- $show "$mkdir $my_gentop"
- $run $mkdir "$my_gentop"
- my_status=$?
- if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
- exit $my_status
- fi
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
-
- $show "${rm}r $my_xdir"
- $run ${rm}r "$my_xdir"
- $show "$mkdir $my_xdir"
- $run $mkdir "$my_xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$my_xdir"; then
- exit $status
- fi
- case $host in
- *-darwin*)
- $show "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- if test -z "$run"; then
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
- darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
- if test -n "$darwin_arches"; then
- darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- $show "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we have a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- lipo -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- ${rm}r unfat-$$
- cd "$darwin_orig_dir"
- else
- cd "$darwin_orig_dir"
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- fi # $run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
- func_extract_archives_result="$my_oldobjs"
-}
-# End of Shell function definitions
-#####################################
-
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
- arg="$1"
- shift
-
- case $arg in
- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- execute_dlfiles)
- execute_dlfiles="$execute_dlfiles $arg"
- ;;
- tag)
- tagname="$arg"
- preserve_args="${preserve_args}=$arg"
-
- # Check whether tagname contains only valid characters
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- $echo "$progname: invalid tag name: $tagname" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $tagname in
- CC)
- # Don't test for the "default" C tag, as we know, it's there, but
- # not specially marked.
- ;;
- *)
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
- taglist="$taglist $tagname"
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
- else
- $echo "$progname: ignoring unknown tag $tagname" 1>&2
- fi
- ;;
- esac
- ;;
- *)
- eval "$prev=\$arg"
- ;;
- esac
-
- prev=
- prevopt=
- continue
- fi
-
- # Have we seen a non-optional argument yet?
- case $arg in
- --help)
- show_help=yes
- ;;
-
- --version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- exit $?
- ;;
-
- --config)
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
- done
- exit $?
- ;;
-
- --debug)
- $echo "$progname: enabling shell trace mode"
- set -x
- preserve_args="$preserve_args $arg"
- ;;
-
- --dry-run | -n)
- run=:
- ;;
-
- --features)
- $echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- $echo "enable shared libraries"
- else
- $echo "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $echo "enable static libraries"
- else
- $echo "disable static libraries"
- fi
- exit $?
- ;;
-
- --finish) mode="finish" ;;
-
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
-
- --preserve-dup-deps) duplicate_deps="yes" ;;
-
- --quiet | --silent)
- show=:
- preserve_args="$preserve_args $arg"
- ;;
-
- --tag) prevopt="--tag" prev=tag ;;
- --tag=*)
- set tag "$optarg" ${1+"$@"}
- shift
- prev=tag
- preserve_args="$preserve_args --tag"
- ;;
-
- -dlopen)
- prevopt="-dlopen"
- prev=execute_dlfiles
- ;;
-
- -*)
- $echo "$modename: unrecognized option \`$arg'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
-
- *)
- nonopt="$arg"
- break
- ;;
- esac
-done
-
-if test -n "$prevopt"; then
- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
-fi
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
- # Infer the operation mode.
- if test -z "$mode"; then
- $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
- $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
- case $nonopt in
- *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
- mode=link
- for arg
- do
- case $arg in
- -c)
- mode=compile
- break
- ;;
- esac
- done
- ;;
- *db | *dbx | *strace | *truss)
- mode=execute
- ;;
- *install*|cp|mv)
- mode=install
- ;;
- *rm)
- mode=uninstall
- ;;
- *)
- # If we have no mode, but dlfiles were specified, then do execute mode.
- test -n "$execute_dlfiles" && mode=execute
-
- # Just use the default operation mode.
- if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
- fi
- ;;
- esac
- fi
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$modename --help --mode=$mode' for more information."
-
- # These modes are in order of execution frequency so that they run quickly.
- case $mode in
- # libtool compile mode
- compile)
- modename="$modename: compile"
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- if test -n "$libobj" ; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit $EXIT_FAILURE
- fi
- arg_mode=target
- continue
- ;;
-
- -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
-
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
- done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- * )
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
- case $lastarg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, and some SunOS ksh mistreat backslash-escaping
- # in scan sets (worked around with variable expansion),
- # and furthermore cannot handle '|' '&' '(' ')' in scan sets
- # at all, so we specify them separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- lastarg="\"$lastarg\""
- ;;
- esac
-
- base_compile="$base_compile $lastarg"
- done # for arg
-
- case $arg_mode in
- arg)
- $echo "$modename: you must specify an argument for -Xcompile"
- exit $EXIT_FAILURE
- ;;
- target)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit $EXIT_FAILURE
- ;;
- *)
- # Get the name of the library object.
- [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSifmso]'
- case $libobj in
- *.ada) xform=ada ;;
- *.adb) xform=adb ;;
- *.ads) xform=ads ;;
- *.asm) xform=asm ;;
- *.c++) xform=c++ ;;
- *.cc) xform=cc ;;
- *.ii) xform=ii ;;
- *.class) xform=class ;;
- *.cpp) xform=cpp ;;
- *.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
- *.for) xform=for ;;
- *.java) xform=java ;;
- esac
-
- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
- case $libobj in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
- *)
- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
- case $qlibobj in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qlibobj="\"$qlibobj\"" ;;
- esac
- test "X$libobj" != "X$qlibobj" \
- && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir=
- else
- xdir=$xdir/
- fi
- lobj=${xdir}$objdir/$objname
-
- if test -z "$base_compile"; then
- $echo "$modename: you must specify a compilation command" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- $run $rm $removelist
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
- $show "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
- $echo "$srcfile" > "$lockfile"
- fi
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
- case $qsrcfile in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qsrcfile="\"$qsrcfile\"" ;;
- esac
-
- $run $rm "$libobj" "${libobj}T"
-
- # Create a libtool object file (analogous to a ".la" file),
- # but don't create it if we're doing a dry run.
- test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- if test ! -d "${xdir}$objdir"; then
- $show "$mkdir ${xdir}$objdir"
- $run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
- fi
- fi
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- $run $rm "$lobj" "$output_obj"
-
- $show "$command"
- if $run eval "$command"; then :
- else
- test -n "$output_obj" && $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- $show "$mv $output_obj $lobj"
- if $run $mv $output_obj $lobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Append the name of the PIC object to the libtool object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- else
- # No PIC object so indicate it doesn't exist in the libtool
- # object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- $run $rm "$obj" "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- $show "$mv $output_obj $obj"
- if $run $mv $output_obj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
- else
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
- fi
-
- $run $mv "${libobj}T" "${libobj}"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- # libtool link mode
- link | relink)
- modename="$modename: link"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args="$nonopt"
- base_compile="$nonopt $@"
- compile_command="$nonopt"
- finalize_command="$nonopt"
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
-
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- else
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- fi
- build_libtool_libs=no
- build_old_libs=yes
- prefer_static_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
- ;;
- *) qarg=$arg ;;
- esac
- libtool_args="$libtool_args $qarg"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- if test ! -f "$arg"; then
- $echo "$modename: symbol file \`$arg' does not exist"
- exit $EXIT_FAILURE
- fi
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat $save_arg`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$pic_object" || \
- test -z "$non_pic_object" ||
- test "$pic_object" = none && \
- test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- fi
- else
- # Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- fi
- done
- else
- $echo "$modename: link input file \`$save_arg' does not exist"
- exit $EXIT_FAILURE
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$finalize_command $wl$qarg"
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- darwin_framework)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- prev=
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
- continue
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: more than one -exported-symbols argument is not allowed"
- exit $EXIT_FAILURE
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework|-arch)
- prev=darwin_framework
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
- fi
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-mingw* | *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs -framework System"
- continue
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- -model)
- compile_command="$compile_command $arg"
- compiler_flags="$compiler_flags $arg"
- finalize_command="$finalize_command $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m* pass through architecture-specific compiler args for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
-
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -static)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Wl,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $wl$flag"
- linker_flags="$linker_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$pic_object" || \
- test -z "$non_pic_object" ||
- test "$pic_object" = none && \
- test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- fi
- else
- # Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
- done # argument parsing loop
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$output_objdir" = "X$output"; then
- output_objdir="$objdir"
- else
- output_objdir="$output_objdir/$objdir"
- fi
- # Create the object directory.
- if test ! -d "$output_objdir"; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
- fi
- fi
-
- # Determine the type of output
- case $output in
- "")
- $echo "$modename: you must specify an output file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- case $host in
- *cygwin* | *mingw* | *pw32*)
- # don't eliminate duplications in $postdeps and $predeps
- duplicate_compiler_generated_deps=yes
- ;;
- *)
- duplicate_compiler_generated_deps=$duplicate_deps
- ;;
- esac
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
- case $linkmode in
- lib)
- passes="conv link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
- for pass in $passes; do
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
- esac
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
- continue
- fi
- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if (${SED} -e '2q' $lib |
- grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- library_names=
- old_library=
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- ;;
- *)
- $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- if eval $echo \"$deplib\" 2>/dev/null \
- | $SED 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $echo
- $echo "*** Warning: Trying to link with static lib archive $deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because the file extensions .$libext of this argument makes me believe"
- $echo "*** that it is just a static archive that I should not used here."
- else
- $echo
- $echo "*** Warning: Linking the shared library $output against the"
- $echo "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
- if test "$found" = yes || test -f "$lib"; then :
- else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
-
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- $echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit $EXIT_FAILURE
- fi
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
- abs_ladir="$ladir"
- fi
- ;;
- esac
- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- $echo "$modename: warning: library \`$lib' was moved." 1>&2
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $absdir" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- # This is a shared library
-
- # Warn about portability, can't link against -module's on
- # some systems (darwin)
- if test "$shouldnotlink" = yes && test "$pass" = link ; then
- $echo
- if test "$linkmode" = prog; then
- $echo "*** Warning: Linking the executable $output against the loadable module"
- else
- $echo "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $echo "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- realname="$2"
- shift; shift
- libname=`eval \\$echo \"$libname_spec\"`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw*)
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
- newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- $show "extracting exported symbol list from \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$extract_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- $show "generating import library for \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$old_archive_from_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a module then we can not link against
- # it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
- $echo "** Warning, lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $echo
- $echo "** And there doesn't seem to be a static archive available"
- $echo "** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit $EXIT_FAILURE
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $echo
- $echo "*** Warning: This system can not link to static lib archive $lib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $echo "*** But as you try to build a module library, libtool will still create "
- $echo "*** a static module, that should work as long as the dlopening application"
- $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$deplib" && dir="."
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
- absdir="$dir"
- fi
- ;;
- esac
- if grep "^installed=no" $deplib > /dev/null; then
- path="$absdir/$objdir"
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
- fi
- path="$absdir"
- fi
- depdepl=
- case $host in
- *-*-darwin*)
- # we do not want to link against static libs,
- # but need to link against shared
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$path/$depdepl" ; then
- depdepl="$path/$depdepl"
- fi
- # do not add paths which are already there
- case " $newlib_search_path " in
- *" $path "*) ;;
- *) newlib_search_path="$newlib_search_path $path";;
- esac
- fi
- path=""
- ;;
- *)
- path="-L$path"
- ;;
- esac
- ;;
- -l*)
- case $host in
- *-*-darwin*)
- # Again, we only want to link against shared libraries
- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
- for tmp in $newlib_search_path ; do
- if test -f "$tmp/lib$tmp_libs.dylib" ; then
- eval depdepl="$tmp/lib$tmp_libs.dylib"
- break
- fi
- done
- path=""
- ;;
- *) continue ;;
- esac
- ;;
- *) continue ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
- fi
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
- fi
-
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
- fi
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- if test "$module" = no; then
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit $EXIT_FAILURE
- else
- $echo
- $echo "*** Warning: Linking the shared library $output against the non-libtool"
- $echo "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- if test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
- fi
-
- set dummy $rpath
- if test "$#" -gt 2; then
- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
- fi
- install_libdir="$2"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
- fi
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- IFS="$save_ifs"
-
- if test -n "$8"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$2"
- number_minor="$3"
- number_revision="$4"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows)
- current=`expr $number_major + $number_minor`
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
- age="$number_minor"
- revision="$number_minor"
- ;;
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- ;;
- no)
- current="$2"
- revision="$3"
- age="$4"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current";
- ;;
-
- irix | nonstopux)
- major=`expr $current - $age + 1`
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- iface=`expr $revision - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- major=.`expr $current - $age`
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
-
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
- fi
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$echo "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- if test -n "$removelist"; then
- $show "${rm}r $removelist"
- $run ${rm}r $removelist
- fi
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
- done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs -framework System"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $rm conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $rm conftest
- $LTCC -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which I believe you do not have"
- $echo "*** because a test_compile did reveal that the linker did not use it for"
- $echo "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- $rm conftest
- $LTCC -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because a test_compile did reveal that the linker did not use this one"
- $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
- $echo "*** library that it depends on before this library will be fully"
- $echo "*** functional. Installing it before continuing would be even better."
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method
- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null \
- | grep " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval $echo \"$potent_lib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
- done
- fi
- if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
- | grep . >/dev/null; then
- $echo
- if test "X$deplibs_check_method" = "Xnone"; then
- $echo "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $echo "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $echo "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $echo
- $echo "*** Warning: libtool could not satisfy all declared inter-library"
- $echo "*** dependencies of module $libname. Therefore, libtool will create"
- $echo "*** a static module, that should work as long as the dlopening"
- $echo "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $echo "*** The inter-library dependencies that have been dropped here will be"
- $echo "*** automatically added whenever a program is linked with this library"
- $echo "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $echo
- $echo "*** Since this library must not contain undefined symbols,"
- $echo "*** because either the platform does not support them or"
- $echo "*** it was explicitly requested with -no-undefined,"
- $echo "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- realname="$2"
- shift; shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- if len=`expr "X$cmd" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- $show "$cmd"
- $run eval "$cmd" || exit $?
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- $show "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- $run eval '$mv "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise.
- $echo "creating reloadable object files..."
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$echo "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- delfiles=
- last_robj=
- k=1
- output=$output_objdir/$output_la-${k}.$objext
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- eval test_cmds=\"$reload_cmds $objlist $last_robj\"
- if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; }; then
- objlist="$objlist $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- k=`expr $k + 1`
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- len=1
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
- if ${skipped_export-false}; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
- fi
-
- # Set up a command to remove the reloadable object files
- # after they are used.
- i=0
- while test "$i" -lt "$k"
- do
- i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
- done
-
- $echo "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
-
- # Append the command to remove the reloadable object files
- # to the just-reset $cmds.
- eval cmds=\"\$cmds~\$rm $delfiles\"
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
- fi
-
- case $output in
- *.lo)
- if test -n "$objs$old_deplibs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit $EXIT_FAILURE
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $run $rm $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $run eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
- esac
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
- fi
-
- if test "$preload" = yes; then
- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
- test "$dlopen_self_static" = unknown; then
- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
- fi
- fi
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- ;;
- esac
-
- case $host in
- *darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- if test "$tagname" = CXX ; then
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- fi
- ;;
- esac
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${outputname}S.c"
- else
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
- fi
- fi
-
- if test -n "$dlsyms"; then
- case $dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${outputname}.nm"
-
- $show "$rm $nlist ${nlist}S ${nlist}T"
- $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
- # Parse the name list into a source file.
- $show "creating $output_objdir/$dlsyms"
-
- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- $show "generating symbol list for \`$output'"
-
- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- if test -n "$export_symbols_regex"; then
- $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- else
- $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- $run eval 'mv "$nlist"T "$nlist"'
- fi
- fi
-
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
- $run eval '$echo ": $name " >> "$nlist"'
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -z "$run"; then
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $mv "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- grep -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
- else
- $echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
-
- $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
- case $host in
- *cygwin* | *mingw* )
- $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs */
-struct {
-"
- ;;
- * )
- $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
- ;;
- esac
-
-
- $echo >> "$output_objdir/$dlsyms" "\
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
- $echo >> "$output_objdir/$dlsyms" "\
- {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- fi
-
- pic_flag_for_symtable=
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
- esac;;
- *-*-hpux*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag";;
- esac
- esac
-
- # Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
- # Clean up the generated files.
- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- ;;
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- $show "$link_command"
- $run eval "$link_command"
- status=$?
-
- # Delete the generated files.
- if test -n "$dlsyms"; then
- $show "$rm $output_objdir/${outputname}S.${objext}"
- $run $rm "$output_objdir/${outputname}S.${objext}"
- fi
-
- exit $status
- fi
-
- if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $run $rm $output
- # Link the executable and exit
- $show "$link_command"
- $run eval "$link_command" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
- $echo "$modename: \`$output' will be relinked during installation" 1>&2
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- $show "$link_command"
- $run eval "$link_command" || exit $?
-
- # Now create the wrapper script.
- $show "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if our run command is non-null.
- if test -z "$run"; then
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "/bin/sh $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int i;
-
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
- newargz = XMALLOC(char *, argc+2);
-EOF
-
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
-EOF
-
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
- /* we know the script has the same name, without the .exe */
- /* so make sure newargz[1] doesn't end in .exe */
- strendzap(newargz[1],".exe");
- for (i = 1; i < argc; i++)
- newargz[i+1] = xstrdup(argv[i]);
- newargz[argc+1] = NULL;
-EOF
-
- cat >> $cwrappersource <<EOF
- execv("$SHELL",newargz);
-EOF
-
- cat >> $cwrappersource <<"EOF"
- return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
- void * p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-char *
-basename (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return (char *) base;
-}
-
-char *
-fnqualify(const char *path)
-{
- size_t size;
- char *p;
- char tmp[LT_PATHMAX + 1];
-
- assert(path != NULL);
-
- /* Is it qualified already? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
-#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
-
- /* prepend the current directory */
- /* doesn't handle '~' */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert(str != NULL);
- assert(pat != NULL);
-
- len = strlen(str);
- patlen = strlen(pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp(str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
- const char * message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
- $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variable:
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$echo are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- echo=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$echo works!
- :
- else
- # Restart under the correct shell, and then maybe \$echo will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $echo >> $output "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $echo >> $output "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" || \\
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $mkdir \"\$progdir\"
- else
- $rm \"\$progdir/\$file\"
- fi"
-
- $echo >> $output "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $echo \"\$relink_command_output\" >&2
- $rm \"\$progdir/\$file\"
- exit $EXIT_FAILURE
- fi
- fi
-
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $rm \"\$progdir/\$program\";
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $rm \"\$progdir/\$file\"
- fi"
- else
- $echo >> $output "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $echo >> $output "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $echo >> $output "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $echo >> $output "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2*)
- $echo >> $output "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $echo >> $output "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- exit $EXIT_FAILURE
- fi
- else
- # The program doesn't exist.
- \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$echo \"This script is just a wrapper for \$program.\" 1>&2
- $echo \"See the $PACKAGE documentation for more information.\" 1>&2
- exit $EXIT_FAILURE
- fi
-fi\
-"
- chmod +x $output
- fi
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "copying selected object files to avoid basename conflicts..."
-
- if test -z "$gentop"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- fi
-
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- counter=`expr $counter + 1`
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- $run ln "$obj" "$gentop/$newobj" ||
- $run cp "$obj" "$gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
-
- eval cmds=\"$old_archive_cmds\"
-
- if len=`expr "X$cmds" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- $echo "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
-
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- for obj in $save_oldobjs
- do
- oldobjs="$objlist $obj"
- objlist="$objlist $obj"
- eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- eval cmd=\"$cmd\"
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$generated"; then
- $show "${rm}r$generated"
- $run ${rm}r$generated
- fi
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- $show "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
-
- # Only create the output if not a dry run.
- if test -z "$run"; then
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
- for lib in $dlfiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlfiles="$newdlfiles $libdir/$name"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlprefiles="$newdlprefiles $libdir/$name"
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $rm $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $echo >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- fi
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
- ;;
- esac
- exit $EXIT_SUCCESS
- ;;
-
- # libtool install mode
- install)
- modename="$modename: install"
-
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | grep shtool > /dev/null; then
- # Aesthetically quote it.
- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$arg "
- arg="$1"
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog$arg"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o) prev=$arg ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
- done
-
- if test -z "$install_prog"; then
- $echo "$modename: you must specify an install program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prev' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -z "$files"; then
- if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
- else
- $echo "$modename: you must specify a destination" 1>&2
- fi
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Strip any trailing slash from the destination.
- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
- test "X$destdir" = "X$dest" && destdir=.
- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files
- if test "$#" -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- library_names=
- old_library=
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- if test "$inst_prefix_dir" = "$destdir"; then
- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
- fi
-
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run eval "$striplib $destdir/$realname" || exit $?
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- if test "$linkname" != "$realname"; then
- $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- fi
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- cmds=$postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- file=`$echo $file|${SED} 's,.exe$,,'`
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin*|*mingw*)
- wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
- notinst_deplibs=
- relink_command=
-
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- relink_command=
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
- file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- ${rm}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- $echo "$modename: warning: cannot relink \`$file'" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
- ;;
- esac
- ;;
- esac
- $show "$install_prog$stripme $file $destfile"
- $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
- test -n "$outputname" && ${rm}r "$tmpdir"
- ;;
- esac
- done
-
- for file in $staticlibs; do
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- $show "$install_prog $file $oldlib"
- $run eval "$install_prog \$file \$oldlib" || exit $?
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- $show "$old_striplib $oldlib"
- $run eval "$old_striplib $oldlib" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- cmds=$old_postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$future_libdirs"; then
- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
- fi
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
- ;;
-
- # libtool finish mode
- finish)
- modename="$modename: finish"
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- cmds=$finish_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
- $cmd"
- done
- IFS="$save_ifs"
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $run eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- test "$show" = : && exit $EXIT_SUCCESS
-
- $echo "----------------------------------------------------------------------"
- $echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- $echo " $libdir"
- done
- $echo
- $echo "If you ever happen to want to link against installed libraries"
- $echo "in a given directory, LIBDIR, you must either use libtool, and"
- $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $echo " during execution"
- fi
- if test -n "$runpath_var"; then
- $echo " - add LIBDIR to the \`$runpath_var' environment variable"
- $echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $echo
- $echo "See any operating system documentation about shared libraries for"
- $echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
- exit $EXIT_SUCCESS
- ;;
-
- # libtool execute mode
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- if test -z "$cmd"; then
- $echo "$modename: you must specify a COMMAND" 1>&2
- $echo "$help"
- exit $EXIT_FAILURE
- fi
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- if test ! -f "$file"; then
- $echo "$modename: \`$file' is not a file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Read the libtool library.
- dlname=
- library_names=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
- ;;
-
- *)
- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
- args="$args \"$file\""
- done
-
- if test -z "$run"; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
- $echo "export $shlibpath_var"
- fi
- $echo "$cmd$args"
- exit $EXIT_SUCCESS
- fi
- ;;
-
- # libtool clean and uninstall mode
- clean | uninstall)
- modename="$modename: $mode"
- rm="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) rm="$rm $arg"; rmforce=yes ;;
- -*) rm="$rm $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- if test -z "$rm"; then
- $echo "$modename: you must specify an RM program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$file"; then
- dir=.
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if (test -L "$file") >/dev/null 2>&1 \
- || (test -h "$file") >/dev/null 2>&1 \
- || test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-
- if test "$mode" = uninstall; then
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- cmds=$postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- cmds=$old_postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
- # FIXME: should reinstall the best remaining shared library.
- fi
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
- # Read the .lo file
- . $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" \
- && test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" \
- && test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- file=`$echo $file|${SED} 's,.exe$,,'`
- noexename=`$echo $name|${SED} 's,.exe$,,'`
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$noexename
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- $show "$rm $rmfiles"
- $run $rm $rmfiles || exit_status=1
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- $show "rmdir $dir"
- $run rmdir $dir >/dev/null 2>&1
- fi
- done
-
- exit $exit_status
- ;;
-
- "")
- $echo "$modename: you must specify a MODE" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- if test -z "$exec_cmd"; then
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
- eval exec $exec_cmd
- exit $EXIT_FAILURE
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
- --config show all configuration variables
- --debug enable verbose shell tracing
--n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --finish same as \`--mode=finish'
- --help display this help message and exit
- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
- --quiet same as \`--silent'
- --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- --version print version information
-
-MODE must be one of the following:
-
- clean remove files from the build directory
- compile compile a source file into a libtool object
- execute automatically set library path, then run a program
- finish complete the installation of libtool libraries
- install install libraries or executables
- link create a library or an executable
- uninstall remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
- exit $EXIT_SUCCESS
- ;;
-
-clean)
- $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
-compile)
- $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -static always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
-execute)
- $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
-finish)
- $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
-install)
- $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
-link)
- $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
-uninstall)
- $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
-*)
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# Libtool was configured on host gaillac:
-
-# Shell to use when invoking shell scripts.
-SHELL="/bin/bash"
-
-# Whether or not to build shared libraries.
-build_libtool_libs=no
-
-# Whether or not to build static libraries.
-build_old_libs=yes
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=no
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
-
-# Whether or not to optimize for fast installation.
-fast_install=needless
-
-# The host system.
-host_alias=arm-uclinux
-host=arm-unknown-uclinux
-host_os=uclinux
-
-# The build system.
-build_alias=
-build=i686-pc-linux-gnu
-build_os=linux-gnu
-
-# An echo program that does not interpret backslashes.
-echo="echo"
-
-# The archiver.
-AR="arm-uclinux-ar"
-AR_FLAGS="cru"
-
-# A C compiler.
-LTCC="arm-uclinux-gcc"
-
-# LTCC compiler flags.
-LTCFLAGS="-msoft-float -march=armv5"
-
-# A language-specific compiler.
-CC="arm-uclinux-g++"
-
-# Is the compiler the GNU C compiler?
-with_gcc=yes
-
-# An ERE matcher.
-EGREP="grep -E"
-
-# The linker used to build libraries.
-LD="/usr/share/toolchains/arm-uclinux/arm-uclinux/bin/ld"
-
-# Whether we need hard or soft links.
-LN_S="ln -s"
-
-# A BSD-compatible nm program.
-NM="/usr/share/toolchains/arm-uclinux/bin/arm-uclinux-nm -B"
-
-# A symbol stripping program
-STRIP="arm-uclinux-strip"
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=file
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="dlltool"
-
-# Used on cygwin: object dumper.
-OBJDUMP="objdump"
-
-# Used on cygwin: assembler.
-AS="as"
-
-# The name of the directory that contains temporary libtool files.
-objdir=.libs
-
-# How to create reloadable object files.
-reload_flag=" -r"
-reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
-
-# How to pass a linker flag through the compiler.
-wl="-Wl,"
-
-# Object file suffix (normally "o").
-objext="o"
-
-# Old archive suffix (normally "a").
-libext="a"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='.so'
-
-# Executable file suffix (normally "").
-exeext=""
-
-# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
-pic_mode=default
-
-# What is the maximum length of a command?
-max_cmd_len=32768
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
-
-# Must we lock files when doing compilation?
-need_locks="no"
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=unknown
-
-# Do we need a version for libraries?
-need_version=unknown
-
-# Whether dlopen is supported.
-dlopen_support=unknown
-
-# Whether dlopen of programs is supported.
-dlopen_self=unknown
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=unknown
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=""
-
-# Library versioning type.
-version_type=none
-
-# Format of library name prefix.
-libname_spec="lib\$name"
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=""
-
-# The coded name of the library, if different from the real name.
-soname_spec=""
-
-# Commands used to build and install an old-style archive.
-RANLIB="arm-uclinux-ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
-old_postuninstall_cmds=""
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=""
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=""
-
-# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
-postinstall_cmds=""
-postuninstall_cmds=""
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=""
-module_expsym_cmds=""
-
-# Commands to strip libraries.
-old_striplib="arm-uclinux-strip --strip-debug"
-striplib="arm-uclinux-strip --strip-unneeded"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects="/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float/crt1.o /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float/crti.o crtbeginS.o"
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects="crtendS.o /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float/crtn.o"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps="-lstdc++ -lm -lgcc -lc -lgcc"
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path="-L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4 -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4 -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib"
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="unknown"
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=""
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=""
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=""
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
-
-# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
-
-# This is the shared library path variable.
-shlibpath_var=
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=unknown
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=immediate
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=no
-
-# Flag to hardcode $libdir into a binary during linking.
-# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
-
-# If ld is used when linking, flag to hardcode $libdir into
-# a binary during linking. This must work even if $libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=""
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=""
-
-# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=no
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=no
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=unsupported
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=no
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=unknown
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/ /usr/lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/"
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-# Fix the shell variable $srcfile for the compiler.
-fix_srcfile_path=""
-
-# Set to yes if exported symbols are required.
-always_export_symbols=no
-
-# The commands to list exported symbols.
-export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=""
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=""
-
-# Symbols that must always be exported.
-include_expsyms=""
-
-# ### END LIBTOOL TAG CONFIG: CXX
-
diff --git a/voip/libeXosip2-2.2.2/platform/Makefile.in b/voip/libeXosip2-2.2.2/platform/Makefile.in
index a050eabbcf..cfecaa1d05 100644
--- a/voip/libeXosip2-2.2.2/platform/Makefile.in
+++ b/voip/libeXosip2-2.2.2/platform/Makefile.in
@@ -95,6 +95,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -127,6 +128,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -134,12 +136,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -154,23 +153,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/platform/vsnet/Makefile.in b/voip/libeXosip2-2.2.2/platform/vsnet/Makefile.in
index c842f7d2ef..a67031979d 100644
--- a/voip/libeXosip2-2.2.2/platform/vsnet/Makefile.in
+++ b/voip/libeXosip2-2.2.2/platform/vsnet/Makefile.in
@@ -86,6 +86,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -118,6 +119,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -125,12 +127,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -145,23 +144,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/scripts/Makefile.in b/voip/libeXosip2-2.2.2/scripts/Makefile.in
index 8e707938ef..46b1c40be0 100644
--- a/voip/libeXosip2-2.2.2/scripts/Makefile.in
+++ b/voip/libeXosip2-2.2.2/scripts/Makefile.in
@@ -87,6 +87,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -119,6 +120,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -126,12 +128,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -146,23 +145,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/scripts/config.guess b/voip/libeXosip2-2.2.2/scripts/config.guess
index ad5281e66e..34093cc6bb 100644..100755
--- a/voip/libeXosip2-2.2.2/scripts/config.guess
+++ b/voip/libeXosip2-2.2.2/scripts/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-08-03'
+timestamp='2007-07-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -160,6 +178,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -206,8 +225,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +347,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -764,12 +786,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -779,9 +808,15 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -815,25 +850,28 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
@@ -851,8 +889,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,17 +912,21 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo or32-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -893,34 +939,40 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -935,20 +987,22 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -964,7 +1018,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -974,7 +1028,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1176,6 +1234,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1185,7 +1252,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1264,6 +1330,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/voip/libeXosip2-2.2.2/scripts/config.sub b/voip/libeXosip2-2.2.2/scripts/config.sub
index 1c366dfde9..63cdd0a35d 100644..100755
--- a/voip/libeXosip2-2.2.2/scripts/config.sub
+++ b/voip/libeXosip2-2.2.2/scripts/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2007-06-28'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,31 +349,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -463,8 +475,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -671,6 +683,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -678,6 +694,24 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -696,6 +730,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +840,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +902,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -885,6 +932,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -896,6 +947,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1101,7 +1155,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1228,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1340,6 +1396,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1349,9 +1411,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1377,6 +1439,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
diff --git a/voip/libeXosip2-2.2.2/scripts/ltmain.sh b/voip/libeXosip2-2.2.2/scripts/ltmain.sh
index db4982d8a9..d74b5a67af 100755..100644
--- a/voip/libeXosip2-2.2.2/scripts/ltmain.sh
+++ b/voip/libeXosip2-2.2.2/scripts/ltmain.sh
@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="1.5.20 Debian 1.5.20-2"
-TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+VERSION=1.5.24
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -105,12 +113,14 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -132,13 +142,54 @@ run=
show="$echo"
show_help=
execute_dlfiles=
+duplicate_deps=no
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
# This seems to be the best place for them
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $mkdir "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || {
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+ exit $EXIT_FAILURE
+ }
+ fi
+
+ $echo "X$my_tmpdir" | $Xsed
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
@@ -157,12 +208,17 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
+ $SED -n -e '1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
fi
;;
*DLL*)
@@ -219,7 +275,21 @@ func_infer_tag ()
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -289,15 +359,25 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$my_xdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $exit_status
fi
case $host in
*-darwin*)
@@ -352,6 +432,8 @@ func_extract_archives ()
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
+disable_libs=no
+
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -414,11 +496,12 @@ do
;;
--version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
@@ -468,7 +551,11 @@ do
preserve_args="$preserve_args $arg"
;;
- --tag) prevopt="--tag" prev=tag ;;
+ --tag)
+ prevopt="--tag"
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
@@ -500,6 +587,18 @@ if test -n "$prevopt"; then
exit $EXIT_FAILURE
fi
+case $disable_libs in
+no)
+ ;;
+shared)
+ build_libtool_libs=no
+ build_old_libs=yes
+ ;;
+static)
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+ ;;
+esac
+
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
@@ -699,9 +798,10 @@ if test -z "$show_help"; then
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
+ *.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -795,7 +895,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -856,9 +956,9 @@ EOF
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $exit_status
fi
fi
@@ -1061,6 +1161,7 @@ EOF
no_install=no
objs=
non_pic_objects=
+ notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -1081,22 +1182,32 @@ EOF
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- else
+ prefer_static_libs=yes
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -1271,6 +1382,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1354,8 +1470,8 @@ EOF
prev=
continue
;;
- darwin_framework)
- compiler_flags="$compiler_flags $arg"
+ darwin_framework|darwin_framework_skip)
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
@@ -1419,13 +1535,17 @@ EOF
continue
;;
- -framework|-arch)
- prev=darwin_framework
- compiler_flags="$compiler_flags $arg"
+ -framework|-arch|-isysroot)
+ case " $CC " in
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
+ prev=darwin_framework_skip ;;
+ *) compiler_flags="$compiler_flags $arg"
+ prev=darwin_framework ;;
+ esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- continue
- ;;
+ continue
+ ;;
-inst-prefix-dir)
prev=inst_prefix
@@ -1453,7 +1573,8 @@ EOF
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
+ absdir="$dir"
+ notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
@@ -1467,10 +1588,15 @@ EOF
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1479,11 +1605,11 @@ EOF
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
@@ -1495,6 +1621,15 @@ EOF
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
@@ -1518,7 +1653,7 @@ EOF
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@@ -1536,7 +1671,13 @@ EOF
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
@@ -1548,9 +1689,7 @@ EOF
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
+ compiler_flags="$compiler_flags $arg"
continue
;;
@@ -1566,9 +1705,9 @@ EOF
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
+ # and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
@@ -1627,7 +1766,7 @@ EOF
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -1788,6 +1927,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1893,9 +2037,9 @@ EOF
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $exit_status
fi
fi
@@ -1958,7 +2102,6 @@ EOF
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
@@ -1993,10 +2136,7 @@ EOF
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
if test "$pass" = dlopen; then
@@ -2008,7 +2148,7 @@ EOF
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -2197,7 +2337,7 @@ EOF
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
@@ -2404,7 +2544,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -2448,8 +2590,12 @@ EOF
fi
link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes ; then
+ use_static_libs=no
+ fi
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
@@ -2562,11 +2708,15 @@ EOF
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null |
+ $EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
@@ -3092,7 +3242,7 @@ EOF
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3103,14 +3253,10 @@ EOF
age="0"
;;
irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
+ current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
- ;;
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
+ lt_irix_increment=no
;;
esac
;;
@@ -3169,7 +3315,8 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@@ -3183,8 +3330,11 @@ EOF
;;
irix | nonstopux)
- major=`expr $current - $age + 1`
-
+ if test "X$lt_irix_increment" = "Xno"; then
+ major=`expr $current - $age`
+ else
+ major=`expr $current - $age + 1`
+ fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@@ -3321,11 +3471,11 @@ EOF
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
- done
+ #for path in $notinst_path; do
+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ #done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3377,7 +3527,12 @@ EOF
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
;;
*)
# Add libc to deplibs on all other systems if necessary.
@@ -3421,13 +3576,12 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3466,9 +3620,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3500,7 +3652,7 @@ EOF
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -3713,6 +3865,35 @@ EOF
deplibs=$newdeplibs
fi
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3757,7 +3938,10 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ case $archive_cmds in
+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+ esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@@ -3796,6 +3980,7 @@ EOF
fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
@@ -4115,12 +4300,14 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4227,6 +4414,35 @@ EOF
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -4271,10 +4487,15 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -4391,10 +4612,22 @@ extern \"C\" {
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
else
- $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
fi
fi
@@ -4511,16 +4744,29 @@ static const void *lt_preloaded_setup() {
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/${outputname}.def" ; then
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ else
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ ;;
+ esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4533,19 +4779,19 @@ static const void *lt_preloaded_setup() {
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- status=$?
+ exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
@@ -4553,7 +4799,7 @@ static const void *lt_preloaded_setup() {
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $status
+ exit $exit_status
fi
if test -n "$shlibpath_var"; then
@@ -4626,7 +4872,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4663,7 +4909,7 @@ static const void *lt_preloaded_setup() {
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -4693,10 +4939,12 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@@ -4721,6 +4969,9 @@ EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@@ -4731,15 +4982,19 @@ EOF
#endif
#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
#endif
#ifndef DIR_SEPARATOR_2
@@ -4749,17 +5004,32 @@ EOF
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@@ -4769,29 +5039,50 @@ main (int argc, char *argv[])
char **newargz;
int i;
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
EOF
- cat >> $cwrappersource <<EOF
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
+ ;;
+ esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
return 127;
}
@@ -4812,48 +5103,148 @@ xstrdup (const char *string)
;
}
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
}
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
{
- size_t size;
- char *p;
+ int has_slash = 0;
+ const char* p;
+ const char* p_next;
+ /* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char* concat_name;
- assert(path != NULL);
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
- /* Is it qualified already? */
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
+ }
#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
- /* prepend the current directory */
- /* doesn't handle '~' */
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ return NULL;
}
char *
@@ -4897,16 +5288,16 @@ lt_fatal (const char *message, ...)
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -4925,6 +5316,20 @@ EOF
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5051,6 +5456,11 @@ else
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
@@ -5067,7 +5477,7 @@ else
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5136,9 +5546,9 @@ fi\
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+ exit $exit_status
fi
fi
@@ -5253,7 +5663,7 @@ fi\
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5278,9 +5688,53 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5332,6 +5786,10 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5598,9 +6056,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -5805,22 +6263,11 @@ relink_command=\"$relink_command\""
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
+ tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -5940,7 +6387,7 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
@@ -5973,7 +6420,7 @@ relink_command=\"$relink_command\""
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
@@ -6031,8 +6478,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
+ if test ! -f "$dir/$dlname"; then
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
fi
;;
@@ -6096,12 +6545,12 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ fi"
+ done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6190,9 +6639,17 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test "$mode" = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
@@ -6225,7 +6682,8 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
@@ -6449,9 +6907,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6465,9 +6923,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
@@ -6524,12 +6984,11 @@ exit $?
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
+disable_libs=shared
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
diff --git a/voip/libeXosip2-2.2.2/src/Makefile.in b/voip/libeXosip2-2.2.2/src/Makefile.in
index b723d3ef1c..58295c4380 100644
--- a/voip/libeXosip2-2.2.2/src/Makefile.in
+++ b/voip/libeXosip2-2.2.2/src/Makefile.in
@@ -134,6 +134,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -166,6 +167,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -173,12 +175,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -193,23 +192,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libeXosip2-2.2.2/tools/Makefile.in b/voip/libeXosip2-2.2.2/tools/Makefile.in
index a5c06e31e9..4bc77df423 100644
--- a/voip/libeXosip2-2.2.2/tools/Makefile.in
+++ b/voip/libeXosip2-2.2.2/tools/Makefile.in
@@ -110,6 +110,7 @@ F77 = @F77@
FFLAGS = @FFLAGS@
GLIB_SUPPORT_FALSE = @GLIB_SUPPORT_FALSE@
GLIB_SUPPORT_TRUE = @GLIB_SUPPORT_TRUE@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -142,6 +143,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -149,12 +151,9 @@ UCL_SUPPORT_FALSE = @UCL_SUPPORT_FALSE@
UCL_SUPPORT_TRUE = @UCL_SUPPORT_TRUE@
VERSION = @VERSION@
ac_aux_dir = @ac_aux_dir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -169,23 +168,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/Makefile.in b/voip/libosip2-2.2.2/Makefile.in
index ca74991257..4ca4a7ca78 100644
--- a/voip/libosip2-2.2.2/Makefile.in
+++ b/voip/libosip2-2.2.2/Makefile.in
@@ -38,9 +38,8 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(srcdir)/libosip2.pc.in $(top_srcdir)/configure \
- $(top_srcdir)/src/test/res/Makefile.in AUTHORS COPYING \
- ChangeLog INSTALL NEWS TODO
+ $(srcdir)/libosip2.pc.in $(top_srcdir)/configure AUTHORS \
+ COPYING ChangeLog INSTALL NEWS TODO
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/aclocal-include.m4 \
$(top_srcdir)/scripts/acx_pthread.m4 \
@@ -51,7 +50,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = libosip2.pc src/test/res/Makefile
+CONFIG_CLEAN_FILES = libosip2.pc
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -112,6 +111,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -141,6 +141,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -149,15 +150,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -172,23 +167,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -253,8 +255,6 @@ distclean-hdr:
-rm -f config.h stamp-h1
libosip2.pc: $(top_builddir)/config.status $(srcdir)/libosip2.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-src/test/res/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/test/res/Makefile.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
@@ -406,7 +406,7 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
- $(mkdir_p) $(distdir)/. $(distdir)/include/osip2 $(distdir)/scripts $(distdir)/src/test/res
+ $(mkdir_p) $(distdir)/. $(distdir)/include/osip2 $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
diff --git a/voip/libosip2-2.2.2/aclocal.m4 b/voip/libosip2-2.2.2/aclocal.m4
index 0b7cdd7e88..b6e3bd7e32 100644
--- a/voip/libosip2-2.2.2/aclocal.m4
+++ b/voip/libosip2-2.2.2/aclocal.m4
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 48 AC_PROG_LIBTOOL
+# serial 51 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -176,7 +176,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -219,6 +219,14 @@ AC_ARG_WITH([pic],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
+
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
@@ -226,6 +234,41 @@ _LT_AC_TAGCONFIG
])# AC_LIBTOOL_SETUP
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test "x$ltmain" = "x" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+])
+fi
+gentoo_lt_version="1.5.24"
+gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+])
+else
+ AC_MSG_RESULT(yes)
+fi
+])# _LT_VERSION_CHECK
+
+
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
@@ -263,8 +306,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
@@ -276,8 +320,9 @@ $rm conftest*
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -293,12 +338,20 @@ $rm conftest*
# If we don't find anything, use the default library path according
# to the aix ld manual.
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
])# _LT_AC_SYS_LIBPATH_AIX
@@ -529,13 +582,17 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -552,6 +609,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -623,7 +683,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
AC_CACHE_CHECK([$1], [$2],
[$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -664,11 +724,12 @@ fi
# ------------------------------------------------------------
# Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
[$2=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -782,24 +843,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
])
@@ -1026,7 +1090,8 @@ fi
# ---------------------------------
# Check to see if options -c and -o are simultaneously supported by compiler
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
@@ -1034,7 +1099,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -1174,6 +1239,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
@@ -1191,7 +1257,8 @@ fi
# -----------------------------
# PORTME Fill in your ld.so characteristics
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -1205,20 +1272,58 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+fi])
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -1375,12 +1480,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+ m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -1397,18 +1498,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -1420,7 +1509,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -1431,6 +1527,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -1446,7 +1548,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -1509,7 +1611,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[[3-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1564,7 +1666,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -1580,7 +1682,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -1593,18 +1695,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -1686,6 +1776,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -1791,7 +1885,8 @@ fi
# _LT_AC_TAGCONFIG
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
[include additional configurations @<:@automatic@:>@])],
[tagnames="$withval"])
@@ -2052,7 +2147,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
# AC_PATH_TOOL_PREFIX
# -------------------
-# find a file program which can recognise shared library
+# find a file program which can recognize shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_REQUIRE([AC_PROG_EGREP])dnl
AC_MSG_CHECKING([for $1])
@@ -2115,7 +2210,7 @@ fi
# AC_PATH_MAGIC
# -------------
-# find a file program which can recognise a shared library
+# find a file program which can recognize a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2262,7 +2357,7 @@ esac
# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -2301,16 +2396,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -2348,7 +2449,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[[3-9]]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
;;
@@ -2364,7 +2465,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2398,6 +2499,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -2450,7 +2555,7 @@ AC_DEFUN([AC_PROG_NM],
lt_cv_path_NM="$NM"
else
lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
@@ -2666,10 +2771,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
_LT_AC_SYS_COMPILER
@@ -2771,10 +2876,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -2920,7 +3025,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -3079,10 +3184,10 @@ case $host_os in
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -3116,7 +3221,7 @@ case $host_os in
freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -3165,9 +3270,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
@@ -3235,7 +3338,7 @@ case $host_os in
;;
esac
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -3275,7 +3378,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -3355,6 +3458,29 @@ case $host_os in
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -3393,16 +3519,20 @@ case $host_os in
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -3564,15 +3694,10 @@ case $host_os in
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -3619,6 +3744,12 @@ case $host_os in
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -3862,7 +3993,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
-interix3*)
+interix[[3-9]]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
_LT_AC_TAGVAR(predep_objects,$1)=
@@ -3870,13 +4001,46 @@ interix3*)
_LT_AC_TAGVAR(postdeps,$1)=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -3925,10 +4089,17 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4007,10 +4178,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4063,7 +4234,7 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -4152,6 +4323,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(module_cmds, $1) \
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
_LT_AC_TAGVAR(exclude_expsyms, $1) \
_LT_AC_TAGVAR(include_expsyms, $1); do
@@ -4198,7 +4370,7 @@ ifelse([$1], [],
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -4523,7 +4695,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
@@ -4606,6 +4778,7 @@ fi
# ---------------------------------
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_OBJEXT])
# Check for command to grab the raw symbol name followed by C symbol from nm.
@@ -4642,7 +4815,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -4838,7 +5011,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -4851,7 +5024,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -4917,7 +5090,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4960,7 +5133,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4987,6 +5160,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -5114,7 +5295,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5125,7 +5306,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -5186,8 +5367,6 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5218,7 +5397,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -5237,6 +5416,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# All Alpha code is PIC.
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -5246,6 +5441,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ rdos*)
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5340,7 +5539,8 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
# ------------------------------------
# See if the linker supports building shared libraries.
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
@@ -5357,7 +5557,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -5496,7 +5696,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5514,7 +5714,7 @@ EOF
fi
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -5529,7 +5729,7 @@ EOF
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -5547,13 +5747,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5593,7 +5802,7 @@ EOF
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -5712,7 +5921,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5805,7 +6014,7 @@ _LT_EOF
# The linker will automatically build a .lib file if we build a DLL.
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
@@ -5847,10 +6056,10 @@ _LT_EOF
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -5890,7 +6099,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -6012,24 +6221,28 @@ _LT_EOF
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
@@ -6088,17 +6301,16 @@ _LT_EOF
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
@@ -6155,7 +6367,7 @@ _LT_EOF
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6230,7 +6442,7 @@ x|xyes)
# to ld, don't add -lc before -lgcc.
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest
@@ -6333,6 +6545,30 @@ AC_DEFUN([LT_AC_PROG_RC],
[AC_CHECK_TOOL(RC, windres, no)
])
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+ as_executable_p='test -x'
+else
+ as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
# NOTE: This macro has been submitted for inclusion into #
# GNU Autoconf as AC_PROG_SED. When it is available in #
# a released version of Autoconf we should remove this #
@@ -6353,12 +6589,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6391,6 +6628,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
diff --git a/voip/libosip2-2.2.2/config.h.in b/voip/libosip2-2.2.2/config.h.in
new file mode 100644
index 0000000000..2a120ea597
--- /dev/null
+++ b/voip/libosip2-2.2.2/config.h.in
@@ -0,0 +1,119 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have <dict/dict.h> header file */
+#undef HAVE_DICT_DICT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Defined if you have lrand48 */
+#undef HAVE_LRAND48
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#undef HAVE_SEMAPHORE_H
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if the system has the type `struct timeval'. */
+#undef HAVE_STRUCT_TIMEVAL
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#undef HAVE_SYS_SEM_H
+
+/* Define to 1 if you have the <sys/signal.h> header file. */
+#undef HAVE_SYS_SIGNAL_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/unistd.h> header file. */
+#undef HAVE_SYS_UNISTD_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <varargs.h> header file. */
+#undef HAVE_VARARGS_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to the necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/voip/libosip2-2.2.2/configure b/voip/libosip2-2.2.2/configure
index 99647ebfb5..ef44df7d01 100755
--- a/voip/libosip2-2.2.2/configure
+++ b/voip/libosip2-2.2.2/configure
@@ -853,6 +853,7 @@ CCDEPMODE
am__fastdepCC_TRUE
am__fastdepCC_FALSE
CPP
+SED
GREP
EGREP
LN_S
@@ -3960,12 +3961,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -4000,6 +4002,7 @@ done
fi
SED=$lt_cv_path_SED
+
{ echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6; }
@@ -4433,8 +4436,8 @@ else
echo "${ECHO_T}no, using $LN_S" >&6; }
fi
-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4475,16 +4478,22 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu | dragonfly*)
+freebsd* | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -4522,7 +4531,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[3-9]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
;;
@@ -4538,7 +4547,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4572,6 +4581,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4659,7 +4672,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4662 "configure"' > conftest.$ac_ext
+ echo '#line 4675 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4694,7 +4707,8 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -4705,6 +4719,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -4721,6 +4738,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -6569,24 +6589,27 @@ else
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
@@ -6603,6 +6626,7 @@ fi
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
@@ -6640,7 +6664,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux*)
+linux* | k*bsd*-gnu)
if test "$host_cpu" = ia64; then
symcode='[ABCDGIRSTW]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@@ -7191,7 +7215,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -7373,6 +7397,67 @@ fi
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+{ echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5
+echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6; }
+if test "x$ltmain" = "x" ; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+gentoo_lt_version="1.5.24"
+gentoo_ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+fi
+
+
# Use C for the default configuration in the libtool script
tagname=
lt_save_CC="$CC"
@@ -7391,10 +7476,10 @@ objext=o
objext=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
# If no C compiler was specified, use CC.
@@ -7409,13 +7494,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -7435,7 +7520,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7446,11 +7531,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7449: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7534: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7453: \$? = $ac_status" >&5
+ echo "$as_me:7538: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7508,7 +7593,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -7519,7 +7604,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -7580,8 +7665,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -7612,7 +7695,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl='-Wl,'
@@ -7631,6 +7714,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -7640,6 +7739,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -7707,7 +7810,7 @@ if test "${lt_prog_compiler_pic_works+set}" = set; then
else
lt_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7718,11 +7821,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7721: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7824: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7725: \$? = $ac_status" >&5
+ echo "$as_me:7828: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7771,7 +7874,7 @@ else
lt_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -7811,7 +7914,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -7822,11 +7925,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7825: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7928: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7829: \$? = $ac_status" >&5
+ echo "$as_me:7932: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8018,7 +8121,7 @@ EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -8036,7 +8139,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
@@ -8051,7 +8154,7 @@ EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -8069,13 +8172,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs=no
@@ -8234,7 +8346,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ :
else
# We have old collect2
hardcode_direct=unsupported
@@ -8308,11 +8420,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8367,11 +8486,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8425,7 +8551,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes=yes
;;
@@ -8467,10 +8593,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -8510,7 +8636,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -8632,24 +8758,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs=no
fi
;;
@@ -8708,17 +8838,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs=yes
;;
@@ -8775,7 +8904,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
@@ -8852,7 +8981,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -8910,17 +9039,55 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
@@ -9080,12 +9247,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -9102,18 +9265,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -9125,7 +9276,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -9136,6 +9294,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -9151,7 +9315,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -9214,7 +9378,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -9269,7 +9433,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -9285,7 +9449,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -9298,18 +9462,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -9391,6 +9543,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -9544,6 +9700,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
@@ -10130,7 +10287,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10133 "configure"
+#line 10290 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10230,7 +10387,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10233 "configure"
+#line 10390 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10428,6 +10585,7 @@ if test -f "$ltmain"; then
module_cmds \
module_expsym_cmds \
lt_cv_prog_compiler_c_o \
+ fix_srcfile_path \
exclude_expsyms \
include_expsyms; do
@@ -10472,7 +10630,7 @@ echo "$as_me: creating $ofile" >&6;}
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -10796,7 +10954,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
@@ -10965,10 +11123,10 @@ objext=o
objext_CXX=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -10984,13 +11142,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -11249,7 +11407,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_CXX=yes
+ :
else
# We have old collect2
hardcode_direct_CXX=unsupported
@@ -11323,11 +11481,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11383,11 +11548,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11506,10 +11678,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -11543,7 +11715,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
freebsd-elf*)
archive_cmds_need_lc_CXX=no
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs_CXX=yes
@@ -11592,9 +11764,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_CXX=:
case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
export_dynamic_flag_spec_CXX='${wl}-E'
;;
@@ -11662,7 +11832,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
@@ -11702,7 +11872,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -11782,6 +11952,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -11820,16 +12013,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_CXX=no
;;
openbsd*)
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ ld_shlibs_CXX=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -11991,15 +12188,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
esac
link_all_deplibs_CXX=yes
@@ -12046,6 +12238,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -12237,7 +12435,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
case $host_os in
-interix3*)
+interix[3-9]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
predep_objects_CXX=
@@ -12245,13 +12443,46 @@ interix3*)
postdeps_CXX=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- postdeps_CXX='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -12294,7 +12525,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
;;
@@ -12307,7 +12538,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# DJGPP does not support shared libraries at all
lt_prog_compiler_pic_CXX=
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -12373,7 +12604,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
;;
esac
;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -12416,7 +12647,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
;;
esac
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -12443,6 +12674,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_CXX='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -12557,7 +12796,7 @@ if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
else
lt_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -12568,11 +12807,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12571: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12810: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12575: \$? = $ac_status" >&5
+ echo "$as_me:12814: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12621,7 +12860,7 @@ else
lt_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -12661,7 +12900,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -12672,11 +12911,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12675: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12914: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12679: \$? = $ac_status" >&5
+ echo "$as_me:12918: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12742,7 +12981,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -12773,7 +13012,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -12831,20 +13070,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -13001,12 +13227,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -13023,18 +13244,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -13046,7 +13255,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -13057,6 +13273,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -13072,7 +13294,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -13135,7 +13357,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -13190,7 +13412,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -13206,7 +13428,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -13219,18 +13441,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -13312,6 +13522,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -13506,6 +13720,7 @@ if test -f "$ltmain"; then
module_cmds_CXX \
module_expsym_cmds_CXX \
lt_cv_prog_compiler_c_o_CXX \
+ fix_srcfile_path_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX; do
@@ -13826,7 +14041,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
@@ -13917,10 +14132,17 @@ objext=o
objext_F77=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -13936,13 +14158,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -14036,7 +14258,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -14047,7 +14269,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_F77='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -14108,8 +14330,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -14140,7 +14360,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_F77='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_F77='-Wl,'
@@ -14159,6 +14379,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_F77='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -14168,6 +14404,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_F77='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
@@ -14235,7 +14475,7 @@ if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
else
lt_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_F77"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -14246,11 +14486,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14249: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14489: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14253: \$? = $ac_status" >&5
+ echo "$as_me:14493: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14299,7 +14539,7 @@ else
lt_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14339,7 +14579,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -14350,11 +14590,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14353: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14593: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14357: \$? = $ac_status" >&5
+ echo "$as_me:14597: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14546,7 +14786,7 @@ EOF
allow_undefined_flag_F77=unsupported
always_export_symbols_F77=no
enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -14564,7 +14804,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_F77=no
hardcode_shlibpath_var_F77=no
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
@@ -14579,7 +14819,7 @@ EOF
archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -14597,13 +14837,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_F77=no
@@ -14762,7 +15011,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_F77=yes
+ :
else
# We have old collect2
hardcode_direct_F77=unsupported
@@ -14826,11 +15075,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -14875,11 +15131,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -14933,7 +15196,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_F77='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_F77=yes
;;
@@ -14975,10 +15238,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -15018,7 +15281,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_F77='-R$libdir'
hardcode_direct_F77=yes
@@ -15140,24 +15403,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_F77='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_F77='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- ;;
- *)
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_F77=no
fi
;;
@@ -15216,17 +15483,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_F77=yes
;;
@@ -15283,7 +15549,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_F77='${wl}-z,text'
archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
@@ -15360,7 +15626,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -15418,20 +15684,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -15588,12 +15841,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -15610,18 +15858,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -15633,7 +15869,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -15644,6 +15887,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -15659,7 +15908,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -15722,7 +15971,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15777,7 +16026,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15793,7 +16042,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -15806,18 +16055,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -15899,6 +16136,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -16093,6 +16334,7 @@ if test -f "$ltmain"; then
module_cmds_F77 \
module_expsym_cmds_F77 \
lt_cv_prog_compiler_c_o_F77 \
+ fix_srcfile_path_F77 \
exclude_expsyms_F77 \
include_expsyms_F77; do
@@ -16413,7 +16655,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_F77
@@ -16471,10 +16713,10 @@ objext=o
objext_GCJ=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -16490,13 +16732,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -16537,7 +16779,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16548,11 +16790,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16551: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16793: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16555: \$? = $ac_status" >&5
+ echo "$as_me:16797: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16610,7 +16852,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
;;
@@ -16621,7 +16863,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_GCJ='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -16682,8 +16924,6 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- # Even tho PIC is default for cygwin, still need this for old-style
- # (--disable-auto-import) libraries
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
;;
@@ -16714,7 +16954,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_GCJ='-Bstatic'
;;
- linux*)
+ linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_GCJ='-Wl,'
@@ -16733,6 +16973,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -16742,6 +16998,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -16809,7 +17069,7 @@ if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
else
lt_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16820,11 +17080,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16823: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17083: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16827: \$? = $ac_status" >&5
+ echo "$as_me:17087: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16873,7 +17133,7 @@ else
lt_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -16913,7 +17173,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -16924,11 +17184,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16927: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17187: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16931: \$? = $ac_status" >&5
+ echo "$as_me:17191: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17120,7 +17380,7 @@ EOF
allow_undefined_flag_GCJ=unsupported
always_export_symbols_GCJ=no
enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -17138,7 +17398,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_GCJ=no
hardcode_shlibpath_var_GCJ=no
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
@@ -17153,7 +17413,7 @@ EOF
archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux*)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -17171,13 +17431,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs_GCJ=no
@@ -17336,7 +17605,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_GCJ=yes
+ :
else
# We have old collect2
hardcode_direct_GCJ=unsupported
@@ -17410,11 +17679,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17469,11 +17745,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17527,7 +17810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_GCJ='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_GCJ=yes
;;
@@ -17569,10 +17852,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -17612,7 +17895,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
+ freebsd* | dragonfly*)
archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_GCJ='-R$libdir'
hardcode_direct_GCJ=yes
@@ -17734,24 +18017,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_GCJ='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- ;;
- *)
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_GCJ=no
fi
;;
@@ -17810,17 +18097,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_GCJ=yes
;;
@@ -17877,7 +18163,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_GCJ='${wl}-z,text'
archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
@@ -17954,7 +18240,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -18012,20 +18298,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -18182,12 +18455,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -18204,18 +18472,6 @@ freebsd1*)
dynamic_linker=no
;;
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -18227,7 +18483,14 @@ freebsd* | dragonfly*)
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -18238,6 +18501,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -18253,7 +18522,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -18316,7 +18585,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -18371,7 +18640,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -18387,7 +18656,7 @@ linux*)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -18400,18 +18669,6 @@ linux*)
dynamic_linker='GNU/Linux ld.so'
;;
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -18493,6 +18750,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -18687,6 +18948,7 @@ if test -f "$ltmain"; then
module_cmds_GCJ \
module_expsym_cmds_GCJ \
lt_cv_prog_compiler_c_o_GCJ \
+ fix_srcfile_path_GCJ \
exclude_expsyms_GCJ \
include_expsyms_GCJ; do
@@ -19007,7 +19269,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_GCJ
@@ -19064,7 +19326,7 @@ objext=o
objext_RC=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -19083,13 +19345,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -19167,6 +19429,7 @@ if test -f "$ltmain"; then
module_cmds_RC \
module_expsym_cmds_RC \
lt_cv_prog_compiler_c_o_RC \
+ fix_srcfile_path_RC \
exclude_expsyms_RC \
include_expsyms_RC; do
@@ -19487,7 +19750,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_RC
@@ -25355,6 +25618,7 @@ CCDEPMODE!$CCDEPMODE$ac_delim
am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
CPP!$CPP$ac_delim
+SED!$SED$ac_delim
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
LN_S!$LN_S$ac_delim
@@ -25366,7 +25630,6 @@ AS!$AS$ac_delim
OBJDUMP!$OBJDUMP$ac_delim
CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -25408,6 +25671,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+ac_ct_CXX!$ac_ct_CXX$ac_delim
CXXDEPMODE!$CXXDEPMODE$ac_delim
am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
@@ -25432,7 +25696,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/voip/libosip2-2.2.2/debian/Makefile.in b/voip/libosip2-2.2.2/debian/Makefile.in
index a326dc0e80..166051705b 100644
--- a/voip/libosip2-2.2.2/debian/Makefile.in
+++ b/voip/libosip2-2.2.2/debian/Makefile.in
@@ -35,7 +35,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
subdir = debian
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/aclocal-include.m4 \
$(top_srcdir)/scripts/acx_pthread.m4 \
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/help/Makefile.in b/voip/libosip2-2.2.2/help/Makefile.in
index eb50dae336..62d643a0d1 100644
--- a/voip/libosip2-2.2.2/help/Makefile.in
+++ b/voip/libosip2-2.2.2/help/Makefile.in
@@ -92,6 +92,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -121,6 +122,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -129,15 +131,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -152,23 +148,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/help/doxygen/Makefile.in b/voip/libosip2-2.2.2/help/doxygen/Makefile.in
index cf01c71f6a..9cb769e154 100644
--- a/voip/libosip2-2.2.2/help/doxygen/Makefile.in
+++ b/voip/libosip2-2.2.2/help/doxygen/Makefile.in
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/help/man/Makefile.in b/voip/libosip2-2.2.2/help/man/Makefile.in
index 2af2611915..60c15e603d 100644
--- a/voip/libosip2-2.2.2/help/man/Makefile.in
+++ b/voip/libosip2-2.2.2/help/man/Makefile.in
@@ -87,6 +87,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -116,6 +117,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -124,15 +126,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -147,23 +143,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/include/Makefile.in b/voip/libosip2-2.2.2/include/Makefile.in
index 73ba7c30f9..cdfeaae95a 100644
--- a/voip/libosip2-2.2.2/include/Makefile.in
+++ b/voip/libosip2-2.2.2/include/Makefile.in
@@ -92,6 +92,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -121,6 +122,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -129,15 +131,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -152,23 +148,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/include/osip2/Makefile.in b/voip/libosip2-2.2.2/include/osip2/Makefile.in
index 20ffa2fc9a..c77eac499b 100644
--- a/voip/libosip2-2.2.2/include/osip2/Makefile.in
+++ b/voip/libosip2-2.2.2/include/osip2/Makefile.in
@@ -90,6 +90,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -119,6 +120,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -127,15 +129,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -150,23 +146,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/include/osipparser2/Makefile.in b/voip/libosip2-2.2.2/include/osipparser2/Makefile.in
index 89af3de53b..9077c90557 100644
--- a/voip/libosip2-2.2.2/include/osipparser2/Makefile.in
+++ b/voip/libosip2-2.2.2/include/osipparser2/Makefile.in
@@ -97,6 +97,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -126,6 +127,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -134,15 +136,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -157,23 +153,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/include/osipparser2/headers/Makefile.in b/voip/libosip2-2.2.2/include/osipparser2/headers/Makefile.in
index 99b0429997..b91f088993 100644
--- a/voip/libosip2-2.2.2/include/osipparser2/headers/Makefile.in
+++ b/voip/libosip2-2.2.2/include/osipparser2/headers/Makefile.in
@@ -90,6 +90,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -119,6 +120,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -127,15 +129,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -150,23 +146,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/libtool b/voip/libosip2-2.2.2/libtool
deleted file mode 100755
index 4a796bd724..0000000000
--- a/voip/libosip2-2.2.2/libtool
+++ /dev/null
@@ -1,7192 +0,0 @@
-#! /bin/bash
-
-# libtoolT - Provide generalized library-building support services.
-# Generated automatically by (GNU libosip2 2.2.2)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED="/bin/sed"
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="/bin/sed -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=" CXX"
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host gaillac:
-
-# Shell to use when invoking shell scripts.
-SHELL="/bin/bash"
-
-# Whether or not to build shared libraries.
-build_libtool_libs=no
-
-# Whether or not to build static libraries.
-build_old_libs=yes
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=yes
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
-
-# Whether or not to optimize for fast installation.
-fast_install=needless
-
-# The host system.
-host_alias=arm-uclinux
-host=arm-unknown-uclinux
-host_os=uclinux
-
-# The build system.
-build_alias=
-build=i686-pc-linux-gnu
-build_os=linux-gnu
-
-# An echo program that does not interpret backslashes.
-echo="echo"
-
-# The archiver.
-AR="arm-uclinux-ar"
-AR_FLAGS="cru"
-
-# A C compiler.
-LTCC="arm-uclinux-gcc"
-
-# LTCC compiler flags.
-LTCFLAGS="-msoft-float -march=armv5"
-
-# A language-specific compiler.
-CC="arm-uclinux-gcc"
-
-# Is the compiler the GNU C compiler?
-with_gcc=yes
-
-# An ERE matcher.
-EGREP="grep -E"
-
-# The linker used to build libraries.
-LD="/usr/share/toolchains/arm-uclinux/arm-uclinux/bin/ld"
-
-# Whether we need hard or soft links.
-LN_S="ln -s"
-
-# A BSD-compatible nm program.
-NM="/usr/share/toolchains/arm-uclinux/bin/arm-uclinux-nm -B"
-
-# A symbol stripping program
-STRIP="arm-uclinux-strip"
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=file
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="dlltool"
-
-# Used on cygwin: object dumper.
-OBJDUMP="objdump"
-
-# Used on cygwin: assembler.
-AS="as"
-
-# The name of the directory that contains temporary libtool files.
-objdir=.libs
-
-# How to create reloadable object files.
-reload_flag=" -r"
-reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
-
-# How to pass a linker flag through the compiler.
-wl="-Wl,"
-
-# Object file suffix (normally "o").
-objext="o"
-
-# Old archive suffix (normally "a").
-libext="a"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='.so'
-
-# Executable file suffix (normally "").
-exeext=""
-
-# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
-pic_mode=default
-
-# What is the maximum length of a command?
-max_cmd_len=32768
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
-
-# Must we lock files when doing compilation?
-need_locks="no"
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=unknown
-
-# Do we need a version for libraries?
-need_version=unknown
-
-# Whether dlopen is supported.
-dlopen_support=unknown
-
-# Whether dlopen of programs is supported.
-dlopen_self=unknown
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=unknown
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=""
-
-# Library versioning type.
-version_type=none
-
-# Format of library name prefix.
-libname_spec="lib\$name"
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=""
-
-# The coded name of the library, if different from the real name.
-soname_spec=""
-
-# Commands used to build and install an old-style archive.
-RANLIB="arm-uclinux-ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
-old_postuninstall_cmds=""
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=""
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=""
-
-# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
-postinstall_cmds=""
-postuninstall_cmds=""
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=""
-module_expsym_cmds=""
-
-# Commands to strip libraries.
-old_striplib="arm-uclinux-strip --strip-debug"
-striplib="arm-uclinux-strip --strip-unneeded"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=""
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=""
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=""
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="unknown"
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=""
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=""
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=""
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
-
-# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
-
-# This is the shared library path variable.
-shlibpath_var=
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=unknown
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=immediate
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=no
-
-# Flag to hardcode $libdir into a binary during linking.
-# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
-
-# If ld is used when linking, flag to hardcode $libdir into
-# a binary during linking. This must work even if $libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=""
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=""
-
-# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=no
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=no
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=unsupported
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=no
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=unknown
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/ /usr/lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/"
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-# Fix the shell variable $srcfile for the compiler.
-fix_srcfile_path=""
-
-# Set to yes if exported symbols are required.
-always_export_symbols=no
-
-# The commands to list exported symbols.
-export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=""
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-
-# Symbols that must always be exported.
-include_expsyms=""
-
-# ### END LIBTOOL CONFIG
-
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="1.5.20 Debian 1.5.20-2"
-TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- SP2NL='tr \040 \012'
- NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- SP2NL='tr \100 \n'
- NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- $echo "$modename: not configured to build any kind of library" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
- $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $echo $win32_libid_type
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- CC_quoted="$CC_quoted $arg"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit $EXIT_FAILURE
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
-
- $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
- $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
- exit $EXIT_FAILURE
- fi
-}
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
- my_status=""
-
- $show "${rm}r $my_gentop"
- $run ${rm}r "$my_gentop"
- $show "$mkdir $my_gentop"
- $run $mkdir "$my_gentop"
- my_status=$?
- if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
- exit $my_status
- fi
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
-
- $show "${rm}r $my_xdir"
- $run ${rm}r "$my_xdir"
- $show "$mkdir $my_xdir"
- $run $mkdir "$my_xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$my_xdir"; then
- exit $status
- fi
- case $host in
- *-darwin*)
- $show "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- if test -z "$run"; then
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
- darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
- if test -n "$darwin_arches"; then
- darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- $show "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we have a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- lipo -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- ${rm}r unfat-$$
- cd "$darwin_orig_dir"
- else
- cd "$darwin_orig_dir"
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- fi # $run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
- func_extract_archives_result="$my_oldobjs"
-}
-# End of Shell function definitions
-#####################################
-
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
- arg="$1"
- shift
-
- case $arg in
- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- execute_dlfiles)
- execute_dlfiles="$execute_dlfiles $arg"
- ;;
- tag)
- tagname="$arg"
- preserve_args="${preserve_args}=$arg"
-
- # Check whether tagname contains only valid characters
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- $echo "$progname: invalid tag name: $tagname" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $tagname in
- CC)
- # Don't test for the "default" C tag, as we know, it's there, but
- # not specially marked.
- ;;
- *)
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
- taglist="$taglist $tagname"
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
- else
- $echo "$progname: ignoring unknown tag $tagname" 1>&2
- fi
- ;;
- esac
- ;;
- *)
- eval "$prev=\$arg"
- ;;
- esac
-
- prev=
- prevopt=
- continue
- fi
-
- # Have we seen a non-optional argument yet?
- case $arg in
- --help)
- show_help=yes
- ;;
-
- --version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- exit $?
- ;;
-
- --config)
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
- done
- exit $?
- ;;
-
- --debug)
- $echo "$progname: enabling shell trace mode"
- set -x
- preserve_args="$preserve_args $arg"
- ;;
-
- --dry-run | -n)
- run=:
- ;;
-
- --features)
- $echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- $echo "enable shared libraries"
- else
- $echo "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $echo "enable static libraries"
- else
- $echo "disable static libraries"
- fi
- exit $?
- ;;
-
- --finish) mode="finish" ;;
-
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
-
- --preserve-dup-deps) duplicate_deps="yes" ;;
-
- --quiet | --silent)
- show=:
- preserve_args="$preserve_args $arg"
- ;;
-
- --tag) prevopt="--tag" prev=tag ;;
- --tag=*)
- set tag "$optarg" ${1+"$@"}
- shift
- prev=tag
- preserve_args="$preserve_args --tag"
- ;;
-
- -dlopen)
- prevopt="-dlopen"
- prev=execute_dlfiles
- ;;
-
- -*)
- $echo "$modename: unrecognized option \`$arg'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
-
- *)
- nonopt="$arg"
- break
- ;;
- esac
-done
-
-if test -n "$prevopt"; then
- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
-fi
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
- # Infer the operation mode.
- if test -z "$mode"; then
- $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
- $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
- case $nonopt in
- *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
- mode=link
- for arg
- do
- case $arg in
- -c)
- mode=compile
- break
- ;;
- esac
- done
- ;;
- *db | *dbx | *strace | *truss)
- mode=execute
- ;;
- *install*|cp|mv)
- mode=install
- ;;
- *rm)
- mode=uninstall
- ;;
- *)
- # If we have no mode, but dlfiles were specified, then do execute mode.
- test -n "$execute_dlfiles" && mode=execute
-
- # Just use the default operation mode.
- if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
- fi
- ;;
- esac
- fi
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$modename --help --mode=$mode' for more information."
-
- # These modes are in order of execution frequency so that they run quickly.
- case $mode in
- # libtool compile mode
- compile)
- modename="$modename: compile"
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- if test -n "$libobj" ; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit $EXIT_FAILURE
- fi
- arg_mode=target
- continue
- ;;
-
- -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
-
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
- done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- * )
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
- case $lastarg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, and some SunOS ksh mistreat backslash-escaping
- # in scan sets (worked around with variable expansion),
- # and furthermore cannot handle '|' '&' '(' ')' in scan sets
- # at all, so we specify them separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- lastarg="\"$lastarg\""
- ;;
- esac
-
- base_compile="$base_compile $lastarg"
- done # for arg
-
- case $arg_mode in
- arg)
- $echo "$modename: you must specify an argument for -Xcompile"
- exit $EXIT_FAILURE
- ;;
- target)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit $EXIT_FAILURE
- ;;
- *)
- # Get the name of the library object.
- [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSifmso]'
- case $libobj in
- *.ada) xform=ada ;;
- *.adb) xform=adb ;;
- *.ads) xform=ads ;;
- *.asm) xform=asm ;;
- *.c++) xform=c++ ;;
- *.cc) xform=cc ;;
- *.ii) xform=ii ;;
- *.class) xform=class ;;
- *.cpp) xform=cpp ;;
- *.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
- *.for) xform=for ;;
- *.java) xform=java ;;
- esac
-
- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
- case $libobj in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
- *)
- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
- case $qlibobj in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qlibobj="\"$qlibobj\"" ;;
- esac
- test "X$libobj" != "X$qlibobj" \
- && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir=
- else
- xdir=$xdir/
- fi
- lobj=${xdir}$objdir/$objname
-
- if test -z "$base_compile"; then
- $echo "$modename: you must specify a compilation command" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- $run $rm $removelist
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
- $show "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
- $echo "$srcfile" > "$lockfile"
- fi
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
- case $qsrcfile in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qsrcfile="\"$qsrcfile\"" ;;
- esac
-
- $run $rm "$libobj" "${libobj}T"
-
- # Create a libtool object file (analogous to a ".la" file),
- # but don't create it if we're doing a dry run.
- test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- if test ! -d "${xdir}$objdir"; then
- $show "$mkdir ${xdir}$objdir"
- $run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
- fi
- fi
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- $run $rm "$lobj" "$output_obj"
-
- $show "$command"
- if $run eval "$command"; then :
- else
- test -n "$output_obj" && $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- $show "$mv $output_obj $lobj"
- if $run $mv $output_obj $lobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Append the name of the PIC object to the libtool object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- else
- # No PIC object so indicate it doesn't exist in the libtool
- # object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- $run $rm "$obj" "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $run $rm $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- $show "$mv $output_obj $obj"
- if $run $mv $output_obj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
- else
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
- fi
-
- $run $mv "${libobj}T" "${libobj}"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- # libtool link mode
- link | relink)
- modename="$modename: link"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args="$nonopt"
- base_compile="$nonopt $@"
- compile_command="$nonopt"
- finalize_command="$nonopt"
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
-
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- else
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- fi
- build_libtool_libs=no
- build_old_libs=yes
- prefer_static_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
- ;;
- *) qarg=$arg ;;
- esac
- libtool_args="$libtool_args $qarg"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- if test ! -f "$arg"; then
- $echo "$modename: symbol file \`$arg' does not exist"
- exit $EXIT_FAILURE
- fi
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat $save_arg`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$pic_object" || \
- test -z "$non_pic_object" ||
- test "$pic_object" = none && \
- test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- fi
- else
- # Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- fi
- done
- else
- $echo "$modename: link input file \`$save_arg' does not exist"
- exit $EXIT_FAILURE
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$finalize_command $wl$qarg"
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- darwin_framework)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- prev=
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
- continue
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: more than one -exported-symbols argument is not allowed"
- exit $EXIT_FAILURE
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework|-arch)
- prev=darwin_framework
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
- fi
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-mingw* | *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs -framework System"
- continue
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- -model)
- compile_command="$compile_command $arg"
- compiler_flags="$compiler_flags $arg"
- finalize_command="$finalize_command $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m* pass through architecture-specific compiler args for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
-
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -static)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Wl,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $wl$flag"
- linker_flags="$linker_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- # If there is no directory component, then add one.
- case $arg in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$pic_object" || \
- test -z "$non_pic_object" ||
- test "$pic_object" = none && \
- test "$non_pic_object" = none; then
- $echo "$modename: cannot find name of object for \`$arg'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- fi
- else
- # Only an error if not doing a dry-run.
- if test -z "$run"; then
- $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
- exit $EXIT_FAILURE
- else
- # Dry-run case.
-
- # Extract subdirectory from the argument.
- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$arg"; then
- xdir=
- else
- xdir="$xdir/"
- fi
-
- pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
- done # argument parsing loop
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$output_objdir" = "X$output"; then
- output_objdir="$objdir"
- else
- output_objdir="$output_objdir/$objdir"
- fi
- # Create the object directory.
- if test ! -d "$output_objdir"; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
- fi
- fi
-
- # Determine the type of output
- case $output in
- "")
- $echo "$modename: you must specify an output file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- case $host in
- *cygwin* | *mingw* | *pw32*)
- # don't eliminate duplications in $postdeps and $predeps
- duplicate_compiler_generated_deps=yes
- ;;
- *)
- duplicate_compiler_generated_deps=$duplicate_deps
- ;;
- esac
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
- case $linkmode in
- lib)
- passes="conv link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
- for pass in $passes; do
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
- esac
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
- continue
- fi
- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if (${SED} -e '2q' $lib |
- grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- library_names=
- old_library=
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- ;;
- *)
- $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- if eval $echo \"$deplib\" 2>/dev/null \
- | $SED 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $echo
- $echo "*** Warning: Trying to link with static lib archive $deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because the file extensions .$libext of this argument makes me believe"
- $echo "*** that it is just a static archive that I should not used here."
- else
- $echo
- $echo "*** Warning: Linking the shared library $output against the"
- $echo "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
- if test "$found" = yes || test -f "$lib"; then :
- else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
-
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- $echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit $EXIT_FAILURE
- fi
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
- abs_ladir="$ladir"
- fi
- ;;
- esac
- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- $echo "$modename: warning: library \`$lib' was moved." 1>&2
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit $EXIT_FAILURE
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $absdir" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- # This is a shared library
-
- # Warn about portability, can't link against -module's on
- # some systems (darwin)
- if test "$shouldnotlink" = yes && test "$pass" = link ; then
- $echo
- if test "$linkmode" = prog; then
- $echo "*** Warning: Linking the executable $output against the loadable module"
- else
- $echo "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $echo "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- realname="$2"
- shift; shift
- libname=`eval \\$echo \"$libname_spec\"`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw*)
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
- newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- $show "extracting exported symbol list from \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$extract_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- $show "generating import library for \`$soname'"
- save_ifs="$IFS"; IFS='~'
- cmds=$old_archive_from_expsyms_cmds
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a module then we can not link against
- # it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
- $echo "** Warning, lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $echo
- $echo "** And there doesn't seem to be a static archive available"
- $echo "** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit $EXIT_FAILURE
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $echo
- $echo "*** Warning: This system can not link to static lib archive $lib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $echo "*** But as you try to build a module library, libtool will still create "
- $echo "*** a static module, that should work as long as the dlopening application"
- $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$deplib" && dir="."
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
- absdir="$dir"
- fi
- ;;
- esac
- if grep "^installed=no" $deplib > /dev/null; then
- path="$absdir/$objdir"
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
- fi
- path="$absdir"
- fi
- depdepl=
- case $host in
- *-*-darwin*)
- # we do not want to link against static libs,
- # but need to link against shared
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$path/$depdepl" ; then
- depdepl="$path/$depdepl"
- fi
- # do not add paths which are already there
- case " $newlib_search_path " in
- *" $path "*) ;;
- *) newlib_search_path="$newlib_search_path $path";;
- esac
- fi
- path=""
- ;;
- *)
- path="-L$path"
- ;;
- esac
- ;;
- -l*)
- case $host in
- *-*-darwin*)
- # Again, we only want to link against shared libraries
- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
- for tmp in $newlib_search_path ; do
- if test -f "$tmp/lib$tmp_libs.dylib" ; then
- eval depdepl="$tmp/lib$tmp_libs.dylib"
- break
- fi
- done
- path=""
- ;;
- *) continue ;;
- esac
- ;;
- *) continue ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
- fi
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
- fi
-
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
- fi
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- if test "$module" = no; then
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit $EXIT_FAILURE
- else
- $echo
- $echo "*** Warning: Linking the shared library $output against the non-libtool"
- $echo "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- if test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
- fi
-
- set dummy $rpath
- if test "$#" -gt 2; then
- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
- fi
- install_libdir="$2"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
- fi
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- IFS="$save_ifs"
-
- if test -n "$8"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$2"
- number_minor="$3"
- number_revision="$4"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows)
- current=`expr $number_major + $number_minor`
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
- age="$number_minor"
- revision="$number_minor"
- ;;
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- ;;
- no)
- current="$2"
- revision="$3"
- age="$4"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current";
- ;;
-
- irix | nonstopux)
- major=`expr $current - $age + 1`
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- iface=`expr $revision - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- major=.`expr $current - $age`
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
-
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
- fi
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$echo "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- if test -n "$removelist"; then
- $show "${rm}r $removelist"
- $run ${rm}r $removelist
- fi
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
- done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs -framework System"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $rm conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $rm conftest
- $LTCC -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which I believe you do not have"
- $echo "*** because a test_compile did reveal that the linker did not use it for"
- $echo "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- $rm conftest
- $LTCC -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning: dynamic linker does not accept needed library $i."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because a test_compile did reveal that the linker did not use this one"
- $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $echo
- $echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
- $echo "*** library that it depends on before this library will be fully"
- $echo "*** functional. Installing it before continuing would be even better."
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method
- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null \
- | grep " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval $echo \"$potent_lib\" 2>/dev/null \
- | ${SED} 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $echo
- $echo "*** Warning: linker path does not have real file for library $a_deplib."
- $echo "*** I have the capability to make that library automatically link in when"
- $echo "*** you link to this library. But I can only do this if you have a"
- $echo "*** shared version of the library, which you do not appear to have"
- $echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $echo "*** with $libname and none of the candidates passed a file format test"
- $echo "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
- done
- fi
- if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
- | grep . >/dev/null; then
- $echo
- if test "X$deplibs_check_method" = "Xnone"; then
- $echo "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $echo "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $echo "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $echo
- $echo "*** Warning: libtool could not satisfy all declared inter-library"
- $echo "*** dependencies of module $libname. Therefore, libtool will create"
- $echo "*** a static module, that should work as long as the dlopening"
- $echo "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $echo
- $echo "*** However, this would only work if libtool was able to extract symbol"
- $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $echo "*** not find such a program. So, this module is probably useless."
- $echo "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $echo "*** The inter-library dependencies that have been dropped here will be"
- $echo "*** automatically added whenever a program is linked with this library"
- $echo "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $echo
- $echo "*** Since this library must not contain undefined symbols,"
- $echo "*** because either the platform does not support them or"
- $echo "*** it was explicitly requested with -no-undefined,"
- $echo "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- realname="$2"
- shift; shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- if len=`expr "X$cmd" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- $show "$cmd"
- $run eval "$cmd" || exit $?
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- $show "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- $run eval '$mv "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise.
- $echo "creating reloadable object files..."
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$echo "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- delfiles=
- last_robj=
- k=1
- output=$output_objdir/$output_la-${k}.$objext
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- eval test_cmds=\"$reload_cmds $objlist $last_robj\"
- if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; }; then
- objlist="$objlist $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- k=`expr $k + 1`
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- len=1
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
- if ${skipped_export-false}; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
- fi
-
- # Set up a command to remove the reloadable object files
- # after they are used.
- i=0
- while test "$i" -lt "$k"
- do
- i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
- done
-
- $echo "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
-
- # Append the command to remove the reloadable object files
- # to the just-reset $cmds.
- eval cmds=\"\$cmds~\$rm $delfiles\"
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
- fi
-
- case $output in
- *.lo)
- if test -n "$objs$old_deplibs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit $EXIT_FAILURE
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $run $rm $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $run eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- cmds=$reload_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
- esac
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
- fi
-
- if test "$preload" = yes; then
- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
- test "$dlopen_self_static" = unknown; then
- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
- fi
- fi
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- ;;
- esac
-
- case $host in
- *darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- if test "$tagname" = CXX ; then
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- fi
- ;;
- esac
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${outputname}S.c"
- else
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
- fi
- fi
-
- if test -n "$dlsyms"; then
- case $dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${outputname}.nm"
-
- $show "$rm $nlist ${nlist}S ${nlist}T"
- $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
- # Parse the name list into a source file.
- $show "creating $output_objdir/$dlsyms"
-
- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- $show "generating symbol list for \`$output'"
-
- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- if test -n "$export_symbols_regex"; then
- $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- else
- $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- $run eval 'mv "$nlist"T "$nlist"'
- fi
- fi
-
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
- $run eval '$echo ": $name " >> "$nlist"'
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -z "$run"; then
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $mv "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- grep -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
- else
- $echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
-
- $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
- case $host in
- *cygwin* | *mingw* )
- $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs */
-struct {
-"
- ;;
- * )
- $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
- ;;
- esac
-
-
- $echo >> "$output_objdir/$dlsyms" "\
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
- $echo >> "$output_objdir/$dlsyms" "\
- {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- fi
-
- pic_flag_for_symtable=
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
- esac;;
- *-*-hpux*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag";;
- esac
- esac
-
- # Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
- # Clean up the generated files.
- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- ;;
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- $show "$link_command"
- $run eval "$link_command"
- status=$?
-
- # Delete the generated files.
- if test -n "$dlsyms"; then
- $show "$rm $output_objdir/${outputname}S.${objext}"
- $run $rm "$output_objdir/${outputname}S.${objext}"
- fi
-
- exit $status
- fi
-
- if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $run $rm $output
- # Link the executable and exit
- $show "$link_command"
- $run eval "$link_command" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
- $echo "$modename: \`$output' will be relinked during installation" 1>&2
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- $show "$link_command"
- $run eval "$link_command" || exit $?
-
- # Now create the wrapper script.
- $show "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if our run command is non-null.
- if test -z "$run"; then
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "/bin/sh $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int i;
-
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
- newargz = XMALLOC(char *, argc+2);
-EOF
-
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
-EOF
-
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
- /* we know the script has the same name, without the .exe */
- /* so make sure newargz[1] doesn't end in .exe */
- strendzap(newargz[1],".exe");
- for (i = 1; i < argc; i++)
- newargz[i+1] = xstrdup(argv[i]);
- newargz[argc+1] = NULL;
-EOF
-
- cat >> $cwrappersource <<EOF
- execv("$SHELL",newargz);
-EOF
-
- cat >> $cwrappersource <<"EOF"
- return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
- void * p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-char *
-basename (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return (char *) base;
-}
-
-char *
-fnqualify(const char *path)
-{
- size_t size;
- char *p;
- char tmp[LT_PATHMAX + 1];
-
- assert(path != NULL);
-
- /* Is it qualified already? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
-#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
-
- /* prepend the current directory */
- /* doesn't handle '~' */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert(str != NULL);
- assert(pat != NULL);
-
- len = strlen(str);
- patlen = strlen(pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp(str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
- const char * message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
- $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variable:
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$echo are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- echo=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$echo works!
- :
- else
- # Restart under the correct shell, and then maybe \$echo will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $echo >> $output "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $echo >> $output "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" || \\
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $mkdir \"\$progdir\"
- else
- $rm \"\$progdir/\$file\"
- fi"
-
- $echo >> $output "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $echo \"\$relink_command_output\" >&2
- $rm \"\$progdir/\$file\"
- exit $EXIT_FAILURE
- fi
- fi
-
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $rm \"\$progdir/\$program\";
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $rm \"\$progdir/\$file\"
- fi"
- else
- $echo >> $output "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $echo >> $output "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $echo >> $output "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $echo >> $output "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2*)
- $echo >> $output "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $echo >> $output "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- exit $EXIT_FAILURE
- fi
- else
- # The program doesn't exist.
- \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$echo \"This script is just a wrapper for \$program.\" 1>&2
- $echo \"See the $PACKAGE documentation for more information.\" 1>&2
- exit $EXIT_FAILURE
- fi
-fi\
-"
- chmod +x $output
- fi
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "copying selected object files to avoid basename conflicts..."
-
- if test -z "$gentop"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- fi
-
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- counter=`expr $counter + 1`
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- $run ln "$obj" "$gentop/$newobj" ||
- $run cp "$obj" "$gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
-
- eval cmds=\"$old_archive_cmds\"
-
- if len=`expr "X$cmds" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- $echo "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
-
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- for obj in $save_oldobjs
- do
- oldobjs="$objlist $obj"
- objlist="$objlist $obj"
- eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- eval cmd=\"$cmd\"
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$generated"; then
- $show "${rm}r$generated"
- $run ${rm}r$generated
- fi
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- $show "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
-
- # Only create the output if not a dry run.
- if test -z "$run"; then
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
- for lib in $dlfiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlfiles="$newdlfiles $libdir/$name"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit $EXIT_FAILURE
- fi
- newdlprefiles="$newdlprefiles $libdir/$name"
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $rm $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $echo >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- fi
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
- ;;
- esac
- exit $EXIT_SUCCESS
- ;;
-
- # libtool install mode
- install)
- modename="$modename: install"
-
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | grep shtool > /dev/null; then
- # Aesthetically quote it.
- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$arg "
- arg="$1"
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog$arg"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o) prev=$arg ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
- done
-
- if test -z "$install_prog"; then
- $echo "$modename: you must specify an install program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prev' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -z "$files"; then
- if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
- else
- $echo "$modename: you must specify a destination" 1>&2
- fi
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Strip any trailing slash from the destination.
- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
- test "X$destdir" = "X$dest" && destdir=.
- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files
- if test "$#" -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- library_names=
- old_library=
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- if test "$inst_prefix_dir" = "$destdir"; then
- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
- exit $EXIT_FAILURE
- fi
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
- fi
-
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- exit $EXIT_FAILURE
- fi
- fi
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run eval "$striplib $destdir/$realname" || exit $?
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- if test "$linkname" != "$realname"; then
- $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
- fi
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- cmds=$postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- file=`$echo $file|${SED} 's,.exe$,,'`
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin*|*mingw*)
- wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
- notinst_deplibs=
- relink_command=
-
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
- exit $EXIT_FAILURE
- fi
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- relink_command=
- # Note that it is not necessary on cygwin/mingw to append a dot to
- # foo even if both foo and FILE.exe exist: automatic-append-.exe
- # behavior happens only for exec(3), not for open(2)! Also, sourcing
- # `FILE.' does not work on cygwin managed mounts.
- #
- # If there is no directory component, then add one.
- case $wrapper in
- */* | *\\*) . ${wrapper} ;;
- *) . ./${wrapper} ;;
- esac
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
- file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- ${rm}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- $echo "$modename: warning: cannot relink \`$file'" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
- ;;
- esac
- ;;
- esac
- $show "$install_prog$stripme $file $destfile"
- $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
- test -n "$outputname" && ${rm}r "$tmpdir"
- ;;
- esac
- done
-
- for file in $staticlibs; do
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- $show "$install_prog $file $oldlib"
- $run eval "$install_prog \$file \$oldlib" || exit $?
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- $show "$old_striplib $oldlib"
- $run eval "$old_striplib $oldlib" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- cmds=$old_postinstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$future_libdirs"; then
- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
- fi
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
- ;;
-
- # libtool finish mode
- finish)
- modename="$modename: finish"
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- cmds=$finish_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
- $cmd"
- done
- IFS="$save_ifs"
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $run eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- test "$show" = : && exit $EXIT_SUCCESS
-
- $echo "----------------------------------------------------------------------"
- $echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- $echo " $libdir"
- done
- $echo
- $echo "If you ever happen to want to link against installed libraries"
- $echo "in a given directory, LIBDIR, you must either use libtool, and"
- $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $echo " during execution"
- fi
- if test -n "$runpath_var"; then
- $echo " - add LIBDIR to the \`$runpath_var' environment variable"
- $echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $echo
- $echo "See any operating system documentation about shared libraries for"
- $echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
- exit $EXIT_SUCCESS
- ;;
-
- # libtool execute mode
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- if test -z "$cmd"; then
- $echo "$modename: you must specify a COMMAND" 1>&2
- $echo "$help"
- exit $EXIT_FAILURE
- fi
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- if test ! -f "$file"; then
- $echo "$modename: \`$file' is not a file" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Read the libtool library.
- dlname=
- library_names=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
- ;;
-
- *)
- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
- args="$args \"$file\""
- done
-
- if test -z "$run"; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
- $echo "export $shlibpath_var"
- fi
- $echo "$cmd$args"
- exit $EXIT_SUCCESS
- fi
- ;;
-
- # libtool clean and uninstall mode
- clean | uninstall)
- modename="$modename: $mode"
- rm="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) rm="$rm $arg"; rmforce=yes ;;
- -*) rm="$rm $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- if test -z "$rm"; then
- $echo "$modename: you must specify an RM program" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$file"; then
- dir=.
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if (test -L "$file") >/dev/null 2>&1 \
- || (test -h "$file") >/dev/null 2>&1 \
- || test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-
- if test "$mode" = uninstall; then
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- cmds=$postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- cmds=$old_postuninstall_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $show "$cmd"
- $run eval "$cmd"
- if test "$?" -ne 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
- # FIXME: should reinstall the best remaining shared library.
- fi
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
- # Read the .lo file
- . $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" \
- && test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" \
- && test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- file=`$echo $file|${SED} 's,.exe$,,'`
- noexename=`$echo $name|${SED} 's,.exe$,,'`
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$noexename
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- $show "$rm $rmfiles"
- $run $rm $rmfiles || exit_status=1
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- $show "rmdir $dir"
- $run rmdir $dir >/dev/null 2>&1
- fi
- done
-
- exit $exit_status
- ;;
-
- "")
- $echo "$modename: you must specify a MODE" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- ;;
- esac
-
- if test -z "$exec_cmd"; then
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit $EXIT_FAILURE
- fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
- eval exec $exec_cmd
- exit $EXIT_FAILURE
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
- --config show all configuration variables
- --debug enable verbose shell tracing
--n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --finish same as \`--mode=finish'
- --help display this help message and exit
- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
- --quiet same as \`--silent'
- --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- --version print version information
-
-MODE must be one of the following:
-
- clean remove files from the build directory
- compile compile a source file into a libtool object
- execute automatically set library path, then run a program
- finish complete the installation of libtool libraries
- install install libraries or executables
- link create a library or an executable
- uninstall remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
- exit $EXIT_SUCCESS
- ;;
-
-clean)
- $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
-compile)
- $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -static always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
-execute)
- $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
-finish)
- $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
-install)
- $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
-link)
- $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
-uninstall)
- $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
-*)
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$help" 1>&2
- exit $EXIT_FAILURE
- ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# Libtool was configured on host gaillac:
-
-# Shell to use when invoking shell scripts.
-SHELL="/bin/bash"
-
-# Whether or not to build shared libraries.
-build_libtool_libs=no
-
-# Whether or not to build static libraries.
-build_old_libs=yes
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=no
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
-
-# Whether or not to optimize for fast installation.
-fast_install=needless
-
-# The host system.
-host_alias=arm-uclinux
-host=arm-unknown-uclinux
-host_os=uclinux
-
-# The build system.
-build_alias=
-build=i686-pc-linux-gnu
-build_os=linux-gnu
-
-# An echo program that does not interpret backslashes.
-echo="echo"
-
-# The archiver.
-AR="arm-uclinux-ar"
-AR_FLAGS="cru"
-
-# A C compiler.
-LTCC="arm-uclinux-gcc"
-
-# LTCC compiler flags.
-LTCFLAGS="-msoft-float -march=armv5"
-
-# A language-specific compiler.
-CC="arm-uclinux-g++"
-
-# Is the compiler the GNU C compiler?
-with_gcc=yes
-
-# An ERE matcher.
-EGREP="grep -E"
-
-# The linker used to build libraries.
-LD="/usr/share/toolchains/arm-uclinux/arm-uclinux/bin/ld"
-
-# Whether we need hard or soft links.
-LN_S="ln -s"
-
-# A BSD-compatible nm program.
-NM="/usr/share/toolchains/arm-uclinux/bin/arm-uclinux-nm -B"
-
-# A symbol stripping program
-STRIP="arm-uclinux-strip"
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=file
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="dlltool"
-
-# Used on cygwin: object dumper.
-OBJDUMP="objdump"
-
-# Used on cygwin: assembler.
-AS="as"
-
-# The name of the directory that contains temporary libtool files.
-objdir=.libs
-
-# How to create reloadable object files.
-reload_flag=" -r"
-reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
-
-# How to pass a linker flag through the compiler.
-wl="-Wl,"
-
-# Object file suffix (normally "o").
-objext="o"
-
-# Old archive suffix (normally "a").
-libext="a"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='.so'
-
-# Executable file suffix (normally "").
-exeext=""
-
-# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
-pic_mode=default
-
-# What is the maximum length of a command?
-max_cmd_len=32768
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
-
-# Must we lock files when doing compilation?
-need_locks="no"
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=unknown
-
-# Do we need a version for libraries?
-need_version=unknown
-
-# Whether dlopen is supported.
-dlopen_support=unknown
-
-# Whether dlopen of programs is supported.
-dlopen_self=unknown
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=unknown
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=""
-
-# Library versioning type.
-version_type=none
-
-# Format of library name prefix.
-libname_spec="lib\$name"
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=""
-
-# The coded name of the library, if different from the real name.
-soname_spec=""
-
-# Commands used to build and install an old-style archive.
-RANLIB="arm-uclinux-ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
-old_postuninstall_cmds=""
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=""
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=""
-
-# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
-postinstall_cmds=""
-postuninstall_cmds=""
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=""
-module_expsym_cmds=""
-
-# Commands to strip libraries.
-old_striplib="arm-uclinux-strip --strip-debug"
-striplib="arm-uclinux-strip --strip-unneeded"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects="/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float/crt1.o /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float/crti.o crtbeginS.o"
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects="crtendS.o /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float/crtn.o"
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=""
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps="-lstdc++ -lm -lgcc -lc -lgcc"
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path="-L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4 -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/armv5/msoft-float -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4 -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float -L/usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/armv5/msoft-float -L/usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib"
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="unknown"
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=""
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=""
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=""
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
-
-# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
-
-# This is the shared library path variable.
-shlibpath_var=
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=unknown
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=immediate
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=no
-
-# Flag to hardcode $libdir into a binary during linking.
-# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
-
-# If ld is used when linking, flag to hardcode $libdir into
-# a binary during linking. This must work even if $libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=""
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=""
-
-# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=no
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=no
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=unsupported
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=no
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=unknown
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/ /usr/lib/gcc/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/share/toolchains/arm-uclinux/bin/../lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/arm-uclinux/3.4.4/ /usr/local/toolchains/arm-uclinux/lib/gcc/arm-uclinux/3.4.4/../../../../arm-uclinux/lib/"
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-
-# Fix the shell variable $srcfile for the compiler.
-fix_srcfile_path=""
-
-# Set to yes if exported symbols are required.
-always_export_symbols=no
-
-# The commands to list exported symbols.
-export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=""
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=""
-
-# Symbols that must always be exported.
-include_expsyms=""
-
-# ### END LIBTOOL TAG CONFIG: CXX
-
diff --git a/voip/libosip2-2.2.2/platform/Makefile.in b/voip/libosip2-2.2.2/platform/Makefile.in
index e003299024..937a4eb529 100644
--- a/voip/libosip2-2.2.2/platform/Makefile.in
+++ b/voip/libosip2-2.2.2/platform/Makefile.in
@@ -92,6 +92,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -121,6 +122,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -129,15 +131,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -152,23 +148,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/platform/rpm/Makefile.in b/voip/libosip2-2.2.2/platform/rpm/Makefile.in
index f64c9bb952..ae04876bc3 100644
--- a/voip/libosip2-2.2.2/platform/rpm/Makefile.in
+++ b/voip/libosip2-2.2.2/platform/rpm/Makefile.in
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/platform/vsnet/Makefile.in b/voip/libosip2-2.2.2/platform/vsnet/Makefile.in
index 3253d5271f..224ae3a128 100644
--- a/voip/libosip2-2.2.2/platform/vsnet/Makefile.in
+++ b/voip/libosip2-2.2.2/platform/vsnet/Makefile.in
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/platform/windows/Makefile.in b/voip/libosip2-2.2.2/platform/windows/Makefile.in
index 9e5e973831..81c90dbe09 100644
--- a/voip/libosip2-2.2.2/platform/windows/Makefile.in
+++ b/voip/libosip2-2.2.2/platform/windows/Makefile.in
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/scripts/Makefile.in b/voip/libosip2-2.2.2/scripts/Makefile.in
index 2d6f2d8e2e..947c10db7f 100644
--- a/voip/libosip2-2.2.2/scripts/Makefile.in
+++ b/voip/libosip2-2.2.2/scripts/Makefile.in
@@ -85,6 +85,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -114,6 +115,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -122,15 +124,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -145,23 +141,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/scripts/config.guess b/voip/libosip2-2.2.2/scripts/config.guess
index ad5281e66e..34093cc6bb 100644..100755
--- a/voip/libosip2-2.2.2/scripts/config.guess
+++ b/voip/libosip2-2.2.2/scripts/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-08-03'
+timestamp='2007-07-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -160,6 +178,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -206,8 +225,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +347,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -764,12 +786,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -779,9 +808,15 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -815,25 +850,28 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
@@ -851,8 +889,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,17 +912,21 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo or32-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -893,34 +939,40 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -935,20 +987,22 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -964,7 +1018,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -974,7 +1028,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1176,6 +1234,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1185,7 +1252,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1264,6 +1330,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/voip/libosip2-2.2.2/scripts/config.sub b/voip/libosip2-2.2.2/scripts/config.sub
index 1c366dfde9..63cdd0a35d 100644..100755
--- a/voip/libosip2-2.2.2/scripts/config.sub
+++ b/voip/libosip2-2.2.2/scripts/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2007-06-28'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,31 +349,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -463,8 +475,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -671,6 +683,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -678,6 +694,24 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -696,6 +730,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +840,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +902,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -885,6 +932,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -896,6 +947,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1101,7 +1155,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1228,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1340,6 +1396,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1349,9 +1411,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1377,6 +1439,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
diff --git a/voip/libosip2-2.2.2/scripts/ltmain.sh b/voip/libosip2-2.2.2/scripts/ltmain.sh
index db4982d8a9..d74b5a67af 100755..100644
--- a/voip/libosip2-2.2.2/scripts/ltmain.sh
+++ b/voip/libosip2-2.2.2/scripts/ltmain.sh
@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="1.5.20 Debian 1.5.20-2"
-TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+VERSION=1.5.24
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -105,12 +113,14 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -132,13 +142,54 @@ run=
show="$echo"
show_help=
execute_dlfiles=
+duplicate_deps=no
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
# This seems to be the best place for them
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $mkdir "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || {
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+ exit $EXIT_FAILURE
+ }
+ fi
+
+ $echo "X$my_tmpdir" | $Xsed
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
@@ -157,12 +208,17 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
+ $SED -n -e '1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
fi
;;
*DLL*)
@@ -219,7 +275,21 @@ func_infer_tag ()
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -289,15 +359,25 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$my_xdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $exit_status
fi
case $host in
*-darwin*)
@@ -352,6 +432,8 @@ func_extract_archives ()
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
+disable_libs=no
+
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -414,11 +496,12 @@ do
;;
--version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
@@ -468,7 +551,11 @@ do
preserve_args="$preserve_args $arg"
;;
- --tag) prevopt="--tag" prev=tag ;;
+ --tag)
+ prevopt="--tag"
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
@@ -500,6 +587,18 @@ if test -n "$prevopt"; then
exit $EXIT_FAILURE
fi
+case $disable_libs in
+no)
+ ;;
+shared)
+ build_libtool_libs=no
+ build_old_libs=yes
+ ;;
+static)
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+ ;;
+esac
+
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
@@ -699,9 +798,10 @@ if test -z "$show_help"; then
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
+ *.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -795,7 +895,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -856,9 +956,9 @@ EOF
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $exit_status
fi
fi
@@ -1061,6 +1161,7 @@ EOF
no_install=no
objs=
non_pic_objects=
+ notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -1081,22 +1182,32 @@ EOF
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- else
+ prefer_static_libs=yes
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -1271,6 +1382,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1354,8 +1470,8 @@ EOF
prev=
continue
;;
- darwin_framework)
- compiler_flags="$compiler_flags $arg"
+ darwin_framework|darwin_framework_skip)
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
@@ -1419,13 +1535,17 @@ EOF
continue
;;
- -framework|-arch)
- prev=darwin_framework
- compiler_flags="$compiler_flags $arg"
+ -framework|-arch|-isysroot)
+ case " $CC " in
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
+ prev=darwin_framework_skip ;;
+ *) compiler_flags="$compiler_flags $arg"
+ prev=darwin_framework ;;
+ esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- continue
- ;;
+ continue
+ ;;
-inst-prefix-dir)
prev=inst_prefix
@@ -1453,7 +1573,8 @@ EOF
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
+ absdir="$dir"
+ notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
@@ -1467,10 +1588,15 @@ EOF
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1479,11 +1605,11 @@ EOF
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
@@ -1495,6 +1621,15 @@ EOF
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
@@ -1518,7 +1653,7 @@ EOF
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@@ -1536,7 +1671,13 @@ EOF
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
@@ -1548,9 +1689,7 @@ EOF
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
+ compiler_flags="$compiler_flags $arg"
continue
;;
@@ -1566,9 +1705,9 @@ EOF
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
+ # and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
@@ -1627,7 +1766,7 @@ EOF
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -1788,6 +1927,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1893,9 +2037,9 @@ EOF
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $exit_status
fi
fi
@@ -1958,7 +2102,6 @@ EOF
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
@@ -1993,10 +2136,7 @@ EOF
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
- link)
- libs="$deplibs %DEPLIBS%"
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
- ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
if test "$pass" = dlopen; then
@@ -2008,7 +2148,7 @@ EOF
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -2197,7 +2337,7 @@ EOF
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
@@ -2404,7 +2544,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -2448,8 +2590,12 @@ EOF
fi
link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes ; then
+ use_static_libs=no
+ fi
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
@@ -2562,11 +2708,15 @@ EOF
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null |
+ $EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
@@ -3092,7 +3242,7 @@ EOF
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3103,14 +3253,10 @@ EOF
age="0"
;;
irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
+ current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
- ;;
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit $EXIT_FAILURE
+ lt_irix_increment=no
;;
esac
;;
@@ -3169,7 +3315,8 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@@ -3183,8 +3330,11 @@ EOF
;;
irix | nonstopux)
- major=`expr $current - $age + 1`
-
+ if test "X$lt_irix_increment" = "Xno"; then
+ major=`expr $current - $age`
+ else
+ major=`expr $current - $age + 1`
+ fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@@ -3321,11 +3471,11 @@ EOF
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
- done
+ #for path in $notinst_path; do
+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ #done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3377,7 +3527,12 @@ EOF
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
;;
*)
# Add libc to deplibs on all other systems if necessary.
@@ -3421,13 +3576,12 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3466,9 +3620,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3500,7 +3652,7 @@ EOF
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -3713,6 +3865,35 @@ EOF
deplibs=$newdeplibs
fi
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3757,7 +3938,10 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ case $archive_cmds in
+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+ esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@@ -3796,6 +3980,7 @@ EOF
fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
@@ -4115,12 +4300,14 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4227,6 +4414,35 @@ EOF
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -4271,10 +4487,15 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -4391,10 +4612,22 @@ extern \"C\" {
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
else
- $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
fi
fi
@@ -4511,16 +4744,29 @@ static const void *lt_preloaded_setup() {
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/${outputname}.def" ; then
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ else
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ ;;
+ esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4533,19 +4779,19 @@ static const void *lt_preloaded_setup() {
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- status=$?
+ exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
@@ -4553,7 +4799,7 @@ static const void *lt_preloaded_setup() {
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $status
+ exit $exit_status
fi
if test -n "$shlibpath_var"; then
@@ -4626,7 +4872,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4663,7 +4909,7 @@ static const void *lt_preloaded_setup() {
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -4693,10 +4939,12 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@@ -4721,6 +4969,9 @@ EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@@ -4731,15 +4982,19 @@ EOF
#endif
#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
#endif
#ifndef DIR_SEPARATOR_2
@@ -4749,17 +5004,32 @@ EOF
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@@ -4769,29 +5039,50 @@ main (int argc, char *argv[])
char **newargz;
int i;
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
EOF
- cat >> $cwrappersource <<EOF
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
+ ;;
+ esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
return 127;
}
@@ -4812,48 +5103,148 @@ xstrdup (const char *string)
;
}
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
}
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
{
- size_t size;
- char *p;
+ int has_slash = 0;
+ const char* p;
+ const char* p_next;
+ /* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char* concat_name;
- assert(path != NULL);
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
- /* Is it qualified already? */
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
+ }
#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
- /* prepend the current directory */
- /* doesn't handle '~' */
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ return NULL;
}
char *
@@ -4897,16 +5288,16 @@ lt_fatal (const char *message, ...)
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -4925,6 +5316,20 @@ EOF
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5051,6 +5456,11 @@ else
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
@@ -5067,7 +5477,7 @@ else
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5136,9 +5546,9 @@ fi\
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+ exit $exit_status
fi
fi
@@ -5253,7 +5663,7 @@ fi\
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5278,9 +5688,53 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5332,6 +5786,10 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5598,9 +6056,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -5805,22 +6263,11 @@ relink_command=\"$relink_command\""
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
+ tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -5940,7 +6387,7 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
@@ -5973,7 +6420,7 @@ relink_command=\"$relink_command\""
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
@@ -6031,8 +6478,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
+ if test ! -f "$dir/$dlname"; then
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
fi
;;
@@ -6096,12 +6545,12 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ fi"
+ done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6190,9 +6639,17 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test "$mode" = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
@@ -6225,7 +6682,8 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
@@ -6449,9 +6907,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6465,9 +6923,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
@@ -6524,12 +6984,11 @@ exit $?
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
+disable_libs=shared
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
diff --git a/voip/libosip2-2.2.2/src/Makefile.in b/voip/libosip2-2.2.2/src/Makefile.in
index e4c1aacd27..9a363a84d9 100644
--- a/voip/libosip2-2.2.2/src/Makefile.in
+++ b/voip/libosip2-2.2.2/src/Makefile.in
@@ -92,6 +92,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -121,6 +122,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -129,15 +131,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -152,23 +148,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/src/osip2/Makefile.in b/voip/libosip2-2.2.2/src/osip2/Makefile.in
index de7d56794a..662a519373 100644
--- a/voip/libosip2-2.2.2/src/osip2/Makefile.in
+++ b/voip/libosip2-2.2.2/src/osip2/Makefile.in
@@ -123,6 +123,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -152,6 +153,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -160,15 +162,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -183,23 +179,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/src/osipparser2/Makefile.in b/voip/libosip2-2.2.2/src/osipparser2/Makefile.in
index 4ea8a8755e..ab49becbf7 100644
--- a/voip/libosip2-2.2.2/src/osipparser2/Makefile.in
+++ b/voip/libosip2-2.2.2/src/osipparser2/Makefile.in
@@ -155,6 +155,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -184,6 +185,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -192,15 +194,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -215,23 +211,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/src/test/Makefile.in b/voip/libosip2-2.2.2/src/test/Makefile.in
index 08eb033f46..d3082e4f04 100644
--- a/voip/libosip2-2.2.2/src/test/Makefile.in
+++ b/voip/libosip2-2.2.2/src/test/Makefile.in
@@ -206,6 +206,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -235,6 +236,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -243,15 +245,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -266,23 +262,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/voip/libosip2-2.2.2/src/test/res/Makefile.in b/voip/libosip2-2.2.2/src/test/res/Makefile.in
index e647ddb231..b61bb04cd2 100755..100644
--- a/voip/libosip2-2.2.2/src/test/res/Makefile.in
+++ b/voip/libosip2-2.2.2/src/test/res/Makefile.in
@@ -83,6 +83,7 @@ EXTRA_LIB = @EXTRA_LIB@
F77 = @F77@
FFLAGS = @FFLAGS@
FSM_LIB = @FSM_LIB@
+GREP = @GREP@
INSIDE_GNOME_COMMON_FALSE = @INSIDE_GNOME_COMMON_FALSE@
INSIDE_GNOME_COMMON_TRUE = @INSIDE_GNOME_COMMON_TRUE@
INSTALL_DATA = @INSTALL_DATA@
@@ -112,6 +113,7 @@ PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIP_CFLAGS = @SIP_CFLAGS@
@@ -120,15 +122,9 @@ SIP_FSM_FLAGS = @SIP_FSM_FLAGS@
SIP_PARSER_FLAGS = @SIP_PARSER_FLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -143,23 +139,30 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@