memcpy problems
HELP
Code:
memcpy(&send_qdisc_stats,&log_qdisc_stats,sizeof(log_qdisc_stats)); Prin tin allagi sto reconfigure prin to set 100Kbit Prin tin allagi sto reconfigure prin to set 100Kbit Prin tin allagi sto reconfigure prin to set Prin tin allagi sto reconfigure prin to set |
Thanks for supplying so much relevant information such as the definitions for send_qdisc_stats and log_qdisc_stats. It makes helping you so much easier. After 1264 posts one would think you'd know that.
|
Anyway, here's an example of how to properly use memcpy():
Code:
#include <stdio.h> two.a = 10, two.b = 20 |
extern union qdisc log_qdisc_stats[10];
union qdisc send_qdisc_stats[10]; struct htb{ char prio[maxlength]; char rate[maxlength]; char ceil[maxlength]; char burst[maxlength]; char cbusrt[maxlength]; }; struct cbq{ char allot[maxlength]; char avpkt[maxlength]; char bandwidth[maxlength]; char rate[maxlength]; char mpu[maxlength]; char bytes[maxlength]; }; struct tbf{ char burst[maxlength]; char mpu[maxlength]; char rate[maxlength]; char peakrate[maxlength]; }; union qdisc{ struct htb htbstats; struct cbq cbqstats; struct tbf tbfstats; }; |
Is the code in your original post the exact code or is there something in between?
Have you tried debugging with gdb? |
All times are GMT -5. The time now is 10:23 AM. |