Subversion Repositories Kolibri OS

Rev

Rev 6633 | Rev 6683 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6633 Rev 6634
Line 4665... Line 4665...
4665
  * eax = 76 - function number
4665
  * eax = 76 - function number
4666
  * high half of ebx = protocol number
4666
  * high half of ebx = protocol number
4667
  * bh = device number
4667
  * bh = device number
4668
  * bl = subfunction number
4668
  * bl = subfunction number
Line -... Line 4669...
-
 
4669
 
-
 
4670
======================================================================
-
 
4671
==== Function 76, Protocol 0 - Ethernet, Subfunction 0, Read MAC. ====
-
 
4672
======================================================================
-
 
4673
Parameters:
-
 
4674
  * eax = 76 - function number
-
 
4675
  * high half of ebx = 0 (Ethernet)
-
 
4676
  * bh = device number
-
 
4677
  * bl = 0 (Read MAC)
-
 
4678
Returned value:
-
 
4679
  * eax = -1 on error, otherwise lower bits of MAC
-
 
4680
  * bx = upper bits of MAC
-
 
4681
  
-
 
4682
======================================================================
-
 
4683
= Function 76, Protocol 1 - IPv4, Subfunction 0, Read # Packets sent =
-
 
4684
======================================================================
-
 
4685
Parameters:
-
 
4686
  * eax = 76 - function number
-
 
4687
  * high half of ebx = 1 (IPv4)
-
 
4688
  * bh = device number
-
 
