Changes in / [87488278:af3235d] in mainline


Ignore:
Files:
13 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/ipc/interfaces.h

    r87488278 raf3235d  
    202202            FOURCC_COMPACT('w', 'm', 'g', 't') | IFACE_EXCHANGE_SERIALIZE | IFACE_MOD_CALLBACK,
    203203        INTERFACE_TBARCFG_NOTIFY =
    204             FOURCC_COMPACT('t', 'b', 'c', 'f') | IFACE_EXCHANGE_SERIALIZE,
    205         INTERFACE_PCAP_CONTROL =
    206             FOURCC_COMPACT('p', 'c', 't', 'l') | IFACE_EXCHANGE_SERIALIZE,
     204            FOURCC_COMPACT('t', 'b', 'c', 'f') | IFACE_EXCHANGE_SERIALIZE
    207205} iface_t;
    208206
  • uspace/app/meson.build

    r87488278 raf3235d  
    7272        'nic',
    7373        'nterm',
    74         'pcapctl',
    7574        'ofw',
    7675        'pci',
  • uspace/drv/nic/e1k/e1k.c

    r87488278 raf3235d  
    4949#include <nic.h>
    5050#include <ops/nic.h>
    51 #include <pcapdump_iface.h>
    5251#include "e1k.h"
    5352
     
    175174        /** Lock for EEPROM access */
    176175        fibril_mutex_t eeprom_lock;
    177 
    178176} e1000_t;
    179177
     
    11911189                if (frame != NULL) {
    11921190                        memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size);
    1193 
    11941191                        nic_received_frame(nic, frame);
    11951192                } else {
     
    22012198                goto err_fun_bind;
    22022199
    2203         rc = nic_fun_add_to_cats(fun);
    2204         if (rc != EOK) {
    2205                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    2206                 ddf_fun_unbind(fun);
    2207                 return rc;
    2208         }
     2200        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
     2201        if (rc != EOK)
     2202                goto err_add_to_cat;
     2203
    22092204        return EOK;
    22102205
    2211         // err_add_to_cat:
    2212         // ddf_fun_unbind(fun);
     2206err_add_to_cat:
     2207        ddf_fun_unbind(fun);
    22132208err_fun_bind:
    22142209err_rx_structure:
     
    23702365
    23712366        memcpy(e1000->tx_frame_virt[tdt], data, size);
     2367
    23722368        tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]);
    23732369        tx_descriptor_addr->length = size;
  • uspace/drv/nic/e1k/meson.build

    r87488278 raf3235d  
    2727#
    2828
    29 deps = [ 'nic' , 'pcap' ]
     29deps = [ 'nic' ]
    3030src = files('e1k.c')
  • uspace/drv/nic/ne2k/ne2k.c

    r87488278 raf3235d  
    4343#include <str_error.h>
    4444#include <async.h>
    45 #include <ddf/log.h>
    4645#include "dp8390.h"
    4746
     
    450449        }
    451450
    452         rc = nic_fun_add_to_cats(fun);
     451        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    453452        if (rc != EOK) {
    454                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    455453                ddf_fun_unbind(fun);
     454                ddf_fun_destroy(fun);
    456455                return rc;
    457456        }
     
    483482        nic_driver_implement(&ne2k_driver_ops, &ne2k_dev_ops, &ne2k_nic_iface);
    484483
    485         ddf_log_init(NAME);
    486484        return ddf_driver_main(&ne2k_driver);
    487485}
  • uspace/drv/nic/rtl8139/driver.c

    r87488278 raf3235d  
    4242#include <stdio.h>
    4343#include <str.h>
    44 #include <pcapdump_iface.h>
    4544
    4645#include "defs.h"
     
    13061305                goto err_fun_create;
    13071306        }
    1308 
    1309         rc = nic_fun_add_to_cats(fun);
     1307        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    13101308        if (rc != EOK) {
    1311                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    1312                 ddf_fun_unbind(fun);
    1313                 return rc;
     1309                ddf_msg(LVL_ERROR, "Failed adding function to category");
     1310                goto err_fun_bind;
    13141311        }
    13151312
     
    13191316        return EOK;
    13201317
    1321         // err_fun_bind:
    1322         // ddf_fun_unbind(fun);
     1318err_fun_bind:
     1319        ddf_fun_unbind(fun);
    13231320err_fun_create:
    13241321        ddf_fun_destroy(fun);
  • uspace/drv/nic/rtl8169/driver.c

    r87488278 raf3235d  
    458458        }
    459459
    460         rc = nic_fun_add_to_cats(fun);
     460        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    461461        if (rc != EOK) {
    462                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    463                 ddf_fun_unbind(fun);
    464                 return rc;
     462                ddf_msg(LVL_ERROR, "Failed adding function to category");
     463                goto err_fun_bind;
    465464        }
    466465
     
    469468        return EOK;
    470469
    471         // err_fun_bind:
    472         // ddf_fun_unbind(fun);
     470err_fun_bind:
     471        ddf_fun_unbind(fun);
    473472err_fun_create:
    474473        ddf_fun_destroy(fun);
  • uspace/drv/nic/virtio-net/virtio-net.c

    r87488278 raf3235d  
    4343
    4444#include <virtio-pci.h>
    45 #include <pcapdump_iface.h>
    4645
    4746#define NAME    "virtio-net"
     
    429428        }
    430429
    431         rc = nic_fun_add_to_cats(fun);
     430        rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    432431        if (rc != EOK) {
    433                 ddf_msg(LVL_ERROR, "Failed adding function to categories");
    434                 ddf_fun_unbind(fun);
    435                 return rc;
     432                ddf_msg(LVL_ERROR, "Failed adding function to category");
     433                goto unbind;
    436434        }
    437435
     
    441439        return EOK;
    442440
    443         // unbind:
    444         // ddf_fun_unbind(fun);
     441unbind:
     442        ddf_fun_unbind(fun);
    445443destroy:
    446444        ddf_fun_destroy(fun);
  • uspace/lib/c/include/ipc/services.h

    r87488278 raf3235d  
    6767#define SERVICE_NAME_VBD      "vbd"
    6868#define SERVICE_NAME_VOLSRV   "volsrv"
    69 #define SERVICE_NAME_DUMPPCAP "dumppcap"
     69
    7070#endif
    7171
  • uspace/lib/meson.build

    r87488278 raf3235d  
    8181        'minix',
    8282        'nettl',
    83         'pcap',
    8483        'ofw',
    8584        'pcm',
  • uspace/lib/nic/include/nic.h

    r87488278 raf3235d  
    4444#include <device/hw_res_parsed.h>
    4545#include <ops/nic.h>
    46 #include <pcap_iface.h>
    4746
    4847#define DEVICE_CATEGORY_NIC "nic"
     
    279278extern void nic_sw_period_stop(nic_t *);
    280279
    281 /* pcapdump interface */
    282 extern pcap_iface_t *nic_get_pcap_iface(nic_t *);
    283 
    284 extern errno_t nic_fun_add_to_cats(ddf_fun_t *fun);
    285 
    286280#endif // __NIC_H__
    287281
  • uspace/lib/nic/include/nic_driver.h

    r87488278 raf3235d  
    4646#include <nic/nic.h>
    4747#include <async.h>
    48 #include <pcapdump_iface.h>
    4948
    5049#include "nic.h"
     
    196195         */
    197196        poll_request_handler on_poll_request;
    198 
    199         /** Interface for dumping packets */
    200         pcap_iface_t pcapdump;
    201 
    202197        /** Data specific for particular driver */
    203198        void *specific;
  • uspace/lib/nic/include/nic_impl.h

    r87488278 raf3235d  
    8787extern void nic_close_impl(ddf_fun_t *fun);
    8888
     89extern void nic_device_added_impl(ddf_dev_t *dev);
     90
    8991#endif
    9092
  • uspace/lib/nic/meson.build

    r87488278 raf3235d  
    2727#
    2828
    29 deps = [ 'drv' , 'pcap' ]
     29deps = [ 'drv' ]
    3030c_args = [ '-DLIBNIC_INTERNAL', ]
    3131src = files(
  • uspace/lib/nic/src/nic_driver.c

    r87488278 raf3235d  
    4747#include <ops/nic.h>
    4848#include <errno.h>
    49 #include <pcapdump_iface.h>
    5049
    5150#include "nic_driver.h"
     
    523522         *               calls it inside send_frame handler (with locked main lock)
    524523         */
    525         pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
    526524        fibril_rwlock_read_lock(&nic_data->rxc_lock);
    527525        nic_frame_type_t frame_type;
     
    562560                fibril_rwlock_write_unlock(&nic_data->stats_lock);
    563561        }
    564         //pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
    565562        nic_release_frame(nic_data, frame);
    566563}
     
    651648        nic_data->dev = device;
    652649
    653         errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic_data));
    654         if (pcap_rc != EOK) {
    655                 printf("Failed creating pcapdump port\n");
    656         }
    657 
    658650        return nic_data;
    659651}
     
    11411133}
    11421134
    1143 pcap_iface_t *nic_get_pcap_iface(nic_t *nic_data)
    1144 {
    1145         return &nic_data->pcapdump;
    1146 }
    1147 
    11481135/** @}
    11491136 */
  • uspace/lib/nic/src/nic_impl.c

    r87488278 raf3235d  
    4040#include <ipc/services.h>
    4141#include <ns.h>
    42 #include <pcapdump_iface.h>
    4342#include "nic_driver.h"
    4443#include "nic_ev.h"
     
    180179                return EBUSY;
    181180        }
    182         pcapdump_packet(nic_get_pcap_iface(nic_data), data, size);
     181
    183182        nic_data->send_frame(nic_data, data, size);
    184183        fibril_rwlock_read_unlock(&nic_data->main_lock);
     
    844843}
    845844
    846 errno_t nic_fun_add_to_cats(ddf_fun_t *fun)
    847 {
    848         errno_t rc;
    849         rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
    850         if (rc != EOK)
    851                 goto err_add_to_cat;
    852 
    853         rc = ddf_fun_add_to_category(fun, "pcap");
    854         if (rc != EOK) {
    855                 //ddf_msg(LVL_ERROR, "Failed adding function to category pcap");
    856                 goto err_add_to_cat;
    857         }
    858         return EOK;
    859 
    860 err_add_to_cat:
    861         ddf_fun_unbind(fun);
    862         return rc;
    863 }
    864 
    865845/** @}
    866846 */
  • uspace/srv/locsrv/locsrv.c

    r87488278 raf3235d  
    13931393        categ_dir_add_cat(&cdir, cat);
    13941394
    1395         cat = category_new("pcap");
    1396         categ_dir_add_cat(&cdir, cat);
    13971395        return true;
    13981396}
Note: See TracChangeset for help on using the changeset viewer.