Re: C and Network



On 13 Ago, 21:39, Doug <DougTheS...@xxxxxxxxxxxxxx> wrote:
On Aug 13, 8:10 pm, Aleramo <monferrato2...@xxxxxxxx> wrote:

I want to know if it's possible writing in the C-Language a program
that could:
1) identify the servers and computers in a local network, and knowing
the computers i could access with my identity;
2) give me the possibility to choose one computer i can access, to
have the list of directories and files on C (for Windows) or in the
Home (for Linux).

I hope it's possible writing it with some functions in a library,
because i like C and i don't want to change it with another language.

Bye bye Marco.

Hi Marco,

You'll soon be receiving lots of "we can't help you here" responses.
Sorry about that. You can indeed do what you require in C, though not
standard C. So I'm supposed to point you to other newsgroups where
you can ask more directed questions.

I'll try to give you some pointers, though. I won't bother pointing
out other newsgroups directly - I'm sure you can find them easily
enough. If you can write C, which it sounds like you can, then that
won't be a problem.

If this is a fun, personal, project, then I'd do this with a server-
client type approach. You'll need to use some non-standard-C stuff to
get the job done:
- you'll want a client and a server process. For communication over a
typical network you'll need to know about "sockets". Google and read
up on it over several cases of beer; expect it to take a while.
You'll also need this for your network discovery - finding the other
machines you care about.
- on the servers, you'll need to know how to access the local
filesystem. Google readdir, I'm sure it'll point you to the
equivalents on other platforms
- try and write the code so that the pieces involved in the above are
isolated and can be easily substituted depending on your OS. This
will give you some element of portability.

If this is not for fun, if you just need to get something running:
- if it doesn't need to be homegrown, maybe samba would work for the
platforms you care about. There are other platform specific utilities
(like network shares on windows) that can do the job. At the client
end, the details could be hidden behind a simple CLI script.
- on some OSes (windows is the only one I know about for sure) there
are calls I believe you can make to ask the remote computer to tell
you what you want to know. I'm afraid I don't know much about it,
though. Newsgroups might help here.

Again, this is all very OT here. I'm going to duck now.

Hope that helps,
Doug

My boss gave me this problem to solve with the safety it could be
possible. I had some doubts but he was so safe that i preferred
trying. He was so safe he told me i could solve it for Windows but i
had understood there are some chances for Linux and no for Win.
I think i have to change language, i think at C# he assured me it can
do it. I'll try.

Thank you to everybody :-)

.



Relevant Pages

  • Help with 070-217
    ... The network contains 25,000 computers. ... single Windows 2000 domain named research.contoso.com. ... Server computers that are configured as domain controllers. ...
    (microsoft.public.cert.exam.mcse)
  • Re: Help with 070-217
    ... The network contains 25,000 computers. ... > single Windows 2000 domain named research.contoso.com. ... > Server computers that are configured as domain controllers. ...
    (microsoft.public.cert.exam.mcse)
  • RE: Help with 070-217
    ... The network contains 25,000 computers. ... > single Windows 2000 domain named research.contoso.com. ... > Server computers that are configured as domain controllers. ...
    (microsoft.public.cert.exam.mcse)
  • Re: PID 1212 slowly maxing out?
    ... Windows 2003 servers, but could it affect Windows XP as well? ... I'm on a home network running on wireless. ... Logical Disk Manager service ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Unable to open shared files on wireless network
    ... Windows XP PRO and a laptop also running Windows XP PRO. ... I have both computers in my trusted zone in Zonealarm and I ... open the file and to check network connections etc. ... internet and my wireless card would not connect to my network. ...
    (microsoft.public.windowsxp.network_web)