4689
  * bl = 0 (Read # packets sent)
-
 
4690
Returned value:
-
 
4691
  * eax = number of packets sent (-1 on error)
-
 
4692
  
-
 
4693
======================================================================
-
 
4694
= Function 76, Protocol 1 - IPv4, Subfunction 1, Read # Packets rcvd =
-
 
4695
======================================================================
-
 
4696
Parameters:
-
 
4697
  * eax = 76 - function number
-
 
4698
  * high half of ebx = 1 (IPv4)
-
 
4699
  * bh = device number
-
 
4700
  * bl = 1 (Read # packets received)
-
 
4701
Returned value:
-
 
4702
  * eax = number of packets received (-1 on error)
-
 
4703
  
-
 
4704
======================================================================
-
 
4705
=== Function 76, Protocol 1 - IPv4, Subfunction 2, Read IP address ===
-
 
4706
======================================================================
-
 
4707
Parameters:
-
 
4708
  * eax = 76 - function number
-
 
4709
  * high half of ebx = 1 (IPv4)
-
 
4710
  * bh = device number
-
 
4711
  * bl = 2 (Read IP address)
-
 
4712
Returned value:
-
 
4713
  * eax = IP address (-1 on error)
-
 
4714
  
-
 
4715
======================================================================
-
 
4716
=== Function 76, Protocol 1 - IPv4, Subfunction 3, Set IP address ====
-
 
4717
======================================================================
-
 
4718
Parameters:
-
 
4719
  * eax = 76 - function number
-
 
4720
  * high half of ebx = 1 (IPv4)
-
 
4721
  * bh = device number
-
 
4722
  * bl = 3 (Set IP address)
-
 
4723
  * ecx = IP address
-
 
4724
Returned value:
-
 
4725
  * eax = -1 on error
-
 
4726
 
-
 
4727
======================================================================
-
 
4728
== Function 76, Protocol 1 - IPv4, Subfunction 4, Read DNS address ===
-
 
4729
======================================================================
-
 
4730
Parameters:
-
 
4731
  * eax = 76 - function number
-
 
4732
  * high half of ebx = 1 (IPv4)
-
 
4733
  * bh = device number
-
 
4734
  * bl = 4 (Read DNS server IP address)
-
 
4735
Returned value:
-
 
4736
  * eax = DNS server IP address (-1 on error)
-
 
4737
  
-
 
4738
======================================================================
-
 
4739
=== Function 76, Protocol 1 - IPv4, Subfunction 5, Set DNS address ===
-
 
4740
======================================================================
4669
 
4741
Parameters:
-
 
4742
  * eax = 76 - function number
-
 
4743
  * high half of ebx = 1 (IPv4)
-
 
4744
  * bh = device number
-
 
4745
  * bl = 5 (Set DNS address)
-
 
4746
  * ecx = DNS server IP address
-
 
4747
Returned value:
-
 
4748
  * eax = -1 on error
-
 
4749
 
4670
Protocols and subfunctions:
4750
======================================================================
-
 
4751
== Function 76, Protocol 1 - IPv4, Subfunction 6, Read subnet mask ===
-
 
4752
======================================================================
-
 
4753
Parameters:
-
 
4754
  * eax = 76 - function number
-
 
4755
  * high half of ebx = 1 (IPv4)
-
 
4756
  * bh = device number
-
 
4757
  * bl = 6 (Read subnet mask)
-
 
4758
Returned value:
Line -... Line 4759...
-
 
4759
  * eax = subnet mask (-1 on error)
-
 
4760
  
-
 
4761
======================================================================
4671
		Unless otherwise specified, output is in eax, additional input in ecx
4762
=== Function 76, Protocol 1 - IPv4, Subfunction 7, Set subnet mask ===
-
 
4763
======================================================================
-
 
4764
Parameters:
4672
 
4765
  * eax = 76 - function number
4673
0 - Ethernet:
4766
  * high half of ebx = 1 (IPv4)
-
 
4767
  * bh = device number
-
 
4768
  * bl = 7 (Set DNS address)
-
 
4769
  * ecx = subnet mask
4674
        0 - Read MAC:
4770
Returned value:
-
 
4771
  * eax = -1 on error
-
 
4772
 
-
 
4773
======================================================================
4675
			returns lower part of mac in EAX, upper part in BX
4774
===== Function 76, Protocol 1 - IPv4, Subfunction 8, Read gateway ====
4676
 
4775
======================================================================
4677
1 - IPv4:
4776
Parameters:
4678
        0 - Read # packets sent
4777
  * eax = 76 - function number
4679
        1 - Read # packets received
4778
  * high half of ebx = 1 (IPv4)
-
 
4779
  * bh = device number
-
 
4780
  * bl = 8 (Read gateway IP address)
-
 
4781
Returned value:
-
 
4782
  * eax = gateway IP address (-1 on error)
-
 
4783
  
-
 
4784
======================================================================
-
 
4785
===== Function 76, Protocol 1 - IPv4, Subfunction 9, Set gateway =====
4680
        2 - Read IP
4786
======================================================================
4681
        3 - Write IP
4787
Parameters:
4682
        4 - Read DNS
4788
  * eax = 76 - function number
4683
        5 - Write DNS
4789
  * high half of ebx = 1 (IPv4)
4684
        6 - Read subnet
4790
  * bh = device number
-
 
4791
  * bl = 9 (Set getway address)
4685
        7 - Write subnet
4792
  * ecx = gateway IP address
4686
        8 - Read gateway
4793
Returned value:
-
 
4794
  * eax = -1 on error
-
 
4795
  
-
 
4796
======================================================================
4687
        9 - Write gateway
4797
= Function 76, Protocol 2 - ICMP, Subfunction 0, Read # Packets sent =
-
 
4798
======================================================================
-
 
4799
Parameters:
-
 
4800
  * eax = 76 - function number
4688
 
4801
  * high half of ebx = 2 (ICMP)
-
 
4802
  * bh = device number
-
 
4803
  * bl = 0 (Read # packets sent)
-
 
4804
Returned value:
-
 
4805
  * eax = number of packets sent (-1 on error)
-
 
4806
  
-
 
4807
======================================================================
-
 
4808
= Function 76, Protocol 2 - ICMP, Subfunction 1, Read # Packets rcvd =
-
 
4809
======================================================================
-
 
4810
Parameters:
-
 
4811
  * eax = 76 - function number
4689
2 - ICMP:
4812
  * high half of ebx = 2 (ICMP)
-
 
4813
  * bh = device number
-
 
4814
  * bl = 1 (Read # packets received)
4690
        0 - Read # packets sent
4815
Returned value:
-
 
4816
  * eax = number of packets received (-1 on error)
-
 
4817
  
-
 
4818
======================================================================
4691
        1 - Read # packets received
4819
= Function 76, Protocol 3 - UDP, Subfunction 0, Read # Packets sent ==
-
 
4820
======================================================================
-
 
4821
Parameters:
-
 
4822
  * eax = 76 - function number
4692
 
4823
  * high half of ebx = 3 (UDP)
-
 
4824
  * bh = device number
-
 
4825
  * bl = 0 (Read # packets sent)
-
 
4826
Returned value:
-
 
4827
  * eax = number of packets sent (-1 on error)
-
 
4828
  
-
 
4829
======================================================================
-
 
4830
= Function 76, Protocol 3 - UDP, Subfunction 1, Read # Packets rcvd ==
-
 
4831
======================================================================
-
 
4832
Parameters:
-
 
4833
  * eax = 76 - function number
4693
3 - UDP:
4834
  * high half of ebx = 3 (UDP)
-
 
4835
  * bh = device number
-
 
4836
  * bl = 1 (Read # packets received)
4694
        0 - Read # packets sent
4837
Returned value:
-
 
4838
  * eax = number of packets received (-1 on error)
-
 
4839
  
-
 
4840
======================================================================
4695
        1 - Read # packets received
4841
= Function 76, Protocol 4 - TCP, Subfunction 0, Read # Packets sent ==
-
 
4842
======================================================================
-
 
4843
Parameters:
-
 
4844
  * eax = 76 - function number
4696
		
4845
  * high half of ebx = 4 (TCP)
-
 
4846
  * bh = device number
-
 
4847
  * bl = 0 (Read # packets sent)
-
 
4848
Returned value:
-
 
4849
  * eax = number of packets sent (-1 on error)
-
 
4850
  
-
 
4851
======================================================================
-
 
4852
= Function 76, Protocol 4 - TCP, Subfunction 1, Read # Packets rcvd ==
-
 
4853
======================================================================
-
 
4854
Parameters:
-
 
4855
  * eax = 76 - function number
4697
4 - TCP:
4856
  * high half of ebx = 4 (TCP)
-
 
4857
  * bh = device number
-
 
4858
  * bl = 1 (Read # packets received)
4698
        0 - Read # packets sent
4859
Returned value:
-
 
4860
  * eax = number of packets received (-1 on error)
-
 
4861
  
-
 
4862
======================================================================
4699
        1 - Read # packets received
4863
= Function 76, Protocol 5 - ARP, Subfunction 0, Read # Packets sent ==
-
 
4864
======================================================================
-
 
4865
Parameters:
-
 
4866
  * eax = 76 - function number
4700
 
4867
  * high half of ebx = 5 (ARP)
-
 
4868
  * bh = device number
-
 
4869
  * bl = 0 (Read # packets sent)
-
 
4870
Returned value:
-
 
4871
  * eax = number of packets sent (-1 on error)
-
 
4872
  
-
 
4873
======================================================================
-
 
4874
= Function 76, Protocol 5 - ARP, Subfunction 1, Read # Packets rcvd ==
-
 
4875
======================================================================
-
 
4876
Parameters:
-
 
4877
  * eax = 76 - function number
4701
5 - ARP:
4878
  * high half of ebx = 5 (ARP)
-
 
4879
  * bh = device number
-
 
4880
  * bl = 1 (Read # packets received)
-
 
4881
Returned value:
-
 
4882
  * eax = number of packets received (-1 on error)
-
 
4883
  
-
 
4884
======================================================================
-
 
4885
== Function 76, Protocol 5 - ARP, Subfunction 2, Read # ARP entries ==
-
 
4886
======================================================================
-
 
4887
Parameters:
-
 
4888
  * eax = 76 - function number
-
 
4889
  * high half of ebx = 5 (ARP)
-
 
4890
  * bh = device number
-
 
4891
  * bl = 2 (Read # current entries in the ARP table)
-
 
4892
Returned value:
-
 
4893
  * eax = number of entries (-1 on error)
-
 
4894
 
-
 
4895
======================================================================
-
 
4896
==== Function 76, Protocol 5 - ARP, Subfunction 3, Read ARP entry ====
-
 
4897
======================================================================
-
 
4898
Parameters:
-
 
4899
  * eax = 76 - function number
4702
        0 - Read # packets sent
4900
  * high half of ebx = 5 (ARP)
-
 
4901
  * bh = device number
-
 
4902
  * bl = 3 (Read ARP entry)
-
 
4903
  * ecx = ARP entry number (0 based)
-
 
4904
  * edi = ptr to buffer where ARP entry will be written
-
 
4905
Returned value:
-
 
4906
  * eax = -1 on error
-
 
4907
Remarks: 
-
 
4908
	ARP_entry struct is defined in ARP.inc in kernel and currently looks like this:
-
 
4909
struct  ARP_entry
-
 
4910
        IP              dd ?
-
 
4911
        MAC             dp ?
-
 
4912
        Status          dw ?
-
 
4913
        TTL             dw ?
-
 
4914
ends 
-
 
4915
 
-
 
4916
======================================================================
-
 
4917
==== Function 76, Protocol 5 - ARP, Subfunction 4, Add ARP entry ====
-
 
4918
======================================================================
-
 
4919
Parameters:
-
 
4920
  * eax = 76 - function number
4703
        1 - Read # packets received
4921
  * high half of ebx = 5 (ARP)
4704
        2 - Read # ARP entry's
4922
  * bh = device number
-
 
4923
  * bl = 4 (Add ARP entry)
-
 
4924
  * esi = ptr to buffer holding ARP entry
-
 
4925
Returned value:
-
 
4926
  * eax = -1 on error
-
 
4927
Remarks: 
-
 
4928
	See previous function for details on ARP entry.
-
 
4929
	
-
 
4930
======================================================================
-
 
4931
=== Function 76, Protocol 5 - ARP, Subfunction 5, Remove ARP entry ====
-
 
4932
======================================================================
-
 
4933
Parameters:
-
 
4934
  * eax = 76 - function number
4705
        3 - Read ARP entry
4935
  * high half of ebx = 5 (ARP)
-
 
4936
  * bh = device number
-
 
4937
  * bl = 3 (Read ARP entry)
-
 
4938
  * ecx = ARP entry number (0 based), use -1 to clear whole ARP table.
-
 
4939
Returned value:
-
 
4940
  * eax = -1 on error
-
 
4941
 
-
 
4942
======================================================================
-
 
4943
=== Function 76, Protocol 5 - ARP, Subfunction 6, Send ARP announce ==
-
 
4944
======================================================================
-
 
4945
Parameters:
-
 
4946
  * eax = 76 - function number
4706
        4 - Add static ARP entry
4947
  * high half of ebx = 5 (ARP)
-
 
4948
  * bh = device number
-
 
4949
  * bl = 6 (Send ARP announce)
-
 
4950
Returned value:
-
 
4951
  * eax = -1 on error
-
 
4952
		
-
 
4953
======================================================================
-
 
4954
=== Function 76, Protocol 5 - ARP, Subfunction 7, Read # conflicts ===
-
 
4955
======================================================================
-
 
4956
Parameters:
-
 
4957
  * eax = 76 - function number
4707
        5 - Remove ARP entry (-1 = remove all)
4958
  * high half of ebx = 5 (ARP)
-
 
4959
  * bh = device number
-
 
4960
  * bl = 7 (Read # IP address conflicts that have occured)
Line 4708... Line 4961...
4708
        6 - Send ARP announce on specified interface
4961
Returned value:
4709
        7 - Read # ARP conflicts (IP address conflicts)
4962
  * eax = # IP address conflicts (-1 on error)
4710
 
4963
 
4711
---------------------- Constants for registers: ----------------------
4964
---------------------- Constants for registers: ----------------------