All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arthur van Leeuwen arthurvl@sci.kun.nl
To: lartc@vger.kernel.org
Subject: [LARTC] A complicated routing scenario (for me at least)
Date: Wed, 15 Nov 2000 11:27:29 +0000	[thread overview]
Message-ID: <marc-lartc-98373938216921@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373938216914@msgid-missing>

<PRE>On Wed, 15 Nov 2000, Wingtung.Leung wrote:

&gt;<i> 
</I>&gt;<i> On Tue, 14 Nov 2000, Andrew wrote:
</I>&gt;<i> 
</I>&gt;<i> &gt; OK.. someplace else to look. Are the examples the only thing available
</I>&gt;<i> &gt; in the way of file syntax? Also could someone help me understand how
</I>&gt;<i> &gt; these files are read at startup if they exist. (what code/script is
</I>&gt;<i> &gt; responsible for doing it, and what happens if there are syntax errors. I
</I>&gt;<i> &gt; have a redhat 6.2 system.)
</I>&gt;<i> 
</I>&gt;<i> Maybe you should try it first and experiment a bit. It's rather hard to
</I>&gt;<i> answer on vague questions.
</I>
But not impossible. There is the iproute2 code that does the actual
parsing of the files in /etc/iproute2, and there is some information in the
ip-cref doc. The parser is the function rtnl_tab_initialize in
lib/rt_names.c of the iproute2 source tree. The syntax is one of the
following for scanf formats (read the manpage for scanf if you can't parse
these by sight):

0x%x %s\n
0x%x %s #
%d %s\n
%d %s #

Implied is basically a key-value table, with decimal or hexadecimal numbers
as keys and strings as values. Comments are allowed and whitespace is mostly
ignored. There has to be some between keys and values though. :)

If there are syntax errors you will only see numbers instead of nice user
friendly names, after the ip or tc tool has complained about 'Database &lt;xyz&gt;
is corrupted at &lt;foobar&gt;', with one of the files instead of &lt;xyz&gt; and part
of the file instead of &lt;foobar&gt;

Doei, Arthur.

-- 
  /\    / |      <A HREF="mailto:arthurvl@sci.kun.nl">arthurvl@sci.kun.nl</A>      | Work like you don't need the money
 /__\  /  | A friend is someone with whom | Love like you have never been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody watching



</PRE>

  parent reply	other threads:[~2000-11-15 11:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-13 22:58 [LARTC] A complicated routing scenario (for me at least) Andrew
2000-11-14 14:34 ` Arthur
2000-11-14 14:44 ` Wingtung.Leung
2000-11-14 20:15 ` Andrew
2000-11-14 21:47 ` Whit
2000-11-14 23:10 ` Wingtung.Leung
2000-11-15 10:49 ` Arthur
2000-11-15 11:27 ` Arthur [this message]
2000-11-15 14:57 ` Warren
2000-11-15 19:20 ` Andrew
2000-11-15 19:30 ` Arthur
2000-11-15 20:11 ` Andrew
2000-11-17  1:07 ` Andrew
2000-11-17 12:11 ` Mike
2000-11-17 12:24 ` Mike
2000-11-17 13:00 ` Arthur
2000-11-17 21:25 ` Mike
2000-11-18 16:28 ` Warren

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=marc-lartc-98373938216921@msgid-missing \
    --to=lartc@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 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.