Extending struct.unpack

Amritansh Raghav amritansh at mobilian.com
Wed Jan 31 13:09:08 EST 2001


All Ethernet (and most IEEE MAC addresses) be they group or directed are
6bytes long, and I would like to manipulate them as a single entity simply
because I have an array of those and dont want to expose tuple of tuples.

"Tim Roberts" <timr at probo.com> wrote in message
news:rbdf7tstpdkoldvcpc6lor3e723u7k2rgo at 4ax.com...
> "Amritansh Raghav" <amritansh at mobilian.com> wrote:
> >
> >p.s (for more info - the buffer i want to unpack contains an ethernet
> >address which is 6 bytes. currently i unpack it using 6B, but i would
like
> >to specify it as say E and have unpack return a 6byte long number)
>
> What kind of Ethernet address is 6 bytes?  You mean a MAC address?  Those
> aren't usually manipulated as a single 6-byte entity.
> --
> - Tim Roberts, timr at probo.com
>   Providenza & Boekelheide, Inc.





More information about the Python-list mailing list