All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] uml_switch
@ 2003-10-23 10:55 Nelio Pereira
  2003-10-23 14:28 ` Nuno Silva
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nelio Pereira @ 2003-10-23 10:55 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi list..

I'm using UML to benchmark a distributed protocol
(cluster membership service) on a virtual network. As
a way of injecting faults, I thought about changing
uml_switch so it would not forward every message it
receives. Roughly speaking, it could deliver only a
percentage of the messages. 

I would like to know where in the uml_switch code is
the best place to do that. Actually, I'd like to
intercept those messages in a place where I could know
the sender and recipient IP of each message.

Thanks,

Nelio

=====
+------------------------------------------------------------------------+
                       http://www.ime.usp.br/~nelio

Yahoo! Mail - o melhor webmail do Brasil
http://mail.yahoo.com.br


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 10:55 [uml-devel] uml_switch Nelio Pereira
@ 2003-10-23 14:28 ` Nuno Silva
  2003-10-23 14:46   ` Nelio Pereira
  2003-10-23 18:11 ` Matt Zimmerman
  2003-10-30 18:04 ` BlaisorBlade
  2 siblings, 1 reply; 9+ messages in thread
From: Nuno Silva @ 2003-10-23 14:28 UTC (permalink / raw)
  To: Nelio Pereira; +Cc: user-mode-linux-devel



Nelio Pereira wrote:
> Hi list..

Hi!


> 
> I'm using UML to benchmark a distributed protocol
> (cluster membership service) on a virtual network. As
> a way of injecting faults, I thought about changing
> uml_switch so it would not forward every message it
> receives. Roughly speaking, it could deliver only a
> percentage of the messages. 
> 
> I would like to know where in the uml_switch code is
> the best place to do that. Actually, I'd like to
> intercept those messages in a place where I could know
> the sender and recipient IP of each message.
> 


I remember seeing, here, that someone ported uml_switch to python... 
Maybe that's easier to hack?

Hope this helps,
Nuno Silva


> Thanks,
> 
> Nelio
> 
> =====
> +------------------------------------------------------------------------+
>                        http://www.ime.usp.br/~nelio
> 
> Yahoo! Mail - o melhor webmail do Brasil
> http://mail.yahoo.com.br
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by OSDN developer relations
> Here's your chance to show off your extensive product knowledge
> We want to know what you know. Tell us and you have a chance to win $100
> http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
> 



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 14:28 ` Nuno Silva
@ 2003-10-23 14:46   ` Nelio Pereira
  2003-10-25  1:26     ` Jeff Dike
  0 siblings, 1 reply; 9+ messages in thread
From: Nelio Pereira @ 2003-10-23 14:46 UTC (permalink / raw)
  To: Nuno Silva; +Cc: user-mode-linux-devel

The code itself doesn't seem very complicated. I just
would like to know how a message is transmited to its
recipient, then I could intercept this message in the
right place.

Nelio

 --- Nuno Silva <nuno.silva@vgertech.com> escreveu: > 
> 
> Nelio Pereira wrote:
> > Hi list..
> 
> Hi!
> 
> 
> > 
> > I'm using UML to benchmark a distributed protocol
> > (cluster membership service) on a virtual network.
> As
> > a way of injecting faults, I thought about
> changing
> > uml_switch so it would not forward every message
> it
> > receives. Roughly speaking, it could deliver only
> a
> > percentage of the messages. 
> > 
> > I would like to know where in the uml_switch code
> is
> > the best place to do that. Actually, I'd like to
> > intercept those messages in a place where I could
> know
> > the sender and recipient IP of each message.
> > 
> 
> 
> I remember seeing, here, that someone ported
> uml_switch to python... 
> Maybe that's easier to hack?
> 
> Hope this helps,
> Nuno Silva
> 
> 
> > Thanks,
> > 
> > Nelio
> > 
> > =====
> >
>
+------------------------------------------------------------------------+
> >                       
> http://www.ime.usp.br/~nelio
> > 
> > Yahoo! Mail - o melhor webmail do Brasil
> > http://mail.yahoo.com.br
> > 
> > 
> >
>
-------------------------------------------------------
> > This SF.net email is sponsored by OSDN developer
> relations
> > Here's your chance to show off your extensive
> product knowledge
> > We want to know what you know. Tell us and you
> have a chance to win $100
> >
>
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
> > _______________________________________________
> > User-mode-linux-devel mailing list
> > User-mode-linux-devel@lists.sourceforge.net
> >
>
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
> > 
>  

=====
+------------------------------------------------------------------------+
                       http://www.ime.usp.br/~nelio

Yahoo! Mail - o melhor webmail do Brasil
http://mail.yahoo.com.br


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 10:55 [uml-devel] uml_switch Nelio Pereira
  2003-10-23 14:28 ` Nuno Silva
@ 2003-10-23 18:11 ` Matt Zimmerman
  2003-10-25 14:42   ` steven james
  2003-10-30 18:04 ` BlaisorBlade
  2 siblings, 1 reply; 9+ messages in thread
From: Matt Zimmerman @ 2003-10-23 18:11 UTC (permalink / raw)
  To: user-mode-linux-devel

On Thu, Oct 23, 2003 at 07:55:24AM -0300, Nelio Pereira wrote:

> I would like to know where in the uml_switch code is the best place to do
> that. Actually, I'd like to intercept those messages in a place where I
> could know the sender and recipient IP of each message.

I haven't checked the code, but I don't think that uml_switch decodes the IP
header at all; it only deals with Ethernet frames.

