Re: struct page

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

 



On 7/23/07, Talib Alim <talibalm@xxxxxxxxxxx> wrote:>> I am coding sendpage function for socket descriptor. I am given struct page, offset and size as arguments. My question is what kernel apis are there which allows me to read from struct page ?>> Talib> P.S. I am taking about "const struct proto_ops inet_stream_ops",>> ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags)>> in net/ipv4/af_inet.c file. Only that I want to write this tcp_sendpage function myself for custon stack.
Then create a cleaner api for your custom stack.Refrain from littering the in kernel methods which are tried and tested.Hooking is one option but it is *not* simple to hook networking stackespecially at tcp layer.
I suggest you try developing custom api for your stack if it has to coexist with the in kernel tcp/ip stack.e.g ssize_t tcp_sendpage_custom(struct socket *sock, struct page*page, int offset, size_t size, int flags)
See how the original function uses the struct page * , follow on same lines.
HTH
thanks--psr> _________________________________________________________________> PC Magazine's 2007 editors' choice for best web mail—award-winning Windows Live Hotmail.> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HMWL_mini_pcmag_0707> --> To unsubscribe from this list: send an email with> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx> Please read the FAQ at http://kernelnewbies.org/FAQ>>

-- play the game��.n��������+%����w�j)p���{.n����z�ޖw�n'���q���b�������v��m�����Y�����


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux