-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bjoern,
As of NfSen 1.3, you can exchange scalar and array values between the backend and the frontend, but no hashes. so this means you would have to split the hash into various arrays and exchange these arrays: in you example this means: In the backend: Split your hash into multiple arrays $IPHASH{'IP1'} = [ value1, value2, value3 ]; $IPHASH{'IP2'} = [ value4, value5, value6 ]; must result in an argument vector like: $args{'IP1'} = [ value1, value2, value3 ]; $args{'IP2'} = [ value4, value5, value6 ]; .. So for every IP address you have an array of values. # Sending the data Nfcomm::socket_send_ok($socket, \%args); In the frontend you have: // call command in backened plugin $out_list = nfsend_query("Pluginname::try", $opts); $IP1 = $out_list['IP1']; $IP2 = $out_list['IP2']; $IP1 and $IP2 are arrays, available in the frontend. So in the frontend you an array of values for each IP. Hope this helps - Peter Bjoern Weiland wrote: | So i tried to work around this issue by splitting the hash I need to | pass over to the frontend. | I split it into one normal array and one multidimensional array. | | First things first: I have to pass over some IPs and for each IP certain | additional values. First I wanted to pass a hash like | | IP1 => value1,value2,value3... | IP2 => ... | | so each IP had an array of values. That did not seem to work so I | splitted it into an array of IPs and an array of an array of values | (i.e. a multidimensional array, a matrix). | The array of IPs is (as expected) perfectly passed on, but the matrix is | not. | The webinterface says (using print_r()): | | Query backend plugin for function try | Array ( [0] => ARRAY(0x87a270c) [1] => ARRAY(0x8890198) [2] => | ARRAY(0x8890210) [3] => ARRAY(0x889018c) [4] => ARRAY(0x8890174) [5] => | ARRAY(0x889045c) [6] => ARRAY(0x88904b0) [7] => ARRAY(0x88904f8) ) | | How can I access these arrays? All I see is their references, as that's | how I build the matrix in Perl (%file is the above mentioned hash) | | foreach my $ip (keys (%file)) { | my @valueArray = @{$file{$ip}}; | push(@valueMatrix, [EMAIL PROTECTED]); | } | | Seems to be stuck at the same place as before... Any ides on that? | | -best regards, bjoern | | | | ------------------------------------------------------------------------- | This SF.Net email is sponsored by the Moblin Your Move Developer's challenge | Build the coolest Linux based applications with Moblin SDK & win great prizes | Grand prize is a trip for two to an Open Source event anywhere in the world | http://moblin-contest.org/redirect.php?banner_id=100&url=/ | _______________________________________________ | Nfsen-discuss mailing list | Nfsen-discuss@lists.sourceforge.net | https://lists.sourceforge.net/lists/listinfo/nfsen-discuss - -- _______ SWITCH - The Swiss Education and Research Network ______ Peter Haag, Security Engineer, Member of SWITCH CERT PGP fingerprint: D9 31 D5 83 03 95 68 BA FB 84 CA 94 AB FC 5D D7 SWITCH, Werdstrasse 2, P.O. Box, CH-8021 Zurich, Switzerland E-mail: [EMAIL PROTECTED] Web: http://www.switch.ch/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCUAwUBSJbHdf5AbZRALNr/AQKqcgP4uZsoYW7n78HnRbzMaS42mvy0oSrZUoTv GNNEUZPTzNoQkMkaDP68h80s76AI7XGktIxHfPVvIgRreyX0dO36UMJF253xefZo W0RT/IYfG2GH/c+1s49tk5OXaj/pEhal2PVJVMdqqzdP5c1G6fQSY9RzbHY5Z/qx heK/sjA95Q== =Pnck -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nfsen-discuss mailing list Nfsen-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfsen-discuss