[patch 3/6] LCP support
Kristen Carlson Accardi
kristen at linux.intel.com
Wed Mar 17 11:59:30 PDT 2010
On Wed, 17 Mar 2010 00:09:25 -0700
Marcel Holtmann <marcel at holtmann.org> wrote:
> Hi Kristen,
>
> > Makefile.am | 6 -
> > gatchat/gatppp.c | 53 +++++++++
> > gatchat/gatppp_internal.h | 8 +
> > gatchat/gatppplcp.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++
>
> this should be gatchat/ppp_lcp.c
>
> > +void __ppp_set_auth(GAtPPP *ppp, guint8* auth_data)
> > +{
> > + guint16 proto = ntohs(*(guint16 *)auth_data);
>
> This are again one of these constructs that will break on non-x86
> hardware.
>
> I think you need to create ppp_get_unaligned and ppp_put_unaligned. If
> all of them are be16 anyway, you could do ppp_get_unaligned_be16 etc.
>
> Regards
>
> Marcel
Would it make more sense to pack the structures that are meant to
represent bytes off the wire? I personally prefer that to making
a different function for be vs. le. But I am not sure if we can
assume we are using gcc and have __attribute__((packed)) support?
More information about the ofono
mailing list