9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] udp and dial
@ 2004-02-26 14:40 plan9fans
  2004-02-26 14:43 ` David Presotto
  2004-02-26 14:43 ` David Presotto
  0 siblings, 2 replies; 3+ messages in thread
From: plan9fans @ 2004-02-26 14:40 UTC (permalink / raw)
  To: 9fans

Hi,

can I use dial to set up an point-to-point udp connection
and force the local port to a known number? I guess
that if the answer is no then I must just do a connect()
and use the 'headers' option and explicitly set the headers
in every packet - no great hardship, more a question of
does the plan9 network syntax support such a thing?

-Steve


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] udp and dial
  2004-02-26 14:40 [9fans] udp and dial plan9fans
@ 2004-02-26 14:43 ` David Presotto
  2004-02-26 14:43 ` David Presotto
  1 sibling, 0 replies; 3+ messages in thread
From: David Presotto @ 2004-02-26 14:43 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

The local port is the second argument to dial:

	fd = dial("udp!135.104.9.1!31", "21", 0, 0);

to send mail from port 21 to port 31.

[-- Attachment #2: Type: message/rfc822, Size: 2016 bytes --]

From: plan9fans@ntlworld.nospam.com
To: 9fans@cse.psu.edu
Subject: [9fans] udp and dial
Date: Thu, 26 Feb 2004 14:40:22 0000
Message-ID: <b45d49b893bedbbafdde919489089e97@snellwilcox.com>

Hi,

can I use dial to set up an point-to-point udp connection
and force the local port to a known number? I guess
that if the answer is no then I must just do a connect()
and use the 'headers' option and explicitly set the headers
in every packet - no great hardship, more a question of
does the plan9 network syntax support such a thing?

-Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] udp and dial
  2004-02-26 14:40 [9fans] udp and dial plan9fans
  2004-02-26 14:43 ` David Presotto
@ 2004-02-26 14:43 ` David Presotto
  1 sibling, 0 replies; 3+ messages in thread
From: David Presotto @ 2004-02-26 14:43 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 74 bytes --]

Man I got mail on the brain.  I meant to send udp from port 21 to port 31.

[-- Attachment #2: Type: message/rfc822, Size: 2016 bytes --]

From: plan9fans@ntlworld.nospam.com
To: 9fans@cse.psu.edu
Subject: [9fans] udp and dial
Date: Thu, 26 Feb 2004 14:40:22 0000
Message-ID: <b45d49b893bedbbafdde919489089e97@snellwilcox.com>

Hi,

can I use dial to set up an point-to-point udp connection
and force the local port to a known number? I guess
that if the answer is no then I must just do a connect()
and use the 'headers' option and explicitly set the headers
in every packet - no great hardship, more a question of
does the plan9 network syntax support such a thing?

-Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-26 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-26 14:40 [9fans] udp and dial plan9fans
2004-02-26 14:43 ` David Presotto
2004-02-26 14:43 ` David Presotto

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).