-- 
 - mdz


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 14:46   ` Nelio Pereira
@ 2003-10-25  1:26     ` Jeff Dike
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Dike @ 2003-10-25  1:26 UTC (permalink / raw)
  To: Nelio Pereira; +Cc: Nuno Silva, user-mode-linux-devel

nelio_pereira@yahoo.com.br said:
> The code itself doesn't seem very complicated. I just would like to
> know how a message is transmited to its recipient, then I could
> intercept this message in the right place. 

As Matt said, this is an Ethernet switch, and as such, knows nothing about
IP.  The stuff inside the frames may not even be IP.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 18:11 ` Matt Zimmerman
@ 2003-10-25 14:42   ` steven james
  2003-10-25 18:37     ` Adam Heath
  2003-10-25 22:34     ` Matt Zimmerman
  0 siblings, 2 replies; 9+ messages in thread
From: steven james @ 2003-10-25 14:42 UTC (permalink / raw)
  Cc: user-mode-linux-devel

Greetings,

Of course, UML itself 'just happens' to use the configured IP address
(mildly mangled) as the MAC address for IP traffic.

However, it would be best to add functionality to parse the packet
headers. Definatly NOT wanted for normal use due to efficiency
issues. Perhaps a config option? compile time?

G'day,
sjames



On Thu, 23 Oct 2003, Matt Zimmerman wrote:

> On Thu, Oct 23, 2003 at 07:55:24AM -0300, Nelio Pereira wrote:
> 
> > I would like to know where in the uml_switch code is the best place to do
> > that. Actually, I'd like to intercept those messages in a place where I
> > could know the sender and recipient IP of each message.
> 
> I haven't checked the code, but I don't think that uml_switch decodes the IP
> header at all; it only deals with Ethernet frames.
> 
> 

-- 
-------------------------steven james, director of research, linux labs
... ........ ..... ....                    230 peachtree st nw ste 2701
the original linux labs                             atlanta.ga.us 30303
      -since 1995                              http://www.linuxlabs.com
                                   office 404.577.7747 fax 404.577.7743
-----------------------------------------------------------------------





-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-25 14:42   ` steven james
@ 2003-10-25 18:37     ` Adam Heath
  2003-10-25 22:34     ` Matt Zimmerman
  1 sibling, 0 replies; 9+ messages in thread
From: Adam Heath @ 2003-10-25 18:37 UTC (permalink / raw)
  To: steven james; +Cc: user-mode-linux-devel

On Sat, 25 Oct 2003, steven james wrote:

> Greetings,
>
> Of course, UML itself 'just happens' to use the configured IP address
> (mildly mangled) as the MAC address for IP traffic.

Not for my setup.  I set the mac address of my umls on the cmdline, they talk
to a uml switch, which also happens to be configured to forward to the host.
My umls then use dhcp to get their address.



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-25 14:42   ` steven james
  2003-10-25 18:37     ` Adam Heath
@ 2003-10-25 22:34     ` Matt Zimmerman
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Zimmerman @ 2003-10-25 22:34 UTC (permalink / raw)
  To: user-mode-linux-devel

On Sat, Oct 25, 2003 at 10:42:23AM -0400, steven james wrote:

> Of course, UML itself 'just happens' to use the configured IP address
> (mildly mangled) as the MAC address for IP traffic.

...as a default if it isn't specified.

> However, it would be best to add functionality to parse the packet
> headers. Definatly NOT wanted for normal use due to efficiency issues.
> Perhaps a config option? compile time?

I think it's probably not necessary for the purpose he mentioned; matching
the MAC address is just as good (if not better).  Of course, it would be
even easier to use a tap device instead of uml_switch, and use iptables to
do the matching, which will be much more flexible.

-- 
 - mdz


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] uml_switch
  2003-10-23 10:55 [uml-devel] uml_switch Nelio Pereira
  2003-10-23 14:28 ` Nuno Silva
  2003-10-23 18:11 ` Matt Zimmerman
@ 2003-10-30 18:04 ` BlaisorBlade
  2 siblings, 0 replies; 9+ messages in thread
From: BlaisorBlade @ 2003-10-30 18:04 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Nelio Pereira

Alle 12:55, giovedì 23 ottobre 2003, Nelio Pereira ha scritto:
> Hi list..
>
> I'm using UML to benchmark a distributed protocol
> (cluster membership service) on a virtual network. As
> a way of injecting faults, I thought about changing
> uml_switch so it would not forward every message it
> receives. Roughly speaking, it could deliver only a
> percentage of the messages.

Just use iptables. It's simpler. Download patch-o-matic: then use either 
base/nth.patch or base/random.patch(the second is maybe better) for the 
kernel that will have to support this new option. Then, to filter it, you 
must find a point where to apply the rule. I think the simpler one is to set 
up a bridge as specified for TUN/TAP in the networking page and then add the 
rule on the host FORWARD chain adding -i(or -o) br0. Or maybe, you should add 
it somewhere else(for instance, just use tap devices without a bridge, then 
add that rule with -i tap+ and -o tap+ on FORWARD: it will match packets 
being forwarded on the host between UML's).
>
> I would like to know where in the uml_switch code is
> the best place to do that. Actually, I'd like to
> intercept those messages in a place where I could know
> the sender and recipient IP of each message.

-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2003-11-01 19:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23 10:55 [uml-devel] uml_switch Nelio Pereira
2003-10-23 14:28 ` Nuno Silva
2003-10-23 14:46   ` Nelio Pereira
2003-10-25  1:26     ` Jeff Dike
2003-10-23 18:11 ` Matt Zimmerman
2003-10-25 14:42   ` steven james
2003-10-25 18:37     ` Adam Heath
2003-10-25 22:34     ` Matt Zimmerman
2003-10-30 18:04 ` BlaisorBlade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.