netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: netdev@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Subject: TCP connection in suspend (to RAM)
Date: Mon, 28 Jan 2013 12:55:45 +0100	[thread overview]
Message-ID: <1359374145.8120.8.camel@jlt4.sipsolutions.net> (raw)

Hi,

I'm working on a feature by which our device (Intel WiFi) will establish
a TCP connection while the host is asleep, in order to receive a wakeup
signal over the connection. There are a few configuration parameters,
but it's basically pretty simple, it establishes a connection, sending
configurable data in a configurable interval on it and wakes up the host
if it receives (certain) data on the connection or the connection breaks
(or we get disconnected from the AP, yadda yadda.)

The implementation is complex, but I've narrowed the configuration down
to configuring the IP addresses (v4 only), ports, and the data related
parameters like the interval etc.

I have two questions:
 1) I'm currently making userspace configure the destination/gateway MAC
    address. I could look up the route at configuration time, but it
    might have changed by the time we suspend and use it. At suspend
    time, I can no longer look up the route since that might require ARP
    queries. Does that seem reasonable, or is there a trick I could use?

 2) I'm making userspace configure the source port, and while some
    special cases might want this it seems like normally the kernel
    should pick an unused port. Does it seem acceptable to create a
    socket at configuration time, use inet_csk_get_port() to get an
    unused port and hang on to it until the configuration is removed
    again some time later (after suspend/resume)?

Thanks,
johannes

             reply	other threads:[~2013-01-28 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 11:55 Johannes Berg [this message]
     [not found] ` <1359374145.8120.8.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2013-02-04 14:53   ` TCP connection in suspend (to RAM) Johannes Berg

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=1359374145.8120.8.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).