From: Nivedita Singhvi <niv@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] Trivial update of comments/typo clean up in network-bridge
Date: Wed, 09 Nov 2005 20:38:23 -0800 [thread overview]
Message-ID: <4372CEBF.8070909@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2240 bytes --]
# HG changeset patch
# User niv@us.ibm.com
# Node ID 886772466a62576c1ee3ccd28cd6486eb06afc5e
# Parent 136b2d20dc81db51924aee54c8ec4ce6232defa2
Updates comments in network-bridge, removes dead code, minor typo fixes.
diff -r 136b2d20dc81 -r 886772466a62 tools/examples/network-bridge
--- a/tools/examples/network-bridge Wed Nov 9 15:08:37 2005
+++ b/tools/examples/network-bridge Thu Nov 10 04:31:24 2005
@@ -16,7 +16,7 @@
#
# Usage:
#
-# network (start|stop|status) {VAR=VAL}*
+# network-bridge (start|stop|status) {VAR=VAL}*
#
# Vars:
#
@@ -27,18 +27,27 @@
# netdev The interface to add to the bridge (default eth${vifnum}).
# antispoof Whether to use iptables to prevent spoofing (default no).
#
+# Internal Vars:
+# pdev="p${netdev}"
+# vdev="veth${vifnum}"
+# vif0="vif0.${vifnum}"
+#
# start:
-# Creates the bridge and enslaves netdev to it.
-# Copies the IP addresses from netdev to the bridge.
-# Deletes the routes to netdev and adds them on bridge.
+# Creates the bridge
+# Copies the IP and MAC addresses from netdev to vdev
+# Renames netdev to be pdev
+# Renames vdev to be netdev
+# Enslaves pdev, vdev to bridge
#
# stop:
-# Removes netdev from the bridge.
-# Deletes the routes to bridge and adds them to netdev.
+# Removes netdev from the bridge
+# Transfers addresses, routes from netdev to pdev
+# Renames netdev to vdev
+# Renames pdev to netdev
+# Deletes bridge
#
# status:
-# Print ifconfig for netdev and bridge.
-# Print routes.
+# Print addresses, interfaces, routes
#
#============================================================================
@@ -97,23 +106,12 @@
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/${src}/dev ${dst}/
" | sh -e
- # Remove automatic routes on destionation device
+ # Remove automatic routes on destination device
ip route list | sed -ne "
/dev ${dst}\( \|$\)/ {
s/^/ip route del /
p
}" | sh -e
-}
-
-# Usage: del_addrs src
-del_addrs () {
- local src=$1
- ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
-s/inet/ip addr del/
-s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
-s/${src}/dev ${src}/
-" | sh -e
- ip link set dev ${dst} up
}
# Usage: transfer_routes src dst
[-- Attachment #2: network-patch.diff --]
[-- Type: text/plain, Size: 2211 bytes --]
# HG changeset patch
# User niv@us.ibm.com
# Node ID 886772466a62576c1ee3ccd28cd6486eb06afc5e
# Parent 136b2d20dc81db51924aee54c8ec4ce6232defa2
Updates comments in network-bridge, removes dead code, minor typo fixes.
diff -r 136b2d20dc81 -r 886772466a62 tools/examples/network-bridge
--- a/tools/examples/network-bridge Wed Nov 9 15:08:37 2005
+++ b/tools/examples/network-bridge Thu Nov 10 04:31:24 2005
@@ -16,7 +16,7 @@
#
# Usage:
#
-# network (start|stop|status) {VAR=VAL}*
+# network-bridge (start|stop|status) {VAR=VAL}*
#
# Vars:
#
@@ -27,18 +27,27 @@
# netdev The interface to add to the bridge (default eth${vifnum}).
# antispoof Whether to use iptables to prevent spoofing (default no).
#
+# Internal Vars:
+# pdev="p${netdev}"
+# vdev="veth${vifnum}"
+# vif0="vif0.${vifnum}"
+#
# start:
-# Creates the bridge and enslaves netdev to it.
-# Copies the IP addresses from netdev to the bridge.
-# Deletes the routes to netdev and adds them on bridge.
+# Creates the bridge
+# Copies the IP and MAC addresses from netdev to vdev
+# Renames netdev to be pdev
+# Renames vdev to be netdev
+# Enslaves pdev, vdev to bridge
#
# stop:
-# Removes netdev from the bridge.
-# Deletes the routes to bridge and adds them to netdev.
+# Removes netdev from the bridge
+# Transfers addresses, routes from netdev to pdev
+# Renames netdev to vdev
+# Renames pdev to netdev
+# Deletes bridge
#
# status:
-# Print ifconfig for netdev and bridge.
-# Print routes.
+# Print addresses, interfaces, routes
#
#============================================================================
@@ -97,23 +106,12 @@
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/${src}/dev ${dst}/
" | sh -e
- # Remove automatic routes on destionation device
+ # Remove automatic routes on destination device
ip route list | sed -ne "
/dev ${dst}\( \|$\)/ {
s/^/ip route del /
p
}" | sh -e
-}
-
-# Usage: del_addrs src
-del_addrs () {
- local src=$1
- ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
-s/inet/ip addr del/
-s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
-s/${src}/dev ${src}/
-" | sh -e
- ip link set dev ${dst} up
}
# Usage: transfer_routes src dst
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2005-11-10 4:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4372CEBF.8070909@us.ibm.com \
--to=niv@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/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 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.