C# 클래스 WinLLDPService.WinLLDP

파일 보기 프로젝트 열기: raspi/WinLLDPService 1 사용 예제들

공개 메소드들

메소드 설명
FriendlyName ( ) : string

Get OS "friendly name" for example "Windows 7 Ultimate edition"

HKLM_GetString ( string path, string key ) : string
Run ( ) : bool
Stop ( ) : void

비공개 메소드들

메소드 설명
CloseDevices ( ) : void

Close devices for sending

CreateLLDPPacket ( NetworkInterface adapter, PacketInfo pinfo ) : PacketDotNet.Packet

Generate LLDP packet for adapter

CreateTlvString ( string>.Dictionary dict ) : string

TLV value's lenght can be only 0-511 octets Organizational spesific TLV value's lenght can be only 0-507 octets

GetCapabilityOptions ( ) : List

List possible LLDP capabilities such as: - Bridge - Router - WLAN Access Point - Station

GetCapabilityOptionsBits ( List capabilities ) : ushort

Get LLDP capabilities as bits

GetTickCount64 ( ) : System.UInt64
GetUsers ( ) : List

Get list of users We cant use Environment.UserName or System.Security.Principal.WindowsIdentity.GetCurrent().Name because those return ("SYSTEM" or "NT AUTHORITY\SYSTEM"). This is because it is reading Windows Service user, not logged in user(s). So different approach finding correct logged in user(s) have to be used.

OpenDevices ( ) : void

Open devices for sending

ReadableSize ( double size, int unit ) : string

Change for example adapter link speed into more human readable format

getCIDRFromIPMaskAddress ( IPAddress ip ) : int

Convert network mask to CIDR notation

sendRawPacket ( NetworkInterface adapter, PacketDotNet.Packet payload ) : bool

메소드 상세

FriendlyName() 공개 메소드

Get OS "friendly name" for example "Windows 7 Ultimate edition"
public FriendlyName ( ) : string
리턴 string

HKLM_GetString() 공개 메소드

public HKLM_GetString ( string path, string key ) : string
path string
key string
리턴 string

Run() 공개 메소드

public Run ( ) : bool
리턴 bool

Stop() 공개 메소드

public Stop ( ) : void
리턴 void