I'm new to C/C++ and i'm looking for some good examples on interactive telnet code. Can somebody point me in the right direction to good real-world examples.
I'm coming from a Perl/Expect background way of doing things, however I want to write something in C/C++ so I can interact through telnet to a Cisco router and perform a series of commands etc.
Some advise too if you don't mind. From my Googling I've seemed to notice C/C++ programmers tend to like re-creating the wheel so to speak when coming to such types of programs, so they tend to build raw sockets etc to do this. Am I right in being lead to believe this? Isn't their an easier way like with Perl to include a module like NET::TELNET and just pass arguments through to the module that has been pre-written. I'm sure there must be something but I think for the most part I may not being searching for the right terms to pull good results.
I guess in a nutshell I'm probably being lazy and I'm looking for some sort of good practical code example. Some of the C books I'm reading are good to get into the language however I don't seem to see many books on the networking side. Now before you mention D. Comer and Stevens books etc which I do know of I'm talking about books that deal with network applications through examples, not the setting up a basic tcp/upd server daemon type. There seem to be plenty of other books on various other topics except when it comes to networking.
Anyway may be a bit short-sighted at the moment into this but I'm yearning for some direction and answers. I hope someone can help.