68 ui8 += 0; ui16 += 0; ui32 += 0;
72 dsmDP4((
"objectDataGetKeyAndLen()\n"));
73 dsmAssert((mpObjectData != NULL));
74 dsmAssert((pObjectKey != NULL));
75 dsmAssert((pObjectLength != NULL));
79 MEMPTR_OPEN( mpObjectData, mpObjectHdr );
82 SET_POS_REL( mpObjectHdr, 8 );
85 READ_UINT32( mpObjectHdr, messageSize );
88 *pObjectLength = messageSize + OBJECT_NUMBYTES_TO_MESSAGE_START;
91 READ_OBJECT_KEY( mpObjectHdr, LocalObjectKey, keyValid );
93 memcpy(pObjectKey, &LocalObjectKey,
sizeof(
S_ObjectKey));
97 dsmDP2((
"DATA ERROR: Object data objectKey invalid\n"));
101 MEMPTR_CLOSE( mpObjectHdr );
102 DEBUG_CHK( valid == TRUE,
103 dsmDP1((
"ERROR: objectDataGetKeyAndLen failure (invalid)\n")));
104 dsmDP4((
"exit objectDataGetKeyAndLen -> rtn: %u\n", valid));
121 const MemPtr mpObjectData,
126 BOOLEAN valid = FALSE;
130 U8BIT serviceContextList_count;
131 U16BIT context_data_length;
136 ui8 += 0; ui16 += 0; ui32 += 0;
138 dsmDP3((
"objectDataGetInfo()\n"));
139 dsmAssert((mpObjectData != NULL));
140 dsmAssert((pObjInf != NULL));
143 MEMPTR_OPEN( mpObjectData, mpObjectHdr );
146 ADV_UINT32_L2CHK( mpObjectHdr, ui32, ui32 == BIOP_MAGIC,
147 dsmDP2((
"DATA ERROR: Object data BIOP magic = %u\n", ui32)),
151 ADV_UINT16_L2CHK( mpObjectHdr, ui16, ui16 == 0x0100,
152 dsmDP2((
"DATA ERROR: Object data protocol version (!=0x0100) = %u\n", ui16)),
157 ADV_UINT8_L1CHK( mpObjectHdr, ui8, ui8 == 0x00,
158 dsmDP2((
"DATA ERROR: Object data byteOrder = %u\n", ui8)),
162 SET_POS_REL( mpObjectHdr, 1 );
165 READ_UINT32( mpObjectHdr, messageSize );
168 pObjInf->objectLen = messageSize + OBJECT_NUMBYTES_TO_MESSAGE_START;
171 READ_OBJECT_KEY(mpObjectHdr, pObjInf->objectKey, keyValid);
174 dsmDP2((
"DATA ERROR: Object data objectKey invalid\n"));
180 ADV_UINT32_L1CHK( mpObjectHdr, ui32, ui32 == 4,
181 dsmDP2((
"DATA ERROR: Object data objectKindLength (!= 4) = %u\n", ui32)),
185 READ_UINT32( mpObjectHdr, pObjInf->objectKind );
188 READ_UINT16(mpObjectHdr, pObjInf->objectInfoLength);
192 MEMPTR_GET_DIFF(mpObjectData, mpObjectHdr, pObjInf->objectInfoOffset);
196 SET_POS_REL(mpObjectHdr, (U32BIT)pObjInf->objectInfoLength);
199 READ_UINT8(mpObjectHdr, serviceContextList_count);
202 for (i = 0; i < serviceContextList_count; i++)
205 SET_POS_REL(mpObjectHdr, 4);
208 READ_UINT16(mpObjectHdr, context_data_length);
211 SET_POS_REL(mpObjectHdr, context_data_length);
215 READ_UINT32(mpObjectHdr, pObjInf->messageBodyLength);
218 MEMPTR_GET_DIFF(mpObjectData, mpObjectHdr, pObjInf->messageBodyOffset);
221 L2_DATA_CHK( messageSize + OBJECT_NUMBYTES_TO_MESSAGE_START ==
222 pObjInf->messageBodyOffset + pObjInf->messageBodyLength,
223 dsmDP2((
"DATA ERROR: Object data message lengths inconsistent\n")),
230 MEMPTR_CLOSE( mpObjectHdr );
231 DEBUG_CHK( valid == TRUE,
232 dsmDP1((
"ERROR: objectDataGetInfo failure (invalid)\n")));
233 dsmDP3((
"exit objectDataGetInfo -> rtn: %u\n", valid));
248 MemPtr mpBindingData;
250 BOOLEAN found = FALSE;
251 U16BIT bindingsCount;
254 U32BIT profilesCount;
259 ui8 += 0; ui16 += 0; ui32 += 0;
261 dsmDP3((
"odDirFindBinding( %s )\n", name));
262 dsmAssert((mpObject != NULL));
263 dsmAssert((pObjInf != NULL));
264 dsmAssert((name != NULL));
265 dsmAssert(((pObjInf->objectKind == DIR_STR) ||
266 (pObjInf->objectKind == SRG_STR)));
267 dsmAssert((mpBinding != NULL));
270 nameLength = (U8BIT)(strlen((
char *)name ) + 1);
271 dsmAssert((nameLength <= MAX_OBJ_NAME_SIZE));
274 MEMPTR_OPEN( mpObject, mpBindingData );
279 SET_POS_REL( mpBindingData, (S32BIT)pObjInf->messageBodyOffset );
282 READ_UINT16( mpBindingData, bindingsCount );
286 while (bindingsCount--)
291 GET_POS( mpBindingData, currStartPos );
294 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
295 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)),
300 READ_UINT8( mpBindingData, idLength );
302 if (nameLength == idLength)
305 (U8BIT *)name, mpBindingData, nameLength, found );
309 SET_POS_ABS( *mpBinding, currStartPos );
315 SET_POS_REL( mpBindingData, (S32BIT)idLength );
319 ADV_UINT8_L1CHK( mpBindingData, ui8, ui8 == 4,
320 dsmDP2((
"DATA ERROR: DIR Binding kindLength (!= 4) = %u\n", ui8)),
324 SET_POS_REL( mpBindingData, 4 );
327 SET_POS_REL( mpBindingData, 1 );
334 ADV_UINT32_L1CHK( mpBindingData, ui32, ui32 == 4,
335 dsmDP2((
"DATA ERROR: DIR Binding typeIdLength (!= 4) = %u\n", ui32)),
339 SET_POS_REL( mpBindingData, 4 );
342 READ_UINT32_L2CHK( mpBindingData, profilesCount, profilesCount >= 1,
343 dsmDP2((
"DATA ERROR: DIR Binding taggedProfilesCount (< 1) = %u\n", ui32)),
346 while (profilesCount--)
349 SET_POS_REL( mpBindingData, 4 );
352 READ_UINT32( mpBindingData, ui32 );
355 SET_POS_REL( mpBindingData, (S32BIT)ui32 );
359 READ_UINT16( mpBindingData, ui16 );
362 SET_POS_REL( mpBindingData, (S32BIT)ui16 );
365 MEMPTR_CLOSE( mpBindingData );
367 dsmDP3((
"exit odDirFindBinding -> rtn: %u\n", found));
376 const MemPtr mpBinding,
379 MemPtr mpBindingData;
384 dsmDP3((
"odDirGetBindingInfo()\n"));
385 dsmAssert((mpBinding != NULL));
386 dsmAssert((pLocation != NULL));
387 dsmAssert((pTap != NULL));
391 MEMPTR_OPEN( mpBinding, mpBindingData );
396 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
397 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)),
402 READ_UINT8( mpBindingData, ui8 );
403 SET_POS_REL( mpBindingData, (S32BIT)ui8 );
407 ADV_UINT8_L1CHK( mpBindingData, ui8, ui8 == 4,
408 dsmDP2((
"DATA ERROR: DIR Binding kindLength (!= 4) = %u\n", ui8)),
412 SET_POS_REL( mpBindingData, 4 );
416 ADV_UINT8_L1CHK( mpBindingData, ui8, ((ui8 == 0x01) || (ui8 == 0x02)),
417 dsmDP2((
"DATA ERROR: DIR Binding bindingType = %u\n", ui8)),
421 length = getIorInfoSeq( mpBindingData, &iorTypeId, pLocation, pTap );
427 MEMPTR_CLOSE( mpBindingData );
428 DEBUG_CHK( length != 0,
429 dsmDP1((
"ERROR: odDirGetBindingInfo failure (invalid)\n")));
430 dsmDP3((
"exit odDirGetBindingInfo -> rtn: %u\n", length));
431 return (length != 0) ? TRUE : FALSE;
439 const MemPtr mpBinding )
441 MemPtr mpBindingData;
444 dsmDP3((
"odDirGetBindingName()\n"));
445 dsmAssert((mpBinding != NULL));
448 MEMPTR_OPEN( mpBinding, mpBindingData );
453 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
454 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)), );
457 READ_UINT8( mpBindingData, ui8 );
459 MEMPTR_CLOSE( mpBindingData );
469 const MemPtr mpBinding,
472 MemPtr mpBindingData;
475 dsmDP3((
"odDirGetBindingName()\n"));
476 dsmAssert((mpBinding != NULL));
479 MEMPTR_OPEN( mpBinding, mpBindingData );
484 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
485 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)), );
488 READ_UINT8( mpBindingData, ui8 );
491 MEMPTR_READ( mpBindingData, name, ui8 );
493 MEMPTR_CLOSE( mpBindingData );
502 const MemPtr mpBinding,
505 MemPtr mpBindingData;
507 BOOLEAN valid = FALSE;
509 dsmDP3((
"odDirGetBindingKind()\n"));
510 dsmAssert((mpBinding != NULL));
511 dsmAssert((pKind != NULL));
515 MEMPTR_OPEN( mpBinding, mpBindingData );
520 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
521 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)),
526 READ_UINT8( mpBindingData, ui8 );
527 SET_POS_REL( mpBindingData, (S32BIT)ui8 );
531 ADV_UINT8_L1CHK( mpBindingData, ui8, ui8 == 4,
532 dsmDP2((
"DATA ERROR: DIR Binding kindLength (!= 4) = %u\n", ui8)),
536 READ_UINT32( mpBindingData, *pKind );
540 ADV_UINT8_L1CHK( mpBindingData, ui8, ((ui8 == 0x01) || (ui8 == 0x02)),
541 dsmDP2((
"DATA ERROR: DIR Binding bindingType = %u\n", ui8)),
549 MEMPTR_CLOSE( mpBindingData );
550 DEBUG_CHK( valid == TRUE,
551 dsmDP1((
"ERROR: odDirGetBindingKind failure (invalid)\n")));
552 dsmDP3((
"exit odDirGetBindingKind -> kind: %08x, rtn: %u\n", *pKind, valid));
556 void odDirGetBindingsCount(
558 U16BIT *pBindingsCount )
562 dsmDP3((
"odDirGetBindingsCount()\n"));
563 dsmAssert((mpObject != NULL));
564 dsmAssert((pObjInf != NULL));
565 dsmAssert(((pObjInf->objectKind == DIR_STR) ||
566 (pObjInf->objectKind == SRG_STR)));
570 MEMPTR_OPEN( mpObject, mpDirObjData );
575 SET_POS_REL( mpDirObjData, (S32BIT)pObjInf->messageBodyOffset );
578 READ_UINT16( mpDirObjData, *pBindingsCount );
580 MEMPTR_CLOSE( mpDirObjData );
582 dsmDP3((
"exit odDirGetBindingsCount\n"));
585 U16BIT odDirCountAndFirstBinding(
587 MemPtr *mpFirstBinding )
589 MemPtr mpBindingData;
591 U16BIT bindingsCount;
593 dsmDP3((
"odDirGetFirstBinding()\n"));
594 dsmAssert((mpObject != NULL));
595 dsmAssert((pObjInf != NULL));
596 dsmAssert(((pObjInf->objectKind == DIR_STR) ||
597 (pObjInf->objectKind == SRG_STR)));
598 dsmAssert((mpFirstBinding != NULL));
602 MEMPTR_OPEN( mpObject, mpBindingData );
607 SET_POS_REL( mpBindingData, (S32BIT)pObjInf->messageBodyOffset );
610 READ_UINT16( mpBindingData, bindingsCount );
612 if (bindingsCount > 0)
617 GET_POS( mpBindingData, bindingPos );
618 SET_POS_ABS( *mpFirstBinding, bindingPos );
621 MEMPTR_CLOSE( mpBindingData );
623 dsmDP3((
"exit odDirGetFirstBinding -> rtn: %u\n", bindingsCount));
624 return bindingsCount;
631 BOOLEAN odDirGetNextBinding(
632 const MemPtr mpCurrBinding,
633 MemPtr *mpNextBinding )
635 MemPtr mpBindingData;
637 BOOLEAN valid = FALSE;
639 U32BIT profilesCount;
644 ui8 += 0; ui16 += 0; ui32 += 0;
646 dsmDP3((
"odDirGetNextBinding()\n"));
647 dsmAssert((mpCurrBinding != NULL));
648 dsmAssert((mpNextBinding != NULL));
652 MEMPTR_OPEN( mpCurrBinding, mpBindingData );
657 ADV_UINT8_L2CHK( mpBindingData, ui8, ui8 == 1,
658 dsmDP2((
"DATA ERROR: DIR Binding nameComponentsCount (!= 1) = %u\n", ui8)),
663 READ_UINT8( mpBindingData, idLength );
666 SET_POS_REL( mpBindingData, (S32BIT)idLength );
670 ADV_UINT8_L1CHK( mpBindingData, ui8, ui8 == 4,
671 dsmDP2((
"DATA ERROR: DIR Binding kindLength (!= 4) = %u\n", ui8)),
675 SET_POS_REL( mpBindingData, 4 );
678 SET_POS_REL( mpBindingData, 1 );
685 ADV_UINT32_L1CHK( mpBindingData, ui32, ui32 == 4,
686 dsmDP2((
"DATA ERROR: DIR Binding typeIdLength (!= 4) = %u\n", ui32)),
690 SET_POS_REL( mpBindingData, 4 );
693 READ_UINT32_L2CHK( mpBindingData, profilesCount, profilesCount >= 1,
694 dsmDP2((
"DATA ERROR: DIR Binding taggedProfilesCount (< 1) = %u\n", ui32)),
697 while (profilesCount--)
700 SET_POS_REL( mpBindingData, 4 );
703 READ_UINT32( mpBindingData, ui32 );
706 SET_POS_REL( mpBindingData, (S32BIT)ui32 );
710 READ_UINT16( mpBindingData, ui16 );
713 SET_POS_REL( mpBindingData, (S32BIT)ui16 );
716 GET_POS( mpBindingData, bindingPos );
717 SET_POS_ABS( *mpNextBinding, bindingPos );
724 MEMPTR_CLOSE( mpBindingData );
725 dsmDP3((
"exit odDirGetNextBinding -> rtn: %u\n", valid));
General include file for clDsm library internal definitions.
Header to the linkList module - Functions/methods for managing linked lists of items created in manag...
BOOLEAN objectDataGetInfo(const MemPtr mpObjectData, ObjectDataInfo_t *pObjInf)
Parse the supplied object data. Verify selected fields. Extract generic information from selected fie...
Header to the cacheMgr module.
Header to the object module - functions/methods accessing data of object messages inside modules...
Defines memory access utils to work with managed (MemMgr) memory.
eader to the clDsmUtils module.