Networks / Arcs

Can anyone point me in the direction of documentation / source code /
whatever to do with what I'd call 'network searchs', i.e. the ability
(preferably in GRASS) to work with the vectors which constitute a river
network, e.g. options such as determining what arcs are upstream of a
point on another arc.

I've been looking at the Programmers Manual concerning vectors - am I
right in assuming that the GRASS 'Vect_read_next_line' function will just
get the next line as it was put in the data file - it doesn't mean the
next arc in a sequence which forms a 'line' ?

Thanks,

Steve Culshaw
NRA North West
e-mail : nra@cix.compulink.co.uk (use this for general usage)
or sculshaw@cix.compulink.co.uk (Private - only checked at best
biweekly)