life is tough, so calm down….

cuma dan hanya menyalurkan hobi gw ^_^

LA Pemprograman Jaringan 7

ni LA buat hari senin, 6 April 2008 ya..

#include<stdio.h>;
#include<stdlib.h>;
#include<unistd.h>;
#include<errno.h>;
#include<string.h>;
#include<sys/utsname.h>;

int main(int argc, char* argv) {
int z;
struct utsname u_name;
z = u_name (&u_name);
if (z==1) {
fprint (stderr, “%s : u_name(z) \n”, sterror(errno));
exit(1);
}

printf (“sysname[] = ‘%s’; \n”, u_name.sysname);
printf (“nodename[] = ‘%s’; \n”, u_name.nodename);
printf (“release[] = ‘%s’; \n”, u_name.release);
printf (“version[] = ‘%s’; \n”, u_name.version);
printf (“machine[] = ‘%s’; \n”, u_name.machine);

return 0;
}

Single Post Navigation

4 thoughts on “LA Pemprograman Jaringan 7

  1. oh ya ini buat jarkom yah? saya belom dapet sih masih semester atas, header sysname.h isinya apa tuh?

  2. yup.. jarkom lanjut..
    setau mim adanya header sys/utsname.h
    t merupakan sistem struktur penamaan yang anggotanya sysname[], nodename[], release[], version[], machine[]. semua na memberikan informasi tentang system yang digunakan..
    -mudah2n penjelasan na bener hehehe..-

  3. kok gak da fungsi connect ma module INET ata AF_NET duh dah lama gak main2 di C , buat koneksinya mana ??

  4. 2 panjul –> ni program kan ga connect ke server. ni cuma buat ngecek system yang dipake saat t..

    di la pemrograman jaringan yang sebelumnya mim upload, t baru pake u/ koneksi ke server cos t listing tcp u/ client.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: