SysFn76/ru: Difference between revisions
No edit summary |
No edit summary |
||
Line 257: | Line 257: | ||
'''Списки доступных операций для протоколов:''' | '''Списки доступных операций для протоколов:''' | ||
Ethernet (0) | :* Ethernet (0) | ||
0 - Read MAC | 0 - Read MAC | ||
IPv4 (1) | :* IPv4 (1) | ||
0 - Read # IP packets sent | 0 - Read # IP packets sent | ||
1 - Read # IP packets received | 1 - Read # IP packets received | ||
Line 272: | Line 272: | ||
9 - Write gateway | 9 - Write gateway | ||
ICMP (2) | :* ICMP (2) | ||
0 - Read # ICMP packets sent | 0 - Read # ICMP packets sent | ||
1 - Read # ICMP packets received | 1 - Read # ICMP packets received | ||
3 - enable/disable ICMP echo reply | 3 - enable/disable ICMP echo reply | ||
UDP (3) | :* UDP (3) | ||
0 - Read # UDP packets sent | 0 - Read # UDP packets sent | ||
1 - Read # UDP packets received | 1 - Read # UDP packets received | ||
TCP (4) | :* TCP (4) | ||
0 - Read # TCP packets sent | 0 - Read # TCP packets sent | ||
1 - Read # TCP packets received | 1 - Read # TCP packets received | ||
ARP (5) | :* ARP (5) | ||
0 - Read # ARP packets sent | 0 - Read # ARP packets sent | ||
1 - Read # ARP packets received | 1 - Read # ARP packets received |
Revision as of 11:03, 13 May 2021
Функция 76 - сетевые опции и статистика.
Параметры:
- eax = 76 - номер функции
- верхняя часть ebx = номер протокола
- bh = номер устройства
- bl = номер подфункции
Протокол 0 - Ethernet, Подфункция 0 - Прочитать MAC.
Параметры:
- eax = 76 - function number
- high half of ebx = 0 (Ethernet)
- bh = device number
- bl = 0 (Read MAC)
Возвращаемое значение:
- eax = -1 on error, otherwise lower bits of MAC
- bx = upper bits of MAC
Протокол 1 - IPv4, Подфункция 0, Read # Packets sent
Параметры:
- eax = 76 - function number
- high half of ebx = 1 (IPv4)
- bh = device number
- bl = 0 (Read # packets sent)
Возвращаемое значение:
- eax = number of packets sent (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 1, Read # Packets rcvd
Параметры:
- eax = 76 - function number
- high half of ebx = 1 (IPv4)
- bh = device number
- bl = 1 (Read # packets received)
Возвращаемое значение:
- eax = number of packets received (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 2, Read IP address
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 2 (Read IP address)
Возвращаемое значение:
- eax = IP address (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 3, Set IP address
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 3 (Set IP address)
- ecx = IP address
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 1 - IPv4, Подфункция 4, Read DNS address
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 4 (Read DNS server IP address)
Возвращаемое значение:
- eax = DNS server IP address (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 5, Set DNS address
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 5 (Set DNS address)
- ecx = DNS server IP address
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 1 - IPv4, Подфункция 6, Read subnet mask
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 6 (Read subnet mask)
Возвращаемое значение:
- eax = subnet mask (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 7, Set subnet mask
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 7 (Set subnet mask)
- ecx = subnet mask
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 1 - IPv4, Подфункция 8, Read gateway
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 8 (Read gateway IP address)
Возвращаемое значение:
- eax = gateway IP address (-1 при ошибке)
Протокол 1 - IPv4, Подфункция 9, Set gateway
Параметры:
- eax = 76 - номер функции
- high half of ebx = 1 (IPv4)
- bh = номер устройства
- bl = 9 (Set getway address)
- ecx = gateway IP address
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 2 - ICMP, Подфункция 0, Read # Packets sent
Параметры:
- eax = 76 - номер функции
- high half of ebx = 2 (ICMP)
- bh = номер устройства
- bl = 0 (Read # packets sent)
Возвращаемое значение:
- eax = number of packets sent (-1 при ошибке)
Протокол 2 - ICMP, Подфункция 1, Read # Packets rcvd
Параметры:
- eax = 76 - номер функции
- high half of ebx = 2 (ICMP)
- bh = номер устройства
- bl = 1 (Read # packets received)
Возвращаемое значение:
- eax = number of packets received (-1 при ошибке)
Протокол 3 - UDP, Подфункция 0, Read # Packets sent
Параметры:
- eax = 76 - номер функции
- high half of ebx = 3 (UDP)
- bh = номер устройства
- bl = 0 (Read # packets sent)
Возвращаемое значение:
- eax = number of packets sent (-1 при ошибке)
Протокол 3 - UDP, Подфункция 1, Read # Packets rcvd
Параметры:
- eax = 76 - номер функции
- high half of ebx = 3 (UDP)
- bh = номер устройства
- bl = 1 (Read # packets received)
Возвращаемое значение:
- eax = number of packets received (-1 при ошибке)
Протокол 4 - TCP, Подфункция 0, Read # Packets sent
Параметры:
- eax = 76 - номер функции
- high half of ebx = 4 (TCP)
- bh = номер устройства
- bl = 0 (Read # packets sent)
Возвращаемое значение:
- eax = number of packets sent (-1 при ошибке)
Протокол 4 - TCP, Подфункция 1, Read # Packets rcvd
Параметры:
- eax = 76 - номер функции
- high half of ebx = 4 (TCP)
- bh = номер устройства
- bl = 1 (Read # packets received)
Возвращаемое значение:
- eax = number of packets received (-1 при ошибке)
Протокол 5 - ARP, Подфункция 0, Read # Packets sent
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 0 (Read # packets sent)
Возвращаемое значение:
- eax = number of packets sent (-1 при ошибке)
Протокол 5 - ARP, Подфункция 1, Read # Packets rcvd
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 1 (Read # packets received)
Возвращаемое значение:
- eax = number of packets received (-1 при ошибке)
Протокол 5 - ARP, Подфункция 2, Read # ARP entries
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 2 (Read # current entries in the ARP table)
Возвращаемое значение:
- eax = number of entries (-1 при ошибке)
Протокол 5 - ARP, Подфункция 3, Read ARP entry
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 3 (Read ARP entry)
- ecx = ARP entry number (0 based)
- edi = ptr to buffer where ARP entry will be written
Возвращаемое значение:
- eax = -1 при ошибке
Замечания:
- ARP_entry struct is defined in ARP.inc in kernel and currently
looks like this:
struct ARP_entry
IP dd ? MAC dp ? Status dw ? TTL dw ?
ends
Протокол 5 - ARP, Подфункция 4, Add ARP entry
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 4 (Add ARP entry)
- esi = ptr to buffer holding ARP entry
Возвращаемое значение:
- eax = -1 при ошибке
Замечания:
- See previous function for details on ARP entry.
Протокол 5 - ARP, Подфункция 5, Remove ARP entry
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 5 (Remove ARP entry)
- ecx = ARP entry number (0 based), use -1 to clear whole ARP table.
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 5 - ARP, Подфункция 6, Send ARP announce
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 6 (Send ARP announce)
Возвращаемое значение:
- eax = -1 при ошибке
Протокол 5 - ARP, Подфункция 7, Read # conflicts
Параметры:
- eax = 76 - номер функции
- high half of ebx = 5 (ARP)
- bh = номер устройства
- bl = 7 (Read # IP address conflicts that have occured)
Возвращаемое значение:
- eax = # IP address conflicts (-1 при ошибке)
Константы для регистров:
- eax - SF_NETWORK_PROTOCOL (76)
Списки доступных операций для протоколов:
- Ethernet (0)
0 - Read MAC
- IPv4 (1)
0 - Read # IP packets sent 1 - Read # IP packets received 2 - Read IP 3 - Write IP 4 - Read DNS 5 - Write DNS 6 - Read subnet 7 - Write subnet 8 - Read gateway 9 - Write gateway
- ICMP (2)
0 - Read # ICMP packets sent 1 - Read # ICMP packets received 3 - enable/disable ICMP echo reply
- UDP (3)
0 - Read # UDP packets sent 1 - Read # UDP packets received
- TCP (4)
0 - Read # TCP packets sent 1 - Read # TCP packets received
- ARP (5)
0 - Read # ARP packets sent 1 - Read # ARP packets received 2 - Read # ARP entry's 3 - Read ARP entry 4 - Add static ARP entry 5 - Remove ARP entry (-1 = remove all) 6 - Send ARP announce on specified interface 7 - Read # ARP conflicts (IP address conflicts)