Olá tenho estas funcoes que Inserem, Alteram, Excluem um cliente via dephi com telnet no mikrotik
function Routerboard_InserirMac(sMac, sPassword_key, sPassword_pre_shared, sInterface, sComment: String; bAuthentication, bFowarding: boolean): string;
begin
if (sMac = '') or (sPassword_pre_shared = '') or (sComment = '') then
Result := ''
else
Result := '/ interface wireless access-list add' +
' mac-address=' + sMac +
' interface="' + sInterface+ '"' +
' authentication=' + IIF(bAuthentication, 'yes', 'no') +
' forwarding=' + IIF(bFowarding, 'yes', 'no') +
' private-key="' + sPassword_key + '"' +
' private-pre-shared-key="' + sPassword_pre_shared + '"' +
' comment="' + sComment + '"';
end;
function Routerboard_HabilitarDesabilitarMac(sMac: string; bHabilitar: boolean): string;
begin
if bHabilitar then
Result := '/ interface wireless access-list set [ find' +
' mac-address="' + sMac + '" ] ' + ' disabled=no'
else
Result := '/ interface wireless access-list set [ find ' +
' mac-address="' + sMac + '" ] ' + ' disabled=yes';
end;
function Routerboard_AlterarMac(sMac_Antigo, sMac_Novo, sPassword_pre_shared, sComment, sInterface: string; Habilitado: Boolean): string;
begin
if (sMac_Antigo = '') then
Result := ''
else
Result := '/ interface wireless access-list set [ find' +
' mac-address="' + sMac_Antigo + '" ]' +
' mac-address="' + sMac_Novo + '"' +
' interface="' + sInterface+ '"' +
' private-pre-shared-key="' + sPassword_pre_shared + '"' +
' comment="' + sComment + '"' +
' disabled=' + IIF(Habilitado, 'no', 'yes');
end;
function Routerboard_RemoverPeloMac(sMac: string): string;
begin
if (sMac = '') then
Result := ''
else
Result := '/ interface wireless access-list rem [ find ' +
' mac-address="' + sMac + '" ] ';
end;
As funcoes acima são apenas para compartilhar com alguem que precise, pois funcionaram beleza no meu sistema.
Eu gostaria de pegar os clientes logado e jogar em um grid, em um memo...
Se alguem puder me ajudar
Eu o componente da IndTelNet
Desde já agradeço.