[OpenAFS-devel] PR_DumpEntry

Harald Barth haba@pdc.kth.se
Fri, 15 Aug 2003 10:00:11 +0200 (CEST)


Seems to me that PR_DumpEntry() does not work any more in ptserver
1.2.9. My gdb tells me that the filled in header has a lot of zeros at
places where I do not expect zeroes (like number of entries). Can
anyone confirm or deny?

(...)
    ns = rxnull_NewClientSecurityObject();
    if((ns=rxkad_NewClientSecurityObject(rxkad_crypt, cred.session, cred.kvno, 
                                         cred.ticket_st.length, 
                                         cred.ticket_st.dat ))==NULL)
(...)
    if((rx=rx_NewConnection(ip, sp->s_port, PRSRV, ns, rxkad_crypt))==NULL)
        perror("New conn");
(...)
        ret = PR_DumpEntry(rx, 0, &h);

(gdb) print rx
$1 = (struct rx_connection *) 0x1006c530
(gdb) print *rx
$2 = {next = 0x0, peer = 0x1006c5b8, epoch = 2712430153, cid = 1460859540, 
  error = 0, call = {0x0, 0x0, 0x0, 0x0}, callNumber = {0, 0, 0, 0}, 
  serial = 0, lastSerial = 0, maxSerial = 0, challengeEvent = 0x0, 
  delayedAbortEvent = 0x0, abortCount = 0, service = 0x0, serviceId = 73, 
  refCount = 1, flags = 0 '\000', type = 0 '\000', 
  secondsUntilPing = 2 '\002', securityIndex = 2 '\002', 
  securityObject = 0x100661e8, securityData = 0x10039968 "ð\205\026ã-XÓÇ", 
  securityHeaderSize = 4, securityMaxTrailerSize = 4, timeout = 0, 
  lastSendTime = 0, secondsUntilDead = 12, hardDeadTime = 0, 
  ackRate = 1 '\001', nSpecific = 0, specific = 0x0}
(gdb) n
92              pos = h.headerSize;
(gdb) print h
$3 = {version = 0, headerSize = 0, freePtr = 0, eofPtr = 0, maxGroup = 0, 
  maxID = 0, maxForeign = 0, maxInst = 0, orphan = 0, usercount = 0, 
  groupcount = 0, foreigncount = 0, instcount = 0, reserved = {0, 0, 0, 0, 0}, 
  nameHash = {0 <repeats 8191 times>}, idHash = {0 <repeats 6566 times>, 
    2147422848, 0, 263588924, 0 <repeats 105 times>, 263603280, 0, 2147422715, 
    0, 264079172, 0, 2147422728, 0, 0, 0, 0, 0, 2147423312, 0, 263604532, 0, 
    2147429744, 0, 264081728, 0, 2147423312, 0, 0, 796226418, 795370857, 
    1835295084, 795634018, 795634018, 1663988591, 774963200, 0, 2147422688, 0, 
    0, 263624164, 0, 0, 0, 2147423312, 0, 2147423312, 0, 2147423008, 0, 0, 0, 
    2147422192, 0, 264095776, 0, 0, 0, 2147423200, 0, 5, 0, 40, 0, 2147422896, 
    0, 0, 0, 264095776, 0, 0, 0, 5000, 0, 264095776, 0, 263598316, 0, 
    262078832, 0, 2147423312, 0, 2147423312, 0, 263624124, 0, 264094744, 0, 
    264095776, 0, 268445065, 0, 2147423260, 0, 264081616, 0, 268445065, 0, 
    263625160, 0, 0, 0, 263603248, 0, 2147423104, 0, 264079172, 0, 2147423080, 
    2147422976, 0, 0, 5000, 0, 264095776, 0, 263603652, 0, 32, 0, 268445075, 
    0, 2147423072, 0, 0, 2147423104, 0, 0, 0, 0, 6, 0, 263596780, 1936156977, 
    774897664, 0, 0, 0, 2147423072, 0, 0, 0, 268436176, -1, -1, 0, 262078464, 
    0, 263628212, 0, 2, 0, 7, 0, 262133793, 0, 0, 0, 264094744, 0, 0, 0, 
    268436176, 0, 264095776, 0, 262078464, 0, 263627000, 0, 0, 0, 268436176, 
    0, 2, 0, 0, 0, 264094744, 0, 268436176, 0, 264095776...}}
(gdb) 

Harald.