UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API - نسخه متنی

Addison Wesley

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










17.9 Routing Table Operations


On some systems, two ioctl requests are provided to operate on the routing table. These two requests require that the third argument to ioctl be a pointer to an rtentry structure, which is defined by including the <net/route.h> header. These requests are normally issued by the route program. Only the superuser can issue these requests. On systems with routing sockets (Chapter 18), these requests use routing sockets instead of ioctl.

SIOCADDRT

Add an entry to the routing table.

SIOCDELRT

Delete an entry from the routing table.

There is no way with ioctl to list all the entries in the routing table. This operation is usually performed by the netstat program when invoked with the -r flag. This program obtains the routing table by reading the kernel's memory (/dev/kmem). As with listing the ARP cache, we will see an easier (and better) way to do this using sysctl in Section 18.4.


/ 450