Reading and Exporting OSM Road Data as Network of Road Segments [Adjacency Matrices]
I do not know an exact solution, but will try to present you general ideas:
What you are looking for is adjacence matrix for an routing graph that is generated out of OSM geodata. While there is a huge interest in the routing topic at the community, there are just very few approaches to export the routing graph, as user usually want a full featured routing solution.
- eWorld is a frontend for the SUMO engine that enables this simulator to make use of OSM. You can get network files etc.
- osm2pgrouting fills a PostGIS DB according to the requirements of the pgrouting module
- QGIS road graph plugin can also be used on OSM for example with the OSM import plugin or with preprocessed shapefiles
- osm4routing might fit your export requirements, but I never heard of it before so I guess it's not in wide use...
A last idea would be to play with the trafficmining framework that seems to be very modular, so I guess you can get access to the processed data (but it's in JAVA)
All in all it depends on your use case.