Big Endian 00000000 61 73 65 64 65 6e 6f 00* 00*6b 72 62 74 67 74 00* |asedeno..krbtgt.| 00000010 41 54 48 45 4e 41 2e 4d 49 54 2e 45 44 55 00*41 |ATHENA.MIT.EDU.A| 00000020 54 48 45 4e 41 2e 4d 49 54 2e 45 44 55 00*7a 2f |THENA.MIT.EDU.z/| 00000030 a7 04 e0 b9 b5 ea*00 00 00 01*00 00 00 05*00 00 |§.๵ê..........| 00000040 00 40 67 72 a0 04 de b5 c1 40 40 da 1c 08 b7 98 |.@gr .ÞµÁ@@Ú..·.| 00000050 15 00 aa bd a8 a9 dd 51 86 a9 47 c6 a1 8d 73 f8 |..ª½¨©ÝQ.©GÆ¡.sø| 00000060 c0 51 08 b5 9c 68 45 c5 6a 5e 39 a8 e1 17 93 eb |ÀQ.µ.hEÅj^9¨á..ë| 00000070 ba 1c 7d 45 75 b4 34 c7 bf b4 a7 90 3c 5e d6 fa |º.}Eu´4Ç¿´§.<^Öú| 00000080 b3 11*43 55 7b 7f |³.CU{.| 00000086 name 61 73 65 64 65 6e 6f 00 instance 00 --- name 6b 72 62 74 67 74 00 instance 41 54 48 45 4e 41 2e 4d 49 54 2e 45 44 55 00 realm 41 54 48 45 4e 41 2e 4d 49 54 2e 45 44 55 00 cblock 7a 2f a7 04 e0 b9 b5 ea lifetime 00 00 00 01 kvno 00 00 00 05 ktext 00 00 00 40 + 0x00000040 bytes time [xx xx xx xx] 43 55 7b 7f ******************************************************************************** Notes: This is not as elegant as the little endian solution, and unfortunatly we can't just watch for one special principal "./@.." for flagging alignment records. I'm using krb5 name/instance format since I'm using .'s as in jhutz's patch. Once every six and a half months, we're going to encounter a problem here in which the time stamp will look like xx 00 00 00. We can detect this, but other libraries that use 32 bit times will see a blank realm and choke. I find this better than choking all the time. Since this is more complicated than the little endian alignment record, I'm inclined to have it be off by default. I plan to figure out how to read data from the krb5.conf file to figure this out, from what I've seen it's not too bad. ******************************************************************************** Alignment Records: ******************************************************************************** 0 nulls time = xx xx xx xx 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ------------------------------------------------ xx xx xx xx 2e 00 00 2e 2e 00_00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00<2e 00 00 2e>2e 00 00 2e 2e 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 two alignment records, second follows same logic as little endian alignment record. We see ????./@.., ./@.. They see ./@.., ./@.. ******************************************************************************** 1 null time = xx 00 xx xx, xx xx 00 xx, xx xx xx 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ------------------------------------------------ xx 00 xx xx 2e 00 2e 2e 00_2e 2e 2e 00_ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 We see ?/??.@.. They see ./..@... ******************************************************************************** 2 nulls (both of these are the same record) time = xx 00 00 xx 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ------------------------------------------------ xx 00 00 xx 2e 2e 00_00 2e 2e 00_ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 We see ?/@?.. They see ../@.. time = xx 00 xx 00, xx xx 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ------------------------------------------------ xx 00 xx 00 2e 2e 00_00 2e 2e 00_ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 We see ?/?@.. They see ../@.. ******************************************************************************** 3 nulls time - xx 00 00 00 xx 00 00 00_2e 00 00 2e 2e 00_ff ff 00 00 00 00 ff ff 00 00 00 00 00 0e 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 We see ?/@ They see ./@..