From: Benjamin <benchu@tamu.edu>
To: linux-kernel@vger.kernel.org
Subject: Modify the sock Structure!!
Date: Sat, 25 Mar 2006 01:11:38 -0600 [thread overview]
Message-ID: <4424ED2A.3040006@tamu.edu> (raw)
Hello! I try to modify the sock Structure in sock.h in order to record
some data!
I just add a unsigned short in the end of the structure. such as:
struct sock {
/* Socket demultiplex comparisons on incoming packets. */
__u32 daddr; /* Foreign IPv4 addr */
__u32 rcv_saddr; /* Bound local IPv4 addr */
...................................................................
....................................................................
void (*destruct)(struct sock *sk);
unsigned short data; /*I put the unsigned short
here*/
};
I re-complied the kernel. The kernel and network functions work
normally so far.
However, I am a new guy for the kernel programming. I just wonder this
modification is
safe or not. Is there any side-effect? Or I need to add additional code
to avoid some unexpected
situation? Thank you very much!
next reply other threads:[~2006-03-25 7:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 7:11 Benjamin [this message]
2006-03-25 18:39 ` Modify the sock Structure!! Jan Engelhardt
2006-03-25 19:05 ` Benjamin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4424ED2A.3040006@tamu.edu \
--to=benchu@tamu.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox