If I run "ibsrpdm -c" it shows:
a
id_ext=0002c90300001678,ioc_guid=0002c90300001678,dgid=fe800000000000000002c90300001679,pkey=ffff,service_id=0002c90300001678
But, srp_daemon with "-n" sends i_port_id 0x7916000003c90200:0x2c90300001e79
The 0x7916000003c90200 part is what I couldn't figure out how to see,
before a failed connection attempt. It's not in the ibsrpdm output.
Well, not exactly. Looked through the code, and I see now this
"mysterious" number is the target's port GUID, scrambled a bit. It's
made by reversing the target's port GUID (the last hafl of dgid), in
byte-sized chunks. You'll see the dgid ends in 1679, and the number I
was calling "out of no where" as the initiator_ext value starts with
7916. That's 1679 in reverse, in byte-sized ("16" and "79")
chunks.
Can't remember the function srp_daemon used to do this, but it's
something related to different platform byte ordering.
I don't see in any documentation anywhere for SRP or targetcli
anything about how to set up targetcli without having a rejected
connection attempt. Turns out you can just do the re-ordering of the
last half of the target port GUID to figure out what targetcli needs
for a successful attempt.
On Thu, Jan 7, 2016 at 7:16 AM, Bart Van Assche
<bart.vanassche(a)sandisk.com> wrote:
> On 01/06/2016 10:06 AM, james harvey wrote:
>>
>> After more digging, I found out this out of no where hex string is
>> referred to as "initiator_ext", and is being sent since srp_daemon.sh
>> give srp_daemon the "-n" flag. Since there's no user-set
>> initiator_ext, srp_daemon grabs it from somewhere.
>>
>> If I want to continue using the "-n" flag, how can I find out what my
>> initiator is going to send as initiator_ext, so the target can be set
>> up to work with it?
>>
>> Or, can I set my own initiator_ext, it looks by appending it to
>> /etc/srp_daemon.conf ?
>>
>> Why doesn't ibsrpdm give the initiator_ext value?
>
>
> Hello James,
>
> What makes you think that ibsrpdm doesn't give you the initiator_ext value ?
> Installing and activating the srptools package with default options should
> be sufficient to make an SRP initiator log in to an SRP target system. That
> will make ibsrpdm and srp_daemon query the login parameters from the target
> system, including initiator_ext, and use these parameters to log in to the
> target system. BTW, the latest version of srptools is available from
>
http://downloads.openfabrics.org/downloads/srptools/.
>
> Bart.
>