Static Sprocket wrote:
(I think my last post my have gone to John directly, retrying for the lists...)

Alrighty, lets see if I'm parsing this right.  I'd like to try and get
a list of inventory.  Does the following look correct?  Any idea what
I'd pass in to get the root folder, perhaps it's UUID is
"0000000000000000" ?

Low 00332 - FetchInventoryDescendents - Untrusted - Unencoded
      0065 InventoryData (01)
              0719 OwnerID (LLUUID / 1)
              1025 FolderID (LLUUID / 1)
              1118 SortOrder (S32 / 1)
              1374 FetchFolders (BOOL / 1)
              1485 FetchItems (BOOL / 1)

      1297 AgentData (01)
              0219 AgentID (LLUUID / 1)



public static Packet FetchInventoryDescendents(ProtocolManager
protocol, LLUUID agentID, LLUUID folderID)
{
int packetLength = 8; // header
packetLength += 16; // OwnerID (UUID)
packetLength += 16; // FolderID (UUID)
packetLength += 4; // Sort Order (signed integer? - S32)
packetLength += 1; // FetchFolders (byte? - BOOL)
packetLength += 1; // FetchItmes (byte? - BOOL)
packetLength += 16; // AgentID (UUID)


Packet packet = new Packet("FetchInventoryDescendents", protocol,
packetLength );

int pos = 8; // Leave room for header

// OwnerID
Array.Copy(agentID.Data, 0, packet.Data, pos, 16);
pos += 16;

// FolderID
Array.Copy(folderID.Data, 0, packet.Data, pos, 16);
pos += 16;

// Sort Order (Any ideas on what the valid values are here?)
Array.Copy(BitConverter.GetBytes( (int)0 ), 0, packet.Data, pos, 4);
pos += 4;

// FetchFolders
packet.Data[pos] = 1;
pos += 1;

// FetchItemss
packet.Data[pos] = 1;
pos += 1;

// AgentID
Array.Copy(agentID.Data, 0, packet.Data, pos, 16);
pos += 16;

return packet;
}


Thanks!

The packet construction looks perfect, I'll add it to the library here shortly with the one exception of being able to pass in the bool values. I deleted my cache file, loaded up Snowcrash and logged in with the Ron Hubbard alt and got this packet (repeated three times throughout the whole five or ten second login, same values each time):

----- FetchInventoryDescendents -----
InventoryData
OwnerID: 0883e26131464906a43a9c86d45f2774
FolderID: 880eab683e68428780d80468724d297c
SortOrder: 0
FetchFolders: False
FetchItems: True
AgentData
AgentID: 0883e26131464906a43a9c86d45f2774

I really have no idea where the 880eab683e68428780d80468724d297c comes from, I couldn't find it earlier in the transaction or in SecondLife.exe but I had a few filters turned on in Snowcrash so I'll do a full dump later. It would be rather interesting if you could pass in any old inventory UUID and use these packets to read arbitrary inventories (given you have the UUID of the inventory you want to read).

In my next test I'll also actually open the inventory dialog and play around in there so I can get a better picture of how that stuff is working.

_______________________________________________
libsecondlife-dev mailing list
libsecondlife-dev@gna.org
https://mail.gna.org/listinfo/libsecondlife-dev

Reply via email to