473,856 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

bitfield diagram - interpretation welcomed!

Hi all,

A workmate was recently bitching to me about an RFC.

(Apologies - the RFC number eludes me at present (it's related to the
DIAMETER protocol, that's all I can remember) but I will try to find
out and update the thread.)

He was moaning how the RFC laid out the description of an 8-bit
field. According to him, the diagram was (fixed-width font required,
but it won't really matter, and I've omitted the schematic-like use of
-,| and + that the RFCs usually use):

0 1 2 3 4 5 6 7
F F X X X Y Y Y P

The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?

We work with network protocol specfications, so suffice to say this
lack of precision was surprising to him (and on his relaying the
story, is surprising to me). He has already found products during
interop testing with the two different interpretations .

This is apparently an early draft of the RFC, and he will be
requesting clarification, but I was wondering what your people's take
on it was? How would you intepret this?

Thanks in advance,
Doug

May 18 '07 #1
13 1934
On 18 May, 21:08, Doug <DougTheS...@go oglemail.comwro te:

<snip>
0 1 2 3 4 5 6 7
F F X X X Y Y Y P
Ahem, please ignore the 'P'. 'P'retend it isn't there.

Thanks,
Doug

May 18 '07 #2
Ahem,

Please ignore me completely. The bitfield diagram appears within a
PDU diagram, the bit numbering is completely normal for an RFC.

My apologies for wasting your time and bandwidth.

Doug

May 18 '07 #3
In article <11************ **********@k79g 2000hse.googleg roups.com>,
Doug <Do*********@go oglemail.comwro te:
Hi all,
A workmate was recently bitching to me about an RFC.
(Apologies - the RFC number eludes me at present (it's related to the
DIAMETER protocol, that's all I can remember) but I will try to find
out and update the thread.)
He was moaning how the RFC laid out the description of an 8-bit
field. According to him, the diagram was (fixed-width font required,
but it won't really matter, and I've omitted the schematic-like use of
-,| and + that the RFCs usually use):
0 1 2 3 4 5 6 7
F F X X X Y Y Y P
The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.

HTH

--
Mitch

te************@ sand-hill.freeserve. co.uk
www.sand-hill.freeserve.co.uk/terminal_crazy

May 18 '07 #4
On 18 May, 21:43, Terminal Crazy <Terminal_Cr... @sand-
hill.freeserve. co.ukwrote:
In article <1179518886.836 471.287...@k79g 2000hse.googleg roups.com>,
Doug <DougTheS...@go oglemail.comwro te:


Hi all,
A workmate was recently bitching to me about an RFC.
(Apologies - the RFC number eludes me at present (it's related to the
DIAMETER protocol, that's all I can remember) but I will try to find
out and update the thread.)
He was moaning how the RFC laid out the description of an 8-bit
field. According to him, the diagram was (fixed-width font required,
but it won't really matter, and I've omitted the schematic-like use of
-,| and + that the RFCs usually use):
0 1 2 3 4 5 6 7
F F X X X Y Y Y P
The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.

HTH

--
Mitch
Hi Mitch,

Thanks for your reply.

Actually, in this case - and I thought the same as you when my
workmate described this to me - bit 0 in that diagram is actually the
MSB. The context I was missing (but have since found in a code
comment) is that it appears within an RFC digram of a PDU. These
diagrams assume 8 bit bytes, and are written left to right 0, 1,
2, ... usually to 32/64, so the diagram lines up nicely over multiple
rows. The numbering doesn't reflect the MSB/LSB ordering - the right-
most bit in each octet in the diagram is still the LSB.

Sorry for any confusion!

Thanks,
Doug

May 18 '07 #5
Terminal Crazy <Te************ @sand-hill.freeserve. co.ukwrites:
In article <11************ **********@k79g 2000hse.googleg roups.com>,
>The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.
Most of the world agrees, but IBM mainframers number their bits
"backward", so that bit 0 is the MSB.
--
Comp-sci PhD expected before end of 2007
Seeking industrial or academic position *outside California* in 2008
May 18 '07 #6
Ben Pfaff wrote, On 18/05/07 22:18:
Terminal Crazy <Te************ @sand-hill.freeserve. co.ukwrites:
>In article <11************ **********@k79g 2000hse.googleg roups.com>,
>>The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?
It doesn't matter, bit 0 is always the lowest.

Most of the world agrees, but IBM mainframers number their bits
"backward", so that bit 0 is the MSB.
It's not only IBM that use 0 as the MSB. To confuse things further I've
seen documents numbering bits from 1.

Moral of the story, always read the full specification and never assume
you know what it will say in advance.
--
Flash Gordon
May 18 '07 #7
Ben Pfaff wrote:
Terminal Crazy <Te************ @sand-hill.freeserve. co.ukwrites:
>In article <11************ **********@k79g 2000hse.googleg roups.com>,
>>The odd thing for him (and me) was the ordering of the bit
numbers in the diagram - increasing from left to right.
According to him, there was absolutely no description of what
this diagram meant. In other words, is the 0-bit in the diagram
the Most Significant Bit, or the Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.

Most of the world agrees, but IBM mainframers number their bits
"backward", so that bit 0 is the MSB.
Also the HP3000.

--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 19 '07 #8

"CBFalconer " <cb********@yah oo.comwrote in message
news:46******** *******@yahoo.c om...
Ben Pfaff wrote:
>Terminal Crazy <Te************ @sand-hill.freeserve. co.ukwrites:
>>In article <11************ **********@k79g 2000hse.googleg roups.com>,

The odd thing for him (and me) was the ordering of the bit
numbers in the diagram - increasing from left to right.
According to him, there was absolutely no description of what
this diagram meant. In other words, is the 0-bit in the diagram
the Most Significant Bit, or the Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.

Most of the world agrees, but IBM mainframers number their bits
"backward", so that bit 0 is the MSB.

Also the HP3000.
Of course C was not the language of choice on the HP3000. :-)
May 19 '07 #9

"Ben Pfaff" <bl*@cs.stanfor d.eduwrote in message
news:87******** ****@blp.benpfa ff.org...
Terminal Crazy <Te************ @sand-hill.freeserve. co.ukwrites:
>In article <11************ **********@k79g 2000hse.googleg roups.com>,
>>The odd thing for him (and me) was the ordering of the bit numbers in
the diagram - increasing from left to right. According to him, there
was absolutely no description of what this diagram meant. In other
words, is the 0-bit in the diagram the Most Significant Bit, or the
Least Significant Bit?

It doesn't matter, bit 0 is always the lowest.

Most of the world agrees, but IBM mainframers number their bits
"backward", so that bit 0 is the MSB.
Which is precisely why the protocols are not defined based upon
the architecture of the transceivers. CBFalconer has stated below
that the HP3000 was "backward", but the network devices
connected to its system bus were not necessarily :-).
May 19 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4241
by: Maria | last post by:
Heya, I am doing some background reading about the database and i am a little bit confused, i would appreciated any help.... Assume been asked to draw the ER diagram for the following statement: "Many players play for a team but a player can play just in one team"
9
5257
by: Davide Bruzzone | last post by:
Greetings all... I need to create a number of bitfield structs whose contents are smaller than the size of an int. For example: typedef struct foo FOO; struct foo { unsigned char fieldOne: 2, fieldTwo: 6; };
4
10481
by: Ray | last post by:
When a single-bit bitfield that was formed from an enum is promoted/cast into an integer, does ANSI C say anything about whether that integer should be signed or unsigned? SGI IRIX cc thinks it is an unsigned integer, so I see a +1 if the bit is set. Microsoft VC++ thinks it's signed, so I see -1 if the bit is set. Ex. typedef enum {
3
2939
by: Andy Venikov | last post by:
Sometimes you want to use a bitfield to hold an enum value. In such cases you would only use as many bits as are needed to encode the full set of enum values. And it is a pain to recompute and updated the bitfield length each time you add new enum values. But there is a way to make the compiler do it for you. Like this: enum Enums { Enum1, Enum2,
4
5462
by: | last post by:
Hi, How do we marshall a type like this from a C++/CLI class wrapper to an unmanaged method? typedef struct { UINT32 blah : 1; UINT32 blah2 : 1; UINT32 blah3: 1;
2
52005
by: sangu_rao | last post by:
Hi, I have to prepare an ER diagram for the objects in my SQL Server database. I have used the option "DIAGRAMS" in EnterPrise Manager of SQL Server 2000. It is creating the diagram for the selected tables (but the diagram contains only the table which i have selected. It is not displaying its depended tables). But i am not able to export it to any of the flat file like MS WORD or paint. I want this diagram to be uploaded to one Flat file...
7
7295
by: arne | last post by:
Hi all, cleaning up some elderly code, I stumbled across the following: /**************************************************/ struct { uint bf:8; char a1; char a2;
70
4366
by: Anson.Stuggart | last post by:
I'm designing a debounce filter using Finite State Machine. The FSM behavior is it follows the inital input bit and thinks that's real output until it receives 3 consecutive same bits and it changes output to that 3 consecutive bit until next 3 consecutive bits are received. A reset will set the FSM to output 1s until it receives the correct input and ouput. This is the test sequence with input and correct output. 1 0 0 1 0 1 0 0 0 1...
6
2587
by: shaun roe | last post by:
For a bit of seasonal festive fun, I thought I'd try making a bitfield function, i.e. a function returning, for example, the value of bits 1 to 5 of a word as an integer, when the exact bits are known at compile time. The data word is always 32 bit unsigned integer (its a data stream from some embedded controller). The legacy code I have has lines like: errNum = (dataWord>>1) & 31; //bits 1 to 5 is an error code
0
9758
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10774
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7929
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5757
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5956
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.