Changeset 2ebbe9b in mainline for uspace/lib/pcap


Ignore:
Timestamp:
2024-12-13T08:32:55Z (10 months ago)
Author:
Nataliia Korop <n.corop08@…>
Children:
9e26790
Parents:
7924f82
git-author:
Nataliia Korop <n.corop08@…> (2024-03-20 17:06:29)
git-committer:
Nataliia Korop <n.corop08@…> (2024-12-13 08:32:55)
Message:

nic, drvs, pcapctl

Location:
uspace/lib/pcap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcap/include/pcapctl_dump.h

    r7924f82 r2ebbe9b  
    5555extern errno_t pcapctl_list(void);
    5656
    57 
    5857#endif
    5958
  • uspace/lib/pcap/src/pcapctl_dump.c

    r7924f82 r2ebbe9b  
    4545//static service_id_t *pcap_svcs = NULL; ??
    4646
    47 static errno_t str2num(const char* str, size_t* number) {
     47static errno_t str2num(const char *str, size_t *number)
     48{
    4849        size_t num = 0;
    4950        if (*str == 0)
     
    6869}
    6970
    70 static errno_t pcapctl_cat_get_svc(const char *drv_name, service_id_t* svc) {
     71static errno_t pcapctl_cat_get_svc(const char *drv_name, service_id_t *svc)
     72{
    7173        errno_t rc;
    7274        category_id_t pcap_cat;
     
    98100}
    99101
    100 extern errno_t pcapctl_list(void) {
    101 
     102errno_t pcapctl_list(void)
     103{
    102104        errno_t rc;
    103105        category_id_t pcap_cat;
     
    118120        }
    119121
    120         fprintf(stdout, "Services:\n");
     122        fprintf(stdout, "Devices:\n");
    121123        for (unsigned i = 0; i < count; ++i) {
    122124                char *name = NULL;
     
    128130}
    129131
    130 
    131 static errno_t pcapctl_get_name_from_number(const char* svcnum, const char** svcname) {
    132 
     132static errno_t pcapctl_get_name_from_number(const char *svcnum, const char **svcname)
     133{
    133134        errno_t rc;
    134135        category_id_t pcap_cat;
     
    183184                return ENOMEM;
    184185
    185 
    186         const char* svcname;
     186        const char *svcname;
    187187
    188188        rc = pcapctl_get_name_from_number(svcnum, &svcname);
Note: See TracChangeset for help on using the changeset viewer.