project help needed urgently



hi
i am having problen while accessing a shel script from grk program.the shell script consist of a set of tc statements for assigning a paricular bandwidth for a host .the shell script is as follows

 #! /bin/bash
 tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handoe 1: cbq abpkt 1000 bandwidth 10 tc qdisc add dev eth0 parent 1: classid 1:1 cbq rate $1 allot 1500 prio 5 bounded isolated tc filter add dev eth0 parent 1: protocol ip prio 16 u32 match ip dst $2 floid 1:1
 exit 0

  my gtk program as follows

    char *ent1;
    char *ent2;
     void ok_pressed (gtkwidget *widget ,gpointer *data)
       {
             ent1= gtk_entry_get_text(GTK.ENTRY(txt_entry)),
             ent2= gtk_entry_get_text(GTK.ENTRY(val_entry)),
             system ('/script ent2 ent1);
       }

in above function when we call script through system function then the parameters passed (ent1 ent2) are not accepting giving error as illegal match but when numbers(VALUES) are passed instead of ent1 ent2 the script gets executed .

one more thing how to change font size
plz guide me




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]