how to enable NET SCTP for modules use

Proxecto:Trisquel
Versión:7.0
Componente:Gnome
Categoría:petición de axuda
Prioridade:normal
Asignado:Sen asignar
Estado:active
Descrición

Dear all,

I would like to run some M3UA tests

therefore the modules net sctp is used see below

;;; Load the SCTP API needed.
(if (not (defined? 'sctp-send-with-crc32c))
(use-modules (net sctp)))

Version:
Trisquel2
3.13.0-39-lowlatency #66+7.0trisquel2 SMP PREEMPT Wed Oct 29 17:10:10 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

error message --> see below

:/var/tmp/m3ua-testtool# runm3uatest m3ua-asp-aspsm-v-002
Test m3ua-asp-aspsm-v-002 ;;; note: source file /var/tmp/m3ua-testtool/common.scm
;;; newer than compiled /root/.cache/guile/ccache/2.0-LE-8-2.0/var/tmp/m3ua-testtool/common.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /var/tmp/m3ua-testtool/common.scm
;;; /var/tmp/m3ua-testtool/common.scm:41:2: warning: possibly unbound variable `use-module'
;;; /var/tmp/m3ua-testtool/common.scm:41:14: warning: possibly unbound variable `net sctp'
;;; compiled /root/.cache/guile/ccache/2.0-LE-8-2.0/var/tmp/m3ua-testtool/common.scm.go
Backtrace:
In ice-9/boot-9.scm:
157: 14 [catch #t # ...]
In unknown file:
?: 13 [apply-smob/1 #]
In ice-9/boot-9.scm:
63: 12 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 11 [eval # #]
In unknown file:
?: 10 [call-with-input-string "(load-from-path \"/root/.guile\")(let ((test-name \"m3ua-asp-aspsm-v-002\")) (if (defined? (string->symbol test-name)) (exit ((eval-string test-name) tester-addr tester-port sut-addr sut-port)) (exit 254)))" ...]
In ice-9/command-line.scm:
180: 9 [# #]
In unknown file:
?: 8 [eval (load-from-path "/root/.guile") #]
In ice-9/boot-9.scm:
1724: 7 [%start-stack load-stack #]
1729: 6 [#]
In unknown file:
?: 5 [primitive-load-path "/root/.guile"]
In ice-9/boot-9.scm:
702: 4 [map # #]
1724: 3 [%start-stack load-stack #]
1729: 2 [#]
In unknown file:
?: 1 [primitive-load-path "/var/tmp/m3ua-testtool/common.scm"]
In /var/tmp/m3ua-testtool/common.scm:
41: 0 [#]

/var/tmp/m3ua-testtool/common.scm:41:2: In procedure #:
/var/tmp/m3ua-testtool/common.scm:41:2: In procedure module-lookup: Unbound variable: use-module
FAILED

I've checked if sctp is supporte

/var/tmp/m3ua-testtool# checksctp
SCTP supported
root@lt001568-PRIMERGY-RX200-S5:/var/tmp/m3ua-testtool#

anyhow net sctp is not listened:

Usage:
net rpc Run functions using RPC transport
net rap Run functions using RAP transport
net ads Run functions using ADS transport
net file Functions on remote opened files
net share Functions on shares
net session Manage sessions
net server List servers in workgroup
net domain List domains/workgroups on network
net printq Modify printer queue
net user Manage users
net group Manage groups
net groupmap Manage group mappings
net sam Functions on the SAM database
net validate Validate username and password
net groupmember Modify group memberships
net admin Execute remote command on a remote OS/2 server
net service List/modify running services
net password Change user password on target server
net changetrustpw Change the trust password
net changesecretpw Change the secret password
net setauthuser Set the winbind auth user
net getauthuser Get the winbind auth user settings
net time Show/set time
net lookup Look up host names/IP addresses
net g_lock Manipulate the global lock table
net join Join a domain/AD
net dom Join/unjoin (remote) machines to/from a domain/AD
net cache Operate on the cache tdb file
net getlocalsid Get the SID for the local domain
net setlocalsid Set the SID for the local domain
net setdomainsid Set domain SID on member servers
net getdomainsid Get domain SID on member servers
net maxrid Display the maximum RID currently used
net idmap IDmap functions
net status Display server status
net usershare Manage user-modifiable shares
net usersidlist Display list of all users with SID
net conf Manage Samba registry based configuration
net registry Manage the Samba registry
net eventlog Process Win32 *.evt eventlog files
net printing Process tdb printer files
net serverid Manage the serverid tdb
net help Print usage information
root@lt001568-PRIMERGY-RX200-S5:~#
_______________________

Question;
How to enable modules for net sctp usage ?

thanks

br Yaxley

Sáb, 07/29/2017 - 18:10

Strange, I don't know exactly where does the (net sctp) Scheme module comes from. But perhaps I can help with the error messages related to Scheme syntax.

When you don't care for the alternate result of a test in the "if", it's faster to use either "when" (for when you want to do something when the test returns #t) or "unless" (for when you want to do something when the test returns #f). Example:

(when (eqv? 2 2)
(display "Tested.")
(newline))

(unless (eqv? 2 3)
(display "Tested.")
(newline))

Also, error messages suggest me that you used "use-module" instead of "use-modules".

If you are using the 'use-modules procedure, then it has an S, and you can insert various module specifications to load. If, however, you are using the #:use-module keyword, then it has no S and you must set each desired module specification in their own #:use-module keyword.