From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH 3/3] ppp: use GAtHDLC
Date: Sat, 17 Apr 2010 15:36:57 -0700 [thread overview]
Message-ID: <1271543817.22838.31.camel@localhost.localdomain> (raw)
In-Reply-To: <1271528135-12337-4-git-send-email-kristen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
Hi Kristen,
> +static void ppp_record(GAtPPP *ppp, gboolean in, guint8 *data, guint16 length)
> +{
> + guint16 len = htons(length);
> + guint32 ts;
> + struct timeval now;
> + unsigned char id;
> + int err;
> +
> + if (ppp->record_fd < 0)
> + return;
> +
> + gettimeofday(&now, NULL);
> + ts = htonl(now.tv_sec & 0xffffffff);
> +
> + id = 0x07;
> + err = write(ppp->record_fd, &id, 1);
> + err = write(ppp->record_fd, &ts, 4);
> +
> + id = in ? 0x02 : 0x01;
> + err = write(ppp->record_fd, &id, 1);
> + err = write(ppp->record_fd, &len, 2);
> + err = write(ppp->record_fd, data, length);
> +}
> +
there is one change that has to happen first here. We need to add
g_at_hdlc_set_recording. And this needs to take a file name and an
actual format parameter. With pppdump being the initial format.
Then the g_at_ppp_set_recoding can just call the HDLC recording function
and set this. I do wanna have this in a central place. And at the same
time allow recording of other HDLC based data formats that Wireshark
eventually can support.
Regards
Marcel
prev parent reply other threads:[~2010-04-17 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-17 18:15 [PATCH 0/3] HDLC fixes Kristen Carlson Accardi
2010-04-17 18:15 ` [PATCH 1/3] hdlc: allow for scanning and escaping Kristen Carlson Accardi
2010-04-17 22:34 ` Marcel Holtmann
2010-04-17 18:15 ` [PATCH 2/3] hdlc: handle wrapped buffers Kristen Carlson Accardi
2010-04-17 22:39 ` Marcel Holtmann
2010-04-27 3:02 ` Marcel Holtmann
2010-04-17 18:15 ` [PATCH 3/3] ppp: use GAtHDLC Kristen Carlson Accardi
2010-04-17 22:36 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1271543817.22838.31.camel@localhost.localdomain \
--to=marcel@holtmann.org \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox