hurryon hurryon/2006-05
officialhomepage|welcometohurryon|hurryon_gallery|hurryon_guestbook|hurryon_teaching
RSS

May 29, 2006 #
Performance evaluation scenarios. #
Submitted by hurryon @ 05-29 [06:20 pm]
OK, as I mentioned on http://www.hurryon.org/index.php/hurryon/2006-04#05 , I will start the performance evaluation with my mobility team, so I wrote the scenarios to evaluate the performance of MIPL. First of all, Su-Jin have to do it with me due to his writing paper and then I will give others another scenarios. All evaluation should include the basic scenario and then to represent specific features, we will use the particular scenario. The basic scenario is as following:

¼º´ÉÆò°¡ ½Ã³ª¸®¿À #


1. (À̵¿³ëµåÀÇ ±â´ÉÀÌ ¾ø´Â »óÅ¿¡¼­ÀÇ Æò°¡) #

1) RTT ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
2) UDP throughput ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
3) TCP throughput ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)

½Ã³ª¸®¿À 1 ¿¡ ´ëÇÑ ¼³¸í:
1) ÃøÁ¤ÀÇ x ÃàÀº ICMPv6 ÀÇ ÆÐŶ ½ÃÄö½º, y ÃàÀº RTT(ms) À¸·Î ±×¸°´Ù. RTT ÀÇ ¼º´É ÃøÁ¤À» ÇÒ ¶§, ICMPv6 ¸Þ¼¼ÁöÀÇ Å©±â¸¦ º¯°æÇØ °¡¸é¼­ ÃøÁ¤À» Çϵµ·Ï ÇÏ´Â °ÍÀÌ ÁÁ´Ù. ¸Þ¼¼Áö Å©±â¿¡ µû¶ó ÃøÁ¤ ŸÀÓÀÌ ´Þ¶ó Áú Å×´Ï ¸»ÀÌ´Ù. ¸Þ¼¼ÁöÀÇ Å©±â¸¦ ´Þ¸®ÇÏ´Â ÀÌÀ¯´Â MIPv6 ÀÇ ÄÁÆ®·Ñ ¸Þ¼¼ÁöµéÀÇ Å©±â°¡ °³º°ÀûÀ¸·Î ´Þ¶ó Áú ¼ö Àֱ⠶§¹®¿¡ ¸Þ¼¼ÁöÀÇ Å©±â¸¦ ´Þ¸®ÇÏ¿© ƯÁ¤ ±â´É¿¡ µû¶ó RTT ŸÀÓÀ» ±¸ÇÏ¿© µô·¹ÀÌ ¿©ºÎ¸¦ ÆÇ´Ü ÇÒ ¼ö ÀÖ´Ù. (¹Ï°Å³ª ¸»°Å³ª, ³­ Áö±Ý »ó»óÀÇ ³ª·¡¸¦ ÆîÄ¡´Â Áß, ȤÀº ´ë·« ¼Ò¼³À» ¾²´Â ÁßÀÌ´Ï ÀÌÇØ¸¦ ºÎŹ)
2) ÃøÁ¤ÀÇ x ÃàÀº UDP throughput, y ÃøÀº packet loss rate(%) ·Î ±×¸°´Ù. ´ç¿¬È÷ UDP throughput ÃàÀÌ Áõ°¡ÇÔ¿¡ µû¶ó packet loss rate µµ Áõ°¡ ÇÒ°ÍÀ̰í, ƯÁ¤ x Ãà¿¡¼­ ÀͽºÆ÷³Ù¼ÈÇÏ°Ô Áõ°¡ ÇÒ°ÍÀ̱⠶§¹®¿¡ ¿ì¸®´Â ¿©±â¼­ ¾î´À Á¤µµ±îÁöÀÇ UDP throughput ¿¡¼­ ¼º´ÉÀ» º¸Àå ¹ÞÀ» ¼ö ÀÖ´Ù´Â °ÍÀ» ¾Ë¼ö ÀÖÀ» °ÍÀÌ´Ù. ³ÄÇáÇáÇá. (À̰͵µ ¹Ï°Å³ª ¸»°Å³ª)
3) ÃøÁ¤ÀÇ x ÃàÀº TCP window size, y ÃàÀº TCP throughput À¸·Î ÇÑ´Ù. ÀÌ·¸°Ô Çϸé window size ÀÇ º¯È­¿¡ µû¶ó TCP throughput À» °è»êÇÒ ¼ö ÀÖÀ» °ÍÀ̰í, ÃÖ»óÀÇ window size À» ãÀ» ¼ö ÀÖ´Ù. (³Ê¹« ´ç¿¬ÇѰÍÀÌÁö¿ä, ´ë·« ¿ì¸®´Â ¿©±â¼­ ÃÖ»óÀÇ window size À» ±¸Çϱâ À§ÇÑ ¼öÇнÄÀ» ã¾Æ º¼ Çʿ䰡 ÀÖ´Ù. ¿Ö³Ä? ³í¹®¿¡ ¼ö½ÄÇϳª ´õ ³Ö¾î¼­ »Ç´ëµµ ³»°í ¼öÇÐÀûÀÎ ¼ö½ÄÀÇ °á°ú¿Í ½ÇÁ¦ Å×½ºÆ® ȯ°æÀÇ °á°ú¸¦ ºñ±³ÇØ º¼ ¼öµµ ÀÖÀ¸´Ï ¸»ÀÌ´Ù. À̰͵µ ¾îµð±îÁö³ª º»ÀÎÀÇ »ý°¢ÀÌ´Ù)

2. (À̵¿³ëµåÀÇ ±â´ÉÀ» ºÎ¿©ÇÏ¿© Ȩ³×Æ®¿öÅ©(HN)¿¡¼­ ¿ÜºÎ³×Æ®¿öÅ©(FN)À¸·Î À̵¿ÇÏ´Â »óÅ¿¡¼­ÀÇ Æò°¡) #

1) RTT ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
2) ICMPv6 Packet loss ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
3) UDP throughput ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
4) UDP packet loss ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)
5) TCP throughput ¸¦ ±¸ÇÑ´Ù. (MN -> CN) (CN -> MN)

½Ã³ª¸®¿À 2 ¿¡ ´ëÇÑ ¼³¸í:
1) ½Ã³ª¸®¿À 1ÀÇ 1)°ú °°ÀÌ ÃøÁ¤ÀÇ x ÃàÀº ICMPv6 ÀÇ ÆÐŶ ½ÃÄö½º, y ÃàÀº RTT(ms) À¸·Î ±×¸°´Ù. À̶§ À̵¿ ³ëµå´Â ÇÚµå¿ÀÇÁ¸¦ ÁÖ±âÀûÀ¸·Î ¼öÇàÇÑ´Ù. ´ç¿¬È÷ ÇÚµå¿ÀÇÁ ¶§¹®¿¡ ½Ã³ª¸®¿À 1ÀÇ 1) °á°ú ±×·¡ÇÁ¿Í ´Ù¸¥ ¸ð¾çÀÌ ³ª¿Ã °ÍÀ̸ç À̰ÍÀº ÇÚµå¿ÀÇÁ¿¡ µû¶ó ICMPv6 ¸Þ¼¼ÁöÀÇ RTT º¯È­¸¦ º¸¿© ÁÙ°ÍÀÌ´Ù.
2) x ÃàÀº ICMPv6 packet size ·Î Çϰí y ÃàÀº packet loss ·Î Ç¥ÇöÇÑ´Ù. ¹°·Ð À̵¿ ³ëµå´Â ÇÚµå¿ÀÇÁ¸¦ ÁÖ±âÀûÀ¸·Î ¼öÇàÇÑ´Ù. ÀÌ ÃøÁ¤À» ÇÏ´Â ÀÌÀ¯´Â ¸Þ¼¼ÁöÀÇ Å©±â º¯È­¿¡ µû¶ó ¾î´À Á¤µµÀÇ packet loss °¡ ³ª¿À´ÂÁöÀ» ¾Ë¾Æ º¸±â À§ÇÑ °ÍÀÌ´Ù. ½Ã³ª¸®¿À 1ÀÇ 1)°ú ºñ±³ÇØ º¼¸¸ÇÑ °á°ú°¡ ³ª¿Ã °ÍÀÌ´Ù. (³ª¸§µ¥·Î ÀÇ¹Ì ºÎ¿©¸¦ ÇÑ´Ù¸é, MIPv6 ÀÇ ÄÁÆ®·Ñ ¸Þ¼¼ÁöÀÇ ÃÖÀû Å©±â¸¦ ÆÇ´Ü ÇÒ ¼ö ÀÖ´Ù. ±×°Íµµ ÇÚµå¿ÀÇÁ½ÃÀÇ ÃÖÀû Å©±â. ³ÄÇáÇá)
3) À̵¿ ³ëµå´Â ÁÖ±âÀûÀ¸·Î ÇÚµå¿ÀÇÁ¸¦ ¼öÇàÇϸç x ÃàÀº ½Ã°£(s), y ÃàÀº UDP throughput À¸·Î ±×¸°´Ù. ÇÚµå¿ÀÇÁ¿¡ µû¶ó UDP throughput ÀÇ °á°ú¸¦ º¼ ¼ö ÀÖ´Ù.
4) À̵¿ ³ëµåÀÇ Mobility Rate ¸¦ º¯È­½ÃÄÑ °¡¸ç UDP throughput À» ±¸ÇÑ´Ù. x ÃàÀº Mobility Rate, y ÃàÀº UDP packet loss rate (%) À¸·Î ±×¸°´Ù.
5) x ÃàÀº ½Ã°£, y ÃàÀº TCP throughput À¸·Î ±×¸°´Ù. ¹°·Ð À̵¿ ³ëµå´Â ÁÖ±âÀûÀ¸·Î ÇÚµå¿ÀÇÁ¸¦ ¼öÇàÇÑ´Ù. ´ç¿¬È÷ °á°ú´Â ÇÚµå¿ÀÇÁ¿¡ µû¶ó TCP throughput ÀÇ º¯È­¸¦ ¾Ë ¼ö ÀÖ´Ù. ±Ùµ¥, À̶§ ¹®Á¦°¡ µÇ´Â °ÍÀÌ window size ÀÇ °áÁ¤ÀÌ´Ù. ¹«ÀÛÁ¤ ¸ðµç window size À» °¡Áö°í ÃøÁ¤ÇÏ´Â°Ç ¿ØÁö ÈÄÁ® º¸ÀδÙ. ±×·¡¼­ ½Ã³ª¸®¿À 1ÀÇ 3) ¿¡¼­ »ç¿ëµÇ¾ú´ø ÃÖÀûÀÇ window size À» °¡Áö°í ÃøÁ¤ÇÑ´Ù. ºñ·Ï ¸ðºô¸®Æ¼ °üÁ¡ÀÌ ¾ø´Â °ÍÀ̶ó ÇÒÁö¶óµµ ÀÏ´Ü Àú°É·Î ÇÏÀÚ.

Á¤¸® #

ÀÏ´Ü À§¿Í °°Àº ½Ã³ª¸®¿Àµé µ¥·Î ¼º´ÉÆò°¡¸¦ ¼öÇàÇÑ´Ù¸é À̵¿È¯°æÀÇ Æ¯¼ºÀ» È®½ÇÇÏ°Ô ÆÇ´ÜÇÒ ¼ö ÀÖ´Â ±âÃÊ ÀÚ·áµéÀ» »Ì¾Æ ³¾ ¼ö ÀÖ´Ù°í, hurryon Àº »ý°¢ÇÑ´Ù. ¹¹, ¾Æ´Ï¸é ¸»°í.

ÀÀ¿ë #

IPsec À» AC (Access Router) ´Ü¿¡¼­ °É¾î¼­ ¼º´ÉÆò°¡¸¦ Çϴ°͵µ ÀÀ¿ëÀÌ µÉ ¼ö ÀÖ´Ù. (´ë·«, ¶Ç ´Ù¸¥ ³í¹® °Å¸®°¡ µÈ´Ù. ³Ê¹« ¾å¤Ô¤¶¤Á¤²ÇÏ´Ù°í »ý°¢ÇÏÁö ¸¶¶ó. ±×·¯´Â µ¿¾È ´Ù¸¥ ¾å¤Ô¤¶¤Á¤²ÇÑ ³íµéÀÌ ³í¹® ¾´´Ù)
QoS À» AC ´Ü¿¡¼­ °É¾î¼­ ¼º´ÉÆò°¡¸¦ Çϴ°͵µ ÀÀ¿ëÀÌ µÉ ¼ö ÀÖ´Ù. À̰͵µ ´ç¿¬È÷ ÁÁÀº ÀÀ¿ëÀÌ´Ù. ´ë·« À̵¿³ëµåÀÇ ÇÚµå¿ÀÇÁ BU ¸Þ¼¼Áö¿¡ Ŭ·¡½º-A ¸¦ ¸¶Å·ÇÏ¿© Å×½ºÆ® ÇÏ´Â ºÎºÐÀ» ³ÖÀ¸¸é µÈ´Ù.

´ë·«, Çϳª°¡Áö°í ¿©·¯°¡Áö·Î ºº¾Æ ¸ÔÀ» ¼ö ÀÖÀ¸´Ï, Âü ÁÁÀº°Å °°´Ù. -- hurryon 2006-05-29 18:21:51

Well...I made a note of the scenario #1 to get the performance evaluation. In this night, our team will do that.

-- hurryon 2006-05-30 21:19:07

Top Universities. #
Submitted by hurryon @ 05-29 [02:48 pm]
Well...in this time, I want to go to Australia for the doctor's course.

-- hurryon 2006-05-29 14:49:40

May 25, 2006 #
Louis Vuitton. #
Submitted by hurryon @ 05-25 [02:29 am]
Well...my one of favorite brands is Louis Vuitton. In this January, Eun-Sun and I went to Paris. That was just a travel. In the travel, we visited the head office of Louis Vuitton. Like me, she love Louis Vuitton. In fact, I didn't really want to get the shop at the time. As you know, products of Louis Vuitton are so expensive and there are so much counterfeits in Korea. However, we went there.

-- hurryon 2006-05-25 02:30:12

Some useful links on my working fields. #
Submitted by hurryon @ 05-24 [04:29 pm]

May 23, 2006 #
What the hell! #
Submitted by hurryon @ 05-23 [06:27 am]
Any time I feel that there are too many things I have to do, I take a few minutes to sit down and organize myself. However, this time is not. What for? I didn't apply for a pre-graduation thesis even though the deadline was 7th last month. What the hell!!! If worst comes to worst, I couldn't get a master degree on time. What shall I do in this sitatuation?

Am I getting my master degree on time? -- hurryon 2006-05-23 06:30:14

Might be. I could get that!!! Thanks my adviser!!! -- hurryon 2006-05-29 14:37:44

Some terminologies in EAP #
Submitted by hurryon @ 05-22 [04:52 pm]
  • Message Integrity Check (MIC): A keyed hash function used for authentication and integrity protection of data. This is usually called a Message Authentication Code (MAC), but IEEE 802 specifications use the acronym MIC to avoid confusion with Medium Access Control.

  • Cryptographic Separation: Two keys (x and y) are "cryptographically separate" if an adversary that knows all messages exchanged in the protocol cannot compute x from y or y from x without "breaking" some cryptographic assumption. In particular, this definition allows that the adversary has the knowledge of all nonces sent in cleartext, as well as all predictable counter values used in the protocol. Breaking a cryptographic assumption would typically require inverting a one-way function or predicting the outcome of a cryptographic pseudo-random number generator without knowledge of the secret state. In other words, if the keys are cryptographically separate, there is no shortcut to compute x from y or y from x, but the work an adversary must do to perform this computation is equivalent to performing an exhaustive search for the secret state value.

  • Master Session Key (MSK): Keying material that is derived between the EAP peer and server and exported by the EAP method. The MSK is at least 64 octets in length. In existing implementations, a AAA server acting as an EAP server transports the MSK to the authenticator.

  • Extended Master Session Key (EMSK): Additional keying material derived between the EAP client and server that is exported by the EAP method. The EMSK is at least 64 octets in length. The EMSK is not shared with the authenticator or any other third party. The EMSK is reserved for future uses that are not defined yet.

May 21, 2006 #
How to optimize code. #
Submitted by hurryon @ 05-21 [05:22 am]
The final stage in any development process is to optimize the code to make it run better, faster, and more effieciently. Of course, in an ideal world, we would be optimizing the code as we went along, but for most applications this simply isn't possible. Well...some optimizing skills could be classify as following: 1. making functions inline 2. avoiding temporary objects 3. passing by reference 4. postponing variable declarations 5. choosing initialization over assigment.

Everyone goes out. #
Submitted by hurryon @ 05-21 [01:20 am]
Basically, everyone goes out to drink. Well...there is the teachers' day in the lab. As you know, I couldn't feel good, so I couldn't stay there more time. In this mood, I would rather stay alone with music. For that reasons, I am in the lab by myself with music.

Do not think about that any more and let to work unmindful of cares and worries. Never mind. Don't care of everything will happen. Nobody can't feel bitter against for my heartlessness. Go ahead!

Life's but a walking shadow, a poor player, that struts and frets his hour upon the stage, and then is heard no more. - [http]William Shakespeare - -- hurryon 2006-05-21

William Shakespeare wrote that all the world's a stage, and all the men and women merely players. I agree with him. There is no more role for me, so I have got to go ahead without any worries. My way is just my role as he wrote. -- hurryon 2006-05-21

What shall I need to carry out the project? #
Submitted by hurryon @ 05-20 [05:44 pm]
Well...don't be panic. I expected like this. I will carry out a part of the project, so I have to arrange the implementation plan again. The targeted open-source code consists a few different characters. To understand and to modify the code, I will have to study something like below:
  • How to write C++ network programming code using ACE (Adaptive Communication Environment).
  • How to use Xerces C++ XML Parser.
  • How to use Boost library.
  • How to use OpenSSL library to make secure communication channels.
  • How to use Autoconf and Automake.
As you can see, those are so many. I will do alone, but I don't worry that. The techniques are essential in advanced programming world and I want to be one of programmers who have advanced programming skills. Everything will be fine.

May 19, 2006 #
Don't expect too much of me anymore. #
Submitted by hurryon @ 05-19 [10:59 pm]
Let me rest on my oars, let me feel free and do not expect too much of me anymore. I will never do for you anything anymore! Do not make a living by lying and imposture. That can easily make others painful. I swear myself I will never help anyone in the lab. Help yourself, don't expect I will help you over any problems. I have had all of things happened in the lab.

May 18, 2006 #
How to use Shared memory and Semaphores. #
Submitted by hurryon @ 05-18 [03:30 pm]
This code describes how to use Shared memory and Semaphores in Linux C programming. This code have come from http://superkkt.com

/* shared_mem.c */

#include <sys/shm.h>
#include <sys/sem.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

static int shm_id;
static int sem_id;
static int *num;
static pid_t main_pid;


void terminator(void) {

    if(getpid() == main_pid) {

        shmctl(shm_id, IPC_RMID, NULL);
        shmdt((void *) num);

        semctl(sem_id, 0, IPC_RMID);
    }
}


int main(void) {

    int a;
    pid_t pid;
    struct sembuf in = {0, -1, SEM_UNDO};
    struct sembuf out = {0, 1, SEM_UNDO};

    union semun {
        int val;
        struct semid_ds *buf;
        ushort *array;
    } argument;

    atexit(terminator);
    main_pid = getpid();

    if((shm_id = shmget(IPC_PRIVATE, sizeof(int), 0666)) < 0) {
        perror("shmget error");
        exit(1);
    }

    if((num = (int *) shmat(shm_id, 0, 0)) == (void *) -1) {
        perror("shmat error");
        exit(1);
    }

    *num = 0;

    if((sem_id = semget(IPC_PRIVATE, 1, 0666)) < 0) {
        perror("semget error");
        exit(1);
    }
    argument.val = 1;
    if(semctl(sem_id, 0, SETVAL, argument) == -1) {
        perror("semctl error");
        exit(1);
    }

    pid = fork();

    /* child */
    if(pid == 0) {

        a = 0;

        while(1) {
            fprintf(stderr, "trying to lock in child\n");
            if(semop(sem_id, &in, 1) == -1) {
                perror("semop error");
                exit(1);
            }

            fprintf(stderr, "locked in child\n");
            sleep(2);

            if(a == 5) {
                fprintf(stderr, "child terminated\n");
                exit(0);
            }

            if(semop(sem_id, &out, 1) == -1) {
                perror("semop error");
                exit(1);
            }

            fprintf(stderr, "unlocked in child\n");

            a++;

            sleep(1);
        }
    }

    else if(pid > 0) {

        a = 0;

        while(1) {
            fprintf(stderr, "trying to lock in parent\n");
            if(semop(sem_id, &in, 1) == -1) {
                perror("semop error");
                exit(1);
            }

            fprintf(stderr, "locked in parent\n");
            sleep(2);

            if(semop(sem_id, &out, 1) == -1) {
                perror("semop error");
                exit(1);
            }
            fprintf(stderr, "unlocked in parent\n");
            sleep(1);
            if(a == 8)
                exit(0);
            a++;
        }
    }

    return(0);
}
-- hurryon 2006-05-18

May 17, 2006 #
I need Guinness!!! #
Submitted by hurryon @ 05-17 [09:43 pm]
In this night, I feel lone. Sometimes, I feel I am walking in this way on my lone.



If I could go back at that time, I wouldn't spend in time and would get the most. -- hurryon 2006-05-17

May 16, 2006 #
How to make arrays of the instance in C++ programming. #
Submitted by hurryon @ 05-16 [03:54 pm]
This code shows me how to make arrays of the instance in C++ programming. The way is the same as C programming. I feel the class is just the structure of C programming, or it is so next door to the structure, but I know it is wrong due to my knowledge about C++ programming and OOP.

Okey...have a look this code. we can see how to make the instance arrays.

/* carray.h */

#include <iostream>
#include <cstring>

using namespace std;

class Carray {

    private:
        char m_title[20];
        char m_name[15];

        int m_number;

    public:
        Carray();
        Carray(const char *name, const int num);
        ~Carray();

        char *get_name(void);
        int get_number(void);
        const Carray &compare(const Carray &c) const;
};

/* carray.cpp */

#include "carray.h"

Carray::Carray() {

    strcpy(m_title, "Instance Array");
    strcpy(m_name, "hurryon");

    m_number = 0;
}

Carray::Carray(const char *name, const int num) {

    strcpy(m_title, "Instance Array");
    strncpy(m_name, name, 14);

    m_number = num;
}

Carray::~Carray() {

}

char *Carray::get_name(void) {

    return(m_name);

}

int Carray::get_number(void) {

    return(m_number);

}

const Carray &Carray::compare(const Carray &c) const {

    if(c.m_number > m_number)
        return(c);

    else
        return(*this);
}

/* use_carray.cpp */

#include "carray.h"

int main(void) {

    Carray c[5] = {
        Carray("Eun-Sun", 27),
        Carray("Jong-Hyouk", 29),
        Carray(),
        Carray(),
        Carray(),
    };

    Carray b;

    int i, n;
    int tmp = 0;

    for(i = 0; i < 5; i++) {

        n = c[i].get_number();

        if(n > tmp) {

            tmp = n;

            b = c[i];
        }
    }

    cout << "Which instance have got the biggerest number? ";
    cout << b.get_name() << endl;

    return(0);
}
-- hurryon 2006-05-16

I am a reviewer on Intelligent System Design and Applications 2006. #
Submitted by hurryon @ 05-16 [03:34 pm]
Well...I have offered to review some papers from the program chair on Intelligent System Design and Applications 2006. This conference is the sixth international conference that brings together international soft computing, artificial intelligence, computational intelligence researchers, developers, practitioners, and users.

However, why do they offered me? Due to the unexpected overload of papers, they request my support to select the best papers. They also need me to give good comments to the authors in case the paper out of their computer science field.

Anyway, it might good situation for me. The program chair on e-mail told me that they will add my name to the list of the program committee once they complete the review phase.

Oops, it's google's new service. #
Submitted by hurryon @ 05-16 [10:32 am]
Google has provided new calendar service. With this service, users could organize their schedule. Also, it provide a share function which user could share his schedule with others. It's google-like thought.

-- hurryon 2006-05-16

May 16, 2006 #
This code shows how to use "this" directive. #
Submitted by hurryon @ 05-16 [08:51 am]
In C++ programming, we sometimes need "this" directive when call its instance. This code shows how to use "this" directive.

/* this.h */

#include <iostream>

using namespace std;

class WhatIsThis {

    private:
        char title[20];
        int value;

    public:
        WhatIsThis();
        WhatIsThis(int i);
        ~WhatIsThis();

        char *get_title(void);
        int get_value(void);

        const WhatIsThis &compare(const WhatIsThis &w) const;
};

/* this.cpp */

#include "this.h"

WhatIsThis::WhatIsThis() {

    strcpy(title, "What is this?");
    value = 10;

}

WhatIsThis::WhatIsThis(int i) {

    strcpy(title, "What is this?");
    value = i;

}

WhatIsThis::~WhatIsThis() {

}

char *WhatIsThis::get_title(void) {

    return(title);
}

int WhatIsThis::get_value(void) {

    return(value);

}

const WhatIsThis &WhatIsThis::compare(const WhatIsThis &w) const {

    if(w.value > value) {

        return(w);
    }

    else
        return(*this);
}

/* use_this.cpp */

#include "this.h"

int main(void) {

    WhatIsThis e = WhatIsThis(30);
    WhatIsThis ee = WhatIsThis(50);
    WhatIsThis bigger;

    cout << e.get_value() << endl;
    cout << ee.get_value() << endl;

    cout << "Which one is bigger? ";

    bigger = e.compare(ee);

    cout << bigger.get_value() << endl;

    return(0);
}
-- hurryon 2006-05-16

There are few ways to make the instance of object. #
Submitted by hurryon @ 05-15 [10:20 pm]
Um...object and instance...they are so stranger for me, but I will soon get used to it. Don't worry about that. Anyway, below codes show us how to make the instance of object.

/* example.h */

#include <iostream>

using namespace std;

class Example {

    private:
        char m_name[15];
        char m_nick[15];

    public:
        Example();
        Example(const char *name, const char *nick);
        ~Example();

        void show(void);
};

/* example.cpp */

#include "example.h"

Example::Example() {

    strcpy(m_name, "Jong-Hyouk");
    strcpy(m_nick, "hurryon");
}

Example::Example(const char *name, const char *nick) {

    strcpy(m_name, name);
    strcpy(m_nick, nick);
}

Example::~Example() {

}

void Example::show(void) {

    cout << m_name << " " << m_nick << endl;

}

/* use_Example.cpp */

#include "example.h"

int main(void) {

    Example e("Eun-Sun", "love0052");
    Example ee = Example("Eun-Sun", "love0052");
    Example *eee = new Example("Eun-Sun", "love0052");

    /* It's possible when we use with default constructor
    Example e;
    Example *eee = new Example;
    */

    cout << "e: ";
    e.show();

    cout << "ee: ";
    ee.show();

    cout << "*eee: ";
    eee->show();

    delete(eee);

    return(0);
}
-- hurryon 2006-05-15

Another way to use the dynamic memory allocation in C++ Programming. #
Submitted by hurryon @ 05-15 [03:37 pm]
Okey...it's so easy to lead to confusion. Don't be fuzzy when I writing C++ codes.

/* 0.c */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct _s {

    char *name;
    char *addr;

    int age;
} S;

int main(int argc, char *argv[]) {

    if(argc <= 1) {
        exit(1);
    }

    S *s; // C style

    s = (S *)malloc(sizeof(S)); // C style

    s->name = (char *)malloc(sizeof(10));
    s->addr = (char *)malloc(sizeof(20));

    strncpy(s->name, "Jong-Hyouk", 10);
    strncpy(s->addr, "Research Plaza 81205", 20);

    s->age = atoi(argv[1]);

    printf("%s %s %d\n", s->name, s->addr, s->age);

    free(s); // C style

    return(0);
}

/* 0.cpp */

#include <iostream>

typedef struct _s {

    char *name;
    char *addr;

    int age;
} S;

int main(int argc, char *argv[]) {

    if(argc <= 1) {
        exit(1);
    }

    S *s = new S; // C++ style

    s->name = (char *)malloc(sizeof(10));
    s->addr = (char *)malloc(sizeof(20));

    strncpy(s->name, "Jong-Hyouk", 10);
    strncpy(s->addr, "Research Plaza 81205", 20);

    s->age = atoi(argv[1]);

    printf("%s %s %d\n", s->name, s->addr, s->age);

    delete(s); // C++ style

    return(0);
}
-- hurryon 2006-05-15

May 13, 2006 #
Best Research Paper Award. #
Submitted by hurryon @ 05-13 [12:08 am]
Well...It's good news. One of papers which I am co-author has won the best research paper prize from Korea Information Processing Society. Although I just gave some advice for writing paper, they added me the co-author. Anyway, the best paper, on 'Analysis on Movement Detection in Mobile IPv6', was written by Hun-Jung Lim, Jong-Hyouk Lee, Young-Ju Han, and my professor. In the paper, we compared movement detection schemes in MIPv6 when a mobile node is doing handoff.



Oops, that is my name. :-) -- hurryon 2006-05-13

May 10, 2006 #
Reference value and pointer value. #
Submitted by hurryon @ 05-10 [01:02 pm]
Well...don't be fuzzy. In C++ programming, we can use reference value to access various values, but the notation is so similar to pointer value of C programming. So, we must be care when we use the reference value. Below code shows how they are different.

/* firstref.cpp */

#include <iostream>

using namespace std;

int main() {

    int rats = 10;
    int &rodents = rats;
    int *ptr = &rats;

    cout << rats << endl; // 10
    cout << rodents << endl; // 10
    cout << *ptr << endl; // 10

    rodents++; // 11
    (*ptr)++; // 12

    cout << rodents << endl; // 12
    cout << *ptr << endl; // 12

    cout << &rats << endl;
    cout << &rodents << endl;
    cout << ptr << endl;
    cout << &ptr << endl;

    return(0);
}
-- hurryon 2006-05-10

It's another one.
/* seref.cpp */

#include <iostream>

using namespace std;

int main(void) {

    int rats = 101;
    int *ptr = &rats;
    int &rodents = *ptr;
    int bunnies = 50;

    ptr = &bunnies;

    cout << rats << endl; // 101
    cout << *ptr << endl; // 50
    cout << rodents << endl; // 101
    cout << bunnies << endl; // 50

    return(0);
}
-- hurryon 2006-05-10

This code show us how to use reference value when we play with function.
/* swaps.cpp */

#include <iostream>

using namespace std;

void swapr(int &a, int &b);
void swapp(int *a, int *b);
void swapv(int a, int b);

int main(void) {

    int wallet1 = 1000;
    int wallet2 = 2000;

    cout << wallet1 << " " << wallet2 << endl; // 1000 2000

    swapr(wallet1, wallet2);

    cout << wallet1 << " " << wallet2 << endl; // 2000 1000

    swapp(&wallet1, &wallet2);

    cout << wallet1 << " " << wallet2 << endl; // 1000 2000

    swapv(wallet1, wallet2);

    cout << wallet1 << " " << wallet2 << endl; // 1000 2000

    return(0);
}

void swapr(int &a, int &b) {

    int tmp;

    tmp = a;
    a = b;
    b = tmp;
}

void swapp(int *a, int *b) {

    int tmp;

    tmp = *a;
    *a = *b;
    *b = tmp;
}

void swapv(int a, int b) {

    int tmp;

    tmp = a;
    a = b;
    b = tmp;
}
-- hurryon 2006-05-10

May 09, 2006 #
Graduation Album. #
Submitted by hurryon @ 05-09 [11:09 pm]
Yesterday, I took some pictures due to making graduation album for my master's degree. Although I didn't sleep enough, I was happy.

-- hurryon 2006-05-09

Mysterious language of computer science. #
Submitted by hurryon @ 05-09 [10:36 pm]
Well, today I could again read an article which was originally written by Dyrk Schingman, Oregon State University. In his article, he represented scientific jargon humorously. The original article is following:

After several years of studying and hard work, I have finally learned scientific jargon. The following list of phrases and their definitions will help you to understand that mysterious language of science and medicine.

-- hurryon 2006-05-09

May 04, 2006 #
Gloomy mood and day #
Submitted by hurryon @ 05-04 [04:01 pm]
Last February, I had submitted two papers to Adhoc-Now 2006 and I have waited the messages from the conference. At last the conference informed me that the papers I submitted has not been accepted for presentation at the conference today. In the messages, the reviewers, who made an examination of my papers, tell me both the papers have weak originalities and technical strengths, so they couldn't include the papers into their proceeding. Well...I have a heart. I didn't elaborate to write the papers. However, the messages made me gloomy.

In the one of comments, the reviewer commented me that the author assumed the existence of correct knowledge about the mobile sojourn and cite three sources for methods to estimate the lodging time, but there were none of the estimates given are guarenteed. Phew...What the hell!!! It means my assumption was totally wrong! The reviewer also tell me my approach based on reusing security association keys hardly makes a convincing case due to the cached security association keys are kept a very brief time.

The another reviewer, who gave me "strong reject!", tell me the exchange of message flows is totally generic and do not consider aspects like EAP authentication message exchane or either how the security association could be restablished. Besides, he give me another shock. According to his comments, my approach is very simplistic and does not consider main work actually in the IETF for fast handover of fast re-authentication in the context of solutions based on pre-authentication, or handover keys.

...well...don't be panic. It is a nature case when we submit the paper, isn't it? So, never panic...But!!! However!!! I really wanted to attend the conference.

Just take a look to the IETF WG to see more clearly today picture. -- hurryon 2006-05-09

May 01, 2006 #
Questionnaire. #
Submitted by hurryon @ 05-01 [04:10 pm]
A couple of weeks ago, I took in a questionnaire about smoking and what kind of cigarettes you like. It was intented to get a premium by definition and the premium come me today. :-)



It's new...one of Raison, which is one of my favorite cigarettes!!! -- hurryon 2006-05-01



«  September 2010  »
 1234
567891011
12131415161718
19202122232425
2627282930 

ls -lc bloglist
hurryon/2004-02
  • hurryon/2004-03
  • hurryon/2004-05
  • hurryon/2004-06
  • hurryon/2004-07
  • hurryon/2004-08
  • hurryon/2004-09
  • hurryon/2004-10
  • hurryon/2004-11
  • hurryon/2004-12
  • hurryon/2005-01
  • hurryon/2005-02
  • hurryon/2005-03
  • hurryon/2005-04
  • hurryon/2005-05
  • hurryon/2005-06
  • hurryon/2005-07
  • hurryon/2005-08
  • hurryon/2005-09
  • hurryon/2005-10
  • hurryon/2005-11
  • hurryon/2005-12
  • hurryon/2006-01
  • hurryon/2006-02
  • hurryon/2006-03
  • hurryon/2006-04
  • hurryon/2006-05
  • hurryon/2006-06
  • hurryon/2006-07
  • hurryon/2006-08
  • hurryon/2006-09
  • hurryon/2006-10
  • hurryon/2006-11
  • hurryon/2006-12
  • hurryon/2007-03
  • hurryon/2007-04
  • hurryon/2007-05
  • hurryon/2007-06
  • hurryon/2007-07
  • hurryon/2007-08
  • hurryon/2007-09
  • hurryon/2007-10
  • hurryon/2007-11
  • hurryon/2007-12
  • hurryon/2008-01
  • hurryon/2008-02
  • hurryon/2008-03
  • hurryon/2008-04
  • hurryon/2008-05
  • hurryon/2008-06
  • hurryon/2008-07
  • hurryon/2008-08
  • hurryon/2008-09
  • hurryon/2008-10
  • hurryon/2008-11
  • hurryon/2008-12
  • hurryon/2009-01
  • hurryon/2009-02
  • hurryon/2009-03
  • hurryon/2009-04
  • hurryon/2009-05
  • hurryon/2009-06
  • hurryon/2009-07
  • hurryon/2009-08
  • hurryon/2009-09
  • hurryon/2009-10
  • hurryon/2009-11
  • hurryon/2009-12
  • hurryon/2010-01
  • hurryon/2010-02
  • hurryon/2010-03
  • hurryon/2010-04
  • hurryon/2010-05
  • hurryon/2010-06
  • hurryon/2010-07



  • cat /dev/time | grep she
    3906 days passed from I love.


    last modified 2009-04-19 20:20:45
    Add Blog|FindPage|DeletePage|LikePages|BlogRss
    3.0362 sec

    Creative Commons License
    Jong-Hyouk Lee에 의해 창작된 hurryon's blog 은(는) 크리에이티브 커먼즈 저작자표시-비영리-변경금지 2.0 대한민국 라이선스에 따라 이용할 수 있습니다.